-
Notifications
You must be signed in to change notification settings - Fork 52
/
rest_client_pe.py
1856 lines (1491 loc) · 132 KB
/
rest_client_pe.py
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 2024. ThingsBoard
#
# 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.
from tb_rest_client.rest_client_base import *
from tb_rest_client.api.api_pe import *
from tb_rest_client.api.api_pe import DashboardControllerApi
from tb_rest_client.models.models_pe import *
logger = getLogger(__name__)
class RestClientPE(RestClientBase):
def __init__(self, base_url):
super().__init__(base_url)
def login(self, username, password):
super(RestClientPE, self).login(username=username, password=password)
self.__load_controllers()
def public_login(self, public_id):
super(RestClientPE, self).public_login(public_id=public_id)
self.__load_controllers()
def token_login(self, token, refresh_token=None):
super(RestClientPE, self).token_login(token=token, refresh_token=refresh_token)
self.__load_controllers()
# Self Registration Controller
def get_privacy_policy(self, ) -> str:
return self.self_registration_controller.get_privacy_policy_using_get()
def get_self_registration_params(self, ) -> SelfRegistrationParams:
return self.self_registration_controller.get_self_registration_params_using_get()
def get_sign_up_self_registration_params(self, pkg_name: Optional[str] = None) -> SignUpSelfRegistrationParams:
return self.self_registration_controller.get_sign_up_self_registration_params_using_get(pkg_name=pkg_name)
def get_terms_of_use(self, ) -> str:
return self.self_registration_controller.get_terms_of_use_using_get()
def delete_self_registration_params(self, domain_name: str):
return self.self_registration_controller.delete_self_registration_params_using_delete(domain_name=domain_name)
def save_self_registration_params(self, body: Optional[SelfRegistrationParams] = None) -> SelfRegistrationParams:
return self.self_registration_controller.save_self_registration_params_using_post(body=body)
# O Auth 2 Config Template Controller
def delete_client_registration_template(self, client_registration_template_id: EntityId) -> None:
client_registration_template_id = self.get_id(client_registration_template_id)
return self.o_auth2_config_template_controller.delete_client_registration_template_using_delete(
client_registration_template_id=client_registration_template_id)
def get_client_registration_templates(self, ) -> List[OAuth2ClientRegistrationTemplate]:
return self.o_auth2_config_template_controller.get_client_registration_templates_using_get()
def save_client_registration_template(self, body: Optional[OAuth2ClientRegistrationTemplate] = None) -> OAuth2ClientRegistrationTemplate:
return self.o_auth2_config_template_controller.save_client_registration_template_using_post(body=body)
# HTTP Integration Controller
def http_check_status_get(self, routing_key: str, request_params: dict, request_headers: dict):
return self.http_integration_controller.check_status_using_get(routing_key=routing_key,
request_params=request_params,
request_headers=request_headers)
def http_process_request_v1_post1(self, routing_key: str, suffix: str):
return self.http_integration_controller.process_request_using_post1(routing_key=routing_key, suffix=suffix)
def http_process_request_v2_post2(self, routing_key: str, suffix: str):
return self.http_integration_controller.process_request_using_post2(routing_key=routing_key, suffix=suffix)
def get_asset_types(self, ) -> List[EntitySubtype]:
return self.asset_controller.get_asset_types_using_get()
def find_by_query(self, body: Optional[AssetSearchQuery] = None) -> List[Asset]:
return self.asset_controller.find_by_query_using_post(body=body)
def get_tenant_assets(self, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None, sort_property: Optional[str] = None,
sort_order: Optional[str] = None) -> PageDataAsset:
return self.asset_controller.get_tenant_assets_using_get(page_size=page_size, page=page, type=type,
text_search=text_search, sort_property=sort_property,
sort_order=sort_order)
# Asset Controller
def process_asset_bulk_import(self, body: Optional[BulkImportRequest] = None) -> BulkImportResultAsset:
return self.asset_controller.process_asset_bulk_import_using_post(body=body)
def save_asset(self, body: Optional[Asset] = None, entity_group_id: EntityGroupId = None, entity_group_ids: Optional[str] = None):
entity_group_id = self.get_id(entity_group_id)
if entity_group_ids:
entity_group_ids = ','.join(entity_group_ids)
return self.asset_controller.save_asset_using_post(body=body, entity_group_id=entity_group_id, entity_group_ids=entity_group_ids)
def get_all_customer_infos(self, page_size: int, page: int, type: Optional[str] = None,
text_search: Optional[str] = None, sort_property: Optional[str] = None,
sort_order: Optional[str] = None,
include_customers: Optional[bool] = None) -> PageDataCustomerInfo:
return self.customer_controller.get_all_customer_infos_using_get(page_size=page_size, page=page, type=type,
text_search=text_search,
sort_property=sort_property,
sort_order=sort_order,
include_customers=include_customers)
def get_customer_customer_infos(self, customer_id: CustomerId, page_size: int, page: int,
type: Optional[str] = None,
text_search: Optional[str] = None, sort_property: Optional[str] = None,
sort_order: Optional[str] = None,
include_customers: Optional[bool] = None) -> PageDataCustomerInfo:
customer_id = self.get_id(customer_id)
return self.customer_controller.get_customer_customer_infos_using_get(page_size=page_size, page=page, type=type,
text_search=text_search,
sort_property=sort_property,
sort_order=sort_order,
include_customers=include_customers,
customer_id=customer_id)
def get_customer_info_by_id(self, customer_id: CustomerId) -> CustomerInfo:
customer_id = self.get_id(customer_id)
return self.customer_controller.get_customer_info_by_id_using_get(customer_id=customer_id)
def get_assets_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: int, page: int,text_search: Optional[str] = None,
sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataAsset:
entity_group_id = self.get_id(entity_group_id)
return self.asset_controller.get_assets_by_entity_group_id_using_get(entity_group_id=entity_group_id,
page_size=page_size, page=page,
text_search=text_search,
sort_property=sort_property,
sort_order=sort_order)
def get_user_assets(self, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None, sort_property: Optional[str] = None,
sort_order: Optional[str] = None, asset_profile_id: Optional[AssetProfileId] = None) -> PageDataAsset:
if asset_profile_id:
asset_profile_id = self.get_id(asset_profile_id)
return self.asset_controller.get_user_assets_using_get(page_size=page_size, page=page, type=type,
text_search=text_search, sort_property=sort_property,
sort_order=sort_order, asset_profile_id=asset_profile_id)
def delete_device_group_ota_package(self, id: str) -> None:
return self.device_group_ota_package_controller.delete_device_group_ota_package_using_delete(id=id)
def get_firmware_by_id(self, group_id: EntityGroupId, firmware_type: str) -> DeviceGroupOtaPackage:
group_id = self.get_id(group_id)
return self.device_group_ota_package_controller.get_firmware_by_id_using_get(group_id=group_id,
firmware_type=firmware_type)
def save_device_group_ota_package(self, body: Optional[DeviceGroupOtaPackage] = None) -> DeviceGroupOtaPackage:
return self.device_group_ota_package_controller.save_device_group_ota_package_using_post(body=body)
def find_by_query_v2(self, body: Optional[EdgeSearchQuery] = None) -> List[Edge]:
return self.edge_controller.find_by_query_using_post2(body=body)
def check_instance(self, body: Union[dict, str, list, bytes, None, RESTResponse, tuple, Any] = None) -> Union[
dict, str, list, bytes, None, RESTResponse, tuple, Any]:
return self.edge_controller.check_instance_using_post(body=body)
def get_tenant_edges(self, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None, sort_property: Optional[str] = None,
sort_order: Optional[str] = None) -> PageDataEdge:
return self.edge_controller.get_tenant_edges_using_get(page_size=page_size, page=page, type=type,
text_search=text_search, sort_property=sort_property,
sort_order=sort_order)
def find_missing_to_related_rule_chains(self, edge_id: EdgeId) -> str:
edge_id = self.get_id(edge_id)
return self.edge_controller.find_missing_to_related_rule_chains_using_get(edge_id=edge_id)
def get_customer_edges(self, customer_id: CustomerId, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None,
sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataEdge:
customer_id = self.get_id(customer_id)
return self.edge_controller.get_customer_edges_using_get(customer_id=customer_id, page_size=page_size,
page=page, type=type, text_search=text_search,
sort_property=sort_property, sort_order=sort_order)
def process_edges_bulk_import(self, body: Optional[BulkImportRequest] = None) -> BulkImportResultEdge:
return self.edge_controller.process_edges_bulk_import_using_post(body=body)
def activate_instance(self, license_secret: str, release_date: str) -> Union[
dict, str, list, bytes, None, RESTResponse, tuple, Any]:
return self.edge_controller.activate_instance_using_post(license_secret=license_secret,
release_date=release_date)
def get_tenant_edge(self, edge_name: str) -> Edge:
return self.edge_controller.get_tenant_edge_using_get(edge_name=edge_name)
def get_edge_by_id(self, edge_id: EdgeId) -> Edge:
edge_id = self.get_id(edge_id)
return self.edge_controller.get_edge_by_id_using_get(edge_id=edge_id)
def get_user_edges(self, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None, sort_property: Optional[str] = None,
sort_order: Optional[str] = None) -> PageDataEdge:
return self.edge_controller.get_user_edges_using_get(page_size=page_size, page=page, type=type,
text_search=text_search, sort_property=sort_property,
sort_order=sort_order)
def delete_edge(self, edge_id: EdgeId) -> None:
edge_id = self.get_id(edge_id)
return self.edge_controller.delete_edge_using_delete(edge_id=edge_id)
def save_edge(self, body: Optional[Edge] = None) -> Edge:
return self.edge_controller.save_edge_using_post(body=body)
def is_edges_support_enabled(self, ) -> bool:
return self.edge_controller.is_edges_support_enabled_using_get()
def get_edges(self, page_size: int, page: int,text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataEdge:
return self.edge_controller.get_edges_using_get(page_size=page_size, page=page, text_search=text_search,
sort_property=sort_property, sort_order=sort_order)
def get_edge_types(self, ) -> List[EntitySubtype]:
return self.edge_controller.get_edge_types_using_get()
def set_edge_root_rule_chain(self, edge_id: EdgeId, rule_chain_id: RuleChainId) -> Edge:
edge_id = self.get_id(edge_id)
rule_chain_id = self.get_id(rule_chain_id)
return self.edge_controller.set_edge_root_rule_chain_using_post(edge_id=edge_id, rule_chain_id=rule_chain_id)
def get_edges_by_ids(self, edge_ids: list) -> List[Edge]:
return self.edge_controller.get_edges_by_ids_using_get(edge_ids=str(edge_ids))
def get_allowed_permissions(self, ) -> AllowedPermissionsInfo:
return self.user_permissions_controller.get_allowed_permissions_using_get()
def change_owner_to_customer(self, owner_id: UserId, entity_id: EntityId, body: Optional[List[str]] = None) -> None:
owner_id = self.get_id(owner_id)
entity_type = self.get_type(entity_id)
entity_id = self.get_id(entity_id)
if body:
body = ','.join(body)
return self.owner_controller.change_owner_to_customer_using_post(owner_id=owner_id, entity_type=entity_type,
entity_id=entity_id, body=body)
def change_owner_to_tenant(self, owner_id: UserId, entity_id: EntityId, body: Optional[List[str]] = None) -> None:
owner_id = self.get_id(owner_id)
entity_type = self.get_type(entity_id)
entity_id = self.get_id(entity_id)
if body:
body = ','.join(body)
return self.owner_controller.change_owner_to_tenant_using_post(owner_id=owner_id, entity_type=entity_type,
entity_id=entity_id, body=body)
def get_persisted_rpc(self, rpc_id: RpcId) -> Rpc:
rpc_id = self.get_id(rpc_id)
return self.rpc_v2_controller.get_persisted_rpc_using_get(rpc_id=rpc_id)
def rpc_v2_get_persisted_rpc(self, rpc_id: RpcId) -> Rpc:
rpc_id = self.get_id(rpc_id)
return self.rpc_v2_controller.get_persisted_rpc_using_get(rpc_id=rpc_id)
def get_user_customers(self, page_size: int, page: int,text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataCustomer:
return self.customer_controller.get_user_customers_using_get(page_size=page_size, page=page,
text_search=text_search,
sort_property=sort_property, sort_order=sort_order)
def handle_one_way_device_rpc_request_v1(self, device_id: DeviceId, body: Optional[str] = None):
device_id = self.get_id(device_id)
return self.rpc_v2_controller.handle_one_way_device_rpc_request_using_post1(device_id=device_id, body=body)
def handle_two_way_device_rpc_request_v1(self, device_id: DeviceId, body: Optional[str] = None):
device_id = self.get_id(device_id)
return self.rpc_v2_controller.handle_two_way_device_rpc_request_using_post1(device_id=device_id, body=body)
def get_persisted_rpc_by_device(self, device_id: DeviceId, page_size: int, page: int, rpc_status: str,
text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None):
device_id = self.get_id(device_id)
return self.rpc_v2_controller.get_persisted_rpc_by_device_using_get(device_id=device_id, page_size=page_size,
page=page, rpc_status=rpc_status,
text_search=text_search,
sort_property=sort_property,
sort_order=sort_order)
def get_customers_by_ids(self, customer_ids: str) -> List[Customer]:
return self.customer_controller.get_customers_by_ids_using_get(customer_ids=customer_ids)
def get_edge_events(self, edge_id: EdgeId, page_size: int, page: int,text_search: Optional[str] = None, sort_property: Optional[str] = None,
sort_order: Optional[str] = None, start_time: Optional[int] = None, end_time: Optional[int] = None) -> PageDataEdgeEvent:
edge_id = self.get_id(edge_id)
return self.edge_event_controller.get_edge_events_using_get(edge_id=edge_id, page_size=page_size, page=page,
text_search=text_search,
sort_property=sort_property, sort_order=sort_order,
start_time=start_time, end_time=end_time)
def get_customers_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: int, page: int,
text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataCustomer:
entity_group_id = self.get_id(entity_group_id)
return self.customer_controller.get_customers_by_entity_group_id_using_get(entity_group_id=entity_group_id,
page_size=page_size, page=page,
text_search=text_search,
sort_property=sort_property,
sort_order=sort_order)
def get_customer_title_by_id(self, customer_id: CustomerId) -> str:
customer_id = self.get_id(customer_id)
return self.customer_controller.get_customer_title_by_id_using_get(customer_id=customer_id)
def get_customers(self, page_size: int, page: int,text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataCustomer:
return self.customer_controller.get_customers_using_get(page_size=page_size, page=page, text_search=text_search,
sort_property=sort_property, sort_order=sort_order)
def get_customer_by_id(self, customer_id: CustomerId) -> Customer:
customer_id = self.get_id(customer_id)
return self.customer_controller.get_customer_by_id_using_get(customer_id=customer_id)
def get_short_customer_info_by_id(self, customer_id: CustomerId) -> Union[
dict, str, list, bytes, None, RESTResponse, tuple, Any]:
customer_id = self.get_id(customer_id)
return self.customer_controller.get_short_customer_info_by_id_using_get(customer_id=customer_id)
def save_customer(self, body: Optional[Customer] = None, entity_group_id: Optional[EntityGroupId] = None, entity_group_ids: Optional[List[str]] = None) -> Customer:
if entity_group_id:
entity_group_id = self.get_id(entity_group_id)
if entity_group_ids:
entity_group_ids = ','.join(entity_group_ids)
return self.customer_controller.save_customer_using_post(body=body, entity_group_id=entity_group_id, entity_group_ids=entity_group_ids)
def get_tenant_customer(self, customer_title: str) -> Customer:
return self.customer_controller.get_tenant_customer_using_get(customer_title=customer_title)
def delete_customer(self, customer_id: CustomerId) -> None:
customer_id = self.get_id(customer_id)
return self.customer_controller.delete_customer_using_delete(customer_id=customer_id)
def get_user_token(self, user_id: UserId) -> None:
user_id = self.get_id(user_id)
return self.user_controller.get_user_token_using_get(user_id=user_id)
def get_activation_link(self, user_id: UserId) -> str:
user_id = self.get_id(user_id)
return self.user_controller.get_activation_link_using_get(user_id=user_id)
def get_user_users(self, page_size: int, page: int,text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataUser:
return self.user_controller.get_user_users_using_get(page_size=page_size, page=page, text_search=text_search,
sort_property=sort_property, sort_order=sort_order)
def delete_user(self, user_id: UserId) -> None:
user_id = self.get_id(user_id)
return self.user_controller.delete_user_using_delete(user_id=user_id)
def get_all_customer_users(self, page_size: int, page: int,text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataUser:
return self.user_controller.get_all_customer_users_using_get(page_size=page_size, page=page,
text_search=text_search,
sort_property=sort_property, sort_order=sort_order)
def set_user_credentials_enabled(self, user_id: UserId, user_credentials_enabled: Optional[bool] = None) -> None:
user_id = self.get_id(user_id)
return self.user_controller.set_user_credentials_enabled_using_post(user_id=user_id,
user_credentials_enabled=user_credentials_enabled)
def get_customer_users(self, customer_id: CustomerId, page_size: int, page: int,text_search: Optional[str] = None,
sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataUser:
customer_id = self.get_id(customer_id)
return self.user_controller.get_customer_users_using_get(customer_id=customer_id, page_size=page_size,
page=page, text_search=text_search,
sort_property=sort_property, sort_order=sort_order)
def get_user_by_id(self, user_id: UserId) -> User:
user_id = self.get_id(user_id)
return self.user_controller.get_user_by_id_using_get(user_id=user_id)
def get_tenant_admins(self, tenant_id: TenantId, page_size: int, page: int,text_search: Optional[str] = None, sort_property: Optional[str] = None,
sort_order: Optional[str] = None,) -> PageDataUser:
tenant_id = self.get_id(tenant_id)
return self.user_controller.get_tenant_admins_using_get(tenant_id=tenant_id, page_size=page_size, page=page,
text_search=text_search, sort_property=sort_property,
sort_order=sort_order)
def is_user_token_access_enabled(self, ) -> bool:
return self.user_controller.is_user_token_access_enabled_using_get()
def get_users_by_ids(self, user_ids: list) -> List[User]:
return self.user_controller.get_users_by_ids_using_get(user_ids=str(user_ids))
def save_user(self, body: Optional[User] = None, send_activation_mail: Optional[bool] = None, entity_group_id: Optional[EntityGroupId] = None, entity_group_ids: Optional[List[str]] = None) -> User:
if entity_group_id:
entity_group_id = self.get_id(entity_group_id)
if entity_group_ids:
entity_group_ids = ','.join(entity_group_ids)
return self.user_controller.save_user_using_post(body=body, send_activation_mail=send_activation_mail, entity_group_id=entity_group_id, entity_group_ids=entity_group_ids)
def send_activation_email(self, email: str) -> None:
return self.user_controller.send_activation_email_using_post(email=email)
def get_users_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: int, page: int,text_search: Optional[str] = None,
sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataUser:
entity_group_id = self.get_id(entity_group_id)
return self.user_controller.get_users_by_entity_group_id_using_get(entity_group_id=entity_group_id,
page_size=page_size, page=page,
text_search=text_search,
sort_property=sort_property,
sort_order=sort_order)
def delete_group_permission(self, group_permission_id: GroupPermissionId) -> None:
group_permission_id = self.get_id(group_permission_id)
return self.group_permission_controller.delete_group_permission_using_delete(
group_permission_id=group_permission_id)
def get_entity_group_permissions(self, entity_group_id: EntityGroupId) -> List[GroupPermissionInfo]:
entity_group_id = self.get_id(entity_group_id)
return self.group_permission_controller.get_entity_group_permissions_using_get(entity_group_id=entity_group_id)
def get_group_permission_by_id(self, group_permission_id: GroupPermissionId) -> GroupPermission:
group_permission_id = self.get_id(group_permission_id)
return self.group_permission_controller.get_group_permission_by_id_using_get(
group_permission_id=group_permission_id)
def get_group_permission_info_by_id(self, group_permission_id: GroupPermissionId, is_user_group: bool) -> GroupPermissionInfo:
group_permission_id = self.get_id(group_permission_id)
return self.group_permission_controller.get_group_permission_info_by_id_using_get(
group_permission_id=group_permission_id, is_user_group=is_user_group)
def get_user_group_permissions(self, user_group_id: EntityId) -> List[GroupPermissionInfo]:
user_group_id = self.get_id(user_group_id)
return self.group_permission_controller.get_user_group_permissions_using_get(user_group_id=user_group_id)
def load_user_group_permission_infos(self, body: Optional[List[GroupPermission]] = None) -> List[GroupPermissionInfo]:
return self.group_permission_controller.load_user_group_permission_infos_using_post(body=body)
def save_group_permission(self, body: Optional[GroupPermission] = None) -> GroupPermission:
return self.group_permission_controller.save_group_permission_using_post(body=body)
def get_device_types(self, ) -> List[EntitySubtype]:
return self.device_controller.get_device_types_using_get()
def process_devices_bulk_import(self, body: Optional[BulkImportRequest] = None) -> BulkImportResultDevice:
return self.device_controller.process_devices_bulk_import_using_post(body=body)
def count_by_device_profile_and_empty_ota_package(self, ota_package_type: str, device_profile_id: DeviceProfileId) -> int:
device_profile_id = self.get_id(device_profile_id)
return self.device_controller.count_by_device_profile_and_empty_ota_package_using_get(
ota_package_type=ota_package_type, device_profile_id=device_profile_id)
def get_devices_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: int, page: int,
text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataDevice:
entity_group_id = self.get_id(entity_group_id)
return self.device_controller.get_devices_by_entity_group_id_using_get(entity_group_id=entity_group_id,
page_size=page_size, page=page,
text_search=text_search,
sort_property=sort_property,
sort_order=sort_order)
def get_devices_by_ids(self, device_ids: list) -> List[Device]:
device_ids = ','.join(device_ids)
return self.device_controller.get_devices_by_ids_using_get(device_ids=device_ids)
def get_user_devices(self, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None, sort_property: Optional[str] = None,
sort_order: Optional[str] = None,) -> PageDataDevice:
return self.device_controller.get_user_devices_using_get(page_size=page_size, page=page, type=type,
text_search=text_search, sort_property=sort_property,
sort_order=sort_order)
def save_device_with_credentials(self, body: Optional[SaveDeviceWithCredentialsRequest] = None,
entity_group_id: Optional[str] = None,
entity_group_ids: Optional[str] = None) -> Device:
return self.device_controller.save_device_with_credentials_using_post(body=body,
entity_group_id=entity_group_id,
entity_group_ids=entity_group_ids)
def update_device_credentials(self, body: Optional[DeviceCredentials] = None) -> DeviceCredentials:
return self.device_controller.update_device_credentials_using_post(body=body)
def save_device(self, body: Optional[Device], access_token: Optional[str] = None) -> Device:
return self.device_controller.save_device_using_post(body=body, access_token=access_token)
def get_device_by_id(self, device_id: DeviceId) -> Device:
device_id = self.get_id(device_id)
return self.device_controller.get_device_by_id_using_get(device_id=device_id)
def get_tenant_devices(self, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None, sort_property: Optional[str] = None,
sort_order: Optional[str] = None,) -> PageDataDevice:
return self.device_controller.get_tenant_devices_using_get(page_size=page_size, page=page, type=type,
text_search=text_search, sort_property=sort_property,
sort_order=sort_order)
def get_customer_devices(self, customer_id: CustomerId, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None,
sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataDevice:
customer_id = self.get_id(customer_id)
return self.device_controller.get_customer_devices_using_get(customer_id=customer_id, page_size=page_size,
page=page, type=type, text_search=text_search,
sort_property=sort_property, sort_order=sort_order)
def assign_device_to_tenant(self, tenant_id: TenantId, device_id: DeviceId) -> Device:
tenant_id = self.get_id(tenant_id)
device_id = self.get_id(device_id)
return self.device_controller.assign_device_to_tenant_using_post(tenant_id=tenant_id, device_id=device_id)
def find_by_query_v1(self, body: Optional[DeviceSearchQuery] = None) -> List[Device]:
return self.device_controller.find_by_query_using_post1(body=body)
def count_by_device_group_and_empty_ota_package(self, ota_package_type: str, ota_package_id: OtaPackageId,
entity_group_id: EntityGroupId) -> int:
ota_package_id = self.get_id(ota_package_id)
entity_group_id = self.get_id(entity_group_id)
return self.device_controller.count_by_device_group_and_empty_ota_package_using_get(
ota_package_type=ota_package_type, ota_package_id=ota_package_id, entity_group_id=entity_group_id)
def delete_device(self, device_id: DeviceId) -> None:
device_id = self.get_id(device_id)
return self.device_controller.delete_device_using_delete(device_id=device_id)
def re_claim_device(self, device_name: str):
return self.device_controller.re_claim_device_using_delete(device_name=device_name)
def get_tenant_device(self, device_name: str) -> Device:
return self.device_controller.get_tenant_device_using_get(device_name=device_name)
def get_device_credentials_by_device_id(self, device_id: DeviceId) -> DeviceCredentials:
device_id = self.get_id(device_id)
return self.device_controller.get_device_credentials_by_device_id_using_get(device_id=device_id)
def delete_converter(self, converter_id: ConverterId) -> None:
converter_id = self.get_id(converter_id)
return self.converter_controller.delete_converter_using_delete(converter_id=converter_id)
def get_converter_by_id(self, converter_id: ConverterId) -> Converter:
converter_id = self.get_id(converter_id)
return self.converter_controller.get_converter_by_id_using_get(converter_id=converter_id)
def get_converters_by_ids(self, converter_ids: list) -> List[Converter]:
converter_ids = ','.join(converter_ids)
return self.converter_controller.get_converters_by_ids_using_get(converter_ids=converter_ids)
def get_converters(self, page_size: int, page: int, is_edge_template: Optional[bool] = None,
text_search: Optional[str] = None, sort_property: Optional[str] = None,
sort_order: Optional[str] = None) -> PageDataConverter:
return self.converter_controller.get_converters_using_get(page_size=page_size, page=page,
is_edge_template=is_edge_template,
text_search=text_search, sort_property=sort_property,
sort_order=sort_order)
def get_latest_converter_debug_input(self, converter_id: ConverterId, integration: Optional[Integration] = None) -> \
Union[
dict, str, list, bytes, None, RESTResponse, tuple, Any]:
converter_id = self.get_id(converter_id)
integration_type = None
integration_name = None
if integration:
integration_type = self.get_type(integration)
integration_name = self.get_id(integration)
return self.converter_controller.get_latest_converter_debug_input_using_get(converter_id=converter_id,
integration_type=integration_type,
integration_name=integration_name)
def assign_integration_to_edge(self, edge_id: EdgeId, integration_id: IntegrationId) -> Integration:
edge_id = self.get_id(edge_id)
integration_id = self.get_id(integration_id)
return self.integration_controller.assign_integration_to_edge_using_post(edge_id=edge_id,
integration_id=integration_id)
def unassign_integration_from_edge(self, edge_id: EdgeId, integration_id: IntegrationId) -> Integration:
edge_id = self.get_id(edge_id)
integration_id = self.get_id(integration_id)
return self.integration_controller.unassign_integration_from_edge_using_delete(edge_id=edge_id,
integration_id=integration_id)
def get_edge_integrations(self, edge_id: EdgeId, page_size: int, page: int, text_search: Optional[str] = None,
sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataIntegration:
edge_id = self.get_id(edge_id)
return self.integration_controller.get_edge_integrations_using_get(edge_id=edge_id, page_size=page_size,
page=page, text_search=text_search,
sort_property=sort_property,
sort_order=sort_order)
def find_all_related_edges_missing_attributes(self, integration_id: IntegrationId) -> str:
integration_id = self.get_id(integration_id)
return self.integration_controller.find_all_related_edges_missing_attributes_using_get(
integration_id=integration_id)
def get_edge_integration_infos(self, edge_id: EdgeId, page_size: int, page: int, text_search: Optional[str] = None,
sort_property: Optional[str] = None,
sort_order: Optional[str] = None, ) -> PageDataIntegrationInfo:
edge_id = self.get_id(edge_id)
return self.integration_controller.get_edge_integration_infos_using_get(edge_id=edge_id, page_size=page_size,
page=page, text_search=text_search,
sort_property=sort_property,
sort_order=sort_order)
def find_edge_missing_attributes_get(self, edge_id: EdgeId, integration_ids: str) -> str:
edge_id = self.get_id(edge_id)
return self.integration_controller.find_edge_missing_attributes_using_get(edge_id=edge_id,
integration_ids=integration_ids)
def get_integrations_converters_info(self):
return self.integration_controller.get_integrations_converters_info()
def save_converter(self, body: Optional[Converter] = None) -> Converter:
return self.converter_controller.save_converter_using_post(body=body)
def test_down_link_converter(self, body: Union[dict, str, list, bytes, None, RESTResponse, tuple, Any] = None, script_lang: Optional[str] = None) -> Union[
dict, str, list, bytes, None, RESTResponse, tuple, Any]:
return self.converter_controller.test_down_link_converter_using_post(body=body, script_lang=script_lang)
def test_up_link_converter(self, body: Union[dict, str, list, bytes, None, RESTResponse, tuple, Any] = None, script_lang: Optional[str] = None) -> Union[
dict, str, list, bytes, None, RESTResponse, tuple, Any]:
return self.converter_controller.test_up_link_converter_using_post(body=body, script_lang=script_lang)
def get_entity_view_types(self, ) -> List[EntitySubtype]:
return self.entity_view_controller.get_entity_view_types_using_get()
def delete_entity_view(self, entity_view_id: EntityViewId) -> None:
entity_view_id = self.get_id(entity_view_id)
return self.entity_view_controller.delete_entity_view_using_delete(entity_view_id=entity_view_id)
def get_entity_view_by_id(self, entity_view_id: EntityViewId) -> EntityView:
entity_view_id = self.get_id(entity_view_id)
return self.entity_view_controller.get_entity_view_by_id_using_get(entity_view_id=entity_view_id)
def get_tenant_entity_view(self, entity_view_name: str) -> EntityView:
return self.entity_view_controller.get_tenant_entity_view_using_get(entity_view_name=entity_view_name)
def get_user_entity_views(self, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None, sort_property: Optional[str] = None,
sort_order: Optional[str] = None,) -> PageDataEntityView:
return self.entity_view_controller.get_user_entity_views_using_get(page_size=page_size, page=page, type=type,
text_search=text_search,
sort_property=sort_property,
sort_order=sort_order)
def get_entity_views_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: int, page: int,
text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataEntityView:
entity_group_id = self.get_id(entity_group_id)
return self.entity_view_controller.get_entity_views_by_entity_group_id_using_get(
entity_group_id=entity_group_id, page_size=page_size, page=page, text_search=text_search,
sort_property=sort_property, sort_order=sort_order)
def get_entity_views_by_ids(self, entity_view_ids: list) -> List[EntityView]:
entity_view_ids = ','.join(entity_view_ids)
return self.entity_view_controller.get_entity_views_by_ids_using_get(entity_view_ids=entity_view_ids)
def save_entity_view(self, body: Optional[EntityView] = None, entity_group_id: Optional[EntityGroupId] = None, entity_group_ids: Optional[List[str]] = None) -> EntityView:
if entity_group_id:
entity_group_id = self.get_id(entity_group_id)
if entity_group_ids:
entity_group_ids = ','.join(entity_group_ids)
return self.entity_view_controller.save_entity_view_using_post(body=body, entity_group_id=entity_group_id, entity_group_ids=entity_group_ids)
def get_tenant_entity_views(self, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None, sort_property: Optional[str] = None,
sort_order: Optional[str] = None,) -> PageDataEntityView:
return self.entity_view_controller.get_tenant_entity_views_using_get(page_size=page_size, page=page, type=type,
text_search=text_search,
sort_property=sort_property,
sort_order=sort_order)
def find_by_query_v4(self, body: Optional[EntityViewSearchQuery] = None) -> List[EntityView]:
return self.entity_view_controller.find_by_query_using_post4(body=body)
def get_customer_entity_views(self, customer_id: CustomerId, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None,
sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataEntityView:
customer_id = self.get_id(customer_id)
return self.entity_view_controller.get_customer_entity_views_using_get(customer_id=customer_id,
page_size=page_size, page=page,
type=type, text_search=text_search,
sort_property=sort_property,
sort_order=sort_order)
def handle_rule_engine_request(self, entity_id: EntityId, timeout: int, body: Optional[str] = None):
entity_type = self.get_type(entity_id)
entity_id = self.get_id(entity_id)
return self.rule_engine_controller.handle_rule_engine_request_using_post(entity_type=entity_type,
entity_id=entity_id, timeout=timeout,
body=body)
def handle_rule_engine_request_v1(self, entity_id: EntityId, body: Optional[str] = None,
queue_name: Optional[str] = None,
timeout: Optional[int] = None) -> DeferredResultResponseEntity:
entity_type = self.get_type(entity_id)
entity_id = self.get_id(entity_id)
return self.rule_engine_controller.handle_rule_engine_request_using_post1(entity_type=entity_type,
entity_id=entity_id, body=body,
queue_name=queue_name, timeout=timeout)
def handle_rule_engine_request_v2(self, entity_id: EntityId, body: Optional[str] = None):
entity_type = self.get_type(entity_id)
entity_id = self.get_id(entity_id)
return self.rule_engine_controller.handle_rule_engine_request_using_post2(entity_type=entity_type,
entity_id=entity_id, body=body)
def get_admin_settings(self, key: str, system_by_default=None) -> AdminSettings:
return self.admin_controller.get_admin_settings_using_get(key=key, system_by_default=system_by_default)
def t_mobile_iot_cdp_process_request_v4_delete4(self, body: str, request_headers: dict, routing_key: str):
return self.t_mobile_iot_cdp_integration_controller.process_request_using_delete4(body=body,
request_headers=request_headers,
routing_key=routing_key)
def t_mobile_iot_cdp_process_request_v4_get4(self, body: str, request_headers: dict, routing_key: str):
return self.t_mobile_iot_cdp_integration_controller.process_request_using_get4(body=body,
request_headers=request_headers,
routing_key=routing_key)
def t_mobile_iot_cdp_process_request_v4_head4(self, body: str, request_headers: dict, routing_key: str):
return self.t_mobile_iot_cdp_integration_controller.process_request_using_head4(body=body,
request_headers=request_headers,
routing_key=routing_key)
def t_mobile_iot_cdp_process_request_v4_options4(self, body: str, request_headers: dict, routing_key: str):
return self.t_mobile_iot_cdp_integration_controller.process_request_using_options4(body=body,
request_headers=request_headers,
routing_key=routing_key)
def t_mobile_iot_cdp_process_request_v4_patch4(self, body: str, request_headers: dict, routing_key: str):
return self.t_mobile_iot_cdp_integration_controller.process_request_using_patch4(body=body,
request_headers=request_headers,
routing_key=routing_key)
def t_mobile_iot_cdp_process_request_v12_post12(self, body: str, request_headers: dict, routing_key: str):
return self.t_mobile_iot_cdp_integration_controller.process_request_using_post12(body=body,
request_headers=request_headers,
routing_key=routing_key)
def t_mobile_iot_cdp_process_request_v4_put4(self, body: str, request_headers: dict, routing_key: str):
return self.t_mobile_iot_cdp_integration_controller.process_request_using_put4(body=body,
request_headers=request_headers,
routing_key=routing_key)
def sign_up(self, body: Optional[SignUpRequest] = None) -> str:
return self.sign_up_controller.sign_up_using_post(body=body)
def resend_email_activation(self, email: str, pkg_name: Optional[str] = None) -> None:
return self.sign_up_controller.resend_email_activation_using_post(email=email, pkg_name=pkg_name)
def activate_user_by_email_code(self, email_code: str, pkg_name: Optional[str] = None) -> Union[
dict, str, list, bytes, None, RESTResponse, tuple, Any]:
return self.sign_up_controller.activate_user_by_email_code_using_post(email_code=email_code, pkg_name=pkg_name)
def privacy_policy_accepted(self, ) -> bool:
return self.sign_up_controller.privacy_policy_accepted_using_get()
def accept_terms_of_use(self, ) -> Union[
dict, str, list, bytes, None, RESTResponse, tuple, Any]:
return self.sign_up_controller.accept_terms_of_use_using_post()
def activate_email(self, email_code: str, pkg_name: Optional[str] = None) -> str:
return self.sign_up_controller.activate_email_using_get(email_code=email_code, pkg_name=pkg_name)
def mobile_login(self, pkg_name: str) -> str:
return self.sign_up_controller.mobile_login_using_get(pkg_name=pkg_name)
def terms_of_use_accepted(self, ) -> bool:
return self.sign_up_controller.terms_of_use_accepted_using_get()
def get_device_profiles_by_ids(self, device_profile_ids: list) -> List[DeviceProfileInfo]:
device_profile_ids = ','.join(device_profile_ids)
return self.device_profile_controller.get_device_profiles_by_ids_using_get(
device_profile_ids=device_profile_ids)
def thing_park_process_request_tpe_delete(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_tpe_using_delete(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def thing_park_process_request_tpe_get(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_tpe_using_get(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def thing_park_process_request_tpe_head(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_tpe_using_head(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def thing_park_process_request_tpe_options(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_tpe_using_options(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def thing_park_process_request_tpe_patch(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_tpe_using_patch(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def thing_park_process_request_tpe_post(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_tpe_using_post(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def thing_park_process_request_tpe_put(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_tpe_using_put(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def thing_park_process_request_v5_delete5(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_using_delete5(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def thing_park_process_request_v5_get5(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_using_get5(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def thing_park_process_request_v5_head5(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_using_head5(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def thing_park_process_request_v5_options5(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_using_options5(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def thing_park_process_request_v5_patch5(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_using_patch5(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def thing_park_process_request_v13_post13(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_using_post13(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def thing_park_process_request_v5_put5(self, body: str, request_headers: dict, all_request_params: dict,
routing_key: str):
return self.thing_park_integration_controller.process_request_using_put5(body=body,
request_headers=request_headers,
all_request_params=all_request_params,
routing_key=routing_key)
def sig_fox_process_request_v3_delete3(self, body: str, request_headers: dict, routing_key: str):
return self.sig_fox_integration_controller.process_request_using_delete3(body=body,
request_headers=request_headers,
routing_key=routing_key)
def sig_fox_process_request_v3_get3(self, body: str, request_headers: dict, routing_key: str):
return self.sig_fox_integration_controller.process_request_using_get3(body=body,
request_headers=request_headers,
routing_key=routing_key)
def sig_fox_process_request_v3_head3(self, body: str, request_headers: dict, routing_key: str):
return self.sig_fox_integration_controller.process_request_using_head3(body=body,
request_headers=request_headers,
routing_key=routing_key)
def sig_fox_process_request_v3_options3(self, body: str, request_headers: dict, routing_key: str):
return self.sig_fox_integration_controller.process_request_using_options3(body=body,
request_headers=request_headers,
routing_key=routing_key)
def sig_fox_process_request_v3_patch3(self, body: str, request_headers: dict, routing_key: str):
return self.sig_fox_integration_controller.process_request_using_patch3(body=body,
request_headers=request_headers,
routing_key=routing_key)
def sig_fox_process_request_v11_post11(self, body: str, request_headers: dict, routing_key: str):
return self.sig_fox_integration_controller.process_request_using_post11(body=body,
request_headers=request_headers,
routing_key=routing_key)
def sig_fox_process_request_v3_put3(self, body: str, request_headers: dict, routing_key: str):
return self.sig_fox_integration_controller.process_request_using_put3(body=body,
request_headers=request_headers,
routing_key=routing_key)
def assign_scheduler_event_to_edge(self, edge_id: EdgeId, scheduler_event_id: SchedulerEventId) -> SchedulerEventInfo:
edge_id = self.get_id(edge_id)
scheduler_event_id = self.get_id(scheduler_event_id)
return self.scheduler_event_controller.assign_scheduler_event_to_edge_using_post(edge_id=edge_id,
scheduler_event_id=scheduler_event_id)
def delete_scheduler_event(self, scheduler_event_id: SchedulerEventId) -> None:
scheduler_event_id = self.get_id(scheduler_event_id)
return self.scheduler_event_controller.delete_scheduler_event_using_delete(
scheduler_event_id=scheduler_event_id)
def get_all_scheduler_events(self, edge_id: EdgeId) -> List[SchedulerEventInfo]:
edge_id = self.get_id(edge_id)
return self.scheduler_event_controller.get_all_scheduler_events_using_get(edge_id=edge_id)
def get_edge_scheduler_events(self, edge_id: EdgeId, page_size: int, page: int,text_search: Optional[str] = None,
sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataSchedulerEventInfo:
edge_id = self.get_id(edge_id)
return self.scheduler_event_controller.get_edge_scheduler_events_using_get(edge_id=edge_id, page_size=page_size,
page=page, text_search=text_search,
sort_property=sort_property,
sort_order=sort_order)
def get_scheduler_event_by_id(self, scheduler_event_id: SchedulerEventId) -> SchedulerEvent:
scheduler_event_id = self.get_id(scheduler_event_id)
return self.scheduler_event_controller.get_scheduler_event_by_id_using_get(
scheduler_event_id=scheduler_event_id)
def get_scheduler_event_info_by_id(self, scheduler_event_id: SchedulerEventId) -> SchedulerEventWithCustomerInfo:
scheduler_event_id = self.get_id(scheduler_event_id)
return self.scheduler_event_controller.get_scheduler_event_info_by_id_using_get(
scheduler_event_id=scheduler_event_id)
def get_scheduler_events_by_ids(self, scheduler_event_ids: list) -> List[SchedulerEventInfo]:
return self.scheduler_event_controller.get_scheduler_events_by_ids_using_get(
scheduler_event_ids=str(scheduler_event_ids))
def get_scheduler_events(self, type: Optional[str] = None) -> List[SchedulerEventWithCustomerInfo]:
return self.scheduler_event_controller.get_scheduler_events_using_get(type=type)
def save_scheduler_event(self, body: Optional[SchedulerEvent] = None) -> SchedulerEvent:
return self.scheduler_event_controller.save_scheduler_event_using_post(body=body)
def unassign_scheduler_event_from_edge(self, edge_id: EdgeId, scheduler_event_id: SchedulerEventId) -> SchedulerEventInfo:
edge_id = self.get_id(edge_id)
scheduler_event_id = self.get_id(scheduler_event_id)
return self.scheduler_event_controller.unassign_scheduler_event_from_edge_using_delete(edge_id=edge_id,
scheduler_event_id=scheduler_event_id)
def download_dashboard_report(self, dashboard_id: DashboardId,
body: Union[dict, str, list, bytes, None, RESTResponse, tuple, Any] = None):
dashboard_id = self.get_id(dashboard_id)
return self.report_controller.download_dashboard_report_using_post(dashboard_id=dashboard_id, body=body)
def download_test_report(self, body: Optional[ReportConfig], reports_server_endpoint_url: Optional[str] = None):
return self.report_controller.download_test_report_using_post(body=body,
reports_server_endpoint_url=reports_server_endpoint_url)
def get_server_time(self, ) -> int:
return self.dashboard_controller.get_server_time_using_get()
def get_dashboards_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: int, page: int,
text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataDashboardInfo:
entity_group_id = self.get_id(entity_group_id)
return self.dashboard_controller.get_dashboards_by_entity_group_id_using_get(entity_group_id=entity_group_id,
page_size=page_size, page=page,
text_search=text_search,
sort_property=sort_property,
sort_order=sort_order)
def delete_dashboard(self, dashboard_id: DashboardId) -> None:
dashboard_id = self.get_id(dashboard_id)
return self.dashboard_controller.delete_dashboard_using_delete(dashboard_id=dashboard_id)
def save_dashboard(self, body: Optional[Dashboard] = None) -> Dashboard:
return self.dashboard_controller.save_dashboard_using_post(body=body)
def get_home_dashboard_info(self, ) -> HomeDashboardInfo:
return self.dashboard_controller.get_home_dashboard_info_using_get()
def get_tenant_home_dashboard_info(self, ) -> HomeDashboardInfo:
return self.dashboard_controller.get_tenant_home_dashboard_info_using_get()
def set_customer_home_dashboard_info(self, body: Optional[HomeDashboardInfo] = None) -> None:
return self.dashboard_controller.set_customer_home_dashboard_info_using_post(body=body)
def get_tenant_dashboards_v1(self, tenant_id: TenantId, page_size: int, page: int,text_search: Optional[str] = None,
sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataDashboardInfo:
tenant_id = self.get_id(tenant_id)
return self.dashboard_controller.get_tenant_dashboards_using_get1(tenant_id=tenant_id, page_size=page_size,
page=page, text_search=text_search,
sort_property=sort_property,
sort_order=sort_order)
def get_dashboard_info_by_id(self, dashboard_id: DashboardId) -> DashboardInfo:
dashboard_id = self.get_id(dashboard_id)
return self.dashboard_controller.get_dashboard_info_by_id_using_get(dashboard_id=dashboard_id)
def get_home_dashboard(self, ) -> HomeDashboard:
return self.dashboard_controller.get_home_dashboard_using_get()
def get_max_datapoints_limit(self, ) -> int:
return self.dashboard_controller.get_max_datapoints_limit_using_get()
def get_dashboards_by_ids(self, dashboard_ids: list) -> List[DashboardInfo]:
dashboard_ids = ','.join(dashboard_ids)
return self.dashboard_controller.get_dashboards_by_ids_using_get(dashboard_ids=dashboard_ids)
def get_customer_home_dashboard_info(self, ) -> HomeDashboardInfo:
return self.dashboard_controller.get_customer_home_dashboard_info_using_get()