Skip to content

Commit

Permalink
[AutoRelease] t2-maps-2021-05-08-40384 (#18594)
Browse files Browse the repository at this point in the history
* CodeGen from PR 13733 in Azure/azure-rest-api-specs
[Hub Generated] Review request for Microsoft.Maps to add version stable/2021-02-01 (#13733)

* Adds base for updating Microsoft.Maps from version preview/2020-02-01-preview to version 2020-02-01

* Updates for 2021-02-01 api version swagger

* creator swagger fixes

* fix model examples

* nextLink, uniqueId

* build fixes

* fixing listkeys

* fix long running operations

* fixing spelling

* fixing async behavior and examples

* updating arm region

* reset package-lock

* version,CHANGELOG

Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
  • Loading branch information
Azure CLI Bot and SDKAuto authored May 10, 2021
1 parent e16abba commit 95d1ed3
Show file tree
Hide file tree
Showing 24 changed files with 657 additions and 1,473 deletions.
25 changes: 25 additions & 0 deletions sdk/maps/azure-mgmt-maps/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Release History

## 2.0.0 (2021-05-08)

**Features**

- Model CreatorUpdateParameters has a new parameter storage_units
- Model CreatorUpdateParameters has a new parameter provisioning_state
- Model MapsOperations has a new parameter next_link
- Model CreatorList has a new parameter next_link
- Model MapsAccountKeys has a new parameter secondary_key_last_updated
- Model MapsAccountKeys has a new parameter primary_key_last_updated
- Model MapsAccount has a new parameter kind
- Model MapsAccounts has a new parameter next_link

**Breaking changes**

- Operation AccountsOperations.create_or_update has a new signature
- Operation CreatorsOperations.create_or_update has a new signature
- Parameter properties of model Creator is now required
- Parameter sku of model MapsAccount is now required
- Model CreatorProperties has a new required parameter storage_units
- Model MapsAccountKeys no longer has parameter id
- Model MapsAccountUpdateParameters has a new signature
- Model MapsAccountProperties has a new signature
- Removed operation group PrivateAtlasesOperations

## 1.0.0 (2021-04-23)

- GA release
Expand Down
2 changes: 1 addition & 1 deletion sdk/maps/azure-mgmt-maps/_meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"autorest": "3.3.0",
"use": "@autorest/python@5.6.6",
"commit": "c555c1c8bc915132c6f3df485ea49c42765ef32a",
"commit": "5e6a5758c2bd7128984f131be88200cd4d2d1a17",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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",
"readme": "specification/maps/resource-manager/readme.md"
Expand Down
4 changes: 2 additions & 2 deletions sdk/maps/azure-mgmt-maps/azure/mgmt/maps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._azure_maps_resource_provider import AzureMapsResourceProvider
from ._azure_maps_management_client import AzureMapsManagementClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['AzureMapsResourceProvider']
__all__ = ['AzureMapsManagementClient']

try:
from ._patch import patch_sdk # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,20 @@
from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import AzureMapsResourceProviderConfiguration
from ._configuration import AzureMapsManagementClientConfiguration
from .operations import AccountsOperations
from .operations import MapsOperations
from .operations import PrivateAtlasesOperations
from .operations import CreatorsOperations
from . import models


class AzureMapsResourceProvider(object):
"""Resource Provider.
class AzureMapsManagementClient(object):
"""Azure Maps.
:ivar accounts: AccountsOperations operations
:vartype accounts: azure.mgmt.maps.operations.AccountsOperations
:ivar maps: MapsOperations operations
:vartype maps: azure.mgmt.maps.operations.MapsOperations
:ivar private_atlases: PrivateAtlasesOperations operations
:vartype private_atlases: azure.mgmt.maps.operations.PrivateAtlasesOperations
:ivar creators: CreatorsOperations operations
:vartype creators: azure.mgmt.maps.operations.CreatorsOperations
:param credential: Credential needed for the client to connect to Azure.
Expand All @@ -54,7 +51,7 @@ def __init__(
# type: (...) -> None
if not base_url:
base_url = 'https://management.azure.com'
self._config = AzureMapsResourceProviderConfiguration(credential, subscription_id, **kwargs)
self._config = AzureMapsManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
Expand All @@ -66,8 +63,6 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.maps = MapsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.private_atlases = PrivateAtlasesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.creators = CreatorsOperations(
self._client, self._config, self._serialize, self._deserialize)

Expand All @@ -94,7 +89,7 @@ def close(self):
self._client.close()

def __enter__(self):
# type: () -> AzureMapsResourceProvider
# type: () -> AzureMapsManagementClient
self._client.__enter__()
return self

Expand Down
8 changes: 4 additions & 4 deletions sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
from azure.core.credentials import TokenCredential


class AzureMapsResourceProviderConfiguration(Configuration):
"""Configuration for AzureMapsResourceProvider.
class AzureMapsManagementClientConfiguration(Configuration):
"""Configuration for AzureMapsManagementClient.
Note that all parameters used to create this instance are saved as instance
attributes.
Expand All @@ -44,11 +44,11 @@ def __init__(
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(AzureMapsResourceProviderConfiguration, self).__init__(**kwargs)
super(AzureMapsManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-02-01-preview"
self.api_version = "2021-02-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-maps/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
15 changes: 7 additions & 8 deletions sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"chosen_version": "2020-02-01-preview",
"total_api_version_list": ["2020-02-01-preview"],
"chosen_version": "2021-02-01",
"total_api_version_list": ["2021-02-01"],
"client": {
"name": "AzureMapsResourceProvider",
"filename": "_azure_maps_resource_provider",
"description": "Resource Provider.",
"name": "AzureMapsManagementClient",
"filename": "_azure_maps_management_client",
"description": "Azure Maps.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": false,
"client_side_validation": false,
"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\"]}}}",
"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\"]}}}"
"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\": [\"AzureMapsManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"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\": [\"AzureMapsManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down Expand Up @@ -100,7 +100,6 @@
"operation_groups": {
"accounts": "AccountsOperations",
"maps": "MapsOperations",
"private_atlases": "PrivateAtlasesOperations",
"creators": "CreatorsOperations"
}
}
2 changes: 1 addition & 1 deletion sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0"
VERSION = "2.0.0"
4 changes: 2 additions & 2 deletions sdk/maps/azure-mgmt-maps/azure/mgmt/maps/aio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._azure_maps_resource_provider import AzureMapsResourceProvider
__all__ = ['AzureMapsResourceProvider']
from ._azure_maps_management_client import AzureMapsManagementClient
__all__ = ['AzureMapsManagementClient']
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,20 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

from ._configuration import AzureMapsResourceProviderConfiguration
from ._configuration import AzureMapsManagementClientConfiguration
from .operations import AccountsOperations
from .operations import MapsOperations
from .operations import PrivateAtlasesOperations
from .operations import CreatorsOperations
from .. import models


class AzureMapsResourceProvider(object):
"""Resource Provider.
class AzureMapsManagementClient(object):
"""Azure Maps.
:ivar accounts: AccountsOperations operations
:vartype accounts: azure.mgmt.maps.aio.operations.AccountsOperations
:ivar maps: MapsOperations operations
:vartype maps: azure.mgmt.maps.aio.operations.MapsOperations
:ivar private_atlases: PrivateAtlasesOperations operations
:vartype private_atlases: azure.mgmt.maps.aio.operations.PrivateAtlasesOperations
:ivar creators: CreatorsOperations operations
:vartype creators: azure.mgmt.maps.aio.operations.CreatorsOperations
:param credential: Credential needed for the client to connect to Azure.
Expand All @@ -51,7 +48,7 @@ def __init__(
) -> None:
if not base_url:
base_url = 'https://management.azure.com'
self._config = AzureMapsResourceProviderConfiguration(credential, subscription_id, **kwargs)
self._config = AzureMapsManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
Expand All @@ -63,8 +60,6 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.maps = MapsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.private_atlases = PrivateAtlasesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.creators = CreatorsOperations(
self._client, self._config, self._serialize, self._deserialize)

Expand All @@ -88,7 +83,7 @@ async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> Async
async def close(self) -> None:
await self._client.close()

async def __aenter__(self) -> "AzureMapsResourceProvider":
async def __aenter__(self) -> "AzureMapsManagementClient":
await self._client.__aenter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from azure.core.credentials_async import AsyncTokenCredential


class AzureMapsResourceProviderConfiguration(Configuration):
"""Configuration for AzureMapsResourceProvider.
class AzureMapsManagementClientConfiguration(Configuration):
"""Configuration for AzureMapsManagementClient.
Note that all parameters used to create this instance are saved as instance
attributes.
Expand All @@ -41,11 +41,11 @@ def __init__(
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(AzureMapsResourceProviderConfiguration, self).__init__(**kwargs)
super(AzureMapsManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-02-01-preview"
self.api_version = "2021-02-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-maps/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@

from ._accounts_operations import AccountsOperations
from ._maps_operations import MapsOperations
from ._private_atlases_operations import PrivateAtlasesOperations
from ._creators_operations import CreatorsOperations

__all__ = [
'AccountsOperations',
'MapsOperations',
'PrivateAtlasesOperations',
'CreatorsOperations',
]
Loading

0 comments on commit 95d1ed3

Please sign in to comment.