diracx-client 0.0.1a18__py3-none-any.whl → 0.0.1a20__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. diracx/client/__init__.py +4 -18
  2. diracx/client/aio.py +1 -0
  3. diracx/client/extensions.py +90 -0
  4. diracx/client/{aio → generated}/__init__.py +2 -2
  5. diracx/client/{_client.py → generated/_client.py} +7 -6
  6. diracx/client/{_configuration.py → generated/_configuration.py} +1 -1
  7. diracx/client/generated/_patch.py +47 -0
  8. diracx/client/{_serialization.py → generated/_serialization.py} +303 -154
  9. diracx/client/{_vendor.py → generated/_vendor.py} +1 -1
  10. diracx/client/generated/aio/__init__.py +21 -0
  11. diracx/client/{aio → generated/aio}/_client.py +7 -6
  12. diracx/client/{aio → generated/aio}/_configuration.py +1 -1
  13. diracx/client/generated/aio/_patch.py +23 -0
  14. diracx/client/{aio → generated/aio}/_vendor.py +1 -1
  15. diracx/client/{aio → generated/aio}/operations/__init__.py +2 -2
  16. diracx/client/{aio → generated/aio}/operations/_operations.py +139 -209
  17. diracx/client/{models → generated/models}/__init__.py +4 -2
  18. diracx/client/{models → generated/models}/_enums.py +2 -2
  19. diracx/client/{models → generated/models}/_models.py +86 -46
  20. diracx/client/{operations → generated/operations}/__init__.py +2 -2
  21. diracx/client/{operations → generated/operations}/_operations.py +139 -209
  22. diracx/client/generated/py.typed +1 -0
  23. diracx/client/models.py +5 -0
  24. diracx/client/patches/__init__.py +19 -0
  25. diracx/client/patches/aio/__init__.py +18 -0
  26. diracx/client/{aio/_patch.py → patches/aio/utils.py} +25 -19
  27. diracx/client/{_patch.py → patches/utils.py} +115 -122
  28. {diracx_client-0.0.1a18.dist-info → diracx_client-0.0.1a20.dist-info}/METADATA +1 -2
  29. diracx_client-0.0.1a20.dist-info/RECORD +36 -0
  30. {diracx_client-0.0.1a18.dist-info → diracx_client-0.0.1a20.dist-info}/WHEEL +1 -1
  31. diracx_client-0.0.1a20.dist-info/entry_points.txt +3 -0
  32. diracx_client-0.0.1a18.dist-info/RECORD +0 -26
  33. /diracx/client/{aio → generated/aio}/operations/_patch.py +0 -0
  34. /diracx/client/{models → generated/models}/_patch.py +0 -0
  35. /diracx/client/{operations → generated/operations}/_patch.py +0 -0
  36. {diracx_client-0.0.1a18.dist-info → diracx_client-0.0.1a20.dist-info}/top_level.txt +0 -0
@@ -1,23 +1,12 @@
1
- # pylint: disable=too-many-lines,too-many-statements
1
+ # pylint: disable=too-many-lines
2
2
  # coding=utf-8
3
3
  # --------------------------------------------------------------------------
4
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.19)
4
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.26.0)
5
5
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
6
6
  # --------------------------------------------------------------------------
7
7
  from io import IOBase
8
8
  import sys
9
- from typing import (
10
- Any,
11
- Callable,
12
- Dict,
13
- IO,
14
- List,
15
- Optional,
16
- Type,
17
- TypeVar,
18
- Union,
19
- overload,
20
- )
9
+ from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload
21
10
 
22
11
  from azure.core import MatchConditions
