mixpeek 0.17.3__py3-none-any.whl → 0.17.4__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.
- mixpeek/_version.py +3 -3
- mixpeek/assets.py +140 -28
- mixpeek/collections.py +100 -20
- mixpeek/feature_extractors.py +20 -4
- mixpeek/feature_search.py +20 -4
- mixpeek/features.py +80 -16
- mixpeek/health.py +12 -2
- mixpeek/ingest_assets.py +60 -12
- mixpeek/namespaces.py +120 -24
- mixpeek/organizations.py +160 -32
- mixpeek/tasks.py +40 -8
- mixpeek/taxonomy_entities.py +200 -40
- {mixpeek-0.17.3.dist-info → mixpeek-0.17.4.dist-info}/METADATA +10 -6
- {mixpeek-0.17.3.dist-info → mixpeek-0.17.4.dist-info}/RECORD +15 -15
- {mixpeek-0.17.3.dist-info → mixpeek-0.17.4.dist-info}/WHEEL +0 -0
mixpeek/feature_extractors.py
CHANGED
@@ -88,14 +88,22 @@ class FeatureExtractors(BaseSDK):
|
|
88
88
|
if utils.match_response(http_res, "200", "application/json"):
|
89
89
|
return utils.unmarshal_json(http_res.text, models.EmbeddingResponse)
|
90
90
|
if utils.match_response(
|
91
|
-
http_res, ["400", "401", "403", "404"
|
91
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
92
92
|
):
|
93
93
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
94
94
|
raise models.ErrorResponse(data=data)
|
95
95
|
if utils.match_response(http_res, "422", "application/json"):
|
96
96
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
97
97
|
raise models.HTTPValidationError(data=data)
|
98
|
-
if utils.match_response(http_res,
|
98
|
+
if utils.match_response(http_res, "500", "application/json"):
|
99
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
100
|
+
raise models.ErrorResponse(data=data)
|
101
|
+
if utils.match_response(http_res, "4XX", "*"):
|
102
|
+
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
|
+
)
|
106
|
+
if utils.match_response(http_res, "5XX", "*"):
|
99
107
|
http_res_text = utils.stream_to_text(http_res)
|
100
108
|
raise models.APIError(
|
101
109
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -189,14 +197,22 @@ class FeatureExtractors(BaseSDK):
|
|
189
197
|
if utils.match_response(http_res, "200", "application/json"):
|
190
198
|
return utils.unmarshal_json(http_res.text, models.EmbeddingResponse)
|
191
199
|
if utils.match_response(
|
192
|
-
http_res, ["400", "401", "403", "404"
|
200
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
193
201
|
):
|
194
202
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
195
203
|
raise models.ErrorResponse(data=data)
|
196
204
|
if utils.match_response(http_res, "422", "application/json"):
|
197
205
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
198
206
|
raise models.HTTPValidationError(data=data)
|
199
|
-
if utils.match_response(http_res,
|
207
|
+
if utils.match_response(http_res, "500", "application/json"):
|
208
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
209
|
+
raise models.ErrorResponse(data=data)
|
210
|
+
if utils.match_response(http_res, "4XX", "*"):
|
211
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
212
|
+
raise models.APIError(
|
213
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
214
|
+
)
|
215
|
+
if utils.match_response(http_res, "5XX", "*"):
|
200
216
|
http_res_text = await utils.stream_to_text_async(http_res)
|
201
217
|
raise models.APIError(
|
202
218
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
mixpeek/feature_search.py
CHANGED
@@ -149,14 +149,22 @@ class FeatureSearch(BaseSDK):
|
|
149
149
|
models.SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPost,
|
150
150
|
)
|
151
151
|
if utils.match_response(
|
152
|
-
http_res, ["400", "401", "403", "404"
|
152
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
153
153
|
):
|
154
154
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
155
155
|
raise models.ErrorResponse(data=data)
|
156
156
|
if utils.match_response(http_res, "422", "application/json"):
|
157
157
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
158
158
|
raise models.HTTPValidationError(data=data)
|
159
|
-
if utils.match_response(http_res,
|
159
|
+
if utils.match_response(http_res, "500", "application/json"):
|
160
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
161
|
+
raise models.ErrorResponse(data=data)
|
162
|
+
if utils.match_response(http_res, "4XX", "*"):
|
163
|
+
http_res_text = utils.stream_to_text(http_res)
|
164
|
+
raise models.APIError(
|
165
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
166
|
+
)
|
167
|
+
if utils.match_response(http_res, "5XX", "*"):
|
160
168
|
http_res_text = utils.stream_to_text(http_res)
|
161
169
|
raise models.APIError(
|
162
170
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -311,14 +319,22 @@ class FeatureSearch(BaseSDK):
|
|
311
319
|
models.SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPost,
|
312
320
|
)
|
313
321
|
if utils.match_response(
|
314
|
-
http_res, ["400", "401", "403", "404"
|
322
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
315
323
|
):
|
316
324
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
317
325
|
raise models.ErrorResponse(data=data)
|
318
326
|
if utils.match_response(http_res, "422", "application/json"):
|
319
327
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
320
328
|
raise models.HTTPValidationError(data=data)
|
321
|
-
if utils.match_response(http_res,
|
329
|
+
if utils.match_response(http_res, "500", "application/json"):
|
330
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
331
|
+
raise models.ErrorResponse(data=data)
|
332
|
+
if utils.match_response(http_res, "4XX", "*"):
|
333
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
334
|
+
raise models.APIError(
|
335
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
336
|
+
)
|
337
|
+
if utils.match_response(http_res, "5XX", "*"):
|
322
338
|
http_res_text = await utils.stream_to_text_async(http_res)
|
323
339
|
raise models.APIError(
|
324
340
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
mixpeek/features.py
CHANGED
@@ -85,14 +85,22 @@ class Features(BaseSDK):
|
|
85
85
|
if utils.match_response(http_res, "200", "application/json"):
|
86
86
|
return utils.unmarshal_json(http_res.text, models.FeatureResponse)
|
87
87
|
if utils.match_response(
|
88
|
-
http_res, ["400", "401", "403", "404"
|
88
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
89
89
|
):
|
90
90
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
91
91
|
raise models.ErrorResponse(data=data)
|
92
92
|
if utils.match_response(http_res, "422", "application/json"):
|
93
93
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
94
94
|
raise models.HTTPValidationError(data=data)
|
95
|
-
if utils.match_response(http_res,
|
95
|
+
if utils.match_response(http_res, "500", "application/json"):
|
96
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
97
|
+
raise models.ErrorResponse(data=data)
|
98
|
+
if utils.match_response(http_res, "4XX", "*"):
|
99
|
+
http_res_text = utils.stream_to_text(http_res)
|
100
|
+
raise models.APIError(
|
101
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
102
|
+
)
|
103
|
+
if utils.match_response(http_res, "5XX", "*"):
|
96
104
|
http_res_text = utils.stream_to_text(http_res)
|
97
105
|
raise models.APIError(
|
98
106
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -183,14 +191,22 @@ class Features(BaseSDK):
|
|
183
191
|
if utils.match_response(http_res, "200", "application/json"):
|
184
192
|
return utils.unmarshal_json(http_res.text, models.FeatureResponse)
|
185
193
|
if utils.match_response(
|
186
|
-
http_res, ["400", "401", "403", "404"
|
194
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
187
195
|
):
|
188
196
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
189
197
|
raise models.ErrorResponse(data=data)
|
190
198
|
if utils.match_response(http_res, "422", "application/json"):
|
191
199
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
192
200
|
raise models.HTTPValidationError(data=data)
|
193
|
-
if utils.match_response(http_res,
|
201
|
+
if utils.match_response(http_res, "500", "application/json"):
|
202
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
203
|
+
raise models.ErrorResponse(data=data)
|
204
|
+
if utils.match_response(http_res, "4XX", "*"):
|
205
|
+
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
|
+
)
|
209
|
+
if utils.match_response(http_res, "5XX", "*"):
|
194
210
|
http_res_text = await utils.stream_to_text_async(http_res)
|
195
211
|
raise models.APIError(
|
196
212
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -281,14 +297,22 @@ class Features(BaseSDK):
|
|
281
297
|
if utils.match_response(http_res, "200", "application/json"):
|
282
298
|
return utils.unmarshal_json(http_res.text, Any)
|
283
299
|
if utils.match_response(
|
284
|
-
http_res, ["400", "401", "403", "404"
|
300
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
285
301
|
):
|
286
302
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
287
303
|
raise models.ErrorResponse(data=data)
|
288
304
|
if utils.match_response(http_res, "422", "application/json"):
|
289
305
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
290
306
|
raise models.HTTPValidationError(data=data)
|
291
|
-
if utils.match_response(http_res,
|
307
|
+
if utils.match_response(http_res, "500", "application/json"):
|
308
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
309
|
+
raise models.ErrorResponse(data=data)
|
310
|
+
if utils.match_response(http_res, "4XX", "*"):
|
311
|
+
http_res_text = utils.stream_to_text(http_res)
|
312
|
+
raise models.APIError(
|
313
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
314
|
+
)
|
315
|
+
if utils.match_response(http_res, "5XX", "*"):
|
292
316
|
http_res_text = utils.stream_to_text(http_res)
|
293
317
|
raise models.APIError(
|
294
318
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -379,14 +403,22 @@ class Features(BaseSDK):
|
|
379
403
|
if utils.match_response(http_res, "200", "application/json"):
|
380
404
|
return utils.unmarshal_json(http_res.text, Any)
|
381
405
|
if utils.match_response(
|
382
|
-
http_res, ["400", "401", "403", "404"
|
406
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
383
407
|
):
|
384
408
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
385
409
|
raise models.ErrorResponse(data=data)
|
386
410
|
if utils.match_response(http_res, "422", "application/json"):
|
387
411
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
388
412
|
raise models.HTTPValidationError(data=data)
|
389
|
-
if utils.match_response(http_res,
|
413
|
+
if utils.match_response(http_res, "500", "application/json"):
|
414
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
415
|
+
raise models.ErrorResponse(data=data)
|
416
|
+
if utils.match_response(http_res, "4XX", "*"):
|
417
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
418
|
+
raise models.APIError(
|
419
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
420
|
+
)
|
421
|
+
if utils.match_response(http_res, "5XX", "*"):
|
390
422
|
http_res_text = await utils.stream_to_text_async(http_res)
|
391
423
|
raise models.APIError(
|
392
424
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -494,14 +526,22 @@ class Features(BaseSDK):
|
|
494
526
|
if utils.match_response(http_res, "200", "application/json"):
|
495
527
|
return utils.unmarshal_json(http_res.text, models.FeatureResponse)
|
496
528
|
if utils.match_response(
|
497
|
-
http_res, ["400", "401", "403", "404"
|
529
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
498
530
|
):
|
499
531
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
500
532
|
raise models.ErrorResponse(data=data)
|
501
533
|
if utils.match_response(http_res, "422", "application/json"):
|
502
534
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
503
535
|
raise models.HTTPValidationError(data=data)
|
504
|
-
if utils.match_response(http_res,
|
536
|
+
if utils.match_response(http_res, "500", "application/json"):
|
537
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
538
|
+
raise models.ErrorResponse(data=data)
|
539
|
+
if utils.match_response(http_res, "4XX", "*"):
|
540
|
+
http_res_text = utils.stream_to_text(http_res)
|
541
|
+
raise models.APIError(
|
542
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
543
|
+
)
|
544
|
+
if utils.match_response(http_res, "5XX", "*"):
|
505
545
|
http_res_text = utils.stream_to_text(http_res)
|
506
546
|
raise models.APIError(
|
507
547
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -609,14 +649,22 @@ class Features(BaseSDK):
|
|
609
649
|
if utils.match_response(http_res, "200", "application/json"):
|
610
650
|
return utils.unmarshal_json(http_res.text, models.FeatureResponse)
|
611
651
|
if utils.match_response(
|
612
|
-
http_res, ["400", "401", "403", "404"
|
652
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
613
653
|
):
|
614
654
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
615
655
|
raise models.ErrorResponse(data=data)
|
616
656
|
if utils.match_response(http_res, "422", "application/json"):
|
617
657
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
618
658
|
raise models.HTTPValidationError(data=data)
|
619
|
-
if utils.match_response(http_res,
|
659
|
+
if utils.match_response(http_res, "500", "application/json"):
|
660
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
661
|
+
raise models.ErrorResponse(data=data)
|
662
|
+
if utils.match_response(http_res, "4XX", "*"):
|
663
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
664
|
+
raise models.APIError(
|
665
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
666
|
+
)
|
667
|
+
if utils.match_response(http_res, "5XX", "*"):
|
620
668
|
http_res_text = await utils.stream_to_text_async(http_res)
|
621
669
|
raise models.APIError(
|
622
670
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -743,14 +791,22 @@ class Features(BaseSDK):
|
|
743
791
|
if utils.match_response(http_res, "200", "application/json"):
|
744
792
|
return utils.unmarshal_json(http_res.text, models.ListFeaturesResponse)
|
745
793
|
if utils.match_response(
|
746
|
-
http_res, ["400", "401", "403", "404"
|
794
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
747
795
|
):
|
748
796
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
749
797
|
raise models.ErrorResponse(data=data)
|
750
798
|
if utils.match_response(http_res, "422", "application/json"):
|
751
799
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
752
800
|
raise models.HTTPValidationError(data=data)
|
753
|
-
if utils.match_response(http_res,
|
801
|
+
if utils.match_response(http_res, "500", "application/json"):
|
802
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
803
|
+
raise models.ErrorResponse(data=data)
|
804
|
+
if utils.match_response(http_res, "4XX", "*"):
|
805
|
+
http_res_text = utils.stream_to_text(http_res)
|
806
|
+
raise models.APIError(
|
807
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
808
|
+
)
|
809
|
+
if utils.match_response(http_res, "5XX", "*"):
|
754
810
|
http_res_text = utils.stream_to_text(http_res)
|
755
811
|
raise models.APIError(
|
756
812
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -877,14 +933,22 @@ class Features(BaseSDK):
|
|
877
933
|
if utils.match_response(http_res, "200", "application/json"):
|
878
934
|
return utils.unmarshal_json(http_res.text, models.ListFeaturesResponse)
|
879
935
|
if utils.match_response(
|
880
|
-
http_res, ["400", "401", "403", "404"
|
936
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
881
937
|
):
|
882
938
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
883
939
|
raise models.ErrorResponse(data=data)
|
884
940
|
if utils.match_response(http_res, "422", "application/json"):
|
885
941
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
886
942
|
raise models.HTTPValidationError(data=data)
|
887
|
-
if utils.match_response(http_res,
|
943
|
+
if utils.match_response(http_res, "500", "application/json"):
|
944
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
945
|
+
raise models.ErrorResponse(data=data)
|
946
|
+
if utils.match_response(http_res, "4XX", "*"):
|
947
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
948
|
+
raise models.APIError(
|
949
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
950
|
+
)
|
951
|
+
if utils.match_response(http_res, "5XX", "*"):
|
888
952
|
http_res_text = await utils.stream_to_text_async(http_res)
|
889
953
|
raise models.APIError(
|
890
954
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
mixpeek/health.py
CHANGED
@@ -70,7 +70,12 @@ class Health(BaseSDK):
|
|
70
70
|
|
71
71
|
if utils.match_response(http_res, "200", "application/json"):
|
72
72
|
return utils.unmarshal_json(http_res.text, models.HealthCheckResponse)
|
73
|
-
if utils.match_response(http_res,
|
73
|
+
if utils.match_response(http_res, "4XX", "*"):
|
74
|
+
http_res_text = utils.stream_to_text(http_res)
|
75
|
+
raise models.APIError(
|
76
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
77
|
+
)
|
78
|
+
if utils.match_response(http_res, "5XX", "*"):
|
74
79
|
http_res_text = utils.stream_to_text(http_res)
|
75
80
|
raise models.APIError(
|
76
81
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -146,7 +151,12 @@ class Health(BaseSDK):
|
|
146
151
|
|
147
152
|
if utils.match_response(http_res, "200", "application/json"):
|
148
153
|
return utils.unmarshal_json(http_res.text, models.HealthCheckResponse)
|
149
|
-
if utils.match_response(http_res,
|
154
|
+
if utils.match_response(http_res, "4XX", "*"):
|
155
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
156
|
+
raise models.APIError(
|
157
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
158
|
+
)
|
159
|
+
if utils.match_response(http_res, "5XX", "*"):
|
150
160
|
http_res_text = await utils.stream_to_text_async(http_res)
|
151
161
|
raise models.APIError(
|
152
162
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
mixpeek/ingest_assets.py
CHANGED
@@ -121,14 +121,22 @@ class IngestAssets(BaseSDK):
|
|
121
121
|
if utils.match_response(http_res, "200", "application/json"):
|
122
122
|
return utils.unmarshal_json(http_res.text, models.TaskResponse)
|
123
123
|
if utils.match_response(
|
124
|
-
http_res, ["400", "401", "403", "404"
|
124
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
125
125
|
):
|
126
126
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
127
127
|
raise models.ErrorResponse(data=data)
|
128
128
|
if utils.match_response(http_res, "422", "application/json"):
|
129
129
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
130
130
|
raise models.HTTPValidationError(data=data)
|
131
|
-
if utils.match_response(http_res,
|
131
|
+
if utils.match_response(http_res, "500", "application/json"):
|
132
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
133
|
+
raise models.ErrorResponse(data=data)
|
134
|
+
if utils.match_response(http_res, "4XX", "*"):
|
135
|
+
http_res_text = utils.stream_to_text(http_res)
|
136
|
+
raise models.APIError(
|
137
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
138
|
+
)
|
139
|
+
if utils.match_response(http_res, "5XX", "*"):
|
132
140
|
http_res_text = utils.stream_to_text(http_res)
|
133
141
|
raise models.APIError(
|
134
142
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -255,14 +263,22 @@ class IngestAssets(BaseSDK):
|
|
255
263
|
if utils.match_response(http_res, "200", "application/json"):
|
256
264
|
return utils.unmarshal_json(http_res.text, models.TaskResponse)
|
257
265
|
if utils.match_response(
|
258
|
-
http_res, ["400", "401", "403", "404"
|
266
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
259
267
|
):
|
260
268
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
261
269
|
raise models.ErrorResponse(data=data)
|
262
270
|
if utils.match_response(http_res, "422", "application/json"):
|
263
271
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
264
272
|
raise models.HTTPValidationError(data=data)
|
265
|
-
if utils.match_response(http_res,
|
273
|
+
if utils.match_response(http_res, "500", "application/json"):
|
274
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
275
|
+
raise models.ErrorResponse(data=data)
|
276
|
+
if utils.match_response(http_res, "4XX", "*"):
|
277
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
278
|
+
raise models.APIError(
|
279
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
280
|
+
)
|
281
|
+
if utils.match_response(http_res, "5XX", "*"):
|
266
282
|
http_res_text = await utils.stream_to_text_async(http_res)
|
267
283
|
raise models.APIError(
|
268
284
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -392,14 +408,22 @@ class IngestAssets(BaseSDK):
|
|
392
408
|
if utils.match_response(http_res, "200", "application/json"):
|
393
409
|
return utils.unmarshal_json(http_res.text, models.TaskResponse)
|
394
410
|
if utils.match_response(
|
395
|
-
http_res, ["400", "401", "403", "404"
|
411
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
396
412
|
):
|
397
413
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
398
414
|
raise models.ErrorResponse(data=data)
|
399
415
|
if utils.match_response(http_res, "422", "application/json"):
|
400
416
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
401
417
|
raise models.HTTPValidationError(data=data)
|
402
|
-
if utils.match_response(http_res,
|
418
|
+
if utils.match_response(http_res, "500", "application/json"):
|
419
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
420
|
+
raise models.ErrorResponse(data=data)
|
421
|
+
if utils.match_response(http_res, "4XX", "*"):
|
422
|
+
http_res_text = utils.stream_to_text(http_res)
|
423
|
+
raise models.APIError(
|
424
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
425
|
+
)
|
426
|
+
if utils.match_response(http_res, "5XX", "*"):
|
403
427
|
http_res_text = utils.stream_to_text(http_res)
|
404
428
|
raise models.APIError(
|
405
429
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -529,14 +553,22 @@ class IngestAssets(BaseSDK):
|
|
529
553
|
if utils.match_response(http_res, "200", "application/json"):
|
530
554
|
return utils.unmarshal_json(http_res.text, models.TaskResponse)
|
531
555
|
if utils.match_response(
|
532
|
-
http_res, ["400", "401", "403", "404"
|
556
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
533
557
|
):
|
534
558
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
535
559
|
raise models.ErrorResponse(data=data)
|
536
560
|
if utils.match_response(http_res, "422", "application/json"):
|
537
561
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
538
562
|
raise models.HTTPValidationError(data=data)
|
539
|
-
if utils.match_response(http_res,
|
563
|
+
if utils.match_response(http_res, "500", "application/json"):
|
564
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
565
|
+
raise models.ErrorResponse(data=data)
|
566
|
+
if utils.match_response(http_res, "4XX", "*"):
|
567
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
568
|
+
raise models.APIError(
|
569
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
570
|
+
)
|
571
|
+
if utils.match_response(http_res, "5XX", "*"):
|
540
572
|
http_res_text = await utils.stream_to_text_async(http_res)
|
541
573
|
raise models.APIError(
|
542
574
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -666,14 +698,22 @@ class IngestAssets(BaseSDK):
|
|
666
698
|
if utils.match_response(http_res, "200", "application/json"):
|
667
699
|
return utils.unmarshal_json(http_res.text, models.TaskResponse)
|
668
700
|
if utils.match_response(
|
669
|
-
http_res, ["400", "401", "403", "404"
|
701
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
670
702
|
):
|
671
703
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
672
704
|
raise models.ErrorResponse(data=data)
|
673
705
|
if utils.match_response(http_res, "422", "application/json"):
|
674
706
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
675
707
|
raise models.HTTPValidationError(data=data)
|
676
|
-
if utils.match_response(http_res,
|
708
|
+
if utils.match_response(http_res, "500", "application/json"):
|
709
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
710
|
+
raise models.ErrorResponse(data=data)
|
711
|
+
if utils.match_response(http_res, "4XX", "*"):
|
712
|
+
http_res_text = utils.stream_to_text(http_res)
|
713
|
+
raise models.APIError(
|
714
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
715
|
+
)
|
716
|
+
if utils.match_response(http_res, "5XX", "*"):
|
677
717
|
http_res_text = utils.stream_to_text(http_res)
|
678
718
|
raise models.APIError(
|
679
719
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -803,14 +843,22 @@ class IngestAssets(BaseSDK):
|
|
803
843
|
if utils.match_response(http_res, "200", "application/json"):
|
804
844
|
return utils.unmarshal_json(http_res.text, models.TaskResponse)
|
805
845
|
if utils.match_response(
|
806
|
-
http_res, ["400", "401", "403", "404"
|
846
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
807
847
|
):
|
808
848
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
809
849
|
raise models.ErrorResponse(data=data)
|
810
850
|
if utils.match_response(http_res, "422", "application/json"):
|
811
851
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
812
852
|
raise models.HTTPValidationError(data=data)
|
813
|
-
if utils.match_response(http_res,
|
853
|
+
if utils.match_response(http_res, "500", "application/json"):
|
854
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
855
|
+
raise models.ErrorResponse(data=data)
|
856
|
+
if utils.match_response(http_res, "4XX", "*"):
|
857
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
858
|
+
raise models.APIError(
|
859
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
860
|
+
)
|
861
|
+
if utils.match_response(http_res, "5XX", "*"):
|
814
862
|
http_res_text = await utils.stream_to_text_async(http_res)
|
815
863
|
raise models.APIError(
|
816
864
|
"API error occurred", http_res.status_code, http_res_text, http_res
|