diracx-client 0.0.1a17__py3-none-any.whl → 0.0.1a19__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.
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} +301 -151
  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 +1 -1
  16. diracx/client/{aio → generated/aio}/operations/_operations.py +402 -385
  17. diracx/client/{models → generated/models}/__init__.py +3 -1
  18. diracx/client/{models → generated/models}/_enums.py +2 -2
  19. diracx/client/{models → generated/models}/_models.py +84 -43
  20. diracx/client/{operations → generated/operations}/__init__.py +1 -1
  21. diracx/client/{operations → generated/operations}/_operations.py +402 -385
  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} +10 -19
  27. diracx/client/{_patch.py → patches/utils.py} +98 -121
  28. {diracx_client-0.0.1a17.dist-info → diracx_client-0.0.1a19.dist-info}/METADATA +4 -4
  29. diracx_client-0.0.1a19.dist-info/RECORD +36 -0
  30. {diracx_client-0.0.1a17.dist-info → diracx_client-0.0.1a19.dist-info}/WHEEL +1 -1
  31. diracx_client-0.0.1a19.dist-info/entry_points.txt +3 -0
  32. diracx_client-0.0.1a17.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.1a17.dist-info → diracx_client-0.0.1a19.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  # pylint: disable=too-many-lines,too-many-statements
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.0, generator: @autorest/python@6.23.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
@@ -94,7 +94,7 @@ class WellKnownOperations:
94
94
  **DO NOT** instantiate this class directly.
95
95
 
96
96
  Instead, you should access the following operations through
97
- :class:`~client.aio.Dirac`'s
97
+ :class:`~generated.aio.Dirac`'s
98
98
  :attr:`well_known` attribute.
99
99
  """
100
100
 
@@ -119,12 +119,14 @@ class WellKnownOperations:
119
119
  :rtype: any
120
120
  :raises ~azure.core.exceptions.HttpResponseError:
121
121
  """
122
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
123
- 401: ClientAuthenticationError,
124
- 404: ResourceNotFoundError,
125
- 409: ResourceExistsError,
126
- 304: ResourceNotModifiedError,
127
- }
122
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
123
+ { # pylint: disable=unsubscriptable-object
124
+ 401: ClientAuthenticationError,
125
+ 404: ResourceNotFoundError,
126
+ 409: ResourceExistsError,
127
+ 304: ResourceNotModifiedError,
128
+ }
129
+ )
128
130
  error_map.update(kwargs.pop("error_map", {}) or {})
129
131
 
130
132
  _headers = kwargs.pop("headers", {}) or {}
@@ -148,14 +150,12 @@ class WellKnownOperations:
148
150
  response = pipeline_response.http_response
149
151
 
150
152
  if response.status_code not in [200]:
151
- if _stream:
152
- await response.read() # Load the body in memory and close the socket
153
153
  map_error(
154
154
  status_code=response.status_code, response=response, error_map=error_map
155
155
  )
156
156
  raise HttpResponseError(response=response)
157
157
 
158
- deserialized = self._deserialize("object", pipeline_response)
158
+ deserialized = self._deserialize("object", pipeline_response.http_response)
159
159
 
160
160
  if cls:
161
161
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -169,15 +169,17 @@ class WellKnownOperations:
169
169
  Get metadata about the dirac installation.
170
170
 
171
171
  :return: Metadata
172
- :rtype: ~client.models.Metadata
172
+ :rtype: ~generated.models.Metadata
173
173
  :raises ~azure.core.exceptions.HttpResponseError:
174
174
  """
175
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
176
- 401: ClientAuthenticationError,
177
- 404: ResourceNotFoundError,
178
- 409: ResourceExistsError,
179
- 304: ResourceNotModifiedError,
180
- }
175
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
176
+ { # pylint: disable=unsubscriptable-object
177
+ 401: ClientAuthenticationError,
178
+ 404: ResourceNotFoundError,
179
+ 409: ResourceExistsError,
180
+ 304: ResourceNotModifiedError,
181
+ }
182
+ )
181
183
  error_map.update(kwargs.pop("error_map", {}) or {})
182
184
 
183
185
  _headers = kwargs.pop("headers", {}) or {}
@@ -201,14 +203,12 @@ class WellKnownOperations:
201
203
  response = pipeline_response.http_response
202
204
 
203
205
  if response.status_code not in [200]:
204
- if _stream:
205
- await response.read() # Load the body in memory and close the socket
206
206
  map_error(
207
207
  status_code=response.status_code, response=response, error_map=error_map
208
208
  )
209
209
  raise HttpResponseError(response=response)
210
210
 
211
- deserialized = self._deserialize("Metadata", pipeline_response)
211
+ deserialized = self._deserialize("Metadata", pipeline_response.http_response)
212
212
 
213
213
  if cls:
214
214
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -222,7 +222,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
222
222
  **DO NOT** instantiate this class directly.
223
223
 
224
224
  Instead, you should access the following operations through
225
- :class:`~client.aio.Dirac`'s
225
+ :class:`~generated.aio.Dirac`'s
226
226
  :attr:`auth` attribute.
227
227
  """
228
228
 
@@ -253,7 +253,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
253
253
  Initiate the device flow against DIRAC authorization Server.
254
254
  Scope must have exactly up to one ``group`` (otherwise default) and
255
255
  one or more ``property`` scope.
256
- If no property, then get default one
256
+ If no property, then get default one.
257
257
 
258
258
  Offers the user to go with the browser to
259
259
  ``auth/<vo>/device?user_code=XYZ``.
@@ -263,15 +263,17 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
263
263
  :keyword scope: Required.
264
264
  :paramtype scope: str
265
265
  :return: InitiateDeviceFlowResponse
266
- :rtype: ~client.models.InitiateDeviceFlowResponse
266
+ :rtype: ~generated.models.InitiateDeviceFlowResponse
267
267
  :raises ~azure.core.exceptions.HttpResponseError:
268
268
  """
269
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
270
- 401: ClientAuthenticationError,
271
- 404: ResourceNotFoundError,
272
- 409: ResourceExistsError,
273
- 304: ResourceNotModifiedError,
274
- }
269
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
270
+ { # pylint: disable=unsubscriptable-object
271
+ 401: ClientAuthenticationError,
272
+ 404: ResourceNotFoundError,
273
+ 409: ResourceExistsError,
274
+ 304: ResourceNotModifiedError,
275
+ }
276
+ )
275
277
  error_map.update(kwargs.pop("error_map", {}) or {})
276
278
 
277
279
  _headers = kwargs.pop("headers", {}) or {}
@@ -297,15 +299,13 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
297
299
  response = pipeline_response.http_response
298
300
 
299
301
  if response.status_code not in [200]:
300
- if _stream:
301
- await response.read() # Load the body in memory and close the socket
302
302
  map_error(
303
303
  status_code=response.status_code, response=response, error_map=error_map
304
304
  )
305
305
  raise HttpResponseError(response=response)
306
306
 
307
307
  deserialized = self._deserialize(
308
- "InitiateDeviceFlowResponse", pipeline_response
308
+ "InitiateDeviceFlowResponse", pipeline_response.http_response
309
309
  )
310
310
 
311
311
  if cls:
@@ -332,12 +332,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
332
332
  :rtype: any
333
333
  :raises ~azure.core.exceptions.HttpResponseError:
334
334
  """
335
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
336
- 401: ClientAuthenticationError,
337
- 404: ResourceNotFoundError,
338
- 409: ResourceExistsError,
339
- 304: ResourceNotModifiedError,
340
- }
335
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
336
+ { # pylint: disable=unsubscriptable-object
337
+ 401: ClientAuthenticationError,
338
+ 404: ResourceNotFoundError,
339
+ 409: ResourceExistsError,
340
+ 304: ResourceNotModifiedError,
341
+ }
342
+ )
341
343
  error_map.update(kwargs.pop("error_map", {}) or {})
342
344
 
343
345
  _headers = kwargs.pop("headers", {}) or {}
@@ -362,14 +364,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
362
364
  response = pipeline_response.http_response
363
365
 
364
366
  if response.status_code not in [200]:
365
- if _stream:
366
- await response.read() # Load the body in memory and close the socket
367
367
  map_error(
368
368
  status_code=response.status_code, response=response, error_map=error_map
369
369
  )
370
370
  raise HttpResponseError(response=response)
371
371
 
372
- deserialized = self._deserialize("object", pipeline_response)
372
+ deserialized = self._deserialize("object", pipeline_response.http_response)
373
373
 
374
374
  if cls:
375
375
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -394,12 +394,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
394
394
  :rtype: any
395
395
  :raises ~azure.core.exceptions.HttpResponseError:
