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
2 changes: 1 addition & 1 deletion sdk/quota/azure-mgmt-quota/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "17c68996ed7e30574adb5a51311954990932f768",
"commit": "8bbd1cd5088c5d86d5ff89d21f84aeca42cd9dfb",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/quota/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/quota/resource-manager/readme.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from .operations import UsagesOperations
from .operations import QuotaOperations
from .operations import QuotaRequestStatusOperations
from .operations import OperationOperations
from .operations import QuotaOperationOperations
from . import models


Expand All @@ -35,8 +35,8 @@ class AzureQuotaExtensionAPI(object):
:vartype quota: azure.mgmt.quota.operations.QuotaOperations
:ivar quota_request_status: QuotaRequestStatusOperations operations
:vartype quota_request_status: azure.mgmt.quota.operations.QuotaRequestStatusOperations
:ivar operation: OperationOperations operations
:vartype operation: azure.mgmt.quota.operations.OperationOperations
:ivar quota_operation: QuotaOperationOperations operations
:vartype quota_operation: azure.mgmt.quota.operations.QuotaOperationOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param str base_url: Service URL
Expand Down Expand Up @@ -66,7 +66,7 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.quota_request_status = QuotaRequestStatusOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operation = OperationOperations(
self.quota_operation = QuotaOperationOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@
"usages": "UsagesOperations",
"quota": "QuotaOperations",
"quota_request_status": "QuotaRequestStatusOperations",
"operation": "OperationOperations"
"quota_operation": "QuotaOperationOperations"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from .operations import UsagesOperations
from .operations import QuotaOperations
from .operations import QuotaRequestStatusOperations
from .operations import OperationOperations
from .operations import QuotaOperationOperations
from .. import models


Expand All @@ -33,8 +33,8 @@ class AzureQuotaExtensionAPI(object):
:vartype quota: azure.mgmt.quota.aio.operations.QuotaOperations
:ivar quota_request_status: QuotaRequestStatusOperations operations
:vartype quota_request_status: azure.mgmt.quota.aio.operations.QuotaRequestStatusOperations
:ivar operation: OperationOperations operations
:vartype operation: azure.mgmt.quota.aio.operations.OperationOperations
:ivar quota_operation: QuotaOperationOperations operations
:vartype quota_operation: azure.mgmt.quota.aio.operations.QuotaOperationOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param str base_url: Service URL
Expand Down Expand Up @@ -63,7 +63,7 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.quota_request_status = QuotaRequestStatusOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operation = OperationOperations(
self.quota_operation = QuotaOperationOperations(
self._client, self._config, self._serialize, self._deserialize)

async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
from ._usages_operations import UsagesOperations
from ._quota_operations import QuotaOperations
from ._quota_request_status_operations import QuotaRequestStatusOperations
from ._operation_operations import OperationOperations
from ._quota_operation_operations import QuotaOperationOperations

__all__ = [
'UsagesOperations',
'QuotaOperations',
'QuotaRequestStatusOperations',
'OperationOperations',
'QuotaOperationOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

class OperationOperations:
"""OperationOperations async operations.
class QuotaOperationOperations:
"""QuotaOperationOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
Expand All @@ -45,7 +45,7 @@ def list(
self,
**kwargs: Any
) -> AsyncIterable["_models.OperationList"]:
"""GET operations.
"""GET quota operations.

List all the operations supported by the Microsoft.Quota resource provider.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from ._models_py3 import ExceptionResponse
from ._models_py3 import LimitJsonObject
from ._models_py3 import LimitObject
from ._models_py3 import LimitValue
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationList
from ._models_py3 import OperationResponse
Expand Down Expand Up @@ -42,7 +41,6 @@
from ._models import ExceptionResponse # type: ignore
from ._models import LimitJsonObject # type: ignore
from ._models import LimitObject # type: ignore
from ._models import LimitValue # type: ignore
from ._models import OperationDisplay # type: ignore
from ._models import OperationList # type: ignore
from ._models import OperationResponse # type: ignore
Expand Down Expand Up @@ -78,7 +76,6 @@
'ExceptionResponse',
'LimitJsonObject',
'LimitObject',
'LimitValue',
'OperationDisplay',
'OperationList',
'OperationResponse',
Expand Down
53 changes: 9 additions & 44 deletions sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class LimitJsonObject(msrest.serialization.Model):
"""LimitJson abstract class.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: LimitValue.
sub-classes are: LimitObject.

All required parameters must be populated in order to send to Azure.

Expand All @@ -184,7 +184,7 @@ class LimitJsonObject(msrest.serialization.Model):
}

_subtype_map = {
'limit_object_type': {'LimitValue': 'LimitValue'}
'limit_object_type': {'LimitValue': 'LimitObject'}
}

def __init__(
Expand All @@ -195,75 +195,40 @@ def __init__(
self.limit_object_type = None # type: Optional[str]


class LimitObject(msrest.serialization.Model):
class LimitObject(LimitJsonObject):
"""The resource quota limit value.

All required parameters must be populated in order to send to Azure.

:param value: Required. The quota/limit value.
:type value: int
:param limit_object_type: The limit object type. Possible values include: "LimitValue".
:param limit_object_type: Required. The limit object type.Constant filled by server. Possible
values include: "LimitValue".
:type limit_object_type: str or ~azure.mgmt.quota.models.LimitType
:param limit_type: The quota or usages limit types. Possible values include: "Independent",
"Shared".
:type limit_type: str or ~azure.mgmt.quota.models.QuotaLimitTypes
"""

_validation = {
'value': {'required': True},
}

_attribute_map = {
'value': {'key': 'value', 'type': 'int'},
'limit_object_type': {'key': 'limitObjectType', 'type': 'str'},
'limit_type': {'key': 'limitType', 'type': 'str'},
}

def __init__(
self,
**kwargs
):
super(LimitObject, self).__init__(**kwargs)
self.value = kwargs['value']
self.limit_object_type = kwargs.get('limit_object_type', None)
self.limit_type = kwargs.get('limit_type', None)


class LimitValue(LimitJsonObject, LimitObject):
"""The resource quota limit.

All required parameters must be populated in order to send to Azure.

:param value: Required. The quota/limit value.
:type value: int
:param limit_type: The quota or usages limit types. Possible values include: "Independent",
"Shared".
:type limit_type: str or ~azure.mgmt.quota.models.QuotaLimitTypes
:param limit_object_type: Required. The limit object type.Constant filled by server. Possible
values include: "LimitValue".
:type limit_object_type: str or ~azure.mgmt.quota.models.LimitType
"""

_validation = {
'value': {'required': True},
'limit_object_type': {'required': True},
'value': {'required': True},
}

_attribute_map = {
'limit_object_type': {'key': 'limitObjectType', 'type': 'str'},
'value': {'key': 'value', 'type': 'int'},
'limit_type': {'key': 'limitType', 'type': 'str'},
'limit_object_type': {'key': 'limitObjectType', 'type': 'str'},
}

def __init__(
self,
**kwargs
):
super(LimitValue, self).__init__(**kwargs)
super(LimitObject, self).__init__(**kwargs)
self.limit_object_type = 'LimitValue' # type: str
self.value = kwargs['value']
self.limit_type = kwargs.get('limit_type', None)
self.limit_object_type = 'LimitValue' # type: str
self.limit_object_type = 'LimitValue' # type: str


class OperationDisplay(msrest.serialization.Model):
Expand Down
57 changes: 9 additions & 48 deletions sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_models_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class LimitJsonObject(msrest.serialization.Model):
"""LimitJson abstract class.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: LimitValue.
sub-classes are: LimitObject.

All required parameters must be populated in order to send to Azure.

Expand All @@ -196,7 +196,7 @@ class LimitJsonObject(msrest.serialization.Model):
}

_subtype_map = {
'limit_object_type': {'LimitValue': 'LimitValue'}
'limit_object_type': {'LimitValue': 'LimitObject'}
}

def __init__(
Expand All @@ -207,68 +207,30 @@ def __init__(
self.limit_object_type = None # type: Optional[str]


class LimitObject(msrest.serialization.Model):
class LimitObject(LimitJsonObject):
"""The resource quota limit value.

All required parameters must be populated in order to send to Azure.

:param value: Required. The quota/limit value.
:type value: int
:param limit_object_type: The limit object type. Possible values include: "LimitValue".
:param limit_object_type: Required. The limit object type.Constant filled by server. Possible
values include: "LimitValue".
:type limit_object_type: str or ~azure.mgmt.quota.models.LimitType
:param limit_type: The quota or usages limit types. Possible values include: "Independent",
"Shared".
:type limit_type: str or ~azure.mgmt.quota.models.QuotaLimitTypes
"""

_validation = {
'value': {'required': True},
}

_attribute_map = {
'value': {'key': 'value', 'type': 'int'},
'limit_object_type': {'key': 'limitObjectType', 'type': 'str'},
'limit_type': {'key': 'limitType', 'type': 'str'},
}

def __init__(
self,
*,
value: int,
limit_object_type: Optional[Union[str, "LimitType"]] = None,
limit_type: Optional[Union[str, "QuotaLimitTypes"]] = None,
**kwargs
):
super(LimitObject, self).__init__(**kwargs)
self.value = value
self.limit_object_type = limit_object_type
self.limit_type = limit_type


class LimitValue(LimitJsonObject, LimitObject):
"""The resource quota limit.

All required parameters must be populated in order to send to Azure.

:param value: Required. The quota/limit value.
:type value: int
:param limit_type: The quota or usages limit types. Possible values include: "Independent",
"Shared".
:type limit_type: str or ~azure.mgmt.quota.models.QuotaLimitTypes
:param limit_object_type: Required. The limit object type.Constant filled by server. Possible
values include: "LimitValue".
:type limit_object_type: str or ~azure.mgmt.quota.models.LimitType
"""

_validation = {
'value': {'required': True},
'limit_object_type': {'required': True},
'value': {'required': True},
}

_attribute_map = {
'limit_object_type': {'key': 'limitObjectType', 'type': 'str'},
'value': {'key': 'value', 'type': 'int'},
'limit_type': {'key': 'limitType', 'type': 'str'},
'limit_object_type': {'key': 'limitObjectType', 'type': 'str'},
}

def __init__(
Expand All @@ -278,11 +240,10 @@ def __init__(
limit_type: Optional[Union[str, "QuotaLimitTypes"]] = None,
**kwargs
):
super(LimitValue, self).__init__(value=value, limit_type=limit_type, **kwargs)
super(LimitObject, self).__init__(**kwargs)
self.limit_object_type = 'LimitValue' # type: str
self.value = value
self.limit_type = limit_type
self.limit_object_type = 'LimitValue' # type: str
self.limit_object_type = 'LimitValue' # type: str


class OperationDisplay(msrest.serialization.Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
from ._usages_operations import UsagesOperations
from ._quota_operations import QuotaOperations
from ._quota_request_status_operations import QuotaRequestStatusOperations
from ._operation_operations import OperationOperations
from ._quota_operation_operations import QuotaOperationOperations

__all__ = [
'UsagesOperations',
'QuotaOperations',
'QuotaRequestStatusOperations',
'OperationOperations',
'QuotaOperationOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]

class OperationOperations(object):
"""OperationOperations operations.
class QuotaOperationOperations(object):
"""QuotaOperationOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
Expand All @@ -50,7 +50,7 @@ def list(
**kwargs # type: Any
):
# type: (...) -> Iterable["_models.OperationList"]
"""GET operations.
"""GET quota operations.

List all the operations supported by the Microsoft.Quota resource provider.

Expand Down