forked from TencentCloud/tencentcloud-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
1346 lines (994 loc) · 37.9 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package v20190423
import (
"encoding/json"
tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http"
)
type CallDeviceActionAsyncRequest struct {
*tchttp.BaseRequest
// 产品Id
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
// 设备名称
DeviceName *string `json:"DeviceName,omitempty" name:"DeviceName"`
// 动作Id
ActionId *string `json:"ActionId,omitempty" name:"ActionId"`
// 输入参数
InputParams *string `json:"InputParams,omitempty" name:"InputParams"`
}
func (r *CallDeviceActionAsyncRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CallDeviceActionAsyncRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CallDeviceActionAsyncResponse struct {
*tchttp.BaseResponse
Response *struct {
// 调用Id
ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"`
// 异步调用状态
Status *string `json:"Status,omitempty" name:"Status"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *CallDeviceActionAsyncResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CallDeviceActionAsyncResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CallDeviceActionSyncRequest struct {
*tchttp.BaseRequest
// 产品Id
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
// 设备名称
DeviceName *string `json:"DeviceName,omitempty" name:"DeviceName"`
// 动作Id
ActionId *string `json:"ActionId,omitempty" name:"ActionId"`
// 输入参数
InputParams *string `json:"InputParams,omitempty" name:"InputParams"`
}
func (r *CallDeviceActionSyncRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CallDeviceActionSyncRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CallDeviceActionSyncResponse struct {
*tchttp.BaseResponse
Response *struct {
// 调用Id
ClientToken *string `json:"ClientToken,omitempty" name:"ClientToken"`
// 输出参数
// 注意:此字段可能返回 null,表示取不到有效值。
OutputParams *string `json:"OutputParams,omitempty" name:"OutputParams"`
// 返回状态
Status *string `json:"Status,omitempty" name:"Status"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *CallDeviceActionSyncResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CallDeviceActionSyncResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type ControlDeviceDataRequest struct {
*tchttp.BaseRequest
// 产品ID
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
// 设备名称
DeviceName *string `json:"DeviceName,omitempty" name:"DeviceName"`
// 属性数据
Data *string `json:"Data,omitempty" name:"Data"`
// 请求类型
Method *string `json:"Method,omitempty" name:"Method"`
// 设备ID,该字段有值将代替 ProductId/DeviceName
DeviceId *string `json:"DeviceId,omitempty" name:"DeviceId"`
}
func (r *ControlDeviceDataRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *ControlDeviceDataRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type ControlDeviceDataResponse struct {
*tchttp.BaseResponse
Response *struct {
// 返回信息
Data *string `json:"Data,omitempty" name:"Data"`
// JSON字符串, 返回下发控制的结果信息,
// Sent = 1 表示设备已经在线并且订阅了控制下发的mqtt topic
// 注意:此字段可能返回 null,表示取不到有效值。
Result *string `json:"Result,omitempty" name:"Result"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *ControlDeviceDataResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *ControlDeviceDataResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateDeviceRequest struct {
*tchttp.BaseRequest
// 产品ID。
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
// 设备名称。命名规则:[a-zA-Z0-9:_-]{1,48}。
DeviceName *string `json:"DeviceName,omitempty" name:"DeviceName"`
// LoRaWAN 设备地址
DevAddr *string `json:"DevAddr,omitempty" name:"DevAddr"`
// LoRaWAN 应用密钥
AppKey *string `json:"AppKey,omitempty" name:"AppKey"`
// LoRaWAN 设备唯一标识
DevEUI *string `json:"DevEUI,omitempty" name:"DevEUI"`
// LoRaWAN 应用会话密钥
AppSKey *string `json:"AppSKey,omitempty" name:"AppSKey"`
// LoRaWAN 网络会话密钥
NwkSKey *string `json:"NwkSKey,omitempty" name:"NwkSKey"`
}
func (r *CreateDeviceRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateDeviceRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateDeviceResponse struct {
*tchttp.BaseResponse
Response *struct {
// 设备参数描述。
Data *DeviceData `json:"Data,omitempty" name:"Data"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *CreateDeviceResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateDeviceResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateProjectRequest struct {
*tchttp.BaseRequest
// 项目名称
ProjectName *string `json:"ProjectName,omitempty" name:"ProjectName"`
// 项目描述
ProjectDesc *string `json:"ProjectDesc,omitempty" name:"ProjectDesc"`
}
func (r *CreateProjectRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateProjectRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateProjectResponse struct {
*tchttp.BaseResponse
Response *struct {
// 返回信息
Project *ProjectEntry `json:"Project,omitempty" name:"Project"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *CreateProjectResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateProjectResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateStudioProductRequest struct {
*tchttp.BaseRequest
// 产品名称,名称不能和已经存在的产品名称重复。命名规则:[a-zA-Z0-9:_-]{1,32}
ProductName *string `json:"ProductName,omitempty" name:"ProductName"`
// 产品分组模板ID , ( 自定义模板填写1 , 控制台调用会使用预置的其他ID)
CategoryId *int64 `json:"CategoryId,omitempty" name:"CategoryId"`
// 产品类型 填写 ( 0 普通产品 )
ProductType *int64 `json:"ProductType,omitempty" name:"ProductType"`
// 加密类型 加密类型,1表示证书认证,2表示签名认证。
EncryptionType *string `json:"EncryptionType,omitempty" name:"EncryptionType"`
// 连接类型 可以填写 wifi cellular else
NetType *string `json:"NetType,omitempty" name:"NetType"`
// 数据协议 (1 使用物模型)
DataProtocol *int64 `json:"DataProtocol,omitempty" name:"DataProtocol"`
// 产品描述
ProductDesc *string `json:"ProductDesc,omitempty" name:"ProductDesc"`
// 产品的项目ID
ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"`
}
func (r *CreateStudioProductRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateStudioProductRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateStudioProductResponse struct {
*tchttp.BaseResponse
Response *struct {
// 产品描述
Product *ProductEntry `json:"Product,omitempty" name:"Product"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *CreateStudioProductResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateStudioProductResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteDeviceRequest struct {
*tchttp.BaseRequest
// 产品ID。
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
// 设备名称。
DeviceName *string `json:"DeviceName,omitempty" name:"DeviceName"`
}
func (r *DeleteDeviceRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteDeviceRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteDeviceResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DeleteDeviceResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteDeviceResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteProjectRequest struct {
*tchttp.BaseRequest
// 项目ID
ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"`
}
func (r *DeleteProjectRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteProjectRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteProjectResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DeleteProjectResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteProjectResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteStudioProductRequest struct {
*tchttp.BaseRequest
// 产品ID
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
}
func (r *DeleteStudioProductRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteStudioProductRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteStudioProductResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DeleteStudioProductResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteStudioProductResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DescribeDeviceDataHistoryRequest struct {
*tchttp.BaseRequest
// 区间开始时间
MinTime *uint64 `json:"MinTime,omitempty" name:"MinTime"`
// 区间结束时间
MaxTime *uint64 `json:"MaxTime,omitempty" name:"MaxTime"`
// 产品ID
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
// 设备名称
DeviceName *string `json:"DeviceName,omitempty" name:"DeviceName"`
// 属性字段名称
FieldName *string `json:"FieldName,omitempty" name:"FieldName"`
// 返回条数
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
// 检索上下文
Context *string `json:"Context,omitempty" name:"Context"`
}
func (r *DescribeDeviceDataHistoryRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DescribeDeviceDataHistoryRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DescribeDeviceDataHistoryResponse struct {
*tchttp.BaseResponse
Response *struct {
// 属性字段名称
// 注意:此字段可能返回 null,表示取不到有效值。
FieldName *string `json:"FieldName,omitempty" name:"FieldName"`
// 数据是否已全部返回,true 表示数据全部返回,false 表示还有数据待返回,可将 Context 作为入参,继续查询返回结果。
// 注意:此字段可能返回 null,表示取不到有效值。
Listover *bool `json:"Listover,omitempty" name:"Listover"`
// 检索上下文,当 ListOver 为false时,可以用此上下文,继续读取后续数据
// 注意:此字段可能返回 null,表示取不到有效值。
Context *string `json:"Context,omitempty" name:"Context"`
// 历史数据结果数组,返回对应时间点及取值。
// 注意:此字段可能返回 null,表示取不到有效值。
Results []*DeviceDataHistoryItem `json:"Results,omitempty" name:"Results" list`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DescribeDeviceDataHistoryResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DescribeDeviceDataHistoryResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DescribeDeviceDataRequest struct {
*tchttp.BaseRequest
// 产品ID
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
// 设备名称
DeviceName *string `json:"DeviceName,omitempty" name:"DeviceName"`
// 设备ID,该字段有值将代替 ProductId/DeviceName
DeviceId *string `json:"DeviceId,omitempty" name:"DeviceId"`
}
func (r *DescribeDeviceDataRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DescribeDeviceDataRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DescribeDeviceDataResponse struct {
*tchttp.BaseResponse
Response *struct {
// 设备数据
Data *string `json:"Data,omitempty" name:"Data"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DescribeDeviceDataResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DescribeDeviceDataResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DescribeDeviceRequest struct {
*tchttp.BaseRequest
// 产品ID
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
// 设备名
DeviceName *string `json:"DeviceName,omitempty" name:"DeviceName"`
// 设备ID,该字段有值将代替 ProductId/DeviceName
DeviceId *string `json:"DeviceId,omitempty" name:"DeviceId"`
}
func (r *DescribeDeviceRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DescribeDeviceRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DescribeDeviceResponse struct {
*tchttp.BaseResponse
Response *struct {
// 设备信息
Device *DeviceInfo `json:"Device,omitempty" name:"Device"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DescribeDeviceResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DescribeDeviceResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DescribeModelDefinitionRequest struct {
*tchttp.BaseRequest
// 产品ID
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
}
func (r *DescribeModelDefinitionRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DescribeModelDefinitionRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DescribeModelDefinitionResponse struct {
*tchttp.BaseResponse
Response *struct {
// 产品数据模板
Model *ProductModelDefinition `json:"Model,omitempty" name:"Model"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DescribeModelDefinitionResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DescribeModelDefinitionResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DescribeProjectRequest struct {
*tchttp.BaseRequest
// 项目ID
ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"`
}
func (r *DescribeProjectRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DescribeProjectRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DescribeProjectResponse struct {
*tchttp.BaseResponse
Response *struct {
// 返回信息
Project *ProjectEntryEx `json:"Project,omitempty" name:"Project"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DescribeProjectResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DescribeProjectResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DescribeStudioProductRequest struct {
*tchttp.BaseRequest
// 产品ID
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
}
func (r *DescribeStudioProductRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DescribeStudioProductRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DescribeStudioProductResponse struct {
*tchttp.BaseResponse
Response *struct {
// 产品详情
Product *ProductEntry `json:"Product,omitempty" name:"Product"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DescribeStudioProductResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DescribeStudioProductResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeviceData struct {
// 设备证书,用于 TLS 建立链接时校验客户端身份。采用非对称加密时返回该参数。
// 注意:此字段可能返回 null,表示取不到有效值。
DeviceCert *string `json:"DeviceCert,omitempty" name:"DeviceCert"`
// 设备名称。
// 注意:此字段可能返回 null,表示取不到有效值。
DeviceName *string `json:"DeviceName,omitempty" name:"DeviceName"`
// 设备私钥,用于 TLS 建立链接时校验客户端身份,腾讯云后台不保存,请妥善保管。采用非对称加密时返回该参数。
// 注意:此字段可能返回 null,表示取不到有效值。
DevicePrivateKey *string `json:"DevicePrivateKey,omitempty" name:"DevicePrivateKey"`
// 对称加密密钥,base64编码。采用对称加密时返回该参数。
// 注意:此字段可能返回 null,表示取不到有效值。
DevicePsk *string `json:"DevicePsk,omitempty" name:"DevicePsk"`
}
type DeviceDataHistoryItem struct {
// 时间点,毫秒时间戳
Time *string `json:"Time,omitempty" name:"Time"`
// 字段取值
Value *string `json:"Value,omitempty" name:"Value"`
}
type DeviceInfo struct {
// 设备名
DeviceName *string `json:"DeviceName,omitempty" name:"DeviceName"`
// 0: 离线, 1: 在线, 2: 获取失败, 3 未激活
Status *int64 `json:"Status,omitempty" name:"Status"`
// 设备密钥,密钥加密的设备返回
DevicePsk *string `json:"DevicePsk,omitempty" name:"DevicePsk"`
// 首次上线时间
// 注意:此字段可能返回 null,表示取不到有效值。
// 注意:此字段可能返回 null,表示取不到有效值。
FirstOnlineTime *int64 `json:"FirstOnlineTime,omitempty" name:"FirstOnlineTime"`
// 最后一次上线时间
// 注意:此字段可能返回 null,表示取不到有效值。
LoginTime *int64 `json:"LoginTime,omitempty" name:"LoginTime"`
// 设备创建时间
// 注意:此字段可能返回 null,表示取不到有效值。
CreateTime *int64 `json:"CreateTime,omitempty" name:"CreateTime"`
// 设备固件版本
// 注意:此字段可能返回 null,表示取不到有效值。
Version *string `json:"Version,omitempty" name:"Version"`
// 设备证书
// 注意:此字段可能返回 null,表示取不到有效值。
DeviceCert *string `json:"DeviceCert,omitempty" name:"DeviceCert"`
// 日志级别
// 注意:此字段可能返回 null,表示取不到有效值。
LogLevel *int64 `json:"LogLevel,omitempty" name:"LogLevel"`
// LoRaWAN 设备地址
// 注意:此字段可能返回 null,表示取不到有效值。
DevAddr *string `json:"DevAddr,omitempty" name:"DevAddr"`
// LoRaWAN 应用密钥
// 注意:此字段可能返回 null,表示取不到有效值。
AppKey *string `json:"AppKey,omitempty" name:"AppKey"`
// LoRaWAN 设备唯一标识
// 注意:此字段可能返回 null,表示取不到有效值。
DevEUI *string `json:"DevEUI,omitempty" name:"DevEUI"`
// LoRaWAN 应用会话密钥
// 注意:此字段可能返回 null,表示取不到有效值。
AppSKey *string `json:"AppSKey,omitempty" name:"AppSKey"`
// LoRaWAN 网络会话密钥
// 注意:此字段可能返回 null,表示取不到有效值。
NwkSKey *string `json:"NwkSKey,omitempty" name:"NwkSKey"`
}
type EventHistoryItem struct {
// 事件的时间戳
// 注意:此字段可能返回 null,表示取不到有效值。
TimeStamp *int64 `json:"TimeStamp,omitempty" name:"TimeStamp"`
// 事件的产品ID
// 注意:此字段可能返回 null,表示取不到有效值。
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
// 事件的设备名称
// 注意:此字段可能返回 null,表示取不到有效值。
DeviceName *string `json:"DeviceName,omitempty" name:"DeviceName"`
// 事件的标识符ID
// 注意:此字段可能返回 null,表示取不到有效值。
EventId *string `json:"EventId,omitempty" name:"EventId"`
// 事件的类型
// 注意:此字段可能返回 null,表示取不到有效值。
Type *string `json:"Type,omitempty" name:"Type"`
// 事件的数据
// 注意:此字段可能返回 null,表示取不到有效值。
Data *string `json:"Data,omitempty" name:"Data"`
}
type GetDeviceListRequest struct {
*tchttp.BaseRequest
// 需要查看设备列表的产品 ID
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
// 分页偏移
Offset *int64 `json:"Offset,omitempty" name:"Offset"`
// 分页的大小,数值范围 10-100
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
}
func (r *GetDeviceListRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *GetDeviceListRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type GetDeviceListResponse struct {
*tchttp.BaseResponse
Response *struct {
// 返回的设备列表, 注意列表设备的 DevicePsk 为空, 要获取设备的 DevicePsk 请使用 DescribeDevice
// 注意:此字段可能返回 null,表示取不到有效值。
Devices []*DeviceInfo `json:"Devices,omitempty" name:"Devices" list`
// 产品下的设备总数
// 注意:此字段可能返回 null,表示取不到有效值。
Total *int64 `json:"Total,omitempty" name:"Total"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *GetDeviceListResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *GetDeviceListResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type GetProjectListRequest struct {
*tchttp.BaseRequest
// 偏移量
Offset *int64 `json:"Offset,omitempty" name:"Offset"`
// 个数限制
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
}
func (r *GetProjectListRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *GetProjectListRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type GetProjectListResponse struct {
*tchttp.BaseResponse
Response *struct {
// 项目列表
// 注意:此字段可能返回 null,表示取不到有效值。
Projects []*ProjectEntryEx `json:"Projects,omitempty" name:"Projects" list`
// 列表项个数
// 注意:此字段可能返回 null,表示取不到有效值。
Total *int64 `json:"Total,omitempty" name:"Total"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *GetProjectListResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *GetProjectListResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type GetStudioProductListRequest struct {
*tchttp.BaseRequest
// 项目ID
ProjectId *string `json:"ProjectId,omitempty" name:"ProjectId"`
// 产品DevStatus
DevStatus *string `json:"DevStatus,omitempty" name:"DevStatus"`
// Offset
Offset *uint64 `json:"Offset,omitempty" name:"Offset"`
// Limit
Limit *uint64 `json:"Limit,omitempty" name:"Limit"`
}
func (r *GetStudioProductListRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *GetStudioProductListRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type GetStudioProductListResponse struct {
*tchttp.BaseResponse
Response *struct {
// 产品列表
Products []*ProductEntry `json:"Products,omitempty" name:"Products" list`
// 产品数量
Total *int64 `json:"Total,omitempty" name:"Total"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *GetStudioProductListResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *GetStudioProductListResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type ListEventHistoryRequest struct {
*tchttp.BaseRequest
// 产品ID
ProductId *string `json:"ProductId,omitempty" name:"ProductId"`
// 设备名称
DeviceName *string `json:"DeviceName,omitempty" name:"DeviceName"`
// 搜索的事件类型
Type *string `json:"Type,omitempty" name:"Type"`
// 起始时间, 为0 表示 当前时间 - 24h
StartTime *int64 `json:"StartTime,omitempty" name:"StartTime"`
// 结束时间, 为0 表示当前时间
EndTime *uint64 `json:"EndTime,omitempty" name:"EndTime"`
// 搜索上下文, 用作查询游标
Context *string `json:"Context,omitempty" name:"Context"`
// 单次获取的历史数据项目的最大数量
Size *int64 `json:"Size,omitempty" name:"Size"`
}
func (r *ListEventHistoryRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *ListEventHistoryRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type ListEventHistoryResponse struct {
*tchttp.BaseResponse
Response *struct {
// 搜索上下文, 用作查询游标
// 注意:此字段可能返回 null,表示取不到有效值。
Context *string `json:"Context,omitempty" name:"Context"`
// 搜索结果数量
// 注意:此字段可能返回 null,表示取不到有效值。
Total *int64 `json:"Total,omitempty" name:"Total"`