396
396
  """
397
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
398
- 401: ClientAuthenticationError,
399
- 404: ResourceNotFoundError,
400
- 409: ResourceExistsError,
401
- 304: ResourceNotModifiedError,
402
- }
397
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
398
+ { # pylint: disable=unsubscriptable-object
399
+ 401: ClientAuthenticationError,
400
+ 404: ResourceNotFoundError,
401
+ 409: ResourceExistsError,
402
+ 304: ResourceNotModifiedError,
403
+ }
404
+ )
403
405
  error_map.update(kwargs.pop("error_map", {}) or {})
404
406
 
405
407
  _headers = kwargs.pop("headers", {}) or {}
@@ -425,14 +427,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
425
427
  response = pipeline_response.http_response
426
428
 
427
429
  if response.status_code not in [200]:
428
- if _stream:
429
- await response.read() # Load the body in memory and close the socket
430
430
  map_error(
431
431
  status_code=response.status_code, response=response, error_map=error_map
432
432
  )
433
433
  raise HttpResponseError(response=response)
434
434
 
435
- deserialized = self._deserialize("object", pipeline_response)
435
+ deserialized = self._deserialize("object", pipeline_response.http_response)
436
436
 
437
437
  if cls:
438
438
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -449,12 +449,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
449
449
  :rtype: any
450
450
  :raises ~azure.core.exceptions.HttpResponseError:
451
451
  """
452
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
453
- 401: ClientAuthenticationError,
454
- 404: ResourceNotFoundError,
455
- 409: ResourceExistsError,
456
- 304: ResourceNotModifiedError,
457
- }
452
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
453
+ { # pylint: disable=unsubscriptable-object
454
+ 401: ClientAuthenticationError,
455
+ 404: ResourceNotFoundError,
456
+ 409: ResourceExistsError,
457
+ 304: ResourceNotModifiedError,
458
+ }
459
+ )
458
460
  error_map.update(kwargs.pop("error_map", {}) or {})
459
461
 
460
462
  _headers = kwargs.pop("headers", {}) or {}
@@ -478,14 +480,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
478
480
  response = pipeline_response.http_response
479
481
 
480
482
  if response.status_code not in [200]:
481
- if _stream:
482
- await response.read() # Load the body in memory and close the socket
483
483
  map_error(
484
484
  status_code=response.status_code, response=response, error_map=error_map
485
485
  )
486
486
  raise HttpResponseError(response=response)
487
487
 
488
- deserialized = self._deserialize("object", pipeline_response)
488
+ deserialized = self._deserialize("object", pipeline_response.http_response)
489
489
 
490
490
  if cls:
491
491
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -503,12 +503,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
503
503
  :rtype: list[any]
504
504
  :raises ~azure.core.exceptions.HttpResponseError:
505
505
  """
506
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
507
- 401: ClientAuthenticationError,
508
- 404: ResourceNotFoundError,
509
- 409: ResourceExistsError,
510
- 304: ResourceNotModifiedError,
511
- }
506
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
507
+ { # pylint: disable=unsubscriptable-object
508
+ 401: ClientAuthenticationError,
509
+ 404: ResourceNotFoundError,
510
+ 409: ResourceExistsError,
511
+ 304: ResourceNotModifiedError,
512
+ }
513
+ )
512
514
  error_map.update(kwargs.pop("error_map", {}) or {})
513
515
 
514
516
  _headers = kwargs.pop("headers", {}) or {}
@@ -532,14 +534,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
532
534
  response = pipeline_response.http_response
533
535
 
534
536
  if response.status_code not in [200]:
535
- if _stream:
536
- await response.read() # Load the body in memory and close the socket
537
537
  map_error(
538
538
  status_code=response.status_code, response=response, error_map=error_map
539
539
  )
540
540
  raise HttpResponseError(response=response)
541
541
 
542
- deserialized = self._deserialize("[object]", pipeline_response)
542
+ deserialized = self._deserialize("[object]", pipeline_response.http_response)
543
543
 
544
544
  if cls:
545
545
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -559,12 +559,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
559
559
  :rtype: str
560
560
  :raises ~azure.core.exceptions.HttpResponseError:
561
561
  """
562
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
563
- 401: ClientAuthenticationError,
564
- 404: ResourceNotFoundError,
565
- 409: ResourceExistsError,
566
- 304: ResourceNotModifiedError,
567
- }
562
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
563
+ { # pylint: disable=unsubscriptable-object
564
+ 401: ClientAuthenticationError,
565
+ 404: ResourceNotFoundError,
566
+ 409: ResourceExistsError,
567
+ 304: ResourceNotModifiedError,
568
+ }
569
+ )
568
570
  error_map.update(kwargs.pop("error_map", {}) or {})
569
571
 
570
572
  _headers = kwargs.pop("headers", {}) or {}
@@ -589,14 +591,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
589
591
  response = pipeline_response.http_response
590
592
 
591
593
  if response.status_code not in [200]:
592
- if _stream:
593
- await response.read() # Load the body in memory and close the socket
594
594
  map_error(
595
595
  status_code=response.status_code, response=response, error_map=error_map
596
596
  )
597
597
  raise HttpResponseError(response=response)
598
598
 
599
- deserialized = self._deserialize("str", pipeline_response)
599
+ deserialized = self._deserialize("str", pipeline_response.http_response)
600
600
 
601
601
  if cls:
602
602
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -610,15 +610,17 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
610
610
  Get information about the user's identity.
611
611
 
612
612
  :return: UserInfoResponse
613
- :rtype: ~client.models.UserInfoResponse
613
+ :rtype: ~generated.models.UserInfoResponse
614
614
  :raises ~azure.core.exceptions.HttpResponseError:
615
615
  """
616
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
617
- 401: ClientAuthenticationError,
618
- 404: ResourceNotFoundError,
619
- 409: ResourceExistsError,
620
- 304: ResourceNotModifiedError,
621
- }
616
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
617
+ { # pylint: disable=unsubscriptable-object
618
+ 401: ClientAuthenticationError,
619
+ 404: ResourceNotFoundError,
620
+ 409: ResourceExistsError,
621
+ 304: ResourceNotModifiedError,
622
+ }
623
+ )
622
624
  error_map.update(kwargs.pop("error_map", {}) or {})
623
625
 
624
626
  _headers = kwargs.pop("headers", {}) or {}
@@ -642,14 +644,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
642
644
  response = pipeline_response.http_response
643
645
 
644
646
  if response.status_code not in [200]:
645
- if _stream:
646
- await response.read() # Load the body in memory and close the socket
647
647
  map_error(
648
648
  status_code=response.status_code, response=response, error_map=error_map
649
649
  )
650
650
  raise HttpResponseError(response=response)
651
651
 
652
- deserialized = self._deserialize("UserInfoResponse", pipeline_response)
652
+ deserialized = self._deserialize(
653
+ "UserInfoResponse", pipeline_response.http_response
654
+ )
653
655
 
654
656
  if cls:
655
657
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -680,11 +682,11 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
680
682
  user authorize flow.
681
683
 
682
684
  :keyword response_type: "code" Required.
683
- :paramtype response_type: str or ~client.models.Enum0
685
+ :paramtype response_type: str or ~generated.models.Enum0
684
686
  :keyword code_challenge: Required.
685
687
  :paramtype code_challenge: str
686
688
  :keyword code_challenge_method: "S256" Required.
687
- :paramtype code_challenge_method: str or ~client.models.Enum1
689
+ :paramtype code_challenge_method: str or ~generated.models.Enum1
688
690
  :keyword client_id: Required.
689
691
  :paramtype client_id: str
690
692
  :keyword redirect_uri: Required.
@@ -697,12 +699,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
697
699
  :rtype: any
698
700
  :raises ~azure.core.exceptions.HttpResponseError:
699
701
  """
700
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
701
- 401: ClientAuthenticationError,
702
- 404: ResourceNotFoundError,
703
- 409: ResourceExistsError,
704
- 304: ResourceNotModifiedError,
705
- }
702
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
703
+ { # pylint: disable=unsubscriptable-object
704
+ 401: ClientAuthenticationError,
705
+ 404: ResourceNotFoundError,
706
+ 409: ResourceExistsError,
707
+ 304: ResourceNotModifiedError,
708
+ }
709
+ )
706
710
  error_map.update(kwargs.pop("error_map", {}) or {})
707
711
 
708
712
  _headers = kwargs.pop("headers", {}) or {}
@@ -733,14 +737,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
733
737
  response = pipeline_response.http_response
734
738
 
735
739
  if response.status_code not in [200]:
736
- if _stream:
737
- await response.read() # Load the body in memory and close the socket
738
740
  map_error(
739
741
  status_code=response.status_code, response=response, error_map=error_map
740
742
  )
741
743
  raise HttpResponseError(response=response)
742
744
 
743
- deserialized = self._deserialize("object", pipeline_response)
745
+ deserialized = self._deserialize("object", pipeline_response.http_response)
744
746
 
745
747
  if cls:
746
748
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -769,12 +771,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
769
771
  :rtype: any
770
772
  :raises ~azure.core.exceptions.HttpResponseError:
771
773
  """
772
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
773
- 401: ClientAuthenticationError,
774
- 404: ResourceNotFoundError,
775
- 409: ResourceExistsError,
776
- 304: ResourceNotModifiedError,
777
- }
774
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
775
+ { # pylint: disable=unsubscriptable-object
776
+ 401: ClientAuthenticationError,
777
+ 404: ResourceNotFoundError,
778
+ 409: ResourceExistsError,
779
+ 304: ResourceNotModifiedError,
780
+ }
781
+ )
778
782
  error_map.update(kwargs.pop("error_map", {}) or {})
779
783
 
780
784
  _headers = kwargs.pop("headers", {}) or {}
@@ -800,14 +804,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
800
804
  response = pipeline_response.http_response
801
805
 
802
806
  if response.status_code not in [200]:
803
- if _stream:
804
- await response.read() # Load the body in memory and close the socket
805
807
  map_error(
806
808
  status_code=response.status_code, response=response, error_map=error_map
807
809
  )
808
810
  raise HttpResponseError(response=response)
809
811
 
810
- deserialized = self._deserialize("object", pipeline_response)
812
+ deserialized = self._deserialize("object", pipeline_response.http_response)
811
813
 
812
814
  if cls:
813
815
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -821,7 +823,7 @@ class ConfigOperations:
821
823
  **DO NOT** instantiate this class directly.
822
824
 
823
825
  Instead, you should access the following operations through
824
- :class:`~client.aio.Dirac`'s
826
+ :class:`~generated.aio.Dirac`'s
825
827
  :attr:`config` attribute.
826
828
  """
827
829
 
@@ -865,12 +867,14 @@ class ConfigOperations:
865
867
  :rtype: any
866
868
  :raises ~azure.core.exceptions.HttpResponseError:
867
869
  """
868
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
869
- 401: ClientAuthenticationError,
870
- 404: ResourceNotFoundError,
871
- 409: ResourceExistsError,
872
- 304: ResourceNotModifiedError,
873
- }
870
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
871
+ { # pylint: disable=unsubscriptable-object
872
+ 401: ClientAuthenticationError,
873
+ 404: ResourceNotFoundError,
874
+ 409: ResourceExistsError,
875
+ 304: ResourceNotModifiedError,
876
+ }
877
+ )
874
878
  if match_condition == MatchConditions.IfNotModified:
875
879
  error_map[412] = ResourceModifiedError
876
880
  elif match_condition == MatchConditions.IfPresent:
@@ -903,14 +907,12 @@ class ConfigOperations:
903
907
  response = pipeline_response.http_response
904
908
 
905
909
  if response.status_code not in [200]:
906
- if _stream:
907
- await response.read() # Load the body in memory and close the socket
908
910
  map_error(
909
911
  status_code=response.status_code, response=response, error_map=error_map
910
912
  )
911
913
  raise HttpResponseError(response=response)
912
914
 
913
- deserialized = self._deserialize("object", pipeline_response)
915
+ deserialized = self._deserialize("object", pipeline_response.http_response)
914
916
 
915
917
  if cls:
916
918
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -924,7 +926,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
924
926
  **DO NOT** instantiate this class directly.
925
927
 
926
928
  Instead, you should access the following operations through
927
- :class:`~client.aio.Dirac`'s
929
+ :class:`~generated.aio.Dirac`'s
928
930
  :attr:`jobs` attribute.
929
931
  """
930
932
 
@@ -958,12 +960,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
958
960
  should be used to upload the sandbox to the storage backend.
959
961
 
960
962
  :param body: Required.
961
- :type body: ~client.models.SandboxInfo
963
+ :type body: ~generated.models.SandboxInfo
962
964
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
963
965
  Default value is "application/json".
964
966
  :paramtype content_type: str
965
967
  :return: SandboxUploadResponse
966
- :rtype: ~client.models.SandboxUploadResponse
968
+ :rtype: ~generated.models.SandboxUploadResponse
967
969
  :raises ~azure.core.exceptions.HttpResponseError:
968
970
  """
969
971
 
@@ -987,7 +989,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
987
989
  Default value is "application/json".
988
990
  :paramtype content_type: str
989
991
  :return: SandboxUploadResponse
990
- :rtype: ~client.models.SandboxUploadResponse
992
+ :rtype: ~generated.models.SandboxUploadResponse
991
993
  :raises ~azure.core.exceptions.HttpResponseError:
992
994
  """
993
995
 
@@ -1006,17 +1008,19 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1006
1008
  should be used to upload the sandbox to the storage backend.
1007
1009
 
1008
1010
  :param body: Is either a SandboxInfo type or a IO[bytes] type. Required.
1009
- :type body: ~client.models.SandboxInfo or IO[bytes]
1011
+ :type body: ~generated.models.SandboxInfo or IO[bytes]
1010
1012
  :return: SandboxUploadResponse
1011
- :rtype: ~client.models.SandboxUploadResponse
1013
+ :rtype: ~generated.models.SandboxUploadResponse
1012
1014
  :raises ~azure.core.exceptions.HttpResponseError:
1013
1015
  """
1014
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1015
- 401: ClientAuthenticationError,
1016
- 404: ResourceNotFoundError,
1017
- 409: ResourceExistsError,
1018
- 304: ResourceNotModifiedError,
1019
- }
1016
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1017
+ { # pylint: disable=unsubscriptable-object
1018
+ 401: ClientAuthenticationError,
1019
+ 404: ResourceNotFoundError,
1020
+ 409: ResourceExistsError,
1021
+ 304: ResourceNotModifiedError,
1022
+ }
1023
+ )
1020
1024
  error_map.update(kwargs.pop("error_map", {}) or {})
1021
1025
 
1022
1026
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -1054,14 +1058,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1054
1058
  response = pipeline_response.http_response
1055
1059
 
1056
1060
  if response.status_code not in [200]:
1057
- if _stream:
1058
- await response.read() # Load the body in memory and close the socket
1059
1061
  map_error(
1060
1062
  status_code=response.status_code, response=response, error_map=error_map
1061
1063
  )
1062
1064
  raise HttpResponseError(response=response)
1063
1065
 
1064
- deserialized = self._deserialize("SandboxUploadResponse", pipeline_response)
1066
+ deserialized = self._deserialize(
1067
+ "SandboxUploadResponse", pipeline_response.http_response
1068
+ )
1065
1069
 
1066
1070
  if cls:
1067
1071
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1074,7 +1078,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1074
1078
  ) -> _models.SandboxDownloadResponse:
1075
1079
  """Get Sandbox File.
1076
1080
 
1077
- Get a presigned URL to download a sandbox file
1081
+ Get a presigned URL to download a sandbox file.
1078
1082
 
1079
1083
  This route cannot use a redirect response most clients will also send the
1080
1084
  authorization header when following a redirect. This is not desirable as
@@ -1085,15 +1089,17 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1085
1089
  :keyword pfn: Required.
1086
1090
  :paramtype pfn: str
1087
1091
  :return: SandboxDownloadResponse
1088
- :rtype: ~client.models.SandboxDownloadResponse
1092
+ :rtype: ~generated.models.SandboxDownloadResponse
1089
1093
  :raises ~azure.core.exceptions.HttpResponseError:
1090
1094
  """
1091
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1092
- 401: ClientAuthenticationError,
1093
- 404: ResourceNotFoundError,
1094
- 409: ResourceExistsError,
1095
- 304: ResourceNotModifiedError,
1096
- }
1095
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1096
+ { # pylint: disable=unsubscriptable-object
1097
+ 401: ClientAuthenticationError,
1098
+ 404: ResourceNotFoundError,
1099
+ 409: ResourceExistsError,
1100
+ 304: ResourceNotModifiedError,
1101
+ }
1102
+ )
1097
1103
  error_map.update(kwargs.pop("error_map", {}) or {})
1098
1104
 
1099
1105
  _headers = kwargs.pop("headers", {}) or {}
@@ -1118,14 +1124,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1118
1124
  response = pipeline_response.http_response
1119
1125
 
1120
1126
  if response.status_code not in [200]:
1121
- if _stream:
1122
- await response.read() # Load the body in memory and close the socket
1123
1127
  map_error(
1124
1128
  status_code=response.status_code, response=response, error_map=error_map
1125
1129
  )
1126
1130
  raise HttpResponseError(response=response)
1127
1131
 
1128
- deserialized = self._deserialize("SandboxDownloadResponse", pipeline_response)
1132
+ deserialized = self._deserialize(
1133
+ "SandboxDownloadResponse", pipeline_response.http_response
1134
+ )
1129
1135
 
1130
1136
  if cls:
1131
1137
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1146,12 +1152,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1146
1152
  :rtype: any
1147
1153
  :raises ~azure.core.exceptions.HttpResponseError:
1148
1154
  """
