Skip to content

Commit

Permalink
CodeGen from PR 13184 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 4e26c5e6732b16c6e643f47a73dd3cea7ee0c9c9 into f0d04a6
  • Loading branch information
SDKAuto committed Mar 1, 2021
1 parent 19efd8c commit 7501c73
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 110 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
from ._models_py3 import ClusterReportedProperties
from ._models_py3 import ClusterUpdate
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorDetail
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import ErrorResponseError
from ._models_py3 import OperationDetail
from ._models_py3 import OperationDisplay
from ._models_py3 import ProxyResource
Expand All @@ -32,15 +32,16 @@
from ._models import ClusterReportedProperties
from ._models import ClusterUpdate
from ._models import ErrorAdditionalInfo
from ._models import ErrorDetail
from ._models import ErrorResponse, ErrorResponseException
from ._models import ErrorResponseError
from ._models import OperationDetail
from ._models import OperationDisplay
from ._models import ProxyResource
from ._models import Resource
from ._models import TrackedResource
from ._paged_models import ClusterPaged
from ._azure_stack_hci_client_enums import (
CreatedByType,
ProvisioningState,
Status,
)
Expand All @@ -53,14 +54,15 @@
'ClusterReportedProperties',
'ClusterUpdate',
'ErrorAdditionalInfo',
'ErrorDetail',
'ErrorResponse', 'ErrorResponseException',
'ErrorResponseError',
'OperationDetail',
'OperationDisplay',
'ProxyResource',
'Resource',
'TrackedResource',
'ClusterPaged',
'CreatedByType',
'ProvisioningState',
'Status',
]
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
from enum import Enum


class CreatedByType(str, Enum):

user = "User"
application = "Application"
managed_identity = "ManagedIdentity"
key = "Key"


class ProvisioningState(str, Enum):

succeeded = "Succeeded"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,19 @@ def __init__(self, **kwargs):
class Resource(Model):
"""Resource.
Common fields that are returned in the response for all Azure Resource
Manager resources.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
"""

Expand All @@ -71,19 +74,21 @@ def __init__(self, **kwargs):


class AzureEntityResource(Resource):
"""The resource model definition for a Azure Resource Manager resource with an
etag.
"""Entity Resource.
The resource model definition for an Azure Resource Manager resource with
an etag.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
:ivar etag: Resource Etag.
:vartype etag: str
Expand Down Expand Up @@ -117,20 +122,23 @@ class CloudError(Model):


class TrackedResource(Resource):
"""The resource model definition for a ARM tracked top level resource.
"""Tracked Resource.
The resource model definition for an Azure Resource Manager tracked top
level resource which has 'tags' and a 'location'.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Fully qualified resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
:param tags: Resource tags.
:type tags: dict[str, str]
Expand Down Expand Up @@ -167,18 +175,35 @@ class Cluster(TrackedResource):
All required parameters must be populated in order to send to Azure.
:ivar id: Fully qualified resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
:param tags: Resource tags.
:type tags: dict[str, str]
:param location: Required. The geo-location where the resource lives
:type location: str
:param created_by: The identity that created the resource.
:type created_by: str
:param created_by_type: The type of identity that created the resource.
Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
:type created_by_type: str or
~azure.mgmt.azurestackhci.models.CreatedByType
:param created_at: The timestamp of resource creation (UTC).
:type created_at: datetime
:param last_modified_by: The identity that last modified the resource.
:type last_modified_by: str
:param last_modified_by_type: The type of identity that last modified the
resource. Possible values include: 'User', 'Application',
'ManagedIdentity', 'Key'
:type last_modified_by_type: str or
~azure.mgmt.azurestackhci.models.CreatedByType
:param last_modified_at: The timestamp of resource last modification (UTC)
:type last_modified_at: datetime
:ivar provisioning_state: Provisioning state. Possible values include:
'Succeeded', 'Failed', 'Canceled', 'Accepted', 'Provisioning'
:vartype provisioning_state: str or
Expand Down Expand Up @@ -231,6 +256,12 @@ class Cluster(TrackedResource):
'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'location': {'key': 'location', 'type': 'str'},
'created_by': {'key': 'systemData.createdBy', 'type': 'str'},
'created_by_type': {'key': 'systemData.createdByType', 'type': 'str'},
'created_at': {'key': 'systemData.createdAt', 'type': 'iso-8601'},
'last_modified_by': {'key': 'systemData.lastModifiedBy', 'type': 'str'},
'last_modified_by_type': {'key': 'systemData.lastModifiedByType', 'type': 'str'},
'last_modified_at': {'key': 'systemData.lastModifiedAt', 'type': 'iso-8601'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'str'},
'cloud_id': {'key': 'properties.cloudId', 'type': 'str'},
Expand All @@ -246,6 +277,12 @@ class Cluster(TrackedResource):

