diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/__init__.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/__init__.py index 33a6cc06425b..a5ee2d0a84fc 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/__init__.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .mixed_reality_client import MixedRealityClient -from .version import VERSION +from ._configuration import MixedRealityClientConfiguration +from ._mixed_reality_client import MixedRealityClient +__all__ = ['MixedRealityClient', 'MixedRealityClientConfiguration'] -__all__ = ['MixedRealityClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_configuration.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_configuration.py new file mode 100644 index 000000000000..dd862302ac17 --- /dev/null +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class MixedRealityClientConfiguration(AzureConfiguration): + """Configuration for MixedRealityClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(MixedRealityClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-mixedreality/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_mixed_reality_client.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_mixed_reality_client.py new file mode 100644 index 000000000000..128b188a7c10 --- /dev/null +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_mixed_reality_client.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import MixedRealityClientConfiguration +from .operations import MixedRealityClientOperationsMixin +from .operations import Operations +from .operations import SpatialAnchorsAccountsOperations +from . import models + + +class MixedRealityClient(MixedRealityClientOperationsMixin, SDKClient): + """Mixed Reality Client + + :ivar config: Configuration for client. + :vartype config: MixedRealityClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.mixedreality.operations.Operations + :ivar spatial_anchors_accounts: SpatialAnchorsAccounts operations + :vartype spatial_anchors_accounts: azure.mgmt.mixedreality.operations.SpatialAnchorsAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = MixedRealityClientConfiguration(credentials, subscription_id, base_url) + super(MixedRealityClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-02-28-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.spatial_anchors_accounts = SpatialAnchorsAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/__init__.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/__init__.py index 2f6f1ed0fa1c..178176a57191 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/__init__.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/__init__.py @@ -10,50 +10,50 @@ # -------------------------------------------------------------------------- try: - from .check_name_availability_request_py3 import CheckNameAvailabilityRequest - from .check_name_availability_response_py3 import CheckNameAvailabilityResponse - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .spatial_anchors_account_py3 import SpatialAnchorsAccount - from .spatial_anchors_account_keys_py3 import SpatialAnchorsAccountKeys - from .spatial_anchors_account_key_regenerate_request_py3 import SpatialAnchorsAccountKeyRegenerateRequest - from .proxy_resource_py3 import ProxyResource - from .azure_entity_resource_py3 import AzureEntityResource - from .resource_py3 import Resource - from .tracked_resource_py3 import TrackedResource + from ._models_py3 import AzureEntityResource + from ._models_py3 import CheckNameAvailabilityRequest + from ._models_py3 import CheckNameAvailabilityResponse + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import ProxyResource + from ._models_py3 import Resource + from ._models_py3 import SpatialAnchorsAccount + from ._models_py3 import SpatialAnchorsAccountKeyRegenerateRequest + from ._models_py3 import SpatialAnchorsAccountKeys + from ._models_py3 import TrackedResource except (SyntaxError, ImportError): - from .check_name_availability_request import CheckNameAvailabilityRequest - from .check_name_availability_response import CheckNameAvailabilityResponse - from .error_response import ErrorResponse, ErrorResponseException - from .operation_display import OperationDisplay - from .operation import Operation - from .spatial_anchors_account import SpatialAnchorsAccount - from .spatial_anchors_account_keys import SpatialAnchorsAccountKeys - from .spatial_anchors_account_key_regenerate_request import SpatialAnchorsAccountKeyRegenerateRequest - from .proxy_resource import ProxyResource - from .azure_entity_resource import AzureEntityResource - from .resource import Resource - from .tracked_resource import TrackedResource -from .operation_paged import OperationPaged -from .spatial_anchors_account_paged import SpatialAnchorsAccountPaged -from .mixed_reality_client_enums import ( + from ._models import AzureEntityResource + from ._models import CheckNameAvailabilityRequest + from ._models import CheckNameAvailabilityResponse + from ._models import ErrorResponse, ErrorResponseException + from ._models import Operation + from ._models import OperationDisplay + from ._models import ProxyResource + from ._models import Resource + from ._models import SpatialAnchorsAccount + from ._models import SpatialAnchorsAccountKeyRegenerateRequest + from ._models import SpatialAnchorsAccountKeys + from ._models import TrackedResource +from ._paged_models import OperationPaged +from ._paged_models import SpatialAnchorsAccountPaged +from ._mixed_reality_client_enums import ( NameAvailability, NameUnavailableReason, ) __all__ = [ + 'AzureEntityResource', 'CheckNameAvailabilityRequest', 'CheckNameAvailabilityResponse', 'ErrorResponse', 'ErrorResponseException', - 'OperationDisplay', 'Operation', - 'SpatialAnchorsAccount', - 'SpatialAnchorsAccountKeys', - 'SpatialAnchorsAccountKeyRegenerateRequest', + 'OperationDisplay', 'ProxyResource', - 'AzureEntityResource', 'Resource', + 'SpatialAnchorsAccount', + 'SpatialAnchorsAccountKeyRegenerateRequest', + 'SpatialAnchorsAccountKeys', 'TrackedResource', 'OperationPaged', 'SpatialAnchorsAccountPaged', diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/mixed_reality_client_enums.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_mixed_reality_client_enums.py similarity index 100% rename from sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/mixed_reality_client_enums.py rename to sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_mixed_reality_client_enums.py diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models.py new file mode 100644 index 000000000000..9d2276f002f0 --- /dev/null +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models.py @@ -0,0 +1,438 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """Resource. + + 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 - + /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. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """The resource model definition for a 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 - + /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. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CheckNameAvailabilityRequest(Model): + """Check Name Availability Request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Resource Name To Verify + :type name: str + :param type: Required. Fully qualified resource type which includes + provider namespace + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class CheckNameAvailabilityResponse(Model): + """Check Name Availability Response. + + All required parameters must be populated in order to send to Azure. + + :param name_available: Required. if name Available. Possible values + include: 'true', 'false' + :type name_available: str or + ~azure.mgmt.mixedreality.models.NameAvailability + :param reason: Resource Name To Verify. Possible values include: + 'Invalid', 'AlreadyExists' + :type reason: str or ~azure.mgmt.mixedreality.models.NameUnavailableReason + :param message: detail message + :type message: str + """ + + _validation = { + 'name_available': {'required': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorResponse(Model): + """Response on Error. + + All required parameters must be populated in order to send to Azure. + + :param message: Required. Describes the error in detail and provides + debugging information + :type message: str + :param code: Required. String that can be used to programmatically + identify the error. + :type code: str + :param target: The target of the particular error + :type target: str + :param details: An array of JSON objects that MUST contain name/value + pairs for code and message, and MAY contain a name/value pair for target, + as described above.The contents of this section are service-defined but + must adhere to the aforementioned schema. + :type details: str + """ + + _validation = { + 'message': {'required': True}, + 'code': {'required': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', 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 Operation(Model): + """REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.mixedreality.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + All required parameters must be populated in order to send to Azure. + + :param provider: Required. Service provider: Microsoft.ResourceProvider + :type provider: str + :param resource: Required. Resource on which the operation is performed: + Profile, endpoint, etc. + :type resource: str + :param operation: Required. Operation type: Read, write, delete, etc. + :type operation: str + :param description: Required. Description of operation + :type description: str + """ + + _validation = { + 'provider': {'required': True}, + 'resource': {'required': True}, + 'operation': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + 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 - + /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. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + 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 - + /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. + :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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + + +class SpatialAnchorsAccount(TrackedResource): + """SpatialAnchorsAccount Response. + + 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 - + /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. + :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 + :ivar account_id: unique id of certain Spatial Anchors Account data + contract. + :vartype account_id: str + :ivar account_domain: Correspond domain name of certain Spatial Anchors + Account + :vartype account_domain: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'account_id': {'readonly': True}, + 'account_domain': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'account_domain': {'key': 'properties.accountDomain', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SpatialAnchorsAccount, self).__init__(**kwargs) + self.account_id = None + self.account_domain = None + + +class SpatialAnchorsAccountKeyRegenerateRequest(Model): + """Spatial Anchors Account Regenerate Key. + + :param serial: serial of key to be regenerated. Default value: 1 . + :type serial: int + """ + + _attribute_map = { + 'serial': {'key': 'serial', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SpatialAnchorsAccountKeyRegenerateRequest, self).__init__(**kwargs) + self.serial = kwargs.get('serial', 1) + + +class SpatialAnchorsAccountKeys(Model): + """Spatial Anchors Account Keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_key: value of primary key. + :vartype primary_key: str + :ivar secondary_key: value of secondary key. + :vartype secondary_key: str + """ + + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SpatialAnchorsAccountKeys, self).__init__(**kwargs) + self.primary_key = None + self.secondary_key = None diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models_py3.py new file mode 100644 index 000000000000..5175f8784a30 --- /dev/null +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models_py3.py @@ -0,0 +1,438 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """Resource. + + 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 - + /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. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """The resource model definition for a 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 - + /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. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CheckNameAvailabilityRequest(Model): + """Check Name Availability Request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Resource Name To Verify + :type name: str + :param type: Required. Fully qualified resource type which includes + provider namespace + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str, type: str, **kwargs) -> None: + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + + +class CheckNameAvailabilityResponse(Model): + """Check Name Availability Response. + + All required parameters must be populated in order to send to Azure. + + :param name_available: Required. if name Available. Possible values + include: 'true', 'false' + :type name_available: str or + ~azure.mgmt.mixedreality.models.NameAvailability + :param reason: Resource Name To Verify. Possible values include: + 'Invalid', 'AlreadyExists' + :type reason: str or ~azure.mgmt.mixedreality.models.NameUnavailableReason + :param message: detail message + :type message: str + """ + + _validation = { + 'name_available': {'required': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, name_available, reason=None, message: str=None, **kwargs) -> None: + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorResponse(Model): + """Response on Error. + + All required parameters must be populated in order to send to Azure. + + :param message: Required. Describes the error in detail and provides + debugging information + :type message: str + :param code: Required. String that can be used to programmatically + identify the error. + :type code: str + :param target: The target of the particular error + :type target: str + :param details: An array of JSON objects that MUST contain name/value + pairs for code and message, and MAY contain a name/value pair for target, + as described above.The contents of this section are service-defined but + must adhere to the aforementioned schema. + :type details: str + """ + + _validation = { + 'message': {'required': True}, + 'code': {'required': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__(self, *, message: str, code: str, target: str=None, details: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.message = message + self.code = code + self.target = target + self.details = details + + +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 Operation(Model): + """REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.mixedreality.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + All required parameters must be populated in order to send to Azure. + + :param provider: Required. Service provider: Microsoft.ResourceProvider + :type provider: str + :param resource: Required. Resource on which the operation is performed: + Profile, endpoint, etc. + :type resource: str + :param operation: Required. Operation type: Read, write, delete, etc. + :type operation: str + :param description: Required. Description of operation + :type description: str + """ + + _validation = { + 'provider': {'required': True}, + 'resource': {'required': True}, + 'operation': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str, resource: str, operation: str, description: str, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + 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 - + /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. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + 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 - + /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. + :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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class SpatialAnchorsAccount(TrackedResource): + """SpatialAnchorsAccount Response. + + 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 - + /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. + :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 + :ivar account_id: unique id of certain Spatial Anchors Account data + contract. + :vartype account_id: str + :ivar account_domain: Correspond domain name of certain Spatial Anchors + Account + :vartype account_domain: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'account_id': {'readonly': True}, + 'account_domain': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'account_domain': {'key': 'properties.accountDomain', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(SpatialAnchorsAccount, self).__init__(tags=tags, location=location, **kwargs) + self.account_id = None + self.account_domain = None + + +class SpatialAnchorsAccountKeyRegenerateRequest(Model): + """Spatial Anchors Account Regenerate Key. + + :param serial: serial of key to be regenerated. Default value: 1 . + :type serial: int + """ + + _attribute_map = { + 'serial': {'key': 'serial', 'type': 'int'}, + } + + def __init__(self, *, serial: int=1, **kwargs) -> None: + super(SpatialAnchorsAccountKeyRegenerateRequest, self).__init__(**kwargs) + self.serial = serial + + +class SpatialAnchorsAccountKeys(Model): + """Spatial Anchors Account Keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_key: value of primary key. + :vartype primary_key: str + :ivar secondary_key: value of secondary key. + :vartype secondary_key: str + """ + + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SpatialAnchorsAccountKeys, self).__init__(**kwargs) + self.primary_key = None + self.secondary_key = None diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_paged.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_paged_models.py similarity index 70% rename from sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_paged.py rename to sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_paged_models.py index 4cabf7994f92..66d6437f416a 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_paged.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_paged_models.py @@ -12,6 +12,19 @@ from msrest.paging import Paged +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) class SpatialAnchorsAccountPaged(Paged): """ A paging container for iterating over a list of :class:`SpatialAnchorsAccount ` object diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/azure_entity_resource.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/azure_entity_resource.py deleted file mode 100644 index 3bffaab8d35b..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/azure_entity_resource.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class AzureEntityResource(Resource): - """The resource model definition for a 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 - - /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. - :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureEntityResource, self).__init__(**kwargs) - self.etag = None diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/azure_entity_resource_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/azure_entity_resource_py3.py deleted file mode 100644 index d3f80d87498a..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/azure_entity_resource_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class AzureEntityResource(Resource): - """The resource model definition for a 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 - - /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. - :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AzureEntityResource, self).__init__(**kwargs) - self.etag = None diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/check_name_availability_request.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/check_name_availability_request.py deleted file mode 100644 index e1aa259520cb..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/check_name_availability_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityRequest(Model): - """Check Name Availability Request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource Name To Verify - :type name: str - :param type: Required. Fully qualified resource type which includes - provider namespace - :type type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/check_name_availability_request_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/check_name_availability_request_py3.py deleted file mode 100644 index dac0f4c44698..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/check_name_availability_request_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityRequest(Model): - """Check Name Availability Request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource Name To Verify - :type name: str - :param type: Required. Fully qualified resource type which includes - provider namespace - :type type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str, type: str, **kwargs) -> None: - super(CheckNameAvailabilityRequest, self).__init__(**kwargs) - self.name = name - self.type = type diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/check_name_availability_response.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/check_name_availability_response.py deleted file mode 100644 index a59f17979408..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/check_name_availability_response.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResponse(Model): - """Check Name Availability Response. - - All required parameters must be populated in order to send to Azure. - - :param name_available: Required. if name Available. Possible values - include: 'true', 'false' - :type name_available: str or - ~azure.mgmt.mixedreality.models.NameAvailability - :param reason: Resource Name To Verify. Possible values include: - 'Invalid', 'AlreadyExists' - :type reason: str or ~azure.mgmt.mixedreality.models.NameUnavailableReason - :param message: detail message - :type message: str - """ - - _validation = { - 'name_available': {'required': True}, - } - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) - self.message = kwargs.get('message', None) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/check_name_availability_response_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/check_name_availability_response_py3.py deleted file mode 100644 index 5f4a2d747e2b..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/check_name_availability_response_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CheckNameAvailabilityResponse(Model): - """Check Name Availability Response. - - All required parameters must be populated in order to send to Azure. - - :param name_available: Required. if name Available. Possible values - include: 'true', 'false' - :type name_available: str or - ~azure.mgmt.mixedreality.models.NameAvailability - :param reason: Resource Name To Verify. Possible values include: - 'Invalid', 'AlreadyExists' - :type reason: str or ~azure.mgmt.mixedreality.models.NameUnavailableReason - :param message: detail message - :type message: str - """ - - _validation = { - 'name_available': {'required': True}, - } - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, name_available, reason=None, message: str=None, **kwargs) -> None: - super(CheckNameAvailabilityResponse, self).__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/error_response.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/error_response.py deleted file mode 100644 index 2b634c9e8d3f..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/error_response.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Response on Error. - - All required parameters must be populated in order to send to Azure. - - :param message: Required. Describes the error in detail and provides - debugging information - :type message: str - :param code: Required. String that can be used to programmatically - identify the error. - :type code: str - :param target: The target of the particular error - :type target: str - :param details: An array of JSON objects that MUST contain name/value - pairs for code and message, and MAY contain a name/value pair for target, - as described above.The contents of this section are service-defined but - must adhere to the aforementioned schema. - :type details: str - """ - - _validation = { - 'message': {'required': True}, - 'code': {'required': True}, - } - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', 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) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/error_response_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/error_response_py3.py deleted file mode 100644 index 1ef7fa39db89..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/error_response_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Response on Error. - - All required parameters must be populated in order to send to Azure. - - :param message: Required. Describes the error in detail and provides - debugging information - :type message: str - :param code: Required. String that can be used to programmatically - identify the error. - :type code: str - :param target: The target of the particular error - :type target: str - :param details: An array of JSON objects that MUST contain name/value - pairs for code and message, and MAY contain a name/value pair for target, - as described above.The contents of this section are service-defined but - must adhere to the aforementioned schema. - :type details: str - """ - - _validation = { - 'message': {'required': True}, - 'code': {'required': True}, - } - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - } - - def __init__(self, *, message: str, code: str, target: str=None, details: str=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.message = message - self.code = code - self.target = target - self.details = details - - -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) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation.py deleted file mode 100644 index 2b9435bd2d7a..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.mixedreality.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation_display.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation_display.py deleted file mode 100644 index 29348349a9fe..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation_display.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - All required parameters must be populated in order to send to Azure. - - :param provider: Required. Service provider: Microsoft.ResourceProvider - :type provider: str - :param resource: Required. Resource on which the operation is performed: - Profile, endpoint, etc. - :type resource: str - :param operation: Required. Operation type: Read, write, delete, etc. - :type operation: str - :param description: Required. Description of operation - :type description: str - """ - - _validation = { - 'provider': {'required': True}, - 'resource': {'required': True}, - 'operation': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation_display_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation_display_py3.py deleted file mode 100644 index f65eae9bd2e5..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation_display_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - All required parameters must be populated in order to send to Azure. - - :param provider: Required. Service provider: Microsoft.ResourceProvider - :type provider: str - :param resource: Required. Resource on which the operation is performed: - Profile, endpoint, etc. - :type resource: str - :param operation: Required. Operation type: Read, write, delete, etc. - :type operation: str - :param description: Required. Description of operation - :type description: str - """ - - _validation = { - 'provider': {'required': True}, - 'resource': {'required': True}, - 'operation': {'required': True}, - 'description': {'required': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str, resource: str, operation: str, description: str, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation_paged.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation_paged.py deleted file mode 100644 index dee538fcd455..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation_py3.py deleted file mode 100644 index c53c28916c17..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/operation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.mixedreality.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/proxy_resource.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/proxy_resource.py deleted file mode 100644 index 0de8fb6bd420..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/proxy_resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - 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 - - /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. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/proxy_resource_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/proxy_resource_py3.py deleted file mode 100644 index 2e8391f912d6..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/proxy_resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - 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 - - /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. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/resource.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/resource.py deleted file mode 100644 index 9333a2ac49ef..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/resource.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """Resource. - - 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 - - /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. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/resource_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/resource_py3.py deleted file mode 100644 index 370e6c506581..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/resource_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """Resource. - - 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 - - /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. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account.py deleted file mode 100644 index 89d874459fb0..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource import TrackedResource - - -class SpatialAnchorsAccount(TrackedResource): - """SpatialAnchorsAccount Response. - - 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 - - /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. - :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 - :ivar account_id: unique id of certain Spatial Anchors Account data - contract. - :vartype account_id: str - :ivar account_domain: Correspond domain name of certain Spatial Anchors - Account - :vartype account_domain: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'account_id': {'readonly': True}, - 'account_domain': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'account_id': {'key': 'properties.accountId', 'type': 'str'}, - 'account_domain': {'key': 'properties.accountDomain', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SpatialAnchorsAccount, self).__init__(**kwargs) - self.account_id = None - self.account_domain = None diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_key_regenerate_request.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_key_regenerate_request.py deleted file mode 100644 index 1a92b80bdbcf..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_key_regenerate_request.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SpatialAnchorsAccountKeyRegenerateRequest(Model): - """Spatial Anchors Account Regenerate Key. - - :param serial: serial of key to be regenerated. Default value: 1 . - :type serial: int - """ - - _attribute_map = { - 'serial': {'key': 'serial', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SpatialAnchorsAccountKeyRegenerateRequest, self).__init__(**kwargs) - self.serial = kwargs.get('serial', 1) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_key_regenerate_request_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_key_regenerate_request_py3.py deleted file mode 100644 index dea9cfd09e20..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_key_regenerate_request_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SpatialAnchorsAccountKeyRegenerateRequest(Model): - """Spatial Anchors Account Regenerate Key. - - :param serial: serial of key to be regenerated. Default value: 1 . - :type serial: int - """ - - _attribute_map = { - 'serial': {'key': 'serial', 'type': 'int'}, - } - - def __init__(self, *, serial: int=1, **kwargs) -> None: - super(SpatialAnchorsAccountKeyRegenerateRequest, self).__init__(**kwargs) - self.serial = serial diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_keys.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_keys.py deleted file mode 100644 index 26bbc99148aa..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_keys.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SpatialAnchorsAccountKeys(Model): - """Spatial Anchors Account Keys. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_key: value of primary key. - :vartype primary_key: str - :ivar secondary_key: value of secondary key. - :vartype secondary_key: str - """ - - _validation = { - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SpatialAnchorsAccountKeys, self).__init__(**kwargs) - self.primary_key = None - self.secondary_key = None diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_keys_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_keys_py3.py deleted file mode 100644 index 8ac66b434626..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_keys_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SpatialAnchorsAccountKeys(Model): - """Spatial Anchors Account Keys. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_key: value of primary key. - :vartype primary_key: str - :ivar secondary_key: value of secondary key. - :vartype secondary_key: str - """ - - _validation = { - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SpatialAnchorsAccountKeys, self).__init__(**kwargs) - self.primary_key = None - self.secondary_key = None diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_py3.py deleted file mode 100644 index 8d590b1ad68a..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/spatial_anchors_account_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .tracked_resource_py3 import TrackedResource - - -class SpatialAnchorsAccount(TrackedResource): - """SpatialAnchorsAccount Response. - - 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 - - /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. - :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 - :ivar account_id: unique id of certain Spatial Anchors Account data - contract. - :vartype account_id: str - :ivar account_domain: Correspond domain name of certain Spatial Anchors - Account - :vartype account_domain: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'account_id': {'readonly': True}, - 'account_domain': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'account_id': {'key': 'properties.accountId', 'type': 'str'}, - 'account_domain': {'key': 'properties.accountDomain', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(SpatialAnchorsAccount, self).__init__(tags=tags, location=location, **kwargs) - self.account_id = None - self.account_domain = None diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/tracked_resource.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/tracked_resource.py deleted file mode 100644 index 27ab94c7a8dd..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/tracked_resource.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - 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 - - /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. - :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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/tracked_resource_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/tracked_resource_py3.py deleted file mode 100644 index b28cc1859448..000000000000 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/tracked_resource_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - 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 - - /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. - :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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/__init__.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/__init__.py index 9e026b5e32a6..230647219945 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/__init__.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/__init__.py @@ -9,10 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .spatial_anchors_accounts_operations import SpatialAnchorsAccountsOperations +from ._operations import Operations +from ._spatial_anchors_accounts_operations import SpatialAnchorsAccountsOperations +from ._mixed_reality_client_operations import MixedRealityClientOperationsMixin __all__ = [ 'Operations', 'SpatialAnchorsAccountsOperations', + 'MixedRealityClientOperationsMixin', ] diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/mixed_reality_client.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_mixed_reality_client_operations.py similarity index 56% rename from sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/mixed_reality_client.py rename to sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_mixed_reality_client_operations.py index 596e34b0a66f..3adceb81461b 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/mixed_reality_client.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_mixed_reality_client_operations.py @@ -9,83 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION from msrest.pipeline import ClientRawResponse +from .. import models import uuid -from .operations.operations import Operations -from .operations.spatial_anchors_accounts_operations import SpatialAnchorsAccountsOperations -from . import models -class MixedRealityClientConfiguration(AzureConfiguration): - """Configuration for MixedRealityClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(MixedRealityClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-mixedreality/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class MixedRealityClient(SDKClient): - """Mixed Reality Client - - :ivar config: Configuration for client. - :vartype config: MixedRealityClientConfiguration - - :ivar operations: Operations operations - :vartype operations: azure.mgmt.mixedreality.operations.Operations - :ivar spatial_anchors_accounts: SpatialAnchorsAccounts operations - :vartype spatial_anchors_accounts: azure.mgmt.mixedreality.operations.SpatialAnchorsAccountsOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = MixedRealityClientConfiguration(credentials, subscription_id, base_url) - super(MixedRealityClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-02-28-preview' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) - self.spatial_anchors_accounts = SpatialAnchorsAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) +class MixedRealityClientOperationsMixin(object): def check_name_availability_local( self, location, name, type, custom_headers=None, raw=False, **operation_config): @@ -146,7 +75,6 @@ def check_name_availability_local( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResponse', response) diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/operations.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_operations.py similarity index 90% rename from sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/operations.py rename to sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_operations.py index 50c1145c401a..97cfb9a611cd 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/operations.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_operations.py @@ -18,6 +18,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -85,12 +91,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.MixedReality/operations'} diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/spatial_anchors_accounts_operations.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_spatial_anchors_accounts_operations.py similarity index 97% rename from sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/spatial_anchors_accounts_operations.py rename to sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_spatial_anchors_accounts_operations.py index 942be4085044..59855c7264ed 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/spatial_anchors_accounts_operations.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_spatial_anchors_accounts_operations.py @@ -18,6 +18,8 @@ class SpatialAnchorsAccountsOperations(object): """SpatialAnchorsAccountsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list_by_subscription( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -89,12 +95,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SpatialAnchorsAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SpatialAnchorsAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SpatialAnchorsAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/spatialAnchorsAccounts'} @@ -116,8 +120,7 @@ def list_by_resource_group( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -147,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -155,12 +163,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SpatialAnchorsAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SpatialAnchorsAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SpatialAnchorsAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts'} @@ -269,7 +275,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SpatialAnchorsAccount', response) @@ -341,7 +346,6 @@ def update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SpatialAnchorsAccount', response) @@ -413,7 +417,6 @@ def create( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SpatialAnchorsAccount', response) if response.status_code == 201: @@ -477,7 +480,6 @@ def get_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SpatialAnchorsAccountKeys', response) @@ -547,7 +549,6 @@ def regenerate_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SpatialAnchorsAccountKeys', response)