1149
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1150
- 401: ClientAuthenticationError,
1151
- 404: ResourceNotFoundError,
1152
- 409: ResourceExistsError,
1153
- 304: ResourceNotModifiedError,
1154
- }
1155
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1156
+ { # pylint: disable=unsubscriptable-object
1157
+ 401: ClientAuthenticationError,
1158
+ 404: ResourceNotFoundError,
1159
+ 409: ResourceExistsError,
1160
+ 304: ResourceNotModifiedError,
1161
+ }
1162
+ )
1155
1163
  error_map.update(kwargs.pop("error_map", {}) or {})
1156
1164
 
1157
1165
  _headers = kwargs.pop("headers", {}) or {}
@@ -1176,14 +1184,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1176
1184
  response = pipeline_response.http_response
1177
1185
 
1178
1186
  if response.status_code not in [200]:
1179
- if _stream:
1180
- await response.read() # Load the body in memory and close the socket
1181
1187
  map_error(
1182
1188
  status_code=response.status_code, response=response, error_map=error_map
1183
1189
  )
1184
1190
  raise HttpResponseError(response=response)
1185
1191
 
1186
- deserialized = self._deserialize("object", pipeline_response)
1192
+ deserialized = self._deserialize("object", pipeline_response.http_response)
1187
1193
 
1188
1194
  if cls:
1189
1195
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1204,12 +1210,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1204
1210
  :rtype: dict[str, list[any]]
1205
1211
  :raises ~azure.core.exceptions.HttpResponseError:
1206
1212
  """
1207
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1208
- 401: ClientAuthenticationError,
1209
- 404: ResourceNotFoundError,
1210
- 409: ResourceExistsError,
1211
- 304: ResourceNotModifiedError,
1212
- }
1213
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1214
+ { # pylint: disable=unsubscriptable-object
1215
+ 401: ClientAuthenticationError,
1216
+ 404: ResourceNotFoundError,
1217
+ 409: ResourceExistsError,
1218
+ 304: ResourceNotModifiedError,
1219
+ }
1220
+ )
1213
1221
  error_map.update(kwargs.pop("error_map", {}) or {})
1214
1222
 
1215
1223
  _headers = kwargs.pop("headers", {}) or {}
@@ -1234,14 +1242,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1234
1242
  response = pipeline_response.http_response
1235
1243
 
1236
1244
  if response.status_code not in [200]:
1237
- if _stream:
1238
- await response.read() # Load the body in memory and close the socket
1239
1245
  map_error(
1240
1246
  status_code=response.status_code, response=response, error_map=error_map
1241
1247
  )
1242
1248
  raise HttpResponseError(response=response)
1243
1249
 
1244
- deserialized = self._deserialize("{[object]}", pipeline_response)
1250
+ deserialized = self._deserialize("{[object]}", pipeline_response.http_response)
1245
1251
 
1246
1252
  if cls:
1247
1253
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1260,12 +1266,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1260
1266
  :rtype: any
1261
1267
  :raises ~azure.core.exceptions.HttpResponseError:
1262
1268
  """
1263
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1264
- 401: ClientAuthenticationError,
1265
- 404: ResourceNotFoundError,
1266
- 409: ResourceExistsError,
1267
- 304: ResourceNotModifiedError,
1268
- }
1269
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1270
+ { # pylint: disable=unsubscriptable-object
1271
+ 401: ClientAuthenticationError,
1272
+ 404: ResourceNotFoundError,
1273
+ 409: ResourceExistsError,
1274
+ 304: ResourceNotModifiedError,
1275
+ }
1276
+ )
1269
1277
  error_map.update(kwargs.pop("error_map", {}) or {})
1270
1278
 
1271
1279
  _headers = kwargs.pop("headers", {}) or {}
@@ -1290,14 +1298,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1290
1298
  response = pipeline_response.http_response
1291
1299
 
1292
1300
  if response.status_code not in [200]:
1293
- if _stream:
1294
- await response.read() # Load the body in memory and close the socket
1295
1301
  map_error(
1296
1302
  status_code=response.status_code, response=response, error_map=error_map
1297
1303
  )
1298
1304
  raise HttpResponseError(response=response)
1299
1305
 
1300
- deserialized = self._deserialize("object", pipeline_response)
1306
+ deserialized = self._deserialize("object", pipeline_response.http_response)
1301
1307
 
1302
1308
  if cls:
1303
1309
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1315,17 +1321,19 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1315
1321
  :param job_id: Required.
1316
1322
  :type job_id: int
1317
1323
  :param sandbox_type: Known values are: "input" and "output". Required.
1318
- :type sandbox_type: str or ~client.models.SandboxType
1324
+ :type sandbox_type: str or ~generated.models.SandboxType
1319
1325
  :return: list of any
1320
1326
  :rtype: list[any]
1321
1327
  :raises ~azure.core.exceptions.HttpResponseError:
1322
1328
  """
1323
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1324
- 401: ClientAuthenticationError,
1325
- 404: ResourceNotFoundError,
1326
- 409: ResourceExistsError,
1327
- 304: ResourceNotModifiedError,
1328
- }
1329
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1330
+ { # pylint: disable=unsubscriptable-object
1331
+ 401: ClientAuthenticationError,
1332
+ 404: ResourceNotFoundError,
1333
+ 409: ResourceExistsError,
1334
+ 304: ResourceNotModifiedError,
1335
+ }
1336
+ )
1329
1337
  error_map.update(kwargs.pop("error_map", {}) or {})
1330
1338
 
1331
1339
  _headers = kwargs.pop("headers", {}) or {}
@@ -1351,14 +1359,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1351
1359
  response = pipeline_response.http_response
1352
1360
 
1353
1361
  if response.status_code not in [200]:
1354
- if _stream:
1355
- await response.read() # Load the body in memory and close the socket
1356
1362
  map_error(
1357
1363
  status_code=response.status_code, response=response, error_map=error_map
1358
1364
  )
1359
1365
  raise HttpResponseError(response=response)
1360
1366
 
1361
- deserialized = self._deserialize("[object]", pipeline_response)
1367
+ deserialized = self._deserialize("[object]", pipeline_response.http_response)
1362
1368
 
1363
1369
  if cls:
1364
1370
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1379,12 +1385,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1379
1385
  :rtype: any
1380
1386
  :raises ~azure.core.exceptions.HttpResponseError:
1381
1387
  """
1382
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1383
- 401: ClientAuthenticationError,
1384
- 404: ResourceNotFoundError,
1385
- 409: ResourceExistsError,
1386
- 304: ResourceNotModifiedError,
1387
- }
1388
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1389
+ { # pylint: disable=unsubscriptable-object
1390
+ 401: ClientAuthenticationError,
1391
+ 404: ResourceNotFoundError,
1392
+ 409: ResourceExistsError,
1393
+ 304: ResourceNotModifiedError,
1394
+ }
1395
+ )
1388
1396
  error_map.update(kwargs.pop("error_map", {}) or {})
1389
1397
 
1390
1398
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -1416,14 +1424,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1416
1424
  response = pipeline_response.http_response
1417
1425
 
1418
1426
  if response.status_code not in [200]:
1419
- if _stream:
1420
- await response.read() # Load the body in memory and close the socket
1421
1427
  map_error(
1422
1428
  status_code=response.status_code, response=response, error_map=error_map
1423
1429
  )
1424
1430
  raise HttpResponseError(response=response)
1425
1431
 
1426
- deserialized = self._deserialize("object", pipeline_response)
1432
+ deserialized = self._deserialize("object", pipeline_response.http_response)
1427
1433
 
1428
1434
  if cls:
1429
1435
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1444,7 +1450,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1444
1450
  Default value is "application/json".
1445
1451
  :paramtype content_type: str
1446
1452
  :return: list of InsertedJob
1447
- :rtype: list[~client.models.InsertedJob]
1453
+ :rtype: list[~generated.models.InsertedJob]
1448
1454
  :raises ~azure.core.exceptions.HttpResponseError:
1449
1455
  """
1450
1456
 
@@ -1462,7 +1468,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1462
1468
  Default value is "application/json".
1463
1469
  :paramtype content_type: str
1464
1470
  :return: list of InsertedJob
1465
- :rtype: list[~client.models.InsertedJob]
1471
+ :rtype: list[~generated.models.InsertedJob]
1466
1472
  :raises ~azure.core.exceptions.HttpResponseError:
1467
1473
  """
1468
1474
 
