Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "213638e89dc6c0d7d4d6244c7a079532afe5e3fa",
"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.19.0",
"@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.19.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/quota/resource-manager/readme.md"
}
4 changes: 2 additions & 2 deletions sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,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
:keyword api_version: Api Version. Default value is "2024-10-15-preview". 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-10-15-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
25 changes: 13 additions & 12 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 Down Expand Up @@ -50,19 +51,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_subscription_allocation: GroupQuotaSubscriptionAllocationOperations
operations
:vartype group_quota_subscription_allocation:
azure.mgmt.quota.operations.GroupQuotaSubscriptionAllocationOperations
:ivar group_quota_usages: GroupQuotaUsagesOperations operations
:vartype group_quota_usages: azure.mgmt.quota.operations.GroupQuotaUsagesOperations
:ivar group_quota_location_settings: GroupQuotaLocationSettingsOperations operations
Expand All @@ -82,7 +83,7 @@ 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
:keyword api_version: Api Version. Default value is "2024-10-15-preview". 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 @@ -128,18 +129,18 @@ 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_subscription_allocation = GroupQuotaSubscriptionAllocationOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.group_quota_usages = GroupQuotaUsagesOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down Expand Up @@ -178,7 +179,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
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ def _json_attemp(data):
# context otherwise.
_LOGGER.critical("Wasn't XML not JSON, failing")
raise DeserializationError("XML is invalid") from err
elif content_type.startswith("text/"):
return data_as_str
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))

@classmethod
Expand Down Expand Up @@ -1441,7 +1443,7 @@ def _deserialize(self, target_obj, data):
elif isinstance(response, type) and issubclass(response, Enum):
return self.deserialize_enum(data, response)

if data is None:
if data is None or data is CoreNull:
return data
try:
attributes = response._attribute_map # type: ignore
Expand Down
16 changes: 0 additions & 16 deletions sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_vendor.py

This file was deleted.

2 changes: 1 addition & 1 deletion sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "2.0.0b1"
VERSION = "1.0.0b3"
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ class QuotaMgmtClientConfiguration: # pylint: disable=too-many-instance-attribu
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
: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
:keyword api_version: Api Version. Default value is "2024-10-15-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "AsyncTokenCredential", 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-10-15-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

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

from azure.core.pipeline import policies
from azure.core.rest import AsyncHttpResponse, HttpRequest
Expand Down Expand Up @@ -50,19 +51,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.aio.operations.GroupQuotaSubscriptionRequestsOperations
:ivar group_quota_limits: GroupQuotaLimitsOperations operations
:vartype group_quota_limits: azure.mgmt.quota.aio.operations.GroupQuotaLimitsOperations
:ivar group_quota_limits_request: GroupQuotaLimitsRequestOperations operations
:vartype group_quota_limits_request:
azure.mgmt.quota.aio.operations.GroupQuotaLimitsRequestOperations
:ivar group_quota_subscription_allocation: GroupQuotaSubscriptionAllocationOperations
operations
:vartype group_quota_subscription_allocation:
azure.mgmt.quota.aio.operations.GroupQuotaSubscriptionAllocationOperations
:ivar group_quota_limits: GroupQuotaLimitsOperations operations
:vartype group_quota_limits: azure.mgmt.quota.aio.operations.GroupQuotaLimitsOperations
:ivar group_quota_subscription_allocation_request:
GroupQuotaSubscriptionAllocationRequestOperations operations
:vartype group_quota_subscription_allocation_request:
azure.mgmt.quota.aio.operations.GroupQuotaSubscriptionAllocationRequestOperations
:ivar group_quota_subscription_allocation: GroupQuotaSubscriptionAllocationOperations
operations
:vartype group_quota_subscription_allocation:
azure.mgmt.quota.aio.operations.GroupQuotaSubscriptionAllocationOperations
:ivar group_quota_usages: GroupQuotaUsagesOperations operations
:vartype group_quota_usages: azure.mgmt.quota.aio.operations.GroupQuotaUsagesOperations
:ivar group_quota_location_settings: GroupQuotaLocationSettingsOperations operations
Expand All @@ -82,7 +83,7 @@ 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
:keyword api_version: Api Version. Default value is "2024-10-15-preview". 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 @@ -128,18 +129,18 @@ 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_subscription_allocation = GroupQuotaSubscriptionAllocationOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.group_quota_usages = GroupQuotaUsagesOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down Expand Up @@ -180,7 +181,7 @@ def _send_request(
async def close(self) -> None:
await self._client.close()

async def __aenter__(self) -> "QuotaMgmtClient":
async def __aenter__(self) -> Self:
await self._client.__aenter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
from ._group_quotas_operations import GroupQuotasOperations
from ._group_quota_subscriptions_operations import GroupQuotaSubscriptionsOperations
from ._group_quota_subscription_requests_operations import GroupQuotaSubscriptionRequestsOperations
from ._group_quota_limits_operations import GroupQuotaLimitsOperations
from ._group_quota_limits_request_operations import GroupQuotaLimitsRequestOperations
from ._group_quota_subscription_allocation_operations import GroupQuotaSubscriptionAllocationOperations
from ._group_quota_limits_operations import GroupQuotaLimitsOperations
from ._group_quota_subscription_allocation_request_operations import GroupQuotaSubscriptionAllocationRequestOperations
from ._group_quota_subscription_allocation_operations import GroupQuotaSubscriptionAllocationOperations
from ._group_quota_usages_operations import GroupQuotaUsagesOperations
from ._group_quota_location_settings_operations import GroupQuotaLocationSettingsOperations
from ._usages_operations import UsagesOperations
Expand All @@ -28,10 +28,10 @@
"GroupQuotasOperations",
"GroupQuotaSubscriptionsOperations",
"GroupQuotaSubscriptionRequestsOperations",
"GroupQuotaLimitsOperations",
"GroupQuotaLimitsRequestOperations",
"GroupQuotaSubscriptionAllocationOperations",
"GroupQuotaLimitsOperations",
"GroupQuotaSubscriptionAllocationRequestOperations",
"GroupQuotaSubscriptionAllocationOperations",
"GroupQuotaUsagesOperations",
"GroupQuotaLocationSettingsOperations",
"UsagesOperations",
Expand Down
Loading