Skip to content

Commit fcb76a2

Browse files
Zim KalinowskiSDK Automation
Zim Kalinowski
and
SDK Automation
committed
Releasing mixedreality (#11618)
* Generated from 6ba80acb417873f6fe2808d1a0d1ad144241ac60 Merge branch 'master' into Azure-MixedReality * changelog and version * adding mixedreality test * fixed indentation * fixed layout * one more fix * test recording * serial thing * fix + indent * indent * additional test fix Co-authored-by: SDK Automation <[email protected]>
1 parent 205a1cb commit fcb76a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3283
-1393
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
11
# Release History
22

3+
## 0.2.0 (2020-05-25)
4+
5+
**Features**
6+
7+
- Added operation SpatialAnchorsAccountsOperations.list_keys
8+
- Added operation SpatialAnchorsAccountsOperations.get
9+
- Added operation SpatialAnchorsAccountsOperations.regenerate_keys
10+
- Added operation SpatialAnchorsAccountsOperations.delete
11+
- Added operation group MixedRealityClientOperationsMixin
12+
- Added operation group RemoteRenderingAccountsOperations
13+
14+
**Breaking changes**
15+
16+
- Operation SpatialAnchorsAccountsOperations.create has a new signature
17+
- Operation SpatialAnchorsAccountsOperations.update has a new signature
18+
- Removed operation SpatialAnchorsAccountsOperations.get_keys
19+
20+
**General Breaking Changes**
21+
22+
This version uses a next-generation code generator that *might*
23+
introduce breaking changes. In summary, some modules were incorrectly
24+
visible/importable and have been renamed. This fixed several issues
25+
caused by usage of classes that were not supposed to be used in the
26+
first place.
27+
28+
- MixedRealityClient cannot be imported from
29+
`azure.mgmt.mixedreality.mixed_reality_client` anymore (import from
30+
`azure.mgmt.mixedreality` works like before)
31+
- MixedRealityClientConfiguration import has been moved from
32+
`azure.mgmt.mixedreality.mixedreality_client`
33+
to `azure.mgmt.mixedreality`
34+
- A model `MyClass` from a "models" sub-module cannot be imported
35+
anymore using `azure.mgmt.mixedreality.models.my_class` (import from
36+
`azure.mgmt.mixedreality.models` works like before)
37+
- An operation class `MyClassOperations` from an `operations`
38+
sub-module cannot be imported anymore using
39+
`azure.mgmt.mixedreality.operations.my_class_operations` (import from
40+
`azure.mgmt.mixedreality.operations` works like before)
41+
42+
Last but not least, HTTP connection pooling is now enabled by default.
43+
You should always use a client as a context manager, or call close(), or
44+
use no more than one client per process.
45+
346
## 0.1.0 (2019-02-05)
447

548
- Initial Release

sdk/mixedreality/azure-mgmt-mixedreality/MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
recursive-include tests *.py *.yaml
12
include *.md
23
include azure/__init__.py
34
include azure/mgmt/__init__.py
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
1-
## Microsoft Azure SDK for Python
1+
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Mixed Reality Management Client Library.
4+
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
5+
For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/)
46

5-
Azure Resource Manager (ARM) is the next generation of management APIs
6-
that replace the old Azure Service Management (ASM).
77

8-
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
8+
# Usage
99