@@ -1477,15 +1483,17 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1477
1483
  :param body: Is either a [str] type or a IO[bytes] type. Required.
1478
1484
  :type body: list[str] or IO[bytes]
1479
1485
  :return: list of InsertedJob
1480
- :rtype: list[~client.models.InsertedJob]
1486
+ :rtype: list[~generated.models.InsertedJob]
1481
1487
  :raises ~azure.core.exceptions.HttpResponseError:
1482
1488
  """
1483
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1484
- 401: ClientAuthenticationError,
1485
- 404: ResourceNotFoundError,
1486
- 409: ResourceExistsError,
1487
- 304: ResourceNotModifiedError,
1488
- }
1489
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1490
+ { # pylint: disable=unsubscriptable-object
1491
+ 401: ClientAuthenticationError,
1492
+ 404: ResourceNotFoundError,
1493
+ 409: ResourceExistsError,
1494
+ 304: ResourceNotModifiedError,
1495
+ }
1496
+ )
1489
1497
  error_map.update(kwargs.pop("error_map", {}) or {})
1490
1498
 
1491
1499
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -1523,14 +1531,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1523
1531
  response = pipeline_response.http_response
1524
1532
 
1525
1533
  if response.status_code not in [200]:
1526
- if _stream:
1527
- await response.read() # Load the body in memory and close the socket
1528
1534
  map_error(
1529
1535
  status_code=response.status_code, response=response, error_map=error_map
1530
1536
  )
1531
1537
  raise HttpResponseError(response=response)
1532
1538
 
1533
- deserialized = self._deserialize("[InsertedJob]", pipeline_response)
1539
+ deserialized = self._deserialize(
1540
+ "[InsertedJob]", pipeline_response.http_response
1541
+ )
1534
1542
 
1535
1543
  if cls:
1536
1544
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1549,12 +1557,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1549
1557
  :rtype: any
1550
1558
  :raises ~azure.core.exceptions.HttpResponseError:
1551
1559
  """
1552
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1553
- 401: ClientAuthenticationError,
1554
- 404: ResourceNotFoundError,
1555
- 409: ResourceExistsError,
1556
- 304: ResourceNotModifiedError,
1557
- }
1560
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1561
+ { # pylint: disable=unsubscriptable-object
1562
+ 401: ClientAuthenticationError,
1563
+ 404: ResourceNotFoundError,
1564
+ 409: ResourceExistsError,
1565
+ 304: ResourceNotModifiedError,
1566
+ }
1567
+ )
1558
1568
  error_map.update(kwargs.pop("error_map", {}) or {})
1559
1569
 
1560
1570
  _headers = kwargs.pop("headers", {}) or {}
@@ -1579,14 +1589,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1579
1589
  response = pipeline_response.http_response
1580
1590
 
1581
1591
  if response.status_code not in [200]:
1582
- if _stream:
1583
- await response.read() # Load the body in memory and close the socket
1584
1592
  map_error(
1585
1593
  status_code=response.status_code, response=response, error_map=error_map
1586
1594
  )
1587
1595
  raise HttpResponseError(response=response)
1588
1596
 
1589
- deserialized = self._deserialize("object", pipeline_response)
1597
+ deserialized = self._deserialize("object", pipeline_response.http_response)
1590
1598
 
1591
1599
  if cls:
1592
1600
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1605,12 +1613,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1605
1613
  :rtype: any
1606
1614
  :raises ~azure.core.exceptions.HttpResponseError:
1607
1615
  """
1608
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1609
- 401: ClientAuthenticationError,
1610
- 404: ResourceNotFoundError,
1611
- 409: ResourceExistsError,
1612
- 304: ResourceNotModifiedError,
1613
- }
1616
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1617
+ { # pylint: disable=unsubscriptable-object
1618
+ 401: ClientAuthenticationError,
1619
+ 404: ResourceNotFoundError,
1620
+ 409: ResourceExistsError,
1621
+ 304: ResourceNotModifiedError,
1622
+ }
1623
+ )
1614
1624
  error_map.update(kwargs.pop("error_map", {}) or {})
1615
1625
 
1616
1626
  _headers = kwargs.pop("headers", {}) or {}
@@ -1635,14 +1645,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1635
1645
  response = pipeline_response.http_response
1636
1646
 
1637
1647
  if response.status_code not in [200]:
1638
- if _stream:
1639
- await response.read() # Load the body in memory and close the socket
1640
1648
  map_error(
1641
1649
  status_code=response.status_code, response=response, error_map=error_map
1642
1650
  )
1643
1651
  raise HttpResponseError(response=response)
1644
1652
 
1645
- deserialized = self._deserialize("object", pipeline_response)
1653
+ deserialized = self._deserialize("object", pipeline_response.http_response)
1646
1654
 
1647
1655
  if cls:
1648
1656
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1665,12 +1673,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1665
1673
  :rtype: any
1666
1674
  :raises ~azure.core.exceptions.HttpResponseError:
1667
1675
  """
1668
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1669
- 401: ClientAuthenticationError,
1670
- 404: ResourceNotFoundError,
1671
- 409: ResourceExistsError,
1672
- 304: ResourceNotModifiedError,
1673
- }
1676
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1677
+ { # pylint: disable=unsubscriptable-object
1678
+ 401: ClientAuthenticationError,
1679
+ 404: ResourceNotFoundError,
1680
+ 409: ResourceExistsError,
1681
+ 304: ResourceNotModifiedError,
1682
+ }
1683
+ )
1674
1684
  error_map.update(kwargs.pop("error_map", {}) or {})
1675
1685
 
1676
1686
  _headers = kwargs.pop("headers", {}) or {}
@@ -1695,14 +1705,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1695
1705
  response = pipeline_response.http_response
1696
1706
 
1697
1707
  if response.status_code not in [200]:
1698
- if _stream:
1699
- await response.read() # Load the body in memory and close the socket
1700
1708
  map_error(
1701
1709
  status_code=response.status_code, response=response, error_map=error_map
1702
1710
  )
1703
1711
  raise HttpResponseError(response=response)
1704
1712
 
1705
- deserialized = self._deserialize("object", pipeline_response)
1713
+ deserialized = self._deserialize("object", pipeline_response.http_response)
1706
1714
 
1707
1715
  if cls:
1708
1716
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1720,15 +1728,17 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1720
1728
  :keyword job_ids: Required.
1721
1729
  :paramtype job_ids: list[int]
1722
1730
  :return: dict mapping str to LimitedJobStatusReturn
1723
- :rtype: dict[str, ~client.models.LimitedJobStatusReturn]
1731
+ :rtype: dict[str, ~generated.models.LimitedJobStatusReturn]
1724
1732
  :raises ~azure.core.exceptions.HttpResponseError:
1725
1733
  """
1726
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1727
- 401: ClientAuthenticationError,
1728
- 404: ResourceNotFoundError,
1729
- 409: ResourceExistsError,
1730
- 304: ResourceNotModifiedError,
1731
- }
1734
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1735
+ { # pylint: disable=unsubscriptable-object
1736
+ 401: ClientAuthenticationError,
1737
+ 404: ResourceNotFoundError,
1738
+ 409: ResourceExistsError,
1739
+ 304: ResourceNotModifiedError,
1740
+ }
1741
+ )
1732
1742
  error_map.update(kwargs.pop("error_map", {}) or {})
1733
1743
 
1734
1744
  _headers = kwargs.pop("headers", {}) or {}
@@ -1755,14 +1765,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1755
1765
  response = pipeline_response.http_response
1756
1766
 
1757
1767
  if response.status_code not in [200]:
1758
- if _stream:
1759
- await response.read() # Load the body in memory and close the socket
1760
1768
  map_error(
1761
1769
  status_code=response.status_code, response=response, error_map=error_map
1762
1770
  )
1763
1771
  raise HttpResponseError(response=response)
1764
1772
 
1765
- deserialized = self._deserialize("{LimitedJobStatusReturn}", pipeline_response)
1773
+ deserialized = self._deserialize(
1774
+ "{LimitedJobStatusReturn}", pipeline_response.http_response
1775
+ )
1766
1776
 
1767
1777
  if cls:
1768
1778
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1783,14 +1793,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1783
1793
  Set Job Status Bulk.
1784
1794
 
1785
1795
  :param body: Required.
1786
- :type body: dict[str, dict[str, ~client.models.JobStatusUpdate]]
1796
+ :type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]]
1787
1797
  :keyword force: Default value is False.
1788
1798
  :paramtype force: bool
1789
1799
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
1790
1800
  Default value is "application/json".
1791
1801
  :paramtype content_type: str
1792
1802
  :return: dict mapping str to SetJobStatusReturn
1793
- :rtype: dict[str, ~client.models.SetJobStatusReturn]
1803
+ :rtype: dict[str, ~generated.models.SetJobStatusReturn]
1794
1804
  :raises ~azure.core.exceptions.HttpResponseError:
1795
1805
  """