def __init__(self, **kwargs):
super(Cluster, self).__init__(**kwargs)
self.created_by = kwargs.get('created_by', None)
self.created_by_type = kwargs.get('created_by_type', None)
self.created_at = kwargs.get('created_at', None)
self.last_modified_by = kwargs.get('last_modified_by', None)
self.last_modified_by_type = kwargs.get('last_modified_by_type', None)
self.last_modified_at = kwargs.get('last_modified_at', None)
self.provisioning_state = None
self.status = None
self.cloud_id = None
Expand Down Expand Up @@ -411,36 +448,8 @@ def __init__(self, **kwargs):
self.info = None


class ErrorResponse(Model):
"""The resource management error response.
:param error: The error object.
:type error: ~azure.mgmt.azurestackhci.models.ErrorResponseError
"""

_attribute_map = {
'error': {'key': 'error', 'type': 'ErrorResponseError'},
}

def __init__(self, **kwargs):
super(ErrorResponse, self).__init__(**kwargs)
self.error = kwargs.get('error', None)


class ErrorResponseException(HttpOperationError):
"""Server responsed with exception of type: 'ErrorResponse'.
:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)


class ErrorResponseError(Model):
"""The error object.
class ErrorDetail(Model):
"""The error detail.
Variables are only populated by the server, and will be ignored when
sending a request.
Expand All @@ -452,7 +461,7 @@ class ErrorResponseError(Model):
:ivar target: The error target.
:vartype target: str
:ivar details: The error details.
:vartype details: list[~azure.mgmt.azurestackhci.models.ErrorResponse]
:vartype details: list[~azure.mgmt.azurestackhci.models.ErrorDetail]
:ivar additional_info: The error additional info.
:vartype additional_info:
list[~azure.mgmt.azurestackhci.models.ErrorAdditionalInfo]
Expand All @@ -470,19 +479,51 @@ class ErrorResponseError(Model):
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorResponse]'},
'details': {'key': 'details', 'type': '[ErrorDetail]'},
'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'},
}

def __init__(self, **kwargs):
super(ErrorResponseError, self).__init__(**kwargs)
super(ErrorDetail, self).__init__(**kwargs)
self.code = None
self.message = None
self.target = None
self.details = None
self.additional_info = None


class ErrorResponse(Model):
"""Error response.
Common error response for all Azure Resource Manager APIs to return error
details for failed operations. (This also follows the OData error response
format.).
:param error: The error object.
:type error: ~azure.mgmt.azurestackhci.models.ErrorDetail
"""

_attribute_map = {
'error': {'key': 'error', 'type': 'ErrorDetail'},
}

def __init__(self, **kwargs):
super(ErrorResponse, self).__init__(**kwargs)
self.error = kwargs.get('error', None)


class ErrorResponseException(HttpOperationError):
"""Server responsed with exception of type: 'ErrorResponse'.
:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)


class OperationDetail(Model):
"""Operation detail payload.
Expand Down Expand Up @@ -544,19 +585,21 @@ def __init__(self, **kwargs):


class ProxyResource(Resource):
"""The resource model definition for a ARM proxy resource. It will have
everything other than required location and tags.
"""Proxy Resource.
The resource model definition for a Azure Resource Manager proxy resource.
It will not have tags and a location.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
"""

Expand Down
Loading

0 comments on commit 7501c73

Please sign in to comment.