diracx-client 0.0.1a10__py3-none-any.whl → 0.0.1a12__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.
- diracx/client/__init__.py +1 -1
- diracx/client/_client.py +29 -5
- diracx/client/_configuration.py +4 -5
- diracx/client/_serialization.py +67 -69
- diracx/client/_vendor.py +37 -15
- diracx/client/aio/__init__.py +1 -1
- diracx/client/aio/_client.py +27 -5
- diracx/client/aio/_configuration.py +6 -7
- diracx/client/aio/_vendor.py +39 -1
- diracx/client/aio/operations/__init__.py +1 -1
- diracx/client/aio/operations/_operations.py +338 -283
- diracx/client/aio/operations/_patch.py +1 -2
- diracx/client/models/__init__.py +1 -1
- diracx/client/models/_enums.py +12 -12
- diracx/client/models/_models.py +20 -62
- diracx/client/operations/__init__.py +1 -1
- diracx/client/operations/_operations.py +379 -324
- diracx/client/operations/_patch.py +0 -2
- {diracx_client-0.0.1a10.dist-info → diracx_client-0.0.1a12.dist-info}/METADATA +1 -1
- diracx_client-0.0.1a12.dist-info/RECORD +26 -0
- {diracx_client-0.0.1a10.dist-info → diracx_client-0.0.1a12.dist-info}/WHEEL +1 -1
- diracx_client-0.0.1a10.dist-info/RECORD +0 -26
- {diracx_client-0.0.1a10.dist-info → diracx_client-0.0.1a12.dist-info}/top_level.txt +0 -0
@@ -1,24 +1,25 @@
|
|
1
|
-
# pylint: disable=too-many-lines
|
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.
|
4
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.2)
|
5
5
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
6
6
|
# --------------------------------------------------------------------------
|
7
7
|
from io import IOBase
|
8
8
|
import sys
|
9
9
|
from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload
|
10
10
|
|
11
|
+
from azure.core import MatchConditions
|
11
12
|
from azure.core.exceptions import (
|
12
13
|
ClientAuthenticationError,
|
13
14
|
HttpResponseError,
|
14
15
|
ResourceExistsError,
|
16
|
+
ResourceModifiedError,
|
15
17
|
ResourceNotFoundError,
|
16
18
|
ResourceNotModifiedError,
|
17
19
|
map_error,
|
18
20
|
)
|
19
21
|
from azure.core.pipeline import PipelineResponse
|
20
|
-
from azure.core.
|
21
|
-
from azure.core.rest import HttpRequest
|
22
|
+
from azure.core.rest import AsyncHttpResponse, HttpRequest
|
22
23
|
from azure.core.tracing.decorator_async import distributed_trace_async
|
23
24
|
from azure.core.utils import case_insensitive_dict
|
24
25
|
|
@@ -115,22 +116,24 @@ class WellKnownOperations:
|
|
115
116
|
|
116
117
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
117
118
|
|
118
|
-
|
119
|
+
_request = build_well_known_openid_configuration_request(
|
119
120
|
headers=_headers,
|
120
121
|
params=_params,
|
121
122
|
)
|
122
|
-
|
123
|
+
_request.url = self._client.format_url(_request.url)
|
123
124
|
|
124
125
|
_stream = False
|
125
126
|
pipeline_response: PipelineResponse = (
|
126
127
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
127
|
-
|
128
|
+
_request, stream=_stream, **kwargs
|
128
129
|
)
|
129
130
|
)
|
130
131
|
|
131
132
|
response = pipeline_response.http_response
|
132
133
|
|
133
134
|
if response.status_code not in [200]:
|
135
|
+
if _stream:
|
136
|
+
await response.read() # Load the body in memory and close the socket
|
134
137
|
map_error(
|
135
138
|
status_code=response.status_code, response=response, error_map=error_map
|
136
139
|
)
|
@@ -139,9 +142,9 @@ class WellKnownOperations:
|
|
139
142
|
deserialized = self._deserialize("object", pipeline_response)
|
140
143
|
|
141
144
|
if cls:
|
142
|
-
return cls(pipeline_response, deserialized, {})
|
145
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
143
146
|
|
144
|
-
return deserialized
|
147
|
+
return deserialized # type: ignore
|
145
148
|
|
146
149
|
@distributed_trace_async
|
147
150
|
async def installation_metadata(self, **kwargs: Any) -> _models.Metadata:
|
@@ -166,22 +169,24 @@ class WellKnownOperations:
|
|
166
169
|
|
167
170
|
cls: ClsType[_models.Metadata] = kwargs.pop("cls", None)
|
168
171
|
|
169
|
-
|
172
|
+
_request = build_well_known_installation_metadata_request(
|
170
173
|
headers=_headers,
|
171
174
|
params=_params,
|
172
175
|
)
|
173
|
-
|
176
|
+
_request.url = self._client.format_url(_request.url)
|
174
177
|
|
175
178
|
_stream = False
|
176
179
|
pipeline_response: PipelineResponse = (
|
177
180
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
178
|
-
|
181
|
+
_request, stream=_stream, **kwargs
|
179
182
|
)
|
180
183
|
)
|
181
184
|
|
182
185
|
response = pipeline_response.http_response
|
183
186
|
|
184
187
|
if response.status_code not in [200]:
|
188
|
+
if _stream:
|
189
|
+
await response.read() # Load the body in memory and close the socket
|
185
190
|
map_error(
|
186
191
|
status_code=response.status_code, response=response, error_map=error_map
|
187
192
|
)
|
@@ -190,12 +195,12 @@ class WellKnownOperations:
|
|
190
195
|
deserialized = self._deserialize("Metadata", pipeline_response)
|
191
196
|
|
192
197
|
if cls:
|
193
|
-
return cls(pipeline_response, deserialized, {})
|
198
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
194
199
|
|
195
|
-
return deserialized
|
200
|
+
return deserialized # type: ignore
|
196
201
|
|
197
202
|
|
198
|
-
class AuthOperations:
|
203
|
+
class AuthOperations: # pylint: disable=abstract-class-instantiated
|
199
204
|
"""
|
200
205
|
.. warning::
|
201
206
|
**DO NOT** instantiate this class directly.
|
@@ -215,6 +220,7 @@ class AuthOperations:
|
|
215
220
|
self._deserialize = (
|
216
221
|
input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
217
222
|
)
|
223
|
+
|
218
224
|
raise_if_not_implemented(
|
219
225
|
self.__class__,
|
220
226
|
[
|
@@ -254,23 +260,25 @@ class AuthOperations:
|
|
254
260
|
|
255
261
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
256
262
|
|
257
|
-
|
263
|
+
_request = build_auth_do_device_flow_request(
|
258
264
|
user_code=user_code,
|
259
265
|
headers=_headers,
|
260
266
|
params=_params,
|
261
267
|
)
|
262
|
-
|
268
|
+
_request.url = self._client.format_url(_request.url)
|
263
269
|
|
264
270
|
_stream = False
|
265
271
|
pipeline_response: PipelineResponse = (
|
266
272
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
267
|
-
|
273
|
+
_request, stream=_stream, **kwargs
|
268
274
|
)
|
269
275
|
)
|
270
276
|
|
271
277
|
response = pipeline_response.http_response
|
272
278
|
|
273
279
|
if response.status_code not in [200]:
|
280
|
+
if _stream:
|
281
|
+
await response.read() # Load the body in memory and close the socket
|
274
282
|
map_error(
|
275
283
|
status_code=response.status_code, response=response, error_map=error_map
|
276
284
|
)
|
@@ -279,13 +287,13 @@ class AuthOperations:
|
|
279
287
|
deserialized = self._deserialize("object", pipeline_response)
|
280
288
|
|
281
289
|
if cls:
|
282
|
-
return cls(pipeline_response, deserialized, {})
|
290
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
283
291
|
|
284
|
-
return deserialized
|
292
|
+
return deserialized # type: ignore
|
285
293
|
|
286
294
|
@distributed_trace_async
|
287
295
|
async def initiate_device_flow(
|
288
|
-
self, *, client_id: str, scope: str,
|
296
|
+
self, *, client_id: str, scope: str, **kwargs: Any
|
289
297
|
) -> _models.InitiateDeviceFlowResponse:
|
290
298
|
"""Initiate Device Flow.
|
291
299
|
|
@@ -301,8 +309,6 @@ class AuthOperations:
|
|
301
309
|
:paramtype client_id: str
|
302
310
|
:keyword scope: Required.
|
303
311
|
:paramtype scope: str
|
304
|
-
:keyword audience: Required.
|
305
|
-
:paramtype audience: str
|
306
312
|
:return: InitiateDeviceFlowResponse
|
307
313
|
:rtype: ~client.models.InitiateDeviceFlowResponse
|
308
314
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -320,25 +326,26 @@ class AuthOperations:
|
|
320
326
|
|
321
327
|
cls: ClsType[_models.InitiateDeviceFlowResponse] = kwargs.pop("cls", None)
|
322
328
|
|
323
|
-
|
329
|
+
_request = build_auth_initiate_device_flow_request(
|
324
330
|
client_id=client_id,
|
325
331
|
scope=scope,
|
326
|
-
audience=audience,
|
327
332
|
headers=_headers,
|
328
333
|
params=_params,
|
329
334
|
)
|
330
|
-
|
335
|
+
_request.url = self._client.format_url(_request.url)
|
331
336
|
|
332
337
|
_stream = False
|
333
338
|
pipeline_response: PipelineResponse = (
|
334
339
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
335
|
-
|
340
|
+
_request, stream=_stream, **kwargs
|
336
341
|
)
|
337
342
|
)
|
338
343
|
|
339
344
|
response = pipeline_response.http_response
|
340
345
|
|
341
346
|
if response.status_code not in [200]:
|
347
|
+
if _stream:
|
348
|
+
await response.read() # Load the body in memory and close the socket
|
342
349
|
map_error(
|
343
350
|
status_code=response.status_code, response=response, error_map=error_map
|
344
351
|
)
|
@@ -349,9 +356,9 @@ class AuthOperations:
|
|
349
356
|
)
|
350
357
|
|
351
358
|
if cls:
|
352
|
-
return cls(pipeline_response, deserialized, {})
|
359
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
353
360
|
|
354
|
-
return deserialized
|
361
|
+
return deserialized # type: ignore
|
355
362
|
|
356
363
|
@distributed_trace_async
|
357
364
|
async def finish_device_flow(self, *, code: str, state: str, **kwargs: Any) -> Any:
|
@@ -384,24 +391,26 @@ class AuthOperations:
|
|
384
391
|
|
385
392
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
386
393
|
|
387
|
-
|
394
|
+
_request = build_auth_finish_device_flow_request(
|
388
395
|
code=code,
|
389
396
|
state=state,
|
390
397
|
headers=_headers,
|
391
398
|
params=_params,
|
392
399
|
)
|
393
|
-
|
400
|
+
_request.url = self._client.format_url(_request.url)
|
394
401
|
|
395
402
|
_stream = False
|
396
403
|
pipeline_response: PipelineResponse = (
|
397
404
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
398
|
-
|
405
|
+
_request, stream=_stream, **kwargs
|
399
406
|
)
|
400
407
|
)
|
401
408
|
|
402
409
|
response = pipeline_response.http_response
|
403
410
|
|
404
411
|
if response.status_code not in [200]:
|
412
|
+
if _stream:
|
413
|
+
await response.read() # Load the body in memory and close the socket
|
405
414
|
map_error(
|
406
415
|
status_code=response.status_code, response=response, error_map=error_map
|
407
416
|
)
|
@@ -410,9 +419,9 @@ class AuthOperations:
|
|
410
419
|
deserialized = self._deserialize("object", pipeline_response)
|
411
420
|
|
412
421
|
if cls:
|
413
|
-
return cls(pipeline_response, deserialized, {})
|
422
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
414
423
|
|
415
|
-
return deserialized
|
424
|
+
return deserialized # type: ignore
|
416
425
|
|
417
426
|
@distributed_trace_async
|
418
427
|
async def finished(self, **kwargs: Any) -> Any:
|
@@ -437,22 +446,24 @@ class AuthOperations:
|
|
437
446
|
|
438
447
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
439
448
|
|
440
|
-
|
449
|
+
_request = build_auth_finished_request(
|
441
450
|
headers=_headers,
|
442
451
|
params=_params,
|
443
452
|
)
|
444
|
-
|
453
|
+
_request.url = self._client.format_url(_request.url)
|
445
454
|
|
446
455
|
_stream = False
|
447
456
|
pipeline_response: PipelineResponse = (
|
448
457
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
449
|
-
|
458
|
+
_request, stream=_stream, **kwargs
|
450
459
|
)
|
451
460
|
)
|
452
461
|
|
453
462
|
response = pipeline_response.http_response
|
454
463
|
|
455
464
|
if response.status_code not in [200]:
|
465
|
+
if _stream:
|
466
|
+
await response.read() # Load the body in memory and close the socket
|
456
467
|
map_error(
|
457
468
|
status_code=response.status_code, response=response, error_map=error_map
|
458
469
|
)
|
@@ -461,15 +472,16 @@ class AuthOperations:
|
|
461
472
|
deserialized = self._deserialize("object", pipeline_response)
|
462
473
|
|
463
474
|
if cls:
|
464
|
-
return cls(pipeline_response, deserialized, {})
|
475
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
465
476
|
|
466
|
-
return deserialized
|
477
|
+
return deserialized # type: ignore
|
467
478
|
|
468
479
|
@distributed_trace_async
|
469
480
|
async def get_refresh_tokens(self, **kwargs: Any) -> List[Any]:
|
470
481
|
"""Get Refresh Tokens.
|
471
482
|
|
472
|
-
Get
|
483
|
+
Get all refresh tokens for the user. If the user has the ``proxy_management`` property, then
|
484
|
+
the subject is not used to filter the refresh tokens.
|
473
485
|
|
474
486
|
:return: list of any
|
475
487
|
:rtype: list[any]
|
@@ -488,22 +500,24 @@ class AuthOperations:
|
|
488
500
|
|
489
501
|
cls: ClsType[List[Any]] = kwargs.pop("cls", None)
|
490
502
|
|
491
|
-
|
503
|
+
_request = build_auth_get_refresh_tokens_request(
|
492
504
|
headers=_headers,
|
493
505
|
params=_params,
|
494
506
|
)
|
495
|
-
|
507
|
+
_request.url = self._client.format_url(_request.url)
|
496
508
|
|
497
509
|
_stream = False
|
498
510
|
pipeline_response: PipelineResponse = (
|
499
511
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
500
|
-
|
512
|
+
_request, stream=_stream, **kwargs
|
501
513
|
)
|
502
514
|
)
|
503
515
|
|
504
516
|
response = pipeline_response.http_response
|
505
517
|
|
506
518
|
if response.status_code not in [200]:
|
519
|
+
if _stream:
|
520
|
+
await response.read() # Load the body in memory and close the socket
|
507
521
|
map_error(
|
508
522
|
status_code=response.status_code, response=response, error_map=error_map
|
509
523
|
)
|
@@ -512,15 +526,16 @@ class AuthOperations:
|
|
512
526
|
deserialized = self._deserialize("[object]", pipeline_response)
|
513
527
|
|
514
528
|
if cls:
|
515
|
-
return cls(pipeline_response, deserialized, {})
|
529
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
516
530
|
|
517
|
-
return deserialized
|
531
|
+
return deserialized # type: ignore
|
518
532
|
|
519
533
|
@distributed_trace_async
|
520
534
|
async def revoke_refresh_token(self, jti: str, **kwargs: Any) -> str:
|
521
535
|
"""Revoke Refresh Token.
|
522
536
|
|
523
|
-
Revoke
|
537
|
+
Revoke a refresh token. If the user has the ``proxy_management`` property, then
|
538
|
+
the subject is not used to filter the refresh tokens.
|
524
539
|
|
525
540
|
:param jti: Required.
|
526
541
|
:type jti: str
|
@@ -541,23 +556,25 @@ class AuthOperations:
|
|
541
556
|
|
542
557
|
cls: ClsType[str] = kwargs.pop("cls", None)
|
543
558
|
|
544
|
-
|
559
|
+
_request = build_auth_revoke_refresh_token_request(
|
545
560
|
jti=jti,
|
546
561
|
headers=_headers,
|
547
562
|
params=_params,
|
548
563
|
)
|
549
|
-
|
564
|
+
_request.url = self._client.format_url(_request.url)
|
550
565
|
|
551
566
|
_stream = False
|
552
567
|
pipeline_response: PipelineResponse = (
|
553
568
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
554
|
-
|
569
|
+
_request, stream=_stream, **kwargs
|
555
570
|
)
|
556
571
|
)
|
557
572
|
|
558
573
|
response = pipeline_response.http_response
|
559
574
|
|
560
575
|
if response.status_code not in [200]:
|
576
|
+
if _stream:
|
577
|
+
await response.read() # Load the body in memory and close the socket
|
561
578
|
map_error(
|
562
579
|
status_code=response.status_code, response=response, error_map=error_map
|
563
580
|
)
|
@@ -566,17 +583,70 @@ class AuthOperations:
|
|
566
583
|
deserialized = self._deserialize("str", pipeline_response)
|
567
584
|
|
568
585
|
if cls:
|
569
|
-
return cls(pipeline_response, deserialized, {})
|
586
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
570
587
|
|
571
|
-
return deserialized
|
588
|
+
return deserialized # type: ignore
|
589
|
+
|
590
|
+
@distributed_trace_async
|
591
|
+
async def userinfo(self, **kwargs: Any) -> _models.UserInfoResponse:
|
592
|
+
"""Userinfo.
|
593
|
+
|
594
|
+
Get information about the user's identity.
|
595
|
+
|
596
|
+
:return: UserInfoResponse
|
597
|
+
:rtype: ~client.models.UserInfoResponse
|
598
|
+
:raises ~azure.core.exceptions.HttpResponseError:
|
599
|
+
"""
|
600
|
+
error_map = {
|
601
|
+
401: ClientAuthenticationError,
|
602
|
+
404: ResourceNotFoundError,
|
603
|
+
409: ResourceExistsError,
|
604
|
+
304: ResourceNotModifiedError,
|
605
|
+
}
|
606
|
+
error_map.update(kwargs.pop("error_map", {}) or {})
|
607
|
+
|
608
|
+
_headers = kwargs.pop("headers", {}) or {}
|
609
|
+
_params = kwargs.pop("params", {}) or {}
|
610
|
+
|
611
|
+
cls: ClsType[_models.UserInfoResponse] = kwargs.pop("cls", None)
|
612
|
+
|
613
|
+
_request = build_auth_userinfo_request(
|
614
|
+
headers=_headers,
|
615
|
+
params=_params,
|
616
|
+
)
|
617
|
+
_request.url = self._client.format_url(_request.url)
|
618
|
+
|
619
|
+
_stream = False
|
620
|
+
pipeline_response: PipelineResponse = (
|
621
|
+
await self._client._pipeline.run( # pylint: disable=protected-access
|
622
|
+
_request, stream=_stream, **kwargs
|
623
|
+
)
|
624
|
+
)
|
625
|
+
|
626
|
+
response = pipeline_response.http_response
|
627
|
+
|
628
|
+
if response.status_code not in [200]:
|
629
|
+
if _stream:
|
630
|
+
await response.read() # Load the body in memory and close the socket
|
631
|
+
map_error(
|
632
|
+
status_code=response.status_code, response=response, error_map=error_map
|
633
|
+
)
|
634
|
+
raise HttpResponseError(response=response)
|
635
|
+
|
636
|
+
deserialized = self._deserialize("UserInfoResponse", pipeline_response)
|
637
|
+
|
638
|
+
if cls:
|
639
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
640
|
+
|
641
|
+
return deserialized # type: ignore
|
572
642
|
|
573
643
|
@distributed_trace_async
|
574
644
|
async def authorization_flow(
|
575
645
|
self,
|
576
646
|
*,
|
577
|
-
response_type: Union[str, _models.
|
647
|
+
response_type: Union[str, _models.Enum0],
|
578
648
|
code_challenge: str,
|
579
|
-
code_challenge_method: Union[str, _models.
|
649
|
+
code_challenge_method: Union[str, _models.Enum1],
|
580
650
|
client_id: str,
|
581
651
|
redirect_uri: str,
|
582
652
|
scope: str,
|
@@ -588,11 +658,11 @@ class AuthOperations:
|
|
588
658
|
Authorization Flow.
|
589
659
|
|
590
660
|
:keyword response_type: "code" Required.
|
591
|
-
:paramtype response_type: str or ~client.models.
|
661
|
+
:paramtype response_type: str or ~client.models.Enum0
|
592
662
|
:keyword code_challenge: Required.
|
593
663
|
:paramtype code_challenge: str
|
594
664
|
:keyword code_challenge_method: "S256" Required.
|
595
|
-
:paramtype code_challenge_method: str or ~client.models.
|
665
|
+
:paramtype code_challenge_method: str or ~client.models.Enum1
|
596
666
|
:keyword client_id: Required.
|
597
667
|
:paramtype client_id: str
|
598
668
|
:keyword redirect_uri: Required.
|
@@ -618,7 +688,7 @@ class AuthOperations:
|
|
618
688
|
|
619
689
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
620
690
|
|
621
|
-
|
691
|
+
_request = build_auth_authorization_flow_request(
|
622
692
|
response_type=response_type,
|
623
693
|
code_challenge=code_challenge,
|
624
694
|
code_challenge_method=code_challenge_method,
|
@@ -629,18 +699,20 @@ class AuthOperations:
|
|
629
699
|
headers=_headers,
|
630
700
|
params=_params,
|
631
701
|
)
|
632
|
-
|
702
|
+
_request.url = self._client.format_url(_request.url)
|
633
703
|
|
634
704
|
_stream = False
|
635
705
|
pipeline_response: PipelineResponse = (
|
636
706
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
637
|
-
|
707
|
+
_request, stream=_stream, **kwargs
|
638
708
|
)
|
639
709
|
)
|
640
710
|
|
641
711
|
response = pipeline_response.http_response
|
642
712
|
|
643
713
|
if response.status_code not in [200]:
|
714
|
+
if _stream:
|
715
|
+
await response.read() # Load the body in memory and close the socket
|
644
716
|
map_error(
|
645
717
|
status_code=response.status_code, response=response, error_map=error_map
|
646
718
|
)
|
@@ -649,9 +721,9 @@ class AuthOperations:
|
|
649
721
|
deserialized = self._deserialize("object", pipeline_response)
|
650
722
|
|
651
723
|
if cls:
|
652
|
-
return cls(pipeline_response, deserialized, {})
|
724
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
653
725
|
|
654
|
-
return deserialized
|
726
|
+
return deserialized # type: ignore
|
655
727
|
|
656
728
|
@distributed_trace_async
|
657
729
|
async def authorization_flow_complete(
|
@@ -682,24 +754,26 @@ class AuthOperations:
|
|
682
754
|
|
683
755
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
684
756
|
|
685
|
-
|
757
|
+
_request = build_auth_authorization_flow_complete_request(
|
686
758
|
code=code,
|
687
759
|
state=state,
|
688
760
|
headers=_headers,
|
689
761
|
params=_params,
|
690
762
|
)
|
691
|
-
|
763
|
+
_request.url = self._client.format_url(_request.url)
|
692
764
|
|
693
765
|
_stream = False
|
694
766
|
pipeline_response: PipelineResponse = (
|
695
767
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
696
|
-
|
768
|
+
_request, stream=_stream, **kwargs
|
697
769
|
)
|
698
770
|
)
|
699
771
|
|
700
772
|
response = pipeline_response.http_response
|
701
773
|
|
702
774
|
if response.status_code not in [200]:
|
775
|
+
if _stream:
|
776
|
+
await response.read() # Load the body in memory and close the socket
|
703
777
|
map_error(
|
704
778
|
status_code=response.status_code, response=response, error_map=error_map
|
705
779
|
)
|
@@ -708,60 +782,9 @@ class AuthOperations:
|
|
708
782
|
deserialized = self._deserialize("object", pipeline_response)
|
709
783
|
|
710
784
|
if cls:
|
711
|
-
return cls(pipeline_response, deserialized, {})
|
785
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
712
786
|
|
713
|
-
return deserialized
|
714
|
-
|
715
|
-
@distributed_trace_async
|
716
|
-
async def userinfo(self, **kwargs: Any) -> _models.UserInfoResponse:
|
717
|
-
"""Userinfo.
|
718
|
-
|
719
|
-
Userinfo.
|
720
|
-
|
721
|
-
:return: UserInfoResponse
|
722
|
-
:rtype: ~client.models.UserInfoResponse
|
723
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
724
|
-
"""
|
725
|
-
error_map = {
|
726
|
-
401: ClientAuthenticationError,
|
727
|
-
404: ResourceNotFoundError,
|
728
|
-
409: ResourceExistsError,
|
729
|
-
304: ResourceNotModifiedError,
|
730
|
-
}
|
731
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
732
|
-
|
733
|
-
_headers = kwargs.pop("headers", {}) or {}
|
734
|
-
_params = kwargs.pop("params", {}) or {}
|
735
|
-
|
736
|
-
cls: ClsType[_models.UserInfoResponse] = kwargs.pop("cls", None)
|
737
|
-
|
738
|
-
request = build_auth_userinfo_request(
|
739
|
-
headers=_headers,
|
740
|
-
params=_params,
|
741
|
-
)
|
742
|
-
request.url = self._client.format_url(request.url)
|
743
|
-
|
744
|
-
_stream = False
|
745
|
-
pipeline_response: PipelineResponse = (
|
746
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
747
|
-
request, stream=_stream, **kwargs
|
748
|
-
)
|
749
|
-
)
|
750
|
-
|
751
|
-
response = pipeline_response.http_response
|
752
|
-
|
753
|
-
if response.status_code not in [200]:
|
754
|
-
map_error(
|
755
|
-
status_code=response.status_code, response=response, error_map=error_map
|
756
|
-
)
|
757
|
-
raise HttpResponseError(response=response)
|
758
|
-
|
759
|
-
deserialized = self._deserialize("UserInfoResponse", pipeline_response)
|
760
|
-
|
761
|
-
if cls:
|
762
|
-
return cls(pipeline_response, deserialized, {})
|
763
|
-
|
764
|
-
return deserialized
|
787
|
+
return deserialized # type: ignore
|
765
788
|
|
766
789
|
|
767
790
|
class ConfigOperations:
|
@@ -788,15 +811,14 @@ class ConfigOperations:
|
|
788
811
|
@distributed_trace_async
|
789
812
|
async def serve_config(
|
790
813
|
self,
|
791
|
-
vo: str,
|
792
814
|
*,
|
793
|
-
if_none_match: Optional[str] = None,
|
794
815
|
if_modified_since: Optional[str] = None,
|
816
|
+
etag: Optional[str] = None,
|
817
|
+
match_condition: Optional[MatchConditions] = None,
|
795
818
|
**kwargs: Any,
|
796
819
|
) -> Any:
|
797
820
|
"""Serve Config.
|
798
821
|
|
799
|
-
"
|
800
822
|
Get the latest view of the config.
|
801
823
|
|
802
824
|
If If-None-Match header is given and matches the latest ETag, return 304
|
@@ -804,12 +826,13 @@ class ConfigOperations:
|
|
804
826
|
If If-Modified-Since is given and is newer than latest,
|
805
827
|
return 304: this is to avoid flip/flopping.
|
806
828
|
|
807
|
-
:param vo: Required.
|
808
|
-
:type vo: str
|
809
|
-
:keyword if_none_match: Default value is None.
|
810
|
-
:paramtype if_none_match: str
|
811
829
|
:keyword if_modified_since: Default value is None.
|
812
830
|
:paramtype if_modified_since: str
|
831
|
+
:keyword etag: check if resource is changed. Set None to skip checking etag. Default value is
|
832
|
+
None.
|
833
|
+
:paramtype etag: str
|
834
|
+
:keyword match_condition: The match condition to use upon the etag. Default value is None.
|
835
|
+
:paramtype match_condition: ~azure.core.MatchConditions
|
813
836
|
:return: any
|
814
837
|
:rtype: any
|
815
838
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -820,6 +843,12 @@ class ConfigOperations:
|
|
820
843
|
409: ResourceExistsError,
|
821
844
|
304: ResourceNotModifiedError,
|
822
845
|
}
|
846
|
+
if match_condition == MatchConditions.IfNotModified:
|
847
|
+
error_map[412] = ResourceModifiedError
|
848
|
+
elif match_condition == MatchConditions.IfPresent:
|
849
|
+
error_map[412] = ResourceNotFoundError
|
850
|
+
elif match_condition == MatchConditions.IfMissing:
|
851
|
+
error_map[412] = ResourceExistsError
|
823
852
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
824
853
|
|
825
854
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -827,25 +856,27 @@ class ConfigOperations:
|
|
827
856
|
|
828
857
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
829
858
|
|
830
|
-
|
831
|
-
vo=vo,
|
832
|
-
if_none_match=if_none_match,
|
859
|
+
_request = build_config_serve_config_request(
|
833
860
|
if_modified_since=if_modified_since,
|
861
|
+
etag=etag,
|
862
|
+
match_condition=match_condition,
|
834
863
|
headers=_headers,
|
835
864
|
params=_params,
|
836
865
|
)
|
837
|
-
|
866
|
+
_request.url = self._client.format_url(_request.url)
|
838
867
|
|
839
868
|
_stream = False
|
840
869
|
pipeline_response: PipelineResponse = (
|
841
870
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
842
|
-
|
871
|
+
_request, stream=_stream, **kwargs
|
843
872
|
)
|
844
873
|
)
|
845
874
|
|
846
875
|
response = pipeline_response.http_response
|
847
876
|
|
848
877
|
if response.status_code not in [200]:
|
878
|
+
if _stream:
|
879
|
+
await response.read() # Load the body in memory and close the socket
|
849
880
|
map_error(
|
850
881
|
status_code=response.status_code, response=response, error_map=error_map
|
851
882
|
)
|
@@ -854,9 +885,9 @@ class ConfigOperations:
|
|
854
885
|
deserialized = self._deserialize("object", pipeline_response)
|
855
886
|
|
856
887
|
if cls:
|
857
|
-
return cls(pipeline_response, deserialized, {})
|
888
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
858
889
|
|
859
|
-
return deserialized
|
890
|
+
return deserialized # type: ignore
|
860
891
|
|
861
892
|
|
862
893
|
class JobsOperations: # pylint: disable=too-many-public-methods
|
@@ -913,23 +944,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
913
944
|
|
914
945
|
cls: ClsType[_models.SandboxDownloadResponse] = kwargs.pop("cls", None)
|
915
946
|
|
916
|
-
|
947
|
+
_request = build_jobs_get_sandbox_file_request(
|
917
948
|
pfn=pfn,
|
918
949
|
headers=_headers,
|
919
950
|
params=_params,
|
920
951
|
)
|
921
|
-
|
952
|
+
_request.url = self._client.format_url(_request.url)
|
922
953
|
|
923
954
|
_stream = False
|
924
955
|
pipeline_response: PipelineResponse = (
|
925
956
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
926
|
-
|
957
|
+
_request, stream=_stream, **kwargs
|
927
958
|
)
|
928
959
|
)
|
929
960
|
|
930
961
|
response = pipeline_response.http_response
|
931
962
|
|
932
963
|
if response.status_code not in [200]:
|
964
|
+
if _stream:
|
965
|
+
await response.read() # Load the body in memory and close the socket
|
933
966
|
map_error(
|
934
967
|
status_code=response.status_code, response=response, error_map=error_map
|
935
968
|
)
|
@@ -938,9 +971,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
938
971
|
deserialized = self._deserialize("SandboxDownloadResponse", pipeline_response)
|
939
972
|
|
940
973
|
if cls:
|
941
|
-
return cls(pipeline_response, deserialized, {})
|
974
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
942
975
|
|
943
|
-
return deserialized
|
976
|
+
return deserialized # type: ignore
|
944
977
|
|
945
978
|
@overload
|
946
979
|
async def initiate_sandbox_upload(
|
@@ -972,7 +1005,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
972
1005
|
|
973
1006
|
@overload
|
974
1007
|
async def initiate_sandbox_upload(
|
975
|
-
self, body: IO, *, content_type: str = "application/json", **kwargs: Any
|
1008
|
+
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
|
976
1009
|
) -> _models.SandboxUploadResponse:
|
977
1010
|
"""Initiate Sandbox Upload.
|
978
1011
|
|
@@ -985,7 +1018,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
985
1018
|
should be used to upload the sandbox to the storage backend.
|
986
1019
|
|
987
1020
|
:param body: Required.
|
988
|
-
:type body: IO
|
1021
|
+
:type body: IO[bytes]
|
989
1022
|
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
990
1023
|
Default value is "application/json".
|
991
1024
|
:paramtype content_type: str
|
@@ -996,7 +1029,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
996
1029
|
|
997
1030
|
@distributed_trace_async
|
998
1031
|
async def initiate_sandbox_upload(
|
999
|
-
self, body: Union[_models.SandboxInfo, IO], **kwargs: Any
|
1032
|
+
self, body: Union[_models.SandboxInfo, IO[bytes]], **kwargs: Any
|
1000
1033
|
) -> _models.SandboxUploadResponse:
|
1001
1034
|
"""Initiate Sandbox Upload.
|
1002
1035
|
|
@@ -1008,11 +1041,8 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1008
1041
|
If the sandbox does not exist in the database then the "url" and "fields"
|
1009
1042
|
should be used to upload the sandbox to the storage backend.
|
1010
1043
|
|
1011
|
-
:param body: Is either a SandboxInfo type or a IO type. Required.
|
1012
|
-
:type body: ~client.models.SandboxInfo or IO
|
1013
|
-
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
|
1014
|
-
Default value is None.
|
1015
|
-
:paramtype content_type: str
|
1044
|
+
:param body: Is either a SandboxInfo type or a IO[bytes] type. Required.
|
1045
|
+
:type body: ~client.models.SandboxInfo or IO[bytes]
|
1016
1046
|
:return: SandboxUploadResponse
|
1017
1047
|
:rtype: ~client.models.SandboxUploadResponse
|
1018
1048
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1041,25 +1071,27 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1041
1071
|
else:
|
1042
1072
|
_json = self._serialize.body(body, "SandboxInfo")
|
1043
1073
|
|
1044
|
-
|
1074
|
+
_request = build_jobs_initiate_sandbox_upload_request(
|
1045
1075
|
content_type=content_type,
|
1046
1076
|
json=_json,
|
1047
1077
|
content=_content,
|
1048
1078
|
headers=_headers,
|
1049
1079
|
params=_params,
|
1050
1080
|
)
|
1051
|
-
|
1081
|
+
_request.url = self._client.format_url(_request.url)
|
1052
1082
|
|
1053
1083
|
_stream = False
|
1054
1084
|
pipeline_response: PipelineResponse = (
|
1055
1085
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
1056
|
-
|
1086
|
+
_request, stream=_stream, **kwargs
|
1057
1087
|
)
|
1058
1088
|
)
|
1059
1089
|
|
1060
1090
|
response = pipeline_response.http_response
|
1061
1091
|
|
1062
1092
|
if response.status_code not in [200]:
|
1093
|
+
if _stream:
|
1094
|
+
await response.read() # Load the body in memory and close the socket
|
1063
1095
|
map_error(
|
1064
1096
|
status_code=response.status_code, response=response, error_map=error_map
|
1065
1097
|
)
|
@@ -1068,9 +1100,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1068
1100
|
deserialized = self._deserialize("SandboxUploadResponse", pipeline_response)
|
1069
1101
|
|
1070
1102
|
if cls:
|
1071
|
-
return cls(pipeline_response, deserialized, {})
|
1103
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1072
1104
|
|
1073
|
-
return deserialized
|
1105
|
+
return deserialized # type: ignore
|
1074
1106
|
|
1075
1107
|
@overload
|
1076
1108
|
async def submit_bulk_jobs(
|
@@ -1092,14 +1124,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1092
1124
|
|
1093
1125
|
@overload
|
1094
1126
|
async def submit_bulk_jobs(
|
1095
|
-
self, body: IO, *, content_type: str = "application/json", **kwargs: Any
|
1127
|
+
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
|
1096
1128
|
) -> List[_models.InsertedJob]:
|
1097
1129
|
"""Submit Bulk Jobs.
|
1098
1130
|
|
1099
1131
|
Submit Bulk Jobs.
|
1100
1132
|
|
1101
1133
|
:param body: Required.
|
1102
|
-
:type body: IO
|
1134
|
+
:type body: IO[bytes]
|
1103
1135
|
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
1104
1136
|
Default value is "application/json".
|
1105
1137
|
:paramtype content_type: str
|
@@ -1110,17 +1142,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1110
1142
|
|
1111
1143
|
@distributed_trace_async
|
1112
1144
|
async def submit_bulk_jobs(
|
1113
|
-
self, body: Union[List[str], IO], **kwargs: Any
|
1145
|
+
self, body: Union[List[str], IO[bytes]], **kwargs: Any
|
1114
1146
|
) -> List[_models.InsertedJob]:
|
1115
1147
|
"""Submit Bulk Jobs.
|
1116
1148
|
|
1117
1149
|
Submit Bulk Jobs.
|
1118
1150
|
|
1119
|
-
:param body: Is either a [str] type or a IO type. Required.
|
1120
|
-
:type body: list[str] or IO
|
1121
|
-
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
|
1122
|
-
Default value is None.
|
1123
|
-
:paramtype content_type: str
|
1151
|
+
:param body: Is either a [str] type or a IO[bytes] type. Required.
|
1152
|
+
:type body: list[str] or IO[bytes]
|
1124
1153
|
:return: list of InsertedJob
|
1125
1154
|
:rtype: list[~client.models.InsertedJob]
|
1126
1155
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1149,25 +1178,27 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1149
1178
|
else:
|
1150
1179
|
_json = self._serialize.body(body, "[str]")
|
1151
1180
|
|
1152
|
-
|
1181
|
+
_request = build_jobs_submit_bulk_jobs_request(
|
1153
1182
|
content_type=content_type,
|
1154
1183
|
json=_json,
|
1155
1184
|
content=_content,
|
1156
1185
|
headers=_headers,
|
1157
1186
|
params=_params,
|
1158
1187
|
)
|
1159
|
-
|
1188
|
+
_request.url = self._client.format_url(_request.url)
|
1160
1189
|
|
1161
1190
|
_stream = False
|
1162
1191
|
pipeline_response: PipelineResponse = (
|
1163
1192
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
1164
|
-
|
1193
|
+
_request, stream=_stream, **kwargs
|
1165
1194
|
)
|
1166
1195
|
)
|
1167
1196
|
|
1168
1197
|
response = pipeline_response.http_response
|
1169
1198
|
|
1170
1199
|
if response.status_code not in [200]:
|
1200
|
+
if _stream:
|
1201
|
+
await response.read() # Load the body in memory and close the socket
|
1171
1202
|
map_error(
|
1172
1203
|
status_code=response.status_code, response=response, error_map=error_map
|
1173
1204
|
)
|
@@ -1176,9 +1207,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1176
1207
|
deserialized = self._deserialize("[InsertedJob]", pipeline_response)
|
1177
1208
|
|
1178
1209
|
if cls:
|
1179
|
-
return cls(pipeline_response, deserialized, {})
|
1210
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1180
1211
|
|
1181
|
-
return deserialized
|
1212
|
+
return deserialized # type: ignore
|
1182
1213
|
|
1183
1214
|
@distributed_trace_async
|
1184
1215
|
async def delete_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
|
@@ -1205,23 +1236,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1205
1236
|
|
1206
1237
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1207
1238
|
|
1208
|
-
|
1239
|
+
_request = build_jobs_delete_bulk_jobs_request(
|
1209
1240
|
job_ids=job_ids,
|
1210
1241
|
headers=_headers,
|
1211
1242
|
params=_params,
|
1212
1243
|
)
|
1213
|
-
|
1244
|
+
_request.url = self._client.format_url(_request.url)
|
1214
1245
|
|
1215
1246
|
_stream = False
|
1216
1247
|
pipeline_response: PipelineResponse = (
|
1217
1248
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
1218
|
-
|
1249
|
+
_request, stream=_stream, **kwargs
|
1219
1250
|
)
|
1220
1251
|
)
|
1221
1252
|
|
1222
1253
|
response = pipeline_response.http_response
|
1223
1254
|
|
1224
1255
|
if response.status_code not in [200]:
|
1256
|
+
if _stream:
|
1257
|
+
await response.read() # Load the body in memory and close the socket
|
1225
1258
|
map_error(
|
1226
1259
|
status_code=response.status_code, response=response, error_map=error_map
|
1227
1260
|
)
|
@@ -1230,9 +1263,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1230
1263
|
deserialized = self._deserialize("object", pipeline_response)
|
1231
1264
|
|
1232
1265
|
if cls:
|
1233
|
-
return cls(pipeline_response, deserialized, {})
|
1266
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1234
1267
|
|
1235
|
-
return deserialized
|
1268
|
+
return deserialized # type: ignore
|
1236
1269
|
|
1237
1270
|
@distributed_trace_async
|
1238
1271
|
async def kill_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
|
@@ -1259,23 +1292,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1259
1292
|
|
1260
1293
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1261
1294
|
|
1262
|
-
|
1295
|
+
_request = build_jobs_kill_bulk_jobs_request(
|
1263
1296
|
job_ids=job_ids,
|
1264
1297
|
headers=_headers,
|
1265
1298
|
params=_params,
|
1266
1299
|
)
|
1267
|
-
|
1300
|
+
_request.url = self._client.format_url(_request.url)
|
1268
1301
|
|
1269
1302
|
_stream = False
|
1270
1303
|
pipeline_response: PipelineResponse = (
|
1271
1304
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
1272
|
-
|
1305
|
+
_request, stream=_stream, **kwargs
|
1273
1306
|
)
|
1274
1307
|
)
|
1275
1308
|
|
1276
1309
|
response = pipeline_response.http_response
|
1277
1310
|
|
1278
1311
|
if response.status_code not in [200]:
|
1312
|
+
if _stream:
|
1313
|
+
await response.read() # Load the body in memory and close the socket
|
1279
1314
|
map_error(
|
1280
1315
|
status_code=response.status_code, response=response, error_map=error_map
|
1281
1316
|
)
|
@@ -1284,9 +1319,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1284
1319
|
deserialized = self._deserialize("object", pipeline_response)
|
1285
1320
|
|
1286
1321
|
if cls:
|
1287
|
-
return cls(pipeline_response, deserialized, {})
|
1322
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1288
1323
|
|
1289
|
-
return deserialized
|
1324
|
+
return deserialized # type: ignore
|
1290
1325
|
|
1291
1326
|
@distributed_trace_async
|
1292
1327
|
async def remove_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
|
@@ -1317,23 +1352,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1317
1352
|
|
1318
1353
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1319
1354
|
|
1320
|
-
|
1355
|
+
_request = build_jobs_remove_bulk_jobs_request(
|
1321
1356
|
job_ids=job_ids,
|
1322
1357
|
headers=_headers,
|
1323
1358
|
params=_params,
|
1324
1359
|
)
|
1325
|
-
|
1360
|
+
_request.url = self._client.format_url(_request.url)
|
1326
1361
|
|
1327
1362
|
_stream = False
|
1328
1363
|
pipeline_response: PipelineResponse = (
|
1329
1364
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
1330
|
-
|
1365
|
+
_request, stream=_stream, **kwargs
|
1331
1366
|
)
|
1332
1367
|
)
|
1333
1368
|
|
1334
1369
|
response = pipeline_response.http_response
|
1335
1370
|
|
1336
1371
|
if response.status_code not in [200]:
|
1372
|
+
if _stream:
|
1373
|
+
await response.read() # Load the body in memory and close the socket
|
1337
1374
|
map_error(
|
1338
1375
|
status_code=response.status_code, response=response, error_map=error_map
|
1339
1376
|
)
|
@@ -1342,9 +1379,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1342
1379
|
deserialized = self._deserialize("object", pipeline_response)
|
1343
1380
|
|
1344
1381
|
if cls:
|
1345
|
-
return cls(pipeline_response, deserialized, {})
|
1382
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1346
1383
|
|
1347
|
-
return deserialized
|
1384
|
+
return deserialized # type: ignore
|
1348
1385
|
|
1349
1386
|
@distributed_trace_async
|
1350
1387
|
async def get_job_status_bulk(
|
@@ -1375,23 +1412,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1375
1412
|
"cls", None
|
1376
1413
|
)
|
1377
1414
|
|
1378
|
-
|
1415
|
+
_request = build_jobs_get_job_status_bulk_request(
|
1379
1416
|
job_ids=job_ids,
|
1380
1417
|
headers=_headers,
|
1381
1418
|
params=_params,
|
1382
1419
|
)
|
1383
|
-
|
1420
|
+
_request.url = self._client.format_url(_request.url)
|
1384
1421
|
|
1385
1422
|
_stream = False
|
1386
1423
|
pipeline_response: PipelineResponse = (
|
1387
1424
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
1388
|
-
|
1425
|
+
_request, stream=_stream, **kwargs
|
1389
1426
|
)
|
1390
1427
|
)
|
1391
1428
|
|
1392
1429
|
response = pipeline_response.http_response
|
1393
1430
|
|
1394
1431
|
if response.status_code not in [200]:
|
1432
|
+
if _stream:
|
1433
|
+
await response.read() # Load the body in memory and close the socket
|
1395
1434
|
map_error(
|
1396
1435
|
status_code=response.status_code, response=response, error_map=error_map
|
1397
1436
|
)
|
@@ -1400,9 +1439,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1400
1439
|
deserialized = self._deserialize("{LimitedJobStatusReturn}", pipeline_response)
|
1401
1440
|
|
1402
1441
|
if cls:
|
1403
|
-
return cls(pipeline_response, deserialized, {})
|
1442
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1404
1443
|
|
1405
|
-
return deserialized
|
1444
|
+
return deserialized # type: ignore
|
1406
1445
|
|
1407
1446
|
@overload
|
1408
1447
|
async def set_job_status_bulk(
|
@@ -1432,7 +1471,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1432
1471
|
@overload
|
1433
1472
|
async def set_job_status_bulk(
|
1434
1473
|
self,
|
1435
|
-
body: IO,
|
1474
|
+
body: IO[bytes],
|
1436
1475
|
*,
|
1437
1476
|
force: bool = False,
|
1438
1477
|
content_type: str = "application/json",
|
@@ -1443,7 +1482,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1443
1482
|
Set Job Status Bulk.
|
1444
1483
|
|
1445
1484
|
:param body: Required.
|
1446
|
-
:type body: IO
|
1485
|
+
:type body: IO[bytes]
|
1447
1486
|
:keyword force: Default value is False.
|
1448
1487
|
:paramtype force: bool
|
1449
1488
|
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
@@ -1457,7 +1496,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1457
1496
|
@distributed_trace_async
|
1458
1497
|
async def set_job_status_bulk(
|
1459
1498
|
self,
|
1460
|
-
body: Union[Dict[str, Dict[str, _models.JobStatusUpdate]], IO],
|
1499
|
+
body: Union[Dict[str, Dict[str, _models.JobStatusUpdate]], IO[bytes]],
|
1461
1500
|
*,
|
1462
1501
|
force: bool = False,
|
1463
1502
|
**kwargs: Any,
|
@@ -1466,13 +1505,10 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1466
1505
|
|
1467
1506
|
Set Job Status Bulk.
|
1468
1507
|
|
1469
|
-
:param body: Is either a {str: {str: JobStatusUpdate}} type or a IO type. Required.
|
1470
|
-
:type body: dict[str, dict[str, ~client.models.JobStatusUpdate]] or IO
|
1508
|
+
:param body: Is either a {str: {str: JobStatusUpdate}} type or a IO[bytes] type. Required.
|
1509
|
+
:type body: dict[str, dict[str, ~client.models.JobStatusUpdate]] or IO[bytes]
|
1471
1510
|
:keyword force: Default value is False.
|
1472
1511
|
:paramtype force: bool
|
1473
|
-
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
|
1474
|
-
Default value is None.
|
1475
|
-
:paramtype content_type: str
|
1476
1512
|
:return: dict mapping str to SetJobStatusReturn
|
1477
1513
|
:rtype: dict[str, ~client.models.SetJobStatusReturn]
|
1478
1514
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1501,7 +1537,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1501
1537
|
else:
|
1502
1538
|
_json = self._serialize.body(body, "{{JobStatusUpdate}}")
|
1503
1539
|
|
1504
|
-
|
1540
|
+
_request = build_jobs_set_job_status_bulk_request(
|
1505
1541
|
force=force,
|
1506
1542
|
content_type=content_type,
|
1507
1543
|
json=_json,
|
@@ -1509,18 +1545,20 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1509
1545
|
headers=_headers,
|
1510
1546
|
params=_params,
|
1511
1547
|
)
|
1512
|
-
|
1548
|
+
_request.url = self._client.format_url(_request.url)
|
1513
1549
|
|
1514
1550
|
_stream = False
|
1515
1551
|
pipeline_response: PipelineResponse = (
|
1516
1552
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
1517
|
-
|
1553
|
+
_request, stream=_stream, **kwargs
|
1518
1554
|
)
|
1519
1555
|
)
|
1520
1556
|
|
1521
1557
|
response = pipeline_response.http_response
|
1522
1558
|
|
1523
1559
|
if response.status_code not in [200]:
|
1560
|
+
if _stream:
|
1561
|
+
await response.read() # Load the body in memory and close the socket
|
1524
1562
|
map_error(
|
1525
1563
|
status_code=response.status_code, response=response, error_map=error_map
|
1526
1564
|
)
|
@@ -1529,9 +1567,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1529
1567
|
deserialized = self._deserialize("{SetJobStatusReturn}", pipeline_response)
|
1530
1568
|
|
1531
1569
|
if cls:
|
1532
|
-
return cls(pipeline_response, deserialized, {})
|
1570
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1533
1571
|
|
1534
|
-
return deserialized
|
1572
|
+
return deserialized # type: ignore
|
1535
1573
|
|
1536
1574
|
@distributed_trace_async
|
1537
1575
|
async def get_job_status_history_bulk(
|
@@ -1560,23 +1598,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1560
1598
|
|
1561
1599
|
cls: ClsType[Dict[str, List[_models.JobStatusReturn]]] = kwargs.pop("cls", None)
|
1562
1600
|
|
1563
|
-
|
1601
|
+
_request = build_jobs_get_job_status_history_bulk_request(
|
1564
1602
|
job_ids=job_ids,
|
1565
1603
|
headers=_headers,
|
1566
1604
|
params=_params,
|
1567
1605
|
)
|
1568
|
-
|
1606
|
+
_request.url = self._client.format_url(_request.url)
|
1569
1607
|
|
1570
1608
|
_stream = False
|
1571
1609
|
pipeline_response: PipelineResponse = (
|
1572
1610
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
1573
|
-
|
1611
|
+
_request, stream=_stream, **kwargs
|
1574
1612
|
)
|
1575
1613
|
)
|
1576
1614
|
|
1577
1615
|
response = pipeline_response.http_response
|
1578
1616
|
|
1579
1617
|
if response.status_code not in [200]:
|
1618
|
+
if _stream:
|
1619
|
+
await response.read() # Load the body in memory and close the socket
|
1580
1620
|
map_error(
|
1581
1621
|
status_code=response.status_code, response=response, error_map=error_map
|
1582
1622
|
)
|
@@ -1585,9 +1625,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1585
1625
|
deserialized = self._deserialize("{[JobStatusReturn]}", pipeline_response)
|
1586
1626
|
|
1587
1627
|
if cls:
|
1588
|
-
return cls(pipeline_response, deserialized, {})
|
1628
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1589
1629
|
|
1590
|
-
return deserialized
|
1630
|
+
return deserialized # type: ignore
|
1591
1631
|
|
1592
1632
|
@distributed_trace_async
|
1593
1633
|
async def reschedule_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
|
@@ -1614,23 +1654,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1614
1654
|
|
1615
1655
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1616
1656
|
|
1617
|
-
|
1657
|
+
_request = build_jobs_reschedule_bulk_jobs_request(
|
1618
1658
|
job_ids=job_ids,
|
1619
1659
|
headers=_headers,
|
1620
1660
|
params=_params,
|
1621
1661
|
)
|
1622
|
-
|
1662
|
+
_request.url = self._client.format_url(_request.url)
|
1623
1663
|
|
1624
1664
|
_stream = False
|
1625
1665
|
pipeline_response: PipelineResponse = (
|
1626
1666
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
1627
|
-
|
1667
|
+
_request, stream=_stream, **kwargs
|
1628
1668
|
)
|
1629
1669
|
)
|
1630
1670
|
|
1631
1671
|
response = pipeline_response.http_response
|
1632
1672
|
|
1633
1673
|
if response.status_code not in [200]:
|
1674
|
+
if _stream:
|
1675
|
+
await response.read() # Load the body in memory and close the socket
|
1634
1676
|
map_error(
|
1635
1677
|
status_code=response.status_code, response=response, error_map=error_map
|
1636
1678
|
)
|
@@ -1639,9 +1681,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1639
1681
|
deserialized = self._deserialize("object", pipeline_response)
|
1640
1682
|
|
1641
1683
|
if cls:
|
1642
|
-
return cls(pipeline_response, deserialized, {})
|
1684
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1643
1685
|
|
1644
|
-
return deserialized
|
1686
|
+
return deserialized # type: ignore
|
1645
1687
|
|
1646
1688
|
@distributed_trace_async
|
1647
1689
|
async def reschedule_single_job(self, job_id: int, **kwargs: Any) -> Any:
|
@@ -1668,23 +1710,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1668
1710
|
|
1669
1711
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1670
1712
|
|
1671
|
-
|
1713
|
+
_request = build_jobs_reschedule_single_job_request(
|
1672
1714
|
job_id=job_id,
|
1673
1715
|
headers=_headers,
|
1674
1716
|
params=_params,
|
1675
1717
|
)
|
1676
|
-
|
1718
|
+
_request.url = self._client.format_url(_request.url)
|
1677
1719
|
|
1678
1720
|
_stream = False
|
1679
1721
|
pipeline_response: PipelineResponse = (
|
1680
1722
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
1681
|
-
|
1723
|
+
_request, stream=_stream, **kwargs
|
1682
1724
|
)
|
1683
1725
|
)
|
1684
1726
|
|
1685
1727
|
response = pipeline_response.http_response
|
1686
1728
|
|
1687
1729
|
if response.status_code not in [200]:
|
1730
|
+
if _stream:
|
1731
|
+
await response.read() # Load the body in memory and close the socket
|
1688
1732
|
map_error(
|
1689
1733
|
status_code=response.status_code, response=response, error_map=error_map
|
1690
1734
|
)
|
@@ -1693,9 +1737,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1693
1737
|
deserialized = self._deserialize("object", pipeline_response)
|
1694
1738
|
|
1695
1739
|
if cls:
|
1696
|
-
return cls(pipeline_response, deserialized, {})
|
1740
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1697
1741
|
|
1698
|
-
return deserialized
|
1742
|
+
return deserialized # type: ignore
|
1699
1743
|
|
1700
1744
|
@overload
|
1701
1745
|
async def search(
|
@@ -1730,7 +1774,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1730
1774
|
@overload
|
1731
1775
|
async def search(
|
1732
1776
|
self,
|
1733
|
-
body: Optional[IO] = None,
|
1777
|
+
body: Optional[IO[bytes]] = None,
|
1734
1778
|
*,
|
1735
1779
|
page: int = 0,
|
1736
1780
|
per_page: int = 100,
|
@@ -1744,7 +1788,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1744
1788
|
**TODO: Add more docs**.
|
1745
1789
|
|
1746
1790
|
:param body: Default value is None.
|
1747
|
-
:type body: IO
|
1791
|
+
:type body: IO[bytes]
|
1748
1792
|
:keyword page: Default value is 0.
|
1749
1793
|
:paramtype page: int
|
1750
1794
|
:keyword per_page: Default value is 100.
|
@@ -1760,7 +1804,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1760
1804
|
@distributed_trace_async
|
1761
1805
|
async def search(
|
1762
1806
|
self,
|
1763
|
-
body: Optional[Union[_models.JobSearchParams, IO]] = None,
|
1807
|
+
body: Optional[Union[_models.JobSearchParams, IO[bytes]]] = None,
|
1764
1808
|
*,
|
1765
1809
|
page: int = 0,
|
1766
1810
|
per_page: int = 100,
|
@@ -1772,15 +1816,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1772
1816
|
|
1773
1817
|
**TODO: Add more docs**.
|
1774
1818
|
|
1775
|
-
:param body: Is either a JobSearchParams type or a IO type. Default value is None.
|
1776
|
-
:type body: ~client.models.JobSearchParams or IO
|
1819
|
+
:param body: Is either a JobSearchParams type or a IO[bytes] type. Default value is None.
|
1820
|
+
:type body: ~client.models.JobSearchParams or IO[bytes]
|
1777
1821
|
:keyword page: Default value is 0.
|
1778
1822
|
:paramtype page: int
|
1779
1823
|
:keyword per_page: Default value is 100.
|
1780
1824
|
:paramtype per_page: int
|
1781
|
-
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
|
1782
|
-
Default value is None.
|
1783
|
-
:paramtype content_type: str
|
1784
1825
|
:return: list of JSON
|
1785
1826
|
:rtype: list[JSON]
|
1786
1827
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1812,7 +1853,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1812
1853
|
else:
|
1813
1854
|
_json = None
|
1814
1855
|
|
1815
|
-
|
1856
|
+
_request = build_jobs_search_request(
|
1816
1857
|
page=page,
|
1817
1858
|
per_page=per_page,
|
1818
1859
|
content_type=content_type,
|
@@ -1821,18 +1862,20 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1821
1862
|
headers=_headers,
|
1822
1863
|
params=_params,
|
1823
1864
|
)
|
1824
|
-
|
1865
|
+
_request.url = self._client.format_url(_request.url)
|
1825
1866
|
|
1826
1867
|
_stream = False
|
1827
1868
|
pipeline_response: PipelineResponse = (
|
1828
1869
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
1829
|
-
|
1870
|
+
_request, stream=_stream, **kwargs
|
1830
1871
|
)
|
1831
1872
|
)
|
1832
1873
|
|
1833
1874
|
response = pipeline_response.http_response
|
1834
1875
|
|
1835
1876
|
if response.status_code not in [200]:
|
1877
|
+
if _stream:
|
1878
|
+
await response.read() # Load the body in memory and close the socket
|
1836
1879
|
map_error(
|
1837
1880
|
status_code=response.status_code, response=response, error_map=error_map
|
1838
1881
|
)
|
@@ -1841,9 +1884,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1841
1884
|
deserialized = self._deserialize("[object]", pipeline_response)
|
1842
1885
|
|
1843
1886
|
if cls:
|
1844
|
-
return cls(pipeline_response, deserialized, {})
|
1887
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1845
1888
|
|
1846
|
-
return deserialized
|
1889
|
+
return deserialized # type: ignore
|
1847
1890
|
|
1848
1891
|
@overload
|
1849
1892
|
async def summary(
|
@@ -1869,14 +1912,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1869
1912
|
|
1870
1913
|
@overload
|
1871
1914
|
async def summary(
|
1872
|
-
self, body: IO, *, content_type: str = "application/json", **kwargs: Any
|
1915
|
+
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
|
1873
1916
|
) -> Any:
|
1874
1917
|
"""Summary.
|
1875
1918
|
|
1876
1919
|
Show information suitable for plotting.
|
1877
1920
|
|
1878
1921
|
:param body: Required.
|
1879
|
-
:type body: IO
|
1922
|
+
:type body: IO[bytes]
|
1880
1923
|
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
1881
1924
|
Default value is "application/json".
|
1882
1925
|
:paramtype content_type: str
|
@@ -1887,17 +1930,14 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1887
1930
|
|
1888
1931
|
@distributed_trace_async
|
1889
1932
|
async def summary(
|
1890
|
-
self, body: Union[_models.JobSummaryParams, IO], **kwargs: Any
|
1933
|
+
self, body: Union[_models.JobSummaryParams, IO[bytes]], **kwargs: Any
|
1891
1934
|
) -> Any:
|
1892
1935
|
"""Summary.
|
1893
1936
|
|
1894
1937
|
Show information suitable for plotting.
|
1895
1938
|
|
1896
|
-
:param body: Is either a JobSummaryParams type or a IO type. Required.
|
1897
|
-
:type body: ~client.models.JobSummaryParams or IO
|
1898
|
-
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
|
1899
|
-
Default value is None.
|
1900
|
-
:paramtype content_type: str
|
1939
|
+
:param body: Is either a JobSummaryParams type or a IO[bytes] type. Required.
|
1940
|
+
:type body: ~client.models.JobSummaryParams or IO[bytes]
|
1901
1941
|
:return: any
|
1902
1942
|
:rtype: any
|
1903
1943
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1926,25 +1966,27 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1926
1966
|
else:
|
1927
1967
|
_json = self._serialize.body(body, "JobSummaryParams")
|
1928
1968
|
|
1929
|
-
|
1969
|
+
_request = build_jobs_summary_request(
|
1930
1970
|
content_type=content_type,
|
1931
1971
|
json=_json,
|
1932
1972
|
content=_content,
|
1933
1973
|
headers=_headers,
|
1934
1974
|
params=_params,
|
1935
1975
|
)
|
1936
|
-
|
1976
|
+
_request.url = self._client.format_url(_request.url)
|
1937
1977
|
|
1938
1978
|
_stream = False
|
1939
1979
|
pipeline_response: PipelineResponse = (
|
1940
1980
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
1941
|
-
|
1981
|
+
_request, stream=_stream, **kwargs
|
1942
1982
|
)
|
1943
1983
|
)
|
1944
1984
|
|
1945
1985
|
response = pipeline_response.http_response
|
1946
1986
|
|
1947
1987
|
if response.status_code not in [200]:
|
1988
|
+
if _stream:
|
1989
|
+
await response.read() # Load the body in memory and close the socket
|
1948
1990
|
map_error(
|
1949
1991
|
status_code=response.status_code, response=response, error_map=error_map
|
1950
1992
|
)
|
@@ -1953,9 +1995,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1953
1995
|
deserialized = self._deserialize("object", pipeline_response)
|
1954
1996
|
|
1955
1997
|
if cls:
|
1956
|
-
return cls(pipeline_response, deserialized, {})
|
1998
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1957
1999
|
|
1958
|
-
return deserialized
|
2000
|
+
return deserialized # type: ignore
|
1959
2001
|
|
1960
2002
|
@distributed_trace_async
|
1961
2003
|
async def get_single_job(self, job_id: int, **kwargs: Any) -> Any:
|
@@ -1982,23 +2024,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1982
2024
|
|
1983
2025
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1984
2026
|
|
1985
|
-
|
2027
|
+
_request = build_jobs_get_single_job_request(
|
1986
2028
|
job_id=job_id,
|
1987
2029
|
headers=_headers,
|
1988
2030
|
params=_params,
|
1989
2031
|
)
|
1990
|
-
|
2032
|
+
_request.url = self._client.format_url(_request.url)
|
1991
2033
|
|
1992
2034
|
_stream = False
|
1993
2035
|
pipeline_response: PipelineResponse = (
|
1994
2036
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
1995
|
-
|
2037
|
+
_request, stream=_stream, **kwargs
|
1996
2038
|
)
|
1997
2039
|
)
|
1998
2040
|
|
1999
2041
|
response = pipeline_response.http_response
|
2000
2042
|
|
2001
2043
|
if response.status_code not in [200]:
|
2044
|
+
if _stream:
|
2045
|
+
await response.read() # Load the body in memory and close the socket
|
2002
2046
|
map_error(
|
2003
2047
|
status_code=response.status_code, response=response, error_map=error_map
|
2004
2048
|
)
|
@@ -2007,9 +2051,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2007
2051
|
deserialized = self._deserialize("object", pipeline_response)
|
2008
2052
|
|
2009
2053
|
if cls:
|
2010
|
-
return cls(pipeline_response, deserialized, {})
|
2054
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2011
2055
|
|
2012
|
-
return deserialized
|
2056
|
+
return deserialized # type: ignore
|
2013
2057
|
|
2014
2058
|
@distributed_trace_async
|
2015
2059
|
async def delete_single_job(self, job_id: int, **kwargs: Any) -> Any:
|
@@ -2036,23 +2080,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2036
2080
|
|
2037
2081
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
2038
2082
|
|
2039
|
-
|
2083
|
+
_request = build_jobs_delete_single_job_request(
|
2040
2084
|
job_id=job_id,
|
2041
2085
|
headers=_headers,
|
2042
2086
|
params=_params,
|
2043
2087
|
)
|
2044
|
-
|
2088
|
+
_request.url = self._client.format_url(_request.url)
|
2045
2089
|
|
2046
2090
|
_stream = False
|
2047
2091
|
pipeline_response: PipelineResponse = (
|
2048
2092
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
2049
|
-
|
2093
|
+
_request, stream=_stream, **kwargs
|
2050
2094
|
)
|
2051
2095
|
)
|
2052
2096
|
|
2053
2097
|
response = pipeline_response.http_response
|
2054
2098
|
|
2055
2099
|
if response.status_code not in [200]:
|
2100
|
+
if _stream:
|
2101
|
+
await response.read() # Load the body in memory and close the socket
|
2056
2102
|
map_error(
|
2057
2103
|
status_code=response.status_code, response=response, error_map=error_map
|
2058
2104
|
)
|
@@ -2061,9 +2107,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2061
2107
|
deserialized = self._deserialize("object", pipeline_response)
|
2062
2108
|
|
2063
2109
|
if cls:
|
2064
|
-
return cls(pipeline_response, deserialized, {})
|
2110
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2065
2111
|
|
2066
|
-
return deserialized
|
2112
|
+
return deserialized # type: ignore
|
2067
2113
|
|
2068
2114
|
@distributed_trace_async
|
2069
2115
|
async def set_single_job_properties(
|
@@ -2101,7 +2147,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2101
2147
|
|
2102
2148
|
_json = self._serialize.body(body, "object")
|
2103
2149
|
|
2104
|
-
|
2150
|
+
_request = build_jobs_set_single_job_properties_request(
|
2105
2151
|
job_id=job_id,
|
2106
2152
|
update_timestamp=update_timestamp,
|
2107
2153
|
content_type=content_type,
|
@@ -2109,18 +2155,20 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2109
2155
|
headers=_headers,
|
2110
2156
|
params=_params,
|
2111
2157
|
)
|
2112
|
-
|
2158
|
+
_request.url = self._client.format_url(_request.url)
|
2113
2159
|
|
2114
2160
|
_stream = False
|
2115
2161
|
pipeline_response: PipelineResponse = (
|
2116
2162
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
2117
|
-
|
2163
|
+
_request, stream=_stream, **kwargs
|
2118
2164
|
)
|
2119
2165
|
)
|
2120
2166
|
|
2121
2167
|
response = pipeline_response.http_response
|
2122
2168
|
|
2123
2169
|
if response.status_code not in [200]:
|
2170
|
+
if _stream:
|
2171
|
+
await response.read() # Load the body in memory and close the socket
|
2124
2172
|
map_error(
|
2125
2173
|
status_code=response.status_code, response=response, error_map=error_map
|
2126
2174
|
)
|
@@ -2129,9 +2177,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2129
2177
|
deserialized = self._deserialize("object", pipeline_response)
|
2130
2178
|
|
2131
2179
|
if cls:
|
2132
|
-
return cls(pipeline_response, deserialized, {})
|
2180
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2133
2181
|
|
2134
|
-
return deserialized
|
2182
|
+
return deserialized # type: ignore
|
2135
2183
|
|
2136
2184
|
@distributed_trace_async
|
2137
2185
|
async def kill_single_job(self, job_id: int, **kwargs: Any) -> Any:
|
@@ -2158,23 +2206,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2158
2206
|
|
2159
2207
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
2160
2208
|
|
2161
|
-
|
2209
|
+
_request = build_jobs_kill_single_job_request(
|
2162
2210
|
job_id=job_id,
|
2163
2211
|
headers=_headers,
|
2164
2212
|
params=_params,
|
2165
2213
|
)
|
2166
|
-
|
2214
|
+
_request.url = self._client.format_url(_request.url)
|
2167
2215
|
|
2168
2216
|
_stream = False
|
2169
2217
|
pipeline_response: PipelineResponse = (
|
2170
2218
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
2171
|
-
|
2219
|
+
_request, stream=_stream, **kwargs
|
2172
2220
|
)
|
2173
2221
|
)
|
2174
2222
|
|
2175
2223
|
response = pipeline_response.http_response
|
2176
2224
|
|
2177
2225
|
if response.status_code not in [200]:
|
2226
|
+
if _stream:
|
2227
|
+
await response.read() # Load the body in memory and close the socket
|
2178
2228
|
map_error(
|
2179
2229
|
status_code=response.status_code, response=response, error_map=error_map
|
2180
2230
|
)
|
@@ -2183,9 +2233,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2183
2233
|
deserialized = self._deserialize("object", pipeline_response)
|
2184
2234
|
|
2185
2235
|
if cls:
|
2186
|
-
return cls(pipeline_response, deserialized, {})
|
2236
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2187
2237
|
|
2188
|
-
return deserialized
|
2238
|
+
return deserialized # type: ignore
|
2189
2239
|
|
2190
2240
|
@distributed_trace_async
|
2191
2241
|
async def remove_single_job(self, job_id: int, **kwargs: Any) -> Any:
|
@@ -2216,23 +2266,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2216
2266
|
|
2217
2267
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
2218
2268
|
|
2219
|
-
|
2269
|
+
_request = build_jobs_remove_single_job_request(
|
2220
2270
|
job_id=job_id,
|
2221
2271
|
headers=_headers,
|
2222
2272
|
params=_params,
|
2223
2273
|
)
|
2224
|
-
|
2274
|
+
_request.url = self._client.format_url(_request.url)
|
2225
2275
|
|
2226
2276
|
_stream = False
|
2227
2277
|
pipeline_response: PipelineResponse = (
|
2228
2278
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
2229
|
-
|
2279
|
+
_request, stream=_stream, **kwargs
|
2230
2280
|
)
|
2231
2281
|
)
|
2232
2282
|
|
2233
2283
|
response = pipeline_response.http_response
|
2234
2284
|
|
2235
2285
|
if response.status_code not in [200]:
|
2286
|
+
if _stream:
|
2287
|
+
await response.read() # Load the body in memory and close the socket
|
2236
2288
|
map_error(
|
2237
2289
|
status_code=response.status_code, response=response, error_map=error_map
|
2238
2290
|
)
|
@@ -2241,9 +2293,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2241
2293
|
deserialized = self._deserialize("object", pipeline_response)
|
2242
2294
|
|
2243
2295
|
if cls:
|
2244
|
-
return cls(pipeline_response, deserialized, {})
|
2296
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2245
2297
|
|
2246
|
-
return deserialized
|
2298
|
+
return deserialized # type: ignore
|
2247
2299
|
|
2248
2300
|
@distributed_trace_async
|
2249
2301
|
async def get_single_job_status(
|
@@ -2274,23 +2326,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2274
2326
|
"cls", None
|
2275
2327
|
)
|
2276
2328
|
|
2277
|
-
|
2329
|
+
_request = build_jobs_get_single_job_status_request(
|
2278
2330
|
job_id=job_id,
|
2279
2331
|
headers=_headers,
|
2280
2332
|
params=_params,
|
2281
2333
|
)
|
2282
|
-
|
2334
|
+
_request.url = self._client.format_url(_request.url)
|
2283
2335
|
|
2284
2336
|
_stream = False
|
2285
2337
|
pipeline_response: PipelineResponse = (
|
2286
2338
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
2287
|
-
|
2339
|
+
_request, stream=_stream, **kwargs
|
2288
2340
|
)
|
2289
2341
|
)
|
2290
2342
|
|
2291
2343
|
response = pipeline_response.http_response
|
2292
2344
|
|
2293
2345
|
if response.status_code not in [200]:
|
2346
|
+
if _stream:
|
2347
|
+
await response.read() # Load the body in memory and close the socket
|
2294
2348
|
map_error(
|
2295
2349
|
status_code=response.status_code, response=response, error_map=error_map
|
2296
2350
|
)
|
@@ -2299,9 +2353,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2299
2353
|
deserialized = self._deserialize("{LimitedJobStatusReturn}", pipeline_response)
|
2300
2354
|
|
2301
2355
|
if cls:
|
2302
|
-
return cls(pipeline_response, deserialized, {})
|
2356
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2303
2357
|
|
2304
|
-
return deserialized
|
2358
|
+
return deserialized # type: ignore
|
2305
2359
|
|
2306
2360
|
@overload
|
2307
2361
|
async def set_single_job_status(
|
@@ -2335,7 +2389,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2335
2389
|
async def set_single_job_status(
|
2336
2390
|
self,
|
2337
2391
|
job_id: int,
|
2338
|
-
body: IO,
|
2392
|
+
body: IO[bytes],
|
2339
2393
|
*,
|
2340
2394
|
force: bool = False,
|
2341
2395
|
content_type: str = "application/json",
|
@@ -2348,7 +2402,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2348
2402
|
:param job_id: Required.
|
2349
2403
|
:type job_id: int
|
2350
2404
|
:param body: Required.
|
2351
|
-
:type body: IO
|
2405
|
+
:type body: IO[bytes]
|
2352
2406
|
:keyword force: Default value is False.
|
2353
2407
|
:paramtype force: bool
|
2354
2408
|
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
@@ -2363,7 +2417,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2363
2417
|
async def set_single_job_status(
|
2364
2418
|
self,
|
2365
2419
|
job_id: int,
|
2366
|
-
body: Union[Dict[str, _models.JobStatusUpdate], IO],
|
2420
|
+
body: Union[Dict[str, _models.JobStatusUpdate], IO[bytes]],
|
2367
2421
|
*,
|
2368
2422
|
force: bool = False,
|
2369
2423
|
**kwargs: Any,
|
@@ -2374,13 +2428,10 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2374
2428
|
|
2375
2429
|
:param job_id: Required.
|
2376
2430
|
:type job_id: int
|
2377
|
-
:param body: Is either a {str: JobStatusUpdate} type or a IO type. Required.
|
2378
|
-
:type body: dict[str, ~client.models.JobStatusUpdate] or IO
|
2431
|
+
:param body: Is either a {str: JobStatusUpdate} type or a IO[bytes] type. Required.
|
2432
|
+
:type body: dict[str, ~client.models.JobStatusUpdate] or IO[bytes]
|
2379
2433
|
:keyword force: Default value is False.
|
2380
2434
|
:paramtype force: bool
|
2381
|
-
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
|
2382
|
-
Default value is None.
|
2383
|
-
:paramtype content_type: str
|
2384
2435
|
:return: dict mapping str to SetJobStatusReturn
|
2385
2436
|
:rtype: dict[str, ~client.models.SetJobStatusReturn]
|
2386
2437
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2409,7 +2460,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2409
2460
|
else:
|
2410
2461
|
_json = self._serialize.body(body, "{JobStatusUpdate}")
|
2411
2462
|
|
2412
|
-
|
2463
|
+
_request = build_jobs_set_single_job_status_request(
|
2413
2464
|
job_id=job_id,
|
2414
2465
|
force=force,
|
2415
2466
|
content_type=content_type,
|
@@ -2418,18 +2469,20 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2418
2469
|
headers=_headers,
|
2419
2470
|
params=_params,
|
2420
2471
|
)
|
2421
|
-
|
2472
|
+
_request.url = self._client.format_url(_request.url)
|
2422
2473
|
|
2423
2474
|
_stream = False
|
2424
2475
|
pipeline_response: PipelineResponse = (
|
2425
2476
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
2426
|
-
|
2477
|
+
_request, stream=_stream, **kwargs
|
2427
2478
|
)
|
2428
2479
|
)
|
2429
2480
|
|
2430
2481
|
response = pipeline_response.http_response
|
2431
2482
|
|
2432
2483
|
if response.status_code not in [200]:
|
2484
|
+
if _stream:
|
2485
|
+
await response.read() # Load the body in memory and close the socket
|
2433
2486
|
map_error(
|
2434
2487
|
status_code=response.status_code, response=response, error_map=error_map
|
2435
2488
|
)
|
@@ -2438,9 +2491,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2438
2491
|
deserialized = self._deserialize("{SetJobStatusReturn}", pipeline_response)
|
2439
2492
|
|
2440
2493
|
if cls:
|
2441
|
-
return cls(pipeline_response, deserialized, {})
|
2494
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2442
2495
|
|
2443
|
-
return deserialized
|
2496
|
+
return deserialized # type: ignore
|
2444
2497
|
|
2445
2498
|
@distributed_trace_async
|
2446
2499
|
async def get_single_job_status_history(
|
@@ -2469,23 +2522,25 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2469
2522
|
|
2470
2523
|
cls: ClsType[Dict[str, List[_models.JobStatusReturn]]] = kwargs.pop("cls", None)
|
2471
2524
|
|
2472
|
-
|
2525
|
+
_request = build_jobs_get_single_job_status_history_request(
|
2473
2526
|
job_id=job_id,
|
2474
2527
|
headers=_headers,
|
2475
2528
|
params=_params,
|
2476
2529
|
)
|
2477
|
-
|
2530
|
+
_request.url = self._client.format_url(_request.url)
|
2478
2531
|
|
2479
2532
|
_stream = False
|
2480
2533
|
pipeline_response: PipelineResponse = (
|
2481
2534
|
await self._client._pipeline.run( # pylint: disable=protected-access
|
2482
|
-
|
2535
|
+
_request, stream=_stream, **kwargs
|
2483
2536
|
)
|
2484
2537
|
)
|
2485
2538
|
|
2486
2539
|
response = pipeline_response.http_response
|
2487
2540
|
|
2488
2541
|
if response.status_code not in [200]:
|
2542
|
+
if _stream:
|
2543
|
+
await response.read() # Load the body in memory and close the socket
|
2489
2544
|
map_error(
|
2490
2545
|
status_code=response.status_code, response=response, error_map=error_map
|
2491
2546
|
)
|
@@ -2494,6 +2549,6 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2494
2549
|
deserialized = self._deserialize("{[JobStatusReturn]}", pipeline_response)
|
2495
2550
|
|
2496
2551
|
if cls:
|
2497
|
-
return cls(pipeline_response, deserialized, {})
|
2552
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2498
2553
|
|
2499
|
-
return deserialized
|
2554
|
+
return deserialized # type: ignore
|