Skip to content

Commit 2d7f6c1

Browse files
author
SDKAuto
committed
CodeGen from PR 14105 in Azure/azure-rest-api-specs
Merge 974c236fd438982beedd732c1d5e507fa573dce6 into 3496413
1 parent 9585622 commit 2d7f6c1

24 files changed

+2342
-334
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
include *.md
23
include azure/__init__.py
34
include azure/mgmt/__init__.py
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"autorest": "3.3.0",
3+
"use": "@autorest/[email protected]",
4+
"commit": "0fb96462c9a7f61976a6dea87f57ec71405ad173",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"autorest_command": "autorest specification/mixedreality/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --version=3.3.0",
7+
"readme": "specification/mixedreality/resource-manager/readme.md"
8+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def __init__(
4848

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51+
self.api_version = "2021-03-01-preview"
5152
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5253
kwargs.setdefault('sdk_moniker', 'mgmt-mixedreality/{}'.format(VERSION))
5354
self._configure(**kwargs)
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
{
2+
"chosen_version": "2021-03-01-preview",
3+
"total_api_version_list": ["2021-03-01-preview"],
4+
"client": {
5+
"name": "MixedRealityClient",
6+
"filename": "_mixed_reality_client",
7+
"description": "Mixed Reality Client.",
8+
"base_url": "\u0027https://management.azure.com\u0027",
9+
"custom_base_url": null,
10+
"azure_arm": true,
11+
"has_lro_operations": false,
12+
"client_side_validation": false,
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MixedRealityClientConfiguration\"], \"._operations_mixin\": [\"MixedRealityClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MixedRealityClientConfiguration\"], \"._operations_mixin\": [\"MixedRealityClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
15+
},
16+
"global_parameters": {
17+
"sync": {
18+
"credential": {
19+
"signature": "credential, # type: \"TokenCredential\"",
20+
"description": "Credential needed for the client to connect to Azure.",
21+
"docstring_type": "~azure.core.credentials.TokenCredential",
22+
"required": true
23+
},
24+
"subscription_id": {
25+
"signature": "subscription_id, # type: str",
26+
"description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).",
27+
"docstring_type": "str",
28+
"required": true
29+
}
30+
},
31+
"async": {
32+
"credential": {
33+
"signature": "credential: \"AsyncTokenCredential\",",
34+
"description": "Credential needed for the client to connect to Azure.",
35+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
36+
"required": true
37+
},
38+
"subscription_id": {
39+
"signature": "subscription_id: str,",
40+
"description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).",
41+
"docstring_type": "str",
42+
"required": true
43+
}
44+
},
45+
"constant": {
46+
},
47+
"call": "credential, subscription_id",
48+
"service_client_specific": {
49+
"sync": {
50+
"api_version": {
51+
"signature": "api_version=None, # type: Optional[str]",
52+
"description": "API version to use if no profile is provided, or if missing in profile.",
53+
"docstring_type": "str",
54+
"required": false
55+
},
56+
"base_url": {
57+
"signature": "base_url=None, # type: Optional[str]",
58+
"description": "Service URL",
59+
"docstring_type": "str",
60+
"required": false
61+
},
62+
"profile": {
63+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
64+
"description": "A profile definition, from KnownProfiles to dict.",
65+
"docstring_type": "azure.profiles.KnownProfiles",
66+
"required": false
67+
}
68+
},
69+
"async": {
70+
"api_version": {
71+
"signature": "api_version: Optional[str] = None,",
72+
"description": "API version to use if no profile is provided, or if missing in profile.",
73+
"docstring_type": "str",
74+
"required": false
75+
},
76+
"base_url": {
77+
"signature": "base_url: Optional[str] = None,",
78+
"description": "Service URL",
79+
"docstring_type": "str",
80+
"required": false
81+
},
82+
"profile": {
83+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
84+
"description": "A profile definition, from KnownProfiles to dict.",
85+
"docstring_type": "azure.profiles.KnownProfiles",
86+
"required": false
87+
}
88+
}
89+
}
90+
},
91+
"config": {
92+
"credential": true,
93+
"credential_scopes": ["https://management.azure.com/.default"],
94+
"credential_default_policy_type": "BearerTokenCredentialPolicy",
95+
"credential_default_policy_type_has_async_version": true,
96+
"credential_key_header_name": null,
97+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
98+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
99+
},
100+
"operation_groups": {
101+
"operations": "Operations",
102+
"spatial_anchors_accounts": "SpatialAnchorsAccountsOperations",
103+
"remote_rendering_accounts": "RemoteRenderingAccountsOperations",
104+
"object_anchors_accounts": "ObjectAnchorsAccountsOperations"
105+
},
106+
"operation_mixins": {
107+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}",
108+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}",
109+
"operations": {
110+
"check_name_availability_local" : {
111+
"sync": {
112+
"signature": "def check_name_availability_local(\n self,\n location, # type: str\n check_name_availability, # type: \"_models.CheckNameAvailabilityRequest\"\n **kwargs # type: Any\n):\n",
113+
"doc": "\"\"\"Check Name Availability for local uniqueness.\n\n:param location: The location in which uniqueness will be verified.\n:type location: str\n:param check_name_availability: Check Name Availability Request.\n:type check_name_availability: ~azure.mgmt.mixedreality.models.CheckNameAvailabilityRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.mixedreality.models.CheckNameAvailabilityResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
114+
},
115+
"async": {
116+
"coroutine": true,
117+
"signature": "async def check_name_availability_local(\n self,\n location: str,\n check_name_availability: \"_models.CheckNameAvailabilityRequest\",\n **kwargs\n) -\u003e \"_models.CheckNameAvailabilityResponse\":\n",
118+
"doc": "\"\"\"Check Name Availability for local uniqueness.\n\n:param location: The location in which uniqueness will be verified.\n:type location: str\n:param check_name_availability: Check Name Availability Request.\n:type check_name_availability: ~azure.mgmt.mixedreality.models.CheckNameAvailabilityRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.mixedreality.models.CheckNameAvailabilityResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
119+
},
120+
"call": "location, check_name_availability"
121+
}
122+
}
123+
}
124+
}

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import MixedRealityClientConfiguration
2122
from .operations import Operations
2223
from .operations import MixedRealityClientOperationsMixin
2324
from .operations import SpatialAnchorsAccountsOperations
2425
from .operations import RemoteRenderingAccountsOperations
26+
from .operations import ObjectAnchorsAccountsOperations
2527
from . import models
2628