10-
For the older Azure Service Management (ASM) libraries, see
11-
[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy)
12-
library.
10+
For code examples, see [Mixed Reality Management](https://docs.microsoft.com/python/api/overview/azure/)
11+
on docs.microsoft.com.
1312

14-
For a more complete set of Azure libraries, see the
15-
[azure](https://pypi.python.org/pypi/azure) bundle package.
1613

17-
## Usage
14+
# Provide Feedback
1815

19-
For code examples, see [Mixed Reality
20-
Management](https://docs.microsoft.com/python/api/overview/azure/) on
21-
docs.microsoft.com.
22-
23-
## Provide Feedback
24-
25-
If you encounter any bugs or have suggestions, please file an issue in
26-
the [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
16+
If you encounter any bugs or have suggestions, please file an issue in the
17+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
2718
section of the project.
2819

29-
![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-mixedreality%2FREADME.png)
20+
21+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-mixedreality%2FREADME.png)

sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/__init__.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from .mixed_reality_client import MixedRealityClient
13-
from .version import VERSION
12+
from ._configuration import MixedRealityClientConfiguration
13+
from ._mixed_reality_client import MixedRealityClient
14+
__all__ = ['MixedRealityClient', 'MixedRealityClientConfiguration']
1415

15-
__all__ = ['MixedRealityClient']
16+
from .version import VERSION
1617

1718
__version__ = VERSION
1819

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
from msrestazure import AzureConfiguration
12+
13+
from .version import VERSION
14+
15+
16+
class MixedRealityClientConfiguration(AzureConfiguration):
17+
"""Configuration for MixedRealityClient
18+
Note that all parameters used to create this instance are saved as instance
19+
attributes.
20+
21+
:param credentials: Credentials needed for the client to connect to Azure.
22+
:type credentials: :mod:`A msrestazure Credentials
23+
object<msrestazure.azure_active_directory>`
24+
:param subscription_id: The Azure subscription ID. This is a
25+
GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
26+
:type subscription_id: str
27+
:param str base_url: Service URL
28+
"""
29+
30+
def __init__(
31+
self, credentials, subscription_id, base_url=None):
32+
33+
if credentials is None:
34+
raise ValueError("Parameter 'credentials' must not be None.")
35+
if subscription_id is None:
36+
raise ValueError("Parameter 'subscription_id' must not be None.")
37+
if not base_url:
38+
base_url = 'https://management.azure.com'
39+
40+
super(MixedRealityClientConfiguration, self).__init__(base_url)
41+
42+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
43+
self.keep_alive = True
44+
45+
self.add_user_agent('azure-mgmt-mixedreality/{}'.format(VERSION))
46+
self.add_user_agent('Azure-SDK-For-Python')
47+
48+
self.credentials = credentials
49+
self.subscription_id = subscription_id
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
15+
from ._configuration import MixedRealityClientConfiguration
16+
from .operations import MixedRealityClientOperationsMixin
17+
from .operations import Operations
18+
from .operations import SpatialAnchorsAccountsOperations
19+
from .operations import RemoteRenderingAccountsOperations
20+
from . import models
21+
22+
23+
class MixedRealityClient(MixedRealityClientOperationsMixin, SDKClient):
24+
"""Mixed Reality Client
25+
26+
:ivar config: Configuration for client.
27+
:vartype config: MixedRealityClientConfiguration
28+
29+
:ivar operations: Operations operations
30+
:vartype operations: azure.mgmt.mixedreality.operations.Operations
31+
:ivar spatial_anchors_accounts: SpatialAnchorsAccounts operations
32+
:vartype spatial_anchors_accounts: azure.mgmt.mixedreality.operations.SpatialAnchorsAccountsOperations
33+
:ivar remote_rendering_accounts: RemoteRenderingAccounts operations
34+
:vartype remote_rendering_accounts: azure.mgmt.mixedreality.operations.RemoteRenderingAccountsOperations
35+
36+
:param credentials: Credentials needed for the client to connect to Azure.
37+
:type credentials: :mod:`A msrestazure Credentials
38+
object<msrestazure.azure_active_directory>`
39+
:param subscription_id: The Azure subscription ID. This is a
40+
GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
41+
:type subscription_id: str
42+
:param str base_url: Service URL
43+
"""
44+
45+
def __init__(
46+
self, credentials, subscription_id, base_url=None):
47+
48+
self.config = MixedRealityClientConfiguration(credentials, subscription_id, base_url)
49+
super(MixedRealityClient, self).__init__(self.config.credentials, self.config)
50+
51+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
52+
self._serialize = Serializer(client_models)
53+
self._deserialize = Deserializer(client_models)
54+
55+
self.operations = Operations(
56+
self._client, self.config, self._serialize, self._deserialize)
57+
self.spatial_anchors_accounts = SpatialAnchorsAccountsOperations(
58+
self._client, self.config, self._serialize, self._deserialize)
59+
self.remote_rendering_accounts = RemoteRenderingAccountsOperations(
60+
self._client, self.config, self._serialize, self._deserialize)

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

+63-33
Original file line numberDiff line numberDiff line change
@@ -10,53 +10,83 @@
1010
# --------------------------------------------------------------------------
1111

1212
try:
13-
from .check_name_availability_request_py3 import CheckNameAvailabilityRequest
14-
from .check_name_availability_response_py3 import CheckNameAvailabilityResponse
15-
from .error_response_py3 import ErrorResponse, ErrorResponseException
16-
from .operation_display_py3 import OperationDisplay
17-
from .operation_py3 import Operation
18-
from .spatial_anchors_account_py3 import SpatialAnchorsAccount
19-
from .spatial_anchors_account_keys_py3 import SpatialAnchorsAccountKeys
20-
from .spatial_anchors_account_key_regenerate_request_py3 import SpatialAnchorsAccountKeyRegenerateRequest
21-
from .proxy_resource_py3 import ProxyResource
22-
from .azure_entity_resource_py3 import AzureEntityResource
23-
from .resource_py3 import Resource
24-
from .tracked_resource_py3 import TrackedResource
13+
from ._models_py3 import AccountKeyRegenerateRequest
14+
from ._models_py3 import AccountKeys
15+
from ._models_py3 import AzureEntityResource
16+
from ._models_py3 import CheckNameAvailabilityRequest
17+
from ._models_py3 import CheckNameAvailabilityResponse
18+
from ._models_py3 import Identity
19+
from ._models_py3 import Operation
20+
from ._models_py3 import OperationDisplay
21+
from ._models_py3 import Plan
22+
from ._models_py3 import ProxyResource
23+
from ._models_py3 import RemoteRenderingAccount
24+
from ._models_py3 import RemoteRenderingAccountIdentity
25+
from ._models_py3 import Resource
26+
from ._models_py3 import ResourceModelWithAllowedPropertySet
27+
from ._models_py3 import ResourceModelWithAllowedPropertySetIdentity
28+
from ._models_py3 import ResourceModelWithAllowedPropertySetPlan
29+
from ._models_py3 import ResourceModelWithAllowedPropertySetSku
30+
from ._models_py3 import Sku
31+
from ._models_py3 import SpatialAnchorsAccount
32+
from ._models_py3 import TrackedResource
2533
except (SyntaxError, ImportError):
26-
from .check_name_availability_request import CheckNameAvailabilityRequest
27-
from .check_name_availability_response import CheckNameAvailabilityResponse
28-
from .error_response import ErrorResponse, ErrorResponseException
29-
from .operation_display import OperationDisplay
30-
from .operation import Operation
31-
from .spatial_anchors_account import SpatialAnchorsAccount
32-
from .spatial_anchors_account_keys import SpatialAnchorsAccountKeys
33-
from .spatial_anchors_account_key_regenerate_request import SpatialAnchorsAccountKeyRegenerateRequest
34-
from .proxy_resource import ProxyResource
35-
from .azure_entity_resource import AzureEntityResource
36-
from .resource import Resource
37-
from .tracked_resource import TrackedResource
38-
from .operation_paged import OperationPaged
39-
from .spatial_anchors_account_paged import SpatialAnchorsAccountPaged
40-
from .mixed_reality_client_enums import (
34+
from ._models import AccountKeyRegenerateRequest
35+
from ._models import AccountKeys
36+
from ._models import AzureEntityResource
37+
from ._models import CheckNameAvailabilityRequest
38+
from ._models import CheckNameAvailabilityResponse
39+
from ._models import Identity
40+
from ._models import Operation
41+
from ._models import OperationDisplay
42+
from ._models import Plan
43+
from ._models import ProxyResource
44+
from ._models import RemoteRenderingAccount
45+
from ._models import RemoteRenderingAccountIdentity
46+
from ._models import Resource
47+
from ._models import ResourceModelWithAllowedPropertySet
48+
from ._models import ResourceModelWithAllowedPropertySetIdentity
49+
from ._models import ResourceModelWithAllowedPropertySetPlan
50+
from ._models import ResourceModelWithAllowedPropertySetSku
51+
from ._models import Sku
52+
from ._models import SpatialAnchorsAccount
53+
from ._models import TrackedResource
54+
from ._paged_models import OperationPaged
55+
from ._paged_models import RemoteRenderingAccountPaged
56+
from ._paged_models import SpatialAnchorsAccountPaged
57+
from ._mixed_reality_client_enums import (
4158
NameAvailability,
4259
NameUnavailableReason,
60+
SkuTier,
61+
ResourceIdentityType,
4362
)
4463

4564
__all__ = [
65+
'AccountKeyRegenerateRequest',
66+
'AccountKeys',
67+
'AzureEntityResource',
4668
'CheckNameAvailabilityRequest',
4769
'CheckNameAvailabilityResponse',
48-
'ErrorResponse', 'ErrorResponseException',
49-
'OperationDisplay',
70+
'Identity',
5071
'Operation',
51-
'SpatialAnchorsAccount',
52-
'SpatialAnchorsAccountKeys',
53-
'SpatialAnchorsAccountKeyRegenerateRequest',
72+
'OperationDisplay',
73+
'Plan',
5474
'ProxyResource',
55-
'AzureEntityResource',
75+
'RemoteRenderingAccount',
76+
'RemoteRenderingAccountIdentity',
5677
'Resource',
78+
'ResourceModelWithAllowedPropertySet',
79+
'ResourceModelWithAllowedPropertySetIdentity',
80+
'ResourceModelWithAllowedPropertySetPlan',
81+
'ResourceModelWithAllowedPropertySetSku',
82+
'Sku',
83+
'SpatialAnchorsAccount',
5784
'TrackedResource',
5885
'OperationPaged',
5986
'SpatialAnchorsAccountPaged',
87+
'RemoteRenderingAccountPaged',
6088
'NameAvailability',
6189
'NameUnavailableReason',
90+
'SkuTier',
91+
'ResourceIdentityType',
6292
]
+13
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,16 @@ class NameUnavailableReason(str, Enum):
2222

2323
invalid = "Invalid"
2424
already_exists = "AlreadyExists"
25+
26+
27+
class SkuTier(str, Enum):
28+
29+
free = "Free"
30+
basic = "Basic"
31+
standard = "Standard"
32+
premium = "Premium"
33+
34+
35+
class ResourceIdentityType(str, Enum):
36+
37+
system_assigned = "SystemAssigned"

0 commit comments

Comments
 (0)