diff --git a/ChangeLog.md b/ChangeLog.md index 2dfc663f2c8..b84dc6b001b 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,12 @@ # Change Log +### Unreleased +Modelerfour version: 4.13.351 + +**Bug Fixes** +- Generating correct formatting for LRO and paging operation docstrings #652 +- Generating correct content and formatting for LRO and paging operations in multiapi mixin #652 + ### 2020-06-03 - 5.1.0-preview.1 Modelerfour version: 4.13.351 diff --git a/autorest/codegen/templates/lro_operation.py.jinja2 b/autorest/codegen/templates/lro_operation.py.jinja2 index 7a5c98b6849..02bc8a4a50f 100644 --- a/autorest/codegen/templates/lro_operation.py.jinja2 +++ b/autorest/codegen/templates/lro_operation.py.jinja2 @@ -4,7 +4,7 @@ {% set async_prefix = "Async" if async_mode else "" %} {% set poller = "AsyncLROPoller" if async_mode else "LROPoller" %} {% set operation_name = "begin_"+operation.python_name %} -{% macro return_docstring() %} +{% macro return_docstring(async_mode) %} :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 %} @@ -15,6 +15,33 @@ response_headers = { {% endfor %} } {% endmacro %} +{% macro operation_docstring(async_mode) %} +"""{{ operation.summary if operation.summary else operation.description | wordwrap(width=95, break_long_words=False, wrapstring='\n') }} +{% if operation.summary and operation.description %} + +{{ operation.description | wordwrap(width=95, break_long_words=False, wrapstring='\n') }} +{% endif %} + +{% if operation.deprecated -%} +.. warning:: + This method is deprecated + +{% endif -%} +{% for parameter in operation.parameters.method %} +{%- for doc_string in param_documentation_string(parameter).replace('\n', '\n ').split('\n') %} +{{ doc_string | wordwrap(width=95, break_long_words=False, wrapstring='\n ')}} +{% endfor %} +:type {{ parameter.serialized_name }}: {{ parameter.schema.docstring_type }} +{% endfor %} +:keyword callable cls: A custom type or function that will be passed the direct response +:keyword str continuation_token: A continuation token to restart a poller from a saved state. +:keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy +:paramtype polling: bool or ~azure.core.polling.{{ "Async" if async_mode else "" }}PollingMethod +:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. +{{ return_docstring(async_mode) }} +:raises ~azure.core.exceptions.HttpResponseError: +"""{% endmacro %} {% set lro_options = (", lro_options={'final-state-via': '"+ operation.lro_options['final-state-via'] + "'}") if operation.lro_options else "" %} {# actual template starts here #} {% if code_model.options['tracing'] %} @@ -25,32 +52,7 @@ response_headers = { {%- if not async_mode %} {{ 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 %} - - {{ operation.description | wordwrap(width=95, break_long_words=False, wrapstring='\n') }} - {% endif %} - -{% if operation.deprecated -%} - .. warning:: - This method is deprecated - -{% endif -%} -{% for parameter in operation.parameters.method %} - {%- for doc_string in param_documentation_string(parameter).replace('\n', '\n ').split('\n') %} - {{ doc_string | wordwrap(width=95, break_long_words=False, wrapstring='\n ')}} - {% endfor %} - :type {{ parameter.serialized_name }}: {{ parameter.schema.docstring_type }} -{% endfor %} - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.{{ "Async" if async_mode else "" }}PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - {{ return_docstring()|indent }} - :raises ~azure.core.exceptions.HttpResponseError: - """ + {{ operation_docstring(async_mode) | indent }} polling = kwargs.pop('polling', {{ "True" if code_model.options['azure_arm'] else "False" }}) # type: Union[bool, {{ "Async" if async_mode else "" }}PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[{{ op_tools.return_type_annotation(operation) }}] lro_delay = kwargs.pop( diff --git a/autorest/codegen/templates/metadata.json.jinja2 b/autorest/codegen/templates/metadata.json.jinja2 index 11f8da77585..b1b9fc49e99 100644 --- a/autorest/codegen/templates/metadata.json.jinja2 +++ b/autorest/codegen/templates/metadata.json.jinja2 @@ -54,15 +54,30 @@ {{ operation_name | tojson }} : { "sync": { {% set sync_return_type_wrapper = "LROPoller" if is_lro(operation) else ("ItemPaged" if is_paging(operation) else "") %} - "signature": {{ op_tools.method_signature(operation, operation_name, False, False, sync_return_type_wrapper) | tojson }} + "signature": {{ op_tools.method_signature(operation, operation_name, False, False, sync_return_type_wrapper) | tojson }}, + {% if is_lro(operation) %} + {% from "lro_operation.py.jinja2" import operation_docstring with context %} + {% elif is_paging(operation) %} + {% from "paging_operation.py.jinja2" import operation_docstring with context %} + {% else %} + {% from "operation.py.jinja2" import operation_docstring with context %} + {% endif %} + "doc": {{ operation_docstring(async_mode=False) | tojson }} }, "async": { {% set coroutine = False if is_paging(operation) else True %} {% set async_return_type_wrapper = "AsyncLROPoller" if is_lro(operation) else ("AsyncItemPaged" if is_paging(operation) else "") %} "signature": {{ op_tools.method_signature(operation, operation_name, True, coroutine, async_return_type_wrapper) | tojson }}, - "coroutine": {{ coroutine | tojson }} + "coroutine": {{ coroutine | tojson }}, + {% if is_lro(operation) %} + {% from "lro_operation.py.jinja2" import operation_docstring with context %} + {% elif is_paging(operation) %} + {% from "paging_operation.py.jinja2" import operation_docstring with context %} + {% else %} + {% from "operation.py.jinja2" import operation_docstring with context %} + {% endif %} + "doc": {{ operation_docstring(async_mode=True) | tojson }} }, - "doc": {{ op_tools.operation_docstring(operation) | tojson }}, "call": {{ operation.parameters.method | map(attribute="serialized_name") | join(', ') | tojson }} }{{ "," if not loop.last else "" }} {% endfor %} diff --git a/autorest/codegen/templates/operation.py.jinja2 b/autorest/codegen/templates/operation.py.jinja2 index e120fd0aa44..4ca4400ff16 100644 --- a/autorest/codegen/templates/operation.py.jinja2 +++ b/autorest/codegen/templates/operation.py.jinja2 @@ -2,6 +2,52 @@ {% import 'operation_tools.jinja2' as op_tools %} {% set trace_decorator = "@distributed_trace_async" if async_mode else "@distributed_trace" %} {% set stream_request_parameter = "stream=" ~ ("True" if operation.is_stream_response else "False") %} +{% macro return_docstring(async_mode) %} +{% if operation.responses | selectattr('has_body') | first %} +:return: {{ operation.responses|selectattr('has_body')|map(attribute='schema')| map(attribute='docstring_text')|unique|join(' or ') }}, or the result of cls(response) +:rtype: {{ operation.responses|selectattr('has_body')|map(attribute='schema')| map(attribute='docstring_type')|unique|join(' or ') }}{{ " or None" if operation.responses|selectattr('has_body', 'false') | first }} +{%- else %} +:return: None, or the result of cls(response) +:rtype: None +{%- endif -%} +{% endmacro %} +{% macro param_documentation_string(parameter) %}:param {{ parameter.serialized_name }}: {{ parameter.description }}{% endmacro %} +{% macro return_docstring(async_mode) %} +{% if operation.responses | selectattr('has_body') | first %} +:return: {{ operation.responses|selectattr('has_body')|map(attribute='schema')| map(attribute='docstring_text')|unique|join(' or ') }}, or the result of cls(response) +:rtype: {{ operation.responses|selectattr('has_body')|map(attribute='schema')| map(attribute='docstring_type')|unique|join(' or ') }}{{ " or None" if operation.has_optional_return_type }} +{%- else %} +:return: None, or the result of cls(response) +:rtype: None +{%- endif -%} +{% endmacro %} +{% macro operation_docstring(async_mode) %} +"""{{ operation.summary if operation.summary else operation.description | wordwrap(width=95, break_long_words=False, wrapstring='\n') }} +{% if operation.summary and operation.description %} + +{{ operation.description | wordwrap(width=95, break_long_words=False, wrapstring='\n') }} +{% endif %} + +{% if operation.deprecated -%} +.. warning:: + This method is deprecated + +{% endif -%} +{% for parameter in operation.parameters.method %} +{%- for doc_string in param_documentation_string(parameter).replace('\n', '\n ').split('\n') %} +{{ doc_string | wordwrap(width=95, break_long_words=False, wrapstring='\n ')}} +{% endfor %} +:type {{ parameter.serialized_name }}: {{ parameter.docstring_type }} +{% endfor %} +{% if (operation.requests | length) > 1 %} +{% set content_type_constant = operation.parameters.constant|selectattr("implementation", "equalto", "Method")|selectattr("original_parameter", "equalto", None)|selectattr("in_method_code") | selectattr("serialized_name", "equalto", "content_type") | first %} +:keyword str content_type: Media type of the body sent to the API. Default value is {{ content_type_constant.schema.constant_value }}. + Allowed values are: "{{ operation.requests | map(attribute="media_types") | sum(start = []) | unique | list | join ('", "') }}". +{% endif %} +:keyword callable cls: A custom type or function that will be passed the direct response +{{ return_docstring(async_mode) }} +:raises: ~azure.core.exceptions.HttpResponseError +"""{% endmacro %} {# actual template starts here #} {%- if code_model.options['tracing'] and operation.want_tracing -%} {{ trace_decorator }} @@ -11,7 +57,7 @@ {{ op_tools.sync_return_type_annotation(operation, "") }} {% endif %} {% if operation.want_description_docstring %} -{{ op_tools.operation_docstring(operation)|indent }} + {{ operation_docstring(async_mode)|indent }} {% endif %} cls = kwargs.pop('cls', None) # type: {{ op_tools.return_type_annotation(operation, "ClsType") }} {% if operation.deprecated %} diff --git a/autorest/codegen/templates/operation_tools.jinja2 b/autorest/codegen/templates/operation_tools.jinja2 index 3b771919a55..d50be53cb45 100644 --- a/autorest/codegen/templates/operation_tools.jinja2 +++ b/autorest/codegen/templates/operation_tools.jinja2 @@ -1,41 +1,3 @@ -{% macro param_documentation_string(parameter) %}:param {{ parameter.serialized_name }}: {{ parameter.description }}{% endmacro %} -{% macro return_docstring(operation) %} -{% if operation.responses | selectattr('has_body') | first %} -:return: {{ operation.responses|selectattr('has_body')|map(attribute='schema')| map(attribute='docstring_text')|unique|join(' or ') }}, or the result of cls(response) -:rtype: {{ operation.responses|selectattr('has_body')|map(attribute='schema')| map(attribute='docstring_type')|unique|join(' or ') }}{{ " or None" if operation.has_optional_return_type }} -{%- else %} -:return: None, or the result of cls(response) -:rtype: None -{%- endif -%} -{% endmacro %} -{# operation docstring. Used only for metadata and operation templates #} -{% macro operation_docstring(operation) %} - """{{ operation.summary if operation.summary else operation.description | wordwrap(width=95, break_long_words=False, wrapstring='\n') }} -{% if operation.summary and operation.description %} - -{{ operation.description | wordwrap(width=95, break_long_words=False, wrapstring='\n') }} -{% endif %} - -{% if operation.deprecated -%} -.. warning:: - This method is deprecated - -{% endif -%} -{% for parameter in operation.parameters.method %} -{%- for doc_string in param_documentation_string(parameter).replace('\n', '\n ').split('\n') %} -{{ doc_string | wordwrap(width=95, break_long_words=False, wrapstring='\n ')}} -{% endfor %} -:type {{ parameter.serialized_name }}: {{ parameter.docstring_type }} -{% endfor %} -{% if (operation.requests | length) > 1 %} -{% set content_type_constant = operation.parameters.constant|selectattr("implementation", "equalto", "Method")|selectattr("original_parameter", "equalto", None)|selectattr("in_method_code") | selectattr("serialized_name", "equalto", "content_type") | first %} -:keyword str content_type: Media type of the body sent to the API. Default value is {{ content_type_constant.schema.constant_value }}. - Allowed values are: "{{ operation.requests | map(attribute="media_types") | sum(start = []) | unique | list | join ('", "') }}". -{% endif %} -:keyword callable cls: A custom type or function that will be passed the direct response -{{ return_docstring(operation) }} -:raises: ~azure.core.exceptions.HttpResponseError -"""{% endmacro %} {% macro return_type_annotation(operation, return_type_wrapper) %} {{ ((return_type_wrapper + "[") if return_type_wrapper else "") ~ ("Optional[" if operation.has_optional_return_type else "" ) ~ ("Union[" if operation.responses | selectattr('has_body') | map(attribute='schema') | map(attribute='operation_type_annotation') | unique | list | length > 1 else "") ~ (operation.responses | selectattr('has_body') | map(attribute='schema') | map(attribute='operation_type_annotation') | unique | join(', ')) ~ diff --git a/autorest/codegen/templates/paging_operation.py.jinja2 b/autorest/codegen/templates/paging_operation.py.jinja2 index 91e71f05772..1262310e43b 100644 --- a/autorest/codegen/templates/paging_operation.py.jinja2 +++ b/autorest/codegen/templates/paging_operation.py.jinja2 @@ -4,13 +4,36 @@ {% set request_as_xml = ", is_xml=True" if send_xml else "" %} {% set stream_request_parameter = "stream=" ~ ("True" if operation.is_stream_response else "False") %} {% set item_paged = "AsyncItemPaged" if async_mode else "ItemPaged" %} -{% macro return_docstring() %} +{% macro return_docstring(async_mode) %} {% if operation.responses | selectattr('has_body') | first %} :return: An iterator like instance of either {{ operation.responses|selectattr('has_body')|map(attribute='schema')|map(attribute='docstring_text')|unique|join(' or ') }} or the result of cls(response) -:rtype: ~azure.core.{{ "async_" if async_mode else "" }}paging.{{ item_paged }}[{% for response in operation.responses %}{{response.schema.docstring_type if response.has_body else "None"}}{% if not loop.last -%} or {% endif %}{% endfor %}] -{% else %} +{# can't use item_paged variable, otherwise the call to get docstring from the metadata template will always return ItemPaged #} +:rtype: ~azure.core.{{ "async_" if async_mode else "" }}paging.{{ "Async" if async_mode }}ItemPaged[{% for response in operation.responses %}{{response.schema.docstring_type if response.has_body else "None"}}{% if not loop.last -%} or {% endif %}{% endfor %}] +{%- else -%} :return: None -:rtype: None{% endif %}{% endmacro %} +:rtype: None{%- endif -%}{%- endmacro -%} +{% macro operation_docstring(async_mode) %} +"""{{ operation.summary if operation.summary else operation.description | wordwrap(width=95, break_long_words=False, wrapstring='\n') }} +{% if operation.summary and operation.description %} + +{{ operation.description | wordwrap(width=95, break_long_words=False, wrapstring='\n') }} +{% endif %} + +{% if operation.deprecated -%} +.. warning:: + This method is deprecated + +{% endif -%} +{% for parameter in operation.parameters.method %} +{%- for doc_string in param_documentation_string(parameter).replace('\n', '\n ').split('\n') %} +{{ doc_string | wordwrap(width=95, break_long_words=False, wrapstring='\n ')}} +{% endfor %} +:type {{ parameter.serialized_name }}: {{ parameter.schema.docstring_type }} +{% endfor %} +:keyword callable cls: A custom type or function that will be passed the direct response +{{ return_docstring(async_mode) }} +:raises: ~azure.core.exceptions.HttpResponseError +"""{% endmacro %} {% macro param_documentation_string(parameter) %}:param {{ parameter.serialized_name }}: {{ parameter.description }}{% endmacro %} {% set next_link_str = "deserialized." + operation.next_link_name + " or None" if operation.next_link_name else "None" %} {# actual template starts here #} @@ -23,26 +46,7 @@ {{ op_tools.sync_return_type_annotation(operation, return_type_wrapper) }} {% endif %} {% if operation.want_description_docstring %} - """{{ operation.summary if operation.summary else operation.description | wordwrap(width=95, break_long_words=False, wrapstring='\n') }} - {% if operation.summary and operation.description %} - - {{ operation.description | wordwrap(width=95, break_long_words=False, wrapstring='\n') }} - {% endif %} - -{% if operation.deprecated -%} - .. warning:: - This method is deprecated - -{% endif -%} -{% for parameter in operation.parameters.method %} - {%- for doc_string in param_documentation_string(parameter).replace('\n', '\n ').split('\n') %} - {{ doc_string | wordwrap(width=95, break_long_words=False, wrapstring='\n ')}} - {% endfor %} - :type {{ parameter.serialized_name }}: {{ parameter.schema.docstring_type }} -{% endfor %} - :keyword callable cls: A custom type or function that will be passed the direct response - {{ return_docstring()|indent }} :raises: ~azure.core.exceptions.HttpResponseError - """ + {{ operation_docstring(async_mode) | indent }} {% endif %} {% if operation.deprecated %} warnings.warn('Method {{operation.name}} is deprecated', DeprecationWarning) diff --git a/autorest/multiapi/__init__.py b/autorest/multiapi/__init__.py index 4eb279f1a79..faff67350ea 100644 --- a/autorest/multiapi/__init__.py +++ b/autorest/multiapi/__init__.py @@ -182,13 +182,13 @@ def _build_operation_mixin_meta(self, paths_to_versions: List[Path]) -> Dict[str mixin_operations.setdefault(func_name, {}).setdefault('async', {}) mixin_operations[func_name]['sync'].update({ "signature": func['sync']['signature'], - "doc": func['doc'], + "doc": func['sync']['doc'], "call": func['call'] }) mixin_operations[func_name]['async'].update({ "signature": func['async']['signature'], "coroutine": func['async']['coroutine'], - "doc": func['doc'], + "doc": func['async']['doc'], "call": func['call'] }) mixin_operations[func_name]['sync'].setdefault( diff --git a/autorest/multiapi/templates/multiapi_operations_mixin.py.jinja2 b/autorest/multiapi/templates/multiapi_operations_mixin.py.jinja2 index 2c7e500697c..5b0f992694a 100644 --- a/autorest/multiapi/templates/multiapi_operations_mixin.py.jinja2 +++ b/autorest/multiapi/templates/multiapi_operations_mixin.py.jinja2 @@ -19,7 +19,7 @@ class {{ client_name }}OperationsMixin(object): {% for operation_name, metadata_sync_and_async in mixin_operations|dictsort %} {% set metadata = metadata_sync_and_async['async'] if async_mode else metadata_sync_and_async['sync'] %} - {{ metadata['signature'] | indent }} {{ metadata['doc'] | indent(8) }} + {{ metadata['signature'] | indent }} {{ metadata['doc'] | indent(8) }} api_version = self._get_api_version('{{ operation_name }}') {% for api in metadata['available_apis']|sort %} {% set if_statement = "if" if loop.first else "elif" %} diff --git a/test/azure/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/aio/operations_async/_paging_operations_async.py b/test/azure/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/aio/operations_async/_paging_operations_async.py index 1b196cf5f3a..3125ae2a0b1 100644 --- a/test/azure/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/aio/operations_async/_paging_operations_async.py +++ b/test/azure/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/aio/operations_async/_paging_operations_async.py @@ -50,7 +50,7 @@ def get_pages_partial_url( **kwargs ) -> AsyncIterable["models.ProductResult"]: """A paging operation that combines custom url, paging and partial URL and expect to concat after - host. + host. :param account_name: Account Name. :type account_name: str diff --git a/test/azure/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/operations/_paging_operations.py b/test/azure/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/operations/_paging_operations.py index c2cd8617c5e..b4c360e3008 100644 --- a/test/azure/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/operations/_paging_operations.py +++ b/test/azure/Expected/AcceptanceTests/CustomUrlPaging/custombaseurlpaging/operations/_paging_operations.py @@ -54,7 +54,7 @@ def get_pages_partial_url( ): # type: (...) -> Iterable["models.ProductResult"] """A paging operation that combines custom url, paging and partial URL and expect to concat after - host. + host. :param account_name: Account Name. :type account_name: str 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 7457f976e02..074df4bb7f7 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 @@ -98,9 +98,9 @@ async def begin_put_async_retry_succeeded( **kwargs ) -> 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- - AsyncOperation header for operation status. + 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- + AsyncOperation header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -212,9 +212,9 @@ async def begin_put201_creating_succeeded200( **kwargs ) -> 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 - returns a ‘200’ with ProvisioningState=’Succeeded’. + 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 + returns a ‘200’ with ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -317,8 +317,8 @@ async def begin_post202_retry200( **kwargs ) -> 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. + 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. :param product: Product to put. :type product: ~lro.models.Product @@ -419,9 +419,9 @@ async def begin_post_async_retry_succeeded( **kwargs ) -> 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- - AsyncOperation header for operation status. + 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- + AsyncOperation header for operation status. :param product: Product to put. :type product: ~lro.models.Product 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 6f70aa15ccf..58a51f3f5a2 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,8 +98,8 @@ async def begin_put201_creating_succeeded200( **kwargs ) -> 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’. + entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll + returns a ‘200’ with ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -206,8 +206,8 @@ async def begin_put_async_relative_retry_succeeded( **kwargs ) -> 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. + entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure- + AsyncOperation header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -311,8 +311,8 @@ async def begin_delete_provisioning202_accepted200_succeeded( **kwargs ) -> 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’. + entity that contains ProvisioningState=’Accepted’. Polls return this value until the last poll + returns a ‘200’ with ProvisioningState=’Succeeded’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -405,7 +405,7 @@ async def begin_delete202_retry200( **kwargs ) -> 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’. + return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -492,7 +492,7 @@ async def begin_delete_async_relative_retry_succeeded( **kwargs ) -> 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. + endpoint indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -589,7 +589,7 @@ async def begin_post202_retry200( **kwargs ) -> 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. + 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success. :param product: Product to put. :type product: ~lro.models.Product @@ -690,8 +690,8 @@ async def begin_post_async_relative_retry_succeeded( **kwargs ) -> 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. + entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure- + AsyncOperation header for operation status. :param product: Product to put. :type product: ~lro.models.Product 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 5581a955a25..49754ee9048 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 @@ -96,7 +96,7 @@ async def begin_put200_succeeded( **kwargs ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that - contains ProvisioningState=’Succeeded’. + contains ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -199,7 +199,7 @@ async def begin_put201_succeeded( **kwargs ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 201 to the initial request, with an entity that - contains ProvisioningState=’Succeeded’. + contains ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -298,7 +298,7 @@ async def begin_post202_list( **kwargs ) -> 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' }]. + with body [{ 'id': '100', 'name': 'foo' }]. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -398,7 +398,7 @@ async def begin_put200_succeeded_no_state( **kwargs ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that - does not contain ProvisioningState=’Succeeded’. + does not contain ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -501,8 +501,8 @@ async def begin_put202_retry200( **kwargs ) -> 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. + that points to a polling URL that returns a 200 and an entity that doesn't contains + ProvisioningState. :param product: Product to put. :type product: ~lro.models.Product @@ -609,8 +609,8 @@ async def begin_put201_creating_succeeded200( **kwargs ) -> 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’. + contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -713,8 +713,8 @@ async def begin_put200_updating_succeeded204( **kwargs ) -> 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’. + contains ProvisioningState=’Updating’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -821,8 +821,8 @@ async def begin_put201_creating_failed200( **kwargs ) -> 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’. + contains ProvisioningState=’Created’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Failed’. :param product: Product to put. :type product: ~lro.models.Product @@ -925,8 +925,8 @@ async def begin_put200_acceptedcanceled200( **kwargs ) -> 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’. + contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Canceled’. :param product: Product to put. :type product: ~lro.models.Product @@ -1031,7 +1031,7 @@ async def begin_put_no_header_in_retry( **kwargs ) -> 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. + Subsequent calls to operation status do not contain location header. :param product: Product to put. :type product: ~lro.models.Product @@ -1141,8 +1141,8 @@ async def begin_put_async_retry_succeeded( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1253,8 +1253,8 @@ async def begin_put_async_no_retry_succeeded( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1365,8 +1365,8 @@ async def begin_put_async_retry_failed( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1477,8 +1477,8 @@ async def begin_put_async_no_retrycanceled( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1587,8 +1587,8 @@ async def begin_put_async_no_header_in_retry( **kwargs ) -> 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. + AsyncOperation header. Subsequent calls to operation status do not contain Azure-AsyncOperation + header. :param product: Product to put. :type product: ~lro.models.Product @@ -2102,8 +2102,8 @@ async def begin_delete_provisioning202_accepted200_succeeded( **kwargs ) -> 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’. + contains ProvisioningState=’Accepted’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Succeeded’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2203,8 +2203,8 @@ async def begin_delete_provisioning202_deleting_failed200( **kwargs ) -> 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’. + contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Failed’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2304,8 +2304,8 @@ async def begin_delete_provisioning202_deletingcanceled200( **kwargs ) -> 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’. + contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Canceled’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2486,7 +2486,7 @@ async def begin_delete202_retry200( **kwargs ) -> 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’. + value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2582,7 +2582,7 @@ async def begin_delete202_no_retry204( **kwargs ) -> 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’. + value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2671,7 +2671,7 @@ async def begin_delete_no_header_in_retry( **kwargs ) -> 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. + Subsequent calls to operation status do not contain location header. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2757,7 +2757,7 @@ async def begin_delete_async_no_header_in_retry( **kwargs ) -> 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. + request. Subsequent calls to operation status do not contain Azure-AsyncOperation header. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2844,7 +2844,7 @@ async def begin_delete_async_retry_succeeded( **kwargs ) -> 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2931,7 +2931,7 @@ async def begin_delete_async_no_retry_succeeded( **kwargs ) -> 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3018,7 +3018,7 @@ async def begin_delete_async_retry_failed( **kwargs ) -> 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3105,7 +3105,7 @@ async def begin_delete_async_retrycanceled( **kwargs ) -> 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3195,7 +3195,7 @@ async def begin_post200_with_payload( **kwargs ) -> 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. + header. Poll returns a 200 with a response body after success. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3295,7 +3295,7 @@ async def begin_post202_retry200( **kwargs ) -> 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. + 'Retry-After' headers, Polls return a 200 with a response body after success. :param product: Product to put. :type product: ~lro.models.Product @@ -3398,7 +3398,7 @@ async def begin_post202_no_retry204( **kwargs ) -> AsyncLROPoller["models.Product"]: """Long running post request, service returns a 202 to the initial request, with 'Location' - header, 204 with noresponse body after success. + header, 204 with noresponse body after success. :param product: Product to put. :type product: ~lro.models.Product @@ -3494,8 +3494,8 @@ async def begin_post_double_headers_final_location_get( **kwargs ) -> 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. + Azure-Async header. Poll Azure-Async and it's success. Should poll Location to get the final + object. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3584,8 +3584,8 @@ async def begin_post_double_headers_final_azure_header_get( **kwargs ) -> 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. + Azure-Async header. Poll Azure-Async and it's success. Should NOT poll Location to get the + final object. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3674,8 +3674,8 @@ async def begin_post_double_headers_final_azure_header_get_default( **kwargs ) -> 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. + 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. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3783,8 +3783,8 @@ async def begin_post_async_retry_succeeded( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -3895,8 +3895,8 @@ async def begin_post_async_no_retry_succeeded( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -4000,8 +4000,8 @@ async def begin_post_async_retry_failed( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -4102,8 +4102,8 @@ async def begin_post_async_retrycanceled( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product 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 9000cd0dcbc..6bb73607b87 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 @@ -204,7 +204,7 @@ async def begin_put_non_retry201_creating400( **kwargs ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a Product with 'ProvisioningState' = 'Creating' and - 201 response code. + 201 response code. :param product: Product to put. :type product: ~lro.models.Product @@ -311,7 +311,7 @@ async def begin_put_non_retry201_creating400_invalid_json( **kwargs ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a Product with 'ProvisioningState' = 'Creating' and - 201 response code. + 201 response code. :param product: Product to put. :type product: ~lro.models.Product @@ -418,7 +418,7 @@ async def begin_put_async_relative_retry400( **kwargs ) -> 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. + endpoint indicated in the Azure-AsyncOperation header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -686,7 +686,7 @@ async def begin_delete_async_relative_retry400( **kwargs ) -> 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -982,7 +982,7 @@ async def begin_post_async_relative_retry400( **kwargs ) -> 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. + indicated in the Azure-AsyncOperation header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1192,8 +1192,8 @@ async def begin_put_async_relative_retry_no_status( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1305,8 +1305,8 @@ async def begin_put_async_relative_retry_no_status_payload( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1485,7 +1485,7 @@ async def begin_delete_async_relative_retry_no_status( **kwargs ) -> 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1582,7 +1582,7 @@ async def begin_post202_no_location( **kwargs ) -> AsyncLROPoller[None]: """Long running post request, service returns a 202 to the initial request, without a location - header. + header. :param product: Product to put. :type product: ~lro.models.Product @@ -1683,8 +1683,8 @@ async def begin_post_async_relative_retry_no_payload( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1786,7 +1786,7 @@ async def begin_put200_invalid_json( **kwargs ) -> AsyncLROPoller["models.Product"]: """Long running put request, service returns a 200 to the initial request, with an entity that is - not a valid json. + not a valid json. :param product: Product to put. :type product: ~lro.models.Product @@ -1893,8 +1893,8 @@ async def begin_put_async_relative_retry_invalid_header( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. The endpoint indicated in the Azure-AsyncOperation + header is invalid. :param product: Product to put. :type product: ~lro.models.Product @@ -2006,8 +2006,8 @@ async def begin_put_async_relative_retry_invalid_json_polling( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -2104,7 +2104,7 @@ async def begin_delete202_retry_invalid_header( **kwargs ) -> 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. + with an invalid 'Location' and 'Retry-After' headers. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2191,7 +2191,7 @@ async def begin_delete_async_relative_retry_invalid_header( **kwargs ) -> AsyncLROPoller[None]: """Long running delete request, service returns a 202 to the initial request. The endpoint - indicated in the Azure-AsyncOperation header is invalid. + indicated in the Azure-AsyncOperation header is invalid. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2278,7 +2278,7 @@ async def begin_delete_async_relative_retry_invalid_json_polling( **kwargs ) -> 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2375,7 +2375,7 @@ async def begin_post202_retry_invalid_header( **kwargs ) -> AsyncLROPoller[None]: """Long running post request, service returns a 202 to the initial request, with invalid - 'Location' and 'Retry-After' headers. + 'Location' and 'Retry-After' headers. :param product: Product to put. :type product: ~lro.models.Product @@ -2476,8 +2476,8 @@ async def begin_post_async_relative_retry_invalid_header( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. The endpoint indicated in the Azure-AsyncOperation + header is invalid. :param product: Product to put. :type product: ~lro.models.Product @@ -2578,8 +2578,8 @@ async def begin_post_async_relative_retry_invalid_json_polling( **kwargs ) -> 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product 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 2ecf075215d..126ef3a9f19 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 @@ -104,9 +104,9 @@ def begin_put_async_retry_succeeded( ): # 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- - AsyncOperation header for operation status. + 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- + AsyncOperation header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -220,9 +220,9 @@ def begin_put201_creating_succeeded200( ): # 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 - returns a ‘200’ with ProvisioningState=’Succeeded’. + 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 + returns a ‘200’ with ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -327,8 +327,8 @@ def begin_post202_retry200( ): # 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. + 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. :param product: Product to put. :type product: ~lro.models.Product @@ -431,9 +431,9 @@ def begin_post_async_retry_succeeded( ): # 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- - AsyncOperation header for operation status. + 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- + AsyncOperation header for operation status. :param product: Product to put. :type product: ~lro.models.Product 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 cc6fbdcfcbb..e5e923c27bd 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,8 +104,8 @@ def begin_put201_creating_succeeded200( ): # 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’. + entity that contains ProvisioningState=’Creating’. Polls return this value until the last poll + returns a ‘200’ with ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -214,8 +214,8 @@ def begin_put_async_relative_retry_succeeded( ): # 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. + entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure- + AsyncOperation header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -321,8 +321,8 @@ def begin_delete_provisioning202_accepted200_succeeded( ): # 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’. + entity that contains ProvisioningState=’Accepted’. Polls return this value until the last poll + returns a ‘200’ with ProvisioningState=’Succeeded’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -417,7 +417,7 @@ def begin_delete202_retry200( ): # 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’. + return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -506,7 +506,7 @@ def begin_delete_async_relative_retry_succeeded( ): # 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. + endpoint indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -605,7 +605,7 @@ def begin_post202_retry200( ): # 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. + 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success. :param product: Product to put. :type product: ~lro.models.Product @@ -708,8 +708,8 @@ def begin_post_async_relative_retry_succeeded( ): # 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. + entity that contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure- + AsyncOperation header for operation status. :param product: Product to put. :type product: ~lro.models.Product 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 18ba846ff38..52e63d1580e 100644 --- a/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lros_operations.py +++ b/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lros_operations.py @@ -102,7 +102,7 @@ def begin_put200_succeeded( ): # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 200 to the initial request, with an entity that - contains ProvisioningState=’Succeeded’. + contains ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -207,7 +207,7 @@ def begin_put201_succeeded( ): # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a 201 to the initial request, with an entity that - contains ProvisioningState=’Succeeded’. + contains ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -308,7 +308,7 @@ def begin_post202_list( ): # 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' }]. + with body [{ 'id': '100', 'name': 'foo' }]. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -410,7 +410,7 @@ def begin_put200_succeeded_no_state( ): # 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’. + does not contain ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -515,8 +515,8 @@ def begin_put202_retry200( ): # 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. + that points to a polling URL that returns a 200 and an entity that doesn't contains + ProvisioningState. :param product: Product to put. :type product: ~lro.models.Product @@ -625,8 +625,8 @@ def begin_put201_creating_succeeded200( ): # 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’. + contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -731,8 +731,8 @@ def begin_put200_updating_succeeded204( ): # 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’. + contains ProvisioningState=’Updating’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Succeeded’. :param product: Product to put. :type product: ~lro.models.Product @@ -841,8 +841,8 @@ def begin_put201_creating_failed200( ): # 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’. + contains ProvisioningState=’Created’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Failed’. :param product: Product to put. :type product: ~lro.models.Product @@ -947,8 +947,8 @@ def begin_put200_acceptedcanceled200( ): # 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’. + contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Canceled’. :param product: Product to put. :type product: ~lro.models.Product @@ -1055,7 +1055,7 @@ def begin_put_no_header_in_retry( ): # 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. + Subsequent calls to operation status do not contain location header. :param product: Product to put. :type product: ~lro.models.Product @@ -1167,8 +1167,8 @@ def begin_put_async_retry_succeeded( ): # 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1281,8 +1281,8 @@ def begin_put_async_no_retry_succeeded( ): # 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1395,8 +1395,8 @@ def begin_put_async_retry_failed( ): # 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1509,8 +1509,8 @@ def begin_put_async_no_retrycanceled( ): # 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1621,8 +1621,8 @@ def begin_put_async_no_header_in_retry( ): # 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. + AsyncOperation header. Subsequent calls to operation status do not contain Azure-AsyncOperation + header. :param product: Product to put. :type product: ~lro.models.Product @@ -2146,8 +2146,8 @@ def begin_delete_provisioning202_accepted200_succeeded( ): # 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’. + contains ProvisioningState=’Accepted’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Succeeded’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2249,8 +2249,8 @@ def begin_delete_provisioning202_deleting_failed200( ): # 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’. + contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Failed’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2352,8 +2352,8 @@ def begin_delete_provisioning202_deletingcanceled200( ): # 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’. + contains ProvisioningState=’Creating’. Polls return this value until the last poll returns a + ‘200’ with ProvisioningState=’Canceled’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2538,7 +2538,7 @@ def begin_delete202_retry200( ): # 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’. + value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2636,7 +2636,7 @@ def begin_delete202_no_retry204( ): # 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’. + value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2727,7 +2727,7 @@ def begin_delete_no_header_in_retry( ): # 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. + Subsequent calls to operation status do not contain location header. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2815,7 +2815,7 @@ def begin_delete_async_no_header_in_retry( ): # 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. + request. Subsequent calls to operation status do not contain Azure-AsyncOperation header. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2904,7 +2904,7 @@ def begin_delete_async_retry_succeeded( ): # 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2993,7 +2993,7 @@ def begin_delete_async_no_retry_succeeded( ): # 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3082,7 +3082,7 @@ def begin_delete_async_retry_failed( ): # 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3171,7 +3171,7 @@ def begin_delete_async_retrycanceled( ): # 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3263,7 +3263,7 @@ def begin_post200_with_payload( ): # 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. + header. Poll returns a 200 with a response body after success. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3365,7 +3365,7 @@ def begin_post202_retry200( ): # 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. + 'Retry-After' headers, Polls return a 200 with a response body after success. :param product: Product to put. :type product: ~lro.models.Product @@ -3470,7 +3470,7 @@ def begin_post202_no_retry204( ): # 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. + header, 204 with noresponse body after success. :param product: Product to put. :type product: ~lro.models.Product @@ -3568,8 +3568,8 @@ def begin_post_double_headers_final_location_get( ): # 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. + Azure-Async header. Poll Azure-Async and it's success. Should poll Location to get the final + object. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3660,8 +3660,8 @@ def begin_post_double_headers_final_azure_header_get( ): # 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. + Azure-Async header. Poll Azure-Async and it's success. Should NOT poll Location to get the + final object. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3752,8 +3752,8 @@ def begin_post_double_headers_final_azure_header_get_default( ): # 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. + 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. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -3863,8 +3863,8 @@ def begin_post_async_retry_succeeded( ): # 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -3977,8 +3977,8 @@ def begin_post_async_no_retry_succeeded( ): # 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -4084,8 +4084,8 @@ def begin_post_async_retry_failed( ): # 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -4188,8 +4188,8 @@ def begin_post_async_retrycanceled( ): # 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product 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 1542c12066b..2f61bde54f8 100644 --- a/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lrosads_operations.py +++ b/test/azure/Expected/AcceptanceTests/Lro/lro/operations/_lrosads_operations.py @@ -212,7 +212,7 @@ def begin_put_non_retry201_creating400( ): # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a Product with 'ProvisioningState' = 'Creating' and - 201 response code. + 201 response code. :param product: Product to put. :type product: ~lro.models.Product @@ -321,7 +321,7 @@ def begin_put_non_retry201_creating400_invalid_json( ): # type: (...) -> LROPoller["models.Product"] """Long running put request, service returns a Product with 'ProvisioningState' = 'Creating' and - 201 response code. + 201 response code. :param product: Product to put. :type product: ~lro.models.Product @@ -430,7 +430,7 @@ def begin_put_async_relative_retry400( ): # 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. + endpoint indicated in the Azure-AsyncOperation header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -704,7 +704,7 @@ def begin_delete_async_relative_retry400( ): # 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1006,7 +1006,7 @@ def begin_post_async_relative_retry400( ): # 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. + indicated in the Azure-AsyncOperation header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1220,8 +1220,8 @@ def begin_put_async_relative_retry_no_status( ): # 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1335,8 +1335,8 @@ def begin_put_async_relative_retry_no_status_payload( ): # 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1519,7 +1519,7 @@ def begin_delete_async_relative_retry_no_status( ): # 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -1618,7 +1618,7 @@ def begin_post202_no_location( ): # type: (...) -> LROPoller[None] """Long running post request, service returns a 202 to the initial request, without a location - header. + header. :param product: Product to put. :type product: ~lro.models.Product @@ -1721,8 +1721,8 @@ def begin_post_async_relative_retry_no_payload( ): # 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -1826,7 +1826,7 @@ def begin_put200_invalid_json( ): # 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. + not a valid json. :param product: Product to put. :type product: ~lro.models.Product @@ -1935,8 +1935,8 @@ def begin_put_async_relative_retry_invalid_header( ): # 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. + contains ProvisioningState=’Creating’. The endpoint indicated in the Azure-AsyncOperation + header is invalid. :param product: Product to put. :type product: ~lro.models.Product @@ -2050,8 +2050,8 @@ def begin_put_async_relative_retry_invalid_json_polling( ): # 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product @@ -2150,7 +2150,7 @@ def begin_delete202_retry_invalid_header( ): # 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. + with an invalid 'Location' and 'Retry-After' headers. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2239,7 +2239,7 @@ def begin_delete_async_relative_retry_invalid_header( ): # 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. + indicated in the Azure-AsyncOperation header is invalid. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2328,7 +2328,7 @@ def begin_delete_async_relative_retry_invalid_json_polling( ): # 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. + indicated in the Azure-AsyncOperation header for operation status. :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -2427,7 +2427,7 @@ def begin_post202_retry_invalid_header( ): # type: (...) -> LROPoller[None] """Long running post request, service returns a 202 to the initial request, with invalid - 'Location' and 'Retry-After' headers. + 'Location' and 'Retry-After' headers. :param product: Product to put. :type product: ~lro.models.Product @@ -2530,8 +2530,8 @@ def begin_post_async_relative_retry_invalid_header( ): # 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. + contains ProvisioningState=’Creating’. The endpoint indicated in the Azure-AsyncOperation + header is invalid. :param product: Product to put. :type product: ~lro.models.Product @@ -2634,8 +2634,8 @@ def begin_post_async_relative_retry_invalid_json_polling( ): # 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. + contains ProvisioningState=’Creating’. Poll the endpoint indicated in the Azure-AsyncOperation + header for operation status. :param product: Product to put. :type product: ~lro.models.Product 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 2a8062cbbbe..0d0472bafab 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 @@ -302,10 +302,10 @@ def get_with_query_params( **kwargs ) -> AsyncIterable["models.ProductResult"]: """A paging operation that includes a next operation. It has a different query parameter from it's - next operation nextOperationWithQueryParams. Returns a ProductResult. + next operation nextOperationWithQueryParams. Returns a ProductResult. :param required_query_parameter: A required integer query parameter. Put in value '100' to pass - test. + test. :type required_query_parameter: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ProductResult or the result of cls(response) @@ -528,7 +528,7 @@ def get_multiple_pages_retry_first( **kwargs ) -> AsyncIterable["models.ProductResult"]: """A paging operation that fails on the first call with 500 and then retries and then get a - response including a nextLink that has 10 pages. + response including a nextLink that has 10 pages. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ProductResult or the result of cls(response) @@ -587,7 +587,7 @@ def get_multiple_pages_retry_second( **kwargs ) -> AsyncIterable["models.ProductResult"]: """A paging operation that includes a nextLink that has 10 pages, of which the 2nd call fails - first with 500. The client should retry and finish all 10 pages eventually. + first with 500. The client should retry and finish all 10 pages eventually. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ProductResult or the result of cls(response) @@ -1087,7 +1087,7 @@ def get_paging_model_with_item_name_with_xms_client_name( **kwargs ) -> AsyncIterable["models.ProductResultValueWithXMSClientName"]: """A paging operation that returns a paging model whose item name is is overriden by x-ms-client- - name 'indexes'. + name 'indexes'. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ProductResultValueWithXMSClientName or the result of cls(response) 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 9043a40b4d9..f363600e3fa 100644 --- a/test/azure/Expected/AcceptanceTests/Paging/paging/operations/_paging_operations.py +++ b/test/azure/Expected/AcceptanceTests/Paging/paging/operations/_paging_operations.py @@ -310,10 +310,10 @@ def get_with_query_params( ): # type: (...) -> Iterable["models.ProductResult"] """A paging operation that includes a next operation. It has a different query parameter from it's - next operation nextOperationWithQueryParams. Returns a ProductResult. + next operation nextOperationWithQueryParams. Returns a ProductResult. :param required_query_parameter: A required integer query parameter. Put in value '100' to pass - test. + test. :type required_query_parameter: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ProductResult or the result of cls(response) @@ -539,7 +539,7 @@ def get_multiple_pages_retry_first( ): # type: (...) -> Iterable["models.ProductResult"] """A paging operation that fails on the first call with 500 and then retries and then get a - response including a nextLink that has 10 pages. + response including a nextLink that has 10 pages. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ProductResult or the result of cls(response) @@ -599,7 +599,7 @@ def get_multiple_pages_retry_second( ): # type: (...) -> Iterable["models.ProductResult"] """A paging operation that includes a nextLink that has 10 pages, of which the 2nd call fails - first with 500. The client should retry and finish all 10 pages eventually. + first with 500. The client should retry and finish all 10 pages eventually. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ProductResult or the result of cls(response) @@ -1107,7 +1107,7 @@ def get_paging_model_with_item_name_with_xms_client_name( ): # type: (...) -> Iterable["models.ProductResultValueWithXMSClientName"] """A paging operation that returns a paging model whose item name is is overriden by x-ms-client- - name 'indexes'. + name 'indexes'. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ProductResultValueWithXMSClientName or the result of cls(response) 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 570f17086b5..3b5b2190304 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,15 +166,15 @@ async def begin_create( **kwargs ) -> 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 - properties, then HTTP 200 would be returned. + 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 + properties, then HTTP 200 would be returned. :param resource_group_name: The name of the resource group within the user’s subscription. :type resource_group_name: str :param account_name: The name of the storage account within the specified resource group. - Storage account names must be between 3 and 24 characters in length and use numbers and lower- - case letters only. + Storage account names must be between 3 and 24 characters in length and use numbers and lower- + case letters only. :type account_name: str :param parameters: The parameters to provide for the created account. :type parameters: ~storage.models.StorageAccountCreateParameters @@ -478,7 +478,7 @@ def list( **kwargs ) -> AsyncIterable["models.StorageAccountListResult"]: """Lists all the storage accounts available under the subscription. Note that storage keys are not - returned; use the ListKeys operation for this. + returned; use the ListKeys operation for this. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StorageAccountListResult or the result of cls(response) @@ -544,7 +544,7 @@ def list_by_resource_group( **kwargs ) -> AsyncIterable["models.StorageAccountListResult"]: """Lists all the storage accounts available under the given resource group. Note that storage keys - are not returned; use the ListKeys operation for this. + are not returned; use the ListKeys operation for this. :param resource_group_name: The name of the resource group within the user’s subscription. :type resource_group_name: str 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 945346caf0c..ff409a6da3a 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,15 +172,15 @@ def begin_create( ): # 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 - properties, then HTTP 200 would be returned. + 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 + properties, then HTTP 200 would be returned. :param resource_group_name: The name of the resource group within the user’s subscription. :type resource_group_name: str :param account_name: The name of the storage account within the specified resource group. - Storage account names must be between 3 and 24 characters in length and use numbers and lower- - case letters only. + Storage account names must be between 3 and 24 characters in length and use numbers and lower- + case letters only. :type account_name: str :param parameters: The parameters to provide for the created account. :type parameters: ~storage.models.StorageAccountCreateParameters @@ -489,7 +489,7 @@ def list( ): # type: (...) -> Iterable["models.StorageAccountListResult"] """Lists all the storage accounts available under the subscription. Note that storage keys are not - returned; use the ListKeys operation for this. + returned; use the ListKeys operation for this. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StorageAccountListResult or the result of cls(response) @@ -556,7 +556,7 @@ def list_by_resource_group( ): # type: (...) -> Iterable["models.StorageAccountListResult"] """Lists all the storage accounts available under the given resource group. Note that storage keys - are not returned; use the ListKeys operation for this. + are not returned; use the ListKeys operation for this. :param resource_group_name: The name of the resource group within the user’s subscription. :type resource_group_name: str diff --git a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/_operations_mixin.py b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/_operations_mixin.py index 766930bf6d3..66beebd67a2 100644 --- a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/_operations_mixin.py +++ b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/_operations_mixin.py @@ -36,9 +36,14 @@ def begin_test_lro( :param product: Product to put. :type product: ~multiapi.v1.models.Product :keyword callable cls: A custom type or function that will be passed the direct response - :return: Product, or the result of cls(response) - :rtype: ~multiapi.v1.models.Product - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~multiapi.v1.models.Product] + :raises ~azure.core.exceptions.HttpResponseError: """ api_version = self._get_api_version('begin_test_lro') if api_version == '1.0.0': @@ -90,8 +95,8 @@ def test_paging( """Returns ModelThree with optionalProperty 'paged'. :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagingResult, or the result of cls(response) - :rtype: ~multiapi.v3.models.PagingResult + :return: An iterator like instance of either PagingResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~multiapi.v3.models.PagingResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('test_paging') diff --git a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_operations_mixin_async.py b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_operations_mixin_async.py index 4d8badb71fa..f26d76ec639 100644 --- a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_operations_mixin_async.py +++ b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/aio/_operations_mixin_async.py @@ -32,9 +32,14 @@ async def begin_test_lro( :param product: Product to put. :type product: ~multiapi.v1.models.Product :keyword callable cls: A custom type or function that will be passed the direct response - :return: Product, or the result of cls(response) - :rtype: ~multiapi.v1.models.Product - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + 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: 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: """ api_version = self._get_api_version('begin_test_lro') if api_version == '1.0.0': @@ -86,8 +91,8 @@ def test_paging( """Returns ModelThree with optionalProperty 'paged'. :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagingResult, or the result of cls(response) - :rtype: ~multiapi.v3.models.PagingResult + :return: An iterator like instance of either PagingResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~multiapi.v3.models.PagingResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('test_paging') diff --git a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_metadata.json b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_metadata.json index 21c04479272..a991638b2af 100644 --- a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_metadata.json @@ -37,35 +37,38 @@ "operation_mixins": { "test_one" : { "sync": { - "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n" + "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs\n) -\u003e None:\n", - "coroutine": true + "coroutine": true, + "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "doc": " \"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "id, message" }, "_test_lro_initial" : { "sync": { - "signature": "def _test_lro_initial(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n" + "signature": "def _test_lro_initial(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param product: Product to put.\n:type product: ~multiapi.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapi.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "signature": "async def _test_lro_initial(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e Optional[\"models.Product\"]:\n", - "coroutine": true + "coroutine": true, + "doc": "\"\"\"\n\n:param product: Product to put.\n:type product: ~multiapi.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapi.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "doc": " \"\"\"\n\n:param product: Product to put.\n:type product: ~multiapi.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapi.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "product" }, "begin_test_lro" : { "sync": { - "signature": "def begin_test_lro(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n" + "signature": "def begin_test_lro(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Put in whatever shape of Product you want, will return a Product with id equal to 100.\n\n:param product: Product to put.\n:type product: ~multiapi.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either Product or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~multiapi.v1.models.Product]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "async": { "signature": "async def begin_test_lro(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e AsyncLROPoller[\"models.Product\"]:\n", - "coroutine": true + "coroutine": true, + "doc": "\"\"\"Put in whatever shape of Product you want, will return a Product with id equal to 100.\n\n:param product: Product to put.\n:type product: ~multiapi.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either Product or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~multiapi.v1.models.Product]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, - "doc": " \"\"\"Put in whatever shape of Product you want, will return a Product with id equal to 100.\n\n:param product: Product to put.\n:type product: ~multiapi.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapi.v1.models.Product\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "product" } }, diff --git a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_metadata.json b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_metadata.json index 7cdd0320de7..42a381b4f87 100644 --- a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_metadata.json @@ -38,13 +38,14 @@ "operation_mixins": { "test_one" : { "sync": { - "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n" + "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"TestOne should be in an SecondVersionOperationsMixin. Returns ModelTwo.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ModelTwo, or the result of cls(response)\n:rtype: ~multiapi.v2.models.ModelTwo\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs\n) -\u003e \"models.ModelTwo\":\n", - "coroutine": true + "coroutine": true, + "doc": "\"\"\"TestOne should be in an SecondVersionOperationsMixin. Returns ModelTwo.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ModelTwo, or the result of cls(response)\n:rtype: ~multiapi.v2.models.ModelTwo\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "doc": " \"\"\"TestOne should be in an SecondVersionOperationsMixin. Returns ModelTwo.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ModelTwo, or the result of cls(response)\n:rtype: ~multiapi.v2.models.ModelTwo\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "id, message" } }, diff --git a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_metadata.json b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_metadata.json index 11d13eaf335..0830d4070b9 100644 --- a/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_metadata.json @@ -38,13 +38,14 @@ "operation_mixins": { "test_paging" : { "sync": { - "signature": "def test_paging(\n self,\n **kwargs # type: Any\n):\n" + "signature": "def test_paging(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Returns ModelThree with optionalProperty \u0027paged\u0027.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PagingResult or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~multiapi.v3.models.PagingResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "signature": "def test_paging(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"models.PagingResult\"]:\n", - "coroutine": false + "coroutine": false, + "doc": "\"\"\"Returns ModelThree with optionalProperty \u0027paged\u0027.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PagingResult or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~multiapi.v3.models.PagingResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "doc": " \"\"\"Returns ModelThree with optionalProperty \u0027paged\u0027.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PagingResult, or the result of cls(response)\n:rtype: ~multiapi.v3.models.PagingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "" } }, diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/_operations_mixin.py b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/_operations_mixin.py index c31096b36c1..9d92eb3e422 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/_operations_mixin.py +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/_operations_mixin.py @@ -36,9 +36,14 @@ def begin_test_lro( :param product: Product to put. :type product: ~multiapinoasync.v1.models.Product :keyword callable cls: A custom type or function that will be passed the direct response - :return: Product, or the result of cls(response) - :rtype: ~multiapinoasync.v1.models.Product - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~multiapinoasync.v1.models.Product] + :raises ~azure.core.exceptions.HttpResponseError: """ api_version = self._get_api_version('begin_test_lro') if api_version == '1.0.0': @@ -90,8 +95,8 @@ def test_paging( """Returns ModelThree with optionalProperty 'paged'. :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagingResult, or the result of cls(response) - :rtype: ~multiapinoasync.v3.models.PagingResult + :return: An iterator like instance of either PagingResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~multiapinoasync.v3.models.PagingResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('test_paging') diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_metadata.json b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_metadata.json index a16c7d35887..43e744ca7c8 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_metadata.json @@ -37,35 +37,38 @@ "operation_mixins": { "test_one" : { "sync": { - "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n" + "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs\n) -\u003e None:\n", - "coroutine": true + "coroutine": true, + "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "doc": " \"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "id, message" }, "_test_lro_initial" : { "sync": { - "signature": "def _test_lro_initial(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n" + "signature": "def _test_lro_initial(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param product: Product to put.\n:type product: ~multiapinoasync.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapinoasync.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "signature": "async def _test_lro_initial(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e Optional[\"models.Product\"]:\n", - "coroutine": true + "coroutine": true, + "doc": "\"\"\"\n\n:param product: Product to put.\n:type product: ~multiapinoasync.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapinoasync.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "doc": " \"\"\"\n\n:param product: Product to put.\n:type product: ~multiapinoasync.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapinoasync.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "product" }, "begin_test_lro" : { "sync": { - "signature": "def begin_test_lro(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n" + "signature": "def begin_test_lro(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Put in whatever shape of Product you want, will return a Product with id equal to 100.\n\n:param product: Product to put.\n:type product: ~multiapinoasync.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either Product or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~multiapinoasync.v1.models.Product]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "async": { "signature": "async def begin_test_lro(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e AsyncLROPoller[\"models.Product\"]:\n", - "coroutine": true + "coroutine": true, + "doc": "\"\"\"Put in whatever shape of Product you want, will return a Product with id equal to 100.\n\n:param product: Product to put.\n:type product: ~multiapinoasync.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either Product or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~multiapinoasync.v1.models.Product]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, - "doc": " \"\"\"Put in whatever shape of Product you want, will return a Product with id equal to 100.\n\n:param product: Product to put.\n:type product: ~multiapinoasync.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapinoasync.v1.models.Product\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "product" } }, diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_metadata.json b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_metadata.json index 91a96cac25e..68fdc8047bb 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_metadata.json @@ -38,13 +38,14 @@ "operation_mixins": { "test_one" : { "sync": { - "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n" + "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"TestOne should be in an SecondVersionOperationsMixin. Returns ModelTwo.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ModelTwo, or the result of cls(response)\n:rtype: ~multiapinoasync.v2.models.ModelTwo\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs\n) -\u003e \"models.ModelTwo\":\n", - "coroutine": true + "coroutine": true, + "doc": "\"\"\"TestOne should be in an SecondVersionOperationsMixin. Returns ModelTwo.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ModelTwo, or the result of cls(response)\n:rtype: ~multiapinoasync.v2.models.ModelTwo\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "doc": " \"\"\"TestOne should be in an SecondVersionOperationsMixin. Returns ModelTwo.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ModelTwo, or the result of cls(response)\n:rtype: ~multiapinoasync.v2.models.ModelTwo\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "id, message" } }, diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_metadata.json b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_metadata.json index 5f89c882881..b7a2f7a2696 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_metadata.json @@ -38,13 +38,14 @@ "operation_mixins": { "test_paging" : { "sync": { - "signature": "def test_paging(\n self,\n **kwargs # type: Any\n):\n" + "signature": "def test_paging(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Returns ModelThree with optionalProperty \u0027paged\u0027.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PagingResult or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~multiapinoasync.v3.models.PagingResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "signature": "def test_paging(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"models.PagingResult\"]:\n", - "coroutine": false + "coroutine": false, + "doc": "\"\"\"Returns ModelThree with optionalProperty \u0027paged\u0027.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PagingResult or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~multiapinoasync.v3.models.PagingResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "doc": " \"\"\"Returns ModelThree with optionalProperty \u0027paged\u0027.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PagingResult, or the result of cls(response)\n:rtype: ~multiapinoasync.v3.models.PagingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "" } }, diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/_operations_mixin.py b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/_operations_mixin.py index 17cc2333f6a..800b4dbf8aa 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/_operations_mixin.py +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/_operations_mixin.py @@ -36,9 +36,14 @@ def begin_test_lro( :param product: Product to put. :type product: ~multiapiwithsubmodule.submodule.v1.models.Product :keyword callable cls: A custom type or function that will be passed the direct response - :return: Product, or the result of cls(response) - :rtype: ~multiapiwithsubmodule.submodule.v1.models.Product - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Product or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~multiapiwithsubmodule.submodule.v1.models.Product] + :raises ~azure.core.exceptions.HttpResponseError: """ api_version = self._get_api_version('begin_test_lro') if api_version == '1.0.0': @@ -90,8 +95,8 @@ def test_paging( """Returns ModelThree with optionalProperty 'paged'. :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagingResult, or the result of cls(response) - :rtype: ~multiapiwithsubmodule.submodule.v3.models.PagingResult + :return: An iterator like instance of either PagingResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~multiapiwithsubmodule.submodule.v3.models.PagingResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('test_paging') diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_operations_mixin_async.py b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_operations_mixin_async.py index 0be7e6b860b..f3f102ff0da 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_operations_mixin_async.py +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/aio/_operations_mixin_async.py @@ -32,9 +32,14 @@ async def begin_test_lro( :param product: Product to put. :type product: ~multiapiwithsubmodule.submodule.v1.models.Product :keyword callable cls: A custom type or function that will be passed the direct response - :return: Product, or the result of cls(response) - :rtype: ~multiapiwithsubmodule.submodule.v1.models.Product - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + 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: 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: """ api_version = self._get_api_version('begin_test_lro') if api_version == '1.0.0': @@ -86,8 +91,8 @@ def test_paging( """Returns ModelThree with optionalProperty 'paged'. :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagingResult, or the result of cls(response) - :rtype: ~multiapiwithsubmodule.submodule.v3.models.PagingResult + :return: An iterator like instance of either PagingResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~multiapiwithsubmodule.submodule.v3.models.PagingResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('test_paging') diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_metadata.json b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_metadata.json index 29aef534623..7bb419dbe03 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_metadata.json @@ -37,35 +37,38 @@ "operation_mixins": { "test_one" : { "sync": { - "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n" + "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs\n) -\u003e None:\n", - "coroutine": true + "coroutine": true, + "doc": "\"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "doc": " \"\"\"TestOne should be in an FirstVersionOperationsMixin.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "id, message" }, "_test_lro_initial" : { "sync": { - "signature": "def _test_lro_initial(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n" + "signature": "def _test_lro_initial(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param product: Product to put.\n:type product: ~multiapiwithsubmodule.submodule.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapiwithsubmodule.submodule.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "signature": "async def _test_lro_initial(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e Optional[\"models.Product\"]:\n", - "coroutine": true + "coroutine": true, + "doc": "\"\"\"\n\n:param product: Product to put.\n:type product: ~multiapiwithsubmodule.submodule.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapiwithsubmodule.submodule.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "doc": " \"\"\"\n\n:param product: Product to put.\n:type product: ~multiapiwithsubmodule.submodule.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapiwithsubmodule.submodule.v1.models.Product or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "product" }, "begin_test_lro" : { "sync": { - "signature": "def begin_test_lro(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n" + "signature": "def begin_test_lro(\n self,\n product=None, # type: Optional[\"models.Product\"]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Put in whatever shape of Product you want, will return a Product with id equal to 100.\n\n:param product: Product to put.\n:type product: ~multiapiwithsubmodule.submodule.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either Product or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~multiapiwithsubmodule.submodule.v1.models.Product]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "async": { "signature": "async def begin_test_lro(\n self,\n product: Optional[\"models.Product\"] = None,\n **kwargs\n) -\u003e AsyncLROPoller[\"models.Product\"]:\n", - "coroutine": true + "coroutine": true, + "doc": "\"\"\"Put in whatever shape of Product you want, will return a Product with id equal to 100.\n\n:param product: Product to put.\n:type product: ~multiapiwithsubmodule.submodule.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either Product or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~multiapiwithsubmodule.submodule.v1.models.Product]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, - "doc": " \"\"\"Put in whatever shape of Product you want, will return a Product with id equal to 100.\n\n:param product: Product to put.\n:type product: ~multiapiwithsubmodule.submodule.v1.models.Product\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: Product, or the result of cls(response)\n:rtype: ~multiapiwithsubmodule.submodule.v1.models.Product\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "product" } }, diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_metadata.json b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_metadata.json index 028534fcf94..51725a67786 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_metadata.json @@ -38,13 +38,14 @@ "operation_mixins": { "test_one" : { "sync": { - "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n" + "signature": "def test_one(\n self,\n id, # type: int\n message=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"TestOne should be in an SecondVersionOperationsMixin. Returns ModelTwo.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ModelTwo, or the result of cls(response)\n:rtype: ~multiapiwithsubmodule.submodule.v2.models.ModelTwo\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "signature": "async def test_one(\n self,\n id: int,\n message: Optional[str] = None,\n **kwargs\n) -\u003e \"models.ModelTwo\":\n", - "coroutine": true + "coroutine": true, + "doc": "\"\"\"TestOne should be in an SecondVersionOperationsMixin. Returns ModelTwo.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ModelTwo, or the result of cls(response)\n:rtype: ~multiapiwithsubmodule.submodule.v2.models.ModelTwo\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "doc": " \"\"\"TestOne should be in an SecondVersionOperationsMixin. Returns ModelTwo.\n\n:param id: An int parameter.\n:type id: int\n:param message: An optional string parameter.\n:type message: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ModelTwo, or the result of cls(response)\n:rtype: ~multiapiwithsubmodule.submodule.v2.models.ModelTwo\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "id, message" } }, diff --git a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_metadata.json b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_metadata.json index dc8d442255d..c6c3df67a43 100644 --- a/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_metadata.json +++ b/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_metadata.json @@ -38,13 +38,14 @@ "operation_mixins": { "test_paging" : { "sync": { - "signature": "def test_paging(\n self,\n **kwargs # type: Any\n):\n" + "signature": "def test_paging(\n self,\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Returns ModelThree with optionalProperty \u0027paged\u0027.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PagingResult or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~multiapiwithsubmodule.submodule.v3.models.PagingResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "signature": "def test_paging(\n self,\n **kwargs\n) -\u003e AsyncItemPaged[\"models.PagingResult\"]:\n", - "coroutine": false + "coroutine": false, + "doc": "\"\"\"Returns ModelThree with optionalProperty \u0027paged\u0027.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PagingResult or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~multiapiwithsubmodule.submodule.v3.models.PagingResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "doc": " \"\"\"Returns ModelThree with optionalProperty \u0027paged\u0027.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PagingResult, or the result of cls(response)\n:rtype: ~multiapiwithsubmodule.submodule.v3.models.PagingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"", "call": "" } }, diff --git a/test/vanilla/Expected/AcceptanceTests/BodyString/bodystring/aio/operations_async/_string_operations_async.py b/test/vanilla/Expected/AcceptanceTests/BodyString/bodystring/aio/operations_async/_string_operations_async.py index c71130a62f3..4ac4736575b 100644 --- a/test/vanilla/Expected/AcceptanceTests/BodyString/bodystring/aio/operations_async/_string_operations_async.py +++ b/test/vanilla/Expected/AcceptanceTests/BodyString/bodystring/aio/operations_async/_string_operations_async.py @@ -452,15 +452,15 @@ async def get_not_provided( async def get_base64_encoded( self, **kwargs - ) -> bytearray: + ) -> bytes: """Get value that is base64 encoded. :keyword callable cls: A custom type or function that will be passed the direct response - :return: bytearray, or the result of cls(response) - :rtype: bytearray + :return: bytes, or the result of cls(response) + :rtype: bytes :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[bytearray] + cls = kwargs.pop('cls', None) # type: ClsType[bytes] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) @@ -483,7 +483,7 @@ async def get_base64_encoded( error = self._deserialize(models.Error, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('bytearray', pipeline_response) + deserialized = self._deserialize('base64', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) diff --git a/test/vanilla/Expected/AcceptanceTests/BodyString/bodystring/operations/_string_operations.py b/test/vanilla/Expected/AcceptanceTests/BodyString/bodystring/operations/_string_operations.py index c377ba629b9..486edc4ad09 100644 --- a/test/vanilla/Expected/AcceptanceTests/BodyString/bodystring/operations/_string_operations.py +++ b/test/vanilla/Expected/AcceptanceTests/BodyString/bodystring/operations/_string_operations.py @@ -466,15 +466,15 @@ def get_base64_encoded( self, **kwargs # type: Any ): - # type: (...) -> bytearray + # type: (...) -> bytes """Get value that is base64 encoded. :keyword callable cls: A custom type or function that will be passed the direct response - :return: bytearray, or the result of cls(response) - :rtype: bytearray + :return: bytes, or the result of cls(response) + :rtype: bytes :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[bytearray] + cls = kwargs.pop('cls', None) # type: ClsType[bytes] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) @@ -497,7 +497,7 @@ def get_base64_encoded( error = self._deserialize(models.Error, response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('bytearray', pipeline_response) + deserialized = self._deserialize('base64', pipeline_response) if cls: return cls(pipeline_response, deserialized, {})