diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/MANIFEST.in b/sdk/mixedreality/azure-mgmt-mixedreality/MANIFEST.in index fa6ea7e65b7a..a3cb07df8765 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/MANIFEST.in +++ b/sdk/mixedreality/azure-mgmt-mixedreality/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include tests *.py *.yaml include *.md include azure/__init__.py include azure/mgmt/__init__.py diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/README.md b/sdk/mixedreality/azure-mgmt-mixedreality/README.md index f5d69ea236ef..b6a797b2bf69 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/README.md +++ b/sdk/mixedreality/azure-mgmt-mixedreality/README.md @@ -1,29 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure Mixed Reality Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. +For code examples, see [Mixed Reality Management](https://docs.microsoft.com/python/api/overview/azure/) +on docs.microsoft.com. -For a more complete set of Azure libraries, see the -[azure](https://pypi.python.org/pypi/azure) bundle package. -## Usage +# Provide Feedback -For code examples, see [Mixed Reality -Management](https://docs.microsoft.com/python/api/overview/azure/) on -docs.microsoft.com. - -## Provide Feedback - -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-mixedreality%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-mixedreality%2FREADME.png) 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..80618f203395 --- /dev/null +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_configuration.py @@ -0,0 +1,49 @@ +# 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: The Azure subscription ID. This is a + GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + :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..3d5046fdace8 --- /dev/null +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/_mixed_reality_client.py @@ -0,0 +1,60 @@ +# 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 .operations import RemoteRenderingAccountsOperations +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 + :ivar remote_rendering_accounts: RemoteRenderingAccounts operations + :vartype remote_rendering_accounts: azure.mgmt.mixedreality.operations.RemoteRenderingAccountsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The Azure subscription ID. This is a + GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + :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._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) + self.remote_rendering_accounts = RemoteRenderingAccountsOperations( + 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..fb9b522306dc 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,53 +10,83 @@ # -------------------------------------------------------------------------- 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 AccountKeyRegenerateRequest + from ._models_py3 import AccountKeys + from ._models_py3 import AzureEntityResource + from ._models_py3 import CheckNameAvailabilityRequest + from ._models_py3 import CheckNameAvailabilityResponse + from ._models_py3 import Identity + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import Plan + from ._models_py3 import ProxyResource + from ._models_py3 import RemoteRenderingAccount + from ._models_py3 import RemoteRenderingAccountIdentity + from ._models_py3 import Resource + from ._models_py3 import ResourceModelWithAllowedPropertySet + from ._models_py3 import ResourceModelWithAllowedPropertySetIdentity + from ._models_py3 import ResourceModelWithAllowedPropertySetPlan + from ._models_py3 import ResourceModelWithAllowedPropertySetSku + from ._models_py3 import Sku + from ._models_py3 import SpatialAnchorsAccount + 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 AccountKeyRegenerateRequest + from ._models import AccountKeys + from ._models import AzureEntityResource + from ._models import CheckNameAvailabilityRequest + from ._models import CheckNameAvailabilityResponse + from ._models import Identity + from ._models import Operation + from ._models import OperationDisplay + from ._models import Plan + from ._models import ProxyResource + from ._models import RemoteRenderingAccount + from ._models import RemoteRenderingAccountIdentity + from ._models import Resource + from ._models import ResourceModelWithAllowedPropertySet + from ._models import ResourceModelWithAllowedPropertySetIdentity + from ._models import ResourceModelWithAllowedPropertySetPlan + from ._models import ResourceModelWithAllowedPropertySetSku + from ._models import Sku + from ._models import SpatialAnchorsAccount + from ._models import TrackedResource +from ._paged_models import OperationPaged +from ._paged_models import RemoteRenderingAccountPaged +from ._paged_models import SpatialAnchorsAccountPaged +from ._mixed_reality_client_enums import ( NameAvailability, NameUnavailableReason, + SkuTier, + ResourceIdentityType, ) __all__ = [ + 'AccountKeyRegenerateRequest', + 'AccountKeys', + 'AzureEntityResource', 'CheckNameAvailabilityRequest', 'CheckNameAvailabilityResponse', - 'ErrorResponse', 'ErrorResponseException', - 'OperationDisplay', + 'Identity', 'Operation', - 'SpatialAnchorsAccount', - 'SpatialAnchorsAccountKeys', - 'SpatialAnchorsAccountKeyRegenerateRequest', + 'OperationDisplay', + 'Plan', 'ProxyResource', - 'AzureEntityResource', + 'RemoteRenderingAccount', + 'RemoteRenderingAccountIdentity', 'Resource', + 'ResourceModelWithAllowedPropertySet', + 'ResourceModelWithAllowedPropertySetIdentity', + 'ResourceModelWithAllowedPropertySetPlan', + 'ResourceModelWithAllowedPropertySetSku', + 'Sku', + 'SpatialAnchorsAccount', 'TrackedResource', 'OperationPaged', 'SpatialAnchorsAccountPaged', + 'RemoteRenderingAccountPaged', 'NameAvailability', 'NameUnavailableReason', + 'SkuTier', + 'ResourceIdentityType', ] 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 77% 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 index ec9c0d08dad7..e91a8bd69683 100644 --- 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 @@ -22,3 +22,16 @@ class NameUnavailableReason(str, Enum): invalid = "Invalid" already_exists = "AlreadyExists" + + +class SkuTier(str, Enum): + + free = "Free" + basic = "Basic" + standard = "Standard" + premium = "Premium" + + +class ResourceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" 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..7a533b33bc69 --- /dev/null +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models.py @@ -0,0 +1,839 @@ +# 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 AccountKeyRegenerateRequest(Model): + """Request for account key regeneration. + + :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(AccountKeyRegenerateRequest, self).__init__(**kwargs) + self.serial = kwargs.get('serial', 1) + + +class AccountKeys(Model): + """Developer Keys of account. + + 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(AccountKeys, self).__init__(**kwargs) + self.primary_key = None + self.secondary_key = None + + +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): + """An Error response. + + :param error: + :type error: ~azure.mgmt.mixedreality.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from Azure. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for displaying in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.mixedreality.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.mixedreality.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +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 Plan(Model): + """Plan for the resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. A user defined name of the 3rd Party Artifact that + is being procured. + :type name: str + :param publisher: Required. The publisher of the 3rd Party Artifact that + is being bought. E.g. NewRelic + :type publisher: str + :param product: Required. The 3rd Party artifact that is being procured. + E.g. NewRelic. Product maps to the OfferID specified for the artifact at + the time of Data Market onboarding. + :type product: str + :param promotion_code: A publisher provided promotion code as provisioned + in Data Market for the said product/artifact. + :type promotion_code: str + :param version: The version of the desired product/artifact. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.promotion_code = kwargs.get('promotion_code', None) + self.version = kwargs.get('version', 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 RemoteRenderingAccount(TrackedResource): + """RemoteRenderingAccount 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 + :param identity: + :type identity: + ~azure.mgmt.mixedreality.models.RemoteRenderingAccountIdentity + :ivar account_id: unique id of certain account. + :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'}, + 'identity': {'key': 'identity', 'type': 'RemoteRenderingAccountIdentity'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'account_domain': {'key': 'properties.accountDomain', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RemoteRenderingAccount, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.account_id = None + self.account_domain = None + + +class RemoteRenderingAccountIdentity(Identity): + """RemoteRenderingAccountIdentity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.mixedreality.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, **kwargs): + super(RemoteRenderingAccountIdentity, self).__init__(**kwargs) + + +class ResourceModelWithAllowedPropertySet(Model): + """The resource model definition containing the full set of allowed properties + for a resource. Except properties bag, there cannot be a top level property + outside of this set. + + 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 + :param location: The geo-location where the resource lives + :type location: str + :param managed_by: The fully qualified resource ID of the resource that + manages this resource. Indicates if this resource is managed by another + azure resource. If this is present, complete mode deployment will not + delete the resource if it is removed from the template since it is managed + by another resource. + :type managed_by: str + :param kind: Metadata used by portal/tooling/etc to render different UX + experiences for resources of the same type; e.g. ApiApps are a kind of + Microsoft.Web/sites type. If supported, the resource provider must + validate and persist this value. + :type kind: str + :ivar etag: The etag field is *not* required. If it is provided in the + response body, it must also be provided as a header per the normal etag + convention. Entity tags are used for comparing two or more entities from + the same requested resource. HTTP/1.1 uses entity tags in the etag + (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + and If-Range (section 14.27) header fields. + :vartype etag: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: + :type identity: + ~azure.mgmt.mixedreality.models.ResourceModelWithAllowedPropertySetIdentity + :param sku: + :type sku: + ~azure.mgmt.mixedreality.models.ResourceModelWithAllowedPropertySetSku + :param plan: + :type plan: + ~azure.mgmt.mixedreality.models.ResourceModelWithAllowedPropertySetPlan + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, + 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, + 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, + } + + def __init__(self, **kwargs): + super(ResourceModelWithAllowedPropertySet, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.managed_by = kwargs.get('managed_by', None) + self.kind = kwargs.get('kind', None) + self.etag = None + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + + +class ResourceModelWithAllowedPropertySetIdentity(Identity): + """ResourceModelWithAllowedPropertySetIdentity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.mixedreality.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, **kwargs): + super(ResourceModelWithAllowedPropertySetIdentity, self).__init__(**kwargs) + + +class ResourceModelWithAllowedPropertySetPlan(Plan): + """ResourceModelWithAllowedPropertySetPlan. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. A user defined name of the 3rd Party Artifact that + is being procured. + :type name: str + :param publisher: Required. The publisher of the 3rd Party Artifact that + is being bought. E.g. NewRelic + :type publisher: str + :param product: Required. The 3rd Party artifact that is being procured. + E.g. NewRelic. Product maps to the OfferID specified for the artifact at + the time of Data Market onboarding. + :type product: str + :param promotion_code: A publisher provided promotion code as provisioned + in Data Market for the said product/artifact. + :type promotion_code: str + :param version: The version of the desired product/artifact. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceModelWithAllowedPropertySetPlan, self).__init__(**kwargs) + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + :type tier: str or ~azure.mgmt.mixedreality.models.SkuTier + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + + +class ResourceModelWithAllowedPropertySetSku(Sku): + """ResourceModelWithAllowedPropertySetSku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + :type tier: str or ~azure.mgmt.mixedreality.models.SkuTier + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ResourceModelWithAllowedPropertySetSku, self).__init__(**kwargs) + + +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 account. + :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/_models_py3.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models_py3.py new file mode 100644 index 000000000000..760611f3df0a --- /dev/null +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_models_py3.py @@ -0,0 +1,839 @@ +# 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 AccountKeyRegenerateRequest(Model): + """Request for account key regeneration. + + :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(AccountKeyRegenerateRequest, self).__init__(**kwargs) + self.serial = serial + + +class AccountKeys(Model): + """Developer Keys of account. + + 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(AccountKeys, self).__init__(**kwargs) + self.primary_key = None + self.secondary_key = None + + +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): + """An Error response. + + :param error: + :type error: ~azure.mgmt.mixedreality.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from Azure. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for displaying in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.mixedreality.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.mixedreality.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +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 Plan(Model): + """Plan for the resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. A user defined name of the 3rd Party Artifact that + is being procured. + :type name: str + :param publisher: Required. The publisher of the 3rd Party Artifact that + is being bought. E.g. NewRelic + :type publisher: str + :param product: Required. The 3rd Party artifact that is being procured. + E.g. NewRelic. Product maps to the OfferID specified for the artifact at + the time of Data Market onboarding. + :type product: str + :param promotion_code: A publisher provided promotion code as provisioned + in Data Market for the said product/artifact. + :type promotion_code: str + :param version: The version of the desired product/artifact. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, name: str, publisher: str, product: str, promotion_code: str=None, version: str=None, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + self.version = version + + +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 RemoteRenderingAccount(TrackedResource): + """RemoteRenderingAccount 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 + :param identity: + :type identity: + ~azure.mgmt.mixedreality.models.RemoteRenderingAccountIdentity + :ivar account_id: unique id of certain account. + :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'}, + 'identity': {'key': 'identity', 'type': 'RemoteRenderingAccountIdentity'}, + 'account_id': {'key': 'properties.accountId', 'type': 'str'}, + 'account_domain': {'key': 'properties.accountDomain', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, **kwargs) -> None: + super(RemoteRenderingAccount, self).__init__(tags=tags, location=location, **kwargs) + self.identity = identity + self.account_id = None + self.account_domain = None + + +class RemoteRenderingAccountIdentity(Identity): + """RemoteRenderingAccountIdentity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.mixedreality.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(RemoteRenderingAccountIdentity, self).__init__(type=type, **kwargs) + + +class ResourceModelWithAllowedPropertySet(Model): + """The resource model definition containing the full set of allowed properties + for a resource. Except properties bag, there cannot be a top level property + outside of this set. + + 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 + :param location: The geo-location where the resource lives + :type location: str + :param managed_by: The fully qualified resource ID of the resource that + manages this resource. Indicates if this resource is managed by another + azure resource. If this is present, complete mode deployment will not + delete the resource if it is removed from the template since it is managed + by another resource. + :type managed_by: str + :param kind: Metadata used by portal/tooling/etc to render different UX + experiences for resources of the same type; e.g. ApiApps are a kind of + Microsoft.Web/sites type. If supported, the resource provider must + validate and persist this value. + :type kind: str + :ivar etag: The etag field is *not* required. If it is provided in the + response body, it must also be provided as a header per the normal etag + convention. Entity tags are used for comparing two or more entities from + the same requested resource. HTTP/1.1 uses entity tags in the etag + (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + and If-Range (section 14.27) header fields. + :vartype etag: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: + :type identity: + ~azure.mgmt.mixedreality.models.ResourceModelWithAllowedPropertySetIdentity + :param sku: + :type sku: + ~azure.mgmt.mixedreality.models.ResourceModelWithAllowedPropertySetSku + :param plan: + :type plan: + ~azure.mgmt.mixedreality.models.ResourceModelWithAllowedPropertySetPlan + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, + 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, + 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, + } + + def __init__(self, *, location: str=None, managed_by: str=None, kind: str=None, tags=None, identity=None, sku=None, plan=None, **kwargs) -> None: + super(ResourceModelWithAllowedPropertySet, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.managed_by = managed_by + self.kind = kind + self.etag = None + self.tags = tags + self.identity = identity + self.sku = sku + self.plan = plan + + +class ResourceModelWithAllowedPropertySetIdentity(Identity): + """ResourceModelWithAllowedPropertySetIdentity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: 'SystemAssigned' + :type type: str or ~azure.mgmt.mixedreality.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ResourceModelWithAllowedPropertySetIdentity, self).__init__(type=type, **kwargs) + + +class ResourceModelWithAllowedPropertySetPlan(Plan): + """ResourceModelWithAllowedPropertySetPlan. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. A user defined name of the 3rd Party Artifact that + is being procured. + :type name: str + :param publisher: Required. The publisher of the 3rd Party Artifact that + is being bought. E.g. NewRelic + :type publisher: str + :param product: Required. The 3rd Party artifact that is being procured. + E.g. NewRelic. Product maps to the OfferID specified for the artifact at + the time of Data Market onboarding. + :type product: str + :param promotion_code: A publisher provided promotion code as provisioned + in Data Market for the said product/artifact. + :type promotion_code: str + :param version: The version of the desired product/artifact. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, name: str, publisher: str, product: str, promotion_code: str=None, version: str=None, **kwargs) -> None: + super(ResourceModelWithAllowedPropertySetPlan, self).__init__(name=name, publisher=publisher, product=product, promotion_code=promotion_code, version=version, **kwargs) + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + :type tier: str or ~azure.mgmt.mixedreality.models.SkuTier + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name: str, tier=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + + +class ResourceModelWithAllowedPropertySetSku(Sku): + """ResourceModelWithAllowedPropertySetSku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code + :type name: str + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. Possible values include: 'Free', 'Basic', 'Standard', 'Premium' + :type tier: str or ~azure.mgmt.mixedreality.models.SkuTier + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for + the same SKU, then that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name: str, tier=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: + super(ResourceModelWithAllowedPropertySetSku, self).__init__(name=name, tier=tier, size=size, family=family, capacity=capacity, **kwargs) + + +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 account. + :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/spatial_anchors_account_paged.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/_paged_models.py similarity index 52% 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..114d06454de2 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 @@ -25,3 +38,16 @@ class SpatialAnchorsAccountPaged(Paged): def __init__(self, *args, **kwargs): super(SpatialAnchorsAccountPaged, self).__init__(*args, **kwargs) +class RemoteRenderingAccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`RemoteRenderingAccount ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RemoteRenderingAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(RemoteRenderingAccountPaged, self).__init__(*args, **kwargs) 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..c631f886e3ad 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,14 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .spatial_anchors_accounts_operations import SpatialAnchorsAccountsOperations +from ._operations import Operations +from ._spatial_anchors_accounts_operations import SpatialAnchorsAccountsOperations +from ._remote_rendering_accounts_operations import RemoteRenderingAccountsOperations +from ._mixed_reality_client_operations import MixedRealityClientOperationsMixin __all__ = [ 'Operations', 'SpatialAnchorsAccountsOperations', + 'RemoteRenderingAccountsOperations', + '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 51% 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..cf0a12211932 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,87 +9,17 @@ # 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 msrestazure.azure_exceptions import CloudError +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): - """Check Name Availability for global uniqueness. + """Check Name Availability for local uniqueness. :param location: The location in which uniqueness will be verified. :type location: str @@ -107,11 +37,12 @@ def check_name_availability_local( raw=true :rtype: ~azure.mgmt.mixedreality.models.CheckNameAvailabilityResponse or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :raises: :class:`CloudError` """ check_name_availability = models.CheckNameAvailabilityRequest(name=name, type=type) + api_version = "2020-05-01" + # Construct URL url = self.check_name_availability_local.metadata['url'] path_format_arguments = { @@ -122,7 +53,7 @@ def check_name_availability_local( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -143,10 +74,11 @@ def check_name_availability_local( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp 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 79% 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..2b493ee32c92 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 @@ -11,6 +11,7 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError from .. import models @@ -18,11 +19,13 @@ 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. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-02-28-preview". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-05-01". """ models = models @@ -32,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-02-28-preview" + self.api_version = "2020-05-01" self.config = config @@ -48,11 +51,9 @@ def list( :return: An iterator like instance of Operation :rtype: ~azure.mgmt.mixedreality.models.OperationPaged[~azure.mgmt.mixedreality.models.Operation] - :raises: - :class:`ErrorResponseException` + :raises: :class:`CloudError` """ - 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,20 +78,25 @@ 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]: - raise models.ErrorResponseException(self._deserialize, response) + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp 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/_remote_rendering_accounts_operations.py b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_remote_rendering_accounts_operations.py new file mode 100644 index 000000000000..bb97ce3351f3 --- /dev/null +++ b/sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/operations/_remote_rendering_accounts_operations.py @@ -0,0 +1,557 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RemoteRenderingAccountsOperations(object): + """RemoteRenderingAccountsOperations 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. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-04-06-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-04-06-preview" + + self.config = config + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """List Remote Rendering Accounts by Subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RemoteRenderingAccount + :rtype: + ~azure.mgmt.mixedreality.models.RemoteRenderingAccountPaged[~azure.mgmt.mixedreality.models.RemoteRenderingAccount] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RemoteRenderingAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/remoteRenderingAccounts'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List Resources by Resource Group. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RemoteRenderingAccount + :rtype: + ~azure.mgmt.mixedreality.models.RemoteRenderingAccountPaged[~azure.mgmt.mixedreality.models.RemoteRenderingAccount] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RemoteRenderingAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts'} + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Delete a Remote Rendering Account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Name of an Mixed Reality Account. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'} + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieve a Remote Rendering Account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Name of an Mixed Reality Account. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RemoteRenderingAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.mixedreality.models.RemoteRenderingAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RemoteRenderingAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'} + + def update( + self, resource_group_name, account_name, remote_rendering_account, custom_headers=None, raw=False, **operation_config): + """Updating a Remote Rendering Account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Name of an Mixed Reality Account. + :type account_name: str + :param remote_rendering_account: Remote Rendering Account parameter. + :type remote_rendering_account: + ~azure.mgmt.mixedreality.models.RemoteRenderingAccount + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RemoteRenderingAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.mixedreality.models.RemoteRenderingAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(remote_rendering_account, 'RemoteRenderingAccount') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RemoteRenderingAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'} + + def create( + self, resource_group_name, account_name, remote_rendering_account, custom_headers=None, raw=False, **operation_config): + """Creating or Updating a Remote Rendering Account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Name of an Mixed Reality Account. + :type account_name: str + :param remote_rendering_account: Remote Rendering Account parameter. + :type remote_rendering_account: + ~azure.mgmt.mixedreality.models.RemoteRenderingAccount + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RemoteRenderingAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.mixedreality.models.RemoteRenderingAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(remote_rendering_account, 'RemoteRenderingAccount') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RemoteRenderingAccount', response) + if response.status_code == 201: + deserialized = self._deserialize('RemoteRenderingAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}'} + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """List Both of the 2 Keys of a Remote Rendering Account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Name of an Mixed Reality Account. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccountKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.mixedreality.models.AccountKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccountKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/listKeys'} + + def regenerate_keys( + self, resource_group_name, account_name, serial=1, custom_headers=None, raw=False, **operation_config): + """Regenerate specified Key of a Remote Rendering Account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Name of an Mixed Reality Account. + :type account_name: str + :param serial: serial of key to be regenerated + :type serial: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AccountKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.mixedreality.models.AccountKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + regenerate = models.AccountKeyRegenerateRequest(serial=serial) + + # Construct URL + url = self.regenerate_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(regenerate, 'AccountKeyRegenerateRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccountKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/regenerateKeys'} 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 76% 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..2a39ded51db1 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 @@ -11,6 +11,7 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError from .. import models @@ -18,11 +19,13 @@ 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. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-02-28-preview". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-05-01". """ models = models @@ -32,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-02-28-preview" + self.api_version = "2020-05-01" self.config = config @@ -48,11 +51,9 @@ def list_by_subscription( :return: An iterator like instance of SpatialAnchorsAccount :rtype: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccountPaged[~azure.mgmt.mixedreality.models.SpatialAnchorsAccount] - :raises: - :class:`ErrorResponseException` + :raises: :class:`CloudError` """ - 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,20 +82,25 @@ 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]: - raise models.ErrorResponseException(self._deserialize, response) + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp 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'} @@ -113,11 +119,9 @@ def list_by_resource_group( :return: An iterator like instance of SpatialAnchorsAccount :rtype: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccountPaged[~azure.mgmt.mixedreality.models.SpatialAnchorsAccount] - :raises: - :class:`ErrorResponseException` + :raises: :class:`CloudError` """ - 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,33 +151,37 @@ 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]: - raise models.ErrorResponseException(self._deserialize, response) + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp 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'} def delete( - self, resource_group_name, spatial_anchors_account_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): """Delete a Spatial Anchors Account. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str - :param spatial_anchors_account_name: Name of an Mixed Reality Spatial - Anchors Account. - :type spatial_anchors_account_name: str + :param account_name: Name of an Mixed Reality Account. + :type account_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -181,15 +189,14 @@ def delete( overrides`. :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :raises: :class:`CloudError` """ # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'spatialAnchorsAccountName': self._serialize.url("spatial_anchors_account_name", spatial_anchors_account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') } url = self._client.format_url(url, **path_format_arguments) @@ -211,22 +218,23 @@ def delete( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ErrorResponseException(self._deserialize, response) + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}'} def get( - self, resource_group_name, spatial_anchors_account_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): """Retrieve a Spatial Anchors Account. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str - :param spatial_anchors_account_name: Name of an Mixed Reality Spatial - Anchors Account. - :type spatial_anchors_account_name: str + :param account_name: Name of an Mixed Reality Account. + :type account_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -235,15 +243,14 @@ def get( :return: SpatialAnchorsAccount or ClientRawResponse if raw=true :rtype: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccount or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :raises: :class:`CloudError` """ # Construct URL url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'spatialAnchorsAccountName': self._serialize.url("spatial_anchors_account_name", spatial_anchors_account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') } url = self._client.format_url(url, **path_format_arguments) @@ -266,10 +273,11 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SpatialAnchorsAccount', response) @@ -278,17 +286,16 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}'} def update( - self, resource_group_name, spatial_anchors_account_name, location, tags=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, location, tags=None, custom_headers=None, raw=False, **operation_config): """Updating a Spatial Anchors Account. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str - :param spatial_anchors_account_name: Name of an Mixed Reality Spatial - Anchors Account. - :type spatial_anchors_account_name: str + :param account_name: Name of an Mixed Reality Account. + :type account_name: str :param location: The geo-location where the resource lives :type location: str :param tags: Resource tags. @@ -301,8 +308,7 @@ def update( :return: SpatialAnchorsAccount or ClientRawResponse if raw=true :rtype: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccount or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :raises: :class:`CloudError` """ spatial_anchors_account = models.SpatialAnchorsAccount(tags=tags, location=location) @@ -311,7 +317,7 @@ def update( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'spatialAnchorsAccountName': self._serialize.url("spatial_anchors_account_name", spatial_anchors_account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') } url = self._client.format_url(url, **path_format_arguments) @@ -338,10 +344,11 @@ def update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SpatialAnchorsAccount', response) @@ -350,17 +357,16 @@ def update( return client_raw_response return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}'} def create( - self, resource_group_name, spatial_anchors_account_name, location, tags=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, location, tags=None, custom_headers=None, raw=False, **operation_config): """Creating or Updating a Spatial Anchors Account. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str - :param spatial_anchors_account_name: Name of an Mixed Reality Spatial - Anchors Account. - :type spatial_anchors_account_name: str + :param account_name: Name of an Mixed Reality Account. + :type account_name: str :param location: The geo-location where the resource lives :type location: str :param tags: Resource tags. @@ -373,8 +379,7 @@ def create( :return: SpatialAnchorsAccount or ClientRawResponse if raw=true :rtype: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccount or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :raises: :class:`CloudError` """ spatial_anchors_account = models.SpatialAnchorsAccount(tags=tags, location=location) @@ -383,7 +388,7 @@ def create( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'spatialAnchorsAccountName': self._serialize.url("spatial_anchors_account_name", spatial_anchors_account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') } url = self._client.format_url(url, **path_format_arguments) @@ -410,10 +415,11 @@ def create( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SpatialAnchorsAccount', response) if response.status_code == 201: @@ -424,34 +430,32 @@ def create( return client_raw_response return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}'} + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}'} - def get_keys( - self, resource_group_name, spatial_anchors_account_name, custom_headers=None, raw=False, **operation_config): - """Get Both of the 2 Keys of a Spatial Anchors Account. + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """List Both of the 2 Keys of a Spatial Anchors Account. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str - :param spatial_anchors_account_name: Name of an Mixed Reality Spatial - Anchors Account. - :type spatial_anchors_account_name: str + :param account_name: Name of an Mixed Reality Account. + :type account_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: SpatialAnchorsAccountKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccountKeys or + :return: AccountKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.mixedreality.models.AccountKeys or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :raises: :class:`CloudError` """ # Construct URL - url = self.get_keys.metadata['url'] + url = self.list_keys.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'spatialAnchorsAccountName': self._serialize.url("spatial_anchors_account_name", spatial_anchors_account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') } url = self._client.format_url(url, **path_format_arguments) @@ -470,33 +474,33 @@ def get_keys( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SpatialAnchorsAccountKeys', response) + deserialized = self._deserialize('AccountKeys', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}/keys'} + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}/listKeys'} def regenerate_keys( - self, resource_group_name, spatial_anchors_account_name, serial=1, custom_headers=None, raw=False, **operation_config): - """Regenerate 1 Key of a Spatial Anchors Account. + self, resource_group_name, account_name, serial=1, custom_headers=None, raw=False, **operation_config): + """Regenerate specified Key of a Spatial Anchors Account. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str - :param spatial_anchors_account_name: Name of an Mixed Reality Spatial - Anchors Account. - :type spatial_anchors_account_name: str + :param account_name: Name of an Mixed Reality Account. + :type account_name: str :param serial: serial of key to be regenerated :type serial: int :param dict custom_headers: headers that will be added to the request @@ -504,20 +508,19 @@ def regenerate_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: SpatialAnchorsAccountKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.mixedreality.models.SpatialAnchorsAccountKeys or + :return: AccountKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.mixedreality.models.AccountKeys or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :raises: :class:`CloudError` """ - spatial_anchors_account_key_regenerate = models.SpatialAnchorsAccountKeyRegenerateRequest(serial=serial) + regenerate = models.AccountKeyRegenerateRequest(serial=serial) # Construct URL url = self.regenerate_keys.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'spatialAnchorsAccountName': self._serialize.url("spatial_anchors_account_name", spatial_anchors_account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') } url = self._client.format_url(url, **path_format_arguments) @@ -537,23 +540,24 @@ def regenerate_keys( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(spatial_anchors_account_key_regenerate, 'SpatialAnchorsAccountKeyRegenerateRequest') + body_content = self._serialize.body(regenerate, 'AccountKeyRegenerateRequest') # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SpatialAnchorsAccountKeys', response) + deserialized = self._deserialize('AccountKeys', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{spatialAnchorsAccountName}/keys'} + regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}/regenerateKeys'} diff --git a/sdk/mixedreality/azure-mgmt-mixedreality/setup.py b/sdk/mixedreality/azure-mgmt-mixedreality/setup.py index c01a6af6cc25..89c3ba773f50 100644 --- a/sdk/mixedreality/azure-mgmt-mixedreality/setup.py +++ b/sdk/mixedreality/azure-mgmt-mixedreality/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -64,10 +66,10 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False,