2729

@@ -34,6 +36,8 @@ class MixedRealityClient(MixedRealityClientOperationsMixin):
3436
:vartype spatial_anchors_accounts: azure.mgmt.mixedreality.operations.SpatialAnchorsAccountsOperations
3537
:ivar remote_rendering_accounts: RemoteRenderingAccountsOperations operations
3638
:vartype remote_rendering_accounts: azure.mgmt.mixedreality.operations.RemoteRenderingAccountsOperations
39+
:ivar object_anchors_accounts: ObjectAnchorsAccountsOperations operations
40+
:vartype object_anchors_accounts: azure.mgmt.mixedreality.operations.ObjectAnchorsAccountsOperations
3741
:param credential: Credential needed for the client to connect to Azure.
3842
:type credential: ~azure.core.credentials.TokenCredential
3943
:param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
@@ -65,6 +69,26 @@ def __init__(
6569
self._client, self._config, self._serialize, self._deserialize)
6670
self.remote_rendering_accounts = RemoteRenderingAccountsOperations(
6771
self._client, self._config, self._serialize, self._deserialize)
72+
self.object_anchors_accounts = ObjectAnchorsAccountsOperations(
73+
self._client, self._config, self._serialize, self._deserialize)
74+
75+
def _send_request(self, http_request, **kwargs):
76+
# type: (HttpRequest, Any) -> HttpResponse
77+
"""Runs the network request through the client's chained policies.
78+
79+
:param http_request: The network request you want to make. Required.
80+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
81+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
82+
:return: The response of your network call. Does not do error handling on your response.
83+
:rtype: ~azure.core.pipeline.transport.HttpResponse
84+
"""
85+
path_format_arguments = {
86+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
87+
}
88+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
89+
stream = kwargs.pop("stream", True)
90+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
91+
return pipeline_response.http_response
6892