1796
1806
 
@@ -1815,7 +1825,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1815
1825
  Default value is "application/json".
1816
1826
  :paramtype content_type: str
1817
1827
  :return: dict mapping str to SetJobStatusReturn
1818
- :rtype: dict[str, ~client.models.SetJobStatusReturn]
1828
+ :rtype: dict[str, ~generated.models.SetJobStatusReturn]
1819
1829
  :raises ~azure.core.exceptions.HttpResponseError:
1820
1830
  """
1821
1831
 
@@ -1832,19 +1842,21 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1832
1842
  Set Job Status Bulk.
1833
1843
 
1834
1844
  :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]
1845
+ :type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]] or IO[bytes]
1836
1846
  :keyword force: Default value is False.
1837
1847
  :paramtype force: bool
1838
1848
  :return: dict mapping str to SetJobStatusReturn
1839
- :rtype: dict[str, ~client.models.SetJobStatusReturn]
1849
+ :rtype: dict[str, ~generated.models.SetJobStatusReturn]
1840
1850
  :raises ~azure.core.exceptions.HttpResponseError:
1841
1851
  """
1842
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1843
- 401: ClientAuthenticationError,
1844
- 404: ResourceNotFoundError,
1845
- 409: ResourceExistsError,
1846
- 304: ResourceNotModifiedError,
1847
- }
1852
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1853
+ { # pylint: disable=unsubscriptable-object
1854
+ 401: ClientAuthenticationError,
1855
+ 404: ResourceNotFoundError,
1856
+ 409: ResourceExistsError,
1857
+ 304: ResourceNotModifiedError,
1858
+ }
1859
+ )
1848
1860
  error_map.update(kwargs.pop("error_map", {}) or {})
1849
1861
 
1850
1862
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -1883,14 +1895,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1883
1895
  response = pipeline_response.http_response
1884
1896
 
1885
1897
  if response.status_code not in [200]:
1886
- if _stream:
1887
- await response.read() # Load the body in memory and close the socket
1888
1898
  map_error(
1889
1899
  status_code=response.status_code, response=response, error_map=error_map
1890
1900
  )
1891
1901
  raise HttpResponseError(response=response)
1892
1902
 
1893
- deserialized = self._deserialize("{SetJobStatusReturn}", pipeline_response)
1903
+ deserialized = self._deserialize(
1904
+ "{SetJobStatusReturn}", pipeline_response.http_response
1905
+ )
1894
1906
 
1895
1907
  if cls:
1896
1908
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1908,15 +1920,17 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1908
1920
  :keyword job_ids: Required.
1909
1921
  :paramtype job_ids: list[int]
1910
1922
  :return: dict mapping str to list of JobStatusReturn
1911
- :rtype: dict[str, list[~client.models.JobStatusReturn]]
1923
+ :rtype: dict[str, list[~generated.models.JobStatusReturn]]
1912
1924
  :raises ~azure.core.exceptions.HttpResponseError:
1913
1925
  """
1914
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1915
- 401: ClientAuthenticationError,
1916
- 404: ResourceNotFoundError,
1917
- 409: ResourceExistsError,
1918
- 304: ResourceNotModifiedError,
1919
- }
1926
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1927
+ { # pylint: disable=unsubscriptable-object
1928
+ 401: ClientAuthenticationError,
1929
+ 404: ResourceNotFoundError,
1930
+ 409: ResourceExistsError,
1931
+ 304: ResourceNotModifiedError,
1932
+ }
1933
+ )
1920
1934
  error_map.update(kwargs.pop("error_map", {}) or {})
1921
1935
 
1922
1936
  _headers = kwargs.pop("headers", {}) or {}
@@ -1941,14 +1955,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1941
1955
  response = pipeline_response.http_response
1942
1956
 
1943
1957
  if response.status_code not in [200]:
1944
- if _stream:
1945
- await response.read() # Load the body in memory and close the socket
1946
1958
  map_error(
1947
1959
  status_code=response.status_code, response=response, error_map=error_map
1948
1960
  )
1949
1961
  raise HttpResponseError(response=response)
1950
1962
 
1951
- deserialized = self._deserialize("{[JobStatusReturn]}", pipeline_response)
1963
+ deserialized = self._deserialize(
1964
+ "{[JobStatusReturn]}", pipeline_response.http_response
1965
+ )
1952
1966
 
1953
1967
  if cls:
1954
1968
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1967,12 +1981,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1967
1981
  :rtype: any
1968
1982
  :raises ~azure.core.exceptions.HttpResponseError:
1969
1983
  """
1970
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1971
- 401: ClientAuthenticationError,
1972
- 404: ResourceNotFoundError,
1973
- 409: ResourceExistsError,
1974
- 304: ResourceNotModifiedError,
1975
- }
1984
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
1985
+ { # pylint: disable=unsubscriptable-object
1986
+ 401: ClientAuthenticationError,
1987
+ 404: ResourceNotFoundError,
1988
+ 409: ResourceExistsError,
1989
+ 304: ResourceNotModifiedError,
1990
+ }
1991
+ )
1976
1992
  error_map.update(kwargs.pop("error_map", {}) or {})
1977
1993
 
1978
1994
  _headers = kwargs.pop("headers", {}) or {}
@@ -1997,14 +2013,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1997
2013
  response = pipeline_response.http_response
1998
2014
 
1999
2015
  if response.status_code not in [200]:
2000
- if _stream:
2001
- await response.read() # Load the body in memory and close the socket
2002
2016
  map_error(
2003
2017
  status_code=response.status_code, response=response, error_map=error_map
2004
2018
  )
2005
2019
  raise HttpResponseError(response=response)
2006
2020
 
2007
- deserialized = self._deserialize("object", pipeline_response)
2021
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2008
2022
 
2009
2023
  if cls:
2010
2024
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2023,12 +2037,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2023
2037
  :rtype: any
2024
2038
  :raises ~azure.core.exceptions.HttpResponseError:
2025
2039
  """
2026
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2027
- 401: ClientAuthenticationError,
2028
- 404: ResourceNotFoundError,
2029
- 409: ResourceExistsError,
2030
- 304: ResourceNotModifiedError,
2031
- }
2040
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
2041
+ { # pylint: disable=unsubscriptable-object
2042
+ 401: ClientAuthenticationError,
2043
+ 404: ResourceNotFoundError,
2044
+ 409: ResourceExistsError,
2045
+ 304: ResourceNotModifiedError,
2046
+ }
2047
+ )
2032
2048
  error_map.update(kwargs.pop("error_map", {}) or {})
2033
2049
 
2034
2050
  _headers = kwargs.pop("headers", {}) or {}
@@ -2053,14 +2069,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2053
2069
  response = pipeline_response.http_response
2054
2070
 
2055
2071
  if response.status_code not in [200]:
2056
- if _stream:
2057
- await response.read() # Load the body in memory and close the socket
2058
2072
  map_error(
2059
2073
  status_code=response.status_code, response=response, error_map=error_map
2060
2074
  )
2061
2075
  raise HttpResponseError(response=response)
2062
2076
 
2063
- deserialized = self._deserialize("object", pipeline_response)
2077
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2064
2078
 
2065
2079
  if cls:
2066
2080
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2084,7 +2098,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2084
2098
  **TODO: Add more docs**.
2085
2099
 
2086
2100
  :param body: Default value is None.
2087
- :type body: ~client.models.JobSearchParams
2101
+ :type body: ~generated.models.JobSearchParams
2088
2102
  :keyword page: Default value is 1.
2089
2103
  :paramtype page: int
2090
2104
  :keyword per_page: Default value is 100.
@@ -2143,7 +2157,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2143
2157
  **TODO: Add more docs**.
2144
2158
 
2145
2159
  :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]
2160
+ :type body: ~generated.models.JobSearchParams or IO[bytes]
2147
2161
  :keyword page: Default value is 1.
2148
2162
  :paramtype page: int
2149
2163
  :keyword per_page: Default value is 100.
@@ -2152,12 +2166,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2152
2166
  :rtype: list[JSON]
2153
2167
  :raises ~azure.core.exceptions.HttpResponseError:
2154
2168
  """
2155
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2156
- 401: ClientAuthenticationError,
2157
- 404: ResourceNotFoundError,
2158
- 409: ResourceExistsError,
2159
- 304: ResourceNotModifiedError,
2160
- }
2169
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
2170
+ { # pylint: disable=unsubscriptable-object
2171
+ 401: ClientAuthenticationError,
2172
+ 404: ResourceNotFoundError,
2173
+ 409: ResourceExistsError,
2174
+ 304: ResourceNotModifiedError,
2175
+ }
2176
+ )
2161
2177
  error_map.update(kwargs.pop("error_map", {}) or {})
