Skip to content

Commit a43e1e7

Browse files
Azure CLI BotSDKAutorahuls-microsoft
authored
[AutoRelease] t2-quota-2021-11-01-54332 (Azure#21507)
* CodeGen from PR 16438 in Azure/azure-rest-api-specs [QuotaRP] Fix LimitObject polymorphism (Azure#16438) * Fix LimitObject polymorphism * move properties out of allOf * add type to LimitObject * value is required * Updating Operations Tag to QuotaOperations. * Update quota.json Updating Summary field for operations. Co-authored-by: Rahul Singh <[email protected]> * version,CHANGELOG Co-authored-by: SDKAuto <[email protected]> Co-authored-by: Rahul Singh <[email protected]> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
1 parent 625861a commit a43e1e7

File tree

13 files changed

+50
-116
lines changed

13 files changed

+50
-116
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Release History
22

3+
## 1.0.0b2 (2021-11-01)
4+
5+
**Features**
6+
7+
- Added operation group QuotaOperationOperations
8+
9+
**Breaking changes**
10+
11+
- Parameter limit_object_type of model LimitObject is now required
12+
- Removed operation group OperationOperations
13+
314
## 1.0.0b1 (2021-09-07)
415

516
* Initial Release

sdk/quota/azure-mgmt-quota/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@autorest/[email protected]",
55
"@autorest/[email protected]"
66
],
7-
"commit": "17c68996ed7e30574adb5a51311954990932f768",
7+
"commit": "348665d474283df6a73d6a2ec6defef271251f13",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
99
"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/[email protected] --use=@autorest/[email protected] --version=3.4.5",
1010
"readme": "specification/quota/resource-manager/readme.md"

sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_azure_quota_extension_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from .operations import UsagesOperations
2323
from .operations import QuotaOperations
2424
from .operations import QuotaRequestStatusOperations
25-
from .operations import OperationOperations
25+
from .operations import QuotaOperationOperations
2626
from . import models
2727

2828

@@ -35,8 +35,8 @@ class AzureQuotaExtensionAPI(object):
3535
:vartype quota: azure.mgmt.quota.operations.QuotaOperations
3636
:ivar quota_request_status: QuotaRequestStatusOperations operations
3737
:vartype quota_request_status: azure.mgmt.quota.operations.QuotaRequestStatusOperations
38-
:ivar operation: OperationOperations operations
39-
:vartype operation: azure.mgmt.quota.operations.OperationOperations
38+
:ivar quota_operation: QuotaOperationOperations operations
39+
:vartype quota_operation: azure.mgmt.quota.operations.QuotaOperationOperations
4040
:param credential: Credential needed for the client to connect to Azure.
4141
:type credential: ~azure.core.credentials.TokenCredential
4242
:param str base_url: Service URL
@@ -66,7 +66,7 @@ def __init__(
6666
self._client, self._config, self._serialize, self._deserialize)
6767
self.quota_request_status = QuotaRequestStatusOperations(
6868
self._client, self._config, self._serialize, self._deserialize)
69-
self.operation = OperationOperations(
69+
self.quota_operation = QuotaOperationOperations(
7070
self._client, self._config, self._serialize, self._deserialize)
7171

7272
def _send_request(self, http_request, **kwargs):

sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,6 @@
8989
"usages": "UsagesOperations",
9090
"quota": "QuotaOperations",
9191
"quota_request_status": "QuotaRequestStatusOperations",
92-
"operation": "OperationOperations"
92+
"quota_operation": "QuotaOperationOperations"
9393
}
9494
}

sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0b1"
9+
VERSION = "1.0.0b2"

sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/_azure_quota_extension_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from .operations import UsagesOperations
2121
from .operations import QuotaOperations
2222
from .operations import QuotaRequestStatusOperations
23-
from .operations import OperationOperations
23+
from .operations import QuotaOperationOperations
2424
from .. import models
2525

2626

