Skip to content

Commit

Permalink
CodeGen from PR 33034 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge b3153a93ba817480dec4b3fe1a59a560ea0f9aa4 into 6043a6aac4f0b1f9ead1360e33c0d5035636c35a
  • Loading branch information
SDKAuto committed Mar 6, 2025
1 parent a957672 commit 72a6e5c
Show file tree
Hide file tree
Showing 222 changed files with 9,876 additions and 3,208 deletions.
6 changes: 3 additions & 3 deletions sdk/cdn/azure-mgmt-cdn/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "de1f3772629b6f4d3ac01548a5f6d719bfb97c9e",
"commit": "b7d5133024fd02ab6963f742e526c0bd3648717a",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.13.19",
"@autorest/python@6.27.4",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/cdn/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.13.19 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"autorest_command": "autorest specification/cdn/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/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/cdn/resource-manager/readme.md"
}
12 changes: 9 additions & 3 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position

from ._cdn_management_client import CdnManagementClient
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._cdn_management_client import CdnManagementClient # type: ignore
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"CdnManagementClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()
10 changes: 4 additions & 6 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_cdn_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from copy import deepcopy
from typing import Any, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.rest import HttpRequest, HttpResponse
Expand Down Expand Up @@ -43,13 +44,10 @@
)

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential


class CdnManagementClient(
CdnManagementClientOperationsMixin
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
class CdnManagementClient(CdnManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes
"""Cdn Management Client.
:ivar afd_profiles: AFDProfilesOperations operations
Expand Down Expand Up @@ -100,7 +98,7 @@ class CdnManagementClient(
: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 "2024-02-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2025-05-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
Expand Down Expand Up @@ -196,7 +194,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

def __enter__(self) -> "CdnManagementClient":
def __enter__(self) -> Self:
self._client.__enter__()
return self

Expand Down
7 changes: 3 additions & 4 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential


class CdnManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class CdnManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for CdnManagementClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -28,13 +27,13 @@ class CdnManagementClientConfiguration: # pylint: disable=too-many-instance-att
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Azure Subscription ID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2025-05-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:
api_version: str = kwargs.pop("api_version", "2024-02-01")
api_version: str = kwargs.pop("api_version", "2025-05-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Loading

0 comments on commit 72a6e5c

Please sign in to comment.