Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR azure-mgmt-maps] [Hub Generated] Review request for Microsoft.Maps to add version preview/2020-02-01-preview #9877

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions sdk/maps/azure-mgmt-maps/azure/mgmt/maps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .maps_management_client import MapsManagementClient
from .version import VERSION
from ._configuration import MapsManagementClientConfiguration
from ._maps_management_client import MapsManagementClient
__all__ = ['MapsManagementClient', 'MapsManagementClientConfiguration']

__all__ = ['MapsManagementClient']
from .version import VERSION

__version__ = VERSION

48 changes: 48 additions & 0 deletions sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_configuration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrestazure import AzureConfiguration

from .version import VERSION


class MapsManagementClientConfiguration(AzureConfiguration):
"""Configuration for MapsManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(MapsManagementClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-mgmt-maps/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,12 @@

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.accounts_operations import AccountsOperations
from . import models


class MapsManagementClientConfiguration(AzureConfiguration):
"""Configuration for MapsManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Subscription credentials which uniquely identify
Microsoft Azure subscription. The subscription ID forms part of the URI
for every service call.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(MapsManagementClientConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-maps/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
from ._configuration import MapsManagementClientConfiguration
from .operations import AccountsOperations
from .operations import MapsOperationsOperations
from .operations import PrivateAtlasesOperations
from . import models


class MapsManagementClient(SDKClient):
Expand All @@ -59,13 +27,15 @@ class MapsManagementClient(SDKClient):

:ivar accounts: Accounts operations
:vartype accounts: azure.mgmt.maps.operations.AccountsOperations
:ivar maps: Maps operations
:vartype maps: azure.mgmt.maps.operations.MapsOperationsOperations
:ivar private_atlases: PrivateAtlases operations
:vartype private_atlases: azure.mgmt.maps.operations.PrivateAtlasesOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Subscription credentials which uniquely identify
Microsoft Azure subscription. The subscription ID forms part of the URI
for every service call.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""
Expand All @@ -77,9 +47,13 @@ def __init__(
super(MapsManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-05-01'
self.api_version = '2020-02-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.accounts = AccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.maps = MapsOperationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.private_atlases = PrivateAtlasesOperations(
self._client, self.config, self._serialize, self._deserialize)
96 changes: 62 additions & 34 deletions sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,79 @@
# --------------------------------------------------------------------------

try:
from .error_details_item_py3 import ErrorDetailsItem
from .error_py3 import Error, ErrorException
from .resource_py3 import Resource
from .sku_py3 import Sku
from .maps_account_py3 import MapsAccount
from .maps_account_create_parameters_py3 import MapsAccountCreateParameters
from .maps_account_update_parameters_py3 import MapsAccountUpdateParameters
from .maps_accounts_move_request_py3 import MapsAccountsMoveRequest
from .maps_key_specification_py3 import MapsKeySpecification
from .maps_account_keys_py3 import MapsAccountKeys
from .maps_operations_value_item_display_py3 import MapsOperationsValueItemDisplay
from .maps_operations_value_item_py3 import MapsOperationsValueItem
from ._models_py3 import AzureEntityResource
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import MapsAccount
from ._models_py3 import MapsAccountCreateParameters
from ._models_py3 import MapsAccountKeys
from ._models_py3 import MapsAccountProperties
from ._models_py3 import MapsAccountUpdateParameters
from ._models_py3 import MapsKeySpecification
from ._models_py3 import MapsOperationsValueItem
from ._models_py3 import MapsOperationsValueItemDisplay
from ._models_py3 import PrivateAtlas
from ._models_py3 import PrivateAtlasCreateParameters
from ._models_py3 import PrivateAtlasProperties
from ._models_py3 import PrivateAtlasUpdateParameters
from ._models_py3 import ProxyResource
from ._models_py3 import Resource
from ._models_py3 import Sku
from ._models_py3 import SystemData
from ._models_py3 import TrackedResource
except (SyntaxError, ImportError):
from .error_details_item import ErrorDetailsItem
from .error import Error, ErrorException
from .resource import Resource
from .sku import Sku
from .maps_account import MapsAccount
from .maps_account_create_parameters import MapsAccountCreateParameters
from .maps_account_update_parameters import MapsAccountUpdateParameters
from .maps_accounts_move_request import MapsAccountsMoveRequest
from .maps_key_specification import MapsKeySpecification
from .maps_account_keys import MapsAccountKeys
from .maps_operations_value_item_display import MapsOperationsValueItemDisplay
from .maps_operations_value_item import MapsOperationsValueItem
from .maps_account_paged import MapsAccountPaged
from .maps_operations_value_item_paged import MapsOperationsValueItemPaged
from .maps_management_client_enums import (
from ._models import AzureEntityResource
from ._models import ErrorAdditionalInfo
from ._models import ErrorResponse, ErrorResponseException
from ._models import MapsAccount
from ._models import MapsAccountCreateParameters
from ._models import MapsAccountKeys
from ._models import MapsAccountProperties
from ._models import MapsAccountUpdateParameters
from ._models import MapsKeySpecification
from ._models import MapsOperationsValueItem
from ._models import MapsOperationsValueItemDisplay
from ._models import PrivateAtlas
from ._models import PrivateAtlasCreateParameters
from ._models import PrivateAtlasProperties
from ._models import PrivateAtlasUpdateParameters
from ._models import ProxyResource
from ._models import Resource
from ._models import Sku
from ._models import SystemData
from ._models import TrackedResource
from ._paged_models import MapsAccountPaged
from ._paged_models import MapsOperationsValueItemPaged
from ._paged_models import PrivateAtlasPaged
from ._maps_management_client_enums import (
CreatedByType,
KeyType,
)

__all__ = [
'ErrorDetailsItem',
'Error', 'ErrorException',
'Resource',
'Sku',
'AzureEntityResource',
'ErrorAdditionalInfo',
'ErrorResponse', 'ErrorResponseException',
'MapsAccount',
'MapsAccountCreateParameters',
'MapsAccountKeys',
'MapsAccountProperties',
'MapsAccountUpdateParameters',
'MapsAccountsMoveRequest',
'MapsKeySpecification',
'MapsAccountKeys',
'MapsOperationsValueItemDisplay',
'MapsOperationsValueItem',
'MapsOperationsValueItemDisplay',
'PrivateAtlas',
'PrivateAtlasCreateParameters',
'PrivateAtlasProperties',
'PrivateAtlasUpdateParameters',
'ProxyResource',
'Resource',
'Sku',
'SystemData',
'TrackedResource',
'MapsAccountPaged',
'MapsOperationsValueItemPaged',
'PrivateAtlasPaged',
'CreatedByType',
'KeyType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
from enum import Enum


class CreatedByType(str, Enum):

user = "User"
application = "Application"
managed_identity = "ManagedIdentity"
key = "Key"


class KeyType(str, Enum):

primary = "primary"
Expand Down
Loading