diff --git a/autorest/codegen/templates/lro_operation.py.jinja2 b/autorest/codegen/templates/lro_operation.py.jinja2 index 4b69dbee961..7a5c98b6849 100644 --- a/autorest/codegen/templates/lro_operation.py.jinja2 +++ b/autorest/codegen/templates/lro_operation.py.jinja2 @@ -5,8 +5,8 @@ {% set poller = "AsyncLROPoller" if async_mode else "LROPoller" %} {% set operation_name = "begin_"+operation.python_name %} {% macro return_docstring() %} -:return: {{ "" if async_mode else "An instance of LROPoller that returns either " }}{{ operation.responses[0].schema.docstring_text if operation.responses[0].has_body else "None"}}{{ "," if async_mode }} or the result of cls(response) -:rtype: {{"" if async_mode else "~azure.core.polling.LROPoller["}}{{ operation.responses[0].schema.docstring_type if operation.responses[0].has_body else "None" }}{{ "" if async_mode else "]" }}{% endmacro %} +:return: An instance of {{ "Async" if async_mode }}LROPoller that returns either {{ operation.responses[0].schema.docstring_text if operation.responses[0].has_body else "None"}} or the result of cls(response) +:rtype: ~azure.core.polling.{{ "Async" if async_mode }}LROPoller[{{ operation.responses[0].schema.docstring_type if operation.responses[0].has_body else "None" }}]{% endmacro %} {% macro param_documentation_string(parameter) %}:param {{ parameter.serialized_name }}: {{ parameter.description }}{% endmacro %} {% macro response_headers(response) %} response_headers = { @@ -20,11 +20,10 @@ response_headers = { {% if code_model.options['tracing'] %} {{ trace_decorator }} {% endif %} -{% set return_type_wrapper = "" if async_mode else "LROPoller" %} +{% set return_type_wrapper = "AsyncLROPoller" if async_mode else "LROPoller" %} {{ op_tools.method_signature(operation, operation_name, async_mode=async_mode, coroutine=async_mode, return_type_wrapper=return_type_wrapper) }} {%- if not async_mode %} -{# overriding sync_return_type_annotation because we know if it's sync, it's return type is just LROPoller #} - # type: (...) -> LROPoller + {{ op_tools.sync_return_type_annotation(operation, return_type_wrapper) }} {% endif %} """{{ operation.summary if operation.summary else operation.description | wordwrap(width=95, break_long_words=False, wrapstring='\n') }} {% if operation.summary and operation.description %} diff --git a/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lr_os_custom_header_operations_async.py b/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lr_os_custom_header_operations_async.py index f733757f00e..36a2c87ed9a 100644 --- a/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lr_os_custom_header_operations_async.py +++ b/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lr_os_custom_header_operations_async.py @@ -97,7 +97,7 @@ async def begin_put_async_retry_succeeded( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure- @@ -111,8 +111,8 @@ async def begin_put_async_retry_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -213,7 +213,7 @@ async def begin_put201_creating_succeeded200( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll @@ -227,8 +227,8 @@ async def begin_put201_creating_succeeded200( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -319,7 +319,7 @@ async def begin_post202_retry200( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. Long running post request, service returns a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success. @@ -332,8 +332,8 @@ async def begin_post202_retry200( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -422,7 +422,7 @@ async def begin_post_async_retry_succeeded( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure- @@ -436,8 +436,8 @@ async def begin_post_async_retry_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] diff --git a/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lro_retrys_operations_async.py b/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lro_retrys_operations_async.py index 880f701ff66..02f33682797 100644 --- a/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lro_retrys_operations_async.py +++ b/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lro_retrys_operations_async.py @@ -98,7 +98,7 @@ async def begin_put201_creating_succeeded200( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 500, then a 201 to the initial request, with an entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -111,8 +111,8 @@ async def begin_put201_creating_succeeded200( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -207,7 +207,7 @@ async def begin_put_async_relative_retry_succeeded( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 500, then a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure- AsyncOperation header for operation status. @@ -220,8 +220,8 @@ async def begin_put_async_relative_retry_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -314,7 +314,7 @@ async def _delete_provisioning202_accepted200_succeeded_initial( async def begin_delete_provisioning202_accepted200_succeeded( self, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running delete request, service returns a 500, then a 202 to the initial request, with an entity that contains ProvisioningState=’Accepted’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -325,8 +325,8 @@ async def begin_delete_provisioning202_accepted200_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -409,7 +409,7 @@ async def _delete202_retry200_initial( async def begin_delete202_retry200( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 500, then a 202 to the initial request. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -419,8 +419,8 @@ async def begin_delete202_retry200( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -497,7 +497,7 @@ async def _delete_async_relative_retry_succeeded_initial( async def begin_delete_async_relative_retry_succeeded( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 500, then a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -507,8 +507,8 @@ async def begin_delete_async_relative_retry_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -595,7 +595,7 @@ async def begin_post202_retry200( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running post request, service returns a 500, then a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success. @@ -607,8 +607,8 @@ async def begin_post202_retry200( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -697,7 +697,7 @@ async def begin_post_async_relative_retry_succeeded( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running post request, service returns a 500, then a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure- AsyncOperation header for operation status. @@ -710,8 +710,8 @@ async def begin_post_async_relative_retry_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] diff --git a/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lros_operations_async.py b/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lros_operations_async.py index 37ca98390ab..2186491c006 100644 --- a/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lros_operations_async.py +++ b/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lros_operations_async.py @@ -95,7 +95,7 @@ async def begin_put200_succeeded( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Succeeded’. @@ -107,8 +107,8 @@ async def begin_put200_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -199,7 +199,7 @@ async def begin_put201_succeeded( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Succeeded’. @@ -211,8 +211,8 @@ async def begin_put201_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -299,7 +299,7 @@ async def _post202_list_initial( async def begin_post202_list( self, **kwargs - ) -> List["models.Product"]: + ) -> AsyncLROPoller[List["models.Product"]]: """Long running put request, service returns a 202 with empty body to first request, returns a 200 with body [{ 'id': '100', 'name': 'foo' }]. @@ -309,8 +309,8 @@ async def begin_post202_list( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: list of Product, or the result of cls(response) - :rtype: list[~lro.models.Product] + :return: An instance of AsyncLROPoller that returns either list of Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[list[~lro.models.Product]] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -400,7 +400,7 @@ async def begin_put200_succeeded_no_state( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that does not contain ProvisioningState=’Succeeded’. @@ -412,8 +412,8 @@ async def begin_put200_succeeded_no_state( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -504,7 +504,7 @@ async def begin_put202_retry200( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 202 to the initial request, with a location header that points to a polling URL that returns a 200 and an entity that doesn't contains ProvisioningState. @@ -517,8 +517,8 @@ async def begin_put202_retry200( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -614,7 +614,7 @@ async def begin_put201_creating_succeeded200( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -627,8 +627,8 @@ async def begin_put201_creating_succeeded200( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -719,7 +719,7 @@ async def begin_put200_updating_succeeded204( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Updating’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -732,8 +732,8 @@ async def begin_put200_updating_succeeded204( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -829,7 +829,7 @@ async def begin_put201_creating_failed200( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Created’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Failed’. @@ -842,8 +842,8 @@ async def begin_put201_creating_failed200( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -934,7 +934,7 @@ async def begin_put200_acceptedcanceled200( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Canceled’. @@ -947,8 +947,8 @@ async def begin_put200_acceptedcanceled200( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1041,7 +1041,7 @@ async def begin_put_no_header_in_retry( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 202 to the initial request with location header. Subsequent calls to operation status do not contain location header. @@ -1053,8 +1053,8 @@ async def begin_put_no_header_in_retry( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1152,7 +1152,7 @@ async def begin_put_async_retry_succeeded( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1165,8 +1165,8 @@ async def begin_put_async_retry_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1265,7 +1265,7 @@ async def begin_put_async_no_retry_succeeded( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1278,8 +1278,8 @@ async def begin_put_async_no_retry_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1378,7 +1378,7 @@ async def begin_put_async_retry_failed( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1391,8 +1391,8 @@ async def begin_put_async_retry_failed( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1491,7 +1491,7 @@ async def begin_put_async_no_retrycanceled( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1504,8 +1504,8 @@ async def begin_put_async_no_retrycanceled( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1602,7 +1602,7 @@ async def begin_put_async_no_header_in_retry( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 202 to the initial request with Azure- AsyncOperation header. Subsequent calls to operation status do not contain Azure-AsyncOperation header. @@ -1615,8 +1615,8 @@ async def begin_put_async_no_header_in_retry( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1710,7 +1710,7 @@ async def begin_put_non_resource( self, sku: Optional["models.Sku"] = None, **kwargs - ) -> "models.Sku": + ) -> AsyncLROPoller["models.Sku"]: """Long running put request with non resource. :param sku: sku to put. @@ -1721,8 +1721,8 @@ async def begin_put_non_resource( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Sku, or the result of cls(response) - :rtype: ~lro.models.Sku + :return: An instance of AsyncLROPoller that returns either Sku or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Sku] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1813,7 +1813,7 @@ async def begin_put_async_non_resource( self, sku: Optional["models.Sku"] = None, **kwargs - ) -> "models.Sku": + ) -> AsyncLROPoller["models.Sku"]: """Long running put request with non resource. :param sku: Sku to put. @@ -1824,8 +1824,8 @@ async def begin_put_async_non_resource( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Sku, or the result of cls(response) - :rtype: ~lro.models.Sku + :return: An instance of AsyncLROPoller that returns either Sku or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Sku] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1918,7 +1918,7 @@ async def begin_put_sub_resource( self, provisioning_state: Optional[str] = None, **kwargs - ) -> "models.SubProduct": + ) -> AsyncLROPoller["models.SubProduct"]: """Long running put request with sub resource. :param provisioning_state: @@ -1929,8 +1929,8 @@ async def begin_put_sub_resource( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: SubProduct, or the result of cls(response) - :rtype: ~lro.models.SubProduct + :return: An instance of AsyncLROPoller that returns either SubProduct or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.SubProduct] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2023,7 +2023,7 @@ async def begin_put_async_sub_resource( self, provisioning_state: Optional[str] = None, **kwargs - ) -> "models.SubProduct": + ) -> AsyncLROPoller["models.SubProduct"]: """Long running put request with sub resource. :param provisioning_state: @@ -2034,8 +2034,8 @@ async def begin_put_async_sub_resource( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: SubProduct, or the result of cls(response) - :rtype: ~lro.models.SubProduct + :return: An instance of AsyncLROPoller that returns either SubProduct or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.SubProduct] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2123,7 +2123,7 @@ async def _delete_provisioning202_accepted200_succeeded_initial( async def begin_delete_provisioning202_accepted200_succeeded( self, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running delete request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Accepted’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -2134,8 +2134,8 @@ async def begin_delete_provisioning202_accepted200_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2226,7 +2226,7 @@ async def _delete_provisioning202_deleting_failed200_initial( async def begin_delete_provisioning202_deleting_failed200( self, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running delete request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Failed’. @@ -2237,8 +2237,8 @@ async def begin_delete_provisioning202_deleting_failed200( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2329,7 +2329,7 @@ async def _delete_provisioning202_deletingcanceled200_initial( async def begin_delete_provisioning202_deletingcanceled200( self, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running delete request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Canceled’. @@ -2340,8 +2340,8 @@ async def begin_delete_provisioning202_deletingcanceled200( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2420,7 +2420,7 @@ async def _delete204_succeeded_initial( async def begin_delete204_succeeded( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete succeeds and returns right away. :keyword callable cls: A custom type or function that will be passed the direct response @@ -2429,8 +2429,8 @@ async def begin_delete204_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2513,7 +2513,7 @@ async def _delete202_retry200_initial( async def begin_delete202_retry200( self, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running delete request, service returns a 202 to the initial request. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -2523,8 +2523,8 @@ async def begin_delete202_retry200( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2610,7 +2610,7 @@ async def _delete202_no_retry204_initial( async def begin_delete202_no_retry204( self, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running delete request, service returns a 202 to the initial request. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -2620,8 +2620,8 @@ async def begin_delete202_no_retry204( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2700,7 +2700,7 @@ async def _delete_no_header_in_retry_initial( async def begin_delete_no_header_in_retry( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a location header in the initial request. Subsequent calls to operation status do not contain location header. @@ -2710,8 +2710,8 @@ async def begin_delete_no_header_in_retry( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2787,7 +2787,7 @@ async def _delete_async_no_header_in_retry_initial( async def begin_delete_async_no_header_in_retry( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns an Azure-AsyncOperation header in the initial request. Subsequent calls to operation status do not contain Azure-AsyncOperation header. @@ -2797,8 +2797,8 @@ async def begin_delete_async_no_header_in_retry( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2875,7 +2875,7 @@ async def _delete_async_retry_succeeded_initial( async def begin_delete_async_retry_succeeded( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -2885,8 +2885,8 @@ async def begin_delete_async_retry_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2963,7 +2963,7 @@ async def _delete_async_no_retry_succeeded_initial( async def begin_delete_async_no_retry_succeeded( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -2973,8 +2973,8 @@ async def begin_delete_async_no_retry_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -3051,7 +3051,7 @@ async def _delete_async_retry_failed_initial( async def begin_delete_async_retry_failed( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -3061,8 +3061,8 @@ async def begin_delete_async_retry_failed( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -3139,7 +3139,7 @@ async def _delete_async_retrycanceled_initial( async def begin_delete_async_retrycanceled( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -3149,8 +3149,8 @@ async def begin_delete_async_retrycanceled( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -3231,7 +3231,7 @@ async def _post200_with_payload_initial( async def begin_post200_with_payload( self, **kwargs - ) -> "models.Sku": + ) -> AsyncLROPoller["models.Sku"]: """Long running post request, service returns a 202 to the initial request, with 'Location' header. Poll returns a 200 with a response body after success. @@ -3241,8 +3241,8 @@ async def begin_post200_with_payload( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Sku, or the result of cls(response) - :rtype: ~lro.models.Sku + :return: An instance of AsyncLROPoller that returns either Sku or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Sku] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -3332,7 +3332,7 @@ async def begin_post202_retry200( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running post request, service returns a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success. @@ -3344,8 +3344,8 @@ async def begin_post202_retry200( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -3436,7 +3436,7 @@ async def begin_post202_no_retry204( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running post request, service returns a 202 to the initial request, with 'Location' header, 204 with noresponse body after success. @@ -3448,8 +3448,8 @@ async def begin_post202_no_retry204( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -3533,7 +3533,7 @@ async def _post_double_headers_final_location_get_initial( async def begin_post_double_headers_final_location_get( self, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running post request, service returns a 202 to the initial request with both Location and Azure-Async header. Poll Azure-Async and it's success. Should poll Location to get the final object. @@ -3544,8 +3544,8 @@ async def begin_post_double_headers_final_location_get( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -3624,7 +3624,7 @@ async def _post_double_headers_final_azure_header_get_initial( async def begin_post_double_headers_final_azure_header_get( self, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running post request, service returns a 202 to the initial request with both Location and Azure-Async header. Poll Azure-Async and it's success. Should NOT poll Location to get the final object. @@ -3635,8 +3635,8 @@ async def begin_post_double_headers_final_azure_header_get( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -3715,7 +3715,7 @@ async def _post_double_headers_final_azure_header_get_default_initial( async def begin_post_double_headers_final_azure_header_get_default( self, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running post request, service returns a 202 to the initial request with both Location and Azure-Async header. Poll Azure-Async and it's success. Should NOT poll Location to get the final object if you support initial Autorest behavior. @@ -3726,8 +3726,8 @@ async def begin_post_double_headers_final_azure_header_get_default( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -3825,7 +3825,7 @@ async def begin_post_async_retry_succeeded( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -3838,8 +3838,8 @@ async def begin_post_async_retry_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -3938,7 +3938,7 @@ async def begin_post_async_no_retry_succeeded( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -3951,8 +3951,8 @@ async def begin_post_async_no_retry_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -4044,7 +4044,7 @@ async def begin_post_async_retry_failed( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -4057,8 +4057,8 @@ async def begin_post_async_retry_failed( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -4147,7 +4147,7 @@ async def begin_post_async_retrycanceled( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -4160,8 +4160,8 @@ async def begin_post_async_retrycanceled( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] diff --git a/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lrosads_operations_async.py b/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lrosads_operations_async.py index 3533a151ed1..364e800e44b 100644 --- a/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lrosads_operations_async.py +++ b/test/azure/Expected/AcceptanceTests/Lro/lro/aio/operations_async/_lrosads_operations_async.py @@ -98,7 +98,7 @@ async def begin_put_non_retry400( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 400 to the initial request. :param product: Product to put. @@ -109,8 +109,8 @@ async def begin_put_non_retry400( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -206,7 +206,7 @@ async def begin_put_non_retry201_creating400( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a Product with 'ProvisioningState' = 'Creating' and 201 response code. @@ -218,8 +218,8 @@ async def begin_put_non_retry201_creating400( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -315,7 +315,7 @@ async def begin_put_non_retry201_creating400_invalid_json( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a Product with 'ProvisioningState' = 'Creating' and 201 response code. @@ -327,8 +327,8 @@ async def begin_put_non_retry201_creating400_invalid_json( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -423,7 +423,7 @@ async def begin_put_async_relative_retry400( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 with ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -435,8 +435,8 @@ async def begin_put_async_relative_retry400( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -521,7 +521,7 @@ async def _delete_non_retry400_initial( async def begin_delete_non_retry400( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 400 with an error body. :keyword callable cls: A custom type or function that will be passed the direct response @@ -530,8 +530,8 @@ async def begin_delete_non_retry400( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -607,7 +607,7 @@ async def _delete202_non_retry400_initial( async def begin_delete202_non_retry400( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 202 with a location header. :keyword callable cls: A custom type or function that will be passed the direct response @@ -616,8 +616,8 @@ async def begin_delete202_non_retry400( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -694,7 +694,7 @@ async def _delete_async_relative_retry400_initial( async def begin_delete_async_relative_retry400( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -704,8 +704,8 @@ async def begin_delete_async_relative_retry400( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -792,7 +792,7 @@ async def begin_post_non_retry400( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running post request, service returns a 400 with no error body. :param product: Product to put. @@ -803,8 +803,8 @@ async def begin_post_non_retry400( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -892,7 +892,7 @@ async def begin_post202_non_retry400( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running post request, service returns a 202 with a location header. :param product: Product to put. @@ -903,8 +903,8 @@ async def begin_post202_non_retry400( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -993,7 +993,7 @@ async def begin_post_async_relative_retry400( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running post request, service returns a 202 to the initial request Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1005,8 +1005,8 @@ async def begin_post_async_relative_retry400( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1099,7 +1099,7 @@ async def begin_put_error201_no_provisioning_state_payload( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 201 to the initial request with no payload. :param product: Product to put. @@ -1110,8 +1110,8 @@ async def begin_put_error201_no_provisioning_state_payload( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1206,7 +1206,7 @@ async def begin_put_async_relative_retry_no_status( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1219,8 +1219,8 @@ async def begin_put_async_relative_retry_no_status( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1320,7 +1320,7 @@ async def begin_put_async_relative_retry_no_status_payload( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1333,8 +1333,8 @@ async def begin_put_async_relative_retry_no_status_payload( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1415,7 +1415,7 @@ async def _delete204_succeeded_initial( async def begin_delete204_succeeded( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 204 to the initial request, indicating success. :keyword callable cls: A custom type or function that will be passed the direct response @@ -1424,8 +1424,8 @@ async def begin_delete204_succeeded( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1502,7 +1502,7 @@ async def _delete_async_relative_retry_no_status_initial( async def begin_delete_async_relative_retry_no_status( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1512,8 +1512,8 @@ async def begin_delete_async_relative_retry_no_status( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1600,7 +1600,7 @@ async def begin_post202_no_location( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running post request, service returns a 202 to the initial request, without a location header. @@ -1612,8 +1612,8 @@ async def begin_post202_no_location( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1702,7 +1702,7 @@ async def begin_post_async_relative_retry_no_payload( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1715,8 +1715,8 @@ async def begin_post_async_relative_retry_no_payload( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1806,7 +1806,7 @@ async def begin_put200_invalid_json( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that is not a valid json. @@ -1818,8 +1818,8 @@ async def begin_put200_invalid_json( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1914,7 +1914,7 @@ async def begin_put_async_relative_retry_invalid_header( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. The endpoint indicated in the Azure-AsyncOperation header is invalid. @@ -1927,8 +1927,8 @@ async def begin_put_async_relative_retry_invalid_header( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2028,7 +2028,7 @@ async def begin_put_async_relative_retry_invalid_json_polling( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -2041,8 +2041,8 @@ async def begin_put_async_relative_retry_invalid_json_polling( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~lro.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~lro.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2127,7 +2127,7 @@ async def _delete202_retry_invalid_header_initial( async def begin_delete202_retry_invalid_header( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 202 to the initial request receing a reponse with an invalid 'Location' and 'Retry-After' headers. @@ -2137,8 +2137,8 @@ async def begin_delete202_retry_invalid_header( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2215,7 +2215,7 @@ async def _delete_async_relative_retry_invalid_header_initial( async def begin_delete_async_relative_retry_invalid_header( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 202 to the initial request. The endpoint indicated in the Azure-AsyncOperation header is invalid. @@ -2225,8 +2225,8 @@ async def begin_delete_async_relative_retry_invalid_header( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2303,7 +2303,7 @@ async def _delete_async_relative_retry_invalid_json_polling_initial( async def begin_delete_async_relative_retry_invalid_json_polling( self, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -2313,8 +2313,8 @@ async def begin_delete_async_relative_retry_invalid_json_polling( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2401,7 +2401,7 @@ async def begin_post202_retry_invalid_header( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running post request, service returns a 202 to the initial request, with invalid 'Location' and 'Retry-After' headers. @@ -2413,8 +2413,8 @@ async def begin_post202_retry_invalid_header( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2503,7 +2503,7 @@ async def begin_post_async_relative_retry_invalid_header( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. The endpoint indicated in the Azure-AsyncOperation header is invalid. @@ -2516,8 +2516,8 @@ async def begin_post_async_relative_retry_invalid_header( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -2606,7 +2606,7 @@ async def begin_post_async_relative_retry_invalid_json_polling( self, product: Optional["models.Product"] = None, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -2619,8 +2619,8 @@ async def begin_post_async_relative_retry_invalid_json_polling( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] diff --git a/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lr_os_custom_header_operations.py b/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lr_os_custom_header_operations.py index 4fbd3ed5f9b..3b42c68efde 100644 --- a/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lr_os_custom_header_operations.py +++ b/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lr_os_custom_header_operations.py @@ -103,7 +103,7 @@ def begin_put_async_retry_succeeded( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure- @@ -221,7 +221,7 @@ def begin_put201_creating_succeeded200( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll @@ -329,7 +329,7 @@ def begin_post202_retry200( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. Long running post request, service returns a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success. @@ -434,7 +434,7 @@ def begin_post_async_retry_succeeded( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """x-ms-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 is required message header for all requests. Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure- diff --git a/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lro_retrys_operations.py b/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lro_retrys_operations.py index 005103e8602..c574ba82e58 100644 --- a/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lro_retrys_operations.py +++ b/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lro_retrys_operations.py @@ -104,7 +104,7 @@ def begin_put201_creating_succeeded200( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 500, then a 201 to the initial request, with an entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -215,7 +215,7 @@ def begin_put_async_relative_retry_succeeded( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 500, then a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure- AsyncOperation header for operation status. @@ -324,7 +324,7 @@ def begin_delete_provisioning202_accepted200_succeeded( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running delete request, service returns a 500, then a 202 to the initial request, with an entity that contains ProvisioningState=’Accepted’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -421,7 +421,7 @@ def begin_delete202_retry200( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 500, then a 202 to the initial request. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -511,7 +511,7 @@ def begin_delete_async_relative_retry_succeeded( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 500, then a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -611,7 +611,7 @@ def begin_post202_retry200( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running post request, service returns a 500, then a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success. @@ -715,7 +715,7 @@ def begin_post_async_relative_retry_succeeded( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running post request, service returns a 500, then a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure- AsyncOperation header for operation status. diff --git a/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lros_operations.py b/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lros_operations.py index 431fbba40b6..a9e3f60120d 100644 --- a/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lros_operations.py +++ b/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lros_operations.py @@ -101,7 +101,7 @@ def begin_put200_succeeded( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Succeeded’. @@ -207,7 +207,7 @@ def begin_put201_succeeded( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Succeeded’. @@ -309,7 +309,7 @@ def begin_post202_list( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[List["models.Product"]] """Long running put request, service returns a 202 with empty body to first request, returns a 200 with body [{ 'id': '100', 'name': 'foo' }]. @@ -412,7 +412,7 @@ def begin_put200_succeeded_no_state( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 200 to the initial request, with an entity that does not contain ProvisioningState=’Succeeded’. @@ -518,7 +518,7 @@ def begin_put202_retry200( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 202 to the initial request, with a location header that points to a polling URL that returns a 200 and an entity that doesn't contains ProvisioningState. @@ -630,7 +630,7 @@ def begin_put201_creating_succeeded200( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -737,7 +737,7 @@ def begin_put200_updating_succeeded204( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Updating’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -849,7 +849,7 @@ def begin_put201_creating_failed200( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Created’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Failed’. @@ -956,7 +956,7 @@ def begin_put200_acceptedcanceled200( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Canceled’. @@ -1065,7 +1065,7 @@ def begin_put_no_header_in_retry( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 202 to the initial request with location header. Subsequent calls to operation status do not contain location header. @@ -1178,7 +1178,7 @@ def begin_put_async_retry_succeeded( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1293,7 +1293,7 @@ def begin_put_async_no_retry_succeeded( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1408,7 +1408,7 @@ def begin_put_async_retry_failed( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1523,7 +1523,7 @@ def begin_put_async_no_retrycanceled( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1636,7 +1636,7 @@ def begin_put_async_no_header_in_retry( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 202 to the initial request with Azure- AsyncOperation header. Subsequent calls to operation status do not contain Azure-AsyncOperation header. @@ -1746,7 +1746,7 @@ def begin_put_non_resource( sku=None, # type: Optional["models.Sku"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Sku"] """Long running put request with non resource. :param sku: sku to put. @@ -1851,7 +1851,7 @@ def begin_put_async_non_resource( sku=None, # type: Optional["models.Sku"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Sku"] """Long running put request with non resource. :param sku: Sku to put. @@ -1958,7 +1958,7 @@ def begin_put_sub_resource( provisioning_state=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.SubProduct"] """Long running put request with sub resource. :param provisioning_state: @@ -2065,7 +2065,7 @@ def begin_put_async_sub_resource( provisioning_state=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.SubProduct"] """Long running put request with sub resource. :param provisioning_state: @@ -2167,7 +2167,7 @@ def begin_delete_provisioning202_accepted200_succeeded( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running delete request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Accepted’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -2272,7 +2272,7 @@ def begin_delete_provisioning202_deleting_failed200( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running delete request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Failed’. @@ -2377,7 +2377,7 @@ def begin_delete_provisioning202_deletingcanceled200( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running delete request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Canceled’. @@ -2470,7 +2470,7 @@ def begin_delete204_succeeded( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete succeeds and returns right away. :keyword callable cls: A custom type or function that will be passed the direct response @@ -2565,7 +2565,7 @@ def begin_delete202_retry200( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running delete request, service returns a 202 to the initial request. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -2664,7 +2664,7 @@ def begin_delete202_no_retry204( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running delete request, service returns a 202 to the initial request. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. @@ -2756,7 +2756,7 @@ def begin_delete_no_header_in_retry( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a location header in the initial request. Subsequent calls to operation status do not contain location header. @@ -2845,7 +2845,7 @@ def begin_delete_async_no_header_in_retry( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns an Azure-AsyncOperation header in the initial request. Subsequent calls to operation status do not contain Azure-AsyncOperation header. @@ -2935,7 +2935,7 @@ def begin_delete_async_retry_succeeded( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -3025,7 +3025,7 @@ def begin_delete_async_no_retry_succeeded( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -3115,7 +3115,7 @@ def begin_delete_async_retry_failed( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -3205,7 +3205,7 @@ def begin_delete_async_retrycanceled( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -3299,7 +3299,7 @@ def begin_post200_with_payload( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Sku"] """Long running post request, service returns a 202 to the initial request, with 'Location' header. Poll returns a 200 with a response body after success. @@ -3402,7 +3402,7 @@ def begin_post202_retry200( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running post request, service returns a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success. @@ -3508,7 +3508,7 @@ def begin_post202_no_retry204( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running post request, service returns a 202 to the initial request, with 'Location' header, 204 with noresponse body after success. @@ -3607,7 +3607,7 @@ def begin_post_double_headers_final_location_get( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running post request, service returns a 202 to the initial request with both Location and Azure-Async header. Poll Azure-Async and it's success. Should poll Location to get the final object. @@ -3700,7 +3700,7 @@ def begin_post_double_headers_final_azure_header_get( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running post request, service returns a 202 to the initial request with both Location and Azure-Async header. Poll Azure-Async and it's success. Should NOT poll Location to get the final object. @@ -3793,7 +3793,7 @@ def begin_post_double_headers_final_azure_header_get_default( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running post request, service returns a 202 to the initial request with both Location and Azure-Async header. Poll Azure-Async and it's success. Should NOT poll Location to get the final object if you support initial Autorest behavior. @@ -3905,7 +3905,7 @@ def begin_post_async_retry_succeeded( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -4020,7 +4020,7 @@ def begin_post_async_no_retry_succeeded( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -4128,7 +4128,7 @@ def begin_post_async_retry_failed( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -4233,7 +4233,7 @@ def begin_post_async_retrycanceled( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. diff --git a/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lrosads_operations.py b/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lrosads_operations.py index 6018f3a552d..022da243859 100644 --- a/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lrosads_operations.py +++ b/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lrosads_operations.py @@ -104,7 +104,7 @@ def begin_put_non_retry400( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 400 to the initial request. :param product: Product to put. @@ -214,7 +214,7 @@ def begin_put_non_retry201_creating400( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a Product with 'ProvisioningState' = 'Creating' and 201 response code. @@ -325,7 +325,7 @@ def begin_put_non_retry201_creating400_invalid_json( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a Product with 'ProvisioningState' = 'Creating' and 201 response code. @@ -435,7 +435,7 @@ def begin_put_async_relative_retry400( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 200 with ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -535,7 +535,7 @@ def begin_delete_non_retry400( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 400 with an error body. :keyword callable cls: A custom type or function that will be passed the direct response @@ -623,7 +623,7 @@ def begin_delete202_non_retry400( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 202 with a location header. :keyword callable cls: A custom type or function that will be passed the direct response @@ -712,7 +712,7 @@ def begin_delete_async_relative_retry400( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -812,7 +812,7 @@ def begin_post_non_retry400( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running post request, service returns a 400 with no error body. :param product: Product to put. @@ -914,7 +914,7 @@ def begin_post202_non_retry400( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running post request, service returns a 202 with a location header. :param product: Product to put. @@ -1017,7 +1017,7 @@ def begin_post_async_relative_retry400( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running post request, service returns a 202 to the initial request Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1125,7 +1125,7 @@ def begin_put_error201_no_provisioning_state_payload( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 201 to the initial request with no payload. :param product: Product to put. @@ -1234,7 +1234,7 @@ def begin_put_async_relative_retry_no_status( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1350,7 +1350,7 @@ def begin_put_async_relative_retry_no_status_payload( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1447,7 +1447,7 @@ def begin_delete204_succeeded( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 204 to the initial request, indicating success. :keyword callable cls: A custom type or function that will be passed the direct response @@ -1536,7 +1536,7 @@ def begin_delete_async_relative_retry_no_status( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1636,7 +1636,7 @@ def begin_post202_no_location( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running post request, service returns a 202 to the initial request, without a location header. @@ -1740,7 +1740,7 @@ def begin_post_async_relative_retry_no_payload( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -1846,7 +1846,7 @@ def begin_put200_invalid_json( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 200 to the initial request, with an entity that is not a valid json. @@ -1956,7 +1956,7 @@ def begin_put_async_relative_retry_invalid_header( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. The endpoint indicated in the Azure-AsyncOperation header is invalid. @@ -2072,7 +2072,7 @@ def begin_put_async_relative_retry_invalid_json_polling( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -2173,7 +2173,7 @@ def begin_delete202_retry_invalid_header( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 202 to the initial request receing a reponse with an invalid 'Location' and 'Retry-After' headers. @@ -2263,7 +2263,7 @@ def begin_delete_async_relative_retry_invalid_header( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 202 to the initial request. The endpoint indicated in the Azure-AsyncOperation header is invalid. @@ -2353,7 +2353,7 @@ def begin_delete_async_relative_retry_invalid_json_polling( self, **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. @@ -2453,7 +2453,7 @@ def begin_post202_retry_invalid_header( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running post request, service returns a 202 to the initial request, with invalid 'Location' and 'Retry-After' headers. @@ -2557,7 +2557,7 @@ def begin_post_async_relative_retry_invalid_header( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. The endpoint indicated in the Azure-AsyncOperation header is invalid. @@ -2662,7 +2662,7 @@ def begin_post_async_relative_retry_invalid_json_polling( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Long running post request, service returns a 202 to the initial request, with an entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. diff --git a/test/azure/Expected/AcceptanceTests/Paging/paging/aio/operations_async/_paging_operations_async.py b/test/azure/Expected/AcceptanceTests/Paging/paging/aio/operations_async/_paging_operations_async.py index f47473c0fa0..b1810244c5d 100644 --- a/test/azure/Expected/AcceptanceTests/Paging/paging/aio/operations_async/_paging_operations_async.py +++ b/test/azure/Expected/AcceptanceTests/Paging/paging/aio/operations_async/_paging_operations_async.py @@ -1026,7 +1026,7 @@ async def begin_get_multiple_pages_lro( client_request_id: Optional[str] = None, paging_get_multiple_pages_lro_options: Optional["models.PagingGetMultiplePagesLroOptions"] = None, **kwargs - ) -> "models.ProductResult": + ) -> AsyncLROPoller["models.ProductResult"]: """A long-running paging operation that includes a nextLink that has 10 pages. :param client_request_id: @@ -1039,8 +1039,8 @@ async def begin_get_multiple_pages_lro( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: ProductResult, or the result of cls(response) - :rtype: ~paging.models.ProductResult + :return: An instance of AsyncLROPoller that returns either ProductResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~paging.models.ProductResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] diff --git a/test/azure/Expected/AcceptanceTests/Paging/paging/operations/_paging_operations.py b/test/azure/Expected/AcceptanceTests/Paging/paging/operations/_paging_operations.py index 86638a4ff27..dd9e42f1111 100644 --- a/test/azure/Expected/AcceptanceTests/Paging/paging/operations/_paging_operations.py +++ b/test/azure/Expected/AcceptanceTests/Paging/paging/operations/_paging_operations.py @@ -1045,7 +1045,7 @@ def begin_get_multiple_pages_lro( paging_get_multiple_pages_lro_options=None, # type: Optional["models.PagingGetMultiplePagesLroOptions"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.ProductResult"] """A long-running paging operation that includes a nextLink that has 10 pages. :param client_request_id: diff --git a/test/azure/Expected/AcceptanceTests/StorageManagementClient/storage/aio/operations_async/_storage_accounts_operations_async.py b/test/azure/Expected/AcceptanceTests/StorageManagementClient/storage/aio/operations_async/_storage_accounts_operations_async.py index 96f2c036621..5fa3b106a73 100644 --- a/test/azure/Expected/AcceptanceTests/StorageManagementClient/storage/aio/operations_async/_storage_accounts_operations_async.py +++ b/test/azure/Expected/AcceptanceTests/StorageManagementClient/storage/aio/operations_async/_storage_accounts_operations_async.py @@ -166,7 +166,7 @@ async def begin_create( account_name: str, parameters: "models.StorageAccountCreateParameters", **kwargs - ) -> "models.StorageAccount": + ) -> AsyncLROPoller["models.StorageAccount"]: """Asynchronously creates a new storage account with the specified parameters. Existing accounts cannot be updated with this API and should instead use the Update Storage Account API. If an account is already created and subsequent PUT request is issued with exact same set of @@ -186,8 +186,8 @@ async def begin_create( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: StorageAccount, or the result of cls(response) - :rtype: ~storage.models.StorageAccount + :return: An instance of AsyncLROPoller that returns either StorageAccount or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~storage.models.StorageAccount] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] diff --git a/test/azure/Expected/AcceptanceTests/StorageManagementClient/storage/operations/_storage_accounts_operations.py b/test/azure/Expected/AcceptanceTests/StorageManagementClient/storage/operations/_storage_accounts_operations.py index 1b90aa5b9ef..a858f306771 100644 --- a/test/azure/Expected/AcceptanceTests/StorageManagementClient/storage/operations/_storage_accounts_operations.py +++ b/test/azure/Expected/AcceptanceTests/StorageManagementClient/storage/operations/_storage_accounts_operations.py @@ -172,7 +172,7 @@ def begin_create( parameters, # type: "models.StorageAccountCreateParameters" **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.StorageAccount"] """Asynchronously creates a new storage account with the specified parameters. Existing accounts cannot be updated with this API and should instead use the Update Storage Account API. If an account is already created and subsequent PUT request is issued with exact same set of diff --git a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/operations_async/_multiapi_service_client_operations_async.py b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/operations_async/_multiapi_service_client_operations_async.py index 8f44bc04f80..cf974a74994 100644 --- a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/operations_async/_multiapi_service_client_operations_async.py +++ b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/operations_async/_multiapi_service_client_operations_async.py @@ -123,7 +123,7 @@ async def begin_test_lro( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Put in whatever shape of Product you want, will return a Product with id equal to 100. :param product: Product to put. @@ -134,8 +134,8 @@ async def begin_test_lro( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~multiapi.v1.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~multiapi.v1.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] diff --git a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/operations/_multiapi_service_client_operations.py b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/operations/_multiapi_service_client_operations.py index 4485e7eadb0..d2b493f502b 100644 --- a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/operations/_multiapi_service_client_operations.py +++ b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/operations/_multiapi_service_client_operations.py @@ -130,7 +130,7 @@ def begin_test_lro( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Put in whatever shape of Product you want, will return a Product with id equal to 100. :param product: Product to put. diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/operations/_multiapi_service_client_operations.py b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/operations/_multiapi_service_client_operations.py index a78c42fb10d..b14ec738268 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/operations/_multiapi_service_client_operations.py +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/operations/_multiapi_service_client_operations.py @@ -130,7 +130,7 @@ def begin_test_lro( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Put in whatever shape of Product you want, will return a Product with id equal to 100. :param product: Product to put. diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/operations_async/_multiapi_service_client_operations_async.py b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/operations_async/_multiapi_service_client_operations_async.py index b729f2581f9..a0e22fc7e70 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/operations_async/_multiapi_service_client_operations_async.py +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/operations_async/_multiapi_service_client_operations_async.py @@ -123,7 +123,7 @@ async def begin_test_lro( self, product: Optional["models.Product"] = None, **kwargs - ) -> "models.Product": + ) -> AsyncLROPoller["models.Product"]: """Put in whatever shape of Product you want, will return a Product with id equal to 100. :param product: Product to put. @@ -134,8 +134,8 @@ async def begin_test_lro( polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: Product, or the result of cls(response) - :rtype: ~multiapiwithsubmodule.submodule.v1.models.Product + :return: An instance of AsyncLROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~multiapiwithsubmodule.submodule.v1.models.Product] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/operations/_multiapi_service_client_operations.py b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/operations/_multiapi_service_client_operations.py index b6573ec26f5..b474c944d01 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/operations/_multiapi_service_client_operations.py +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/operations/_multiapi_service_client_operations.py @@ -130,7 +130,7 @@ def begin_test_lro( product=None, # type: Optional["models.Product"] **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.Product"] """Put in whatever shape of Product you want, will return a Product with id equal to 100. :param product: Product to put.