From ef34918978cfd2911ceab640003c014e2403fa76 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 6 Nov 2023 13:31:31 +0000 Subject: [PATCH] CodeGen from PR 26570 in Azure/azure-rest-api-specs Merge e760b946255e43aff5be793e51a0d465fce3b53f into ec238f30bd6d4a0681b691908fe00b54868467de --- sdk/nginx/azure-mgmt-nginx/_meta.json | 10 +- .../azure/mgmt/nginx/_configuration.py | 10 +- .../mgmt/nginx/_nginx_management_client.py | 2 +- .../azure/mgmt/nginx/_serialization.py | 32 +++-- .../azure/mgmt/nginx/_vendor.py | 14 -- .../azure/mgmt/nginx/_version.py | 2 +- .../azure/mgmt/nginx/aio/_configuration.py | 10 +- .../nginx/aio/_nginx_management_client.py | 2 +- .../operations/_certificates_operations.py | 68 ++++------ .../operations/_configurations_operations.py | 84 +++++------- .../aio/operations/_deployments_operations.py | 102 ++++++-------- .../mgmt/nginx/aio/operations/_operations.py | 13 +- .../azure/mgmt/nginx/models/__init__.py | 4 + .../azure/mgmt/nginx/models/_models_py3.py | 98 ++++++++++++-- .../operations/_certificates_operations.py | 86 +++++------- .../operations/_configurations_operations.py | 102 ++++++-------- .../operations/_deployments_operations.py | 128 ++++++++---------- .../mgmt/nginx/operations/_operations.py | 15 +- .../certificates_create_or_update.py | 2 +- .../generated_samples/certificates_delete.py | 5 +- .../generated_samples/certificates_get.py | 2 +- .../generated_samples/certificates_list.py | 2 +- .../configurations_create_or_update.py | 2 +- .../configurations_delete.py | 5 +- .../generated_samples/configurations_get.py | 2 +- .../generated_samples/configurations_list.py | 2 +- .../generated_samples/deployments_create.py | 2 +- .../generated_samples/deployments_delete.py | 5 +- .../generated_samples/deployments_get.py | 2 +- .../generated_samples/deployments_list.py | 2 +- .../deployments_list_by_resource_group.py | 2 +- .../generated_samples/deployments_update.py | 2 +- .../generated_samples/operations_list.py | 2 +- 33 files changed, 376 insertions(+), 445 deletions(-) diff --git a/sdk/nginx/azure-mgmt-nginx/_meta.json b/sdk/nginx/azure-mgmt-nginx/_meta.json index 0bfe4ae43fbe..14ba6a19cae7 100644 --- a/sdk/nginx/azure-mgmt-nginx/_meta.json +++ b/sdk/nginx/azure-mgmt-nginx/_meta.json @@ -1,11 +1,11 @@ { - "commit": "d4dfb3388ab40185cf302512268ad1406f666d64", + "commit": "bf1b826bd3c8a060d0ee012676bcf96727b9fbea", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.9.2", + "autorest": "3.9.7", "use": [ - "@autorest/python@6.4.3", - "@autorest/modelerfour@4.24.3" + "@autorest/python@6.7.1", + "@autorest/modelerfour@4.26.2" ], - "autorest_command": "autorest specification/nginx/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.4.3 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", + "autorest_command": "autorest specification/nginx/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False", "readme": "specification/nginx/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_configuration.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_configuration.py index a6b2a27d0edc..c9f0815f44d8 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_configuration.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -35,14 +29,14 @@ class NginxManagementClientConfiguration(Configuration): # pylint: disable=too- :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2022-08-01". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(NginxManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", "2022-08-01") + api_version: str = kwargs.pop("api_version", "2023-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_nginx_management_client.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_nginx_management_client.py index 66905ea34358..bf692c8873ba 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_nginx_management_client.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_nginx_management_client.py @@ -39,7 +39,7 @@ class NginxManagementClient: # pylint: disable=client-accepts-api-version-keywo :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2022-08-01". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_serialization.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_serialization.py index f17c068e833e..4bae2292227b 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_serialization.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_serialization.py @@ -629,7 +629,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if xml_desc.get("attr", False): if xml_ns: ET.register_namespace(xml_prefix, xml_ns) - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) serialized.set(xml_name, new_attr) # type: ignore continue if xml_desc.get("text", False): @@ -662,8 +662,9 @@ def _serialize(self, target_obj, data_type=None, **kwargs): _serialized.update(_new_attr) # type: ignore _new_attr = _new_attr[k] # type: ignore _serialized = _serialized[k] - except ValueError: - continue + except ValueError as err: + if isinstance(err, SerializationError): + raise except (AttributeError, KeyError, TypeError) as err: msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) @@ -741,6 +742,8 @@ def query(self, name, data, data_type, **kwargs): :param data: The data to be serialized. :param str data_type: The type to be serialized from. + :keyword bool skip_quote: Whether to skip quote the serialized result. + Defaults to False. :rtype: str :raises: TypeError if serialization fails. :raises: ValueError if data is None @@ -749,10 +752,8 @@ def query(self, name, data, data_type, **kwargs): # Treat the list aside, since we don't want to encode the div separator if data_type.startswith("["): internal_data_type = data_type[1:-1] - data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data] - if not kwargs.get("skip_quote", False): - data = [quote(str(d), safe="") for d in data] - return str(self.serialize_iter(data, internal_data_type, **kwargs)) + do_quote = not kwargs.get("skip_quote", False) + return str(self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs)) # Not a list, regular serialization output = self.serialize_data(data, data_type, **kwargs) @@ -891,6 +892,8 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): not be None or empty. :param str div: If set, this str will be used to combine the elements in the iterable into a combined string. Default is 'None'. + :keyword bool do_quote: Whether to quote the serialized result of each iterable element. + Defaults to False. :rtype: list, str """ if isinstance(data, str): @@ -903,9 +906,14 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): for d in data: try: serialized.append(self.serialize_data(d, iter_type, **kwargs)) - except ValueError: + except ValueError as err: + if isinstance(err, SerializationError): + raise serialized.append(None) + if kwargs.get("do_quote", False): + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] + if div: serialized = ["" if s is None else str(s) for s in serialized] serialized = div.join(serialized) @@ -950,7 +958,9 @@ def serialize_dict(self, attr, dict_type, **kwargs): for key, value in attr.items(): try: serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) - except ValueError: + except ValueError as err: + if isinstance(err, SerializationError): + raise serialized[self.serialize_unicode(key)] = None if "xml" in serialization_ctxt: @@ -1271,7 +1281,7 @@ def _extract_name_from_internal_type(internal_type): xml_name = internal_type_xml_map.get("name", internal_type.__name__) xml_ns = internal_type_xml_map.get("ns", None) if xml_ns: - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) return xml_name @@ -1295,7 +1305,7 @@ def xml_key_extractor(attr, attr_desc, data): # Integrate namespace if necessary xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) if xml_ns: - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) # If it's an attribute, that's simple if xml_desc.get("attr", False): diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_vendor.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_vendor.py index bd0df84f5319..0dafe0e287ff 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_vendor.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_vendor.py @@ -5,8 +5,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import List, cast - from azure.core.pipeline.transport import HttpRequest @@ -16,15 +14,3 @@ def _convert_request(request, files=None): if files: request.set_formdata_body(files) return request - - -def _format_url_section(template, **kwargs): - components = template.split("/") - while components: - try: - return template.format(**kwargs) - except KeyError as key: - # Need the cast, as for some reasons "split" is typed as list[str | Any] - formatted_components = cast(List[str], template.split("/")) - components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] - template = "/".join(components) diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_version.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_version.py index 83f24ab50946..e5754a47ce68 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_version.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/_configuration.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/_configuration.py index 0cb5b5cde398..9130d1d34fc7 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/_configuration.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -35,14 +29,14 @@ class NginxManagementClientConfiguration(Configuration): # pylint: disable=too- :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2022-08-01". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(NginxManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", "2022-08-01") + api_version: str = kwargs.pop("api_version", "2023-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/_nginx_management_client.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/_nginx_management_client.py index 11925f35333e..95ddba84d12c 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/_nginx_management_client.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/_nginx_management_client.py @@ -39,7 +39,7 @@ class NginxManagementClient: # pylint: disable=client-accepts-api-version-keywo :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2022-08-01". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_certificates_operations.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_certificates_operations.py index dd35b43ceae1..716f213dbc10 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_certificates_operations.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_certificates_operations.py @@ -6,7 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -38,10 +38,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,14 +65,14 @@ def __init__(self, *args, **kwargs) -> None: async def get( self, resource_group_name: str, deployment_name: str, certificate_name: str, **kwargs: Any ) -> _models.NginxCertificate: - """Get a certificate of given Nginx deployment. + """Get a certificate of given NGINX deployment. - Get a certificate of given Nginx deployment. + Get a certificate of given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param certificate_name: The name of certificate. Required. :type certificate_name: str @@ -96,9 +92,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxCertificate] = kwargs.pop("cls", None) request = build_get_request( @@ -158,16 +152,14 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxCertificate] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(body, (IO, bytes)): + if isinstance(body, (IOBase, bytes)): _content = body else: if body is not None: @@ -231,14 +223,14 @@ async def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.NginxCertificate]: - """Create or update the Nginx certificates for given Nginx deployment. + """Create or update the NGINX certificates for given NGINX deployment. - Create or update the Nginx certificates for given Nginx deployment. + Create or update the NGINX certificates for given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param certificate_name: The name of certificate. Required. :type certificate_name: str @@ -272,14 +264,14 @@ async def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.NginxCertificate]: - """Create or update the Nginx certificates for given Nginx deployment. + """Create or update the NGINX certificates for given NGINX deployment. - Create or update the Nginx certificates for given Nginx deployment. + Create or update the NGINX certificates for given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param certificate_name: The name of certificate. Required. :type certificate_name: str @@ -311,14 +303,14 @@ async def begin_create_or_update( body: Optional[Union[_models.NginxCertificate, IO]] = None, **kwargs: Any ) -> AsyncLROPoller[_models.NginxCertificate]: - """Create or update the Nginx certificates for given Nginx deployment. + """Create or update the NGINX certificates for given NGINX deployment. - Create or update the Nginx certificates for given Nginx deployment. + Create or update the NGINX certificates for given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param certificate_name: The name of certificate. Required. :type certificate_name: str @@ -344,9 +336,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxCertificate] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -409,9 +399,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -452,14 +440,14 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements async def begin_delete( self, resource_group_name: str, deployment_name: str, certificate_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes a certificate from the nginx deployment. + """Deletes a certificate from the NGINX deployment. - Deletes a certificate from the nginx deployment. + Deletes a certificate from the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param certificate_name: The name of certificate. Required. :type certificate_name: str @@ -478,9 +466,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -525,14 +511,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def list( self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> AsyncIterable["_models.NginxCertificate"]: - """List all certificates of given Nginx deployment. + """List all certificates of given NGINX deployment. - List all certificates of given Nginx deployment. + List all certificates of given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NginxCertificate or the result of cls(response) @@ -542,9 +528,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxCertificateListResponse] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_configurations_operations.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_configurations_operations.py index 17e72b52af37..8f6466452472 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_configurations_operations.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_configurations_operations.py @@ -6,7 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -38,10 +38,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,14 +65,14 @@ def __init__(self, *args, **kwargs) -> None: def list( self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> AsyncIterable["_models.NginxConfiguration"]: - """List the Nginx configuration of given Nginx deployment. + """List the NGINX configuration of given NGINX deployment. - List the Nginx configuration of given Nginx deployment. + List the NGINX configuration of given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NginxConfiguration or the result of cls(response) @@ -86,9 +82,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxConfigurationListResponse] = kwargs.pop("cls", None) error_map = { @@ -167,17 +161,17 @@ async def get_next(next_link=None): async def get( self, resource_group_name: str, deployment_name: str, configuration_name: str, **kwargs: Any ) -> _models.NginxConfiguration: - """Get the Nginx configuration of given Nginx deployment. + """Get the NGINX configuration of given NGINX deployment. - Get the Nginx configuration of given Nginx deployment. + Get the NGINX configuration of given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param configuration_name: The name of configuration, only 'default' is supported value due to - the singleton of Nginx conf. Required. + the singleton of NGINX conf. Required. :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NginxConfiguration or the result of cls(response) @@ -195,9 +189,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxConfiguration] = kwargs.pop("cls", None) request = build_get_request( @@ -257,16 +249,14 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxConfiguration] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(body, (IO, bytes)): + if isinstance(body, (IOBase, bytes)): _content = body else: if body is not None: @@ -330,19 +320,19 @@ async def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.NginxConfiguration]: - """Create or update the Nginx configuration for given Nginx deployment. + """Create or update the NGINX configuration for given NGINX deployment. - Create or update the Nginx configuration for given Nginx deployment. + Create or update the NGINX configuration for given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param configuration_name: The name of configuration, only 'default' is supported value due to - the singleton of Nginx conf. Required. + the singleton of NGINX conf. Required. :type configuration_name: str - :param body: The Nginx configuration. Default value is None. + :param body: The NGINX configuration. Default value is None. :type body: ~azure.mgmt.nginx.models.NginxConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". @@ -372,19 +362,19 @@ async def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.NginxConfiguration]: - """Create or update the Nginx configuration for given Nginx deployment. + """Create or update the NGINX configuration for given NGINX deployment. - Create or update the Nginx configuration for given Nginx deployment. + Create or update the NGINX configuration for given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param configuration_name: The name of configuration, only 'default' is supported value due to - the singleton of Nginx conf. Required. + the singleton of NGINX conf. Required. :type configuration_name: str - :param body: The Nginx configuration. Default value is None. + :param body: The NGINX configuration. Default value is None. :type body: IO :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". @@ -412,19 +402,19 @@ async def begin_create_or_update( body: Optional[Union[_models.NginxConfiguration, IO]] = None, **kwargs: Any ) -> AsyncLROPoller[_models.NginxConfiguration]: - """Create or update the Nginx configuration for given Nginx deployment. + """Create or update the NGINX configuration for given NGINX deployment. - Create or update the Nginx configuration for given Nginx deployment. + Create or update the NGINX configuration for given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param configuration_name: The name of configuration, only 'default' is supported value due to - the singleton of Nginx conf. Required. + the singleton of NGINX conf. Required. :type configuration_name: str - :param body: The Nginx configuration. Is either a NginxConfiguration type or a IO type. Default + :param body: The NGINX configuration. Is either a NginxConfiguration type or a IO type. Default value is None. :type body: ~azure.mgmt.nginx.models.NginxConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -446,9 +436,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxConfiguration] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -511,9 +499,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -554,17 +540,17 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements async def begin_delete( self, resource_group_name: str, deployment_name: str, configuration_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Reset the Nginx configuration of given Nginx deployment to default. + """Reset the NGINX configuration of given NGINX deployment to default. - Reset the Nginx configuration of given Nginx deployment to default. + Reset the NGINX configuration of given NGINX deployment to default. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param configuration_name: The name of configuration, only 'default' is supported value due to - the singleton of Nginx conf. Required. + the singleton of NGINX conf. Required. :type configuration_name: str :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. @@ -581,9 +567,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_deployments_operations.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_deployments_operations.py index 2ea703dbbb5b..1007685a37f2 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_deployments_operations.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_deployments_operations.py @@ -6,7 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -40,10 +40,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,14 +65,14 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace_async async def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _models.NginxDeployment: - """Get the Nginx deployment. + """Get the NGINX deployment. - Get the Nginx deployment. + Get the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NginxDeployment or the result of cls(response) @@ -94,9 +90,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxDeployment] = kwargs.pop("cls", None) request = build_get_request( @@ -154,16 +148,14 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxDeployment] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(body, (IO, bytes)): + if isinstance(body, (IOBase, bytes)): _content = body else: if body is not None: @@ -225,14 +217,14 @@ async def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.NginxDeployment]: - """Create or update the Nginx deployment. + """Create or update the NGINX deployment. - Create or update the Nginx deployment. + Create or update the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param body: Default value is None. :type body: ~azure.mgmt.nginx.models.NginxDeployment @@ -263,14 +255,14 @@ async def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.NginxDeployment]: - """Create or update the Nginx deployment. + """Create or update the NGINX deployment. - Create or update the Nginx deployment. + Create or update the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param body: Default value is None. :type body: IO @@ -299,14 +291,14 @@ async def begin_create_or_update( body: Optional[Union[_models.NginxDeployment, IO]] = None, **kwargs: Any ) -> AsyncLROPoller[_models.NginxDeployment]: - """Create or update the Nginx deployment. + """Create or update the NGINX deployment. - Create or update the Nginx deployment. + Create or update the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param body: Is either a NginxDeployment type or a IO type. Default value is None. :type body: ~azure.mgmt.nginx.models.NginxDeployment or IO @@ -329,9 +321,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxDeployment] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -397,16 +387,14 @@ async def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxDeployment] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(body, (IO, bytes)): + if isinstance(body, (IOBase, bytes)): _content = body else: if body is not None: @@ -468,14 +456,14 @@ async def begin_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.NginxDeployment]: - """Update the Nginx deployment. + """Update the NGINX deployment. - Update the Nginx deployment. + Update the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param body: Default value is None. :type body: ~azure.mgmt.nginx.models.NginxDeploymentUpdateParameters @@ -506,14 +494,14 @@ async def begin_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.NginxDeployment]: - """Update the Nginx deployment. + """Update the NGINX deployment. - Update the Nginx deployment. + Update the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param body: Default value is None. :type body: IO @@ -542,14 +530,14 @@ async def begin_update( body: Optional[Union[_models.NginxDeploymentUpdateParameters, IO]] = None, **kwargs: Any ) -> AsyncLROPoller[_models.NginxDeployment]: - """Update the Nginx deployment. + """Update the NGINX deployment. - Update the Nginx deployment. + Update the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param body: Is either a NginxDeploymentUpdateParameters type or a IO type. Default value is None. @@ -573,9 +561,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxDeployment] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -634,9 +620,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -674,14 +658,14 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements @distributed_trace_async async def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> AsyncLROPoller[None]: - """Delete the Nginx deployment resource. + """Delete the NGINX deployment resource. - Delete the Nginx deployment resource. + Delete the NGINX deployment resource. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :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. @@ -698,9 +682,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -742,9 +724,9 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @distributed_trace def list(self, **kwargs: Any) -> AsyncIterable["_models.NginxDeployment"]: - """List the Nginx deployments resources. + """List the NGINX deployments resources. - List the Nginx deployments resources. + List the NGINX deployments resources. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NginxDeployment or the result of cls(response) @@ -754,9 +736,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.NginxDeployment"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxDeploymentListResponse] = kwargs.pop("cls", None) error_map = { @@ -831,9 +811,9 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, **kwargs: Any ) -> AsyncIterable["_models.NginxDeployment"]: - """List all Nginx deployments under the specified resource group. + """List all NGINX deployments under the specified resource group. - List all Nginx deployments under the specified resource group. + List all NGINX deployments under the specified resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -846,9 +826,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxDeploymentListResponse] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_operations.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_operations.py index 5d92a2c49d8e..37b11a832238 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_operations.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/aio/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -59,9 +54,9 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace def list(self, **kwargs: Any) -> AsyncIterable["_models.OperationResult"]: - """List all operations provided by Nginx.NginxPlus for the 2022-08-01 api version. + """List all operations provided by Nginx.NginxPlus for the 2023-04-01 api version. - List all operations provided by Nginx.NginxPlus for the 2022-08-01 api version. + List all operations provided by Nginx.NginxPlus for the 2023-04-01 api version. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationResult or the result of cls(response) @@ -71,9 +66,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.OperationResult"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/models/__init__.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/models/__init__.py index 3d784cde97a0..1302846471ae 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/models/__init__.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/models/__init__.py @@ -19,8 +19,10 @@ from ._models_py3 import NginxDeployment from ._models_py3 import NginxDeploymentListResponse from ._models_py3 import NginxDeploymentProperties +from ._models_py3 import NginxDeploymentScalingProperties from ._models_py3 import NginxDeploymentUpdateParameters from ._models_py3 import NginxDeploymentUpdateProperties +from ._models_py3 import NginxDeploymentUserProfile from ._models_py3 import NginxFrontendIPConfiguration from ._models_py3 import NginxLogging from ._models_py3 import NginxNetworkInterfaceConfiguration @@ -58,8 +60,10 @@ "NginxDeployment", "NginxDeploymentListResponse", "NginxDeploymentProperties", + "NginxDeploymentScalingProperties", "NginxDeploymentUpdateParameters", "NginxDeploymentUpdateProperties", + "NginxDeploymentUserProfile", "NginxFrontendIPConfiguration", "NginxLogging", "NginxNetworkInterfaceConfiguration", diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/models/_models_py3.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/models/_models_py3.py index abf45b1e6abd..6ce745228f64 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/models/_models_py3.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/models/_models_py3.py @@ -125,8 +125,6 @@ class NginxCertificate(_serialization.Model): :vartype type: str :ivar properties: :vartype properties: ~azure.mgmt.nginx.models.NginxCertificateProperties - :ivar tags: Dictionary of :code:``. - :vartype tags: dict[str, str] :ivar location: :vartype location: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. @@ -145,7 +143,6 @@ class NginxCertificate(_serialization.Model): "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "properties": {"key": "properties", "type": "NginxCertificateProperties"}, - "tags": {"key": "tags", "type": "{str}"}, "location": {"key": "location", "type": "str"}, "system_data": {"key": "systemData", "type": "SystemData"}, } @@ -154,15 +151,12 @@ def __init__( self, *, properties: Optional["_models.NginxCertificateProperties"] = None, - tags: Optional[Dict[str, str]] = None, location: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword properties: :paramtype properties: ~azure.mgmt.nginx.models.NginxCertificateProperties - :keyword tags: Dictionary of :code:``. - :paramtype tags: dict[str, str] :keyword location: :paramtype location: str """ @@ -171,7 +165,6 @@ def __init__( self.name = None self.type = None self.properties = properties - self.tags = tags self.location = location self.system_data = None @@ -271,8 +264,6 @@ class NginxConfiguration(_serialization.Model): :vartype type: str :ivar properties: :vartype properties: ~azure.mgmt.nginx.models.NginxConfigurationProperties - :ivar tags: Dictionary of :code:``. - :vartype tags: dict[str, str] :ivar location: :vartype location: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. @@ -291,7 +282,6 @@ class NginxConfiguration(_serialization.Model): "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "properties": {"key": "properties", "type": "NginxConfigurationProperties"}, - "tags": {"key": "tags", "type": "{str}"}, "location": {"key": "location", "type": "str"}, "system_data": {"key": "systemData", "type": "SystemData"}, } @@ -300,15 +290,12 @@ def __init__( self, *, properties: Optional["_models.NginxConfigurationProperties"] = None, - tags: Optional[Dict[str, str]] = None, location: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword properties: :paramtype properties: ~azure.mgmt.nginx.models.NginxConfigurationProperties - :keyword tags: Dictionary of :code:``. - :paramtype tags: dict[str, str] :keyword location: :paramtype location: str """ @@ -317,7 +304,6 @@ def __init__( self.name = None self.type = None self.properties = properties - self.tags = tags self.location = location self.system_data = None @@ -385,19 +371,27 @@ class NginxConfigurationPackage(_serialization.Model): :ivar data: :vartype data: str + :ivar protected_files: + :vartype protected_files: list[str] """ _attribute_map = { "data": {"key": "data", "type": "str"}, + "protected_files": {"key": "protectedFiles", "type": "[str]"}, } - def __init__(self, *, data: Optional[str] = None, **kwargs: Any) -> None: + def __init__( + self, *, data: Optional[str] = None, protected_files: Optional[List[str]] = None, **kwargs: Any + ) -> None: """ :keyword data: :paramtype data: str + :keyword protected_files: + :paramtype protected_files: list[str] """ super().__init__(**kwargs) self.data = data + self.protected_files = protected_files class NginxConfigurationProperties(_serialization.Model): @@ -584,6 +578,10 @@ class NginxDeploymentProperties(_serialization.Model): :vartype enable_diagnostics_support: bool :ivar logging: :vartype logging: ~azure.mgmt.nginx.models.NginxLogging + :ivar scaling_properties: + :vartype scaling_properties: ~azure.mgmt.nginx.models.NginxDeploymentScalingProperties + :ivar user_profile: + :vartype user_profile: ~azure.mgmt.nginx.models.NginxDeploymentUserProfile """ _validation = { @@ -600,6 +598,8 @@ class NginxDeploymentProperties(_serialization.Model): "ip_address": {"key": "ipAddress", "type": "str"}, "enable_diagnostics_support": {"key": "enableDiagnosticsSupport", "type": "bool"}, "logging": {"key": "logging", "type": "NginxLogging"}, + "scaling_properties": {"key": "scalingProperties", "type": "NginxDeploymentScalingProperties"}, + "user_profile": {"key": "userProfile", "type": "NginxDeploymentUserProfile"}, } def __init__( @@ -609,6 +609,8 @@ def __init__( network_profile: Optional["_models.NginxNetworkProfile"] = None, enable_diagnostics_support: Optional[bool] = None, logging: Optional["_models.NginxLogging"] = None, + scaling_properties: Optional["_models.NginxDeploymentScalingProperties"] = None, + user_profile: Optional["_models.NginxDeploymentUserProfile"] = None, **kwargs: Any ) -> None: """ @@ -621,6 +623,10 @@ def __init__( :paramtype enable_diagnostics_support: bool :keyword logging: :paramtype logging: ~azure.mgmt.nginx.models.NginxLogging + :keyword scaling_properties: + :paramtype scaling_properties: ~azure.mgmt.nginx.models.NginxDeploymentScalingProperties + :keyword user_profile: + :paramtype user_profile: ~azure.mgmt.nginx.models.NginxDeploymentUserProfile """ super().__init__(**kwargs) self.provisioning_state = None @@ -630,6 +636,28 @@ def __init__( self.ip_address = None self.enable_diagnostics_support = enable_diagnostics_support self.logging = logging + self.scaling_properties = scaling_properties + self.user_profile = user_profile + + +class NginxDeploymentScalingProperties(_serialization.Model): + """NginxDeploymentScalingProperties. + + :ivar capacity: + :vartype capacity: int + """ + + _attribute_map = { + "capacity": {"key": "capacity", "type": "int"}, + } + + def __init__(self, *, capacity: Optional[int] = None, **kwargs: Any) -> None: + """ + :keyword capacity: + :paramtype capacity: int + """ + super().__init__(**kwargs) + self.capacity = capacity class NginxDeploymentUpdateParameters(_serialization.Model): @@ -692,11 +720,17 @@ class NginxDeploymentUpdateProperties(_serialization.Model): :vartype enable_diagnostics_support: bool :ivar logging: :vartype logging: ~azure.mgmt.nginx.models.NginxLogging + :ivar scaling_properties: + :vartype scaling_properties: ~azure.mgmt.nginx.models.NginxDeploymentScalingProperties + :ivar user_profile: + :vartype user_profile: ~azure.mgmt.nginx.models.NginxDeploymentUserProfile """ _attribute_map = { "enable_diagnostics_support": {"key": "enableDiagnosticsSupport", "type": "bool"}, "logging": {"key": "logging", "type": "NginxLogging"}, + "scaling_properties": {"key": "scalingProperties", "type": "NginxDeploymentScalingProperties"}, + "user_profile": {"key": "userProfile", "type": "NginxDeploymentUserProfile"}, } def __init__( @@ -704,6 +738,8 @@ def __init__( *, enable_diagnostics_support: Optional[bool] = None, logging: Optional["_models.NginxLogging"] = None, + scaling_properties: Optional["_models.NginxDeploymentScalingProperties"] = None, + user_profile: Optional["_models.NginxDeploymentUserProfile"] = None, **kwargs: Any ) -> None: """ @@ -711,10 +747,42 @@ def __init__( :paramtype enable_diagnostics_support: bool :keyword logging: :paramtype logging: ~azure.mgmt.nginx.models.NginxLogging + :keyword scaling_properties: + :paramtype scaling_properties: ~azure.mgmt.nginx.models.NginxDeploymentScalingProperties + :keyword user_profile: + :paramtype user_profile: ~azure.mgmt.nginx.models.NginxDeploymentUserProfile """ super().__init__(**kwargs) self.enable_diagnostics_support = enable_diagnostics_support self.logging = logging + self.scaling_properties = scaling_properties + self.user_profile = user_profile + + +class NginxDeploymentUserProfile(_serialization.Model): + """NginxDeploymentUserProfile. + + :ivar preferred_email: The preferred support contact email address of the user used for sending + alerts and notification. Can be an empty string or a valid email address. + :vartype preferred_email: str + """ + + _validation = { + "preferred_email": {"pattern": r"^$|^[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9-]+\.)+[A-Za-z]{2,}$"}, + } + + _attribute_map = { + "preferred_email": {"key": "preferredEmail", "type": "str"}, + } + + def __init__(self, *, preferred_email: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword preferred_email: The preferred support contact email address of the user used for + sending alerts and notification. Can be an empty string or a valid email address. + :paramtype preferred_email: str + """ + super().__init__(**kwargs) + self.preferred_email = preferred_email class NginxFrontendIPConfiguration(_serialization.Model): diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_certificates_operations.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_certificates_operations.py index e042ce0c8139..d522e1e1489c 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_certificates_operations.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_certificates_operations.py @@ -6,7 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -30,12 +30,8 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +45,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -66,7 +62,7 @@ def build_get_request( "certificateName": _SERIALIZER.url("certificate_name", certificate_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -83,7 +79,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -101,7 +97,7 @@ def build_create_or_update_request( "certificateName": _SERIALIZER.url("certificate_name", certificate_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -120,7 +116,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -137,7 +133,7 @@ def build_delete_request( "certificateName": _SERIALIZER.url("certificate_name", certificate_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -154,7 +150,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -170,7 +166,7 @@ def build_list_request( "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -204,14 +200,14 @@ def __init__(self, *args, **kwargs): def get( self, resource_group_name: str, deployment_name: str, certificate_name: str, **kwargs: Any ) -> _models.NginxCertificate: - """Get a certificate of given Nginx deployment. + """Get a certificate of given NGINX deployment. - Get a certificate of given Nginx deployment. + Get a certificate of given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param certificate_name: The name of certificate. Required. :type certificate_name: str @@ -231,9 +227,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxCertificate] = kwargs.pop("cls", None) request = build_get_request( @@ -293,16 +287,14 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxCertificate] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(body, (IO, bytes)): + if isinstance(body, (IOBase, bytes)): _content = body else: if body is not None: @@ -366,14 +358,14 @@ def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.NginxCertificate]: - """Create or update the Nginx certificates for given Nginx deployment. + """Create or update the NGINX certificates for given NGINX deployment. - Create or update the Nginx certificates for given Nginx deployment. + Create or update the NGINX certificates for given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param certificate_name: The name of certificate. Required. :type certificate_name: str @@ -407,14 +399,14 @@ def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.NginxCertificate]: - """Create or update the Nginx certificates for given Nginx deployment. + """Create or update the NGINX certificates for given NGINX deployment. - Create or update the Nginx certificates for given Nginx deployment. + Create or update the NGINX certificates for given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param certificate_name: The name of certificate. Required. :type certificate_name: str @@ -446,14 +438,14 @@ def begin_create_or_update( body: Optional[Union[_models.NginxCertificate, IO]] = None, **kwargs: Any ) -> LROPoller[_models.NginxCertificate]: - """Create or update the Nginx certificates for given Nginx deployment. + """Create or update the NGINX certificates for given NGINX deployment. - Create or update the Nginx certificates for given Nginx deployment. + Create or update the NGINX certificates for given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param certificate_name: The name of certificate. Required. :type certificate_name: str @@ -479,9 +471,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxCertificate] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -543,9 +533,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -586,14 +574,14 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements def begin_delete( self, resource_group_name: str, deployment_name: str, certificate_name: str, **kwargs: Any ) -> LROPoller[None]: - """Deletes a certificate from the nginx deployment. + """Deletes a certificate from the NGINX deployment. - Deletes a certificate from the nginx deployment. + Deletes a certificate from the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param certificate_name: The name of certificate. Required. :type certificate_name: str @@ -612,9 +600,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -659,14 +645,14 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def list( self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> Iterable["_models.NginxCertificate"]: - """List all certificates of given Nginx deployment. + """List all certificates of given NGINX deployment. - List all certificates of given Nginx deployment. + List all certificates of given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NginxCertificate or the result of cls(response) @@ -676,9 +662,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxCertificateListResponse] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_configurations_operations.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_configurations_operations.py index d58f3a0169e6..63b884548732 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_configurations_operations.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_configurations_operations.py @@ -6,7 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -30,12 +30,8 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +45,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -65,7 +61,7 @@ def build_list_request( "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -82,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -99,7 +95,7 @@ def build_get_request( "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -116,7 +112,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -134,7 +130,7 @@ def build_create_or_update_request( "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -153,7 +149,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -170,7 +166,7 @@ def build_delete_request( "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -204,14 +200,14 @@ def __init__(self, *args, **kwargs): def list( self, resource_group_name: str, deployment_name: str, **kwargs: Any ) -> Iterable["_models.NginxConfiguration"]: - """List the Nginx configuration of given Nginx deployment. + """List the NGINX configuration of given NGINX deployment. - List the Nginx configuration of given Nginx deployment. + List the NGINX configuration of given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NginxConfiguration or the result of cls(response) @@ -221,9 +217,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxConfigurationListResponse] = kwargs.pop("cls", None) error_map = { @@ -302,17 +296,17 @@ def get_next(next_link=None): def get( self, resource_group_name: str, deployment_name: str, configuration_name: str, **kwargs: Any ) -> _models.NginxConfiguration: - """Get the Nginx configuration of given Nginx deployment. + """Get the NGINX configuration of given NGINX deployment. - Get the Nginx configuration of given Nginx deployment. + Get the NGINX configuration of given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param configuration_name: The name of configuration, only 'default' is supported value due to - the singleton of Nginx conf. Required. + the singleton of NGINX conf. Required. :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NginxConfiguration or the result of cls(response) @@ -330,9 +324,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxConfiguration] = kwargs.pop("cls", None) request = build_get_request( @@ -392,16 +384,14 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxConfiguration] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(body, (IO, bytes)): + if isinstance(body, (IOBase, bytes)): _content = body else: if body is not None: @@ -465,19 +455,19 @@ def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.NginxConfiguration]: - """Create or update the Nginx configuration for given Nginx deployment. + """Create or update the NGINX configuration for given NGINX deployment. - Create or update the Nginx configuration for given Nginx deployment. + Create or update the NGINX configuration for given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param configuration_name: The name of configuration, only 'default' is supported value due to - the singleton of Nginx conf. Required. + the singleton of NGINX conf. Required. :type configuration_name: str - :param body: The Nginx configuration. Default value is None. + :param body: The NGINX configuration. Default value is None. :type body: ~azure.mgmt.nginx.models.NginxConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". @@ -507,19 +497,19 @@ def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.NginxConfiguration]: - """Create or update the Nginx configuration for given Nginx deployment. + """Create or update the NGINX configuration for given NGINX deployment. - Create or update the Nginx configuration for given Nginx deployment. + Create or update the NGINX configuration for given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param configuration_name: The name of configuration, only 'default' is supported value due to - the singleton of Nginx conf. Required. + the singleton of NGINX conf. Required. :type configuration_name: str - :param body: The Nginx configuration. Default value is None. + :param body: The NGINX configuration. Default value is None. :type body: IO :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". @@ -547,19 +537,19 @@ def begin_create_or_update( body: Optional[Union[_models.NginxConfiguration, IO]] = None, **kwargs: Any ) -> LROPoller[_models.NginxConfiguration]: - """Create or update the Nginx configuration for given Nginx deployment. + """Create or update the NGINX configuration for given NGINX deployment. - Create or update the Nginx configuration for given Nginx deployment. + Create or update the NGINX configuration for given NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param configuration_name: The name of configuration, only 'default' is supported value due to - the singleton of Nginx conf. Required. + the singleton of NGINX conf. Required. :type configuration_name: str - :param body: The Nginx configuration. Is either a NginxConfiguration type or a IO type. Default + :param body: The NGINX configuration. Is either a NginxConfiguration type or a IO type. Default value is None. :type body: ~azure.mgmt.nginx.models.NginxConfiguration or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -581,9 +571,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxConfiguration] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -645,9 +633,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -688,17 +674,17 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements def begin_delete( self, resource_group_name: str, deployment_name: str, configuration_name: str, **kwargs: Any ) -> LROPoller[None]: - """Reset the Nginx configuration of given Nginx deployment to default. + """Reset the NGINX configuration of given NGINX deployment to default. - Reset the Nginx configuration of given Nginx deployment to default. + Reset the NGINX configuration of given NGINX deployment to default. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param configuration_name: The name of configuration, only 'default' is supported value due to - the singleton of Nginx conf. Required. + the singleton of NGINX conf. Required. :type configuration_name: str :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. @@ -715,9 +701,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_deployments_operations.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_deployments_operations.py index 4e9e8864d0e5..22bdd606d934 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_deployments_operations.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_deployments_operations.py @@ -6,7 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -30,12 +30,8 @@ from .. import models as _models from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +45,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -65,7 +61,7 @@ def build_get_request( "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -82,7 +78,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -99,7 +95,7 @@ def build_create_or_update_request( "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -118,7 +114,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -135,7 +131,7 @@ def build_update_request( "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -154,7 +150,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -170,7 +166,7 @@ def build_delete_request( "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -185,7 +181,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -194,7 +190,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -209,7 +205,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -224,7 +220,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -256,14 +252,14 @@ def __init__(self, *args, **kwargs): @distributed_trace def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _models.NginxDeployment: - """Get the Nginx deployment. + """Get the NGINX deployment. - Get the Nginx deployment. + Get the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NginxDeployment or the result of cls(response) @@ -281,9 +277,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxDeployment] = kwargs.pop("cls", None) request = build_get_request( @@ -341,16 +335,14 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxDeployment] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(body, (IO, bytes)): + if isinstance(body, (IOBase, bytes)): _content = body else: if body is not None: @@ -412,14 +404,14 @@ def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.NginxDeployment]: - """Create or update the Nginx deployment. + """Create or update the NGINX deployment. - Create or update the Nginx deployment. + Create or update the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param body: Default value is None. :type body: ~azure.mgmt.nginx.models.NginxDeployment @@ -450,14 +442,14 @@ def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.NginxDeployment]: - """Create or update the Nginx deployment. + """Create or update the NGINX deployment. - Create or update the Nginx deployment. + Create or update the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param body: Default value is None. :type body: IO @@ -486,14 +478,14 @@ def begin_create_or_update( body: Optional[Union[_models.NginxDeployment, IO]] = None, **kwargs: Any ) -> LROPoller[_models.NginxDeployment]: - """Create or update the Nginx deployment. + """Create or update the NGINX deployment. - Create or update the Nginx deployment. + Create or update the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param body: Is either a NginxDeployment type or a IO type. Default value is None. :type body: ~azure.mgmt.nginx.models.NginxDeployment or IO @@ -516,9 +508,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxDeployment] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -583,16 +573,14 @@ def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxDeployment] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(body, (IO, bytes)): + if isinstance(body, (IOBase, bytes)): _content = body else: if body is not None: @@ -654,14 +642,14 @@ def begin_update( content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.NginxDeployment]: - """Update the Nginx deployment. + """Update the NGINX deployment. - Update the Nginx deployment. + Update the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param body: Default value is None. :type body: ~azure.mgmt.nginx.models.NginxDeploymentUpdateParameters @@ -692,14 +680,14 @@ def begin_update( content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.NginxDeployment]: - """Update the Nginx deployment. + """Update the NGINX deployment. - Update the Nginx deployment. + Update the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param body: Default value is None. :type body: IO @@ -728,14 +716,14 @@ def begin_update( body: Optional[Union[_models.NginxDeploymentUpdateParameters, IO]] = None, **kwargs: Any ) -> LROPoller[_models.NginxDeployment]: - """Update the Nginx deployment. + """Update the NGINX deployment. - Update the Nginx deployment. + Update the NGINX deployment. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :param body: Is either a NginxDeploymentUpdateParameters type or a IO type. Default value is None. @@ -759,9 +747,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NginxDeployment] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -820,9 +806,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -860,14 +844,14 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements @distributed_trace def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> LROPoller[None]: - """Delete the Nginx deployment resource. + """Delete the NGINX deployment resource. - Delete the Nginx deployment resource. + Delete the NGINX deployment resource. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param deployment_name: The name of targeted Nginx deployment. Required. + :param deployment_name: The name of targeted NGINX deployment. Required. :type deployment_name: str :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. @@ -884,9 +868,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -928,9 +910,9 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @distributed_trace def list(self, **kwargs: Any) -> Iterable["_models.NginxDeployment"]: - """List the Nginx deployments resources. + """List the NGINX deployments resources. - List the Nginx deployments resources. + List the NGINX deployments resources. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NginxDeployment or the result of cls(response) @@ -940,9 +922,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.NginxDeployment"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxDeploymentListResponse] = kwargs.pop("cls", None) error_map = { @@ -1015,9 +995,9 @@ def get_next(next_link=None): @distributed_trace def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.NginxDeployment"]: - """List all Nginx deployments under the specified resource group. + """List all NGINX deployments under the specified resource group. - List all Nginx deployments under the specified resource group. + List all NGINX deployments under the specified resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -1030,9 +1010,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NginxDeploymentListResponse] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_operations.py b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_operations.py index 3560f64ca75a..f671fb0ec389 100644 --- a/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_operations.py +++ b/sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -81,9 +76,9 @@ def __init__(self, *args, **kwargs): @distributed_trace def list(self, **kwargs: Any) -> Iterable["_models.OperationResult"]: - """List all operations provided by Nginx.NginxPlus for the 2022-08-01 api version. + """List all operations provided by Nginx.NginxPlus for the 2023-04-01 api version. - List all operations provided by Nginx.NginxPlus for the 2022-08-01 api version. + List all operations provided by Nginx.NginxPlus for the 2023-04-01 api version. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationResult or the result of cls(response) @@ -93,9 +88,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.OperationResult"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_create_or_update.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_create_or_update.py index 3caf9481c74f..cc6efdd485a4 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_create_or_update.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_create_or_update.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Certificates_CreateOrUpdate.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Certificates_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_delete.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_delete.py index 8e540c214a2d..14a0069beb54 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_delete.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_delete.py @@ -29,14 +29,13 @@ def main(): subscription_id="00000000-0000-0000-0000-000000000000", ) - response = client.certificates.begin_delete( + client.certificates.begin_delete( resource_group_name="myResourceGroup", deployment_name="myDeployment", certificate_name="default", ).result() - print(response) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Certificates_Delete.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Certificates_Delete.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_get.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_get.py index 2fc3f482bd22..b79e99312552 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_get.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Certificates_Get.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Certificates_Get.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_list.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_list.py index c14200b92af3..f334853ba72a 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_list.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/certificates_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Certificates_List.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Certificates_List.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_create_or_update.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_create_or_update.py index 985c32b5d8ab..0a048c73c91a 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_create_or_update.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_create_or_update.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Configurations_CreateOrUpdate.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Configurations_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_delete.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_delete.py index c29733b837a1..e957ddd3ba40 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_delete.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_delete.py @@ -29,14 +29,13 @@ def main(): subscription_id="00000000-0000-0000-0000-000000000000", ) - response = client.configurations.begin_delete( + client.configurations.begin_delete( resource_group_name="myResourceGroup", deployment_name="myDeployment", configuration_name="default", ).result() - print(response) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Configurations_Delete.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Configurations_Delete.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_get.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_get.py index da1c267fe2b1..308f7ae90bf3 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_get.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Configurations_Get.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Configurations_Get.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_list.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_list.py index f11c0ae925c4..f941ce10b673 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_list.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/configurations_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Configurations_List.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Configurations_List.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_create.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_create.py index d25b14dcba52..bbe3597550e8 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_create.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_create.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Deployments_Create.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Deployments_Create.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_delete.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_delete.py index 68cb2b88901f..f805dd9a1438 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_delete.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_delete.py @@ -29,13 +29,12 @@ def main(): subscription_id="00000000-0000-0000-0000-000000000000", ) - response = client.deployments.begin_delete( + client.deployments.begin_delete( resource_group_name="myResourceGroup", deployment_name="myDeployment", ).result() - print(response) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Deployments_Delete.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Deployments_Delete.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_get.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_get.py index ef929e3d380f..9c33bbbcdaa9 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_get.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_get.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Deployments_Get.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Deployments_Get.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_list.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_list.py index 1f5d6b6b2a09..1b173a484d75 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_list.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_list.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Deployments_List.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Deployments_List.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_list_by_resource_group.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_list_by_resource_group.py index 5dee38700920..14ca1fb3b903 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_list_by_resource_group.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_list_by_resource_group.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Deployments_ListByResourceGroup.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Deployments_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_update.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_update.py index 15c60d1fe74e..b99ff331f328 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_update.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/deployments_update.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Deployments_Update.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Deployments_Update.json if __name__ == "__main__": main() diff --git a/sdk/nginx/azure-mgmt-nginx/generated_samples/operations_list.py b/sdk/nginx/azure-mgmt-nginx/generated_samples/operations_list.py index 23d68363c097..b7a8f136259a 100644 --- a/sdk/nginx/azure-mgmt-nginx/generated_samples/operations_list.py +++ b/sdk/nginx/azure-mgmt-nginx/generated_samples/operations_list.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2022-08-01/examples/Operations_List.json +# x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/stable/2023-04-01/examples/Operations_List.json if __name__ == "__main__": main()