From 13bdcfd1f5240f3dd740eb52a6c894b2681c3bdb Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 17 Feb 2020 06:16:31 +0000 Subject: [PATCH] Generated from b09ba8a03649deb5cc55920a8a50e9eefed0912f trying to suppress --- .../azure/mgmt/maps/__init__.py | 7 +- .../azure/mgmt/maps/_configuration.py | 48 ++ ...t_client.py => _maps_management_client.py} | 56 +- .../azure/mgmt/maps/models/__init__.py | 96 ++- ...ms.py => _maps_management_client_enums.py} | 8 + .../azure/mgmt/maps/models/_models.py | 696 ++++++++++++++++++ .../azure/mgmt/maps/models/_models_py3.py | 696 ++++++++++++++++++ ...s_value_item_paged.py => _paged_models.py} | 26 + .../azure/mgmt/maps/models/error.py | 63 -- .../mgmt/maps/models/error_details_item.py | 45 -- .../maps/models/error_details_item_py3.py | 45 -- .../azure/mgmt/maps/models/error_py3.py | 63 -- .../azure/mgmt/maps/models/maps_account.py | 62 -- .../models/maps_account_create_parameters.py | 47 -- .../maps_account_create_parameters_py3.py | 47 -- .../mgmt/maps/models/maps_account_keys.py | 46 -- .../mgmt/maps/models/maps_account_keys_py3.py | 46 -- .../mgmt/maps/models/maps_account_paged.py | 27 - .../mgmt/maps/models/maps_account_py3.py | 62 -- .../models/maps_account_update_parameters.py | 36 - .../maps_account_update_parameters_py3.py | 36 - .../maps/models/maps_accounts_move_request.py | 41 -- .../models/maps_accounts_move_request_py3.py | 41 -- .../maps/models/maps_key_specification.py | 35 - .../maps/models/maps_key_specification_py3.py | 35 - .../maps/models/maps_operations_value_item.py | 44 -- .../maps_operations_value_item_display.py | 51 -- .../maps_operations_value_item_display_py3.py | 51 -- .../models/maps_operations_value_item_py3.py | 44 -- .../azure/mgmt/maps/models/resource.py | 46 -- .../azure/mgmt/maps/models/resource_py3.py | 46 -- .../azure/mgmt/maps/models/sku.py | 43 -- .../azure/mgmt/maps/models/sku_py3.py | 43 -- .../azure/mgmt/maps/operations/__init__.py | 6 +- ..._operations.py => _accounts_operations.py} | 319 +++----- .../operations/_maps_operations_operations.py | 100 +++ .../operations/_private_atlases_operations.py | 390 ++++++++++ 37 files changed, 2150 insertions(+), 1443 deletions(-) create mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_configuration.py rename sdk/maps/azure-mgmt-maps/azure/mgmt/maps/{maps_management_client.py => _maps_management_client.py} (50%) rename sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/{maps_management_client_enums.py => _maps_management_client_enums.py} (80%) create mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models.py create mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models_py3.py rename sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/{maps_operations_value_item_paged.py => _paged_models.py} (53%) delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error_details_item.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error_details_item_py3.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error_py3.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_create_parameters.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_create_parameters_py3.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_keys.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_keys_py3.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_paged.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_py3.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_update_parameters.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_update_parameters_py3.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_accounts_move_request.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_accounts_move_request_py3.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_key_specification.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_key_specification_py3.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_display.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_display_py3.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_py3.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/resource.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/resource_py3.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/sku.py delete mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/sku_py3.py rename sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/{accounts_operations.py => _accounts_operations.py} (65%) create mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_maps_operations_operations.py create mode 100644 sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_private_atlases_operations.py diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/__init__.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/__init__.py index 0a7916353c17..3c562d08fd81 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/__init__.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/__init__.py @@ -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 diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_configuration.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_configuration.py new file mode 100644 index 000000000000..10b495276d6a --- /dev/null +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_configuration.py @@ -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` + :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 diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/maps_management_client.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_maps_management_client.py similarity index 50% rename from sdk/maps/azure-mgmt-maps/azure/mgmt/maps/maps_management_client.py rename to sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_maps_management_client.py index 7cb0af30b5b7..1525145f9f0c 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/maps_management_client.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/_maps_management_client.py @@ -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` - :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): @@ -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` - :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 """ @@ -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) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/__init__.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/__init__.py index 4bdf8309fed0..50697b009ba1 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/__init__.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/__init__.py @@ -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', ] diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_management_client_enums.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_maps_management_client_enums.py similarity index 80% rename from sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_management_client_enums.py rename to sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_maps_management_client_enums.py index 6a1a13bc6fa6..e61ad7254b93 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_management_client_enums.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_maps_management_client_enums.py @@ -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" diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models.py new file mode 100644 index 000000000000..db7c5aab61e3 --- /dev/null +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models.py @@ -0,0 +1,696 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorAdditionalInfo(Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorResponse(Model): + """The resource management error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.maps.models.ErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.maps.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + + +class MapsAccount(TrackedResource): + """An Azure resource which represents access to a suite of Maps REST APIs. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :ivar sku: The SKU of this account. + :vartype sku: ~azure.mgmt.maps.models.Sku + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.maps.models.SystemData + :ivar properties: The map account properties. + :vartype properties: ~azure.mgmt.maps.models.MapsAccountProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'MapsAccountProperties'}, + } + + def __init__(self, **kwargs): + super(MapsAccount, self).__init__(**kwargs) + self.sku = None + self.system_data = None + self.properties = None + + +class MapsAccountCreateParameters(Model): + """Parameters used to create a new Maps Account. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). Each tag must have a key no greater than 128 + characters and value no greater than 256 characters. + :type tags: dict[str, str] + :param sku: Required. The SKU of this account. + :type sku: ~azure.mgmt.maps.models.Sku + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(MapsAccountCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + + +class MapsAccountKeys(Model): + """The set of keys which can be used to access the Maps REST APIs. Two keys + are provided for key rotation without interruption. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The full Azure resource identifier of the Maps Account. + :vartype id: str + :ivar primary_key: The primary key for accessing the Maps REST APIs. + :vartype primary_key: str + :ivar secondary_key: The secondary key for accessing the Maps REST APIs. + :vartype secondary_key: str + """ + + _validation = { + 'id': {'readonly': True}, + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MapsAccountKeys, self).__init__(**kwargs) + self.id = None + self.primary_key = None + self.secondary_key = None + + +class MapsAccountProperties(Model): + """Additional Map account properties. + + :param x_ms_client_id: A unique identifier for the maps account + :type x_ms_client_id: str + """ + + _attribute_map = { + 'x_ms_client_id': {'key': 'x-ms-client-id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MapsAccountProperties, self).__init__(**kwargs) + self.x_ms_client_id = kwargs.get('x_ms_client_id', None) + + +class MapsAccountUpdateParameters(Model): + """Parameters used to update an existing Maps Account. + + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + :param sku: The SKU of this account. + :type sku: ~azure.mgmt.maps.models.Sku + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(MapsAccountUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + + +class MapsKeySpecification(Model): + """Whether the operation refers to the primary or secondary key. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. Whether the operation refers to the primary or + secondary key. Possible values include: 'primary', 'secondary' + :type key_type: str or ~azure.mgmt.maps.models.KeyType + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MapsKeySpecification, self).__init__(**kwargs) + self.key_type = kwargs.get('key_type', None) + + +class MapsOperationsValueItem(Model): + """MapsOperationsValueItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :param display: The human-readable description of the operation. + :type display: ~azure.mgmt.maps.models.MapsOperationsValueItemDisplay + :ivar origin: The origin of the operation. + :vartype origin: str + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'MapsOperationsValueItemDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MapsOperationsValueItem, self).__init__(**kwargs) + self.name = None + self.display = kwargs.get('display', None) + self.origin = None + + +class MapsOperationsValueItemDisplay(Model): + """The human-readable description of the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft Maps. + :vartype provider: str + :ivar resource: Resource on which the operation is performed. + :vartype resource: str + :ivar operation: The action that users can perform, based on their + permission level. + :vartype operation: str + :ivar description: The description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MapsOperationsValueItemDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class PrivateAtlas(TrackedResource): + """An Azure resource which represents which will provision the ability to + create private location data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param properties: The Private Atlas resource properties. + :type properties: ~azure.mgmt.maps.models.PrivateAtlasProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateAtlasProperties'}, + } + + def __init__(self, **kwargs): + super(PrivateAtlas, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class PrivateAtlasCreateParameters(Model): + """Parameters used to create a new Private Atlas resource. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(PrivateAtlasCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class PrivateAtlasProperties(Model): + """Private Atlas resource properties. + + :param provisioning_state: The state of the resource provisioning, + terminal states: Succeeded, Failed, Canceled + :type provisioning_state: str + """ + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateAtlasProperties, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + + +class PrivateAtlasUpdateParameters(Model): + """Parameters used to update an existing Private Atlas resource. + + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(PrivateAtlasUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + + +class Sku(Model): + """The SKU of the Maps Account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU, in standard format (such as + S0). + :type name: str + :ivar tier: Gets the sku tier. This is based on the SKU name. + :vartype tier: str + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.maps.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or ~azure.mgmt.maps.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models_py3.py new file mode 100644 index 000000000000..21a84ca42313 --- /dev/null +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_models_py3.py @@ -0,0 +1,696 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorAdditionalInfo(Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorResponse(Model): + """The resource management error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.maps.models.ErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.maps.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class MapsAccount(TrackedResource): + """An Azure resource which represents access to a suite of Maps REST APIs. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :ivar sku: The SKU of this account. + :vartype sku: ~azure.mgmt.maps.models.Sku + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.maps.models.SystemData + :ivar properties: The map account properties. + :vartype properties: ~azure.mgmt.maps.models.MapsAccountProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'MapsAccountProperties'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(MapsAccount, self).__init__(tags=tags, location=location, **kwargs) + self.sku = None + self.system_data = None + self.properties = None + + +class MapsAccountCreateParameters(Model): + """Parameters used to create a new Maps Account. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). Each tag must have a key no greater than 128 + characters and value no greater than 256 characters. + :type tags: dict[str, str] + :param sku: Required. The SKU of this account. + :type sku: ~azure.mgmt.maps.models.Sku + """ + + _validation = { + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None: + super(MapsAccountCreateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.sku = sku + + +class MapsAccountKeys(Model): + """The set of keys which can be used to access the Maps REST APIs. Two keys + are provided for key rotation without interruption. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The full Azure resource identifier of the Maps Account. + :vartype id: str + :ivar primary_key: The primary key for accessing the Maps REST APIs. + :vartype primary_key: str + :ivar secondary_key: The secondary key for accessing the Maps REST APIs. + :vartype secondary_key: str + """ + + _validation = { + 'id': {'readonly': True}, + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MapsAccountKeys, self).__init__(**kwargs) + self.id = None + self.primary_key = None + self.secondary_key = None + + +class MapsAccountProperties(Model): + """Additional Map account properties. + + :param x_ms_client_id: A unique identifier for the maps account + :type x_ms_client_id: str + """ + + _attribute_map = { + 'x_ms_client_id': {'key': 'x-ms-client-id', 'type': 'str'}, + } + + def __init__(self, *, x_ms_client_id: str=None, **kwargs) -> None: + super(MapsAccountProperties, self).__init__(**kwargs) + self.x_ms_client_id = x_ms_client_id + + +class MapsAccountUpdateParameters(Model): + """Parameters used to update an existing Maps Account. + + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + :param sku: The SKU of this account. + :type sku: ~azure.mgmt.maps.models.Sku + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, tags=None, sku=None, **kwargs) -> None: + super(MapsAccountUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.sku = sku + + +class MapsKeySpecification(Model): + """Whether the operation refers to the primary or secondary key. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. Whether the operation refers to the primary or + secondary key. Possible values include: 'primary', 'secondary' + :type key_type: str or ~azure.mgmt.maps.models.KeyType + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__(self, *, key_type, **kwargs) -> None: + super(MapsKeySpecification, self).__init__(**kwargs) + self.key_type = key_type + + +class MapsOperationsValueItem(Model): + """MapsOperationsValueItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :param display: The human-readable description of the operation. + :type display: ~azure.mgmt.maps.models.MapsOperationsValueItemDisplay + :ivar origin: The origin of the operation. + :vartype origin: str + """ + + _validation = { + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'MapsOperationsValueItemDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(MapsOperationsValueItem, self).__init__(**kwargs) + self.name = None + self.display = display + self.origin = None + + +class MapsOperationsValueItemDisplay(Model): + """The human-readable description of the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft Maps. + :vartype provider: str + :ivar resource: Resource on which the operation is performed. + :vartype resource: str + :ivar operation: The action that users can perform, based on their + permission level. + :vartype operation: str + :ivar description: The description of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MapsOperationsValueItemDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class PrivateAtlas(TrackedResource): + """An Azure resource which represents which will provision the ability to + create private location data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param properties: The Private Atlas resource properties. + :type properties: ~azure.mgmt.maps.models.PrivateAtlasProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateAtlasProperties'}, + } + + def __init__(self, *, location: str, tags=None, properties=None, **kwargs) -> None: + super(PrivateAtlas, self).__init__(tags=tags, location=location, **kwargs) + self.properties = properties + + +class PrivateAtlasCreateParameters(Model): + """Parameters used to create a new Private Atlas resource. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The location of the resource. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(PrivateAtlasCreateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class PrivateAtlasProperties(Model): + """Private Atlas resource properties. + + :param provisioning_state: The state of the resource provisioning, + terminal states: Succeeded, Failed, Canceled + :type provisioning_state: str + """ + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, provisioning_state: str=None, **kwargs) -> None: + super(PrivateAtlasProperties, self).__init__(**kwargs) + self.provisioning_state = provisioning_state + + +class PrivateAtlasUpdateParameters(Model): + """Parameters used to update an existing Private Atlas resource. + + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(PrivateAtlasUpdateParameters, self).__init__(**kwargs) + self.tags = tags + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class Sku(Model): + """The SKU of the Maps Account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU, in standard format (such as + S0). + :type name: str + :ivar tier: Gets the sku tier. This is based on the SKU name. + :vartype tier: str + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name: str, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = None + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.maps.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or ~azure.mgmt.maps.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_paged.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_paged_models.py similarity index 53% rename from sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_paged.py rename to sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_paged_models.py index 3a5af1dc447b..6ac8ef1376e9 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_paged.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/_paged_models.py @@ -12,6 +12,19 @@ from msrest.paging import Paged +class MapsAccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`MapsAccount ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MapsAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(MapsAccountPaged, self).__init__(*args, **kwargs) class MapsOperationsValueItemPaged(Paged): """ A paging container for iterating over a list of :class:`MapsOperationsValueItem ` object @@ -25,3 +38,16 @@ class MapsOperationsValueItemPaged(Paged): def __init__(self, *args, **kwargs): super(MapsOperationsValueItemPaged, self).__init__(*args, **kwargs) +class PrivateAtlasPaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateAtlas ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateAtlas]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateAtlasPaged, self).__init__(*args, **kwargs) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error.py deleted file mode 100644 index 04c39fcc3a7f..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Error(Model): - """This object is returned when an error occurs in the Maps API. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code. - :vartype code: str - :ivar message: If available, a human readable description of the error. - :vartype message: str - :ivar target: If available, the component generating the error. - :vartype target: str - :ivar details: If available, a list of additional details about the error. - :vartype details: list[~azure.mgmt.maps.models.ErrorDetailsItem] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetailsItem]'}, - } - - def __init__(self, **kwargs): - super(Error, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - - -class ErrorException(HttpOperationError): - """Server responsed with exception of type: 'Error'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorException, self).__init__(deserialize, response, 'Error', *args) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error_details_item.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error_details_item.py deleted file mode 100644 index 56cfb2b7bf18..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error_details_item.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 msrest.serialization import Model - - -class ErrorDetailsItem(Model): - """ErrorDetailsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code. - :vartype code: str - :ivar message: If available, a human readable description of the error. - :vartype message: str - :ivar target: If available, the component generating the error. - :vartype target: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorDetailsItem, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error_details_item_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error_details_item_py3.py deleted file mode 100644 index 104240a2cca2..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error_details_item_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 msrest.serialization import Model - - -class ErrorDetailsItem(Model): - """ErrorDetailsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code. - :vartype code: str - :ivar message: If available, a human readable description of the error. - :vartype message: str - :ivar target: If available, the component generating the error. - :vartype target: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorDetailsItem, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error_py3.py deleted file mode 100644 index 0d9085501f6d..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/error_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class Error(Model): - """This object is returned when an error occurs in the Maps API. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code. - :vartype code: str - :ivar message: If available, a human readable description of the error. - :vartype message: str - :ivar target: If available, the component generating the error. - :vartype target: str - :ivar details: If available, a list of additional details about the error. - :vartype details: list[~azure.mgmt.maps.models.ErrorDetailsItem] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetailsItem]'}, - } - - def __init__(self, **kwargs) -> None: - super(Error, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - - -class ErrorException(HttpOperationError): - """Server responsed with exception of type: 'Error'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorException, self).__init__(deserialize, response, 'Error', *args) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account.py deleted file mode 100644 index 74524c9d67c4..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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 .resource import Resource - - -class MapsAccount(Resource): - """An Azure resource which represents access to a suite of Maps REST APIs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The fully qualified Maps Account resource identifier. - :vartype id: str - :ivar name: The name of the Maps Account, which is unique within a - Resource Group. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: Gets a list of key value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across - resource groups). A maximum of 15 tags can be provided for a resource. - Each tag must have a key no greater than 128 characters and value no - greater than 256 characters. - :vartype tags: dict[str, str] - :ivar sku: The SKU of this account. - :vartype sku: ~azure.mgmt.maps.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(MapsAccount, self).__init__(**kwargs) - self.location = None - self.tags = None - self.sku = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_create_parameters.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_create_parameters.py deleted file mode 100644 index d3fb8c778d97..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_create_parameters.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsAccountCreateParameters(Model): - """Parameters used to create a new Maps Account. - - All required parameters must be populated in order to send to Azure. - - :param location: Required. The location of the resource. - :type location: str - :param tags: Gets or sets a list of key value pairs that describe the - resource. These tags can be used in viewing and grouping this resource - (across resource groups). A maximum of 15 tags can be provided for a - resource. Each tag must have a key no greater than 128 characters and - value no greater than 256 characters. - :type tags: dict[str, str] - :param sku: Required. The SKU of this account. - :type sku: ~azure.mgmt.maps.models.Sku - """ - - _validation = { - 'location': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(MapsAccountCreateParameters, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_create_parameters_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_create_parameters_py3.py deleted file mode 100644 index dc5ec797e649..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_create_parameters_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsAccountCreateParameters(Model): - """Parameters used to create a new Maps Account. - - All required parameters must be populated in order to send to Azure. - - :param location: Required. The location of the resource. - :type location: str - :param tags: Gets or sets a list of key value pairs that describe the - resource. These tags can be used in viewing and grouping this resource - (across resource groups). A maximum of 15 tags can be provided for a - resource. Each tag must have a key no greater than 128 characters and - value no greater than 256 characters. - :type tags: dict[str, str] - :param sku: Required. The SKU of this account. - :type sku: ~azure.mgmt.maps.models.Sku - """ - - _validation = { - 'location': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None: - super(MapsAccountCreateParameters, self).__init__(**kwargs) - self.location = location - self.tags = tags - self.sku = sku diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_keys.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_keys.py deleted file mode 100644 index 3591827bad7e..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_keys.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsAccountKeys(Model): - """The set of keys which can be used to access the Maps REST APIs. Two keys - are provided for key rotation without interruption. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The full Azure resource identifier of the Maps Account. - :vartype id: str - :ivar primary_key: The primary key for accessing the Maps REST APIs. - :vartype primary_key: str - :ivar secondary_key: The secondary key for accessing the Maps REST APIs. - :vartype secondary_key: str - """ - - _validation = { - 'id': {'readonly': True}, - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MapsAccountKeys, self).__init__(**kwargs) - self.id = None - self.primary_key = None - self.secondary_key = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_keys_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_keys_py3.py deleted file mode 100644 index f441c2a3e5e0..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_keys_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsAccountKeys(Model): - """The set of keys which can be used to access the Maps REST APIs. Two keys - are provided for key rotation without interruption. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The full Azure resource identifier of the Maps Account. - :vartype id: str - :ivar primary_key: The primary key for accessing the Maps REST APIs. - :vartype primary_key: str - :ivar secondary_key: The secondary key for accessing the Maps REST APIs. - :vartype secondary_key: str - """ - - _validation = { - 'id': {'readonly': True}, - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MapsAccountKeys, self).__init__(**kwargs) - self.id = None - self.primary_key = None - self.secondary_key = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_paged.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_paged.py deleted file mode 100644 index 52861a1b61c0..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class MapsAccountPaged(Paged): - """ - A paging container for iterating over a list of :class:`MapsAccount ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MapsAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(MapsAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_py3.py deleted file mode 100644 index 96745b19eadc..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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 .resource import Resource - - -class MapsAccount(Resource): - """An Azure resource which represents access to a suite of Maps REST APIs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The fully qualified Maps Account resource identifier. - :vartype id: str - :ivar name: The name of the Maps Account, which is unique within a - Resource Group. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - :ivar location: The location of the resource. - :vartype location: str - :ivar tags: Gets a list of key value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across - resource groups). A maximum of 15 tags can be provided for a resource. - Each tag must have a key no greater than 128 characters and value no - greater than 256 characters. - :vartype tags: dict[str, str] - :ivar sku: The SKU of this account. - :vartype sku: ~azure.mgmt.maps.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs) -> None: - super(MapsAccount, self).__init__(**kwargs) - self.location = None - self.tags = None - self.sku = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_update_parameters.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_update_parameters.py deleted file mode 100644 index a816f367ced9..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_update_parameters.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsAccountUpdateParameters(Model): - """Parameters used to update an existing Maps Account. - - :param tags: Gets or sets a list of key value pairs that describe the - resource. These tags can be used in viewing and grouping this resource - (across resource groups). A maximum of 15 tags can be provided for a - resource. Each tag must have a key no greater than 128 characters and - value no greater than 256 characters. - :type tags: dict[str, str] - :param sku: The SKU of this account. - :type sku: ~azure.mgmt.maps.models.Sku - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(MapsAccountUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_update_parameters_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_update_parameters_py3.py deleted file mode 100644 index d51707e686dc..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_account_update_parameters_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsAccountUpdateParameters(Model): - """Parameters used to update an existing Maps Account. - - :param tags: Gets or sets a list of key value pairs that describe the - resource. These tags can be used in viewing and grouping this resource - (across resource groups). A maximum of 15 tags can be provided for a - resource. Each tag must have a key no greater than 128 characters and - value no greater than 256 characters. - :type tags: dict[str, str] - :param sku: The SKU of this account. - :type sku: ~azure.mgmt.maps.models.Sku - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, tags=None, sku=None, **kwargs) -> None: - super(MapsAccountUpdateParameters, self).__init__(**kwargs) - self.tags = tags - self.sku = sku diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_accounts_move_request.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_accounts_move_request.py deleted file mode 100644 index 762d321b9910..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_accounts_move_request.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsAccountsMoveRequest(Model): - """The description of what resources to move between resource groups. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_group: Required. The name of the destination - resource group. - :type target_resource_group: str - :param resource_ids: Required. A list of resource names to move from the - source resource group. - :type resource_ids: list[str] - """ - - _validation = { - 'target_resource_group': {'required': True}, - 'resource_ids': {'required': True}, - } - - _attribute_map = { - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'resource_ids': {'key': 'resourceIds', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(MapsAccountsMoveRequest, self).__init__(**kwargs) - self.target_resource_group = kwargs.get('target_resource_group', None) - self.resource_ids = kwargs.get('resource_ids', None) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_accounts_move_request_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_accounts_move_request_py3.py deleted file mode 100644 index c049da9a7ecc..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_accounts_move_request_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsAccountsMoveRequest(Model): - """The description of what resources to move between resource groups. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_group: Required. The name of the destination - resource group. - :type target_resource_group: str - :param resource_ids: Required. A list of resource names to move from the - source resource group. - :type resource_ids: list[str] - """ - - _validation = { - 'target_resource_group': {'required': True}, - 'resource_ids': {'required': True}, - } - - _attribute_map = { - 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, - 'resource_ids': {'key': 'resourceIds', 'type': '[str]'}, - } - - def __init__(self, *, target_resource_group: str, resource_ids, **kwargs) -> None: - super(MapsAccountsMoveRequest, self).__init__(**kwargs) - self.target_resource_group = target_resource_group - self.resource_ids = resource_ids diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_key_specification.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_key_specification.py deleted file mode 100644 index d07561e9eb3c..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_key_specification.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsKeySpecification(Model): - """Whether the operation refers to the primary or secondary key. - - All required parameters must be populated in order to send to Azure. - - :param key_type: Required. Whether the operation refers to the primary or - secondary key. Possible values include: 'primary', 'secondary' - :type key_type: str or ~azure.mgmt.maps.models.KeyType - """ - - _validation = { - 'key_type': {'required': True}, - } - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MapsKeySpecification, self).__init__(**kwargs) - self.key_type = kwargs.get('key_type', None) diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_key_specification_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_key_specification_py3.py deleted file mode 100644 index 488c914f0fc4..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_key_specification_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsKeySpecification(Model): - """Whether the operation refers to the primary or secondary key. - - All required parameters must be populated in order to send to Azure. - - :param key_type: Required. Whether the operation refers to the primary or - secondary key. Possible values include: 'primary', 'secondary' - :type key_type: str or ~azure.mgmt.maps.models.KeyType - """ - - _validation = { - 'key_type': {'required': True}, - } - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__(self, *, key_type, **kwargs) -> None: - super(MapsKeySpecification, self).__init__(**kwargs) - self.key_type = key_type diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item.py deleted file mode 100644 index 384178156e6d..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsOperationsValueItem(Model): - """MapsOperationsValueItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :param display: The human-readable description of the operation. - :type display: ~azure.mgmt.maps.models.MapsOperationsValueItemDisplay - :ivar origin: The origin of the operation. - :vartype origin: str - """ - - _validation = { - 'name': {'readonly': True}, - 'origin': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'MapsOperationsValueItemDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MapsOperationsValueItem, self).__init__(**kwargs) - self.name = None - self.display = kwargs.get('display', None) - self.origin = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_display.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_display.py deleted file mode 100644 index 7c8deddee6b8..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_display.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsOperationsValueItemDisplay(Model): - """The human-readable description of the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft Maps. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: The action that users can perform, based on their - permission level. - :vartype operation: str - :ivar description: The description of the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MapsOperationsValueItemDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_display_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_display_py3.py deleted file mode 100644 index a9adedf283ff..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_display_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsOperationsValueItemDisplay(Model): - """The human-readable description of the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft Maps. - :vartype provider: str - :ivar resource: Resource on which the operation is performed. - :vartype resource: str - :ivar operation: The action that users can perform, based on their - permission level. - :vartype operation: str - :ivar description: The description of the operation. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MapsOperationsValueItemDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_py3.py deleted file mode 100644 index f4e0e7cc41f6..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/maps_operations_value_item_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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 msrest.serialization import Model - - -class MapsOperationsValueItem(Model): - """MapsOperationsValueItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :param display: The human-readable description of the operation. - :type display: ~azure.mgmt.maps.models.MapsOperationsValueItemDisplay - :ivar origin: The origin of the operation. - :vartype origin: str - """ - - _validation = { - 'name': {'readonly': True}, - 'origin': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'MapsOperationsValueItemDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - } - - def __init__(self, *, display=None, **kwargs) -> None: - super(MapsOperationsValueItem, self).__init__(**kwargs) - self.name = None - self.display = display - self.origin = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/resource.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/resource.py deleted file mode 100644 index 8ae06e8d88ec..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/resource.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 msrest.serialization import Model - - -class Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The fully qualified Maps Account resource identifier. - :vartype id: str - :ivar name: The name of the Maps Account, which is unique within a - Resource Group. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/resource_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/resource_py3.py deleted file mode 100644 index 682516cb7482..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/resource_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 msrest.serialization import Model - - -class Resource(Model): - """An Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The fully qualified Maps Account resource identifier. - :vartype id: str - :ivar name: The name of the Maps Account, which is unique within a - Resource Group. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/sku.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/sku.py deleted file mode 100644 index 5130804d7862..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/sku.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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 msrest.serialization import Model - - -class Sku(Model): - """The SKU of the Maps Account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU, in standard format (such as - S0). - :type name: str - :ivar tier: Gets the sku tier. This is based on the SKU name. - :vartype tier: str - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/sku_py3.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/sku_py3.py deleted file mode 100644 index a5ca7132fb85..000000000000 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/models/sku_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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 msrest.serialization import Model - - -class Sku(Model): - """The SKU of the Maps Account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU, in standard format (such as - S0). - :type name: str - :ivar tier: Gets the sku tier. This is based on the SKU name. - :vartype tier: str - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name: str, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = None diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/__init__.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/__init__.py index 4de259788320..eb77b399d61d 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/__init__.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/__init__.py @@ -9,8 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .accounts_operations import AccountsOperations +from ._accounts_operations import AccountsOperations +from ._maps_operations_operations import MapsOperationsOperations +from ._private_atlases_operations import PrivateAtlasesOperations __all__ = [ 'AccountsOperations', + 'MapsOperationsOperations', + 'PrivateAtlasesOperations', ] diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/accounts_operations.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_accounts_operations.py similarity index 65% rename from sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/accounts_operations.py rename to sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_accounts_operations.py index cebc41e84ae6..bc8b0f94b13a 100644 --- a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/accounts_operations.py +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_accounts_operations.py @@ -18,11 +18,13 @@ class AccountsOperations(object): """AccountsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-05-01". + :ivar api_version: The API version to use for this operation. Constant value: "2020-02-01-preview". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-05-01" + self.api_version = "2020-02-01-preview" self.config = config @@ -41,7 +43,8 @@ def create_or_update( """Create or update a Maps Account. A Maps Account holds the keys which allow access to the Maps REST APIs. - :param resource_group_name: The name of the Azure Resource Group. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param account_name: The name of the Maps Account. :type account_name: str @@ -58,23 +61,24 @@ def create_or_update( :rtype: ~azure.mgmt.maps.models.MapsAccount or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -87,15 +91,13 @@ def create_or_update( body_content = self._serialize.body(maps_account_create_parameters, 'MapsAccountCreateParameters') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('MapsAccount', response) if response.status_code == 201: @@ -113,7 +115,8 @@ def update( """Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku and Tags. - :param resource_group_name: The name of the Azure Resource Group. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param account_name: The name of the Maps Account. :type account_name: str @@ -134,25 +137,26 @@ def update( :rtype: ~azure.mgmt.maps.models.MapsAccount or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ maps_account_update_parameters = models.MapsAccountUpdateParameters(tags=tags, sku=sku) # Construct URL url = self.update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -165,15 +169,13 @@ def update( body_content = self._serialize.body(maps_account_update_parameters, 'MapsAccountUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('MapsAccount', response) @@ -188,7 +190,8 @@ def delete( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): """Delete a Maps Account. - :param resource_group_name: The name of the Azure Resource Group. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param account_name: The name of the Maps Account. :type account_name: str @@ -200,24 +203,23 @@ def delete( :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -226,11 +228,11 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -241,7 +243,8 @@ def get( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): """Get a Maps Account. - :param resource_group_name: The name of the Azure Resource Group. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param account_name: The name of the Maps Account. :type account_name: str @@ -254,24 +257,24 @@ def get( :rtype: ~azure.mgmt.maps.models.MapsAccount or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -280,14 +283,13 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('MapsAccount', response) @@ -302,7 +304,8 @@ def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): """Get all Maps Accounts in a Resource Group. - :param resource_group_name: The name of the Azure Resource Group. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -313,22 +316,21 @@ def list_by_resource_group( :rtype: ~azure.mgmt.maps.models.MapsAccountPaged[~azure.mgmt.maps.models.MapsAccount] :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -336,7 +338,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -345,22 +347,24 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response # Deserialize response - deserialized = models.MapsAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MapsAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MapsAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts'} @@ -378,21 +382,20 @@ def list_by_subscription( :rtype: ~azure.mgmt.maps.models.MapsAccountPaged[~azure.mgmt.maps.models.MapsAccount] :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -400,7 +403,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -409,97 +412,36 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response # Deserialize response - deserialized = models.MapsAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MapsAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MapsAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Maps/accounts'} - def move( - self, resource_group_name, target_resource_group, resource_ids, custom_headers=None, raw=False, **operation_config): - """Moves Maps Accounts from one ResourceGroup (or Subscription) to - another. - - :param resource_group_name: The name of the resource group that - contains Maps Account to move. - :type resource_group_name: str - :param target_resource_group: The name of the destination resource - group. - :type target_resource_group: str - :param resource_ids: A list of resource names to move from the source - resource group. - :type resource_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorException` - """ - move_request = models.MapsAccountsMoveRequest(target_resource_group=target_resource_group, resource_ids=resource_ids) - - # Construct URL - url = self.move.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(move_request, 'MapsAccountsMoveRequest') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} - def list_keys( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): """Get the keys to use with the Maps APIs. A key is used to authenticate and authorize access to the Maps REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration. - :param resource_group_name: The name of the Azure Resource Group. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param account_name: The name of the Maps Account. :type account_name: str @@ -512,24 +454,24 @@ def list_keys( :rtype: ~azure.mgmt.maps.models.MapsAccountKeys or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.list_keys.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -538,14 +480,13 @@ def list_keys( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('MapsAccountKeys', response) @@ -561,7 +502,8 @@ def regenerate_keys( """Regenerate either the primary or secondary key for use with the Maps APIs. The old key will stop working immediately. - :param resource_group_name: The name of the Azure Resource Group. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param account_name: The name of the Maps Account. :type account_name: str @@ -577,25 +519,26 @@ def regenerate_keys( :rtype: ~azure.mgmt.maps.models.MapsAccountKeys or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorException` + :class:`ErrorResponseException` """ key_specification = models.MapsKeySpecification(key_type=key_type) # Construct URL url = self.regenerate_keys.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -608,15 +551,13 @@ def regenerate_keys( body_content = self._serialize.body(key_specification, 'MapsKeySpecification') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - raise models.ErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('MapsAccountKeys', response) @@ -626,63 +567,3 @@ def regenerate_keys( return deserialized regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/regenerateKey'} - - def list_operations( - self, custom_headers=None, raw=False, **operation_config): - """List operations available for the Maps Resource Provider. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of MapsOperationsValueItem - :rtype: - ~azure.mgmt.maps.models.MapsOperationsValueItemPaged[~azure.mgmt.maps.models.MapsOperationsValueItem] - :raises: - :class:`ErrorException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_operations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.MapsOperationsValueItemPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.MapsOperationsValueItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_operations.metadata = {'url': '/providers/Microsoft.Maps/operations'} diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_maps_operations_operations.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_maps_operations_operations.py new file mode 100644 index 000000000000..a901d55e5dda --- /dev/null +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_maps_operations_operations.py @@ -0,0 +1,100 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MapsOperationsOperations(object): + """MapsOperationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-02-01-preview" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """List operations available for the Maps Resource Provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of MapsOperationsValueItem + :rtype: + ~azure.mgmt.maps.models.MapsOperationsValueItemPaged[~azure.mgmt.maps.models.MapsOperationsValueItem] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.MapsOperationsValueItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.Maps/operations'} diff --git a/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_private_atlases_operations.py b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_private_atlases_operations.py new file mode 100644 index 000000000000..09ca7d3e459b --- /dev/null +++ b/sdk/maps/azure-mgmt-maps/azure/mgmt/maps/operations/_private_atlases_operations.py @@ -0,0 +1,390 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PrivateAtlasesOperations(object): + """PrivateAtlasesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-02-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-02-01-preview" + + self.config = config + + def create_or_update( + self, resource_group_name, account_name, private_atlas_name, location, tags=None, custom_headers=None, raw=False, **operation_config): + """Create or update a Private Atlas resource. Private Atlas resource will + enable the usage of Azure resources to build a custom set of mapping + data. It requires an account to exist before it can be created. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param account_name: The name of the Maps Account. + :type account_name: str + :param private_atlas_name: The name of the Private Atlas instance. + :type private_atlas_name: str + :param location: The location of the resource. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAtlas or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.maps.models.PrivateAtlas or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + private_atlas_create_parameters = models.PrivateAtlasCreateParameters(location=location, tags=tags) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'privateAtlasName': self._serialize.url("private_atlas_name", private_atlas_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(private_atlas_create_parameters, 'PrivateAtlasCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAtlas', response) + if response.status_code == 201: + deserialized = self._deserialize('PrivateAtlas', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/privateAtlases/{privateAtlasName}'} + + def update( + self, resource_group_name, account_name, private_atlas_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Updates the Private Atlas resource. Only a subset of the parameters may + be updated after creation, such as Tags. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param account_name: The name of the Maps Account. + :type account_name: str + :param private_atlas_name: The name of the Private Atlas instance. + :type private_atlas_name: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAtlas or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.maps.models.PrivateAtlas or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + private_atlas_update_parameters = models.PrivateAtlasUpdateParameters(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'privateAtlasName': self._serialize.url("private_atlas_name", private_atlas_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(private_atlas_update_parameters, 'PrivateAtlasUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAtlas', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/privateAtlases/{privateAtlasName}'} + + def delete( + self, resource_group_name, account_name, private_atlas_name, custom_headers=None, raw=False, **operation_config): + """Delete a Private Atlas resource. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param account_name: The name of the Maps Account. + :type account_name: str + :param private_atlas_name: The name of the Private Atlas instance. + :type private_atlas_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'privateAtlasName': self._serialize.url("private_atlas_name", private_atlas_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/privateAtlases/{privateAtlasName}'} + + def get( + self, resource_group_name, account_name, private_atlas_name, custom_headers=None, raw=False, **operation_config): + """Get a Private Atlas resource. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param account_name: The name of the Maps Account. + :type account_name: str + :param private_atlas_name: The name of the Private Atlas instance. + :type private_atlas_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAtlas or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.maps.models.PrivateAtlas or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'privateAtlasName': self._serialize.url("private_atlas_name", private_atlas_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateAtlas', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/privateAtlases/{privateAtlasName}'} + + def list_by_account( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Get all Private Atlas instances for an Azure Map Account. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param account_name: The name of the Maps Account. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PrivateAtlas + :rtype: + ~azure.mgmt.maps.models.PrivateAtlasPaged[~azure.mgmt.maps.models.PrivateAtlas] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_account.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateAtlasPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/privateAtlases'}