2162
2178
 
2163
2179
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -2200,23 +2216,18 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2200
2216
  response = pipeline_response.http_response
2201
2217
 
2202
2218
  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
2219
  map_error(
2206
2220
  status_code=response.status_code, response=response, error_map=error_map
2207
2221
  )
2208
2222
  raise HttpResponseError(response=response)
2209
2223
 
2210
2224
  response_headers = {}
2211
- if response.status_code == 200:
2212
- deserialized = self._deserialize("[object]", pipeline_response)
2213
-
2214
2225
  if response.status_code == 206:
2215
2226
  response_headers["Content-Range"] = self._deserialize(
2216
2227
  "str", response.headers.get("Content-Range")
2217
2228
  )
2218
2229
 
2219
- deserialized = self._deserialize("[object]", pipeline_response)
2230
+ deserialized = self._deserialize("[object]", pipeline_response.http_response)
2220
2231
 
2221
2232
  if cls:
2222
2233
  return cls(pipeline_response, deserialized, response_headers) # type: ignore
@@ -2236,7 +2247,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2236
2247
  Show information suitable for plotting.
2237
2248
 
2238
2249
  :param body: Required.
2239
- :type body: ~client.models.JobSummaryParams
2250
+ :type body: ~generated.models.JobSummaryParams
2240
2251
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2241
2252
  Default value is "application/json".
2242
2253
  :paramtype content_type: str
@@ -2272,17 +2283,19 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2272
2283
  Show information suitable for plotting.
2273
2284
 
2274
2285
  :param body: Is either a JobSummaryParams type or a IO[bytes] type. Required.
2275
- :type body: ~client.models.JobSummaryParams or IO[bytes]
2286
+ :type body: ~generated.models.JobSummaryParams or IO[bytes]
2276
2287
  :return: any
2277
2288
  :rtype: any
2278
2289
  :raises ~azure.core.exceptions.HttpResponseError:
2279
2290
  """
2280
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2281
- 401: ClientAuthenticationError,
2282
- 404: ResourceNotFoundError,
2283
- 409: ResourceExistsError,
2284
- 304: ResourceNotModifiedError,
2285
- }
2291
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
2292
+ { # pylint: disable=unsubscriptable-object
2293
+ 401: ClientAuthenticationError,
2294
+ 404: ResourceNotFoundError,
2295
+ 409: ResourceExistsError,
2296
+ 304: ResourceNotModifiedError,
2297
+ }
2298
+ )
2286
2299
  error_map.update(kwargs.pop("error_map", {}) or {})
2287
2300
 
2288
2301
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -2320,14 +2333,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2320
2333
  response = pipeline_response.http_response
2321
2334
 
2322
2335
  if response.status_code not in [200]:
2323
- if _stream:
2324
- await response.read() # Load the body in memory and close the socket
2325
2336
  map_error(
2326
2337
  status_code=response.status_code, response=response, error_map=error_map
2327
2338
  )
2328
2339
  raise HttpResponseError(response=response)
2329
2340
 
2330
- deserialized = self._deserialize("object", pipeline_response)
2341
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2331
2342
 
2332
2343
  if cls:
2333
2344
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2346,12 +2357,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2346
2357
  :rtype: any
2347
2358
  :raises ~azure.core.exceptions.HttpResponseError:
2348
2359
  """
2349
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2350
- 401: ClientAuthenticationError,
2351
- 404: ResourceNotFoundError,
2352
- 409: ResourceExistsError,
2353
- 304: ResourceNotModifiedError,
2354
- }
2360
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
2361
+ { # pylint: disable=unsubscriptable-object
2362
+ 401: ClientAuthenticationError,
2363
+ 404: ResourceNotFoundError,
2364
+ 409: ResourceExistsError,
2365
+ 304: ResourceNotModifiedError,
2366
+ }
2367
+ )
2355
2368
  error_map.update(kwargs.pop("error_map", {}) or {})
2356
2369
 
2357
2370
  _headers = kwargs.pop("headers", {}) or {}
@@ -2376,14 +2389,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2376
2389
  response = pipeline_response.http_response
2377
2390
 
2378
2391
  if response.status_code not in [200]:
2379
- if _stream:
2380
- await response.read() # Load the body in memory and close the socket
2381
2392
  map_error(
2382
2393
  status_code=response.status_code, response=response, error_map=error_map
2383
2394
  )
2384
2395
  raise HttpResponseError(response=response)
2385
2396
 
2386
- deserialized = self._deserialize("object", pipeline_response)
2397
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2387
2398
 
2388
2399
  if cls:
2389
2400
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2402,12 +2413,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2402
2413
  :rtype: any
2403
2414
  :raises ~azure.core.exceptions.HttpResponseError:
2404
2415
  """
2405
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2406
- 401: ClientAuthenticationError,
2407
- 404: ResourceNotFoundError,
2408
- 409: ResourceExistsError,
2409
- 304: ResourceNotModifiedError,
2410
- }
2416
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
2417
+ { # pylint: disable=unsubscriptable-object
2418
+ 401: ClientAuthenticationError,
2419
+ 404: ResourceNotFoundError,
2420
+ 409: ResourceExistsError,
2421
+ 304: ResourceNotModifiedError,
2422
+ }
2423
+ )
2411
2424
  error_map.update(kwargs.pop("error_map", {}) or {})
2412
2425
 
2413
2426
  _headers = kwargs.pop("headers", {}) or {}
@@ -2432,14 +2445,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2432
2445
  response = pipeline_response.http_response
2433
2446
 
2434
2447
  if response.status_code not in [200]:
2435
- if _stream:
2436
- await response.read() # Load the body in memory and close the socket
2437
2448
  map_error(
2438
2449
  status_code=response.status_code, response=response, error_map=error_map
2439
2450
  )
2440
2451
  raise HttpResponseError(response=response)
2441
2452
 
2442
- deserialized = self._deserialize("object", pipeline_response)
2453
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2443
2454
 
2444
2455
  if cls:
2445
2456
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2464,12 +2475,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2464
2475
  :rtype: any
2465
2476
  :raises ~azure.core.exceptions.HttpResponseError:
2466
2477
  """
2467
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2468
- 401: ClientAuthenticationError,
2469
- 404: ResourceNotFoundError,
2470
- 409: ResourceExistsError,
2471
- 304: ResourceNotModifiedError,
2472
- }
2478
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
2479
+ { # pylint: disable=unsubscriptable-object
2480
+ 401: ClientAuthenticationError,
2481
+ 404: ResourceNotFoundError,
2482
+ 409: ResourceExistsError,
2483
+ 304: ResourceNotModifiedError,
2484
+ }
2485
+ )
2473
2486
  error_map.update(kwargs.pop("error_map", {}) or {})
2474
2487
 
2475
2488
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -2502,14 +2515,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2502
2515
  response = pipeline_response.http_response
2503
2516
 
2504
2517
  if response.status_code not in [200]:
2505
- if _stream:
2506
- await response.read() # Load the body in memory and close the socket
2507
2518
  map_error(
2508
2519
  status_code=response.status_code, response=response, error_map=error_map
2509
2520
  )
2510
2521
  raise HttpResponseError(response=response)
2511
2522
 
2512
- deserialized = self._deserialize("object", pipeline_response)
2523
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2513
2524
 
2514
2525
  if cls:
2515
2526
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2528,12 +2539,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2528
2539
  :rtype: any
2529
2540
  :raises ~azure.core.exceptions.HttpResponseError:
2530
2541
  """
2531
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2532
- 401: ClientAuthenticationError,
2533
- 404: ResourceNotFoundError,
2534
- 409: ResourceExistsError,
2535
- 304: ResourceNotModifiedError,
2536
- }
2542
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
2543
+ { # pylint: disable=unsubscriptable-object
2544
+ 401: ClientAuthenticationError,
2545
+ 404: ResourceNotFoundError,
2546
+ 409: ResourceExistsError,
2547
+ 304: ResourceNotModifiedError,
2548
+ }
2549
+ )
2537
2550
  error_map.update(kwargs.pop("error_map", {}) or {})
2538
2551
 
2539
2552
  _headers = kwargs.pop("headers", {}) or {}
@@ -2558,14 +2571,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2558
2571
  response = pipeline_response.http_response
2559
2572
 
2560
2573
  if response.status_code not in [200]:
2561
- if _stream:
2562
- await response.read() # Load the body in memory and close the socket
2563
2574
  map_error(
2564
2575
  status_code=response.status_code, response=response, error_map=error_map
2565
2576
  )
2566
2577
  raise HttpResponseError(response=response)
2567
2578
 
2568
- deserialized = self._deserialize("object", pipeline_response)
2579
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2569
2580
 
2570
2581
  if cls:
2571
2582
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2588,12 +2599,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2588
2599
  :rtype: any
2589
2600
  :raises ~azure.core.exceptions.HttpResponseError:
2590
2601
  """