6993
def close(self):
7094
# type: () -> None

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0b1"
10-
9+
VERSION = "0.0.1"

sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/aio/_configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def __init__(
4545

4646
self.credential = credential
4747
self.subscription_id = subscription_id
48+
self.api_version = "2021-03-01-preview"
4849
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
4950
kwargs.setdefault('sdk_moniker', 'mgmt-mixedreality/{}'.format(VERSION))
5051
self._configure(**kwargs)

sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/aio/_mixed_reality_client.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -20,6 +21,7 @@
2021
from .operations import MixedRealityClientOperationsMixin
2122
from .operations import SpatialAnchorsAccountsOperations
2223
from .operations import RemoteRenderingAccountsOperations
24+
from .operations import ObjectAnchorsAccountsOperations
2325
from .. import models
2426

2527

@@ -32,6 +34,8 @@ class MixedRealityClient(MixedRealityClientOperationsMixin):
3234
:vartype spatial_anchors_accounts: azure.mgmt.mixedreality.aio.operations.SpatialAnchorsAccountsOperations
3335
:ivar remote_rendering_accounts: RemoteRenderingAccountsOperations operations
3436
:vartype remote_rendering_accounts: azure.mgmt.mixedreality.aio.operations.RemoteRenderingAccountsOperations
37+
:ivar object_anchors_accounts: ObjectAnchorsAccountsOperations operations
38+
:vartype object_anchors_accounts: azure.mgmt.mixedreality.aio.operations.ObjectAnchorsAccountsOperations
3539
:param credential: Credential needed for the client to connect to Azure.
3640
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3741
:param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
@@ -62,6 +66,25 @@ def __init__(
6266
self._client, self._config, self._serialize, self._deserialize)
6367
self.remote_rendering_accounts = RemoteRenderingAccountsOperations(
6468
self._client, self._config, self._serialize, self._deserialize)
69+
self.object_anchors_accounts = ObjectAnchorsAccountsOperations(
70+
self._client, self._config, self._serialize, self._deserialize)
71+
72+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
73+
"""Runs the network request through the client's chained policies.
74+
75+
:param http_request: The network request you want to make. Required.
76+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
77+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
78+
:return: The response of your network call. Does not do error handling on your response.
79+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
80+
"""
81+
path_format_arguments = {
82+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
83+
}
84+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
85+
stream = kwargs.pop("stream", True)
86+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
87+
return pipeline_response.http_response
6588

6689
async def close(self) -> None:
6790
await self._client.close()

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
from ._mixed_reality_client_operations import MixedRealityClientOperationsMixin
1111
from ._spatial_anchors_accounts_operations import SpatialAnchorsAccountsOperations
1212
from ._remote_rendering_accounts_operations import RemoteRenderingAccountsOperations
13+
from ._object_anchors_accounts_operations import ObjectAnchorsAccountsOperations
1314

1415
__all__ = [
1516
'Operations',
1617
'MixedRealityClientOperationsMixin',
1718
'SpatialAnchorsAccountsOperations',
1819
'RemoteRenderingAccountsOperations',
20+
'ObjectAnchorsAccountsOperations',
1921
]

sdk/mixedreality/azure-mgmt-mixedreality/azure/mgmt/mixedreality/aio/operations/_mixed_reality_client_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async def check_name_availability_local(
4242
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
4343
}
4444
error_map.update(kwargs.pop('error_map', {}))
45-
api_version = "2020-05-01"
45+
api_version = "2021-03-01-preview"
4646
content_type = kwargs.pop("content_type", "application/json")
4747
accept = "application/json"
4848

0 commit comments

Comments
 (0)