Skip to content

Commit 1faa6eb

Browse files
author
SDKAuto
committed
CodeGen from PR 15967 in Azure/azure-rest-api-specs
Merge fd21ab5a96372a67079680c420fcdc0aa4214ce3 into 92b58eb
1 parent bad587d commit 1faa6eb

26 files changed

+3560
-46
lines changed
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
"autorest": "3.3.0",
3-
"use": "@autorest/python@5.6.6",
4-
"commit": "70b5215249735bc56df6d9fc20a535f24f655117",
2+
"autorest": "3.4.5",
3+
"use": [
4+
"@autorest/python@5.8.4",
5+
"@autorest/modelerfour@4.19.2"
6+
],
7+
"commit": "0d6fe39e198c2f612a8b2612550075ed3da06e68",
58
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6-
"autorest_command": "autorest specification/extendedlocation/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",
9+
"autorest_command": "autorest specification/extendedlocation/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.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
710
"readme": "specification/extendedlocation/resource-manager/readme.md"
811
}

sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/_custom_locations.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class CustomLocations(MultiApiClientMixin, _SDKClient):
5656
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
5757
"""
5858

59-
DEFAULT_API_VERSION = '2021-03-15-preview'
59+
DEFAULT_API_VERSION = '2021-08-15'
6060
_PROFILE_TAG = "azure.mgmt.extendedlocation.CustomLocations"
6161
LATEST_PROFILE = ProfileDefinition({
6262
_PROFILE_TAG: {
@@ -92,21 +92,28 @@ def models(cls, api_version=DEFAULT_API_VERSION):
9292
"""Module depends on the API version:
9393
9494
* 2021-03-15-preview: :mod:`v2021_03_15_preview.models<azure.mgmt.extendedlocation.v2021_03_15_preview.models>`
95+
* 2021-08-15: :mod:`v2021_08_15.models<azure.mgmt.extendedlocation.v2021_08_15.models>`
9596
"""
9697
if api_version == '2021-03-15-preview':
9798
from .v2021_03_15_preview import models
9899
return models
100+
elif api_version == '2021-08-15':
101+
from .v2021_08_15 import models
102+
return models
99103
raise ValueError("API version {} is not available".format(api_version))
100104

101105
@property
102106
def custom_locations(self):
103107
"""Instance depends on the API version:
104108
105109
* 2021-03-15-preview: :class:`CustomLocationsOperations<azure.mgmt.extendedlocation.v2021_03_15_preview.operations.CustomLocationsOperations>`
110+
* 2021-08-15: :class:`CustomLocationsOperations<azure.mgmt.extendedlocation.v2021_08_15.operations.CustomLocationsOperations>`
106111
"""
107112
api_version = self._get_api_version('custom_locations')
108113
if api_version == '2021-03-15-preview':
109114
from .v2021_03_15_preview.operations import CustomLocationsOperations as OperationClass
115+
elif api_version == '2021-08-15':
116+
from .v2021_08_15.operations import CustomLocationsOperations as OperationClass
110117
else:
111118
raise ValueError("API version {} does not have operation group 'custom_locations'".format(api_version))
112119
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/aio/_custom_locations.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class CustomLocations(MultiApiClientMixin, _SDKClient):
5454
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
5555
"""
5656

