From 08f9089eb8800b05ac613c1d828c6f95c631561e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 31 Mar 2025 03:50:11 +0000 Subject: [PATCH] CodeGen from PR 33286 in Azure/azure-rest-api-specs Merge c0a805808b29552b063b18f4b6f470922e81d2d3 into dabb59f246f54cd4c3a2ce42b03c220e6edab701 --- sdk/network/azure-mgmt-network/README.md | 2 +- sdk/network/azure-mgmt-network/_meta.json | 6 ++--- .../azure/mgmt/network/_serialization.py | 16 ++++++++----- .../azure/mgmt/network/_version.py | 2 +- .../azure/mgmt/network/models/_models_py3.py | 24 +++++++++---------- 5 files changed, 26 insertions(+), 24 deletions(-) diff --git a/sdk/network/azure-mgmt-network/README.md b/sdk/network/azure-mgmt-network/README.md index fac00af2da20..97b01c96ac97 100644 --- a/sdk/network/azure-mgmt-network/README.md +++ b/sdk/network/azure-mgmt-network/README.md @@ -24,7 +24,7 @@ pip install azure-identity ### Authentication -By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables. +By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/network/azure-mgmt-network/_meta.json b/sdk/network/azure-mgmt-network/_meta.json index 5aa5cd2881b8..5370094caf2a 100644 --- a/sdk/network/azure-mgmt-network/_meta.json +++ b/sdk/network/azure-mgmt-network/_meta.json @@ -1,11 +1,11 @@ { - "commit": "065bac6153f6a83de668f55803270bc6f31f5bc3", + "commit": "62d63674843fc3b1dc878cd1c850d890abd56579", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.10.2", "use": [ - "@autorest/python@6.19.0", + "@autorest/python@6.27.4", "@autorest/modelerfour@4.27.0" ], - "autorest_command": "autorest specification/network/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "autorest_command": "autorest specification/network/resource-manager/readme.md --generate-sample=True --generate-test=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.27.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", "readme": "specification/network/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/_serialization.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/_serialization.py index ce17d1798ce7..b24ab2885450 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/_serialization.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/_serialization.py @@ -310,7 +310,7 @@ def _create_xml_node(tag, prefix=None, ns=None): return ET.Element(tag) -class Model(object): +class Model: """Mixin for all client request body/response body models to support serialization and deserialization. """ @@ -563,7 +563,7 @@ def _decode_attribute_map_key(key): return key.replace("\\.", ".") -class Serializer(object): # pylint: disable=too-many-public-methods +class Serializer: # pylint: disable=too-many-public-methods """Request object model serializer.""" basic_types = {str: "str", int: "int", bool: "bool", float: "float"} @@ -1441,7 +1441,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument return children[0] -class Deserializer(object): +class Deserializer: """Response object model deserializer. :param dict classes: Class type dictionary for deserializing complex types. @@ -1683,17 +1683,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None): subtype = getattr(response, "_subtype_map", {}) try: readonly = [ - k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") ] const = [ - k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") ] kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} response_obj = response(**kwargs) for attr in readonly: setattr(response_obj, attr, attrs.get(attr)) if additional_properties: - response_obj.additional_properties = additional_properties + response_obj.additional_properties = additional_properties # type: ignore return response_obj except TypeError as err: msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/_version.py index e341f9689021..261dd57e8f08 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "28.1.0" +VERSION = "28.0.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_models_py3.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_models_py3.py index 43b6993c0d7a..d8f499f6d4e8 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_models_py3.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/models/_models_py3.py @@ -3748,7 +3748,7 @@ class ApplicationGatewayOnDemandProbe(_serialization.Model): :ivar host: Host name to send the probe to. :vartype host: str :ivar path: Relative path of probe. Valid path starts from '/'. Probe is sent to - :code:``://:code:``::code:``:code:``. + :code:``://\\ :code:``:\\ :code:``\\ :code:``. :vartype path: str :ivar timeout: The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. @@ -3797,7 +3797,7 @@ def __init__( :keyword host: Host name to send the probe to. :paramtype host: str :keyword path: Relative path of probe. Valid path starts from '/'. Probe is sent to - :code:``://:code:``::code:``:code:``. + :code:``://\\ :code:``:\\ :code:``\\ :code:``. :paramtype path: str :keyword timeout: The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. @@ -4301,7 +4301,7 @@ class ApplicationGatewayProbe(SubResource): :ivar host: Host name to send the probe to. :vartype host: str :ivar path: Relative path of probe. Valid path starts from '/'. Probe is sent to - :code:``://:code:``::code:``:code:``. + :code:``://\\ :code:``:\\ :code:``\\ :code:``. :vartype path: str :ivar interval: The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. @@ -4391,7 +4391,7 @@ def __init__( :keyword host: Host name to send the probe to. :paramtype host: str :keyword path: Relative path of probe. Valid path starts from '/'. Probe is sent to - :code:``://:code:``::code:``:code:``. + :code:``://\\ :code:``:\\ :code:``\\ :code:``. :paramtype path: str :keyword interval: The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. @@ -24702,7 +24702,7 @@ class NetworkInterfaceIPConfiguration(SubResource): :ivar load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules. :vartype load_balancer_inbound_nat_rules: list[~azure.mgmt.network.models.InboundNatRule] :ivar private_ip_address: Private IP address of the IP configuration. It can be a single IP - address or a CIDR block in the format :code:`
`/:code:``. + address or a CIDR block in the format :code:`
`/\\ :code:``. :vartype private_ip_address: str :ivar private_ip_address_prefix_length: The private IP address prefix length. If specified and the allocation method is dynamic, the service will allocate a CIDR block instead of a single IP @@ -24822,7 +24822,7 @@ def __init__( :keyword load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules. :paramtype load_balancer_inbound_nat_rules: list[~azure.mgmt.network.models.InboundNatRule] :keyword private_ip_address: Private IP address of the IP configuration. It can be a single IP - address or a CIDR block in the format :code:`
`/:code:``. + address or a CIDR block in the format :code:`
`/\\ :code:``. :paramtype private_ip_address: str :keyword private_ip_address_prefix_length: The private IP address prefix length. If specified and the allocation method is dynamic, the service will allocate a CIDR block instead of a @@ -35043,8 +35043,6 @@ class StaticRoutesConfig(_serialization.Model): """Configuration for static routes on this HubVnetConnectionConfiguration for static routes on this HubVnetConnection. - Variables are only populated by the server, and will be ignored when sending a request. - :ivar propagate_static_routes: Boolean indicating whether static routes on this connection are automatically propagate to route tables which this connection propagates to. :vartype propagate_static_routes: bool @@ -35054,10 +35052,6 @@ class StaticRoutesConfig(_serialization.Model): ~azure.mgmt.network.models.VnetLocalRouteOverrideCriteria """ - _validation = { - "propagate_static_routes": {"readonly": True}, - } - _attribute_map = { "propagate_static_routes": {"key": "propagateStaticRoutes", "type": "bool"}, "vnet_local_route_override_criteria": {"key": "vnetLocalRouteOverrideCriteria", "type": "str"}, @@ -35066,17 +35060,21 @@ class StaticRoutesConfig(_serialization.Model): def __init__( self, *, + propagate_static_routes: Optional[bool] = None, vnet_local_route_override_criteria: Optional[Union[str, "_models.VnetLocalRouteOverrideCriteria"]] = None, **kwargs: Any ) -> None: """ + :keyword propagate_static_routes: Boolean indicating whether static routes on this connection + are automatically propagate to route tables which this connection propagates to. + :paramtype propagate_static_routes: bool :keyword vnet_local_route_override_criteria: Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke. Known values are: "Contains" and "Equal". :paramtype vnet_local_route_override_criteria: str or ~azure.mgmt.network.models.VnetLocalRouteOverrideCriteria """ super().__init__(**kwargs) - self.propagate_static_routes = None + self.propagate_static_routes = propagate_static_routes self.vnet_local_route_override_criteria = vnet_local_route_override_criteria