diff --git a/sdk/standbypool/azure-mgmt-standbypool/_meta.json b/sdk/standbypool/azure-mgmt-standbypool/_meta.json index 6b28f70cbce3..10c52d8d7bfe 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/_meta.json +++ b/sdk/standbypool/azure-mgmt-standbypool/_meta.json @@ -1,6 +1,6 @@ { - "commit": "525c8c6cebc5837606cb14cfcb0afdb4f2f17fa9", + "commit": "e9fb138ee5e23ba2cb04acf279c8cd86f76755a0", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/standbypool/StandbyPool.Management", - "@azure-tools/typespec-python": "0.42.3" + "@azure-tools/typespec-python": "0.44.1" } \ No newline at end of file diff --git a/sdk/standbypool/azure-mgmt-standbypool/apiview-properties.json b/sdk/standbypool/azure-mgmt-standbypool/apiview-properties.json index 58f8c68ef5d8..df652349ea7f 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/apiview-properties.json +++ b/sdk/standbypool/azure-mgmt-standbypool/apiview-properties.json @@ -47,24 +47,43 @@ "azure.mgmt.standbypool.models.HealthStateCode": "Microsoft.StandbyPool.HealthStateCode", "azure.mgmt.standbypool.models.RefillPolicy": "Microsoft.StandbyPool.RefillPolicy", "azure.mgmt.standbypool.models.PoolContainerGroupState": "Microsoft.StandbyPool.PoolContainerGroupState", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.operations.list": "Azure.ResourceManager.Operations.list", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.get": "Microsoft.StandbyPool.StandbyVirtualMachinePools.get", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.begin_create_or_update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.createOrUpdate", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.begin_delete": "Microsoft.StandbyPool.StandbyVirtualMachinePools.delete", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.update", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.list_by_resource_group": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listByResourceGroup", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.list_by_subscription": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listBySubscription", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machines.get": "Microsoft.StandbyPool.StandbyVirtualMachines.get", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machines.list_by_standby_virtual_machine_pool_resource": "Microsoft.StandbyPool.StandbyVirtualMachines.listByStandbyVirtualMachinePoolResource", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pool_runtime_views.get": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.get", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pool_runtime_views.list_by_standby_pool": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.listByStandbyPool", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.get": "Microsoft.StandbyPool.StandbyContainerGroupPools.get", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.begin_create_or_update": "Microsoft.StandbyPool.StandbyContainerGroupPools.createOrUpdate", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.begin_delete": "Microsoft.StandbyPool.StandbyContainerGroupPools.delete", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.update": "Microsoft.StandbyPool.StandbyContainerGroupPools.update", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.list_by_resource_group": "Microsoft.StandbyPool.StandbyContainerGroupPools.listByResourceGroup", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.list_by_subscription": "Microsoft.StandbyPool.StandbyContainerGroupPools.listBySubscription", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pool_runtime_views.get": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.get", - "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pool_runtime_views.list_by_standby_pool": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.listByStandbyPool" + "azure.mgmt.standbypool.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.standbypool.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolsOperations.get": "Microsoft.StandbyPool.StandbyVirtualMachinePools.get", + "azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolsOperations.get": "Microsoft.StandbyPool.StandbyVirtualMachinePools.get", + "azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolsOperations.begin_create_or_update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.createOrUpdate", + "azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolsOperations.begin_create_or_update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.createOrUpdate", + "azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolsOperations.begin_delete": "Microsoft.StandbyPool.StandbyVirtualMachinePools.delete", + "azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolsOperations.begin_delete": "Microsoft.StandbyPool.StandbyVirtualMachinePools.delete", + "azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolsOperations.update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.update", + "azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolsOperations.update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.update", + "azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolsOperations.list_by_resource_group": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listByResourceGroup", + "azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolsOperations.list_by_resource_group": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listByResourceGroup", + "azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolsOperations.list_by_subscription": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listBySubscription", + "azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolsOperations.list_by_subscription": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listBySubscription", + "azure.mgmt.standbypool.operations.StandbyVirtualMachinesOperations.get": "Microsoft.StandbyPool.StandbyVirtualMachines.get", + "azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinesOperations.get": "Microsoft.StandbyPool.StandbyVirtualMachines.get", + "azure.mgmt.standbypool.operations.StandbyVirtualMachinesOperations.list_by_standby_virtual_machine_pool_resource": "Microsoft.StandbyPool.StandbyVirtualMachines.listByStandbyVirtualMachinePoolResource", + "azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinesOperations.list_by_standby_virtual_machine_pool_resource": "Microsoft.StandbyPool.StandbyVirtualMachines.listByStandbyVirtualMachinePoolResource", + "azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolRuntimeViewsOperations.get": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.get", + "azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolRuntimeViewsOperations.get": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.get", + "azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolRuntimeViewsOperations.list_by_standby_pool": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.listByStandbyPool", + "azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolRuntimeViewsOperations.list_by_standby_pool": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.listByStandbyPool", + "azure.mgmt.standbypool.operations.StandbyContainerGroupPoolsOperations.get": "Microsoft.StandbyPool.StandbyContainerGroupPools.get", + "azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolsOperations.get": "Microsoft.StandbyPool.StandbyContainerGroupPools.get", + "azure.mgmt.standbypool.operations.StandbyContainerGroupPoolsOperations.begin_create_or_update": "Microsoft.StandbyPool.StandbyContainerGroupPools.createOrUpdate", + "azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolsOperations.begin_create_or_update": "Microsoft.StandbyPool.StandbyContainerGroupPools.createOrUpdate", + "azure.mgmt.standbypool.operations.StandbyContainerGroupPoolsOperations.begin_delete": "Microsoft.StandbyPool.StandbyContainerGroupPools.delete", + "azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolsOperations.begin_delete": "Microsoft.StandbyPool.StandbyContainerGroupPools.delete", + "azure.mgmt.standbypool.operations.StandbyContainerGroupPoolsOperations.update": "Microsoft.StandbyPool.StandbyContainerGroupPools.update", + "azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolsOperations.update": "Microsoft.StandbyPool.StandbyContainerGroupPools.update", + "azure.mgmt.standbypool.operations.StandbyContainerGroupPoolsOperations.list_by_resource_group": "Microsoft.StandbyPool.StandbyContainerGroupPools.listByResourceGroup", + "azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolsOperations.list_by_resource_group": "Microsoft.StandbyPool.StandbyContainerGroupPools.listByResourceGroup", + "azure.mgmt.standbypool.operations.StandbyContainerGroupPoolsOperations.list_by_subscription": "Microsoft.StandbyPool.StandbyContainerGroupPools.listBySubscription", + "azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolsOperations.list_by_subscription": "Microsoft.StandbyPool.StandbyContainerGroupPools.listBySubscription", + "azure.mgmt.standbypool.operations.StandbyContainerGroupPoolRuntimeViewsOperations.get": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.get", + "azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolRuntimeViewsOperations.get": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.get", + "azure.mgmt.standbypool.operations.StandbyContainerGroupPoolRuntimeViewsOperations.list_by_standby_pool": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.listByStandbyPool", + "azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolRuntimeViewsOperations.list_by_standby_pool": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.listByStandbyPool" } } \ No newline at end of file diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_client.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_client.py index 838d5a06be96..9b0bddd2fa68 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_client.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_client.py @@ -7,16 +7,18 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from ._configuration import StandbyPoolMgmtClientConfiguration -from ._serialization import Deserializer, Serializer +from ._utils.serialization import Deserializer, Serializer from .operations import ( Operations, StandbyContainerGroupPoolRuntimeViewsOperations, @@ -56,7 +58,7 @@ class StandbyPoolMgmtClient: :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 - :param base_url: Service host. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str :keyword api_version: The API version to use for this operation. Default value is "2025-03-01". Note that overriding this default value may result in unsupported behavior. @@ -66,16 +68,22 @@ class StandbyPoolMgmtClient: """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: _endpoint = "{endpoint}" + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = StandbyPoolMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -94,7 +102,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_utils/__init__.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_utils/__init__.py new file mode 100644 index 000000000000..8026245c2abc --- /dev/null +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_model_base.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_utils/model_base.py similarity index 100% rename from sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_model_base.py rename to sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_utils/model_base.py diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_serialization.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_utils/serialization.py similarity index 100% rename from sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_serialization.py rename to sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_utils/serialization.py diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_version.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_version.py index 8f2350dd3b0c..be71c81bd282 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_version.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_client.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_client.py index 36c987258b90..bdacccf66158 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_client.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_client.py @@ -7,15 +7,17 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints -from .._serialization import Deserializer, Serializer +from .._utils.serialization import Deserializer, Serializer from ._configuration import StandbyPoolMgmtClientConfiguration from .operations import ( Operations, @@ -56,7 +58,7 @@ class StandbyPoolMgmtClient: :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 - :param base_url: Service host. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str :keyword api_version: The API version to use for this operation. Default value is "2025-03-01". Note that overriding this default value may result in unsupported behavior. @@ -66,16 +68,22 @@ class StandbyPoolMgmtClient: """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: _endpoint = "{endpoint}" + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = StandbyPoolMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -94,7 +102,9 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, _endpoint), policies=_policies, **kwargs + ) self._serialize = Serializer() self._deserialize = Deserializer() diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_operations.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_operations.py index ae9005baa095..72bd07f00650 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_operations.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_operations.py @@ -34,8 +34,8 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize -from ..._serialization import Deserializer, Serializer +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from ..._utils.serialization import Deserializer, Serializer from ..._validation import api_version_validation from ...operations._operations import ( build_operations_list_request, diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_models.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_models.py index 9d41de57dab7..4c25bd4358fc 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_models.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_models.py @@ -11,14 +11,13 @@ import datetime from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, overload -from .. import _model_base -from .._model_base import rest_field +from .._utils.model_base import Model as _Model, rest_field if TYPE_CHECKING: from .. import models as _models -class ContainerGroupInstanceCountSummary(_model_base.Model): +class ContainerGroupInstanceCountSummary(_Model): """Displays the counts of container groups in each state, as known by the StandbyPool resource provider. @@ -57,7 +56,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ContainerGroupProfile(_model_base.Model): +class ContainerGroupProfile(_Model): """Details of the ContainerGroupProfile. :ivar id: Specifies container group profile id of standby container groups. Required. @@ -90,7 +89,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ContainerGroupProperties(_model_base.Model): +class ContainerGroupProperties(_Model): """Details of the ContainerGroupProperties. :ivar container_group_profile: Specifies container group profile of standby container groups. @@ -128,7 +127,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ErrorAdditionalInfo(_model_base.Model): +class ErrorAdditionalInfo(_Model): """The resource management error additional info. :ivar type: The additional info type. @@ -143,7 +142,7 @@ class ErrorAdditionalInfo(_model_base.Model): """The additional info.""" -class ErrorDetail(_model_base.Model): +class ErrorDetail(_Model): """The error detail. :ivar code: The error code. @@ -172,7 +171,7 @@ class ErrorDetail(_model_base.Model): """The error additional info.""" -class ErrorResponse(_model_base.Model): +class ErrorResponse(_Model): """Common error response for all Azure Resource Manager APIs to return error details for failed operations. @@ -201,7 +200,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Operation(_model_base.Model): +class Operation(_Model): """Details of a REST API operation, returned from the Resource Provider Operations API. :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: @@ -258,7 +257,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class OperationDisplay(_model_base.Model): +class OperationDisplay(_Model): """Localized display information for and operation. :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft @@ -289,7 +288,7 @@ class OperationDisplay(_model_base.Model): views.""" -class PoolContainerGroupStateCount(_model_base.Model): +class PoolContainerGroupStateCount(_Model): """Displays the counts of pooled container groups in each state, as known by the StandbyPool resource provider. @@ -327,7 +326,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class PoolStatus(_model_base.Model): +class PoolStatus(_Model): """Displays StandbyPool status. :ivar code: Displays the healthy state of the StandbyPool. Required. Known values are: @@ -344,7 +343,7 @@ class PoolStatus(_model_base.Model): """Displays the StandbyPool health state details.""" -class PoolVirtualMachineStateCount(_model_base.Model): +class PoolVirtualMachineStateCount(_Model): """Displays the counts of pooled virtual machines in each state, as known by the StandbyPool resource provider. @@ -384,7 +383,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Resource(_model_base.Model): +class Resource(_Model): """Common fields that are returned in the response for all Azure Resource Manager resources. :ivar id: Fully qualified resource ID for the resource. Ex - @@ -430,7 +429,7 @@ class ProxyResource(Resource): """ -class StandbyContainerGroupPoolElasticityProfile(_model_base.Model): # pylint: disable=name-too-long +class StandbyContainerGroupPoolElasticityProfile(_Model): # pylint: disable=name-too-long """Specifies the elasticity profile of the standby container group pools. :ivar max_ready_capacity: Specifies maximum number of standby container groups in the standby @@ -468,7 +467,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StandbyContainerGroupPoolForecastValues(_model_base.Model): +class StandbyContainerGroupPoolForecastValues(_Model): """Displays the forecast information of the standby pool. :ivar instances_requested_count: Displays the predicted count of instances to be requested from @@ -480,7 +479,7 @@ class StandbyContainerGroupPoolForecastValues(_model_base.Model): """Displays the predicted count of instances to be requested from the standby pool. Required.""" -class StandbyContainerGroupPoolPrediction(_model_base.Model): +class StandbyContainerGroupPoolPrediction(_Model): """Displays prediction information of the standby pool. :ivar forecast_values: Displays the forecast information of the standby pool. Required. @@ -596,7 +595,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StandbyContainerGroupPoolResourceProperties(_model_base.Model): # pylint: disable=name-too-long +class StandbyContainerGroupPoolResourceProperties(_Model): # pylint: disable=name-too-long """Details of the StandbyContainerGroupPool. :ivar elasticity_profile: Specifies elasticity profile of standby container group pools. @@ -649,7 +648,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StandbyContainerGroupPoolResourceUpdate(_model_base.Model): +class StandbyContainerGroupPoolResourceUpdate(_Model): """The type used for update operations of the StandbyContainerGroupPoolResource. :ivar tags: Resource tags. @@ -685,7 +684,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StandbyContainerGroupPoolResourceUpdateProperties(_model_base.Model): # pylint: disable=name-too-long +class StandbyContainerGroupPoolResourceUpdateProperties(_Model): # pylint: disable=name-too-long """The updatable properties of the StandbyContainerGroupPoolResource. :ivar elasticity_profile: Specifies elasticity profile of standby container group pools. @@ -772,7 +771,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StandbyContainerGroupPoolRuntimeViewResourceProperties(_model_base.Model): # pylint: disable=name-too-long +class StandbyContainerGroupPoolRuntimeViewResourceProperties(_Model): # pylint: disable=name-too-long """Contains information about a standby pool as last known by the StandbyPool resource provider. :ivar instance_count_summary: A list containing the counts of container groups in each possible @@ -804,7 +803,7 @@ class StandbyContainerGroupPoolRuntimeViewResourceProperties(_model_base.Model): """Displays prediction information of the standby pool.""" -class StandbyVirtualMachinePoolElasticityProfile(_model_base.Model): # pylint: disable=name-too-long +class StandbyVirtualMachinePoolElasticityProfile(_Model): # pylint: disable=name-too-long """Details of the elasticity profile. :ivar max_ready_capacity: Specifies the maximum number of virtual machines in the standby @@ -844,7 +843,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StandbyVirtualMachinePoolForecastValues(_model_base.Model): +class StandbyVirtualMachinePoolForecastValues(_Model): """Displays the forecast information of the standby pool. :ivar instances_requested_count: Displays the predicted count of instances to be requested from @@ -856,7 +855,7 @@ class StandbyVirtualMachinePoolForecastValues(_model_base.Model): """Displays the predicted count of instances to be requested from the standby pool. Required.""" -class StandbyVirtualMachinePoolPrediction(_model_base.Model): +class StandbyVirtualMachinePoolPrediction(_Model): """Displays prediction information of the standby pool. :ivar forecast_values: Displays the forecast information of the standby pool. Required. @@ -927,7 +926,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StandbyVirtualMachinePoolResourceProperties(_model_base.Model): # pylint: disable=name-too-long +class StandbyVirtualMachinePoolResourceProperties(_Model): # pylint: disable=name-too-long """Details of the StandbyVirtualMachinePool. :ivar elasticity_profile: Specifies the elasticity profile of the standby virtual machine @@ -985,7 +984,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StandbyVirtualMachinePoolResourceUpdate(_model_base.Model): +class StandbyVirtualMachinePoolResourceUpdate(_Model): """The type used for update operations of the StandbyVirtualMachinePoolResource. :ivar tags: Resource tags. @@ -1021,7 +1020,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StandbyVirtualMachinePoolResourceUpdateProperties(_model_base.Model): # pylint: disable=name-too-long +class StandbyVirtualMachinePoolResourceUpdateProperties(_Model): # pylint: disable=name-too-long """The updatable properties of the StandbyVirtualMachinePoolResource. :ivar elasticity_profile: Specifies the elasticity profile of the standby virtual machine @@ -1114,7 +1113,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StandbyVirtualMachinePoolRuntimeViewResourceProperties(_model_base.Model): # pylint: disable=name-too-long +class StandbyVirtualMachinePoolRuntimeViewResourceProperties(_Model): # pylint: disable=name-too-long """Contains information about a standby pool as last known by the StandbyPool resource provider. :ivar instance_count_summary: A list containing the counts of virtual machines in each possible @@ -1193,7 +1192,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StandbyVirtualMachineResourceProperties(_model_base.Model): +class StandbyVirtualMachineResourceProperties(_Model): """Details of the StandbyVirtualMachine. :ivar virtual_machine_resource_id: Resource id of the virtual machine. Required. @@ -1231,7 +1230,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Subnet(_model_base.Model): +class Subnet(_Model): """Subnet of container group. :ivar id: Specifies ARM resource id of the subnet. Required. @@ -1259,7 +1258,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SystemData(_model_base.Model): +class SystemData(_Model): """Metadata pertaining to creation and last modification of the resource. :ivar created_by: The identity that created the resource. @@ -1326,7 +1325,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class VirtualMachineInstanceCountSummary(_model_base.Model): +class VirtualMachineInstanceCountSummary(_Model): """Contains the counts of VMs in each power state in a given zone, fault domain, as known by the StandbyPool resource provider. Note: any resources in the Running state may still be installing extensions / not fully provisioned. diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_operations.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_operations.py index 2e379adcf834..dda4030a3b72 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_operations.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_operations.py @@ -34,8 +34,8 @@ from .. import models as _models from .._configuration import StandbyPoolMgmtClientConfiguration -from .._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize -from .._serialization import Deserializer, Serializer +from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from .._utils.serialization import Deserializer, Serializer from .._validation import api_version_validation T = TypeVar("T") diff --git a/sdk/standbypool/azure-mgmt-standbypool/setup.py b/sdk/standbypool/azure-mgmt-standbypool/setup.py index da184f127ffb..0924f1828e64 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/setup.py +++ b/sdk/standbypool/azure-mgmt-standbypool/setup.py @@ -76,7 +76,7 @@ "isodate>=0.6.1", "typing-extensions>=4.6.0", "azure-common>=1.1", - "azure-mgmt-core>=1.3.2", + "azure-mgmt-core>=1.5.0", ], python_requires=">=3.9", ) diff --git a/sdk/standbypool/azure-mgmt-standbypool/tsp-location.yaml b/sdk/standbypool/azure-mgmt-standbypool/tsp-location.yaml index 5f8a4ecb7b38..5b5daf92ce0b 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/tsp-location.yaml +++ b/sdk/standbypool/azure-mgmt-standbypool/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/standbypool/StandbyPool.Management -commit: 525c8c6cebc5837606cb14cfcb0afdb4f2f17fa9 +commit: e9fb138ee5e23ba2cb04acf279c8cd86f76755a0 repo: Azure/azure-rest-api-specs additionalDirectories: