Skip to content

Commit 3c1bf5f

Browse files
author
SDKAuto
committed
CodeGen from PR 11639 in Azure/azure-rest-api-specs
Merge b4b64803111a6a3c3e13503104b6c7b35b6f9ec7 into 7c8fd7f
1 parent d0d46ed commit 3c1bf5f

File tree

3 files changed

+123
-111
lines changed

3 files changed

+123
-111
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
from ._models_py3 import ClusterReportedProperties
1818
from ._models_py3 import ClusterUpdate
1919
from ._models_py3 import ErrorAdditionalInfo
20+
from ._models_py3 import ErrorDetail
2021
from ._models_py3 import ErrorResponse, ErrorResponseException
21-
from ._models_py3 import ErrorResponseError
2222
from ._models_py3 import OperationDetail
2323
from ._models_py3 import OperationDisplay
2424
from ._models_py3 import ProxyResource
@@ -32,8 +32,8 @@
3232
from ._models import ClusterReportedProperties
3333
from ._models import ClusterUpdate
3434
from ._models import ErrorAdditionalInfo
35+
from ._models import ErrorDetail
3536
from ._models import ErrorResponse, ErrorResponseException
36-
from ._models import ErrorResponseError
3737
from ._models import OperationDetail
3838
from ._models import OperationDisplay
3939
from ._models import ProxyResource
@@ -53,8 +53,8 @@
5353
'ClusterReportedProperties',
5454
'ClusterUpdate',
5555
'ErrorAdditionalInfo',
56+
'ErrorDetail',
5657
'ErrorResponse', 'ErrorResponseException',
57-
'ErrorResponseError',
5858
'OperationDetail',
5959
'OperationDisplay',
6060
'ProxyResource',

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

Lines changed: 60 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,19 @@ def __init__(self, **kwargs):
3636

3737

3838
class Resource(Model):
39-
"""Resource.
39+
"""Common fields that are returned in the response for all Azure Resource
40+
Manager resources.
4041
4142
Variables are only populated by the server, and will be ignored when
4243
sending a request.
4344
44-
:ivar id: Fully qualified resource Id for the resource. Ex -
45+
:ivar id: Fully qualified resource ID for the resource. Ex -
4546
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
4647
:vartype id: str
4748
:ivar name: The name of the resource
4849
:vartype name: str
49-
:ivar type: The type of the resource. Ex-
50-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
50+
:ivar type: The type of the resource. E.g.
51+
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
5152
:vartype type: str
5253
"""
5354

@@ -71,19 +72,19 @@ def __init__(self, **kwargs):
7172

7273

7374
class AzureEntityResource(Resource):
74-
"""The resource model definition for a Azure Resource Manager resource with an
75-
etag.
75+
"""The resource model definition for an Azure Resource Manager resource with
76+
an etag.
7677
7778
Variables are only populated by the server, and will be ignored when
7879
sending a request.
7980
80-
:ivar id: Fully qualified resource Id for the resource. Ex -
81+
:ivar id: Fully qualified resource ID for the resource. Ex -
8182
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
8283
:vartype id: str
8384
:ivar name: The name of the resource
8485
:vartype name: str
85-
:ivar type: The type of the resource. Ex-
86-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
86+
:ivar type: The type of the resource. E.g.
87+
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
8788
:vartype type: str
8889
:ivar etag: Resource Etag.
8990
:vartype etag: str
@@ -117,20 +118,21 @@ class CloudError(Model):
117118

118119

119120
class TrackedResource(Resource):
120-
"""The resource model definition for a ARM tracked top level resource.
121+
"""The resource model definition for an Azure Resource Manager tracked top
122+
level resource.
121123
122124
Variables are only populated by the server, and will be ignored when
123125
sending a request.
124126
125127
All required parameters must be populated in order to send to Azure.
126128
127-
:ivar id: Fully qualified resource Id for the resource. Ex -
129+
:ivar id: Fully qualified resource ID for the resource. Ex -
128130
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
129131
:vartype id: str
130132
:ivar name: The name of the resource
131133
:vartype name: str
132-
:ivar type: The type of the resource. Ex-
133-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
134+
:ivar type: The type of the resource. E.g.
135+
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
134136
:vartype type: str
135137
:param tags: Resource tags.
136138
:type tags: dict[str, str]
@@ -167,13 +169,13 @@ class Cluster(TrackedResource):
167169
168170
All required parameters must be populated in order to send to Azure.
169171
170-
:ivar id: Fully qualified resource Id for the resource. Ex -
172+
:ivar id: Fully qualified resource ID for the resource. Ex -
171173
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
172174
:vartype id: str
173175
:ivar name: The name of the resource
174176
:vartype name: str
175-
:ivar type: The type of the resource. Ex-
176-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
177+
:ivar type: The type of the resource. E.g.
178+
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
177179
:vartype type: str
178180
:param tags: Resource tags.
179181
:type tags: dict[str, str]
@@ -411,36 +413,8 @@ def __init__(self, **kwargs):
411413
self.info = None
412414

413415

414-
class ErrorResponse(Model):
415-
"""The resource management error response.
416-
417-
:param error: The error object.
418-
:type error: ~azure.mgmt.azurestackhci.models.ErrorResponseError
419-
"""
420-
421-
_attribute_map = {
422-
'error': {'key': 'error', 'type': 'ErrorResponseError'},
423-
}
424-
425-
def __init__(self, **kwargs):
426-
super(ErrorResponse, self).__init__(**kwargs)
427-
self.error = kwargs.get('error', None)
428-
429-
430-
class ErrorResponseException(HttpOperationError):
431-
"""Server responsed with exception of type: 'ErrorResponse'.
432-
433-
:param deserialize: A deserializer
434-
:param response: Server response to be deserialized.
435-
"""
436-
437-
def __init__(self, deserialize, response, *args):
438-
439-
super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)
440-
441-
442-
class ErrorResponseError(Model):
443-
"""The error object.
416+
class ErrorDetail(Model):
417+
"""The error detail.
444418
445419
Variables are only populated by the server, and will be ignored when
446420
sending a request.
@@ -452,7 +426,7 @@ class ErrorResponseError(Model):
452426
:ivar target: The error target.
453427
:vartype target: str
454428
:ivar details: The error details.
455-
:vartype details: list[~azure.mgmt.azurestackhci.models.ErrorResponse]
429+
:vartype details: list[~azure.mgmt.azurestackhci.models.ErrorDetail]
456430
:ivar additional_info: The error additional info.
457431
:vartype additional_info:
458432
list[~azure.mgmt.azurestackhci.models.ErrorAdditionalInfo]
@@ -470,19 +444,51 @@ class ErrorResponseError(Model):
470444
'code': {'key': 'code', 'type': 'str'},
471445
'message': {'key': 'message', 'type': 'str'},
472446
'target': {'key': 'target', 'type': 'str'},
473-
'details': {'key': 'details', 'type': '[ErrorResponse]'},
447+
'details': {'key': 'details', 'type': '[ErrorDetail]'},
474448
'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'},
475449
}
476450

477451
def __init__(self, **kwargs):
478-
super(ErrorResponseError, self).__init__(**kwargs)
452+
super(ErrorDetail, self).__init__(**kwargs)
479453
self.code = None
480454
self.message = None
481455
self.target = None
482456
self.details = None
483457
self.additional_info = None
484458

485459

460+
class ErrorResponse(Model):
461+
"""Error response.
462+
463+
Common error response for all Azure Resource Manager APIs to return error
464+
details for failed operations. (This also follows the OData error response
465+
format.).
466+
467+
:param error: The error object.
468+
:type error: ~azure.mgmt.azurestackhci.models.ErrorDetail
469+
"""
470+
471+
_attribute_map = {
472+
'error': {'key': 'error', 'type': 'ErrorDetail'},
473+
}
474+
475+
def __init__(self, **kwargs):
476+
super(ErrorResponse, self).__init__(**kwargs)
477+
self.error = kwargs.get('error', None)
478+
479+
480+
class ErrorResponseException(HttpOperationError):
481+
"""Server responsed with exception of type: 'ErrorResponse'.
482+
483+
:param deserialize: A deserializer
484+
:param response: Server response to be deserialized.
485+
"""
486+
487+
def __init__(self, deserialize, response, *args):
488+
489+
super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)
490+
491+
486492
class OperationDetail(Model):
487493
"""Operation detail payload.
488494
@@ -544,19 +550,19 @@ def __init__(self, **kwargs):
544550

545551

546552
class ProxyResource(Resource):
547-
"""The resource model definition for a ARM proxy resource. It will have
548-
everything other than required location and tags.
553+
"""The resource model definition for an Azure Resource Manager proxy resource.
554+
It will have everything other than required location and tags.
549555
550556
Variables are only populated by the server, and will be ignored when
551557
sending a request.
552558
553-
:ivar id: Fully qualified resource Id for the resource. Ex -
559+
:ivar id: Fully qualified resource ID for the resource. Ex -
554560
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
555561
:vartype id: str
556562
:ivar name: The name of the resource
557563
:vartype name: str
558-
:ivar type: The type of the resource. Ex-
559-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
564+
:ivar type: The type of the resource. E.g.
565+
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
560566
:vartype type: str
561567
"""
562568

0 commit comments

Comments
 (0)