57-
DEFAULT_API_VERSION = '2021-03-15-preview'
57+
DEFAULT_API_VERSION = '2021-08-15'
5858
_PROFILE_TAG = "azure.mgmt.extendedlocation.CustomLocations"
5959
LATEST_PROFILE = ProfileDefinition({
6060
_PROFILE_TAG: {
@@ -90,21 +90,28 @@ def models(cls, api_version=DEFAULT_API_VERSION):
9090
"""Module depends on the API version:
9191
9292
* 2021-03-15-preview: :mod:`v2021_03_15_preview.models<azure.mgmt.extendedlocation.v2021_03_15_preview.models>`
93+
* 2021-08-15: :mod:`v2021_08_15.models<azure.mgmt.extendedlocation.v2021_08_15.models>`
9394
"""
9495
if api_version == '2021-03-15-preview':
9596
from ..v2021_03_15_preview import models
9697
return models
98+
elif api_version == '2021-08-15':
99+
from ..v2021_08_15 import models
100+
return models
97101
raise ValueError("API version {} is not available".format(api_version))
98102

99103
@property
100104
def custom_locations(self):
101105
"""Instance depends on the API version:
102106
103107
* 2021-03-15-preview: :class:`CustomLocationsOperations<azure.mgmt.extendedlocation.v2021_03_15_preview.aio.operations.CustomLocationsOperations>`
108+
* 2021-08-15: :class:`CustomLocationsOperations<azure.mgmt.extendedlocation.v2021_08_15.aio.operations.CustomLocationsOperations>`
104109
"""
105110
api_version = self._get_api_version('custom_locations')
106111
if api_version == '2021-03-15-preview':
107112
from ..v2021_03_15_preview.aio.operations import CustomLocationsOperations as OperationClass
113+
elif api_version == '2021-08-15':
114+
from ..v2021_08_15.aio.operations import CustomLocationsOperations as OperationClass
108115
else:
109116
raise ValueError("API version {} does not have operation group 'custom_locations'".format(api_version))
110117
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# Licensed under the MIT License. See License.txt in the project root for
55
# license information.
66
# --------------------------------------------------------------------------
7-
from .v2021_03_15_preview.models import *
7+
from .v2021_08_15.models import *

sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/v2021_03_15_preview/_version.py

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

9-
VERSION = "1.0.0b2"
9+
VERSION = "1.0.0b1"

sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/v2021_03_15_preview/aio/operations/_custom_locations_operations.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4545

4646
def list_operations(
4747
self,
48-
**kwargs
48+
**kwargs: Any
4949
) -> AsyncIterable["_models.CustomLocationOperationsList"]:
5050
"""Lists all available Custom Locations operations.
5151
@@ -108,7 +108,7 @@ async def get_next(next_link=None):
108108

109109
def list_by_subscription(
110110
self,
111-
**kwargs
111+
**kwargs: Any
112112
) -> AsyncIterable["_models.CustomLocationListResult"]:
113113
"""Gets a list of Custom Locations in a subscription.
114114
@@ -179,7 +179,7 @@ async def get_next(next_link=None):
179179
def list_by_resource_group(
180180
self,
181181
resource_group_name: str,
182-
**kwargs
182+
**kwargs: Any
183183
) -> AsyncIterable["_models.CustomLocationListResult"]:
184184
"""Gets a list of Custom Locations in the specified subscription and resource group.
185185
@@ -211,7 +211,7 @@ def prepare_request(next_link=None):
211211
url = self.list_by_resource_group.metadata['url'] # type: ignore
212212
path_format_arguments = {
213213
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
214-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
214+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
215215
}
216216
url = self._client.format_url(url, **path_format_arguments)
217217
# Construct parameters
@@ -254,7 +254,7 @@ async def get(
254254
self,
255255
resource_group_name: str,
256256
resource_name: str,
257-
**kwargs
257+
**kwargs: Any
258258
) -> "_models.CustomLocation":
259259
"""Gets a Custom Location.
260260
@@ -281,7 +281,7 @@ async def get(
281281
url = self.get.metadata['url'] # type: ignore
282282
path_format_arguments = {
283283
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
284-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
284+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
285285
'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'),
286286
}
287287
url = self._client.format_url(url, **path_format_arguments)
@@ -316,7 +316,7 @@ async def _create_or_update_initial(
316316
resource_group_name: str,
317317
resource_name: str,
318318
parameters: "_models.CustomLocation",
319-
**kwargs
319+
**kwargs: Any
320320
) -> "_models.CustomLocation":
321321
cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomLocation"]
322322
error_map = {
@@ -331,7 +331,7 @@ async def _create_or_update_initial(
331331
url = self._create_or_update_initial.metadata['url'] # type: ignore
332332
path_format_arguments = {
333333
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
334-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
334+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
335335
'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'),
336336
}
337337
url = self._client.format_url(url, **path_format_arguments)
@@ -374,7 +374,7 @@ async def begin_create_or_update(
374374
resource_group_name: str,
375375
resource_name: str,
376376
parameters: "_models.CustomLocation",
377-
**kwargs
377+
**kwargs: Any
378378
) -> AsyncLROPoller["_models.CustomLocation"]:
379379
"""Creates or updates a Custom Location.
380380
@@ -388,8 +388,8 @@ async def begin_create_or_update(
388388
:type parameters: ~azure.mgmt.extendedlocation.v2021_03_15_preview.models.CustomLocation
389389
:keyword callable cls: A custom type or function that will be passed the direct response
390390
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
391-
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
392-
False for no polling, or your own initialized polling object for a personal polling strategy.
391+
:keyword polling: By default, your polling method will be AsyncARMPolling.
392+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
393393
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
394394
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
395395
:return: An instance of AsyncLROPoller that returns either CustomLocation or the result of cls(response)
@@ -424,7 +424,7 @@ def get_long_running_output(pipeline_response):
424424

425425
path_format_arguments = {
426426
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
427-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
427+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
428428
'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'),
429429
}
430430

@@ -446,7 +446,7 @@ async def _delete_initial(
446446
self,
447447
resource_group_name: str,
448448
resource_name: str,
449-
**kwargs
449+
**kwargs: Any
450450
) -> None:
451451
cls = kwargs.pop('cls', None) # type: ClsType[None]
452452
error_map = {
@@ -460,7 +460,7 @@ async def _delete_initial(
460460
url = self._delete_initial.metadata['url'] # type: ignore
461461
path_format_arguments = {
462462
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
463-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
463+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
464464
'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'),
465465
}
466466
url = self._client.format_url(url, **path_format_arguments)
@@ -491,7 +491,7 @@ async def begin_delete(
491491
self,
492492
resource_group_name: str,
493493
resource_name: str,
494-
**kwargs
494+
**kwargs: Any
495495
) -> AsyncLROPoller[None]:
496496
"""Deletes a Custom Location.
497497
@@ -504,8 +504,8 @@ async def begin_delete(
504504
:type resource_name: str
505505
:keyword callable cls: A custom type or function that will be passed the direct response
506506
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
507-
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
508-
False for no polling, or your own initialized polling object for a personal polling strategy.
507+
:keyword polling: By default, your polling method will be AsyncARMPolling.
508+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
509509
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
510510
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
511511
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
@@ -536,7 +536,7 @@ def get_long_running_output(pipeline_response):
536536

537537
path_format_arguments = {
538538
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
539-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
539+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
540540
'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'),
541541
}
542542

@@ -566,7 +566,7 @@ async def update(
566566
host_type: Optional[Union[str, "_models.HostType"]] = None,
567567
namespace: Optional[str] = None,
568568
provisioning_state: Optional[str] = None,
569-
**kwargs
569+
**kwargs: Any
570570
) -> "_models.CustomLocation":
571571
"""Updates a Custom Location.
572572
@@ -616,7 +616,7 @@ async def update(
616616
url = self.update.metadata['url'] # type: ignore
617617
path_format_arguments = {
618618
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
619-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
619+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
620620
'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'),
621621
}
622622
url = self._client.format_url(url, **path_format_arguments)
@@ -654,7 +654,7 @@ def list_enabled_resource_types(
654654
self,
655655
resource_group_name: str,
656656
resource_name: str,
657-
**kwargs
657+
**kwargs: Any
658658
) -> AsyncIterable["_models.EnabledResourceTypesListResult"]:
659659
"""Gets the list of Enabled Resource Types.
660660
@@ -687,7 +687,7 @@ def prepare_request(next_link=None):
687687
url = self.list_enabled_resource_types.metadata['url'] # type: ignore
688688
path_format_arguments = {
689689
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
690-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
690+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
691691
'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'),
692692
}
693693
url = self._client.format_url(url, **path_format_arguments)

sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/v2021_03_15_preview/models/_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model):
463463
:ivar type: The additional info type.
464464
:vartype type: str
465465
:ivar info: The additional info.
466-
:vartype info: str
466+
:vartype info: any
467467
"""
468468

469469
_validation = {
@@ -473,7 +473,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model):
473473

474474
_attribute_map = {
475475
'type': {'key': 'type', 'type': 'str'},
476-
'info': {'key': 'info', 'type': 'str'},
476+
'info': {'key': 'info', 'type': 'object'},
477477
}
478478

479479
def __init__(

sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/v2021_03_15_preview/models/_models_py3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model):
495495
:ivar type: The additional info type.
496496
:vartype type: str
497497
:ivar info: The additional info.
498-
:vartype info: str
498+
:vartype info: any
499499
"""
500500

501501
_validation = {
@@ -505,7 +505,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model):
505505

506506
_attribute_map = {
507507
'type': {'key': 'type', 'type': 'str'},
508-
'info': {'key': 'info', 'type': 'str'},
508+
'info': {'key': 'info', 'type': 'object'},
509509
}
510510

511511
def __init__(

0 commit comments

Comments
 (0)