Skip to content

Commit

Permalink
CodeGen from PR 31866 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 8bd317b40565912d30c52b4cc6c3bde3999f9f8e into ada2aba3ac674ba632c07571421d64484230289a
  • Loading branch information
SDKAuto committed Dec 16, 2024
1 parent 7674316 commit 2c24ece
Show file tree
Hide file tree
Showing 108 changed files with 3,188 additions and 5,689 deletions.
8 changes: 4 additions & 4 deletions sdk/quota/azure-mgmt-quota/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "665e7c3b6f26b148b3c05e55602621bc293cc0a4",
"commit": "7c930337594261cf40b1ecbde63f8d8c2a7898ba",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.13.7",
"@autorest/python@6.26.4",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/quota/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.7 --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
"autorest_command": "autorest specification/quota/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.26.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/quota/resource-manager/readme.md"
}
12 changes: 9 additions & 3 deletions sdk/quota/azure-mgmt-quota/azure/mgmt/quota/__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 ._quota_mgmt_client import QuotaMgmtClient
from typing import TYPE_CHECKING

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

from ._quota_mgmt_client import QuotaMgmtClient # 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__ = [
"QuotaMgmtClient",
]
__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()
9 changes: 4 additions & 5 deletions sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_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 QuotaMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class QuotaMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for QuotaMgmtClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -28,13 +27,13 @@ class QuotaMgmtClientConfiguration: # pylint: disable=too-many-instance-attribu
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2024-12-12". 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", "2023-06-01-preview")
api_version: str = kwargs.pop("api_version", "2024-12-12")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
39 changes: 13 additions & 26 deletions sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_quota_mgmt_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 All @@ -20,12 +21,10 @@
from .operations import (
GroupQuotaLimitsOperations,
GroupQuotaLimitsRequestOperations,
GroupQuotaLocationSettingsOperations,
GroupQuotaSubscriptionAllocationOperations,
GroupQuotaSubscriptionAllocationRequestOperations,
GroupQuotaSubscriptionRequestsOperations,
GroupQuotaSubscriptionsOperations,
GroupQuotaUsagesOperations,
GroupQuotasOperations,
QuotaOperationOperations,
QuotaOperations,
Expand All @@ -34,11 +33,10 @@
)

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


class QuotaMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
class QuotaMgmtClient: # pylint: disable=too-many-instance-attributes
"""Microsoft Azure Quota Resource Provider. This Swagger is for Azure Group Quota using GroupQuota
Entity.
Expand All @@ -50,24 +48,19 @@ class QuotaMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too
:ivar group_quota_subscription_requests: GroupQuotaSubscriptionRequestsOperations operations
:vartype group_quota_subscription_requests:
azure.mgmt.quota.operations.GroupQuotaSubscriptionRequestsOperations
:ivar group_quota_limits: GroupQuotaLimitsOperations operations
:vartype group_quota_limits: azure.mgmt.quota.operations.GroupQuotaLimitsOperations
:ivar group_quota_limits_request: GroupQuotaLimitsRequestOperations operations
:vartype group_quota_limits_request:
azure.mgmt.quota.operations.GroupQuotaLimitsRequestOperations
:ivar group_quota_subscription_allocation: GroupQuotaSubscriptionAllocationOperations
operations
:vartype group_quota_subscription_allocation:
azure.mgmt.quota.operations.GroupQuotaSubscriptionAllocationOperations
:ivar group_quota_limits: GroupQuotaLimitsOperations operations
:vartype group_quota_limits: azure.mgmt.quota.operations.GroupQuotaLimitsOperations
:ivar group_quota_subscription_allocation_request:
GroupQuotaSubscriptionAllocationRequestOperations operations
:vartype group_quota_subscription_allocation_request:
azure.mgmt.quota.operations.GroupQuotaSubscriptionAllocationRequestOperations
:ivar group_quota_usages: GroupQuotaUsagesOperations operations
:vartype group_quota_usages: azure.mgmt.quota.operations.GroupQuotaUsagesOperations
:ivar group_quota_location_settings: GroupQuotaLocationSettingsOperations operations
:vartype group_quota_location_settings:
azure.mgmt.quota.operations.GroupQuotaLocationSettingsOperations
:ivar group_quota_subscription_allocation: GroupQuotaSubscriptionAllocationOperations
operations
:vartype group_quota_subscription_allocation:
azure.mgmt.quota.operations.GroupQuotaSubscriptionAllocationOperations
:ivar usages: UsagesOperations operations
:vartype usages: azure.mgmt.quota.operations.UsagesOperations
:ivar quota: QuotaOperations operations
Expand All @@ -82,8 +75,8 @@ class QuotaMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too
: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 "2023-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2024-12-12". 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
Retry-After header is present.
Expand Down Expand Up @@ -128,22 +121,16 @@ def __init__(
self.group_quota_subscription_requests = GroupQuotaSubscriptionRequestsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.group_quota_limits = GroupQuotaLimitsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.group_quota_limits_request = GroupQuotaLimitsRequestOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.group_quota_subscription_allocation = GroupQuotaSubscriptionAllocationOperations(
self.group_quota_limits = GroupQuotaLimitsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.group_quota_subscription_allocation_request = GroupQuotaSubscriptionAllocationRequestOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.group_quota_usages = GroupQuotaUsagesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.group_quota_location_settings = GroupQuotaLocationSettingsOperations(
self.group_quota_subscription_allocation = GroupQuotaSubscriptionAllocationOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize)
Expand Down Expand Up @@ -178,7 +165,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

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

Expand Down
Loading

0 comments on commit 2c24ece

Please sign in to comment.