diracx-client 0.0.1a45__py3-none-any.whl → 0.0.1a47__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.
@@ -45,7 +45,6 @@ from ...operations._operations import (
45
45
  build_jobs_get_sandbox_file_request,
46
46
  build_jobs_initiate_sandbox_upload_request,
47
47
  build_jobs_patch_metadata_request,
48
- build_jobs_remove_jobs_request,
49
48
  build_jobs_reschedule_jobs_request,
50
49
  build_jobs_search_request,
51
50
  build_jobs_set_job_statuses_request,
@@ -56,13 +55,12 @@ from ...operations._operations import (
56
55
  build_well_known_get_installation_metadata_request,
57
56
  build_well_known_get_jwks_request,
58
57
  build_well_known_get_openid_configuration_request,
58
+ build_well_known_get_security_txt_request,
59
59
  )
60
60
  from .._configuration import DiracConfiguration
61
61
 
62
62
  T = TypeVar("T")
63
- ClsType = Optional[
64
- Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]
65
- ]
63
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
66
64
 
67
65
 
68
66
  class WellKnownOperations:
@@ -79,23 +77,13 @@ class WellKnownOperations:
79
77
 
80
78
  def __init__(self, *args, **kwargs) -> None:
81
79
  input_args = list(args)
82
- self._client: AsyncPipelineClient = (
83
- input_args.pop(0) if input_args else kwargs.pop("client")
84
- )
85
- self._config: DiracConfiguration = (
86
- input_args.pop(0) if input_args else kwargs.pop("config")
87
- )
88
- self._serialize: Serializer = (
89
- input_args.pop(0) if input_args else kwargs.pop("serializer")
90
- )
91
- self._deserialize: Deserializer = (
92
- input_args.pop(0) if input_args else kwargs.pop("deserializer")
93
- )
80
+ self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
81
+ self._config: DiracConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
82
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
83
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
94
84
 
95
85
  @distributed_trace_async
96
- async def get_openid_configuration(
97
- self, **kwargs: Any
98
- ) -> _models.OpenIDConfiguration:
86
+ async def get_openid_configuration(self, **kwargs: Any) -> _models.OpenIDConfiguration:
99
87
  """Get Openid Configuration.
100
88
 
101
89
  OpenID Connect discovery endpoint.
@@ -124,23 +112,17 @@ class WellKnownOperations:
124
112
  _request.url = self._client.format_url(_request.url)
125
113
 
126
114
  _stream = False
127
- pipeline_response: PipelineResponse = (
128
- await self._client._pipeline.run( # pylint: disable=protected-access
129
- _request, stream=_stream, **kwargs
130
- )
115
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
116
+ _request, stream=_stream, **kwargs
131
117
  )
132
118
 
133
119
  response = pipeline_response.http_response
134
120
 
135
121
  if response.status_code not in [200]:
136
- map_error(
137
- status_code=response.status_code, response=response, error_map=error_map
138
- )
122
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
139
123
  raise HttpResponseError(response=response)
140
124
 
141
- deserialized = self._deserialize(
142
- "OpenIDConfiguration", pipeline_response.http_response
143
- )
125
+ deserialized = self._deserialize("OpenIDConfiguration", pipeline_response.http_response)
144
126
 
145
127
  if cls:
146
128
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -177,18 +159,14 @@ class WellKnownOperations:
177
159
  _request.url = self._client.format_url(_request.url)
178
160
 
179
161
  _stream = False
180
- pipeline_response: PipelineResponse = (
181
- await self._client._pipeline.run( # pylint: disable=protected-access
182
- _request, stream=_stream, **kwargs
183
- )
162
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
163
+ _request, stream=_stream, **kwargs
184
164
  )
185
165
 
186
166
  response = pipeline_response.http_response
187
167
 
188
168
  if response.status_code not in [200]:
189
- map_error(
190
- status_code=response.status_code, response=response, error_map=error_map
191
- )
169
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
192
170
  raise HttpResponseError(response=response)
193
171
 
194
172
  deserialized = self._deserialize("{object}", pipeline_response.http_response)
@@ -228,18 +206,14 @@ class WellKnownOperations:
228
206
  _request.url = self._client.format_url(_request.url)
229
207
 
230
208
  _stream = False
231
- pipeline_response: PipelineResponse = (
232
- await self._client._pipeline.run( # pylint: disable=protected-access
233
- _request, stream=_stream, **kwargs
234
- )
209
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
210
+ _request, stream=_stream, **kwargs
235
211
  )
236
212
 
237
213
  response = pipeline_response.http_response
238
214
 
239
215
  if response.status_code not in [200]:
240
- map_error(
241
- status_code=response.status_code, response=response, error_map=error_map
242
- )
216
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
243
217
  raise HttpResponseError(response=response)
244
218
 
245
219
  deserialized = self._deserialize("Metadata", pipeline_response.http_response)
@@ -249,6 +223,53 @@ class WellKnownOperations:
249
223
 
250
224
  return deserialized # type: ignore
251
225
 
226
+ @distributed_trace_async
227
+ async def get_security_txt(self, **kwargs: Any) -> str:
228
+ """Get Security Txt.
229
+
230
+ Get the security.txt file.
231
+
232
+ :return: str
233
+ :rtype: str
234
+ :raises ~azure.core.exceptions.HttpResponseError:
235
+ """
236
+ error_map: MutableMapping = {
237
+ 401: ClientAuthenticationError,
238
+ 404: ResourceNotFoundError,
239
+ 409: ResourceExistsError,
240
+ 304: ResourceNotModifiedError,
241
+ }
242
+ error_map.update(kwargs.pop("error_map", {}) or {})
243
+
244
+ _headers = kwargs.pop("headers", {}) or {}
245
+ _params = kwargs.pop("params", {}) or {}
246
+
247
+ cls: ClsType[str] = kwargs.pop("cls", None)
248
+
249
+ _request = build_well_known_get_security_txt_request(
250
+ headers=_headers,
251
+ params=_params,
252
+ )
253
+ _request.url = self._client.format_url(_request.url)
254
+
255
+ _stream = False
256
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
257
+ _request, stream=_stream, **kwargs
258
+ )
259
+
260
+ response = pipeline_response.http_response
261
+
262
+ if response.status_code not in [200]:
263
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
264
+ raise HttpResponseError(response=response)
265
+
266
+ deserialized = self._deserialize("str", pipeline_response.http_response)
267
+
268
+ if cls:
269
+ return cls(pipeline_response, deserialized, {}) # type: ignore
270
+
271
+ return deserialized # type: ignore
272
+
252
273
 
253
274
  class AuthOperations: # pylint: disable=abstract-class-instantiated
254
275
  """
@@ -264,18 +285,10 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
264
285
 
265
286
  def __init__(self, *args, **kwargs) -> None:
266
287
  input_args = list(args)
267
- self._client: AsyncPipelineClient = (
268
- input_args.pop(0) if input_args else kwargs.pop("client")
269
- )
270
- self._config: DiracConfiguration = (
271
- input_args.pop(0) if input_args else kwargs.pop("config")
272
- )
273
- self._serialize: Serializer = (
274
- input_args.pop(0) if input_args else kwargs.pop("serializer")
275
- )
276
- self._deserialize: Deserializer = (
277
- input_args.pop(0) if input_args else kwargs.pop("deserializer")
278
- )
288
+ self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
289
+ self._config: DiracConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
290
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
291
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
279
292
 
