@@ -70,7 +70,6 @@ async def _delete_initial(
7070 # Construct headers
7171 header_parameters = {} # type: Dict[str, Any]
7272
73- # Construct and send request
7473 request = self ._client .delete (url , query_parameters , header_parameters )
7574 pipeline_response = await self ._client ._pipeline .run (request , stream = False , ** kwargs )
7675 response = pipeline_response .http_response
@@ -89,7 +88,7 @@ async def begin_delete(
8988 resource_group_name : str ,
9089 application_gateway_name : str ,
9190 ** kwargs
92- ) -> None :
91+ ) -> AsyncLROPoller [ None ] :
9392 """Deletes the specified application gateway.
9493
9594 :param resource_group_name: The name of the resource group.
@@ -102,8 +101,8 @@ async def begin_delete(
102101 polling object for personal polling strategy
103102 :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
104103 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
105- :return: None, or the result of cls(response)
106- :rtype: None
104+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
105+ :rtype: ~azure.core.polling.AsyncLROPoller[ None]
107106 :raises ~azure.core.exceptions.HttpResponseError:
108107 """
109108 polling = kwargs .pop ('polling' , True ) # type: Union[bool, AsyncPollingMethod]
@@ -181,7 +180,6 @@ async def get(
181180 header_parameters = {} # type: Dict[str, Any]
182181 header_parameters ['Accept' ] = 'application/json'
183182
184- # Construct and send request
185183 request = self ._client .get (url , query_parameters , header_parameters )
186184 pipeline_response = await self ._client ._pipeline .run (request , stream = False , ** kwargs )
187185 response = pipeline_response .http_response
@@ -229,7 +227,6 @@ async def _create_or_update_initial(
229227 header_parameters ['Content-Type' ] = self ._serialize .header ("content_type" , content_type , 'str' )
230228 header_parameters ['Accept' ] = 'application/json'
231229
232- # Construct and send request
233230 body_content_kwargs = {} # type: Dict[str, Any]
234231 body_content = self ._serialize .body (parameters , 'ApplicationGateway' )
235232 body_content_kwargs ['content' ] = body_content
@@ -242,7 +239,6 @@ async def _create_or_update_initial(
242239 map_error (status_code = response .status_code , response = response , error_map = error_map )
243240 raise HttpResponseError (response = response , error_format = ARMErrorFormat )
244241
245- deserialized = None
246242 if response .status_code == 200 :
247243 deserialized = self ._deserialize ('ApplicationGateway' , pipeline_response )
248244
@@ -261,7 +257,7 @@ async def begin_create_or_update(
261257 application_gateway_name : str ,
262258 parameters : "models.ApplicationGateway" ,
263259 ** kwargs
264- ) -> "models.ApplicationGateway" :
260+ ) -> AsyncLROPoller [ "models.ApplicationGateway" ] :
265261 """Creates or updates the specified application gateway.
266262
267263 :param resource_group_name: The name of the resource group.
@@ -276,8 +272,8 @@ async def begin_create_or_update(
276272 polling object for personal polling strategy
277273 :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
278274 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
279- :return: ApplicationGateway, or the result of cls(response)
280- :rtype: ~azure.mgmt.network.v2015_06_15.models.ApplicationGateway
275+ :return: An instance of AsyncLROPoller that returns either ApplicationGateway or the result of cls(response)
276+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure. mgmt.network.v2015_06_15.models.ApplicationGateway]
281277 :raises ~azure.core.exceptions.HttpResponseError:
282278 """
283279 polling = kwargs .pop ('polling' , True ) # type: Union[bool, AsyncPollingMethod]
@@ -340,6 +336,10 @@ def list(
340336 api_version = "2015-06-15"
341337
342338 def prepare_request (next_link = None ):
339+ # Construct headers
340+ header_parameters = {} # type: Dict[str, Any]
341+ header_parameters ['Accept' ] = 'application/json'
342+
343343 if not next_link :
344344 # Construct URL
345345 url = self .list .metadata ['url' ] # type: ignore
@@ -352,15 +352,11 @@ def prepare_request(next_link=None):
352352 query_parameters = {} # type: Dict[str, Any]
353353 query_parameters ['api-version' ] = self ._serialize .query ("api_version" , api_version , 'str' )
354354
355+ request = self ._client .get (url , query_parameters , header_parameters )
355356 else :
356357 url = next_link
357358 query_parameters = {} # type: Dict[str, Any]
358- # Construct headers
359- header_parameters = {} # type: Dict[str, Any]
360- header_parameters ['Accept' ] = 'application/json'
361-
362- # Construct and send request
363- request = self ._client .get (url , query_parameters , header_parameters )
359+ request = self ._client .get (url , query_parameters , header_parameters )
364360 return request
365361
366362 async def extract_data (pipeline_response ):
@@ -404,6 +400,10 @@ def list_all(
404400 api_version = "2015-06-15"
405401
406402 def prepare_request (next_link = None ):
403+ # Construct headers
404+ header_parameters = {} # type: Dict[str, Any]
405+ header_parameters ['Accept' ] = 'application/json'
406+
407407 if not next_link :
408408 # Construct URL
409409 url = self .list_all .metadata ['url' ] # type: ignore
@@ -415,15 +415,11 @@ def prepare_request(next_link=None):
415415 query_parameters = {} # type: Dict[str, Any]
416416 query_parameters ['api-version' ] = self ._serialize .query ("api_version" , api_version , 'str' )
417417
418+ request = self ._client .get (url , query_parameters , header_parameters )
418419 else :
419420 url = next_link
420421 query_parameters = {} # type: Dict[str, Any]
421- # Construct headers
422- header_parameters = {} # type: Dict[str, Any]
423- header_parameters ['Accept' ] = 'application/json'
424-
425- # Construct and send request
426- request = self ._client .get (url , query_parameters , header_parameters )
422+ request = self ._client .get (url , query_parameters , header_parameters )
427423 return request
428424
429425 async def extract_data (pipeline_response ):
@@ -477,7 +473,6 @@ async def _start_initial(
477473 # Construct headers
478474 header_parameters = {} # type: Dict[str, Any]
479475
480- # Construct and send request
481476 request = self ._client .post (url , query_parameters , header_parameters )
482477 pipeline_response = await self ._client ._pipeline .run (request , stream = False , ** kwargs )
483478 response = pipeline_response .http_response
@@ -496,7 +491,7 @@ async def begin_start(
496491 resource_group_name : str ,
497492 application_gateway_name : str ,
498493 ** kwargs
499- ) -> None :
494+ ) -> AsyncLROPoller [ None ] :
500495 """Starts the specified application gateway.
501496
502497 :param resource_group_name: The name of the resource group.
@@ -509,8 +504,8 @@ async def begin_start(
509504 polling object for personal polling strategy
510505 :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
511506 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
512- :return: None, or the result of cls(response)
513- :rtype: None
507+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
508+ :rtype: ~azure.core.polling.AsyncLROPoller[ None]
514509 :raises ~azure.core.exceptions.HttpResponseError:
515510 """
516511 polling = kwargs .pop ('polling' , True ) # type: Union[bool, AsyncPollingMethod]
@@ -576,7 +571,6 @@ async def _stop_initial(
576571 # Construct headers
577572 header_parameters = {} # type: Dict[str, Any]
578573
579- # Construct and send request
580574 request = self ._client .post (url , query_parameters , header_parameters )
581575 pipeline_response = await self ._client ._pipeline .run (request , stream = False , ** kwargs )
582576 response = pipeline_response .http_response
@@ -595,7 +589,7 @@ async def begin_stop(
595589 resource_group_name : str ,
596590 application_gateway_name : str ,
597591 ** kwargs
598- ) -> None :
592+ ) -> AsyncLROPoller [ None ] :
599593 """Stops the specified application gateway in a resource group.
600594
601595 :param resource_group_name: The name of the resource group.
@@ -608,8 +602,8 @@ async def begin_stop(
608602 polling object for personal polling strategy
609603 :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
610604 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
611- :return: None, or the result of cls(response)
612- :rtype: None
605+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
606+ :rtype: ~azure.core.polling.AsyncLROPoller[ None]
613607 :raises ~azure.core.exceptions.HttpResponseError:
614608 """
615609 polling = kwargs .pop ('polling' , True ) # type: Union[bool, AsyncPollingMethod]
0 commit comments