6
6
# Code generated by Microsoft (R) AutoRest Code Generator.
7
7
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
8
# --------------------------------------------------------------------------
9
- import sys
10
9
from typing import Any , AsyncIterable , Callable , Dict , IO , Optional , TypeVar , Union , cast , overload
11
10
12
11
from azure .core .async_paging import AsyncItemPaged , AsyncList
38
37
build_update_request ,
39
38
)
40
39
41
- if sys .version_info >= (3 , 8 ):
42
- from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
43
- else :
44
- from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
45
40
T = TypeVar ("T" )
46
41
ClsType = Optional [Callable [[PipelineResponse [HttpRequest , AsyncHttpResponse ], T , Dict [str , Any ]], Any ]]
47
42
@@ -96,9 +91,7 @@ async def get(
96
91
_headers = kwargs .pop ("headers" , {}) or {}
97
92
_params = case_insensitive_dict (kwargs .pop ("params" , {}) or {})
98
93
99
- api_version : Literal ["2021-06-01-preview" ] = kwargs .pop (
100
- "api_version" , _params .pop ("api-version" , "2021-06-01-preview" )
101
- )
94
+ api_version : str = kwargs .pop ("api_version" , _params .pop ("api-version" , "2021-06-01-preview" ))
102
95
cls : ClsType [_models .BigDataPoolResourceInfo ] = kwargs .pop ("cls" , None )
103
96
104
97
request = build_get_request (
@@ -114,8 +107,9 @@ async def get(
114
107
request = _convert_request (request )
115
108
request .url = self ._client .format_url (request .url )
116
109
110
+ _stream = False
117
111
pipeline_response : PipelineResponse = await self ._client ._pipeline .run ( # pylint: disable=protected-access
118
- request , stream = False , ** kwargs
112
+ request , stream = _stream , ** kwargs
119
113
)
120
114
121
115
response = pipeline_response .http_response
@@ -222,8 +216,8 @@ async def update(
222
216
:type workspace_name: str
223
217
:param big_data_pool_name: Big Data pool name. Required.
224
218
:type big_data_pool_name: str
225
- :param big_data_pool_patch_info: The updated Big Data pool properties. Is either a model type
226
- or a IO type. Required.
219
+ :param big_data_pool_patch_info: The updated Big Data pool properties. Is either a
220
+ BigDataPoolPatchInfo type or a IO type. Required.
227
221
:type big_data_pool_patch_info: ~azure.mgmt.synapse.models.BigDataPoolPatchInfo or IO
228
222
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
229
223
Default value is None.
@@ -244,9 +238,7 @@ async def update(
244
238
_headers = case_insensitive_dict (kwargs .pop ("headers" , {}) or {})
245
239
_params = case_insensitive_dict (kwargs .pop ("params" , {}) or {})
246
240
247
- api_version : Literal ["2021-06-01-preview" ] = kwargs .pop (
248
- "api_version" , _params .pop ("api-version" , "2021-06-01-preview" )
249
- )
241
+ api_version : str = kwargs .pop ("api_version" , _params .pop ("api-version" , "2021-06-01-preview" ))
250
242
content_type : Optional [str ] = kwargs .pop ("content_type" , _headers .pop ("Content-Type" , None ))
251
243
cls : ClsType [_models .BigDataPoolResourceInfo ] = kwargs .pop ("cls" , None )
252
244
@@ -274,8 +266,9 @@ async def update(
274
266
request = _convert_request (request )
275
267
request .url = self ._client .format_url (request .url )
276
268
269
+ _stream = False
277
270
pipeline_response : PipelineResponse = await self ._client ._pipeline .run ( # pylint: disable=protected-access
278
- request , stream = False , ** kwargs
271
+ request , stream = _stream , ** kwargs
279
272
)
280
273
281
274
response = pipeline_response .http_response
@@ -316,9 +309,7 @@ async def _create_or_update_initial(
316
309
_headers = case_insensitive_dict (kwargs .pop ("headers" , {}) or {})
317
310
_params = case_insensitive_dict (kwargs .pop ("params" , {}) or {})
318
311
319
- api_version : Literal ["2021-06-01-preview" ] = kwargs .pop (
320
- "api_version" , _params .pop ("api-version" , "2021-06-01-preview" )
321
- )
312
+ api_version : str = kwargs .pop ("api_version" , _params .pop ("api-version" , "2021-06-01-preview" ))
322
313
content_type : Optional [str ] = kwargs .pop ("content_type" , _headers .pop ("Content-Type" , None ))
323
314
cls : ClsType [_models .BigDataPoolResourceInfo ] = kwargs .pop ("cls" , None )
324
315
@@ -347,8 +338,9 @@ async def _create_or_update_initial(
347
338
request = _convert_request (request )
348
339
request .url = self ._client .format_url (request .url )
349
340
341
+ _stream = False
350
342
pipeline_response : PipelineResponse = await self ._client ._pipeline .run ( # pylint: disable=protected-access
351
- request , stream = False , ** kwargs
343
+ request , stream = _stream , ** kwargs
352
344
)
353
345
354
346
response = pipeline_response .http_response
@@ -482,8 +474,8 @@ async def begin_create_or_update(
482
474
:type workspace_name: str
483
475
:param big_data_pool_name: Big Data pool name. Required.
484
476
:type big_data_pool_name: str
485
- :param big_data_pool_info: The Big Data pool to create. Is either a model type or a IO type.
486
- Required.
477
+ :param big_data_pool_info: The Big Data pool to create. Is either a BigDataPoolResourceInfo
478
+ type or a IO type. Required.
487
479
:type big_data_pool_info: ~azure.mgmt.synapse.models.BigDataPoolResourceInfo or IO
488
480
:param force: Whether to stop any running jobs in the Big Data pool. Default value is False.
489
481
:type force: bool
@@ -506,9 +498,7 @@ async def begin_create_or_update(
506
498
_headers = case_insensitive_dict (kwargs .pop ("headers" , {}) or {})
507
499
_params = case_insensitive_dict (kwargs .pop ("params" , {}) or {})
508
500
509
- api_version : Literal ["2021-06-01-preview" ] = kwargs .pop (
510
- "api_version" , _params .pop ("api-version" , "2021-06-01-preview" )
511
- )
501
+ api_version : str = kwargs .pop ("api_version" , _params .pop ("api-version" , "2021-06-01-preview" ))
512
502
content_type : Optional [str ] = kwargs .pop ("content_type" , _headers .pop ("Content-Type" , None ))
513
503
cls : ClsType [_models .BigDataPoolResourceInfo ] = kwargs .pop ("cls" , None )
514
504
polling : Union [bool , AsyncPollingMethod ] = kwargs .pop ("polling" , True )
@@ -572,9 +562,7 @@ async def _delete_initial(
572
562
_headers = kwargs .pop ("headers" , {}) or {}
573
563
_params = case_insensitive_dict (kwargs .pop ("params" , {}) or {})
574
564
575
- api_version : Literal ["2021-06-01-preview" ] = kwargs .pop (
576
- "api_version" , _params .pop ("api-version" , "2021-06-01-preview" )
577
- )
565
+ api_version : str = kwargs .pop ("api_version" , _params .pop ("api-version" , "2021-06-01-preview" ))
578
566
cls : ClsType [Optional [_models .BigDataPoolResourceInfo ]] = kwargs .pop ("cls" , None )
579
567
580
568
request = build_delete_request (
@@ -590,8 +578,9 @@ async def _delete_initial(
590
578
request = _convert_request (request )
591
579
request .url = self ._client .format_url (request .url )
592
580
581
+ _stream = False
593
582
pipeline_response : PipelineResponse = await self ._client ._pipeline .run ( # pylint: disable=protected-access
594
- request , stream = False , ** kwargs
583
+ request , stream = _stream , ** kwargs
595
584
)
596
585
597
586
response = pipeline_response .http_response
@@ -648,9 +637,7 @@ async def begin_delete(
648
637
_headers = kwargs .pop ("headers" , {}) or {}
649
638
_params = case_insensitive_dict (kwargs .pop ("params" , {}) or {})
650
639
651
- api_version : Literal ["2021-06-01-preview" ] = kwargs .pop (
652
- "api_version" , _params .pop ("api-version" , "2021-06-01-preview" )
653
- )
640
+ api_version : str = kwargs .pop ("api_version" , _params .pop ("api-version" , "2021-06-01-preview" ))
654
641
cls : ClsType [_models .BigDataPoolResourceInfo ] = kwargs .pop ("cls" , None )
655
642
polling : Union [bool , AsyncPollingMethod ] = kwargs .pop ("polling" , True )
656
643
lro_delay = kwargs .pop ("polling_interval" , self ._config .polling_interval )
@@ -719,9 +706,7 @@ def list_by_workspace(
719
706
_headers = kwargs .pop ("headers" , {}) or {}
720
707
_params = case_insensitive_dict (kwargs .pop ("params" , {}) or {})
721
708
722
- api_version : Literal ["2021-06-01-preview" ] = kwargs .pop (
723
- "api_version" , _params .pop ("api-version" , "2021-06-01-preview" )
724
- )
709
+ api_version : str = kwargs .pop ("api_version" , _params .pop ("api-version" , "2021-06-01-preview" ))
725
710
cls : ClsType [_models .BigDataPoolResourceInfoListResult ] = kwargs .pop ("cls" , None )
726
711
727
712
error_map = {
@@ -764,8 +749,9 @@ async def extract_data(pipeline_response):
764
749
async def get_next (next_link = None ):
765
750
request = prepare_request (next_link )
766
751
752
+ _stream = False
767
753
pipeline_response : PipelineResponse = await self ._client ._pipeline .run ( # pylint: disable=protected-access
768
- request , stream = False , ** kwargs
754
+ request , stream = _stream , ** kwargs
769
755
)
770
756
response = pipeline_response .http_response
771
757
0 commit comments