Skip to content

Commit 5b148ee

Browse files
author
SDKAuto
committed
CodeGen from PR 24387 in Azure/azure-rest-api-specs
Merge 2a01bf8eb4f7487a33d81be2bc575e50d5f321b8 into de06c42bd985fb66b6a49c907aaf5baee693bc7b
1 parent d08bf30 commit 5b148ee

File tree

175 files changed

+8504
-4317
lines changed

Some content is hidden

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

175 files changed

+8504
-4317
lines changed

sdk/cdn/azure-mgmt-cdn/_meta.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "e1da7cbab8d4f554484dedb676ba7bdbdf6cdf78",
2+
"commit": "bc83cefee5b6eb4073eecb22cae8b0598940188b",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.2",
4+
"autorest": "3.9.7",
55
"use": [
6-
"@autorest/python@6.1.11",
7-
"@autorest/modelerfour@4.24.3"
6+
"@autorest/python@6.7.1",
7+
"@autorest/modelerfour@4.26.2"
88
],
9-
"autorest_command": "autorest specification/cdn/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --tag=package-2021-06 --use=@autorest/python@6.1.11 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/cdn/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",
1010
"readme": "specification/cdn/resource-manager/readme.md"
1111
}

sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313

1414
try:
1515
from ._patch import __all__ as _patch_all
16-
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
16+
from ._patch import * # pylint: disable=unused-wildcard-import
1717
except ImportError:
1818
_patch_all = []
1919
from ._patch import patch_sdk as _patch_sdk
2020

21-
__all__ = ["CdnManagementClient"]
21+
__all__ = [
22+
"CdnManagementClient",
23+
]
2224
__all__.extend([p for p in _patch_all if p not in __all__])
2325

2426
_patch_sdk()

sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_cdn_management_client.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from azure.core.rest import HttpRequest, HttpResponse
1313
from azure.mgmt.core import ARMPipelineClient
1414

15-
from . import models
15+
from . import models as _models
1616
from ._configuration import CdnManagementClientConfiguration
1717
from ._serialization import Deserializer, Serializer
1818
from .operations import (
@@ -38,7 +38,6 @@
3838
RulesOperations,
3939
SecretsOperations,
4040
SecurityPoliciesOperations,
41-
ValidateOperations,
4241
)
4342

4443
if TYPE_CHECKING:
@@ -71,8 +70,6 @@ class CdnManagementClient(
7170
:vartype security_policies: azure.mgmt.cdn.operations.SecurityPoliciesOperations
7271
:ivar secrets: SecretsOperations operations
7372
:vartype secrets: azure.mgmt.cdn.operations.SecretsOperations
74-
:ivar validate: ValidateOperations operations
75-
:vartype validate: azure.mgmt.cdn.operations.ValidateOperations
7673
:ivar log_analytics: LogAnalyticsOperations operations
7774
:vartype log_analytics: azure.mgmt.cdn.operations.LogAnalyticsOperations
7875
:ivar profiles: ProfilesOperations operations
@@ -101,7 +98,7 @@ class CdnManagementClient(
10198
:type subscription_id: str
10299
:param base_url: Service URL. Default value is "https://management.azure.com".
103100
:type base_url: str
104-
:keyword api_version: Api Version. Default value is "2021-06-01". Note that overriding this
101+
:keyword api_version: Api Version. Default value is "2023-05-01". Note that overriding this
105102
default value may result in unsupported behavior.
106103
:paramtype api_version: str
107104
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -118,9 +115,9 @@ def __init__(
118115
self._config = CdnManagementClientConfiguration(
119116
credential=credential, subscription_id=subscription_id, **kwargs
120117
)
121-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
118+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
122119

123-
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
120+
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
124121
self._serialize = Serializer(client_models)
125122
self._deserialize = Deserializer(client_models)
126123
self._serialize.client_side_validation = False
@@ -140,7 +137,6 @@ def __init__(
140137
self._client, self._config, self._serialize, self._deserialize
141138
)
142139
self.secrets = SecretsOperations(self._client, self._config, self._serialize, self._deserialize)
143-
self.validate = ValidateOperations(self._client, self._config, self._serialize, self._deserialize)
144140
self.log_analytics = LogAnalyticsOperations(self._client, self._config, self._serialize, self._deserialize)
145141
self.profiles = ProfilesOperations(self._client, self._config, self._serialize, self._deserialize)
146142
self.endpoints = EndpointsOperations(self._client, self._config, self._serialize, self._deserialize)
@@ -177,15 +173,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
177173
request_copy.url = self._client.format_url(request_copy.url)
178174
return self._client.send_request(request_copy, **kwargs)
179175

180-
def close(self):
181-
# type: () -> None
176+
def close(self) -> None:
182177
self._client.close()
183178

184-
def __enter__(self):
185-
# type: () -> CdnManagementClient
179+
def __enter__(self) -> "CdnManagementClient":
186180
self._client.__enter__()
187181
return self
188182

189-
def __exit__(self, *exc_details):
190-
# type: (Any) -> None
183+
def __exit__(self, *exc_details: Any) -> None:
191184
self._client.__exit__(*exc_details)

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ class CdnManagementClientConfiguration(Configuration): # pylint: disable=too-ma
2929
:type credential: ~azure.core.credentials.TokenCredential
3030
:param subscription_id: Azure Subscription ID. Required.
3131
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2021-06-01". Note that overriding this
32+
:keyword api_version: Api Version. Default value is "2023-05-01". Note that overriding this
3333
default value may result in unsupported behavior.
3434
:paramtype api_version: str
3535
"""
3636

3737
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
3838
super(CdnManagementClientConfiguration, self).__init__(**kwargs)
39-
api_version = kwargs.pop("api_version", "2021-06-01") # type: str
39+
api_version: str = kwargs.pop("api_version", "2023-05-01")
4040

4141
if credential is None:
4242
raise ValueError("Parameter 'credential' must not be None.")
@@ -50,10 +50,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5050
kwargs.setdefault("sdk_moniker", "mgmt-cdn/{}".format(VERSION))
5151
self._configure(**kwargs)
5252

53-
def _configure(
54-
self, **kwargs # type: Any
55-
):
56-
# type: (...) -> None
53+
def _configure(self, **kwargs: Any) -> None:
5754
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
5855
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
5956
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)

0 commit comments

Comments
 (0)