-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoPR] mixedreality/resource-manager (#4419)
* [AutoPR mixedreality/resource-manager] Public Preview of Mixed Reality Cloud Service (#4410) * Generated from dab6f3dafe031e694ced51add23c0f7ff954f649 Public Preview of Mixed Reality Cloud Service This is the first check-in of Mixed Reality Azure Resource Management Open API 2.0 (Swagger) specification. All checked-in contents had been reviewed and checked-in the private Azure GitHub repo: https://github.com/Azure/azure-rest-api-specs-pr * Packaging update of azure-mgmt-mixedreality * Generated from 3b73f849438b081d5c522c2147e60ae614dcf68a Resolve comments * Generated from a3e67c86d811e26c5ed7d20174cea2c350f02206 Fix typos * Update HISTORY.rst * Update version.py * Update sdk_packaging.toml * Packaging update of azure-mgmt-mixedreality
- Loading branch information
1 parent
3ae4a82
commit 92c9f6f
Showing
42 changed files
with
2,268 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. :changelog: | ||
Release History | ||
=============== | ||
|
||
0.1.0 (2019-02-05) | ||
++++++++++++++++++ | ||
|
||
* Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
include *.rst | ||
include azure/__init__.py | ||
include azure/mgmt/__init__.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Microsoft Azure SDK for Python | ||
============================== | ||
|
||
This is the Microsoft Azure Mixed Reality Management Client Library. | ||
|
||
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. | ||
|
||
For the older Azure Service Management (ASM) libraries, see | ||
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library. | ||
|
||
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package. | ||
|
||
|
||
Usage | ||
===== | ||
|
||
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>`__ | ||
section of the project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
18 changes: 18 additions & 0 deletions
18
azure-mgmt-mixedreality/azure/mgmt/mixedreality/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 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 .mixed_reality_client import MixedRealityClient | ||
from .version import VERSION | ||
|
||
__all__ = ['MixedRealityClient'] | ||
|
||
__version__ = VERSION | ||
|
158 changes: 158 additions & 0 deletions
158
azure-mgmt-mixedreality/azure/mgmt/mixedreality/mixed_reality_client.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
# 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 msrestazure import AzureConfiguration | ||
from .version import VERSION | ||
from msrest.pipeline import ClientRawResponse | ||
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<msrestazure.azure_active_directory>` | ||
: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<msrestazure.azure_active_directory>` | ||
: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) | ||
|
||
def check_name_availability_local( | ||
self, location, name, type, custom_headers=None, raw=False, **operation_config): | ||
"""Check Name Availability for global uniqueness. | ||
:param location: The location in which uniqueness will be verified. | ||
:type location: str | ||
:param name: Resource Name To Verify | ||
:type name: str | ||
:param type: Fully qualified resource type which includes provider | ||
namespace | ||
:type type: 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<msrest:optionsforoperations>`. | ||
:return: CheckNameAvailabilityResponse or ClientRawResponse if | ||
raw=true | ||
:rtype: ~azure.mgmt.mixedreality.models.CheckNameAvailabilityResponse | ||
or ~msrest.pipeline.ClientRawResponse | ||
:raises: | ||
:class:`ErrorResponseException<azure.mgmt.mixedreality.models.ErrorResponseException>` | ||
""" | ||
check_name_availability = models.CheckNameAvailabilityRequest(name=name, type=type) | ||
|
||
# Construct URL | ||
url = self.check_name_availability_local.metadata['url'] | ||
path_format_arguments = { | ||
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), | ||
'location': self._serialize.url("location", location, '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(check_name_availability, 'CheckNameAvailabilityRequest') | ||
|
||
# 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) | ||
|
||
deserialized = None | ||
|
||
if response.status_code == 200: | ||
deserialized = self._deserialize('CheckNameAvailabilityResponse', response) | ||
|
||
if raw: | ||
client_raw_response = ClientRawResponse(deserialized, response) | ||
return client_raw_response | ||
|
||
return deserialized | ||
check_name_availability_local.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/locations/{location}/checkNameAvailability'} |
62 changes: 62 additions & 0 deletions
62
azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# 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. | ||
# -------------------------------------------------------------------------- | ||
|
||
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 | ||
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 ( | ||
NameAvailability, | ||
NameUnavailableReason, | ||
) | ||
|
||
__all__ = [ | ||
'CheckNameAvailabilityRequest', | ||
'CheckNameAvailabilityResponse', | ||
'ErrorResponse', 'ErrorResponseException', | ||
'OperationDisplay', | ||
'Operation', | ||
'SpatialAnchorsAccount', | ||
'SpatialAnchorsAccountKeys', | ||
'SpatialAnchorsAccountKeyRegenerateRequest', | ||
'ProxyResource', | ||
'AzureEntityResource', | ||
'Resource', | ||
'TrackedResource', | ||
'OperationPaged', | ||
'SpatialAnchorsAccountPaged', | ||
'NameAvailability', | ||
'NameUnavailableReason', | ||
] |
50 changes: 50 additions & 0 deletions
50
azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/azure_entity_resource.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# 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 |
50 changes: 50 additions & 0 deletions
50
azure-mgmt-mixedreality/azure/mgmt/mixedreality/models/azure_entity_resource_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# 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 |
Oops, something went wrong.