Skip to content

Commit

Permalink
CodeGen from PR 12077 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Azure Purview Public Preview API (Azure#12077)
  • Loading branch information
SDKAuto committed Dec 16, 2020
1 parent e1f2009 commit 76a1647
Show file tree
Hide file tree
Showing 15 changed files with 4,282 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sdk/purview/azure-mgmt-purview/azure/mgmt/purview/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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 ._configuration import PurviewManagementClientConfiguration
from ._purview_management_client import PurviewManagementClient
__all__ = ['PurviewManagementClient', 'PurviewManagementClientConfiguration']

from .version import VERSION

__version__ = VERSION

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

from .version import VERSION


class PurviewManagementClientConfiguration(AzureConfiguration):
"""Configuration for PurviewManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The subscription identifier
: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(PurviewManagementClientConfiguration, 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-purview/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 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.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import PurviewManagementClientConfiguration
from .operations import AccountsOperations
from .operations import DefaultAccountsOperations
from .operations import Operations
from .operations import PrivateEndpointConnectionsOperations
from .operations import PrivateLinkResourcesOperations
from . import models


class PurviewManagementClient(SDKClient):
"""Creates a Microsoft.Purview management client.
:ivar config: Configuration for client.
:vartype config: PurviewManagementClientConfiguration
:ivar accounts: Accounts operations
:vartype accounts: azure.mgmt.purview.operations.AccountsOperations
:ivar default_accounts: DefaultAccounts operations
:vartype default_accounts: azure.mgmt.purview.operations.DefaultAccountsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.purview.operations.Operations
:ivar private_endpoint_connections: PrivateEndpointConnections operations
:vartype private_endpoint_connections: azure.mgmt.purview.operations.PrivateEndpointConnectionsOperations
:ivar private_link_resources: PrivateLinkResources operations
:vartype private_link_resources: azure.mgmt.purview.operations.PrivateLinkResourcesOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The subscription identifier
:type subscription_id: str
:param str base_url: Service URL
"""

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

self.config = PurviewManagementClientConfiguration(credentials, subscription_id, base_url)
super(PurviewManagementClient, 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 = '2020-12-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.accounts = AccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.default_accounts = DefaultAccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self.config, self._serialize, self._deserialize)
136 changes: 136 additions & 0 deletions sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# 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.
# --------------------------------------------------------------------------

try:
from ._models_py3 import AccessKeys
from ._models_py3 import Account
from ._models_py3 import AccountEndpoints
from ._models_py3 import AccountPropertiesEndpoints
from ._models_py3 import AccountPropertiesManagedResources
from ._models_py3 import AccountSku
from ._models_py3 import AccountUpdateParameters
from ._models_py3 import CheckNameAvailabilityRequest
from ._models_py3 import CheckNameAvailabilityResult
from ._models_py3 import CloudConnectors
from ._models_py3 import DefaultAccountPayload
from ._models_py3 import DeletedAccount
from ._models_py3 import DeletedAccountList
from ._models_py3 import DeletedAccountPropertiesModel
from ._models_py3 import DimensionProperties
from ._models_py3 import ErrorModel
from ._models_py3 import ErrorResponseModel, ErrorResponseModelException
from ._models_py3 import ErrorResponseModelError
from ._models_py3 import Identity
from ._models_py3 import ManagedResources
from ._models_py3 import NetworkAcls
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationMetaLogSpecification
from ._models_py3 import OperationMetaMetricSpecification
from ._models_py3 import OperationMetaServiceSpecification
from ._models_py3 import PrivateEndpoint
from ._models_py3 import PrivateEndpointConnection
from ._models_py3 import PrivateLinkResource
from ._models_py3 import PrivateLinkServiceConnectionState
from ._models_py3 import ProxyResource
from ._models_py3 import TrackedResource
except (SyntaxError, ImportError):
from ._models import AccessKeys
from ._models import Account
from ._models import AccountEndpoints
from ._models import AccountPropertiesEndpoints
from ._models import AccountPropertiesManagedResources
from ._models import AccountSku
from ._models import AccountUpdateParameters
from ._models import CheckNameAvailabilityRequest
from ._models import CheckNameAvailabilityResult
from ._models import CloudConnectors
from ._models import DefaultAccountPayload
from ._models import DeletedAccount
from ._models import DeletedAccountList
from ._models import DeletedAccountPropertiesModel
from ._models import DimensionProperties
from ._models import ErrorModel
from ._models import ErrorResponseModel, ErrorResponseModelException
from ._models import ErrorResponseModelError
from ._models import Identity
from ._models import ManagedResources
from ._models import NetworkAcls
from ._models import Operation
from ._models import OperationDisplay
from ._models import OperationMetaLogSpecification
from ._models import OperationMetaMetricSpecification
from ._models import OperationMetaServiceSpecification
from ._models import PrivateEndpoint
from ._models import PrivateEndpointConnection
from ._models import PrivateLinkResource
from ._models import PrivateLinkServiceConnectionState
from ._models import ProxyResource
from ._models import TrackedResource
from ._paged_models import AccountPaged
from ._paged_models import OperationPaged
from ._paged_models import PrivateEndpointConnectionPaged
from ._paged_models import PrivateLinkResourcePaged
from ._purview_management_client_enums import (
DefaultAction,
Status,
ProvisioningState,
Name,
Type,
ScopeType,
Reason,
)

__all__ = [
'AccessKeys',
'Account',
'AccountEndpoints',
'AccountPropertiesEndpoints',
'AccountPropertiesManagedResources',
'AccountSku',
'AccountUpdateParameters',
'CheckNameAvailabilityRequest',
'CheckNameAvailabilityResult',
'CloudConnectors',
'DefaultAccountPayload',
'DeletedAccount',
'DeletedAccountList',
'DeletedAccountPropertiesModel',
'DimensionProperties',
'ErrorModel',
'ErrorResponseModel', 'ErrorResponseModelException',
'ErrorResponseModelError',
'Identity',
'ManagedResources',
'NetworkAcls',
'Operation',
'OperationDisplay',
'OperationMetaLogSpecification',
'OperationMetaMetricSpecification',
'OperationMetaServiceSpecification',
'PrivateEndpoint',
'PrivateEndpointConnection',
'PrivateLinkResource',
'PrivateLinkServiceConnectionState',
'ProxyResource',
'TrackedResource',
'AccountPaged',
'OperationPaged',
'PrivateEndpointConnectionPaged',
'PrivateLinkResourcePaged',
'DefaultAction',
'Status',
'ProvisioningState',
'Name',
'Type',
'ScopeType',
'Reason',
]
Loading

0 comments on commit 76a1647

Please sign in to comment.