latitudesh-python-sdk 2.0.0__py3-none-any.whl → 2.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of latitudesh-python-sdk might be problematic. Click here for more details.
- latitudesh_python_sdk/_version.py +3 -3
- latitudesh_python_sdk/apikeys.py +51 -138
- latitudesh_python_sdk/basesdk.py +4 -4
- latitudesh_python_sdk/billing.py +11 -32
- latitudesh_python_sdk/events_sdk.py +9 -34
- latitudesh_python_sdk/firewalls_sdk.py +89 -264
- latitudesh_python_sdk/ipaddresses_sdk.py +25 -68
- latitudesh_python_sdk/models/__init__.py +27 -4
- latitudesh_python_sdk/models/apierror.py +30 -14
- latitudesh_python_sdk/models/deploy_config.py +11 -6
- latitudesh_python_sdk/models/error_object.py +11 -6
- latitudesh_python_sdk/models/latitudesherror.py +26 -0
- latitudesh_python_sdk/models/no_response_error.py +13 -0
- latitudesh_python_sdk/models/region_resource_data.py +4 -4
- latitudesh_python_sdk/models/responsevalidationerror.py +25 -0
- latitudesh_python_sdk/models/server.py +11 -6
- latitudesh_python_sdk/models/server_data.py +6 -3
- latitudesh_python_sdk/models/server_region_resource_data.py +40 -0
- latitudesh_python_sdk/models/update_serverop.py +1 -3
- latitudesh_python_sdk/models/virtual_network.py +11 -6
- latitudesh_python_sdk/operatingsystems_sdk.py +11 -32
- latitudesh_python_sdk/plans.py +57 -188
- latitudesh_python_sdk/privatenetworks.py +87 -262
- latitudesh_python_sdk/projects_sdk.py +43 -130
- latitudesh_python_sdk/regions_sdk.py +21 -66
- latitudesh_python_sdk/roles.py +21 -64
- latitudesh_python_sdk/servers_sdk.py +207 -604
- latitudesh_python_sdk/sshkeys_sdk.py +85 -304
- latitudesh_python_sdk/storage.py +33 -120
- latitudesh_python_sdk/tags.py +39 -126
- latitudesh_python_sdk/teams_sdk.py +35 -100
- latitudesh_python_sdk/teamsmembers.py +31 -96
- latitudesh_python_sdk/traffic_sdk.py +25 -68
- latitudesh_python_sdk/userdata_sdk.py +79 -298
- latitudesh_python_sdk/userprofile.py +31 -100
- latitudesh_python_sdk/utils/serializers.py +3 -2
- latitudesh_python_sdk/utils/unmarshal_json_response.py +24 -0
- latitudesh_python_sdk/virtualmachines.py +35 -122
- latitudesh_python_sdk/vpnsessions.py +55 -146
- {latitudesh_python_sdk-2.0.0.dist-info → latitudesh_python_sdk-2.0.1.dist-info}/METADATA +47 -24
- {latitudesh_python_sdk-2.0.0.dist-info → latitudesh_python_sdk-2.0.1.dist-info}/RECORD +43 -38
- {latitudesh_python_sdk-2.0.0.dist-info → latitudesh_python_sdk-2.0.1.dist-info}/LICENSE +0 -0
- {latitudesh_python_sdk-2.0.0.dist-info → latitudesh_python_sdk-2.0.1.dist-info}/WHEEL +0 -0
|
@@ -5,6 +5,7 @@ from latitudesh_python_sdk import models, utils
|
|
|
5
5
|
from latitudesh_python_sdk._hooks import HookContext
|
|
6
6
|
from latitudesh_python_sdk.types import OptionalNullable, UNSET
|
|
7
7
|
from latitudesh_python_sdk.utils import get_security_from_env
|
|
8
|
+
from latitudesh_python_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
8
9
|
from typing import Mapping, Optional, Union
|
|
9
10
|
from typing_extensions import deprecated
|
|
10
11
|
|
|
@@ -90,28 +91,17 @@ class UserDataSDK(BaseSDK):
|
|
|
90
91
|
)
|
|
91
92
|
|
|
92
93
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
93
|
-
return
|
|
94
|
-
|
|
94
|
+
return unmarshal_json_response(
|
|
95
|
+
models.GetProjectUsersDataResponseBody, http_res
|
|
95
96
|
)
|
|
96
97
|
if utils.match_response(http_res, ["404", "4XX"], "*"):
|
|
97
98
|
http_res_text = utils.stream_to_text(http_res)
|
|
98
|
-
raise models.APIError(
|
|
99
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
100
|
-
)
|
|
99
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
101
100
|
if utils.match_response(http_res, "5XX", "*"):
|
|
102
101
|
http_res_text = utils.stream_to_text(http_res)
|
|
103
|
-
raise models.APIError(
|
|
104
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
105
|
-
)
|
|
102
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
106
103
|
|
|
107
|
-
|
|
108
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
109
|
-
raise models.APIError(
|
|
110
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
111
|
-
http_res.status_code,
|
|
112
|
-
http_res_text,
|
|
113
|
-
http_res,
|
|
114
|
-
)
|
|
104
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
115
105
|
|
|
116
106
|
@deprecated(
|
|
117
107
|
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
@@ -193,28 +183,17 @@ class UserDataSDK(BaseSDK):
|
|
|
193
183
|
)
|
|
194
184
|
|
|
195
185
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
196
|
-
return
|
|
197
|
-
|
|
186
|
+
return unmarshal_json_response(
|
|
187
|
+
models.GetProjectUsersDataResponseBody, http_res
|
|
198
188
|
)
|
|
199
189
|
if utils.match_response(http_res, ["404", "4XX"], "*"):
|
|
200
190
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
201
|
-
raise models.APIError(
|
|
202
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
203
|
-
)
|
|
191
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
204
192
|
if utils.match_response(http_res, "5XX", "*"):
|
|
205
193
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
206
|
-
raise models.APIError(
|
|
207
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
208
|
-
)
|
|
194
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
209
195
|
|
|
210
|
-
|
|
211
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
212
|
-
raise models.APIError(
|
|
213
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
214
|
-
http_res.status_code,
|
|
215
|
-
http_res_text,
|
|
216
|
-
http_res,
|
|
217
|
-
)
|
|
196
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
218
197
|
|
|
219
198
|
@deprecated(
|
|
220
199
|
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
@@ -310,26 +289,15 @@ class UserDataSDK(BaseSDK):
|
|
|
310
289
|
)
|
|
311
290
|
|
|
312
291
|
if utils.match_response(http_res, "201", "application/vnd.api+json"):
|
|
313
|
-
return
|
|
292
|
+
return unmarshal_json_response(models.UserData, http_res)
|
|
314
293
|
if utils.match_response(http_res, ["400", "404", "422", "4XX"], "*"):
|
|
315
294
|
http_res_text = utils.stream_to_text(http_res)
|
|
316
|
-
raise models.APIError(
|
|
317
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
318
|
-
)
|
|
295
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
319
296
|
if utils.match_response(http_res, "5XX", "*"):
|
|
320
297
|
http_res_text = utils.stream_to_text(http_res)
|
|
321
|
-
raise models.APIError(
|
|
322
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
323
|
-
)
|
|
298
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
324
299
|
|
|
325
|
-
|
|
326
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
327
|
-
raise models.APIError(
|
|
328
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
329
|
-
http_res.status_code,
|
|
330
|
-
http_res_text,
|
|
331
|
-
http_res,
|
|
332
|
-
)
|
|
300
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
333
301
|
|
|
334
302
|
@deprecated(
|
|
335
303
|
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
@@ -425,26 +393,15 @@ class UserDataSDK(BaseSDK):
|
|
|
425
393
|
)
|
|
426
394
|
|
|
427
395
|
if utils.match_response(http_res, "201", "application/vnd.api+json"):
|
|
428
|
-
return
|
|
396
|
+
return unmarshal_json_response(models.UserData, http_res)
|
|
429
397
|
if utils.match_response(http_res, ["400", "404", "422", "4XX"], "*"):
|
|
430
398
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
431
|
-
raise models.APIError(
|
|
432
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
433
|
-
)
|
|
399
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
434
400
|
if utils.match_response(http_res, "5XX", "*"):
|
|
435
401
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
436
|
-
raise models.APIError(
|
|
437
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
438
|
-
)
|
|
402
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
439
403
|
|
|
440
|
-
|
|
441
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
442
|
-
raise models.APIError(
|
|
443
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
444
|
-
http_res.status_code,
|
|
445
|
-
http_res_text,
|
|
446
|
-
http_res,
|
|
447
|
-
)
|
|
404
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
448
405
|
|
|
449
406
|
@deprecated(
|
|
450
407
|
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
@@ -529,26 +486,15 @@ class UserDataSDK(BaseSDK):
|
|
|
529
486
|
)
|
|
530
487
|
|
|
531
488
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
532
|
-
return
|
|
489
|
+
return unmarshal_json_response(models.UserData, http_res)
|
|
533
490
|
if utils.match_response(http_res, ["404", "4XX"], "*"):
|
|
534
491
|
http_res_text = utils.stream_to_text(http_res)
|
|
535
|
-
raise models.APIError(
|
|
536
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
537
|
-
)
|
|
492
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
538
493
|
if utils.match_response(http_res, "5XX", "*"):
|
|
539
494
|
http_res_text = utils.stream_to_text(http_res)
|
|
540
|
-
raise models.APIError(
|
|
541
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
542
|
-
)
|
|
495
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
543
496
|
|
|
544
|
-
|
|
545
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
546
|
-
raise models.APIError(
|
|
547
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
548
|
-
http_res.status_code,
|
|
549
|
-
http_res_text,
|
|
550
|
-
http_res,
|
|
551
|
-
)
|
|
497
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
552
498
|
|
|
553
499
|
@deprecated(
|
|
554
500
|
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
@@ -633,26 +579,15 @@ class UserDataSDK(BaseSDK):
|
|
|
633
579
|
)
|
|
634
580
|
|
|
635
581
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
636
|
-
return
|
|
582
|
+
return unmarshal_json_response(models.UserData, http_res)
|
|
637
583
|
if utils.match_response(http_res, ["404", "4XX"], "*"):
|
|
638
584
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
639
|
-
raise models.APIError(
|
|
640
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
641
|
-
)
|
|
585
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
642
586
|
if utils.match_response(http_res, "5XX", "*"):
|
|
643
587
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
644
|
-
raise models.APIError(
|
|
645
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
646
|
-
)
|
|
588
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
647
589
|
|
|
648
|
-
|
|
649
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
650
|
-
raise models.APIError(
|
|
651
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
652
|
-
http_res.status_code,
|
|
653
|
-
http_res_text,
|
|
654
|
-
http_res,
|
|
655
|
-
)
|
|
590
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
656
591
|
|
|
657
592
|
@deprecated(
|
|
658
593
|
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
@@ -751,26 +686,15 @@ class UserDataSDK(BaseSDK):
|
|
|
751
686
|
)
|
|
752
687
|
|
|
753
688
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
754
|
-
return
|
|
689
|
+
return unmarshal_json_response(models.UserData, http_res)
|
|
755
690
|
if utils.match_response(http_res, ["400", "404", "422", "4XX"], "*"):
|
|
756
691
|
http_res_text = utils.stream_to_text(http_res)
|
|
757
|
-
raise models.APIError(
|
|
758
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
759
|
-
)
|
|
692
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
760
693
|
if utils.match_response(http_res, "5XX", "*"):
|
|
761
694
|
http_res_text = utils.stream_to_text(http_res)
|
|
762
|
-
raise models.APIError(
|
|
763
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
764
|
-
)
|
|
695
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
765
696
|
|
|
766
|
-
|
|
767
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
768
|
-
raise models.APIError(
|
|
769
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
770
|
-
http_res.status_code,
|
|
771
|
-
http_res_text,
|
|
772
|
-
http_res,
|
|
773
|
-
)
|
|
697
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
774
698
|
|
|
775
699
|
@deprecated(
|
|
776
700
|
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
@@ -869,26 +793,15 @@ class UserDataSDK(BaseSDK):
|
|
|
869
793
|
)
|
|
870
794
|
|
|
871
795
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
872
|
-
return
|
|
796
|
+
return unmarshal_json_response(models.UserData, http_res)
|
|
873
797
|
if utils.match_response(http_res, ["400", "404", "422", "4XX"], "*"):
|
|
874
798
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
875
|
-
raise models.APIError(
|
|
876
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
877
|
-
)
|
|
799
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
878
800
|
if utils.match_response(http_res, "5XX", "*"):
|
|
879
801
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
880
|
-
raise models.APIError(
|
|
881
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
882
|
-
)
|
|
802
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
883
803
|
|
|
884
|
-
|
|
885
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
886
|
-
raise models.APIError(
|
|
887
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
888
|
-
http_res.status_code,
|
|
889
|
-
http_res_text,
|
|
890
|
-
http_res,
|
|
891
|
-
)
|
|
804
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
892
805
|
|
|
893
806
|
@deprecated(
|
|
894
807
|
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
@@ -973,23 +886,12 @@ class UserDataSDK(BaseSDK):
|
|
|
973
886
|
return
|
|
974
887
|
if utils.match_response(http_res, ["404", "4XX"], "*"):
|
|
975
888
|
http_res_text = utils.stream_to_text(http_res)
|
|
976
|
-
raise models.APIError(
|
|
977
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
978
|
-
)
|
|
889
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
979
890
|
if utils.match_response(http_res, "5XX", "*"):
|
|
980
891
|
http_res_text = utils.stream_to_text(http_res)
|
|
981
|
-
raise models.APIError(
|
|
982
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
983
|
-
)
|
|
892
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
984
893
|
|
|
985
|
-
|
|
986
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
987
|
-
raise models.APIError(
|
|
988
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
989
|
-
http_res.status_code,
|
|
990
|
-
http_res_text,
|
|
991
|
-
http_res,
|
|
992
|
-
)
|
|
894
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
993
895
|
|
|
994
896
|
@deprecated(
|
|
995
897
|
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
@@ -1074,23 +976,12 @@ class UserDataSDK(BaseSDK):
|
|
|
1074
976
|
return
|
|
1075
977
|
if utils.match_response(http_res, ["404", "4XX"], "*"):
|
|
1076
978
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1077
|
-
raise models.APIError(
|
|
1078
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1079
|
-
)
|
|
979
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1080
980
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1081
981
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1082
|
-
raise models.APIError(
|
|
1083
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1084
|
-
)
|
|
982
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1085
983
|
|
|
1086
|
-
|
|
1087
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1088
|
-
raise models.APIError(
|
|
1089
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1090
|
-
http_res.status_code,
|
|
1091
|
-
http_res_text,
|
|
1092
|
-
http_res,
|
|
1093
|
-
)
|
|
984
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
1094
985
|
|
|
1095
986
|
def get_users_data(
|
|
1096
987
|
self,
|
|
@@ -1166,26 +1057,15 @@ class UserDataSDK(BaseSDK):
|
|
|
1166
1057
|
)
|
|
1167
1058
|
|
|
1168
1059
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
1169
|
-
return
|
|
1060
|
+
return unmarshal_json_response(models.GetUsersDataResponseBody, http_res)
|
|
1170
1061
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1171
1062
|
http_res_text = utils.stream_to_text(http_res)
|
|
1172
|
-
raise models.APIError(
|
|
1173
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1174
|
-
)
|
|
1063
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1175
1064
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1176
1065
|
http_res_text = utils.stream_to_text(http_res)
|
|
1177
|
-
raise models.APIError(
|
|
1178
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1179
|
-
)
|
|
1066
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1180
1067
|
|
|
1181
|
-
|
|
1182
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1183
|
-
raise models.APIError(
|
|
1184
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1185
|
-
http_res.status_code,
|
|
1186
|
-
http_res_text,
|
|
1187
|
-
http_res,
|
|
1188
|
-
)
|
|
1068
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
1189
1069
|
|
|
1190
1070
|
async def get_users_data_async(
|
|
1191
1071
|
self,
|
|
@@ -1261,26 +1141,15 @@ class UserDataSDK(BaseSDK):
|
|
|
1261
1141
|
)
|
|
1262
1142
|
|
|
1263
1143
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
1264
|
-
return
|
|
1144
|
+
return unmarshal_json_response(models.GetUsersDataResponseBody, http_res)
|
|
1265
1145
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1266
1146
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1267
|
-
raise models.APIError(
|
|
1268
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1269
|
-
)
|
|
1147
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1270
1148
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1271
1149
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1272
|
-
raise models.APIError(
|
|
1273
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1274
|
-
)
|
|
1150
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1275
1151
|
|
|
1276
|
-
|
|
1277
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1278
|
-
raise models.APIError(
|
|
1279
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1280
|
-
http_res.status_code,
|
|
1281
|
-
http_res_text,
|
|
1282
|
-
http_res,
|
|
1283
|
-
)
|
|
1152
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
1284
1153
|
|
|
1285
1154
|
def post_user_data(
|
|
1286
1155
|
self,
|
|
@@ -1361,26 +1230,15 @@ class UserDataSDK(BaseSDK):
|
|
|
1361
1230
|
)
|
|
1362
1231
|
|
|
1363
1232
|
if utils.match_response(http_res, "201", "application/vnd.api+json"):
|
|
1364
|
-
return
|
|
1233
|
+
return unmarshal_json_response(models.UserData, http_res)
|
|
1365
1234
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1366
1235
|
http_res_text = utils.stream_to_text(http_res)
|
|
1367
|
-
raise models.APIError(
|
|
1368
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1369
|
-
)
|
|
1236
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1370
1237
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1371
1238
|
http_res_text = utils.stream_to_text(http_res)
|
|
1372
|
-
raise models.APIError(
|
|
1373
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1374
|
-
)
|
|
1239
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1375
1240
|
|
|
1376
|
-
|
|
1377
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1378
|
-
raise models.APIError(
|
|
1379
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1380
|
-
http_res.status_code,
|
|
1381
|
-
http_res_text,
|
|
1382
|
-
http_res,
|
|
1383
|
-
)
|
|
1241
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
1384
1242
|
|
|
1385
1243
|
async def post_user_data_async(
|
|
1386
1244
|
self,
|
|
@@ -1461,26 +1319,15 @@ class UserDataSDK(BaseSDK):
|
|
|
1461
1319
|
)
|
|
1462
1320
|
|
|
1463
1321
|
if utils.match_response(http_res, "201", "application/vnd.api+json"):
|
|
1464
|
-
return
|
|
1322
|
+
return unmarshal_json_response(models.UserData, http_res)
|
|
1465
1323
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1466
1324
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1467
|
-
raise models.APIError(
|
|
1468
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1469
|
-
)
|
|
1325
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1470
1326
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1471
1327
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1472
|
-
raise models.APIError(
|
|
1473
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1474
|
-
)
|
|
1328
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1475
1329
|
|
|
1476
|
-
|
|
1477
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1478
|
-
raise models.APIError(
|
|
1479
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1480
|
-
http_res.status_code,
|
|
1481
|
-
http_res_text,
|
|
1482
|
-
http_res,
|
|
1483
|
-
)
|
|
1330
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
1484
1331
|
|
|
1485
1332
|
def get_user_data(
|
|
1486
1333
|
self,
|
|
@@ -1559,26 +1406,15 @@ class UserDataSDK(BaseSDK):
|
|
|
1559
1406
|
)
|
|
1560
1407
|
|
|
1561
1408
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
1562
|
-
return
|
|
1409
|
+
return unmarshal_json_response(models.UserData, http_res)
|
|
1563
1410
|
if utils.match_response(http_res, ["404", "4XX"], "*"):
|
|
1564
1411
|
http_res_text = utils.stream_to_text(http_res)
|
|
1565
|
-
raise models.APIError(
|
|
1566
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1567
|
-
)
|
|
1412
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1568
1413
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1569
1414
|
http_res_text = utils.stream_to_text(http_res)
|
|
1570
|
-
raise models.APIError(
|
|
1571
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1572
|
-
)
|
|
1415
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1573
1416
|
|
|
1574
|
-
|
|
1575
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1576
|
-
raise models.APIError(
|
|
1577
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1578
|
-
http_res.status_code,
|
|
1579
|
-
http_res_text,
|
|
1580
|
-
http_res,
|
|
1581
|
-
)
|
|
1417
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
1582
1418
|
|
|
1583
1419
|
async def get_user_data_async(
|
|
1584
1420
|
self,
|
|
@@ -1657,26 +1493,15 @@ class UserDataSDK(BaseSDK):
|
|
|
1657
1493
|
)
|
|
1658
1494
|
|
|
1659
1495
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
1660
|
-
return
|
|
1496
|
+
return unmarshal_json_response(models.UserData, http_res)
|
|
1661
1497
|
if utils.match_response(http_res, ["404", "4XX"], "*"):
|
|
1662
1498
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1663
|
-
raise models.APIError(
|
|
1664
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1665
|
-
)
|
|
1499
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1666
1500
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1667
1501
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1668
|
-
raise models.APIError(
|
|
1669
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1670
|
-
)
|
|
1502
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1671
1503
|
|
|
1672
|
-
|
|
1673
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1674
|
-
raise models.APIError(
|
|
1675
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1676
|
-
http_res.status_code,
|
|
1677
|
-
http_res_text,
|
|
1678
|
-
http_res,
|
|
1679
|
-
)
|
|
1504
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
1680
1505
|
|
|
1681
1506
|
def patch_user_data(
|
|
1682
1507
|
self,
|
|
@@ -1766,26 +1591,15 @@ class UserDataSDK(BaseSDK):
|
|
|
1766
1591
|
)
|
|
1767
1592
|
|
|
1768
1593
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
1769
|
-
return
|
|
1594
|
+
return unmarshal_json_response(models.UserData, http_res)
|
|
1770
1595
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1771
1596
|
http_res_text = utils.stream_to_text(http_res)
|
|
1772
|
-
raise models.APIError(
|
|
1773
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1774
|
-
)
|
|
1597
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1775
1598
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1776
1599
|
http_res_text = utils.stream_to_text(http_res)
|
|
1777
|
-
raise models.APIError(
|
|
1778
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1779
|
-
)
|
|
1600
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1780
1601
|
|
|
1781
|
-
|
|
1782
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1783
|
-
raise models.APIError(
|
|
1784
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1785
|
-
http_res.status_code,
|
|
1786
|
-
http_res_text,
|
|
1787
|
-
http_res,
|
|
1788
|
-
)
|
|
1602
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
1789
1603
|
|
|
1790
1604
|
async def patch_user_data_async(
|
|
1791
1605
|
self,
|
|
@@ -1875,26 +1689,15 @@ class UserDataSDK(BaseSDK):
|
|
|
1875
1689
|
)
|
|
1876
1690
|
|
|
1877
1691
|
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
1878
|
-
return
|
|
1692
|
+
return unmarshal_json_response(models.UserData, http_res)
|
|
1879
1693
|
if utils.match_response(http_res, "4XX", "*"):
|
|
1880
1694
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1881
|
-
raise models.APIError(
|
|
1882
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1883
|
-
)
|
|
1695
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1884
1696
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1885
1697
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1886
|
-
raise models.APIError(
|
|
1887
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1888
|
-
)
|
|
1698
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1889
1699
|
|
|
1890
|
-
|
|
1891
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1892
|
-
raise models.APIError(
|
|
1893
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1894
|
-
http_res.status_code,
|
|
1895
|
-
http_res_text,
|
|
1896
|
-
http_res,
|
|
1897
|
-
)
|
|
1700
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
1898
1701
|
|
|
1899
1702
|
def delete_user_data(
|
|
1900
1703
|
self,
|
|
@@ -1970,23 +1773,12 @@ class UserDataSDK(BaseSDK):
|
|
|
1970
1773
|
return
|
|
1971
1774
|
if utils.match_response(http_res, ["404", "4XX"], "*"):
|
|
1972
1775
|
http_res_text = utils.stream_to_text(http_res)
|
|
1973
|
-
raise models.APIError(
|
|
1974
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1975
|
-
)
|
|
1776
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1976
1777
|
if utils.match_response(http_res, "5XX", "*"):
|
|
1977
1778
|
http_res_text = utils.stream_to_text(http_res)
|
|
1978
|
-
raise models.APIError(
|
|
1979
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
1980
|
-
)
|
|
1779
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
1981
1780
|
|
|
1982
|
-
|
|
1983
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1984
|
-
raise models.APIError(
|
|
1985
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
1986
|
-
http_res.status_code,
|
|
1987
|
-
http_res_text,
|
|
1988
|
-
http_res,
|
|
1989
|
-
)
|
|
1781
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
1990
1782
|
|
|
1991
1783
|
async def delete_user_data_async(
|
|
1992
1784
|
self,
|
|
@@ -2062,20 +1854,9 @@ class UserDataSDK(BaseSDK):
|
|
|
2062
1854
|
return
|
|
2063
1855
|
if utils.match_response(http_res, ["404", "4XX"], "*"):
|
|
2064
1856
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2065
|
-
raise models.APIError(
|
|
2066
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2067
|
-
)
|
|
1857
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
2068
1858
|
if utils.match_response(http_res, "5XX", "*"):
|
|
2069
1859
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2070
|
-
raise models.APIError(
|
|
2071
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
2072
|
-
)
|
|
1860
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
2073
1861
|
|
|
2074
|
-
|
|
2075
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2076
|
-
raise models.APIError(
|
|
2077
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
|
2078
|
-
http_res.status_code,
|
|
2079
|
-
http_res_text,
|
|
2080
|
-
http_res,
|
|
2081
|
-
)
|
|
1862
|
+
raise models.APIError("Unexpected response received", http_res)
|