280
293
  raise_if_not_implemented(
281
294
  self.__class__,
@@ -344,23 +357,17 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
344
357
  _request.url = self._client.format_url(_request.url)
345
358
 
346
359
  _stream = False
347
- pipeline_response: PipelineResponse = (
348
- await self._client._pipeline.run( # pylint: disable=protected-access
349
- _request, stream=_stream, **kwargs
350
- )
360
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
361
+ _request, stream=_stream, **kwargs
351
362
  )
352
363
 
353
364
  response = pipeline_response.http_response
354
365
 
355
366
  if response.status_code not in [200]:
356
- map_error(
357
- status_code=response.status_code, response=response, error_map=error_map
358
- )
367
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
359
368
  raise HttpResponseError(response=response)
360
369
 
361
- deserialized = self._deserialize(
362
- "InitiateDeviceFlowResponse", pipeline_response.http_response
363
- )
370
+ deserialized = self._deserialize("InitiateDeviceFlowResponse", pipeline_response.http_response)
364
371
 
365
372
  if cls:
366
373
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -407,18 +414,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
407
414
  _request.url = self._client.format_url(_request.url)
408
415
 
409
416
  _stream = False
410
- pipeline_response: PipelineResponse = (
411
- await self._client._pipeline.run( # pylint: disable=protected-access
412
- _request, stream=_stream, **kwargs
413
- )
417
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
418
+ _request, stream=_stream, **kwargs
414
419
  )
415
420
 
416
421
  response = pipeline_response.http_response
417
422
 
418
423
  if response.status_code not in [200]:
419
- map_error(
420
- status_code=response.status_code, response=response, error_map=error_map
421
- )
424
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
422
425
  raise HttpResponseError(response=response)
423
426
 
424
427
  deserialized = self._deserialize("object", pipeline_response.http_response)
@@ -468,18 +471,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
468
471
  _request.url = self._client.format_url(_request.url)
469
472
 
470
473
  _stream = False
471
- pipeline_response: PipelineResponse = (
472
- await self._client._pipeline.run( # pylint: disable=protected-access
473
- _request, stream=_stream, **kwargs
474
- )
474
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
475
+ _request, stream=_stream, **kwargs
475
476
  )
476
477
 
477
478
  response = pipeline_response.http_response
478
479
 
479
480
  if response.status_code not in [200]:
480
- map_error(
481
- status_code=response.status_code, response=response, error_map=error_map
482
- )
481
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
483
482
  raise HttpResponseError(response=response)
484
483
 
485
484
  deserialized = self._deserialize("object", pipeline_response.http_response)
@@ -519,18 +518,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
519
518
  _request.url = self._client.format_url(_request.url)
520
519
 
521
520
  _stream = False
522
- pipeline_response: PipelineResponse = (
523
- await self._client._pipeline.run( # pylint: disable=protected-access
524
- _request, stream=_stream, **kwargs
525
- )
521
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
522
+ _request, stream=_stream, **kwargs
526
523
  )
527
524
 
528
525
  response = pipeline_response.http_response
529
526
 
530
527
  if response.status_code not in [200]:
531
- map_error(
532
- status_code=response.status_code, response=response, error_map=error_map
533
- )
528
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
534
529
  raise HttpResponseError(response=response)
535
530
 
536
531
  deserialized = self._deserialize("object", pipeline_response.http_response)
@@ -571,18 +566,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
571
566
  _request.url = self._client.format_url(_request.url)
572
567
 
573
568
  _stream = False
574
- pipeline_response: PipelineResponse = (
575
- await self._client._pipeline.run( # pylint: disable=protected-access
576
- _request, stream=_stream, **kwargs
577
- )
569
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
570
+ _request, stream=_stream, **kwargs
578
571
  )
579
572
 
580
573
  response = pipeline_response.http_response
581
574
 
582
575
  if response.status_code not in [200]:
583
- map_error(
584
- status_code=response.status_code, response=response, error_map=error_map
585
- )
576
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
586
577
  raise HttpResponseError(response=response)
587
578
 
588
579
  deserialized = self._deserialize("[object]", pipeline_response.http_response)
@@ -593,9 +584,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
593
584
  return deserialized # type: ignore
594
585
 
595
586
  @distributed_trace_async
596
- async def revoke_refresh_token_by_refresh_token(
597
- self, *, refresh_token: str, client_id: str, **kwargs: Any
598
- ) -> str:
587
+ async def revoke_refresh_token_by_refresh_token(self, *, refresh_token: str, client_id: str, **kwargs: Any) -> str:
599
588
  """Revoke Refresh Token By Refresh Token.
600
589
 
601
590
  Revoke a refresh token.
@@ -630,18 +619,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
630
619
  _request.url = self._client.format_url(_request.url)
631
620
 
632
621
  _stream = False
633
- pipeline_response: PipelineResponse = (
634
- await self._client._pipeline.run( # pylint: disable=protected-access
635
- _request, stream=_stream, **kwargs
636
- )
622
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
623
+ _request, stream=_stream, **kwargs
637
624
  )
638
625
 
639
626
  response = pipeline_response.http_response
640
627
 
641
628
  if response.status_code not in [200]:
642
- map_error(
643
- status_code=response.status_code, response=response, error_map=error_map
644
- )
629
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
645
630
  raise HttpResponseError(response=response)
646
631
 
647
632
  deserialized = self._deserialize("str", pipeline_response.http_response)
@@ -685,18 +670,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
685
670
  _request.url = self._client.format_url(_request.url)
686
671
 
687
672
  _stream = False
688
- pipeline_response: PipelineResponse = (
689
- await self._client._pipeline.run( # pylint: disable=protected-access
690
- _request, stream=_stream, **kwargs
691
- )
673
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
674
+ _request, stream=_stream, **kwargs
692
675
  )
693
676
 
694
677
  response = pipeline_response.http_response
695
678
 
696
679
  if response.status_code not in [200]:
697
- map_error(
698
- status_code=response.status_code, response=response, error_map=error_map
699
- )
680
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
700
681
  raise HttpResponseError(response=response)
701
682
 
702
683
  deserialized = self._deserialize("str", pipeline_response.http_response)
@@ -736,23 +717,17 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
736
717
  _request.url = self._client.format_url(_request.url)
737
718
 
738
719
  _stream = False
739
- pipeline_response: PipelineResponse = (
740
- await self._client._pipeline.run( # pylint: disable=protected-access
741
- _request, stream=_stream, **kwargs
742
- )
720
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
721
+ _request, stream=_stream, **kwargs
743
722
  )
744
723
 
745
724
  response = pipeline_response.http_response
746
725
 
747
726
  if response.status_code not in [200]:
748
- map_error(
749
- status_code=response.status_code, response=response, error_map=error_map
750
- )
727
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
751
728
  raise HttpResponseError(response=response)
752
729
 
753
- deserialized = self._deserialize(
754
- "UserInfoResponse", pipeline_response.http_response
755
- )
730
+ deserialized = self._deserialize("UserInfoResponse", pipeline_response.http_response)
756
731
 
757
732
  if cls:
758
733
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -770,7 +745,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
770
745
  redirect_uri: str,
771
746
  scope: str,
772
747
  state: str,
773
- **kwargs: Any,
748
+ **kwargs: Any
774
749
  ) -> Any:
775
750
  """Initiate Authorization Flow.
776
751
 
@@ -846,18 +821,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
846
821
  _request.url = self._client.format_url(_request.url)
847
822
 
848
823
  _stream = False
849
- pipeline_response: PipelineResponse = (
850
- await self._client._pipeline.run( # pylint: disable=protected-access
851
- _request, stream=_stream, **kwargs
852
- )
824
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
825
+ _request, stream=_stream, **kwargs
853
826
  )
854
827
 
855
828
  response = pipeline_response.http_response
856
829
 
857
830
  if response.status_code not in [200]:
858
- map_error(
859
- status_code=response.status_code, response=response, error_map=error_map
860
- )
831
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
861
832
  raise HttpResponseError(response=response)
862
833
 
863
834
  deserialized = self._deserialize("object", pipeline_response.http_response)
@@ -868,9 +839,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
868
839
  return deserialized # type: ignore
869
840
 
870
841
  @distributed_trace_async
871
- async def complete_authorization_flow(
872
- self, *, code: str, state: str, **kwargs: Any
873
- ) -> Any:
842
+ async def complete_authorization_flow(self, *, code: str, state: str, **kwargs: Any) -> Any:
874
843
  """Complete Authorization Flow.
875
844
 
876
845
  Complete the authorization flow.
@@ -911,18 +880,14 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
911
880
  _request.url = self._client.format_url(_request.url)
912
881
 
913
882
  _stream = False
914
- pipeline_response: PipelineResponse = (
915
- await self._client._pipeline.run( # pylint: disable=protected-access
916
- _request, stream=_stream, **kwargs
917
- )
883
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
884
+ _request, stream=_stream, **kwargs
918
885
  )
919
886
 
920
887
  response = pipeline_response.http_response
921
888
 
922
889
  if response.status_code not in [200]:
923
- map_error(
924
- status_code=response.status_code, response=response, error_map=error_map
925
- )
890
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
926
891
  raise HttpResponseError(response=response)
927
892
 
928
893
  deserialized = self._deserialize("object", pipeline_response.http_response)
@@ -947,18 +912,10 @@ class ConfigOperations:
947
912
 
948
913
  def __init__(self, *args, **kwargs) -> None:
949
914
  input_args = list(args)
950
- self._client: AsyncPipelineClient = (
951
- input_args.pop(0) if input_args else kwargs.pop("client")
952
- )
953
- self._config: DiracConfiguration = (
954
- input_args.pop(0) if input_args else kwargs.pop("config")
955
- )
956
- self._serialize: Serializer = (
957
- input_args.pop(0) if input_args else kwargs.pop("serializer")
958
- )
959
- self._deserialize: Deserializer = (
960
- input_args.pop(0) if input_args else kwargs.pop("deserializer")
961
- )
915
+ self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
916
+ self._config: DiracConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
917
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
918
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
962
919
 
963
920
  @distributed_trace_async
964
921
  async def serve_config(
@@ -967,7 +924,7 @@ class ConfigOperations:
967
924
  if_modified_since: Optional[str] = None,
968
925
  etag: Optional[str] = None,
969
926
  match_condition: Optional[MatchConditions] = None,
970
- **kwargs: Any,
927
+ **kwargs: Any
971
928
  ) -> Any:
972
929
  """Serve Config.
973
930
 
@@ -1018,18 +975,14 @@ class ConfigOperations:
1018
975
  _request.url = self._client.format_url(_request.url)
1019
976
 
1020
977
  _stream = False
1021
- pipeline_response: PipelineResponse = (
1022
- await self._client._pipeline.run( # pylint: disable=protected-access
1023
- _request, stream=_stream, **kwargs
1024
- )
978
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
979
+ _request, stream=_stream, **kwargs
1025
980
  )
1026
981
 
1027
982
  response = pipeline_response.http_response
1028
983
 
1029
984
  if response.status_code not in [200]:
1030
- map_error(
1031
- status_code=response.status_code, response=response, error_map=error_map
1032
- )
985
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
1033
986
  raise HttpResponseError(response=response)
1034
987
 
1035
988
  deserialized = self._deserialize("object", pipeline_response.http_response)
@@ -1054,26 +1007,14 @@ class JobsOperations:
1054
1007
 
1055
1008
  def __init__(self, *args, **kwargs) -> None:
1056
1009
  input_args = list(args)
1057
- self._client: AsyncPipelineClient = (
1058
- input_args.pop(0) if input_args else kwargs.pop("client")
1059
- )
1060
- self._config: DiracConfiguration = (
1061
- input_args.pop(0) if input_args else kwargs.pop("config")
1062
- )
1063
- self._serialize: Serializer = (
1064
- input_args.pop(0) if input_args else kwargs.pop("serializer")
1065
- )
1066
- self._deserialize: Deserializer = (
1067
- input_args.pop(0) if input_args else kwargs.pop("deserializer")
1068
- )
1010
+ self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
1011
+ self._config: DiracConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
1012
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
1013
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
1069
1014
 
1070
1015
  @overload
1071
1016
  async def initiate_sandbox_upload(
1072
- self,
1073
- body: _models.SandboxInfo,
1074
- *,
1075
- content_type: str = "application/json",
1076
- **kwargs: Any,
1017
+ self, body: _models.SandboxInfo, *, content_type: str = "application/json", **kwargs: Any
1077
1018
  ) -> _models.SandboxUploadResponse:
1078
1019
  """Initiate Sandbox Upload.
1079
1020
 
@@ -1150,9 +1091,7 @@ class JobsOperations:
1150
1091
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
1151
1092
  _params = kwargs.pop("params", {}) or {}
1152
1093
 
1153
- content_type: Optional[str] = kwargs.pop(
1154
- "content_type", _headers.pop("Content-Type", None)
1155
- )
1094
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
1156
1095
  cls: ClsType[_models.SandboxUploadResponse] = kwargs.pop("cls", None)
1157
1096
 
1158
1097
  content_type = content_type or "application/json"
@@ -1173,23 +1112,17 @@ class JobsOperations:
1173
1112
  _request.url = self._client.format_url(_request.url)
1174
1113
 
1175
1114
  _stream = False
1176
- pipeline_response: PipelineResponse = (
1177
- await self._client._pipeline.run( # pylint: disable=protected-access
1178
- _request, stream=_stream, **kwargs
1179
- )
1115
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1116
+ _request, stream=_stream, **kwargs
1180
1117
  )
1181
1118
 
1182
1119
  response = pipeline_response.http_response
1183
1120
 
1184
1121
  if response.status_code not in [200]:
1185
- map_error(
1186
- status_code=response.status_code, response=response, error_map=error_map
1187
- )
1122
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
1188
1123
  raise HttpResponseError(response=response)
1189
1124
 
1190
- deserialized = self._deserialize(
1191
- "SandboxUploadResponse", pipeline_response.http_response
1192
- )
1125
+ deserialized = self._deserialize("SandboxUploadResponse", pipeline_response.http_response)
1193
1126
 
1194
1127
  if cls:
1195
1128
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1197,9 +1130,7 @@ class JobsOperations:
1197
1130
  return deserialized # type: ignore
1198
1131
 
1199
1132
  @distributed_trace_async
1200
- async def get_sandbox_file(
1201
- self, *, pfn: str, **kwargs: Any
1202
- ) -> _models.SandboxDownloadResponse:
1133
+ async def get_sandbox_file(self, *, pfn: str, **kwargs: Any) -> _models.SandboxDownloadResponse:
1203
1134
  """Get Sandbox File.
1204
1135
 
1205
1136
  Get a presigned URL to download a sandbox file.
@@ -1237,23 +1168,17 @@ class JobsOperations:
1237
1168
  _request.url = self._client.format_url(_request.url)
1238
1169
 
1239
1170
  _stream = False
1240
- pipeline_response: PipelineResponse = (
1241
- await self._client._pipeline.run( # pylint: disable=protected-access
1242
- _request, stream=_stream, **kwargs
1243
- )
1171
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1172
+ _request, stream=_stream, **kwargs
1244
1173
  )
1245
1174
 
1246
1175
  response = pipeline_response.http_response
1247
1176
 
1248
1177
  if response.status_code not in [200]:
1249
- map_error(
1250
- status_code=response.status_code, response=response, error_map=error_map
1251
- )
1178
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
1252
1179
  raise HttpResponseError(response=response)
1253
1180
 
1254
- deserialized = self._deserialize(
1255
- "SandboxDownloadResponse", pipeline_response.http_response
1256
- )
1181
+ deserialized = self._deserialize("SandboxDownloadResponse", pipeline_response.http_response)
1257
1182
 
1258
1183
  if cls:
1259
1184
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1261,65 +1186,7 @@ class JobsOperations:
1261
1186
  return deserialized # type: ignore
1262
1187
 
1263
1188
  @distributed_trace_async
1264
- async def unassign_bulk_jobs_sandboxes(
1265
- self, *, jobs_ids: List[int], **kwargs: Any
1266
- ) -> Any:
1267
- """Unassign Bulk Jobs Sandboxes.
1268
-
1269
- Delete bulk jobs sandbox mapping.
1270
-
1271
- :keyword jobs_ids: Required.
1272
- :paramtype jobs_ids: list[int]
1273
- :return: any
1274
- :rtype: any
1275
- :raises ~azure.core.exceptions.HttpResponseError:
1276
- """
1277
- error_map: MutableMapping = {
1278
- 401: ClientAuthenticationError,
1279
- 404: ResourceNotFoundError,
1280
- 409: ResourceExistsError,
1281
- 304: ResourceNotModifiedError,
1282
- }
1283
- error_map.update(kwargs.pop("error_map", {}) or {})
1284
-
1285
- _headers = kwargs.pop("headers", {}) or {}
1286
- _params = kwargs.pop("params", {}) or {}
1287
-
1288
- cls: ClsType[Any] = kwargs.pop("cls", None)
1289
-
1290
- _request = build_jobs_unassign_bulk_jobs_sandboxes_request(
1291
- jobs_ids=jobs_ids,
1292
- headers=_headers,
1293
- params=_params,
1294
- )
1295
- _request.url = self._client.format_url(_request.url)
1296
-
1297
- _stream = False
1298
- pipeline_response: PipelineResponse = (
1299
- await self._client._pipeline.run( # pylint: disable=protected-access
1300
- _request, stream=_stream, **kwargs
1301
- )
1302
- )
1303
-
1304
- response = pipeline_response.http_response
1305
-
1306
- if response.status_code not in [200]:
1307
- map_error(
1308
- status_code=response.status_code, response=response, error_map=error_map
1309
- )
1310
- raise HttpResponseError(response=response)
1311
-
1312
- deserialized = self._deserialize("object", pipeline_response.http_response)
1313
-
1314
- if cls:
1315
- return cls(pipeline_response, deserialized, {}) # type: ignore
1316
-
1317
- return deserialized # type: ignore
1318
-
1319
- @distributed_trace_async
1320
- async def get_job_sandboxes(
1321
- self, job_id: int, **kwargs: Any
1322
- ) -> Dict[str, List[Any]]:
1189
+ async def get_job_sandboxes(self, job_id: int, **kwargs: Any) -> Dict[str, List[Any]]:
1323
1190
  """Get Job Sandboxes.
1324
1191
 
1325
1192
  Get input and output sandboxes of given job.
@@ -1351,18 +1218,14 @@ class JobsOperations:
1351
1218
  _request.url = self._client.format_url(_request.url)
1352
1219
 
1353
1220
  _stream = False
1354
- pipeline_response: PipelineResponse = (
1355
- await self._client._pipeline.run( # pylint: disable=protected-access
1356
- _request, stream=_stream, **kwargs
1357
- )
1221
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1222
+ _request, stream=_stream, **kwargs
1358
1223
  )
1359
1224
 
1360
1225
  response = pipeline_response.http_response
1361
1226
 
1362
1227
  if response.status_code not in [200]:
1363
- map_error(
1364
- status_code=response.status_code, response=response, error_map=error_map
1365
- )
1228
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
1366
1229
  raise HttpResponseError(response=response)
1367
1230
 
1368
1231
  deserialized = self._deserialize("{[object]}", pipeline_response.http_response)
@@ -1405,18 +1268,14 @@ class JobsOperations:
1405
1268
  _request.url = self._client.format_url(_request.url)
1406
1269
 
1407
1270
  _stream = False
1408
- pipeline_response: PipelineResponse = (
1409
- await self._client._pipeline.run( # pylint: disable=protected-access
1410
- _request, stream=_stream, **kwargs
1411
- )
1271
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1272
+ _request, stream=_stream, **kwargs
1412
1273
  )
1413
1274
 
1414
1275
  response = pipeline_response.http_response
1415
1276
 
1416
1277
  if response.status_code not in [200]:
1417
- map_error(
1418
- status_code=response.status_code, response=response, error_map=error_map
1419
- )
1278
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
1420
1279
  raise HttpResponseError(response=response)
1421
1280
 
1422
1281
  deserialized = self._deserialize("object", pipeline_response.http_response)
@@ -1464,18 +1323,14 @@ class JobsOperations:
1464
1323
  _request.url = self._client.format_url(_request.url)
1465
1324
 
1466
1325
  _stream = False
1467
- pipeline_response: PipelineResponse = (
1468
- await self._client._pipeline.run( # pylint: disable=protected-access
1469
- _request, stream=_stream, **kwargs
1470
- )
1326
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1327
+ _request, stream=_stream, **kwargs
1471
1328
  )
1472
1329
 
1473
1330
  response = pipeline_response.http_response
1474
1331
 
1475
1332
  if response.status_code not in [200]:
1476
- map_error(
1477
- status_code=response.status_code, response=response, error_map=error_map
1478
- )
1333
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
1479
1334
  raise HttpResponseError(response=response)
1480
1335
 
1481
1336
  deserialized = self._deserialize("[object]", pipeline_response.http_response)
@@ -1510,9 +1365,7 @@ class JobsOperations:
1510
1365
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
1511
1366
  _params = kwargs.pop("params", {}) or {}
1512
1367
 
1513
- content_type: str = kwargs.pop(
1514
- "content_type", _headers.pop("Content-Type", "application/json")
1515
- )
1368
+ content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json"))
1516
1369
  cls: ClsType[Any] = kwargs.pop("cls", None)
1517
1370
 
1518
1371
  _content = self._serialize.body(body, "str")
@@ -1527,18 +1380,14 @@ class JobsOperations:
1527
1380
  _request.url = self._client.format_url(_request.url)
1528
1381
 
1529
1382
  _stream = False
1530
- pipeline_response: PipelineResponse = (
1531
- await self._client._pipeline.run( # pylint: disable=protected-access
1532
- _request, stream=_stream, **kwargs
1533
- )
1383
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1384
+ _request, stream=_stream, **kwargs
1534
1385
  )
1535
1386
 
1536
1387
  response = pipeline_response.http_response
1537
1388
 
1538
1389
  if response.status_code not in [200]:
1539
- map_error(
1540
- status_code=response.status_code, response=response, error_map=error_map
1541
- )
1390
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
1542
1391
  raise HttpResponseError(response=response)
1543
1392
 
1544
1393
  deserialized = self._deserialize("object", pipeline_response.http_response)
@@ -1548,21 +1397,54 @@ class JobsOperations:
1548
1397
 
1549
1398
  return deserialized # type: ignore
1550
1399
 
1551
- @distributed_trace_async
1552
- async def remove_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
1553
- """Remove Jobs.
1400
+ @overload
1401
+ async def unassign_bulk_jobs_sandboxes(
1402
+ self, body: _models.BodyJobsUnassignBulkJobsSandboxes, *, content_type: str = "application/json", **kwargs: Any
1403
+ ) -> None:
1404
+ """Unassign Bulk Jobs Sandboxes.
1554
1405
 
1555
- Fully remove a list of jobs from the WMS databases.
1406
+ Delete bulk jobs sandbox mapping.
1556
1407
 
1557
- WARNING: This endpoint has been implemented for the compatibility with the legacy DIRAC WMS
1558
- and the JobCleaningAgent. However, once this agent is ported to diracx, this endpoint should
1559
- be removed, and a status change to Deleted (PATCH /jobs/status) should be used instead for any
1560
- other purpose.
1408
+ :param body: Required.
1409
+ :type body: ~_generated.models.BodyJobsUnassignBulkJobsSandboxes
1410
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
1411
+ Default value is "application/json".
1412
+ :paramtype content_type: str
1413
+ :return: None
1414
+ :rtype: None
1415
+ :raises ~azure.core.exceptions.HttpResponseError:
1416
+ """
1561
1417
 
1562
- :keyword job_ids: Required.
1563
- :paramtype job_ids: list[int]
1564
- :return: any
1565
- :rtype: any
1418
+ @overload
1419
+ async def unassign_bulk_jobs_sandboxes(
1420
+ self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
1421
+ ) -> None:
1422
+ """Unassign Bulk Jobs Sandboxes.
1423
+
1424
+ Delete bulk jobs sandbox mapping.
1425
+
1426
+ :param body: Required.
1427
+ :type body: IO[bytes]
1428
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
1429
+ Default value is "application/json".
1430
+ :paramtype content_type: str
1431
+ :return: None
1432
+ :rtype: None
1433
+ :raises ~azure.core.exceptions.HttpResponseError:
1434
+ """
1435
+
1436
+ @distributed_trace_async
1437
+ async def unassign_bulk_jobs_sandboxes(
1438
+ self, body: Union[_models.BodyJobsUnassignBulkJobsSandboxes, IO[bytes]], **kwargs: Any
1439
+ ) -> None:
1440
+ """Unassign Bulk Jobs Sandboxes.
1441
+
1442
+ Delete bulk jobs sandbox mapping.
1443
+
1444
+ :param body: Is either a BodyJobsUnassignBulkJobsSandboxes type or a IO[bytes] type. Required.
1445
+ :type body: ~_generated.models.BodyJobsUnassignBulkJobsSandboxes or IO[bytes]
1446
+ :return: None
1447
+ :rtype: None
1566
1448
  :raises ~azure.core.exceptions.HttpResponseError:
1567
1449
  """
1568
1450
  error_map: MutableMapping = {
@@ -1573,39 +1455,42 @@ class JobsOperations:
1573
1455
  }
1574
1456
  error_map.update(kwargs.pop("error_map", {}) or {})
1575
1457
 
1576
- _headers = kwargs.pop("headers", {}) or {}
1458
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
1577
1459
  _params = kwargs.pop("params", {}) or {}
1578
1460
 
1579
- cls: ClsType[Any] = kwargs.pop("cls", None)
1461
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
1462
+ cls: ClsType[None] = kwargs.pop("cls", None)
1580
1463
 
1581
- _request = build_jobs_remove_jobs_request(
1582
- job_ids=job_ids,
1464
+ content_type = content_type or "application/json"
1465
+ _json = None
1466
+ _content = None
1467
+ if isinstance(body, (IOBase, bytes)):
1468
+ _content = body
1469
+ else:
1470
+ _json = self._serialize.body(body, "BodyJobsUnassignBulkJobsSandboxes")
1471
+
1472
+ _request = build_jobs_unassign_bulk_jobs_sandboxes_request(
1473
+ content_type=content_type,
1474
+ json=_json,
1475
+ content=_content,
1583
1476
  headers=_headers,
1584
1477
  params=_params,
1585
1478
  )
1586
1479
  _request.url = self._client.format_url(_request.url)
1587
1480
 
1588
1481
  _stream = False
1589
- pipeline_response: PipelineResponse = (
1590
- await self._client._pipeline.run( # pylint: disable=protected-access
1591
- _request, stream=_stream, **kwargs
1592
- )
1482
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1483
+ _request, stream=_stream, **kwargs
1593
1484
  )
1594
1485
 
1595
1486
  response = pipeline_response.http_response
1596
1487
 
1597
- if response.status_code not in [200]:
1598
- map_error(
1599
- status_code=response.status_code, response=response, error_map=error_map
1600
- )
1488
+ if response.status_code not in [204]:
1489
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
1601
1490
  raise HttpResponseError(response=response)
1602
1491
 
1603
- deserialized = self._deserialize("object", pipeline_response.http_response)
1604
-
1605
1492
  if cls:
1606
- return cls(pipeline_response, deserialized, {}) # type: ignore
1607
-
1608
- return deserialized # type: ignore
1493
+ return cls(pipeline_response, None, {}) # type: ignore
1609
1494
 
1610
1495
  @overload
1611
1496
  async def set_job_statuses(
@@ -1614,11 +1499,19 @@ class JobsOperations:
1614
1499
  *,
1615
1500
  force: bool = False,
1616
1501
  content_type: str = "application/json",
1617
- **kwargs: Any,
1502
+ **kwargs: Any
1618
1503
  ) -> _models.SetJobStatusReturn:
1619
1504
  """Set Job Statuses.
1620
1505
 
1621
- Set Job Statuses.
1506
+ Set the status of a job or a list of jobs.
1507
+
1508
+ Body parameters:
1509
+
1510
+
1511
+ * ``Status``\\ : The new status of the job.
1512
+ * ``MinorStatus``\\ : The minor status of the job.
1513
+ * ``ApplicationStatus``\\ : The application-specific status of the job.
1514
+ * ``Source``\\ : The source of the status update (default is "Unknown").
1622
1515
 
1623
1516
  :param body: Required.
1624
1517
  :type body: dict[str, dict[str, ~_generated.models.JobStatusUpdate]]
@@ -1634,16 +1527,19 @@ class JobsOperations:
1634
1527
 
1635
1528
  @overload
1636
1529
  async def set_job_statuses(
1637
- self,
1638
- body: IO[bytes],
1639
- *,
1640
- force: bool = False,
1641
- content_type: str = "application/json",
1642
- **kwargs: Any,
1530
+ self, body: IO[bytes], *, force: bool = False, content_type: str = "application/json", **kwargs: Any
1643
1531
  ) -> _models.SetJobStatusReturn:
1644
1532
  """Set Job Statuses.
1645
1533
 
1646
- Set Job Statuses.
1534
+ Set the status of a job or a list of jobs.
1535
+
1536
+ Body parameters:
1537
+
1538
+
1539
+ * ``Status``\\ : The new status of the job.
1540
+ * ``MinorStatus``\\ : The minor status of the job.
1541
+ * ``ApplicationStatus``\\ : The application-specific status of the job.
1542
+ * ``Source``\\ : The source of the status update (default is "Unknown").
1647
1543
 
1648
1544
  :param body: Required.
1649
1545
  :type body: IO[bytes]
@@ -1663,11 +1559,19 @@ class JobsOperations:
1663
1559
  body: Union[Dict[str, Dict[str, _models.JobStatusUpdate]], IO[bytes]],
1664
1560
  *,
1665
1561
  force: bool = False,
1666
- **kwargs: Any,
1562
+ **kwargs: Any
1667
1563
  ) -> _models.SetJobStatusReturn:
1668
1564
  """Set Job Statuses.
1669
1565
 
1670
- Set Job Statuses.
1566
+ Set the status of a job or a list of jobs.
1567
+
1568
+ Body parameters:
1569
+
1570
+
1571
+ * ``Status``\\ : The new status of the job.
1572
+ * ``MinorStatus``\\ : The minor status of the job.
1573
+ * ``ApplicationStatus``\\ : The application-specific status of the job.
1574
+ * ``Source``\\ : The source of the status update (default is "Unknown").
1671
1575
 
1672
1576
  :param body: Is either a {str: {str: JobStatusUpdate}} type or a IO[bytes] type. Required.
1673
1577
  :type body: dict[str, dict[str, ~_generated.models.JobStatusUpdate]] or IO[bytes]
@@ -1688,9 +1592,7 @@ class JobsOperations:
1688
1592
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
1689
1593
  _params = kwargs.pop("params", {}) or {}
1690
1594
 
1691
- content_type: Optional[str] = kwargs.pop(
1692
- "content_type", _headers.pop("Content-Type", None)
1693
- )
1595
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
1694
1596
  cls: ClsType[_models.SetJobStatusReturn] = kwargs.pop("cls", None)
1695
1597
 
1696
1598
  content_type = content_type or "application/json"
@@ -1712,23 +1614,17 @@ class JobsOperations:
1712
1614
  _request.url = self._client.format_url(_request.url)
1713
1615
 
1714
1616
  _stream = False
1715
- pipeline_response: PipelineResponse = (
1716
- await self._client._pipeline.run( # pylint: disable=protected-access
1717
- _request, stream=_stream, **kwargs
1718
- )
1617
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1618
+ _request, stream=_stream, **kwargs
1719
1619
  )
1720
1620
 
1721
1621
  response = pipeline_response.http_response
1722
1622
 
1723
1623
  if response.status_code not in [200]:
1724
- map_error(
1725
- status_code=response.status_code, response=response, error_map=error_map
1726
- )
1624
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
1727
1625
  raise HttpResponseError(response=response)
1728
1626
 
1729
- deserialized = self._deserialize(
1730
- "SetJobStatusReturn", pipeline_response.http_response
1731
- )
1627
+ deserialized = self._deserialize("SetJobStatusReturn", pipeline_response.http_response)
1732
1628
 
1733
1629
  if cls:
1734
1630
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1737,11 +1633,7 @@ class JobsOperations:
1737
1633
 
1738
1634
  @overload
1739
1635
  async def add_heartbeat(
1740
- self,
1741
- body: Dict[str, _models.HeartbeatData],
1742
- *,
1743
- content_type: str = "application/json",
1744
- **kwargs: Any,
1636
+ self, body: Dict[str, _models.HeartbeatData], *, content_type: str = "application/json", **kwargs: Any
1745
1637
  ) -> List[_models.JobCommand]:
1746
1638
  """Add Heartbeat.
1747
1639
 
@@ -1818,9 +1710,7 @@ class JobsOperations:
1818
1710
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
1819
1711
  _params = kwargs.pop("params", {}) or {}
1820
1712
 
1821
- content_type: Optional[str] = kwargs.pop(
1822
- "content_type", _headers.pop("Content-Type", None)
1823
- )
1713
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
1824
1714
  cls: ClsType[List[_models.JobCommand]] = kwargs.pop("cls", None)
1825
1715
 
1826
1716
  content_type = content_type or "application/json"
@@ -1841,39 +1731,96 @@ class JobsOperations:
1841
1731
  _request.url = self._client.format_url(_request.url)
1842
1732
 
1843
1733
  _stream = False
1844
- pipeline_response: PipelineResponse = (
1845
- await self._client._pipeline.run( # pylint: disable=protected-access
1846
- _request, stream=_stream, **kwargs
1847
- )
1734
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1735
+ _request, stream=_stream, **kwargs
1848
1736
  )
1849
1737
 
1850
1738
  response = pipeline_response.http_response
1851
1739
 
1852
1740
  if response.status_code not in [200]:
1853
- map_error(
1854
- status_code=response.status_code, response=response, error_map=error_map
1855
- )
1741
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
1856
1742
  raise HttpResponseError(response=response)
1857
1743
 
1858
- deserialized = self._deserialize(
1859
- "[JobCommand]", pipeline_response.http_response
1860
- )
1744
+ deserialized = self._deserialize("[JobCommand]", pipeline_response.http_response)
1861
1745
 
1862
1746
  if cls:
1863
1747
  return cls(pipeline_response, deserialized, {}) # type: ignore
1864
1748
 
1865
1749
  return deserialized # type: ignore
1866
1750
 
1751
+ @overload
1752
+ async def reschedule_jobs(
1753
+ self,
1754
+ body: _models.BodyJobsRescheduleJobs,
1755
+ *,
1756
+ reset_jobs: bool = False,
1757
+ content_type: str = "application/json",
1758
+ **kwargs: Any
1759
+ ) -> Dict[str, Any]:
1760
+ """Reschedule Jobs.
1761
+
1762
+ Reschedule a list of killed or failed jobs.
1763
+
1764
+ Body parameters:
1765
+
1766
+
1767
+ * ``job_ids``\\ : List of job IDs to reschedule.
1768
+ * ``reset_jobs``\\ : If True, reset the count of reschedules for the jobs.
1769
+
1770
+ :param body: Required.
1771
+ :type body: ~_generated.models.BodyJobsRescheduleJobs
1772
+ :keyword reset_jobs: Default value is False.
1773
+ :paramtype reset_jobs: bool
1774
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
1775
+ Default value is "application/json".
1776
+ :paramtype content_type: str
1777
+ :return: dict mapping str to any
1778
+ :rtype: dict[str, any]
1779
+ :raises ~azure.core.exceptions.HttpResponseError:
1780
+ """
1781
+
1782
+ @overload
1783
+ async def reschedule_jobs(
1784
+ self, body: IO[bytes], *, reset_jobs: bool = False, content_type: str = "application/json", **kwargs: Any
1785
+ ) -> Dict[str, Any]:
1786
+ """Reschedule Jobs.
1787
+
1788
+ Reschedule a list of killed or failed jobs.
1789
+
1790
+ Body parameters:
1791
+
1792
+
1793
+ * ``job_ids``\\ : List of job IDs to reschedule.
1794
+ * ``reset_jobs``\\ : If True, reset the count of reschedules for the jobs.
1795
+
1796
+ :param body: Required.
1797
+ :type body: IO[bytes]
1798
+ :keyword reset_jobs: Default value is False.
1799
+ :paramtype reset_jobs: bool
1800
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
1801
+ Default value is "application/json".
1802
+ :paramtype content_type: str
1803
+ :return: dict mapping str to any
1804
+ :rtype: dict[str, any]
1805
+ :raises ~azure.core.exceptions.HttpResponseError:
1806
+ """
1807
+
1867
1808
  @distributed_trace_async
1868
1809
  async def reschedule_jobs(
1869
- self, *, job_ids: List[int], reset_jobs: bool = False, **kwargs: Any
1810
+ self, body: Union[_models.BodyJobsRescheduleJobs, IO[bytes]], *, reset_jobs: bool = False, **kwargs: Any
1870
1811
  ) -> Dict[str, Any]:
1871
1812
  """Reschedule Jobs.
1872
1813
 
1873
- Reschedule Jobs.
1814
+ Reschedule a list of killed or failed jobs.
1815
+
1816
+ Body parameters:
1874
1817
 
1875
- :keyword job_ids: Required.
1876
- :paramtype job_ids: list[int]
1818
+
1819
+ * ``job_ids``\\ : List of job IDs to reschedule.
1820
+ * ``reset_jobs``\\ : If True, reset the count of reschedules for the jobs.
1821
+
1822
+ :param body: Is either a BodyJobsRescheduleJobs type or a IO[bytes] type. Required.
1823
+ :type body: ~_generated.models.BodyJobsRescheduleJobs or IO[bytes]
1877
1824
  :keyword reset_jobs: Default value is False.
1878
1825
  :paramtype reset_jobs: bool
1879
1826
  :return: dict mapping str to any
@@ -1888,32 +1835,39 @@ class JobsOperations:
1888
1835
  }
1889
1836
  error_map.update(kwargs.pop("error_map", {}) or {})
1890
1837
 
1891
- _headers = kwargs.pop("headers", {}) or {}
1838
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
1892
1839
  _params = kwargs.pop("params", {}) or {}
1893
1840
 
1841
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
1894
1842
  cls: ClsType[Dict[str, Any]] = kwargs.pop("cls", None)
1895
1843
 
1844
+ content_type = content_type or "application/json"
1845
+ _json = None
1846
+ _content = None
1847
+ if isinstance(body, (IOBase, bytes)):
1848
+ _content = body
1849
+ else:
1850
+ _json = self._serialize.body(body, "BodyJobsRescheduleJobs")
1851
+
1896
1852
  _request = build_jobs_reschedule_jobs_request(
1897
- job_ids=job_ids,
1898
1853
  reset_jobs=reset_jobs,
1854
+ content_type=content_type,
1855
+ json=_json,
1856
+ content=_content,
1899
1857
  headers=_headers,
1900
1858
  params=_params,
1901
1859
  )
1902
1860
  _request.url = self._client.format_url(_request.url)
1903
1861
 
1904
1862
  _stream = False
1905
- pipeline_response: PipelineResponse = (
1906
- await self._client._pipeline.run( # pylint: disable=protected-access
1907
- _request, stream=_stream, **kwargs
1908
- )
1863
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1864
+ _request, stream=_stream, **kwargs
1909
1865
  )
1910
1866
 
1911
1867
  response = pipeline_response.http_response
1912
1868
 
1913
1869
  if response.status_code not in [200]:
1914
- map_error(
1915
- status_code=response.status_code, response=response, error_map=error_map
1916
- )
1870
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
1917
1871
  raise HttpResponseError(response=response)
1918
1872
 
1919
1873
  deserialized = self._deserialize("{object}", pipeline_response.http_response)
@@ -1925,18 +1879,15 @@ class JobsOperations:
1925
1879
 
1926
1880
  @overload
1927
1881
  async def patch_metadata(
1928
- self,
1929
- body: Dict[str, Dict[str, Any]],
1930
- *,
1931
- content_type: str = "application/json",
1932
- **kwargs: Any,
1882
+ self, body: Dict[str, _models.JobMetaData], *, content_type: str = "application/json", **kwargs: Any
1933
1883
  ) -> None:
1934
1884
  """Patch Metadata.
1935
1885
 
1936
- Patch Metadata.
1886
+ Update job metadata such as UserPriority, HeartBeatTime, JobType, etc.
1887
+ The argument are all the attributes/parameters of a job (except the ID).
1937
1888
 
1938
1889
  :param body: Required.
1939
- :type body: dict[str, dict[str, any]]
1890
+ :type body: dict[str, ~_generated.models.JobMetaData]
1940
1891
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
1941
1892
  Default value is "application/json".
1942
1893
  :paramtype content_type: str
@@ -1946,12 +1897,11 @@ class JobsOperations:
1946
1897
  """
1947
1898
 
1948
1899
  @overload
1949
- async def patch_metadata(
1950
- self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
1951
- ) -> None:
1900
+ async def patch_metadata(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None:
1952
1901
  """Patch Metadata.
1953
1902
 
1954
- Patch Metadata.
1903
+ Update job metadata such as UserPriority, HeartBeatTime, JobType, etc.
1904
+ The argument are all the attributes/parameters of a job (except the ID).
1955
1905
 
1956
1906
  :param body: Required.
1957
1907
  :type body: IO[bytes]
@@ -1964,15 +1914,14 @@ class JobsOperations:
1964
1914
  """
1965
1915
 
1966
1916
  @distributed_trace_async
1967
- async def patch_metadata(
1968
- self, body: Union[Dict[str, Dict[str, Any]], IO[bytes]], **kwargs: Any
1969
- ) -> None:
1917
+ async def patch_metadata(self, body: Union[Dict[str, _models.JobMetaData], IO[bytes]], **kwargs: Any) -> None:
1970
1918
  """Patch Metadata.
1971
1919
 
1972
- Patch Metadata.
1920
+ Update job metadata such as UserPriority, HeartBeatTime, JobType, etc.
1921
+ The argument are all the attributes/parameters of a job (except the ID).
1973
1922
 
1974
- :param body: Is either a {str: {str: Any}} type or a IO[bytes] type. Required.
1975
- :type body: dict[str, dict[str, any]] or IO[bytes]
1923
+ :param body: Is either a {str: JobMetaData} type or a IO[bytes] type. Required.
1924
+ :type body: dict[str, ~_generated.models.JobMetaData] or IO[bytes]
1976
1925
  :return: None
1977
1926
  :rtype: None
1978
1927
  :raises ~azure.core.exceptions.HttpResponseError:
@@ -1988,9 +1937,7 @@ class JobsOperations:
1988
1937
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
1989
1938
  _params = kwargs.pop("params", {}) or {}
1990
1939
 
1991
- content_type: Optional[str] = kwargs.pop(
1992
- "content_type", _headers.pop("Content-Type", None)
1993
- )
1940
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
1994
1941
  cls: ClsType[None] = kwargs.pop("cls", None)
1995
1942
 
1996
1943
  content_type = content_type or "application/json"
@@ -1999,7 +1946,7 @@ class JobsOperations:
1999
1946
  if isinstance(body, (IOBase, bytes)):
2000
1947
  _content = body
2001
1948
  else:
2002
- _json = self._serialize.body(body, "{{object}}")
1949
+ _json = self._serialize.body(body, "{JobMetaData}")
2003
1950
 
2004
1951
  _request = build_jobs_patch_metadata_request(
2005
1952
  content_type=content_type,
@@ -2011,18 +1958,14 @@ class JobsOperations:
2011
1958
  _request.url = self._client.format_url(_request.url)
2012
1959
 
2013
1960
  _stream = False
2014
- pipeline_response: PipelineResponse = (
2015
- await self._client._pipeline.run( # pylint: disable=protected-access
2016
- _request, stream=_stream, **kwargs
2017
- )
1961
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1962
+ _request, stream=_stream, **kwargs
2018
1963
  )
2019
1964
 
2020
1965
  response = pipeline_response.http_response
2021
1966
 
2022
1967
  if response.status_code not in [204]:
2023
- map_error(
2024
- status_code=response.status_code, response=response, error_map=error_map
2025
- )
1968
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
2026
1969
  raise HttpResponseError(response=response)
2027
1970
 
2028
1971
  if cls:
@@ -2031,21 +1974,30 @@ class JobsOperations:
2031
1974
  @overload
2032
1975
  async def search(
2033
1976
  self,
2034
- body: Optional[_models.JobSearchParams] = None,
1977
+ body: Optional[_models.SearchParams] = None,
2035
1978
  *,
2036
1979
  page: int = 1,
2037
1980
  per_page: int = 100,
2038
1981
  content_type: str = "application/json",
2039
- **kwargs: Any,
1982
+ **kwargs: Any
2040
1983
  ) -> List[Dict[str, Any]]:
2041
1984
  """Search.
2042
1985
 
2043
- Retrieve information about jobs.
1986
+ Creates a search query to the job database. This search can be based on
1987
+ different parameters, such as jobID, status, owner, etc.
2044
1988
 
2045
- **TODO: Add more docs**.
1989
+ **Possibilities**
1990
+
1991
+
1992
+ * Use ``search`` to filter jobs based on various parameters (optional).
1993
+ * Use ``parameters`` to specify which job parameters to return (optional).
1994
+ * Use ``sort`` to order the results based on specific parameters (optional).
1995
+
1996
+ By default, the search will return all jobs the user has access to, and all the fields
1997
+ of the job will be returned.
2046
1998
 
2047
1999
  :param body: Default value is None.
2048
- :type body: ~_generated.models.JobSearchParams
2000
+ :type body: ~_generated.models.SearchParams
2049
2001
  :keyword page: Default value is 1.
2050
2002
  :paramtype page: int
2051
2003
  :keyword per_page: Default value is 100.
@@ -2066,13 +2018,22 @@ class JobsOperations:
2066
2018
  page: int = 1,
2067
2019
  per_page: int = 100,
2068
2020
  content_type: str = "application/json",
2069
- **kwargs: Any,
2021
+ **kwargs: Any
2070
2022
  ) -> List[Dict[str, Any]]:
2071
2023
  """Search.
2072
2024
 
2073
- Retrieve information about jobs.
2025
+ Creates a search query to the job database. This search can be based on
2026
+ different parameters, such as jobID, status, owner, etc.
2027
+
2028
+ **Possibilities**
2029
+
2074
2030
 
2075
- **TODO: Add more docs**.
2031
+ * Use ``search`` to filter jobs based on various parameters (optional).
2032
+ * Use ``parameters`` to specify which job parameters to return (optional).
2033
+ * Use ``sort`` to order the results based on specific parameters (optional).
2034
+
2035
+ By default, the search will return all jobs the user has access to, and all the fields
2036
+ of the job will be returned.
2076
2037
 
2077
2038
  :param body: Default value is None.
2078
2039
  :type body: IO[bytes]
@@ -2091,20 +2052,29 @@ class JobsOperations:
2091
2052
  @distributed_trace_async
2092
2053
  async def search(
2093
2054
  self,
2094
- body: Optional[Union[_models.JobSearchParams, IO[bytes]]] = None,
2055
+ body: Optional[Union[_models.SearchParams, IO[bytes]]] = None,
2095
2056
  *,
2096
2057
  page: int = 1,
2097
2058
  per_page: int = 100,
2098
- **kwargs: Any,
2059
+ **kwargs: Any
2099
2060
  ) -> List[Dict[str, Any]]:
2100
2061
  """Search.
2101
2062
 
2102
- Retrieve information about jobs.
2063
+ Creates a search query to the job database. This search can be based on
2064
+ different parameters, such as jobID, status, owner, etc.
2065
+
2066
+ **Possibilities**
2067
+
2103
2068
 
2104
- **TODO: Add more docs**.
2069
+ * Use ``search`` to filter jobs based on various parameters (optional).
2070
+ * Use ``parameters`` to specify which job parameters to return (optional).
2071
+ * Use ``sort`` to order the results based on specific parameters (optional).
2105
2072
 
2106
- :param body: Is either a JobSearchParams type or a IO[bytes] type. Default value is None.
2107
- :type body: ~_generated.models.JobSearchParams or IO[bytes]
2073
+ By default, the search will return all jobs the user has access to, and all the fields
2074
+ of the job will be returned.
2075
+
2076
+ :param body: Is either a SearchParams type or a IO[bytes] type. Default value is None.
2077
+ :type body: ~_generated.models.SearchParams or IO[bytes]
2108
2078
  :keyword page: Default value is 1.
2109
2079
  :paramtype page: int
2110
2080
  :keyword per_page: Default value is 100.
@@ -2124,9 +2094,7 @@ class JobsOperations:
2124
2094
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
2125
2095
  _params = kwargs.pop("params", {}) or {}
2126
2096
 
2127
- content_type: Optional[str] = kwargs.pop(
2128
- "content_type", _headers.pop("Content-Type", None)
2129
- )
2097
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
2130
2098
  cls: ClsType[List[Dict[str, Any]]] = kwargs.pop("cls", None)
2131
2099
 
2132
2100
  content_type = content_type or "application/json"
@@ -2136,7 +2104,7 @@ class JobsOperations:
2136
2104
  _content = body
2137
2105
  else:
2138
2106
  if body is not None:
2139
- _json = self._serialize.body(body, "JobSearchParams")
2107
+ _json = self._serialize.body(body, "SearchParams")
2140
2108
  else:
2141
2109
  _json = None
2142
2110
 
@@ -2152,25 +2120,19 @@ class JobsOperations:
2152
2120
  _request.url = self._client.format_url(_request.url)
2153
2121
 
2154
2122
  _stream = False
2155
- pipeline_response: PipelineResponse = (
2156
- await self._client._pipeline.run( # pylint: disable=protected-access
2157
- _request, stream=_stream, **kwargs
2158
- )
2123
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
2124
+ _request, stream=_stream, **kwargs
2159
2125
  )
2160
2126
 
2161
2127
  response = pipeline_response.http_response
2162
2128
 
2163
2129
  if response.status_code not in [200, 206]:
2164
- map_error(
2165
- status_code=response.status_code, response=response, error_map=error_map
2166
- )
2130
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
2167
2131
  raise HttpResponseError(response=response)
2168
2132
 
2169
2133
  response_headers = {}
2170
2134
  if response.status_code == 206:
2171
- response_headers["Content-Range"] = self._deserialize(
2172
- "str", response.headers.get("Content-Range")
2173
- )
2135
+ response_headers["Content-Range"] = self._deserialize("str", response.headers.get("Content-Range"))
2174
2136
 
2175
2137
  deserialized = self._deserialize("[{object}]", pipeline_response.http_response)
2176
2138
 
@@ -2181,18 +2143,22 @@ class JobsOperations:
2181
2143
 
2182
2144
  @overload
2183
2145
  async def summary(
2184
- self,
2185
- body: _models.JobSummaryParams,
2186
- *,
2187
- content_type: str = "application/json",
2188
- **kwargs: Any,
2146
+ self, body: _models.SummaryParams, *, content_type: str = "application/json", **kwargs: Any
2189
2147
  ) -> Any:
2190
2148
  """Summary.
2191
2149
 
2192
- Show information suitable for plotting.
2150
+ Group jobs by a specific list of parameters. Returns an array of n-uplets, where each n-uplet
2151
+ contains the
2152
+ values of the grouping parameters and the number of jobs that match those values.
2153
+
2154
+ Body parameters:
2155
+
2156
+
2157
+ * ``grouping``\\ : List of parameters to group the jobs by.
2158
+ * ``search``\\ : List of search parameters to filter the jobs by (optional).
2193
2159
 
2194
2160
  :param body: Required.
2195
- :type body: ~_generated.models.JobSummaryParams
2161
+ :type body: ~_generated.models.SummaryParams
2196
2162
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2197
2163
  Default value is "application/json".
2198
2164
  :paramtype content_type: str
@@ -2202,12 +2168,18 @@ class JobsOperations:
2202
2168
  """
2203
2169
 
2204
2170
  @overload
2205
- async def summary(
2206
- self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
2207
- ) -> Any:
2171
+ async def summary(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> Any:
2208
2172
  """Summary.
2209
2173
 
2210
- Show information suitable for plotting.
2174
+ Group jobs by a specific list of parameters. Returns an array of n-uplets, where each n-uplet
2175
+ contains the
2176
+ values of the grouping parameters and the number of jobs that match those values.
2177
+
2178
+ Body parameters:
2179
+
2180
+
2181
+ * ``grouping``\\ : List of parameters to group the jobs by.
2182
+ * ``search``\\ : List of search parameters to filter the jobs by (optional).
2211
2183
 
2212
2184
  :param body: Required.
2213
2185
  :type body: IO[bytes]
@@ -2220,15 +2192,21 @@ class JobsOperations:
2220
2192
  """
2221
2193
 
2222
2194
  @distributed_trace_async
2223
- async def summary(
2224
- self, body: Union[_models.JobSummaryParams, IO[bytes]], **kwargs: Any
2225
- ) -> Any:
2195
+ async def summary(self, body: Union[_models.SummaryParams, IO[bytes]], **kwargs: Any) -> Any:
2226
2196
  """Summary.
2227
2197
 
2228
- Show information suitable for plotting.
2198
+ Group jobs by a specific list of parameters. Returns an array of n-uplets, where each n-uplet
2199
+ contains the
2200
+ values of the grouping parameters and the number of jobs that match those values.
2201
+
2202
+ Body parameters:
2203
+
2229
2204
 
2230
- :param body: Is either a JobSummaryParams type or a IO[bytes] type. Required.
2231
- :type body: ~_generated.models.JobSummaryParams or IO[bytes]
2205
+ * ``grouping``\\ : List of parameters to group the jobs by.
2206
+ * ``search``\\ : List of search parameters to filter the jobs by (optional).
2207
+
2208
+ :param body: Is either a SummaryParams type or a IO[bytes] type. Required.
2209
+ :type body: ~_generated.models.SummaryParams or IO[bytes]
2232
2210
  :return: any
2233
2211
  :rtype: any
2234
2212
  :raises ~azure.core.exceptions.HttpResponseError:
@@ -2244,9 +2222,7 @@ class JobsOperations:
2244
2222
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
2245
2223
  _params = kwargs.pop("params", {}) or {}
2246
2224
 
2247
- content_type: Optional[str] = kwargs.pop(
2248
- "content_type", _headers.pop("Content-Type", None)
2249
- )
2225
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
2250
2226
  cls: ClsType[Any] = kwargs.pop("cls", None)
2251
2227
 
2252
2228
  content_type = content_type or "application/json"
@@ -2255,7 +2231,7 @@ class JobsOperations:
2255
2231
  if isinstance(body, (IOBase, bytes)):
2256
2232
  _content = body
2257
2233
  else:
2258
- _json = self._serialize.body(body, "JobSummaryParams")
2234
+ _json = self._serialize.body(body, "SummaryParams")
2259
2235
 
2260
2236
  _request = build_jobs_summary_request(
2261
2237
  content_type=content_type,
@@ -2267,18 +2243,14 @@ class JobsOperations:
2267
2243
  _request.url = self._client.format_url(_request.url)
2268
2244
 
2269
2245
  _stream = False
2270
- pipeline_response: PipelineResponse = (
2271
- await self._client._pipeline.run( # pylint: disable=protected-access
2272
- _request, stream=_stream, **kwargs
2273
- )
2246
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
2247
+ _request, stream=_stream, **kwargs
2274
2248
  )
2275
2249
 
2276
2250
  response = pipeline_response.http_response
2277
2251
 
2278
2252
  if response.status_code not in [200]:
2279
- map_error(
2280
- status_code=response.status_code, response=response, error_map=error_map
2281
- )
2253
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
2282
2254
  raise HttpResponseError(response=response)
2283
2255
 
2284
2256
  deserialized = self._deserialize("object", pipeline_response.http_response)
@@ -2325,9 +2297,7 @@ class JobsOperations:
2325
2297
  """
2326
2298
 
2327
2299
  @distributed_trace_async
2328
- async def submit_jdl_jobs(
2329
- self, body: Union[List[str], IO[bytes]], **kwargs: Any
2330
- ) -> List[_models.InsertedJob]:
2300
+ async def submit_jdl_jobs(self, body: Union[List[str], IO[bytes]], **kwargs: Any) -> List[_models.InsertedJob]:
2331
2301
  """Submit Jdl Jobs.
2332
2302
 
2333
2303
  Submit a list of jobs in JDL format.
@@ -2349,9 +2319,7 @@ class JobsOperations:
2349
2319
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
2350
2320
  _params = kwargs.pop("params", {}) or {}
2351
2321
 
2352
- content_type: Optional[str] = kwargs.pop(
2353
- "content_type", _headers.pop("Content-Type", None)
2354
- )
2322
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
2355
2323
  cls: ClsType[List[_models.InsertedJob]] = kwargs.pop("cls", None)
2356
2324
 
2357
2325
  content_type = content_type or "application/json"
@@ -2372,23 +2340,17 @@ class JobsOperations:
2372
2340
  _request.url = self._client.format_url(_request.url)
2373
2341
 
2374
2342
  _stream = False
2375
- pipeline_response: PipelineResponse = (
2376
- await self._client._pipeline.run( # pylint: disable=protected-access
2377
- _request, stream=_stream, **kwargs
2378
- )
2343
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
2344
+ _request, stream=_stream, **kwargs
2379
2345
  )
2380
2346
 
2381
2347
  response = pipeline_response.http_response
2382
2348
 
2383
2349
  if response.status_code not in [200]:
2384
- map_error(
2385
- status_code=response.status_code, response=response, error_map=error_map
2386
- )
2350
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
2387
2351
  raise HttpResponseError(response=response)
2388
2352
 
2389
- deserialized = self._deserialize(
2390
- "[InsertedJob]", pipeline_response.http_response
2391
- )
2353
+ deserialized = self._deserialize("[InsertedJob]", pipeline_response.http_response)
2392
2354
 
2393
2355
  if cls:
2394
2356
  return cls(pipeline_response, deserialized, {}) # type: ignore