Skip to content

Commit 64c93cc

Browse files
Azure CLI BotSDKAutoYan Zhang (WICRESOFT NORTH AMERICA LTD)zhangyan133RAY-316
authored
[AutoRelease] t2-maps-2021-04-23-25762(wave4) (Azure#18253)
* CodeGen from PR 14075 in Azure/azure-rest-api-specs maps t2 config (Azure#14075) Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) <v-yanzhang@microsoft.com> * version,CHANGELOG * test * version modification Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) <v-yanzhang@microsoft.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: zhangyan133 <77086185+zhangyan133@users.noreply.github.com> Co-authored-by: Zed Lei <59104634+RAY-316@users.noreply.github.com>
1 parent c0dc3a3 commit 64c93cc

20 files changed

+218
-379
lines changed

sdk/maps/azure-mgmt-maps/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release History
22

3+
## 1.0.0 (2021-04-23)
4+
5+
- GA release
6+
37
## 1.0.0b1 (2020-12-01)
48

59
This is beta preview version.

sdk/maps/azure-mgmt-maps/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
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__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/python@5.6.6",
4+
"commit": "c555c1c8bc915132c6f3df485ea49c42765ef32a",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"autorest_command": "autorest specification/maps/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/python@5.6.6 --version=3.3.0",
7+
"readme": "specification/maps/resource-manager/readme.md"
8+
}

sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_azure_maps_resource_provider.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
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 AzureMapsResourceProviderConfiguration
2122
from .operations import AccountsOperations
@@ -70,6 +71,24 @@ def __init__(
7071
self.creators = CreatorsOperations(
7172
self._client, self._config, self._serialize, self._deserialize)
7273

74+
def _send_request(self, http_request, **kwargs):
75+
# type: (HttpRequest, Any) -> HttpResponse
76+
"""Runs the network request through the client's chained policies.
77+
78+
:param http_request: The network request you want to make. Required.
79+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
80+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
81+
:return: The response of your network call. Does not do error handling on your response.
82+
:rtype: ~azure.core.pipeline.transport.HttpResponse
83+
"""
84+
path_format_arguments = {
85+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
86+
}
87+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
88+
stream = kwargs.pop("stream", True)
89+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
90+
return pipeline_response.http_response
91+
7392
def close(self):
7493
# type: () -> None
7594
self._client.close()
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"chosen_version": "2020-02-01-preview",
3+
"total_api_version_list": ["2020-02-01-preview"],
4+
"client": {
5+
"name": "AzureMapsResourceProvider",
6+
"filename": "_azure_maps_resource_provider",
7+
"description": "Resource Provider.",
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\": [\"AzureMapsResourceProviderConfiguration\"]}}, \"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\": [\"AzureMapsResourceProviderConfiguration\"]}}, \"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 ID of the target subscription.",
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 ID of the target subscription.",
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+
"accounts": "AccountsOperations",
102+
"maps": "MapsOperations",
103+
"private_atlases": "PrivateAtlasesOperations",
104+
"creators": "CreatorsOperations"
105+
}
106+
}

sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_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 = "1.0.0"

sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/_azure_maps_resource_provider.py

Lines changed: 18 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

@@ -67,6 +68,23 @@ def __init__(
6768
self.creators = CreatorsOperations(
6869
self._client, self._config, self._serialize, self._deserialize)
6970

71+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
72+
"""Runs the network request through the client's chained policies.
73+
74+
:param http_request: The network request you want to make. Required.
75+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
76+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
77+
:return: The response of your network call. Does not do error handling on your response.
78+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
79+
"""
80+
path_format_arguments = {
81+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
82+
}
83+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
84+
stream = kwargs.pop("stream", True)
85+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
86+
return pipeline_response.http_response
87+
7088
async def close(self) -> None:
7189
await self._client.close()
7290

sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_accounts_operations.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ async def create_or_update(
9898

9999
if response.status_code not in [200, 201]:
100100
map_error(status_code=response.status_code, response=response, error_map=error_map)
101-
error = self._deserialize(_models.ErrorResponse, response)
101+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
102102
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
103103

104104
if response.status_code == 200:
@@ -170,7 +170,7 @@ async def update(
170170

171171
if response.status_code not in [200]:
172172
map_error(status_code=response.status_code, response=response, error_map=error_map)
173-
error = self._deserialize(_models.ErrorResponse, response)
173+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
174174
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
175175

176176
deserialized = self._deserialize('MapsAccount', pipeline_response)
@@ -229,7 +229,7 @@ async def delete(
229229

230230
if response.status_code not in [200, 204]:
231231
map_error(status_code=response.status_code, response=response, error_map=error_map)
232-
error = self._deserialize(_models.ErrorResponse, response)
232+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
233233
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
234234

235235
if cls:
@@ -285,7 +285,7 @@ async def get(
285285

286286
if response.status_code not in [200]:
287287
map_error(status_code=response.status_code, response=response, error_map=error_map)
288-
error = self._deserialize(_models.ErrorResponse, response)
288+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
289289
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
290290

291291
deserialized = self._deserialize('MapsAccount', pipeline_response)
@@ -356,7 +356,7 @@ async def get_next(next_link=None):
356356
response = pipeline_response.http_response
357357

358358
if response.status_code not in [200]:
359-
error = self._deserialize(_models.ErrorResponse, response)
359+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
360360
map_error(status_code=response.status_code, response=response, error_map=error_map)
361361
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
362362

@@ -423,7 +423,7 @@ async def get_next(next_link=None):
423423
response = pipeline_response.http_response
424424

425425
if response.status_code not in [200]:
426-
error = self._deserialize(_models.ErrorResponse, response)
426+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
427427
map_error(status_code=response.status_code, response=response, error_map=error_map)
428428
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
429429

@@ -484,7 +484,7 @@ async def list_keys(
484484

485485
if response.status_code not in [200]:
486486
map_error(status_code=response.status_code, response=response, error_map=error_map)
487-
error = self._deserialize(_models.ErrorResponse, response)
487+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
488488
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
489489

490490
deserialized = self._deserialize('MapsAccountKeys', pipeline_response)
@@ -552,7 +552,7 @@ async def regenerate_keys(
552552

553553
if response.status_code not in [200]:
554554
map_error(status_code=response.status_code, response=response, error_map=error_map)
555-
error = self._deserialize(_models.ErrorResponse, response)
555+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
556556
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
557557

558558
deserialized = self._deserialize('MapsAccountKeys', pipeline_response)

sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_creators_operations.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ async def get_next(next_link=None):
105105
response = pipeline_response.http_response
106106

107107
if response.status_code not in [200]:
108-
error = self._deserialize(_models.ErrorResponse, response)
108+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
109109
map_error(status_code=response.status_code, response=response, error_map=error_map)
110110
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
111111

@@ -178,7 +178,7 @@ async def create_or_update(
178178

179179
if response.status_code not in [200, 201]:
180180
map_error(status_code=response.status_code, response=response, error_map=error_map)
181-
error = self._deserialize(_models.ErrorResponse, response)
181+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
182182
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
183183

184184
if response.status_code == 200:
@@ -254,7 +254,7 @@ async def update(
254254

255255
if response.status_code not in [200]:
256256
map_error(status_code=response.status_code, response=response, error_map=error_map)
257-
error = self._deserialize(_models.ErrorResponse, response)
257+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
258258
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
259259

260260
deserialized = self._deserialize('Creator', pipeline_response)
@@ -317,7 +317,7 @@ async def delete(
317317

318318
if response.status_code not in [200, 204]:
319319
map_error(status_code=response.status_code, response=response, error_map=error_map)
320-
error = self._deserialize(_models.ErrorResponse, response)
320+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
321321
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
322322

323323
if cls:
@@ -377,7 +377,7 @@ async def get(
377377

378378
if response.status_code not in [200]:
379379
map_error(status_code=response.status_code, response=response, error_map=error_map)
380-
error = self._deserialize(_models.ErrorResponse, response)
380+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
381381
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
382382

383383
deserialized = self._deserialize('Creator', pipeline_response)

sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/operations/_maps_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async def get_next(next_link=None):
9393
response = pipeline_response.http_response
9494

9595
if response.status_code not in [200]:
96-
error = self._deserialize(_models.ErrorResponse, response)
96+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
9797
map_error(status_code=response.status_code, response=response, error_map=error_map)
9898
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
9999

0 commit comments

Comments
 (0)