@@ -33,8 +33,8 @@ class AzureQuotaExtensionAPI(object):
3333
:vartype quota: azure.mgmt.quota.aio.operations.QuotaOperations
3434
:ivar quota_request_status: QuotaRequestStatusOperations operations
3535
:vartype quota_request_status: azure.mgmt.quota.aio.operations.QuotaRequestStatusOperations
36-
:ivar operation: OperationOperations operations
37-
:vartype operation: azure.mgmt.quota.aio.operations.OperationOperations
36+
:ivar quota_operation: QuotaOperationOperations operations
37+
:vartype quota_operation: azure.mgmt.quota.aio.operations.QuotaOperationOperations
3838
:param credential: Credential needed for the client to connect to Azure.
3939
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
4040
:param str base_url: Service URL
@@ -63,7 +63,7 @@ def __init__(
6363
self._client, self._config, self._serialize, self._deserialize)
6464
self.quota_request_status = QuotaRequestStatusOperations(
6565
self._client, self._config, self._serialize, self._deserialize)
66-
self.operation = OperationOperations(
66+
self.quota_operation = QuotaOperationOperations(
6767
self._client, self._config, self._serialize, self._deserialize)
6868

6969
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:

sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/operations/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
from ._usages_operations import UsagesOperations
1010
from ._quota_operations import QuotaOperations
1111
from ._quota_request_status_operations import QuotaRequestStatusOperations
12-
from ._operation_operations import OperationOperations
12+
from ._quota_operation_operations import QuotaOperationOperations
1313

1414
__all__ = [
1515
'UsagesOperations',
1616
'QuotaOperations',
1717
'QuotaRequestStatusOperations',
18-
'OperationOperations',
18+
'QuotaOperationOperations',
1919
]

sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/operations/_operation_operations.py renamed to sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/operations/_quota_operation_operations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
T = TypeVar('T')
2020
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
2121

22-
class OperationOperations:
23-
"""OperationOperations async operations.
22+
class QuotaOperationOperations:
23+
"""QuotaOperationOperations async operations.
2424
2525
You should not instantiate this class directly. Instead, you should create a Client instance that
2626
instantiates it for you and attaches it as an attribute.
@@ -45,7 +45,7 @@ def list(
4545
self,
4646
**kwargs: Any
4747
) -> AsyncIterable["_models.OperationList"]:
48-
"""GET operations.
48+
"""GET quota operations.
4949
5050
List all the operations supported by the Microsoft.Quota resource provider.
5151

sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from ._models_py3 import ExceptionResponse
1515
from ._models_py3 import LimitJsonObject
1616
from ._models_py3 import LimitObject
17-
from ._models_py3 import LimitValue
1817
from ._models_py3 import OperationDisplay
1918
from ._models_py3 import OperationList
2019
from ._models_py3 import OperationResponse
@@ -42,7 +41,6 @@
4241
from ._models import ExceptionResponse # type: ignore
4342
from ._models import LimitJsonObject # type: ignore
4443
from ._models import LimitObject # type: ignore
45-
from ._models import LimitValue # type: ignore
4644
from ._models import OperationDisplay # type: ignore
4745
from ._models import OperationList # type: ignore
4846
from ._models import OperationResponse # type: ignore
@@ -78,7 +76,6 @@
7876
'ExceptionResponse',
7977
'LimitJsonObject',
8078
'LimitObject',
81-
'LimitValue',
8279
'OperationDisplay',
8380
'OperationList',
8481
'OperationResponse',

sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_models.py

Lines changed: 9 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class LimitJsonObject(msrest.serialization.Model):
166166
"""LimitJson abstract class.
167167
168168
You probably want to use the sub-classes and not this class directly. Known
169-
sub-classes are: LimitValue.
169+
sub-classes are: LimitObject.
170170
171171
All required parameters must be populated in order to send to Azure.
172172
@@ -184,7 +184,7 @@ class LimitJsonObject(msrest.serialization.Model):
184184
}
185185

186186
_subtype_map = {
187-
'limit_object_type': {'LimitValue': 'LimitValue'}
187+
'limit_object_type': {'LimitValue': 'LimitObject'}
188188
}
189189

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

197197

198-
class LimitObject(msrest.serialization.Model):
198+
class LimitObject(LimitJsonObject):
199199
"""The resource quota limit value.
200200
201201
All required parameters must be populated in order to send to Azure.
202202
203-
:param value: Required. The quota/limit value.
204-
:type value: int
205-
:param limit_object_type: The limit object type. Possible values include: "LimitValue".
203+
:param limit_object_type: Required. The limit object type.Constant filled by server. Possible
204+
values include: "LimitValue".
206205
:type limit_object_type: str or ~azure.mgmt.quota.models.LimitType
207-
:param limit_type: The quota or usages limit types. Possible values include: "Independent",
208-
"Shared".
209-
:type limit_type: str or ~azure.mgmt.quota.models.QuotaLimitTypes
210-
"""
211-
212-
_validation = {
213-
'value': {'required': True},
214-
}
215-
216-
_attribute_map = {
217-
'value': {'key': 'value', 'type': 'int'},
218-
'limit_object_type': {'key': 'limitObjectType', 'type': 'str'},
219-
'limit_type': {'key': 'limitType', 'type': 'str'},
220-
}
221-
222-
def __init__(
223-
self,
224-
**kwargs
225-
):
226-
super(LimitObject, self).__init__(**kwargs)
227-
self.value = kwargs['value']
228-
self.limit_object_type = kwargs.get('limit_object_type', None)
229-
self.limit_type = kwargs.get('limit_type', None)
230-
231-
232-
class LimitValue(LimitJsonObject, LimitObject):
233-
"""The resource quota limit.
234-
235-
All required parameters must be populated in order to send to Azure.
236-
237206
:param value: Required. The quota/limit value.
238207
:type value: int
239208
:param limit_type: The quota or usages limit types. Possible values include: "Independent",
240209
"Shared".
241210
:type limit_type: str or ~azure.mgmt.quota.models.QuotaLimitTypes
242-
:param limit_object_type: Required. The limit object type.Constant filled by server. Possible
243-
values include: "LimitValue".
244-
:type limit_object_type: str or ~azure.mgmt.quota.models.LimitType
245211
"""
246212

247213
_validation = {
248-
'value': {'required': True},
249214
'limit_object_type': {'required': True},
215+
'value': {'required': True},
250216
}
251217

252218
_attribute_map = {
219+
'limit_object_type': {'key': 'limitObjectType', 'type': 'str'},
253220
'value': {'key': 'value', 'type': 'int'},
254221
'limit_type': {'key': 'limitType', 'type': 'str'},
255-
'limit_object_type': {'key': 'limitObjectType', 'type': 'str'},
256222
}
257223

258224
def __init__(
259225
self,
260226
**kwargs
261227
):
262-
super(LimitValue, self).__init__(**kwargs)
228+
super(LimitObject, self).__init__(**kwargs)
229+
self.limit_object_type = 'LimitValue' # type: str
263230
self.value = kwargs['value']
264231
self.limit_type = kwargs.get('limit_type', None)
265-
self.limit_object_type = 'LimitValue' # type: str
266-
self.limit_object_type = 'LimitValue' # type: str
267232

268233

269234
class OperationDisplay(msrest.serialization.Model):

0 commit comments

Comments
 (0)