Skip to content

Commit fcf7839

Browse files
author
SDKAuto
committed
CodeGen from PR 33348 in Azure/azure-rest-api-specs
Merge e8a5688659580426014c61677819ac0bc88d0793 into bc79b816272c7e12d79e8bc63d689327fc37d11f
1 parent 7656cf2 commit fcf7839

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+761
-239
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "16eba0e39fedb21b9a7a3df5bec5524c78c72ba3",
2+
"commit": "a2bd6a405683c01ba4bf92b47380d20e2306d991",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/servicenetworking/ServiceNetworking.Management",
5-
"@azure-tools/typespec-python": "0.38.1"
5+
"@azure-tools/typespec-python": "0.40.0"
66
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"CrossLanguagePackageId": "Microsoft.ServiceNetworking",
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.servicenetworking.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
5+
"azure.mgmt.servicenetworking.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource",
6+
"azure.mgmt.servicenetworking.models.Association": "Microsoft.ServiceNetworking.Association",
7+
"azure.mgmt.servicenetworking.models.AssociationProperties": "Microsoft.ServiceNetworking.AssociationProperties",
8+
"azure.mgmt.servicenetworking.models.AssociationSubnet": "Microsoft.ServiceNetworking.AssociationSubnet",
9+
"azure.mgmt.servicenetworking.models.AssociationSubnetUpdate": "Microsoft.ServiceNetworking.AssociationSubnetUpdate",
10+
"azure.mgmt.servicenetworking.models.AssociationUpdate": "Microsoft.ServiceNetworking.AssociationUpdate",
11+
"azure.mgmt.servicenetworking.models.AssociationUpdateProperties": "Microsoft.ServiceNetworking.AssociationUpdateProperties",
12+
"azure.mgmt.servicenetworking.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
13+
"azure.mgmt.servicenetworking.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail",
14+
"azure.mgmt.servicenetworking.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse",
15+
"azure.mgmt.servicenetworking.models.Frontend": "Microsoft.ServiceNetworking.Frontend",
16+
"azure.mgmt.servicenetworking.models.FrontendProperties": "Microsoft.ServiceNetworking.FrontendProperties",
17+
"azure.mgmt.servicenetworking.models.FrontendUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
18+
"azure.mgmt.servicenetworking.models.FrontendUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
19+
"azure.mgmt.servicenetworking.models.IpAccessRule": "Microsoft.ServiceNetworking.IpAccessRule",
20+
"azure.mgmt.servicenetworking.models.IpAccessRulesPolicy": "Microsoft.ServiceNetworking.IpAccessRulesPolicy",
21+
"azure.mgmt.servicenetworking.models.IpAccessRulesSecurityPolicy": "Microsoft.ServiceNetworking.IpAccessRulesSecurityPolicy",
22+
"azure.mgmt.servicenetworking.models.Operation": "Azure.ResourceManager.CommonTypes.Operation",
23+
"azure.mgmt.servicenetworking.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay",
24+
"azure.mgmt.servicenetworking.models.ResourceId": "Microsoft.ServiceNetworking.ResourceId",
25+
"azure.mgmt.servicenetworking.models.SecurityPolicy": "Microsoft.ServiceNetworking.SecurityPolicy",
26+
"azure.mgmt.servicenetworking.models.SecurityPolicyConfigurations": "Microsoft.ServiceNetworking.SecurityPolicyConfigurations",
27+
"azure.mgmt.servicenetworking.models.SecurityPolicyProperties": "Microsoft.ServiceNetworking.SecurityPolicyProperties",
28+
"azure.mgmt.servicenetworking.models.SecurityPolicyUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
29+
"azure.mgmt.servicenetworking.models.SecurityPolicyUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
30+
"azure.mgmt.servicenetworking.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
31+
"azure.mgmt.servicenetworking.models.TrafficController": "Microsoft.ServiceNetworking.TrafficController",
32+
"azure.mgmt.servicenetworking.models.TrafficControllerProperties": "Microsoft.ServiceNetworking.TrafficControllerProperties",
33+
"azure.mgmt.servicenetworking.models.TrafficControllerUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
34+
"azure.mgmt.servicenetworking.models.TrafficControllerUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
35+
"azure.mgmt.servicenetworking.models.WafPolicy": "Microsoft.ServiceNetworking.WafPolicy",
36+
"azure.mgmt.servicenetworking.models.WafSecurityPolicy": "Microsoft.ServiceNetworking.WafSecurityPolicy",
37+
"azure.mgmt.servicenetworking.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType",
38+
"azure.mgmt.servicenetworking.models.AssociationType": "Microsoft.ServiceNetworking.AssociationType",
39+
"azure.mgmt.servicenetworking.models.ProvisioningState": "Microsoft.ServiceNetworking.ProvisioningState",
40+
"azure.mgmt.servicenetworking.models.PolicyType": "Microsoft.ServiceNetworking.PolicyType",
41+
"azure.mgmt.servicenetworking.models.IpAccessRuleAction": "Microsoft.ServiceNetworking.IpAccessRuleAction",
42+
"azure.mgmt.servicenetworking.models.Origin": "Azure.ResourceManager.CommonTypes.Origin",
43+
"azure.mgmt.servicenetworking.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType",
44+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.associations_interface.get": "Microsoft.ServiceNetworking.AssociationsInterface.get",
45+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.associations_interface.begin_create_or_update": "Microsoft.ServiceNetworking.AssociationsInterface.createOrUpdate",
46+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.associations_interface.update": "Microsoft.ServiceNetworking.AssociationsInterface.update",
47+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.associations_interface.begin_delete": "Microsoft.ServiceNetworking.AssociationsInterface.delete",
48+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.associations_interface.list_by_traffic_controller": "Microsoft.ServiceNetworking.AssociationsInterface.listByTrafficController",
49+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.frontends_interface.get": "Microsoft.ServiceNetworking.FrontendsInterface.get",
50+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.frontends_interface.begin_create_or_update": "Microsoft.ServiceNetworking.FrontendsInterface.createOrUpdate",
51+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.frontends_interface.update": "Microsoft.ServiceNetworking.FrontendsInterface.update",
52+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.frontends_interface.begin_delete": "Microsoft.ServiceNetworking.FrontendsInterface.delete",
53+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.frontends_interface.list_by_traffic_controller": "Microsoft.ServiceNetworking.FrontendsInterface.listByTrafficController",
54+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.security_policies_interface.get": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.get",
55+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.security_policies_interface.begin_create_or_update": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.createOrUpdate",
56+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.security_policies_interface.update": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.update",
57+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.security_policies_interface.begin_delete": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.delete",
58+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.security_policies_interface.list_by_traffic_controller": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.listByTrafficController",
59+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.traffic_controller_interface.get": "Microsoft.ServiceNetworking.TrafficControllerInterface.get",
60+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.traffic_controller_interface.begin_create_or_update": "Microsoft.ServiceNetworking.TrafficControllerInterface.createOrUpdate",
61+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.traffic_controller_interface.update": "Microsoft.ServiceNetworking.TrafficControllerInterface.update",
62+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.traffic_controller_interface.begin_delete": "Microsoft.ServiceNetworking.TrafficControllerInterface.delete",
63+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.traffic_controller_interface.list_by_resource_group": "Microsoft.ServiceNetworking.TrafficControllerInterface.listByResourceGroup",
64+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.traffic_controller_interface.list_by_subscription": "Microsoft.ServiceNetworking.TrafficControllerInterface.listBySubscription",
65+
"azure.mgmt.servicenetworking.ServiceNetworkingMgmtClient.operations.list": "Azure.ResourceManager.Operations.list"
66+
}
67+
}

sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ class ServiceNetworkingMgmtClient:
5252
:type subscription_id: str
5353
:param base_url: Service host. Default value is "https://management.azure.com".
5454
:type base_url: str
55-
:keyword api_version: The API version to use for this operation. Default value is "2025-01-01".
56-
Note that overriding this default value may result in unsupported behavior.
55+
:keyword api_version: The API version to use for this operation. Default value is
56+
"2025-03-01-preview". Note that overriding this default value may result in unsupported
57+
behavior.
5758
:paramtype api_version: str
5859
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
5960
Retry-After header is present.

sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/_configuration.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ class ServiceNetworkingMgmtClientConfiguration: # pylint: disable=too-many-inst
2929
:type subscription_id: str
3030
:param base_url: Service host. Default value is "https://management.azure.com".
3131
:type base_url: str
32-
:keyword api_version: The API version to use for this operation. Default value is "2025-01-01".
33-
Note that overriding this default value may result in unsupported behavior.
32+
:keyword api_version: The API version to use for this operation. Default value is
33+
"2025-03-01-preview". Note that overriding this default value may result in unsupported
34+
behavior.
3435
:paramtype api_version: str
3536
"""
3637

@@ -41,7 +42,7 @@ def __init__(
4142
base_url: str = "https://management.azure.com",
4243
**kwargs: Any
4344
) -> None:
44-
api_version: str = kwargs.pop("api_version", "2025-01-01")
45+
api_version: str = kwargs.pop("api_version", "2025-03-01-preview")
4546

4647
if credential is None:
4748
raise ValueError("Parameter 'credential' must not be None.")

sdk/servicenetworking/azure-mgmt-servicenetworking/azure/mgmt/servicenetworking/_model_base.py

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,15 +373,34 @@ def __ne__(self, other: typing.Any) -> bool:
373373
return not self.__eq__(other)
374374

375375
def keys(self) -> typing.KeysView[str]:
376+
"""
377+
:returns: a set-like object providing a view on D's keys
378+
:rtype: ~typing.KeysView
379+
"""
376380
return self._data.keys()
377381

378382
def values(self) -> typing.ValuesView[typing.Any]:
383+
"""
384+
:returns: an object providing a view on D's values
385+
:rtype: ~typing.ValuesView
386+
"""
379387
return self._data.values()
380388

381389
def items(self) -> typing.ItemsView[str, typing.Any]:
390+
"""
391+
:returns: set-like object providing a view on D's items
392+
:rtype: ~typing.ItemsView
393+
"""
382394
return self._data.items()
383395

384396
def get(self, key: str, default: typing.Any = None) -> typing.Any:
397+
"""
398+
Get the value for key if key is in the dictionary, else default.
399+
:param str key: The key to look up.
400+
:param any default: The value to return if key is not in the dictionary. Defaults to None
401+
:returns: D[k] if k in D, else d.
402+
:rtype: any
403+
"""
385404
try:
386405
return self[key]
387406
except KeyError:
@@ -397,17 +416,38 @@ def pop(self, key: str, default: _T) -> _T: ...
397416
def pop(self, key: str, default: typing.Any) -> typing.Any: ...
398417

399418
def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
419+
"""
420+
Removes specified key and return the corresponding value.
421+
:param str key: The key to pop.
422+
:param any default: The value to return if key is not in the dictionary
423+
:returns: The value corresponding to the key.
424+
:rtype: any
425+
:raises KeyError: If key is not found and default is not given.
426+
"""
400427
if default is _UNSET:
401428
return self._data.pop(key)
402429
return self._data.pop(key, default)
403430

404431
def popitem(self) -> typing.Tuple[str, typing.Any]:
432+
"""
433+
Removes and returns some (key, value) pair
434+
:returns: The (key, value) pair.
435+
:rtype: tuple
436+
:raises KeyError: if D is empty.
437+
"""
405438
return self._data.popitem()
406439

407440
def clear(self) -> None:
441+
"""
442+
Remove all items from D.
443+
"""
408444
self._data.clear()
409445

410446
def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
447+
"""
448+
Updates D from mapping/iterable E and F.
449+
:param any args: Either a mapping object or an iterable of key-value pairs.
450+
"""
411451
self._data.update(*args, **kwargs)
412452

413453
@typing.overload
@@ -417,6 +457,13 @@ def setdefault(self, key: str, default: None = None) -> None: ...
417457
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ...
418458

419459
def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
460+
"""
461+
Same as calling D.get(k, d), and setting D[k]=d if k not found
462+
:param str key: The key to look up.
463+
:param any default: The value to set if key is not in the dictionary
464+
:returns: D[k] if k in D, else d.
465+
:rtype: any
466+
"""
420467
if default is _UNSET:
421468
return self._data.setdefault(key)
422469
return self._data.setdefault(key, default)
@@ -910,6 +957,19 @@ def _failsafe_deserialize(
910957
return None
911958

912959

960+
def _failsafe_deserialize_xml(
961+
deserializer: typing.Any,
962+
value: typing.Any,
963+
) -> typing.Any:
964+
try:
965+
return _deserialize_xml(deserializer, value)
966+
except DeserializationError:
967+
_LOGGER.warning(
968+
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
969+
)
970+
return None
971+
972+
913973
class _RestField:
914974
def __init__(
915975
self,

0 commit comments

Comments
 (0)