23
12
  from azure.core.exceptions import (
@@ -80,7 +69,7 @@ from .._vendor import raise_if_not_implemented
80
69
  if sys.version_info >= (3, 9):
81
70
  from collections.abc import MutableMapping
82
71
  else:
83
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
72
+ from typing import MutableMapping # type: ignore
84
73
  T = TypeVar("T")
85
74
  ClsType = Optional[
86
75
  Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]
@@ -94,7 +83,7 @@ class WellKnownOperations:
94
83
  **DO NOT** instantiate this class directly.
95
84
 
96
85
  Instead, you should access the following operations through
97
- :class:`~client.aio.Dirac`'s
86
+ :class:`~generated.aio.Dirac`'s
98
87
  :attr:`well_known` attribute.
99
88
  """
100
89
 
@@ -119,7 +108,7 @@ class WellKnownOperations:
119
108
  :rtype: any
120
109
  :raises ~azure.core.exceptions.HttpResponseError:
121
110
  """
122
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
111
+ error_map: MutableMapping = {
123
112
  401: ClientAuthenticationError,
124
113
  404: ResourceNotFoundError,
125
114
  409: ResourceExistsError,
@@ -148,14 +137,12 @@ class WellKnownOperations:
148
137
  response = pipeline_response.http_response
149
138
 
150
139
  if response.status_code not in [200]:
151
- if _stream:
152
- await response.read() # Load the body in memory and close the socket
153
140
  map_error(
154
141
  status_code=response.status_code, response=response, error_map=error_map
155
142
  )
156
143
  raise HttpResponseError(response=response)
157
144
 
158
- deserialized = self._deserialize("object", pipeline_response)
145
+ deserialized = self._deserialize("object", pipeline_response.http_response)
159
146
 
160
147
  if cls:
161
148
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -169,10 +156,10 @@ class WellKnownOperations:
169
156
  Get metadata about the dirac installation.
170
157
 
171
158
  :return: Metadata
172
- :rtype: ~client.models.Metadata
159
+ :rtype: ~generated.models.Metadata
173
160
  :raises ~azure.core.exceptions.HttpResponseError:
174
161
  """
175
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
162
+ error_map: MutableMapping = {
176
163
  401: ClientAuthenticationError,
177
164
  404: ResourceNotFoundError,
178
165
  409: ResourceExistsError,
@@ -201,14 +188,12 @@ class WellKnownOperations:
201
188
  response = pipeline_response.http_response
202
189
 
203
190
  if response.status_code not in [200]:
204
- if _stream:
205
- await response.read() # Load the body in memory and close the socket
206
191
  map_error(
207
192
  status_code=response.status_code, response=response, error_map=error_map
208
193
  )
209
194
  raise HttpResponseError(response=response)
210
195
 
211
- deserialized = self._deserialize("Metadata", pipeline_response)
196
+ deserialized = self._deserialize("Metadata", pipeline_response.http_response)
212
197
 
213
198
  if cls:
214
199
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -222,7 +207,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
222
207
  **DO NOT** instantiate this class directly.
223
208
 
224
209
  Instead, you should access the following operations through
225
- :class:`~client.aio.Dirac`'s
210
+ :class:`~generated.aio.Dirac`'s
226
211
  :attr:`auth` attribute.
227
212
  """
228
213
 
@@ -253,7 +238,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
253
238
  Initiate the device flow against DIRAC authorization Server.
254
239
  Scope must have exactly up to one ``group`` (otherwise default) and
255
240
  one or more ``property`` scope.
256
- If no property, then get default one
241
+ If no property, then get default one.
257
242
 
258
243
  Offers the user to go with the browser to
259
244
  ``auth/<vo>/device?user_code=XYZ``.
@@ -263,10 +248,10 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
263
248
  :keyword scope: Required.
264
249
  :paramtype scope: str
265
250
  :return: InitiateDeviceFlowResponse
266
- :rtype: ~client.models.InitiateDeviceFlowResponse
251
+ :rtype: ~generated.models.InitiateDeviceFlowResponse
267
252
  :raises ~azure.core.exceptions.HttpResponseError:
268
253
  """
269
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
254
+ error_map: MutableMapping = {
270
255
  401: ClientAuthenticationError,
271
256
  404: ResourceNotFoundError,
272
257
  409: ResourceExistsError,
@@ -297,15 +282,13 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
297
282
  response = pipeline_response.http_response
298
283
 
299
284
  if response.status_code not in [200]:
300
- if _stream:
301
- await response.read() # Load the body in memory and close the socket
302
285
  map_error(
303
286
  status_code=response.status_code, response=response, error_map=error_map
304
287
  )
305
288
  raise HttpResponseError(response=response)
306
289
 
307
290
  deserialized = self._deserialize(
308
- "InitiateDeviceFlowResponse", pipeline_response
291
+ "InitiateDeviceFlowResponse", pipeline_response.http_response
309
292
  )
310
293
 
311
294
  if cls:
@@ -332,7 +315,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
332
315
  :rtype: any
333
316
  :raises ~azure.core.exceptions.HttpResponseError:
334
317
  """
335
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
318
+ error_map: MutableMapping = {
336
319
  401: ClientAuthenticationError,
337
320
  404: ResourceNotFoundError,
338
321
  409: ResourceExistsError,
@@ -362,14 +345,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
362
345
  response = pipeline_response.http_response
363
346
 
364
347
  if response.status_code not in [200]:
365
- if _stream:
366
- await response.read() # Load the body in memory and close the socket
367
348
  map_error(
368
349
  status_code=response.status_code, response=response, error_map=error_map
369
350
  )
370
351
  raise HttpResponseError(response=response)
371
352
 
372
- deserialized = self._deserialize("object", pipeline_response)
353
+ deserialized = self._deserialize("object", pipeline_response.http_response)
373
354
 
374
355
  if cls:
375
356
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -394,7 +375,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
394
375
  :rtype: any
395
376
  :raises ~azure.core.exceptions.HttpResponseError:
396
377
  """
397
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
378
+ error_map: MutableMapping = {
398
379
  401: ClientAuthenticationError,
399
380
  404: ResourceNotFoundError,
400
381
  409: ResourceExistsError,
@@ -425,14 +406,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
425
406
  response = pipeline_response.http_response
426
407
 
427
408
  if response.status_code not in [200]:
428
- if _stream:
429
- await response.read() # Load the body in memory and close the socket
430
409
  map_error(
431
410
  status_code=response.status_code, response=response, error_map=error_map
432
411
  )
433
412
  raise HttpResponseError(response=response)
434
413
 
435
- deserialized = self._deserialize("object", pipeline_response)
414
+ deserialized = self._deserialize("object", pipeline_response.http_response)
436
415
 
437
416
  if cls:
438
417
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -449,7 +428,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
449
428
  :rtype: any
450
429
  :raises ~azure.core.exceptions.HttpResponseError:
451
430
  """
452
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
431
+ error_map: MutableMapping = {
453
432
  401: ClientAuthenticationError,
454
433
  404: ResourceNotFoundError,
455
434
  409: ResourceExistsError,
@@ -478,14 +457,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
478
457
  response = pipeline_response.http_response
479
458
 
480
459
  if response.status_code not in [200]:
481
- if _stream:
482
- await response.read() # Load the body in memory and close the socket
483
460
  map_error(
484
461
  status_code=response.status_code, response=response, error_map=error_map
485
462
  )
486
463
  raise HttpResponseError(response=response)
487
464
 
488
- deserialized = self._deserialize("object", pipeline_response)
465
+ deserialized = self._deserialize("object", pipeline_response.http_response)
489
466
 
490
467
  if cls:
491
468
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -503,7 +480,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
503
480
  :rtype: list[any]
504
481
  :raises ~azure.core.exceptions.HttpResponseError:
505
482
  """
506
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
483
+ error_map: MutableMapping = {
507
484
  401: ClientAuthenticationError,
508
485
  404: ResourceNotFoundError,
509
486
  409: ResourceExistsError,
@@ -532,14 +509,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
532
509
  response = pipeline_response.http_response
533
510
 
534
511
  if response.status_code not in [200]:
535
- if _stream:
536
- await response.read() # Load the body in memory and close the socket
537
512
  map_error(
538
513
  status_code=response.status_code, response=response, error_map=error_map
539
514
  )
540
515
  raise HttpResponseError(response=response)
541
516
 
542
- deserialized = self._deserialize("[object]", pipeline_response)
517
+ deserialized = self._deserialize("[object]", pipeline_response.http_response)
543
518
 
544
519
  if cls:
545
520
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -559,7 +534,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
559
534
  :rtype: str
560
535
  :raises ~azure.core.exceptions.HttpResponseError:
561
536
  """
562
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
537
+ error_map: MutableMapping = {
563
538
  401: ClientAuthenticationError,
564
539
  404: ResourceNotFoundError,
565
540
  409: ResourceExistsError,
@@ -589,14 +564,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
589
564
  response = pipeline_response.http_response
590
565
 
591
566
  if response.status_code not in [200]:
592
- if _stream:
593
- await response.read() # Load the body in memory and close the socket
594
567
  map_error(
595
568
  status_code=response.status_code, response=response, error_map=error_map
596
569
  )
597
570
  raise HttpResponseError(response=response)
598
571
 
599
- deserialized = self._deserialize("str", pipeline_response)
572
+ deserialized = self._deserialize("str", pipeline_response.http_response)
600
573
 
601
574
  if cls:
602
575
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -610,10 +583,10 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
610
583
  Get information about the user's identity.
611
584
 
612
585
  :return: UserInfoResponse
613
- :rtype: ~client.models.UserInfoResponse
586
+ :rtype: ~generated.models.UserInfoResponse
614
587
  :raises ~azure.core.exceptions.HttpResponseError:
615
588
  """
616
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
589
+ error_map: MutableMapping = {
617
590
  401: ClientAuthenticationError,
618
591
  404: ResourceNotFoundError,
619
592
  409: ResourceExistsError,
@@ -642,14 +615,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
642
615
  response = pipeline_response.http_response
643
616
 
644
617
  if response.status_code not in [200]:
645
- if _stream:
646
- await response.read() # Load the body in memory and close the socket
647
618
  map_error(
648
619
  status_code=response.status_code, response=response, error_map=error_map
649
620
  )
650
621
  raise HttpResponseError(response=response)
651
622
 
652
- deserialized = self._deserialize("UserInfoResponse", pipeline_response)
623
+ deserialized = self._deserialize(
624
+ "UserInfoResponse", pipeline_response.http_response
625
+ )
653
626
 
654
627
  if cls:
655
628
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -680,11 +653,11 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
680
653
  user authorize flow.
681
654
 
682
655
  :keyword response_type: "code" Required.
683
- :paramtype response_type: str or ~client.models.Enum0
656
+ :paramtype response_type: str or ~generated.models.Enum0
684
657
  :keyword code_challenge: Required.
685
658
  :paramtype code_challenge: str
686
659
  :keyword code_challenge_method: "S256" Required.
687
- :paramtype code_challenge_method: str or ~client.models.Enum1
660
+ :paramtype code_challenge_method: str or ~generated.models.Enum1
688
661
  :keyword client_id: Required.
689
662
  :paramtype client_id: str
690
663
  :keyword redirect_uri: Required.
@@ -697,7 +670,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
697
670
  :rtype: any
698
671
  :raises ~azure.core.exceptions.HttpResponseError:
699
672
  """
700
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
673
+ error_map: MutableMapping = {
701
674
  401: ClientAuthenticationError,
702
675
  404: ResourceNotFoundError,
703
676
  409: ResourceExistsError,
@@ -733,14 +706,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
733
706
  response = pipeline_response.http_response
734
707
 
735
708
  if response.status_code not in [200]:
736
- if _stream:
737
- await response.read() # Load the body in memory and close the socket
738
709
  map_error(
739
710
  status_code=response.status_code, response=response, error_map=error_map
740
711
  )
741
712
  raise HttpResponseError(response=response)
742
713
 
743
- deserialized = self._deserialize("object", pipeline_response)
714
+ deserialized = self._deserialize("object", pipeline_response.http_response)
744
715
 
745
716
  if cls:
746
717
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -769,7 +740,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
769
740
  :rtype: any
770
741
  :raises ~azure.core.exceptions.HttpResponseError:
771
742
  """
772
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
743
+ error_map: MutableMapping = {
773
744
  401: ClientAuthenticationError,
774
745
  404: ResourceNotFoundError,
775
746
  409: ResourceExistsError,
@@ -800,14 +771,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
800
771
  response = pipeline_response.http_response
801
772
 
802
773
  if response.status_code not in [200]:
803
- if _stream:
804
- await response.read() # Load the body in memory and close the socket
805
774
  map_error(
806
775
  status_code=response.status_code, response=response, error_map=error_map
807
776
  )
808
777
  raise HttpResponseError(response=response)
809
778
 
810
- deserialized = self._deserialize("object", pipeline_response)
779
+ deserialized = self._deserialize("object", pipeline_response.http_response)
811
780
 
812
781
  if cls:
813
782
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -821,7 +790,7 @@ class ConfigOperations:
821
790
  **DO NOT** instantiate this class directly.
822
791
 
823
792
  Instead, you should access the following operations through
824
- :class:`~client.aio.Dirac`'s
793
+ :class:`~generated.aio.Dirac`'s
825
794
  :attr:`config` attribute.
826
795
  """
827
796
 
@@ -865,7 +834,7 @@ class ConfigOperations:
865
834
  :rtype: any
866
835
  :raises ~azure.core.exceptions.HttpResponseError:
867
836
  """
868
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
837
+ error_map: MutableMapping = {
869
838
  401: ClientAuthenticationError,
870
839
  404: ResourceNotFoundError,
871
840
  409: ResourceExistsError,
@@ -903,14 +872,12 @@ class ConfigOperations:
903
872
  response = pipeline_response.http_response
904
873
 
905
874
  if response.status_code not in [200]:
906
- if _stream:
907
- await response.read() # Load the body in memory and close the socket
908
875
  map_error(
909
876
  status_code=response.status_code, response=response, error_map=error_map
910
877
  )
911
878
  raise HttpResponseError(response=response)
912
879
 
913
- deserialized = self._deserialize("object", pipeline_response)
880
+ deserialized = self._deserialize("object", pipeline_response.http_response)
914
881
 
915
882
  if cls:
916
883
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -924,7 +891,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
924
891
  **DO NOT** instantiate this class directly.
925
892
 
926
893
  Instead, you should access the following operations through
927
- :class:`~client.aio.Dirac`'s
894
+ :class:`~generated.aio.Dirac`'s
928
895
  :attr:`jobs` attribute.
929
896
  """
930
897
 
@@ -958,12 +925,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
958
925
  should be used to upload the sandbox to the storage backend.
959
926
 
960
927
  :param body: Required.
961
- :type body: ~client.models.SandboxInfo
928
+ :type body: ~generated.models.SandboxInfo
962
929
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
963
930
  Default value is "application/json".
964
931
  :paramtype content_type: str
965
932
  :return: SandboxUploadResponse
966
- :rtype: ~client.models.SandboxUploadResponse
933
+ :rtype: ~generated.models.SandboxUploadResponse
967
934
  :raises ~azure.core.exceptions.HttpResponseError:
968
935
  """
969
936
 
@@ -987,7 +954,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
987
954
  Default value is "application/json".
988
955
  :paramtype content_type: str
989
956
  :return: SandboxUploadResponse
990
- :rtype: ~client.models.SandboxUploadResponse
957
+ :rtype: ~generated.models.SandboxUploadResponse
991
958
  :raises ~azure.core.exceptions.HttpResponseError:
992
959
  """
993
960
 
@@ -1006,12 +973,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1006
973
  should be used to upload the sandbox to the storage backend.
1007
974
 
1008
975
  :param body: Is either a SandboxInfo type or a IO[bytes] type. Required.
1009
- :type body: ~client.models.SandboxInfo or IO[bytes]
976
+ :type body: ~generated.models.SandboxInfo or IO[bytes]
1010
977
  :return: SandboxUploadResponse
1011
- :rtype: ~client.models.SandboxUploadResponse
978
+ :rtype: ~generated.models.SandboxUploadResponse
1012
979
  :raises ~azure.core.exceptions.HttpResponseError:
1013
980
  """
1014
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
981
+ error_map: MutableMapping = {
1015
982
  401: ClientAuthenticationError,
1016
983
  404: ResourceNotFoundError,
1017
984
  409: ResourceExistsError,
@@ -1054,14 +1021,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1054
1021
  response = pipeline_response.http_response
1055
1022
 
1056
1023
  if response.status_code not in [200]:
1057
- if _stream:
1058
- await response.read() # Load the body in memory and close the socket
1059
1024
  map_error(
1060
1025
  status_code=response.status_code, response=response, error_map=error_map
1061
1026
  )
1062
1027
  raise HttpResponseError(response=response)
1063
1028
 
1064
- deserialized = self._deserialize("SandboxUploadResponse", pipeline_response)
1029
+ deserialized = self._deserialize(
1030
+ "SandboxUploadResponse", pipeline_response.http_response
1031
+ )
1065
1032
 
1066
1033
  if cls:
1067
1034
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1074,7 +1041,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1074
1041
  ) -> _models.SandboxDownloadResponse:
1075
1042
  """Get Sandbox File.
1076
1043
 
1077
- Get a presigned URL to download a sandbox file
1044
+ Get a presigned URL to download a sandbox file.
1078
1045
 
1079
1046
  This route cannot use a redirect response most clients will also send the
1080
1047
  authorization header when following a redirect. This is not desirable as
@@ -1085,10 +1052,10 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1085
1052
  :keyword pfn: Required.
1086
1053
  :paramtype pfn: str
1087
1054
  :return: SandboxDownloadResponse
1088
- :rtype: ~client.models.SandboxDownloadResponse
1055
+ :rtype: ~generated.models.SandboxDownloadResponse
1089
1056
  :raises ~azure.core.exceptions.HttpResponseError:
1090
1057
  """
1091
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1058
+ error_map: MutableMapping = {
1092
1059
  401: ClientAuthenticationError,
1093
1060
  404: ResourceNotFoundError,
1094
1061
  409: ResourceExistsError,
@@ -1118,14 +1085,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1118
1085
  response = pipeline_response.http_response
1119
1086
 
1120
1087
  if response.status_code not in [200]:
1121
- if _stream:
1122
- await response.read() # Load the body in memory and close the socket
1123
1088
  map_error(
1124
1089
  status_code=response.status_code, response=response, error_map=error_map
1125
1090
  )
1126
1091
  raise HttpResponseError(response=response)
1127
1092
 
1128
- deserialized = self._deserialize("SandboxDownloadResponse", pipeline_response)
1093
+ deserialized = self._deserialize(
1094
+ "SandboxDownloadResponse", pipeline_response.http_response
1095
+ )
1129
1096
 
1130
1097
  if cls:
1131
1098
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1146,7 +1113,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1146
1113
  :rtype: any
1147
1114
  :raises ~azure.core.exceptions.HttpResponseError:
1148
1115
  """
1149
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1116
+ error_map: MutableMapping = {
1150
1117
  401: ClientAuthenticationError,
1151
1118
  404: ResourceNotFoundError,
1152
1119
  409: ResourceExistsError,
@@ -1176,14 +1143,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1176
1143
  response = pipeline_response.http_response
1177
1144
 
1178
1145
  if response.status_code not in [200]:
1179
- if _stream:
1180
- await response.read() # Load the body in memory and close the socket
1181
1146
  map_error(
1182
1147
  status_code=response.status_code, response=response, error_map=error_map
1183
1148
  )
1184
1149
  raise HttpResponseError(response=response)
1185
1150
 
1186
- deserialized = self._deserialize("object", pipeline_response)
1151
+ deserialized = self._deserialize("object", pipeline_response.http_response)
1187
1152
 
1188
1153
  if cls:
1189
1154
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1204,7 +1169,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1204
1169
  :rtype: dict[str, list[any]]
1205
1170
  :raises ~azure.core.exceptions.HttpResponseError:
1206
1171
  """
1207
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1172
+ error_map: MutableMapping = {
1208
1173
  401: ClientAuthenticationError,
1209
1174
  404: ResourceNotFoundError,
1210
1175
  409: ResourceExistsError,
@@ -1234,14 +1199,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1234
1199
  response = pipeline_response.http_response
1235
1200
 
1236
1201
  if response.status_code not in [200]:
1237
- if _stream:
1238
- await response.read() # Load the body in memory and close the socket
1239
1202
  map_error(
1240
1203
  status_code=response.status_code, response=response, error_map=error_map
1241
1204
  )
1242
1205
  raise HttpResponseError(response=response)
1243
1206
 
1244
- deserialized = self._deserialize("{[object]}", pipeline_response)
1207
+ deserialized = self._deserialize("{[object]}", pipeline_response.http_response)
1245
1208
 
1246
1209
  if cls:
1247
1210
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1260,7 +1223,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1260
1223
  :rtype: any
1261
1224
  :raises ~azure.core.exceptions.HttpResponseError:
1262
1225
  """
1263
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1226
+ error_map: MutableMapping = {
1264
1227
  401: ClientAuthenticationError,
1265
1228
  404: ResourceNotFoundError,
1266
1229
  409: ResourceExistsError,
@@ -1290,14 +1253,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1290
1253
  response = pipeline_response.http_response
1291
1254
 
1292
1255
  if response.status_code not in [200]:
1293
- if _stream:
1294
- await response.read() # Load the body in memory and close the socket
1295
1256
  map_error(
1296
1257
  status_code=response.status_code, response=response, error_map=error_map
1297
1258
  )
1298
1259
  raise HttpResponseError(response=response)
1299
1260
 
1300
- deserialized = self._deserialize("object", pipeline_response)
1261
+ deserialized = self._deserialize("object", pipeline_response.http_response)
1301
1262
 
1302
1263
  if cls:
1303
1264
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1315,12 +1276,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1315
1276
  :param job_id: Required.
1316
1277
  :type job_id: int
1317
1278
  :param sandbox_type: Known values are: "input" and "output". Required.
1318
- :type sandbox_type: str or ~client.models.SandboxType
1279
+ :type sandbox_type: str or ~generated.models.SandboxType
1319
1280
  :return: list of any
1320
1281
  :rtype: list[any]
1321
1282
  :raises ~azure.core.exceptions.HttpResponseError:
1322
1283
  """
1323
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1284
+ error_map: MutableMapping = {
1324
1285
  401: ClientAuthenticationError,
1325
1286
  404: ResourceNotFoundError,
1326
1287
  409: ResourceExistsError,
@@ -1351,14 +1312,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1351
1312
  response = pipeline_response.http_response
1352
1313
 
1353
1314
  if response.status_code not in [200]:
1354
- if _stream:
1355
- await response.read() # Load the body in memory and close the socket
1356
1315
  map_error(
1357
1316
  status_code=response.status_code, response=response, error_map=error_map
1358
1317
  )
1359
1318
  raise HttpResponseError(response=response)
1360
1319
 
1361
- deserialized = self._deserialize("[object]", pipeline_response)
1320
+ deserialized = self._deserialize("[object]", pipeline_response.http_response)
1362
1321
 
1363
1322
  if cls:
1364
1323
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1379,7 +1338,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1379
1338
  :rtype: any
1380
1339
  :raises ~azure.core.exceptions.HttpResponseError:
1381
1340
  """
1382
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1341
+ error_map: MutableMapping = {
1383
1342
  401: ClientAuthenticationError,
1384
1343
  404: ResourceNotFoundError,
1385
1344
  409: ResourceExistsError,
@@ -1416,14 +1375,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1416
1375
  response = pipeline_response.http_response
1417
1376
 
1418
1377
  if response.status_code not in [200]:
1419
- if _stream:
1420
- await response.read() # Load the body in memory and close the socket
1421
1378
  map_error(
1422
1379
  status_code=response.status_code, response=response, error_map=error_map
1423
1380
  )
1424
1381
  raise HttpResponseError(response=response)
1425
1382
 
1426
- deserialized = self._deserialize("object", pipeline_response)
1383
+ deserialized = self._deserialize("object", pipeline_response.http_response)
1427
1384
 
1428
1385
  if cls:
1429
1386
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1444,7 +1401,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1444
1401
  Default value is "application/json".
1445
1402
  :paramtype content_type: str
1446
1403
  :return: list of InsertedJob
1447
- :rtype: list[~client.models.InsertedJob]
1404
+ :rtype: list[~generated.models.InsertedJob]
1448
1405
  :raises ~azure.core.exceptions.HttpResponseError:
1449
1406
  """
1450
1407
 
@@ -1462,7 +1419,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1462
1419
  Default value is "application/json".
1463
1420
  :paramtype content_type: str
1464
1421
  :return: list of InsertedJob
1465
- :rtype: list[~client.models.InsertedJob]
1422
+ :rtype: list[~generated.models.InsertedJob]
1466
1423
  :raises ~azure.core.exceptions.HttpResponseError:
1467
1424
  """
1468
1425
 
@@ -1477,10 +1434,10 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1477
1434
  :param body: Is either a [str] type or a IO[bytes] type. Required.
1478
1435
  :type body: list[str] or IO[bytes]
1479
1436
  :return: list of InsertedJob
1480
- :rtype: list[~client.models.InsertedJob]
1437
+ :rtype: list[~generated.models.InsertedJob]
1481
1438
  :raises ~azure.core.exceptions.HttpResponseError:
1482
1439
  """
1483
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1440
+ error_map: MutableMapping = {
1484
1441
  401: ClientAuthenticationError,
1485
1442
  404: ResourceNotFoundError,
1486
1443
  409: ResourceExistsError,
@@ -1523,14 +1480,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1523
1480
  response = pipeline_response.http_response
1524
1481
 
1525
1482
  if response.status_code not in [200]:
1526
- if _stream:
1527
- await response.read() # Load the body in memory and close the socket
1528
1483
  map_error(
1529
1484
  status_code=response.status_code, response=response, error_map=error_map
1530
1485
  )
1531
1486
  raise HttpResponseError(response=response)
1532
1487
 
1533
- deserialized = self._deserialize("[InsertedJob]", pipeline_response)
1488
+ deserialized = self._deserialize(
1489
+ "[InsertedJob]", pipeline_response.http_response
1490
+ )
1534
1491
 
1535
1492
  if cls:
1536
1493
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1549,7 +1506,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1549
1506
  :rtype: any
1550
1507
  :raises ~azure.core.exceptions.HttpResponseError:
1551
1508
  """
1552
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1509
+ error_map: MutableMapping = {
1553
1510
  401: ClientAuthenticationError,
1554
1511
  404: ResourceNotFoundError,
1555
1512
  409: ResourceExistsError,
@@ -1579,14 +1536,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1579
1536
  response = pipeline_response.http_response
1580
1537
 
1581
1538
  if response.status_code not in [200]:
1582
- if _stream:
1583
- await response.read() # Load the body in memory and close the socket
1584
1539
  map_error(
1585
1540
  status_code=response.status_code, response=response, error_map=error_map
1586
1541
  )
1587
1542
  raise HttpResponseError(response=response)
1588
1543
 
1589
- deserialized = self._deserialize("object", pipeline_response)
1544
+ deserialized = self._deserialize("object", pipeline_response.http_response)
1590
1545
 
1591
1546
  if cls:
1592
1547
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1605,7 +1560,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1605
1560
  :rtype: any
1606
1561
  :raises ~azure.core.exceptions.HttpResponseError:
1607
1562
  """
1608
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1563
+ error_map: MutableMapping = {
1609
1564
  401: ClientAuthenticationError,
1610
1565
  404: ResourceNotFoundError,
1611
1566
  409: ResourceExistsError,
@@ -1635,14 +1590,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1635
1590
  response = pipeline_response.http_response
1636
1591
 
1637
1592
  if response.status_code not in [200]:
1638
- if _stream:
1639
- await response.read() # Load the body in memory and close the socket
1640
1593
  map_error(
1641
1594
  status_code=response.status_code, response=response, error_map=error_map
1642
1595
  )
1643
1596
  raise HttpResponseError(response=response)
1644
1597
 
1645
- deserialized = self._deserialize("object", pipeline_response)
1598
+ deserialized = self._deserialize("object", pipeline_response.http_response)
1646
1599
 
1647
1600
  if cls:
1648
1601
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1665,7 +1618,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1665
1618
  :rtype: any
1666
1619
  :raises ~azure.core.exceptions.HttpResponseError:
1667
1620
  """
1668
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1621
+ error_map: MutableMapping = {
1669
1622
  401: ClientAuthenticationError,
1670
1623
  404: ResourceNotFoundError,
1671
1624
  409: ResourceExistsError,
@@ -1695,14 +1648,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1695
1648
  response = pipeline_response.http_response
1696
1649
 
1697
1650
  if response.status_code not in [200]:
1698
- if _stream:
1699
- await response.read() # Load the body in memory and close the socket
1700
1651
  map_error(
1701
1652
  status_code=response.status_code, response=response, error_map=error_map
1702
1653
  )
1703
1654
  raise HttpResponseError(response=response)
1704
1655
 
1705
- deserialized = self._deserialize("object", pipeline_response)
1656
+ deserialized = self._deserialize("object", pipeline_response.http_response)
1706
1657
 
1707
1658
  if cls:
1708
1659
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1720,10 +1671,10 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1720
1671
  :keyword job_ids: Required.
1721
1672
  :paramtype job_ids: list[int]
1722
1673
  :return: dict mapping str to LimitedJobStatusReturn
1723
- :rtype: dict[str, ~client.models.LimitedJobStatusReturn]
1674
+ :rtype: dict[str, ~generated.models.LimitedJobStatusReturn]
1724
1675
  :raises ~azure.core.exceptions.HttpResponseError:
1725
1676
  """
1726
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1677
+ error_map: MutableMapping = {
1727
1678
  401: ClientAuthenticationError,
1728
1679
  404: ResourceNotFoundError,
1729
1680
  409: ResourceExistsError,
@@ -1755,14 +1706,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1755
1706
  response = pipeline_response.http_response
1756
1707
 
1757
1708
  if response.status_code not in [200]:
1758
- if _stream:
1759
- await response.read() # Load the body in memory and close the socket
1760
1709
  map_error(
1761
1710
  status_code=response.status_code, response=response, error_map=error_map
1762
1711
  )
1763
1712
  raise HttpResponseError(response=response)
1764
1713
 
1765
- deserialized = self._deserialize("{LimitedJobStatusReturn}", pipeline_response)
1714
+ deserialized = self._deserialize(
1715
+ "{LimitedJobStatusReturn}", pipeline_response.http_response
1716
+ )
1766
1717
 
1767
1718
  if cls:
1768
1719
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1783,14 +1734,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1783
1734
  Set Job Status Bulk.
1784
1735
 
1785
1736
  :param body: Required.
1786
- :type body: dict[str, dict[str, ~client.models.JobStatusUpdate]]
1737
+ :type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]]
1787
1738
  :keyword force: Default value is False.
1788
1739
  :paramtype force: bool
1789
1740
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
1790
1741
  Default value is "application/json".
1791
1742
  :paramtype content_type: str
1792
1743
  :return: dict mapping str to SetJobStatusReturn
1793
- :rtype: dict[str, ~client.models.SetJobStatusReturn]
1744
+ :rtype: dict[str, ~generated.models.SetJobStatusReturn]
1794
1745
  :raises ~azure.core.exceptions.HttpResponseError:
1795
1746
  """
1796
1747
 
@@ -1815,7 +1766,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1815
1766
  Default value is "application/json".
1816
1767
  :paramtype content_type: str
1817
1768
  :return: dict mapping str to SetJobStatusReturn
1818
- :rtype: dict[str, ~client.models.SetJobStatusReturn]
1769
+ :rtype: dict[str, ~generated.models.SetJobStatusReturn]
1819
1770
  :raises ~azure.core.exceptions.HttpResponseError:
1820
1771
  """
1821
1772
 
@@ -1832,14 +1783,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1832
1783
  Set Job Status Bulk.
1833
1784
 
1834
1785
  :param body: Is either a {str: {str: JobStatusUpdate}} type or a IO[bytes] type. Required.
1835
- :type body: dict[str, dict[str, ~client.models.JobStatusUpdate]] or IO[bytes]
1786
+ :type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]] or IO[bytes]
1836
1787
  :keyword force: Default value is False.
1837
1788
  :paramtype force: bool
1838
1789
  :return: dict mapping str to SetJobStatusReturn
1839
- :rtype: dict[str, ~client.models.SetJobStatusReturn]
1790
+ :rtype: dict[str, ~generated.models.SetJobStatusReturn]
1840
1791
  :raises ~azure.core.exceptions.HttpResponseError:
1841
1792
  """
1842
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1793
+ error_map: MutableMapping = {
1843
1794
  401: ClientAuthenticationError,
1844
1795
  404: ResourceNotFoundError,
1845
1796
  409: ResourceExistsError,
@@ -1883,14 +1834,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1883
1834
  response = pipeline_response.http_response
1884
1835
 
1885
1836
  if response.status_code not in [200]:
1886
- if _stream:
1887
- await response.read() # Load the body in memory and close the socket
1888
1837
  map_error(
1889
1838
  status_code=response.status_code, response=response, error_map=error_map
1890
1839
  )
1891
1840
  raise HttpResponseError(response=response)
1892
1841
 
1893
- deserialized = self._deserialize("{SetJobStatusReturn}", pipeline_response)
1842
+ deserialized = self._deserialize(
1843
+ "{SetJobStatusReturn}", pipeline_response.http_response
1844
+ )
1894
1845
 
1895
1846
  if cls:
1896
1847
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1908,10 +1859,10 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1908
1859
  :keyword job_ids: Required.
1909
1860
  :paramtype job_ids: list[int]
1910
1861
  :return: dict mapping str to list of JobStatusReturn
1911
- :rtype: dict[str, list[~client.models.JobStatusReturn]]
1862
+ :rtype: dict[str, list[~generated.models.JobStatusReturn]]
1912
1863
  :raises ~azure.core.exceptions.HttpResponseError:
1913
1864
  """
1914
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1865
+ error_map: MutableMapping = {
1915
1866
  401: ClientAuthenticationError,
1916
1867
  404: ResourceNotFoundError,
1917
1868
  409: ResourceExistsError,
@@ -1941,14 +1892,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1941
1892
  response = pipeline_response.http_response
1942
1893
 
1943
1894
  if response.status_code not in [200]:
1944
- if _stream:
1945
- await response.read() # Load the body in memory and close the socket
1946
1895
  map_error(
1947
1896
  status_code=response.status_code, response=response, error_map=error_map
1948
1897
  )
1949
1898
  raise HttpResponseError(response=response)
1950
1899
 
1951
- deserialized = self._deserialize("{[JobStatusReturn]}", pipeline_response)
1900
+ deserialized = self._deserialize(
1901
+ "{[JobStatusReturn]}", pipeline_response.http_response
1902
+ )
1952
1903
 
1953
1904
  if cls:
1954
1905
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1967,7 +1918,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1967
1918
  :rtype: any
1968
1919
  :raises ~azure.core.exceptions.HttpResponseError:
1969
1920
  """
1970
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1921
+ error_map: MutableMapping = {
1971
1922
  401: ClientAuthenticationError,
1972
1923
  404: ResourceNotFoundError,
1973
1924
  409: ResourceExistsError,
@@ -1997,14 +1948,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1997
1948
  response = pipeline_response.http_response
1998
1949
 
1999
1950
  if response.status_code not in [200]:
2000
- if _stream:
2001
- await response.read() # Load the body in memory and close the socket
2002
1951
  map_error(
2003
1952
  status_code=response.status_code, response=response, error_map=error_map
2004
1953
  )
2005
1954
  raise HttpResponseError(response=response)
2006
1955
 
2007
- deserialized = self._deserialize("object", pipeline_response)
1956
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2008
1957
 
2009
1958
  if cls:
2010
1959
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2023,7 +1972,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2023
1972
  :rtype: any
2024
1973
  :raises ~azure.core.exceptions.HttpResponseError:
2025
1974
  """
2026
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1975
+ error_map: MutableMapping = {
2027
1976
  401: ClientAuthenticationError,
2028
1977
  404: ResourceNotFoundError,
2029
1978
  409: ResourceExistsError,
@@ -2053,14 +2002,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2053
2002
  response = pipeline_response.http_response
2054
2003
 
2055
2004
  if response.status_code not in [200]:
2056
- if _stream:
2057
- await response.read() # Load the body in memory and close the socket
2058
2005
  map_error(
2059
2006
  status_code=response.status_code, response=response, error_map=error_map
2060
2007
  )
2061
2008
  raise HttpResponseError(response=response)
2062
2009
 
2063
- deserialized = self._deserialize("object", pipeline_response)
2010
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2064
2011
 
2065
2012
  if cls:
2066
2013
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2084,7 +2031,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2084
2031
  **TODO: Add more docs**.
2085
2032
 
2086
2033
  :param body: Default value is None.
2087
- :type body: ~client.models.JobSearchParams
2034
+ :type body: ~generated.models.JobSearchParams
2088
2035
  :keyword page: Default value is 1.
2089
2036
  :paramtype page: int
2090
2037
  :keyword per_page: Default value is 100.
@@ -2143,7 +2090,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2143
2090
  **TODO: Add more docs**.
2144
2091
 
2145
2092
  :param body: Is either a JobSearchParams type or a IO[bytes] type. Default value is None.
2146
- :type body: ~client.models.JobSearchParams or IO[bytes]
2093
+ :type body: ~generated.models.JobSearchParams or IO[bytes]
2147
2094
  :keyword page: Default value is 1.
2148
2095
  :paramtype page: int
2149
2096
  :keyword per_page: Default value is 100.
@@ -2152,7 +2099,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2152
2099
  :rtype: list[JSON]
2153
2100
  :raises ~azure.core.exceptions.HttpResponseError:
2154
2101
  """
2155
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2102
+ error_map: MutableMapping = {
2156
2103
  401: ClientAuthenticationError,
2157
2104
  404: ResourceNotFoundError,
2158
2105
  409: ResourceExistsError,
@@ -2200,23 +2147,18 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2200
2147
  response = pipeline_response.http_response
2201
2148
 
2202
2149
  if response.status_code not in [200, 206]:
2203
- if _stream:
2204
- await response.read() # Load the body in memory and close the socket
2205
2150
  map_error(
2206
2151
  status_code=response.status_code, response=response, error_map=error_map
2207
2152
  )
2208
2153
  raise HttpResponseError(response=response)
2209
2154
 
2210
2155
  response_headers = {}
2211
- if response.status_code == 200:
2212
- deserialized = self._deserialize("[object]", pipeline_response)
2213
-
2214
2156
  if response.status_code == 206:
2215
2157
  response_headers["Content-Range"] = self._deserialize(
2216
2158
  "str", response.headers.get("Content-Range")
2217
2159
  )
2218
2160
 
2219
- deserialized = self._deserialize("[object]", pipeline_response)
2161
+ deserialized = self._deserialize("[object]", pipeline_response.http_response)
2220
2162
 
2221
2163
  if cls:
2222
2164
  return cls(pipeline_response, deserialized, response_headers) # type: ignore
@@ -2236,7 +2178,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2236
2178
  Show information suitable for plotting.
2237
2179
 
2238
2180
  :param body: Required.
2239
- :type body: ~client.models.JobSummaryParams
2181
+ :type body: ~generated.models.JobSummaryParams
2240
2182
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2241
2183
  Default value is "application/json".
2242
2184
  :paramtype content_type: str
@@ -2272,12 +2214,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2272
2214
  Show information suitable for plotting.
2273
2215
 
2274
2216
  :param body: Is either a JobSummaryParams type or a IO[bytes] type. Required.
2275
- :type body: ~client.models.JobSummaryParams or IO[bytes]
2217
+ :type body: ~generated.models.JobSummaryParams or IO[bytes]
2276
2218
  :return: any
2277
2219
  :rtype: any
2278
2220
  :raises ~azure.core.exceptions.HttpResponseError:
2279
2221
  """
2280
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2222
+ error_map: MutableMapping = {
2281
2223
  401: ClientAuthenticationError,
2282
2224
  404: ResourceNotFoundError,
2283
2225
  409: ResourceExistsError,
@@ -2320,14 +2262,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2320
2262
  response = pipeline_response.http_response
2321
2263
 
2322
2264
  if response.status_code not in [200]:
2323
- if _stream:
2324
- await response.read() # Load the body in memory and close the socket
2325
2265
  map_error(
2326
2266
  status_code=response.status_code, response=response, error_map=error_map
2327
2267
  )
2328
2268
  raise HttpResponseError(response=response)
2329
2269
 
2330
- deserialized = self._deserialize("object", pipeline_response)
2270
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2331
2271
 
2332
2272
  if cls:
2333
2273
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2346,7 +2286,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2346
2286
  :rtype: any
2347
2287
  :raises ~azure.core.exceptions.HttpResponseError:
2348
2288
  """
2349
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2289
+ error_map: MutableMapping = {
2350
2290
  401: ClientAuthenticationError,
2351
2291
  404: ResourceNotFoundError,
2352
2292
  409: ResourceExistsError,
@@ -2376,14 +2316,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2376
2316
  response = pipeline_response.http_response
2377
2317
 
2378
2318
  if response.status_code not in [200]:
2379
- if _stream:
2380
- await response.read() # Load the body in memory and close the socket
2381
2319
  map_error(
2382
2320
  status_code=response.status_code, response=response, error_map=error_map
2383
2321
  )
2384
2322
  raise HttpResponseError(response=response)
2385
2323
 
2386
- deserialized = self._deserialize("object", pipeline_response)
2324
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2387
2325
 
2388
2326
  if cls:
2389
2327
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2402,7 +2340,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2402
2340
  :rtype: any
2403
2341
  :raises ~azure.core.exceptions.HttpResponseError:
2404
2342
  """
2405
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2343
+ error_map: MutableMapping = {
2406
2344
  401: ClientAuthenticationError,
2407
2345
  404: ResourceNotFoundError,
2408
2346
  409: ResourceExistsError,
@@ -2432,14 +2370,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2432
2370
  response = pipeline_response.http_response
2433
2371
 
2434
2372
  if response.status_code not in [200]:
2435
- if _stream:
2436
- await response.read() # Load the body in memory and close the socket
2437
2373
  map_error(
2438
2374
  status_code=response.status_code, response=response, error_map=error_map
2439
2375
  )
2440
2376
  raise HttpResponseError(response=response)
2441
2377
 
2442
- deserialized = self._deserialize("object", pipeline_response)
2378
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2443
2379
 
2444
2380
  if cls:
2445
2381
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2464,7 +2400,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2464
2400
  :rtype: any
2465
2401
  :raises ~azure.core.exceptions.HttpResponseError:
2466
2402
  """
2467
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2403
+ error_map: MutableMapping = {
2468
2404
  401: ClientAuthenticationError,
2469
2405
  404: ResourceNotFoundError,
2470
2406
  409: ResourceExistsError,
@@ -2502,14 +2438,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2502
2438
  response = pipeline_response.http_response
2503
2439
 
2504
2440
  if response.status_code not in [200]:
2505
- if _stream:
2506
- await response.read() # Load the body in memory and close the socket
2507
2441
  map_error(
2508
2442
  status_code=response.status_code, response=response, error_map=error_map
2509
2443
  )
2510
2444
  raise HttpResponseError(response=response)
2511
2445
 
2512
- deserialized = self._deserialize("object", pipeline_response)
2446
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2513
2447
 
2514
2448
  if cls:
2515
2449
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2528,7 +2462,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2528
2462
  :rtype: any
2529
2463
  :raises ~azure.core.exceptions.HttpResponseError:
2530
2464
  """
2531
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2465
+ error_map: MutableMapping = {
2532
2466
  401: ClientAuthenticationError,
2533
2467
  404: ResourceNotFoundError,
2534
2468
  409: ResourceExistsError,
@@ -2558,14 +2492,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2558
2492
  response = pipeline_response.http_response
2559
2493
 
2560
2494
  if response.status_code not in [200]:
2561
- if _stream:
2562
- await response.read() # Load the body in memory and close the socket
2563
2495
  map_error(
2564
2496
  status_code=response.status_code, response=response, error_map=error_map
2565
2497
  )
2566
2498
  raise HttpResponseError(response=response)
2567
2499
 
2568
- deserialized = self._deserialize("object", pipeline_response)
2500
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2569
2501
 
2570
2502
  if cls:
2571
2503
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2588,7 +2520,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2588
2520
  :rtype: any
2589
2521
  :raises ~azure.core.exceptions.HttpResponseError:
2590
2522
  """
2591
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2523
+ error_map: MutableMapping = {
2592
2524
  401: ClientAuthenticationError,
2593
2525
  404: ResourceNotFoundError,
2594
2526
  409: ResourceExistsError,
@@ -2618,14 +2550,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2618
2550
  response = pipeline_response.http_response
2619
2551
 
2620
2552
  if response.status_code not in [200]:
2621
- if _stream:
2622
- await response.read() # Load the body in memory and close the socket
2623
2553
  map_error(
2624
2554
  status_code=response.status_code, response=response, error_map=error_map
2625
2555
  )
2626
2556
  raise HttpResponseError(response=response)
2627
2557
 
2628
- deserialized = self._deserialize("object", pipeline_response)
2558
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2629
2559
 
2630
2560
  if cls:
2631
2561
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2643,10 +2573,10 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2643
2573
  :param job_id: Required.
2644
2574
  :type job_id: int
2645
2575
  :return: dict mapping str to LimitedJobStatusReturn
2646
- :rtype: dict[str, ~client.models.LimitedJobStatusReturn]
2576
+ :rtype: dict[str, ~generated.models.LimitedJobStatusReturn]
2647
2577
  :raises ~azure.core.exceptions.HttpResponseError:
2648
2578
  """
2649
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2579
+ error_map: MutableMapping = {
2650
2580
  401: ClientAuthenticationError,
2651
2581
  404: ResourceNotFoundError,
2652
2582
  409: ResourceExistsError,
@@ -2678,14 +2608,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2678
2608
  response = pipeline_response.http_response
2679
2609
 
2680
2610
  if response.status_code not in [200]:
2681
- if _stream:
2682
- await response.read() # Load the body in memory and close the socket
2683
2611
  map_error(
2684
2612
  status_code=response.status_code, response=response, error_map=error_map
2685
2613
  )
2686
2614
  raise HttpResponseError(response=response)
2687
2615
 
2688
- deserialized = self._deserialize("{LimitedJobStatusReturn}", pipeline_response)
2616
+ deserialized = self._deserialize(
2617
+ "{LimitedJobStatusReturn}", pipeline_response.http_response
2618
+ )
2689
2619
 
2690
2620
  if cls:
2691
2621
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2709,14 +2639,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2709
2639
  :param job_id: Required.
2710
2640
  :type job_id: int
2711
2641
  :param body: Required.
2712
- :type body: dict[str, ~client.models.JobStatusUpdate]
2642
+ :type body: dict[str, ~generated.models.JobStatusUpdate]
2713
2643
  :keyword force: Default value is False.
2714
2644
  :paramtype force: bool
2715
2645
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2716
2646
  Default value is "application/json".
2717
2647
  :paramtype content_type: str
2718
2648
  :return: dict mapping str to SetJobStatusReturn
2719
- :rtype: dict[str, ~client.models.SetJobStatusReturn]
2649
+ :rtype: dict[str, ~generated.models.SetJobStatusReturn]
2720
2650
  :raises ~azure.core.exceptions.HttpResponseError:
2721
2651
  """
2722
2652
 
@@ -2744,7 +2674,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2744
2674
  Default value is "application/json".
2745
2675
  :paramtype content_type: str
2746
2676
  :return: dict mapping str to SetJobStatusReturn
2747
- :rtype: dict[str, ~client.models.SetJobStatusReturn]
2677
+ :rtype: dict[str, ~generated.models.SetJobStatusReturn]
2748
2678
  :raises ~azure.core.exceptions.HttpResponseError:
2749
2679
  """
2750
2680
 
@@ -2764,14 +2694,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2764
2694
  :param job_id: Required.
2765
2695
  :type job_id: int
2766
2696
  :param body: Is either a {str: JobStatusUpdate} type or a IO[bytes] type. Required.
2767
- :type body: dict[str, ~client.models.JobStatusUpdate] or IO[bytes]
2697
+ :type body: dict[str, ~generated.models.JobStatusUpdate] or IO[bytes]
2768
2698
  :keyword force: Default value is False.
2769
2699
  :paramtype force: bool
2770
2700
  :return: dict mapping str to SetJobStatusReturn
2771
- :rtype: dict[str, ~client.models.SetJobStatusReturn]
2701
+ :rtype: dict[str, ~generated.models.SetJobStatusReturn]
2772
2702
  :raises ~azure.core.exceptions.HttpResponseError:
2773
2703
  """
2774
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2704
+ error_map: MutableMapping = {
2775
2705
  401: ClientAuthenticationError,
2776
2706
  404: ResourceNotFoundError,
2777
2707
  409: ResourceExistsError,
@@ -2816,14 +2746,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2816
2746
  response = pipeline_response.http_response
2817
2747
 
2818
2748
  if response.status_code not in [200]:
2819
- if _stream:
2820
- await response.read() # Load the body in memory and close the socket
2821
2749
  map_error(
2822
2750
  status_code=response.status_code, response=response, error_map=error_map
2823
2751
  )
2824
2752
  raise HttpResponseError(response=response)
2825
2753
 
2826
- deserialized = self._deserialize("{SetJobStatusReturn}", pipeline_response)
2754
+ deserialized = self._deserialize(
2755
+ "{SetJobStatusReturn}", pipeline_response.http_response
2756
+ )
2827
2757
 
2828
2758
  if cls:
2829
2759
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2841,10 +2771,10 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2841
2771
  :param job_id: Required.
2842
2772
  :type job_id: int
2843
2773
  :return: dict mapping str to list of JobStatusReturn
2844
- :rtype: dict[str, list[~client.models.JobStatusReturn]]
2774
+ :rtype: dict[str, list[~generated.models.JobStatusReturn]]
2845
2775
  :raises ~azure.core.exceptions.HttpResponseError:
2846
2776
  """
2847
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2777
+ error_map: MutableMapping = {
2848
2778
  401: ClientAuthenticationError,
2849
2779
  404: ResourceNotFoundError,
2850
2780
  409: ResourceExistsError,
@@ -2874,14 +2804,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2874
2804
  response = pipeline_response.http_response
2875
2805
 
2876
2806
  if response.status_code not in [200]:
2877
- if _stream:
2878
- await response.read() # Load the body in memory and close the socket
2879
2807
  map_error(
2880
2808
  status_code=response.status_code, response=response, error_map=error_map
2881
2809
  )
2882
2810
  raise HttpResponseError(response=response)
2883
2811
 
2884
- deserialized = self._deserialize("{[JobStatusReturn]}", pipeline_response)
2812
+ deserialized = self._deserialize(
2813
+ "{[JobStatusReturn]}", pipeline_response.http_response
2814
+ )
2885
2815
 
2886
2816
  if cls:
2887
2817
  return cls(pipeline_response, deserialized, {}) # type: ignore