2591
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2592
- 401: ClientAuthenticationError,
2593
- 404: ResourceNotFoundError,
2594
- 409: ResourceExistsError,
2595
- 304: ResourceNotModifiedError,
2596
- }
2602
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
2603
+ { # pylint: disable=unsubscriptable-object
2604
+ 401: ClientAuthenticationError,
2605
+ 404: ResourceNotFoundError,
2606
+ 409: ResourceExistsError,
2607
+ 304: ResourceNotModifiedError,
2608
+ }
2609
+ )
2597
2610
  error_map.update(kwargs.pop("error_map", {}) or {})
2598
2611
 
2599
2612
  _headers = kwargs.pop("headers", {}) or {}
@@ -2618,14 +2631,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2618
2631
  response = pipeline_response.http_response
2619
2632
 
2620
2633
  if response.status_code not in [200]:
2621
- if _stream:
2622
- await response.read() # Load the body in memory and close the socket
2623
2634
  map_error(
2624
2635
  status_code=response.status_code, response=response, error_map=error_map
2625
2636
  )
2626
2637
  raise HttpResponseError(response=response)
2627
2638
 
2628
- deserialized = self._deserialize("object", pipeline_response)
2639
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2629
2640
 
2630
2641
  if cls:
2631
2642
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2643,15 +2654,17 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2643
2654
  :param job_id: Required.
2644
2655
  :type job_id: int
2645
2656
  :return: dict mapping str to LimitedJobStatusReturn
2646
- :rtype: dict[str, ~client.models.LimitedJobStatusReturn]
2657
+ :rtype: dict[str, ~generated.models.LimitedJobStatusReturn]
2647
2658
  :raises ~azure.core.exceptions.HttpResponseError:
2648
2659
  """
2649
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2650
- 401: ClientAuthenticationError,
2651
- 404: ResourceNotFoundError,
2652
- 409: ResourceExistsError,
2653
- 304: ResourceNotModifiedError,
2654
- }
2660
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
2661
+ { # pylint: disable=unsubscriptable-object
2662
+ 401: ClientAuthenticationError,
2663
+ 404: ResourceNotFoundError,
2664
+ 409: ResourceExistsError,
2665
+ 304: ResourceNotModifiedError,
2666
+ }
2667
+ )
2655
2668
  error_map.update(kwargs.pop("error_map", {}) or {})
2656
2669
 
2657
2670
  _headers = kwargs.pop("headers", {}) or {}
@@ -2678,14 +2691,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2678
2691
  response = pipeline_response.http_response
2679
2692
 
2680
2693
  if response.status_code not in [200]:
2681
- if _stream:
2682
- await response.read() # Load the body in memory and close the socket
2683
2694
  map_error(
2684
2695
  status_code=response.status_code, response=response, error_map=error_map
2685
2696
  )
2686
2697
  raise HttpResponseError(response=response)
2687
2698
 
2688
- deserialized = self._deserialize("{LimitedJobStatusReturn}", pipeline_response)
2699
+ deserialized = self._deserialize(
2700
+ "{LimitedJobStatusReturn}", pipeline_response.http_response
2701
+ )
2689
2702
 
2690
2703
  if cls:
2691
2704
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2709,14 +2722,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2709
2722
  :param job_id: Required.
2710
2723
  :type job_id: int
2711
2724
  :param body: Required.
2712
- :type body: dict[str, ~client.models.JobStatusUpdate]
2725
+ :type body: dict[str, ~generated.models.JobStatusUpdate]
2713
2726
  :keyword force: Default value is False.
2714
2727
  :paramtype force: bool
2715
2728
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2716
2729
  Default value is "application/json".
2717
2730
  :paramtype content_type: str
2718
2731
  :return: dict mapping str to SetJobStatusReturn
2719
- :rtype: dict[str, ~client.models.SetJobStatusReturn]
2732
+ :rtype: dict[str, ~generated.models.SetJobStatusReturn]
2720
2733
  :raises ~azure.core.exceptions.HttpResponseError:
2721
2734
  """
2722
2735
 
@@ -2744,7 +2757,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2744
2757
  Default value is "application/json".
2745
2758
  :paramtype content_type: str
2746
2759
  :return: dict mapping str to SetJobStatusReturn
2747
- :rtype: dict[str, ~client.models.SetJobStatusReturn]
2760
+ :rtype: dict[str, ~generated.models.SetJobStatusReturn]
2748
2761
  :raises ~azure.core.exceptions.HttpResponseError:
2749
2762
  """
2750
2763
 
@@ -2764,19 +2777,21 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2764
2777
  :param job_id: Required.
2765
2778
  :type job_id: int
2766
2779
  :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]
2780
+ :type body: dict[str, ~generated.models.JobStatusUpdate] or IO[bytes]
2768
2781
  :keyword force: Default value is False.
2769
2782
  :paramtype force: bool
2770
2783
  :return: dict mapping str to SetJobStatusReturn
2771
- :rtype: dict[str, ~client.models.SetJobStatusReturn]
2784
+ :rtype: dict[str, ~generated.models.SetJobStatusReturn]
2772
2785
  :raises ~azure.core.exceptions.HttpResponseError:
2773
2786
  """
2774
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2775
- 401: ClientAuthenticationError,
2776
- 404: ResourceNotFoundError,
2777
- 409: ResourceExistsError,
2778
- 304: ResourceNotModifiedError,
2779
- }
2787
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
2788
+ { # pylint: disable=unsubscriptable-object
2789
+ 401: ClientAuthenticationError,
2790
+ 404: ResourceNotFoundError,
2791
+ 409: ResourceExistsError,
2792
+ 304: ResourceNotModifiedError,
2793
+ }
2794
+ )
2780
2795
  error_map.update(kwargs.pop("error_map", {}) or {})
2781
2796
 
2782
2797
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -2816,14 +2831,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2816
2831
  response = pipeline_response.http_response
2817
2832
 
2818
2833
  if response.status_code not in [200]:
2819
- if _stream:
2820
- await response.read() # Load the body in memory and close the socket
2821
2834
  map_error(
2822
2835
  status_code=response.status_code, response=response, error_map=error_map
2823
2836
  )
2824
2837
  raise HttpResponseError(response=response)
2825
2838
 
2826
- deserialized = self._deserialize("{SetJobStatusReturn}", pipeline_response)
2839
+ deserialized = self._deserialize(
2840
+ "{SetJobStatusReturn}", pipeline_response.http_response
2841
+ )
2827
2842
 
2828
2843
  if cls:
2829
2844
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2841,15 +2856,17 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2841
2856
  :param job_id: Required.
2842
2857
  :type job_id: int
2843
2858
  :return: dict mapping str to list of JobStatusReturn
2844
- :rtype: dict[str, list[~client.models.JobStatusReturn]]
2859
+ :rtype: dict[str, list[~generated.models.JobStatusReturn]]
2845
2860
  :raises ~azure.core.exceptions.HttpResponseError:
2846
2861
  """
2847
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2848
- 401: ClientAuthenticationError,
2849
- 404: ResourceNotFoundError,
2850
- 409: ResourceExistsError,
2851
- 304: ResourceNotModifiedError,
2852
- }
2862
+ error_map: MutableMapping[int, Type[HttpResponseError]] = (
2863
+ { # pylint: disable=unsubscriptable-object
2864
+ 401: ClientAuthenticationError,
2865
+ 404: ResourceNotFoundError,
2866
+ 409: ResourceExistsError,
2867
+ 304: ResourceNotModifiedError,
2868
+ }
2869
+ )
2853
2870
  error_map.update(kwargs.pop("error_map", {}) or {})
2854
2871
 
2855
2872
  _headers = kwargs.pop("headers", {}) or {}
@@ -2874,14 +2891,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2874
2891
  response = pipeline_response.http_response
2875
2892
 
2876
2893
  if response.status_code not in [200]:
2877
- if _stream:
2878
- await response.read() # Load the body in memory and close the socket
2879
2894
  map_error(
2880
2895
  status_code=response.status_code, response=response, error_map=error_map
2881
2896
  )
2882
2897
  raise HttpResponseError(response=response)
2883
2898
 
2884
- deserialized = self._deserialize("{[JobStatusReturn]}", pipeline_response)
2899
+ deserialized = self._deserialize(
2900
+ "{[JobStatusReturn]}", pipeline_response.http_response
2901
+ )
2885
2902
 
2886
2903
  if cls:
2887
2904
  return cls(pipeline_response, deserialized, {}) # type: ignore