Skip to content

Commit

Permalink
CodeGen from PR 13214 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
2021 preview sb (Azure#13214)

* Add 2018 files as base commit

* Change files for 2021 in base files

* swagger fix lintdiff errors

* Add private endpoint connection property and refresh get example

* add python2 in readme

* Add checknamespaceavailability 2018 as base commit

* Change checknamespaceavaibility for 2021-preview

* fix track2 pipeline issue

* fix lintdiff error

* fix spell check
  • Loading branch information
SDKAuto committed Mar 16, 2021
1 parent 7da6b64 commit 0e49eb7
Show file tree
Hide file tree
Showing 20 changed files with 9,648 additions and 0 deletions.
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 ServiceBusManagementClientConfiguration
from ._service_bus_management_client import ServiceBusManagementClient
__all__ = ['ServiceBusManagementClient', 'ServiceBusManagementClientConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 ServiceBusManagementClientConfiguration(AzureConfiguration):
"""Configuration for ServiceBusManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Subscription credentials that uniquely identify a
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(ServiceBusManagementClientConfiguration, 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-servicebus/{}'.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,96 @@
# 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 ServiceBusManagementClientConfiguration
from .operations import NamespacesOperations
from .operations import PrivateEndpointConnectionsOperations
from .operations import PrivateLinkResourcesOperations
from .operations import Operations
from .operations import DisasterRecoveryConfigsOperations
from .operations import MigrationConfigsOperations
from .operations import QueuesOperations
from .operations import TopicsOperations
from .operations import RulesOperations
from .operations import SubscriptionsOperations
from . import models


class ServiceBusManagementClient(SDKClient):
"""ServiceBusManagementClient
:ivar config: Configuration for client.
:vartype config: ServiceBusManagementClientConfiguration
:ivar namespaces: Namespaces operations
:vartype namespaces: azure.mgmt.servicebus.v2021_01_01_preview.operations.NamespacesOperations
:ivar private_endpoint_connections: PrivateEndpointConnections operations
:vartype private_endpoint_connections: azure.mgmt.servicebus.v2021_01_01_preview.operations.PrivateEndpointConnectionsOperations
:ivar private_link_resources: PrivateLinkResources operations
:vartype private_link_resources: azure.mgmt.servicebus.v2021_01_01_preview.operations.PrivateLinkResourcesOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.servicebus.v2021_01_01_preview.operations.Operations
:ivar disaster_recovery_configs: DisasterRecoveryConfigs operations
:vartype disaster_recovery_configs: azure.mgmt.servicebus.v2021_01_01_preview.operations.DisasterRecoveryConfigsOperations
:ivar migration_configs: MigrationConfigs operations
:vartype migration_configs: azure.mgmt.servicebus.v2021_01_01_preview.operations.MigrationConfigsOperations
:ivar queues: Queues operations
:vartype queues: azure.mgmt.servicebus.v2021_01_01_preview.operations.QueuesOperations
:ivar topics: Topics operations
:vartype topics: azure.mgmt.servicebus.v2021_01_01_preview.operations.TopicsOperations
:ivar rules: Rules operations
:vartype rules: azure.mgmt.servicebus.v2021_01_01_preview.operations.RulesOperations
:ivar subscriptions: Subscriptions operations
:vartype subscriptions: azure.mgmt.servicebus.v2021_01_01_preview.operations.SubscriptionsOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Subscription credentials that uniquely identify a
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):

self.config = ServiceBusManagementClientConfiguration(credentials, subscription_id, base_url)
super(ServiceBusManagementClient, 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 = '2021-01-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.namespaces = NamespacesOperations(
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)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.disaster_recovery_configs = DisasterRecoveryConfigsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.migration_configs = MigrationConfigsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.queues = QueuesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.topics = TopicsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.rules = RulesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.subscriptions = SubscriptionsOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
# 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 Action
from ._models_py3 import ArmDisasterRecovery
from ._models_py3 import CheckNameAvailability
from ._models_py3 import CheckNameAvailabilityResult
from ._models_py3 import ConnectionState
from ._models_py3 import CorrelationFilter
from ._models_py3 import DictionaryValue
from ._models_py3 import Encryption
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import ErrorResponseError
from ._models_py3 import FailoverProperties
from ._models_py3 import Identity
from ._models_py3 import KeyVaultProperties
from ._models_py3 import MessageCountDetails
from ._models_py3 import MigrationConfigProperties
from ._models_py3 import NetworkRuleSet
from ._models_py3 import NWRuleSetIpRules
from ._models_py3 import NWRuleSetVirtualNetworkRules
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import PrivateEndpoint
from ._models_py3 import PrivateEndpointConnection
from ._models_py3 import PrivateLinkResource
from ._models_py3 import PrivateLinkResourcesListResult
from ._models_py3 import RegenerateAccessKeyParameters
from ._models_py3 import Resource
from ._models_py3 import ResourceNamespacePatch
from ._models_py3 import Rule
from ._models_py3 import SBAuthorizationRule
from ._models_py3 import SBNamespace
from ._models_py3 import SBNamespaceUpdateParameters
from ._models_py3 import SBQueue
from ._models_py3 import SBSku
from ._models_py3 import SBSubscription
from ._models_py3 import SBTopic
from ._models_py3 import SqlFilter
from ._models_py3 import SqlRuleAction
from ._models_py3 import Subnet
from ._models_py3 import SystemData
from ._models_py3 import TrackedResource
from ._models_py3 import UserAssignedIdentityProperties
except (SyntaxError, ImportError):
from ._models import AccessKeys
from ._models import Action
from ._models import ArmDisasterRecovery
from ._models import CheckNameAvailability
from ._models import CheckNameAvailabilityResult
from ._models import ConnectionState
from ._models import CorrelationFilter
from ._models import DictionaryValue
from ._models import Encryption
from ._models import ErrorAdditionalInfo
from ._models import ErrorResponse, ErrorResponseException
from ._models import ErrorResponseError
from ._models import FailoverProperties
from ._models import Identity
from ._models import KeyVaultProperties
from ._models import MessageCountDetails
from ._models import MigrationConfigProperties
from ._models import NetworkRuleSet
from ._models import NWRuleSetIpRules
from ._models import NWRuleSetVirtualNetworkRules
from ._models import Operation
from ._models import OperationDisplay
from ._models import PrivateEndpoint
from ._models import PrivateEndpointConnection
from ._models import PrivateLinkResource
from ._models import PrivateLinkResourcesListResult
from ._models import RegenerateAccessKeyParameters
from ._models import Resource
from ._models import ResourceNamespacePatch
from ._models import Rule
from ._models import SBAuthorizationRule
from ._models import SBNamespace
from ._models import SBNamespaceUpdateParameters
from ._models import SBQueue
from ._models import SBSku
from ._models import SBSubscription
from ._models import SBTopic
from ._models import SqlFilter
from ._models import SqlRuleAction
from ._models import Subnet
from ._models import SystemData
from ._models import TrackedResource
from ._models import UserAssignedIdentityProperties
from ._paged_models import ArmDisasterRecoveryPaged
from ._paged_models import MigrationConfigPropertiesPaged
from ._paged_models import NetworkRuleSetPaged
from ._paged_models import OperationPaged
from ._paged_models import PrivateEndpointConnectionPaged
from ._paged_models import RulePaged
from ._paged_models import SBAuthorizationRulePaged
from ._paged_models import SBNamespacePaged
from ._paged_models import SBQueuePaged
from ._paged_models import SBSubscriptionPaged
from ._paged_models import SBTopicPaged
from ._service_bus_management_client_enums import (
SkuName,
SkuTier,
ManagedServiceIdentityType,
CreatedByType,
KeySource,
PrivateLinkConnectionStatus,
EndPointProvisioningState,
AccessRights,
KeyType,
UnavailableReason,
ProvisioningStateDR,
RoleDisasterRecovery,
NetworkRuleIPAction,
DefaultAction,
EntityStatus,
FilterType,
)

__all__ = [
'AccessKeys',
'Action',
'ArmDisasterRecovery',
'CheckNameAvailability',
'CheckNameAvailabilityResult',
'ConnectionState',
'CorrelationFilter',
'DictionaryValue',
'Encryption',
'ErrorAdditionalInfo',
'ErrorResponse', 'ErrorResponseException',
'ErrorResponseError',
'FailoverProperties',
'Identity',
'KeyVaultProperties',
'MessageCountDetails',
'MigrationConfigProperties',
'NetworkRuleSet',
'NWRuleSetIpRules',
'NWRuleSetVirtualNetworkRules',
'Operation',
'OperationDisplay',
'PrivateEndpoint',
'PrivateEndpointConnection',
'PrivateLinkResource',
'PrivateLinkResourcesListResult',
'RegenerateAccessKeyParameters',
'Resource',
'ResourceNamespacePatch',
'Rule',
'SBAuthorizationRule',
'SBNamespace',
'SBNamespaceUpdateParameters',
'SBQueue',
'SBSku',
'SBSubscription',
'SBTopic',
'SqlFilter',
'SqlRuleAction',
'Subnet',
'SystemData',
'TrackedResource',
'UserAssignedIdentityProperties',
'SBNamespacePaged',
'NetworkRuleSetPaged',
'SBAuthorizationRulePaged',
'PrivateEndpointConnectionPaged',
'OperationPaged',
'ArmDisasterRecoveryPaged',
'MigrationConfigPropertiesPaged',
'SBQueuePaged',
'SBTopicPaged',
'RulePaged',
'SBSubscriptionPaged',
'SkuName',
'SkuTier',
'ManagedServiceIdentityType',
'CreatedByType',
'KeySource',
'PrivateLinkConnectionStatus',
'EndPointProvisioningState',
'AccessRights',
'KeyType',
'UnavailableReason',
'ProvisioningStateDR',
'RoleDisasterRecovery',
'NetworkRuleIPAction',
'DefaultAction',
'EntityStatus',
'FilterType',
]
Loading

0 comments on commit 0e49eb7

Please sign in to comment.