diff --git a/sdk/servicebus/azure-mgmt-servicebus/README.rst b/sdk/servicebus/azure-mgmt-servicebus/README.rst index 4bcd7348bfc5..2bf3ed0f397e 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/README.rst +++ b/sdk/servicebus/azure-mgmt-servicebus/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Service Bus Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/__init__.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/__init__.py index d26139d3e8b7..57ddb5d55414 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/__init__.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .service_bus_management_client import ServiceBusManagementClient -from .version import VERSION +from ._configuration import ServiceBusManagementClientConfiguration +from ._service_bus_management_client import ServiceBusManagementClient +__all__ = ['ServiceBusManagementClient', 'ServiceBusManagementClientConfiguration'] -__all__ = ['ServiceBusManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/_configuration.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/_configuration.py new file mode 100644 index 000000000000..8a5f1933957a --- /dev/null +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/_configuration.py @@ -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` + :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 diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/service_bus_management_client.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/_service_bus_management_client.py similarity index 67% rename from sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/service_bus_management_client.py rename to sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/_service_bus_management_client.py index 2eb08c7d4baf..70dc46ba3bbf 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/service_bus_management_client.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/_service_bus_management_client.py @@ -11,54 +11,20 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.namespaces_operations import NamespacesOperations -from .operations.disaster_recovery_configs_operations import DisasterRecoveryConfigsOperations -from .operations.migration_configs_operations import MigrationConfigsOperations -from .operations.queues_operations import QueuesOperations -from .operations.topics_operations import TopicsOperations -from .operations.subscriptions_operations import SubscriptionsOperations -from .operations.rules_operations import RulesOperations -from .operations.regions_operations import RegionsOperations -from .operations.premium_messaging_regions_operations import PremiumMessagingRegionsOperations -from .operations.event_hubs_operations import EventHubsOperations -from . import models - - -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` - :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) - 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 +from ._configuration import ServiceBusManagementClientConfiguration +from .operations import Operations +from .operations import NamespacesOperations +from .operations import DisasterRecoveryConfigsOperations +from .operations import MigrationConfigsOperations +from .operations import QueuesOperations +from .operations import TopicsOperations +from .operations import SubscriptionsOperations +from .operations import RulesOperations +from .operations import RegionsOperations +from .operations import PremiumMessagingRegionsOperations +from .operations import EventHubsOperations +from . import models class ServiceBusManagementClient(SDKClient): diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py index d0aa97c6be8f..63d8bb5d20f3 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py @@ -10,91 +10,92 @@ # -------------------------------------------------------------------------- try: - from .tracked_resource_py3 import TrackedResource - from .resource_py3 import Resource - from .resource_namespace_patch_py3 import ResourceNamespacePatch - from .sb_sku_py3 import SBSku - from .sb_namespace_py3 import SBNamespace - from .sb_namespace_update_parameters_py3 import SBNamespaceUpdateParameters - from .sb_namespace_migrate_py3 import SBNamespaceMigrate - from .sb_authorization_rule_py3 import SBAuthorizationRule - from .authorization_rule_properties_py3 import AuthorizationRuleProperties - from .access_keys_py3 import AccessKeys - from .regenerate_access_key_parameters_py3 import RegenerateAccessKeyParameters - from .message_count_details_py3 import MessageCountDetails - from .sb_queue_py3 import SBQueue - from .sb_topic_py3 import SBTopic - from .sb_subscription_py3 import SBSubscription - from .check_name_availability_py3 import CheckNameAvailability - from .check_name_availability_result_py3 import CheckNameAvailabilityResult - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .action_py3 import Action - from .sql_filter_py3 import SqlFilter - from .correlation_filter_py3 import CorrelationFilter - from .rule_py3 import Rule - from .sql_rule_action_py3 import SqlRuleAction - from .premium_messaging_regions_properties_py3 import PremiumMessagingRegionsProperties - from .premium_messaging_regions_py3 import PremiumMessagingRegions - from .destination_py3 import Destination - from .capture_description_py3 import CaptureDescription - from .eventhub_py3 import Eventhub - from .arm_disaster_recovery_py3 import ArmDisasterRecovery - from .migration_config_properties_py3 import MigrationConfigProperties - from .subnet_py3 import Subnet - from .nw_rule_set_ip_rules_py3 import NWRuleSetIpRules - from .nw_rule_set_virtual_network_rules_py3 import NWRuleSetVirtualNetworkRules - from .network_rule_set_py3 import NetworkRuleSet + from ._models_py3 import AccessKeys + from ._models_py3 import Action + from ._models_py3 import ArmDisasterRecovery + from ._models_py3 import AuthorizationRuleProperties + from ._models_py3 import CaptureDescription + from ._models_py3 import CheckNameAvailability + from ._models_py3 import CheckNameAvailabilityResult + from ._models_py3 import CorrelationFilter + from ._models_py3 import Destination + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import Eventhub + 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 PremiumMessagingRegions + from ._models_py3 import PremiumMessagingRegionsProperties + 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 SBNamespaceMigrate + 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 TrackedResource except (SyntaxError, ImportError): - from .tracked_resource import TrackedResource - from .resource import Resource - from .resource_namespace_patch import ResourceNamespacePatch - from .sb_sku import SBSku - from .sb_namespace import SBNamespace - from .sb_namespace_update_parameters import SBNamespaceUpdateParameters - from .sb_namespace_migrate import SBNamespaceMigrate - from .sb_authorization_rule import SBAuthorizationRule - from .authorization_rule_properties import AuthorizationRuleProperties - from .access_keys import AccessKeys - from .regenerate_access_key_parameters import RegenerateAccessKeyParameters - from .message_count_details import MessageCountDetails - from .sb_queue import SBQueue - from .sb_topic import SBTopic - from .sb_subscription import SBSubscription - from .check_name_availability import CheckNameAvailability - from .check_name_availability_result import CheckNameAvailabilityResult - from .operation_display import OperationDisplay - from .operation import Operation - from .error_response import ErrorResponse, ErrorResponseException - from .action import Action - from .sql_filter import SqlFilter - from .correlation_filter import CorrelationFilter - from .rule import Rule - from .sql_rule_action import SqlRuleAction - from .premium_messaging_regions_properties import PremiumMessagingRegionsProperties - from .premium_messaging_regions import PremiumMessagingRegions - from .destination import Destination - from .capture_description import CaptureDescription - from .eventhub import Eventhub - from .arm_disaster_recovery import ArmDisasterRecovery - from .migration_config_properties import MigrationConfigProperties - from .subnet import Subnet - from .nw_rule_set_ip_rules import NWRuleSetIpRules - from .nw_rule_set_virtual_network_rules import NWRuleSetVirtualNetworkRules - from .network_rule_set import NetworkRuleSet -from .operation_paged import OperationPaged -from .sb_namespace_paged import SBNamespacePaged -from .sb_authorization_rule_paged import SBAuthorizationRulePaged -from .arm_disaster_recovery_paged import ArmDisasterRecoveryPaged -from .migration_config_properties_paged import MigrationConfigPropertiesPaged -from .sb_queue_paged import SBQueuePaged -from .sb_topic_paged import SBTopicPaged -from .sb_subscription_paged import SBSubscriptionPaged -from .rule_paged import RulePaged -from .premium_messaging_regions_paged import PremiumMessagingRegionsPaged -from .eventhub_paged import EventhubPaged -from .service_bus_management_client_enums import ( + from ._models import AccessKeys + from ._models import Action + from ._models import ArmDisasterRecovery + from ._models import AuthorizationRuleProperties + from ._models import CaptureDescription + from ._models import CheckNameAvailability + from ._models import CheckNameAvailabilityResult + from ._models import CorrelationFilter + from ._models import Destination + from ._models import ErrorResponse, ErrorResponseException + from ._models import Eventhub + 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 PremiumMessagingRegions + from ._models import PremiumMessagingRegionsProperties + 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 SBNamespaceMigrate + 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 TrackedResource +from ._paged_models import ArmDisasterRecoveryPaged +from ._paged_models import EventhubPaged +from ._paged_models import MigrationConfigPropertiesPaged +from ._paged_models import NetworkRuleSetPaged +from ._paged_models import OperationPaged +from ._paged_models import PremiumMessagingRegionsPaged +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, NameSpaceType, @@ -111,45 +112,46 @@ ) __all__ = [ - 'TrackedResource', - 'Resource', - 'ResourceNamespacePatch', - 'SBSku', - 'SBNamespace', - 'SBNamespaceUpdateParameters', - 'SBNamespaceMigrate', - 'SBAuthorizationRule', - 'AuthorizationRuleProperties', 'AccessKeys', - 'RegenerateAccessKeyParameters', - 'MessageCountDetails', - 'SBQueue', - 'SBTopic', - 'SBSubscription', + 'Action', + 'ArmDisasterRecovery', + 'AuthorizationRuleProperties', + 'CaptureDescription', 'CheckNameAvailability', 'CheckNameAvailabilityResult', - 'OperationDisplay', - 'Operation', - 'ErrorResponse', 'ErrorResponseException', - 'Action', - 'SqlFilter', 'CorrelationFilter', - 'Rule', - 'SqlRuleAction', - 'PremiumMessagingRegionsProperties', - 'PremiumMessagingRegions', 'Destination', - 'CaptureDescription', + 'ErrorResponse', 'ErrorResponseException', 'Eventhub', - 'ArmDisasterRecovery', + 'MessageCountDetails', 'MigrationConfigProperties', - 'Subnet', + 'NetworkRuleSet', 'NWRuleSetIpRules', 'NWRuleSetVirtualNetworkRules', - 'NetworkRuleSet', + 'Operation', + 'OperationDisplay', + 'PremiumMessagingRegions', + 'PremiumMessagingRegionsProperties', + 'RegenerateAccessKeyParameters', + 'Resource', + 'ResourceNamespacePatch', + 'Rule', + 'SBAuthorizationRule', + 'SBNamespace', + 'SBNamespaceMigrate', + 'SBNamespaceUpdateParameters', + 'SBQueue', + 'SBSku', + 'SBSubscription', + 'SBTopic', + 'SqlFilter', + 'SqlRuleAction', + 'Subnet', + 'TrackedResource', 'OperationPaged', 'SBNamespacePaged', 'SBAuthorizationRulePaged', + 'NetworkRuleSetPaged', 'ArmDisasterRecoveryPaged', 'MigrationConfigPropertiesPaged', 'SBQueuePaged', diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_models.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_models.py new file mode 100644 index 000000000000..af70d88446e6 --- /dev/null +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_models.py @@ -0,0 +1,1686 @@ +# 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 AccessKeys(Model): + """Namespace/ServiceBus Connection String. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_connection_string: Primary connection string of the created + namespace authorization rule. + :vartype primary_connection_string: str + :ivar secondary_connection_string: Secondary connection string of the + created namespace authorization rule. + :vartype secondary_connection_string: str + :ivar alias_primary_connection_string: Primary connection string of the + alias if GEO DR is enabled + :vartype alias_primary_connection_string: str + :ivar alias_secondary_connection_string: Secondary connection string of + the alias if GEO DR is enabled + :vartype alias_secondary_connection_string: str + :ivar primary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype primary_key: str + :ivar secondary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype secondary_key: str + :ivar key_name: A string that describes the authorization rule. + :vartype key_name: str + """ + + _validation = { + 'primary_connection_string': {'readonly': True}, + 'secondary_connection_string': {'readonly': True}, + 'alias_primary_connection_string': {'readonly': True}, + 'alias_secondary_connection_string': {'readonly': True}, + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + 'key_name': {'readonly': True}, + } + + _attribute_map = { + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + 'alias_primary_connection_string': {'key': 'aliasPrimaryConnectionString', 'type': 'str'}, + 'alias_secondary_connection_string': {'key': 'aliasSecondaryConnectionString', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccessKeys, self).__init__(**kwargs) + self.primary_connection_string = None + self.secondary_connection_string = None + self.alias_primary_connection_string = None + self.alias_secondary_connection_string = None + self.primary_key = None + self.secondary_key = None + self.key_name = None + + +class Action(Model): + """Represents the filter actions which are allowed for the transformation of a + message that have been matched by a filter expression. + + :param sql_expression: SQL expression. e.g. MyProperty='ABC' + :type sql_expression: str + :param compatibility_level: This property is reserved for future use. An + integer value showing the compatibility level, currently hard-coded to 20. + :type compatibility_level: int + :param requires_preprocessing: Value that indicates whether the rule + action requires preprocessing. Default value: True . + :type requires_preprocessing: bool + """ + + _attribute_map = { + 'sql_expression': {'key': 'sqlExpression', 'type': 'str'}, + 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'int'}, + 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(Action, self).__init__(**kwargs) + self.sql_expression = kwargs.get('sql_expression', None) + self.compatibility_level = kwargs.get('compatibility_level', None) + self.requires_preprocessing = kwargs.get('requires_preprocessing', True) + + +class Resource(Model): + """The Resource definition for other than namespace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: 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 + + +class ArmDisasterRecovery(Resource): + """Single item in List or Get Alias(Disaster Recovery configuration) + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar provisioning_state: Provisioning state of the Alias(Disaster + Recovery configuration) - possible values 'Accepted' or 'Succeeded' or + 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.servicebus.models.ProvisioningStateDR + :ivar pending_replication_operations_count: Number of entities pending to + be replicated. + :vartype pending_replication_operations_count: long + :param partner_namespace: ARM Id of the Primary/Secondary eventhub + namespace name, which is part of GEO DR pairing + :type partner_namespace: str + :param alternate_name: Primary/Secondary eventhub namespace name, which is + part of GEO DR pairing + :type alternate_name: str + :ivar role: role of namespace in GEO DR - possible values 'Primary' or + 'PrimaryNotReplicating' or 'Secondary'. Possible values include: + 'Primary', 'PrimaryNotReplicating', 'Secondary' + :vartype role: str or ~azure.mgmt.servicebus.models.RoleDisasterRecovery + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pending_replication_operations_count': {'readonly': True}, + 'role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateDR'}, + 'pending_replication_operations_count': {'key': 'properties.pendingReplicationOperationsCount', 'type': 'long'}, + 'partner_namespace': {'key': 'properties.partnerNamespace', 'type': 'str'}, + 'alternate_name': {'key': 'properties.alternateName', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'RoleDisasterRecovery'}, + } + + def __init__(self, **kwargs): + super(ArmDisasterRecovery, self).__init__(**kwargs) + self.provisioning_state = None + self.pending_replication_operations_count = None + self.partner_namespace = kwargs.get('partner_namespace', None) + self.alternate_name = kwargs.get('alternate_name', None) + self.role = None + + +class AuthorizationRuleProperties(Model): + """AuthorizationRule properties. + + All required parameters must be populated in order to send to Azure. + + :param rights: Required. The rights associated with the rule. + :type rights: list[str or ~azure.mgmt.servicebus.models.AccessRights] + """ + + _validation = { + 'rights': {'required': True}, + } + + _attribute_map = { + 'rights': {'key': 'rights', 'type': '[AccessRights]'}, + } + + def __init__(self, **kwargs): + super(AuthorizationRuleProperties, self).__init__(**kwargs) + self.rights = kwargs.get('rights', None) + + +class CaptureDescription(Model): + """Properties to configure capture description for eventhub. + + :param enabled: A value that indicates whether capture description is + enabled. + :type enabled: bool + :param encoding: Enumerates the possible values for the encoding format of + capture description. Possible values include: 'Avro', 'AvroDeflate' + :type encoding: str or + ~azure.mgmt.servicebus.models.EncodingCaptureDescription + :param interval_in_seconds: The time window allows you to set the + frequency with which the capture to Azure Blobs will happen, value should + between 60 to 900 seconds + :type interval_in_seconds: int + :param size_limit_in_bytes: The size window defines the amount of data + built up in your Event Hub before an capture operation, value should be + between 10485760 and 524288000 bytes + :type size_limit_in_bytes: int + :param destination: Properties of Destination where capture will be + stored. (Storage Account, Blob Names) + :type destination: ~azure.mgmt.servicebus.models.Destination + """ + + _validation = { + 'interval_in_seconds': {'maximum': 900, 'minimum': 60}, + 'size_limit_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'encoding': {'key': 'encoding', 'type': 'EncodingCaptureDescription'}, + 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, + 'size_limit_in_bytes': {'key': 'sizeLimitInBytes', 'type': 'int'}, + 'destination': {'key': 'destination', 'type': 'Destination'}, + } + + def __init__(self, **kwargs): + super(CaptureDescription, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.encoding = kwargs.get('encoding', None) + self.interval_in_seconds = kwargs.get('interval_in_seconds', None) + self.size_limit_in_bytes = kwargs.get('size_limit_in_bytes', None) + self.destination = kwargs.get('destination', None) + + +class CheckNameAvailability(Model): + """Description of a Check Name availability request properties. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Name to check the namespace name availability + and The namespace name can contain only letters, numbers, and hyphens. The + namespace must start with a letter, and it must end with a letter or + number. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailability, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class CheckNameAvailabilityResult(Model): + """Description of a Check Name availability request properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar message: The detailed info regarding the reason associated with the + namespace. + :vartype message: str + :param name_available: Value indicating namespace is availability, true if + the namespace is available; otherwise, false. + :type name_available: bool + :param reason: The reason for unavailability of a namespace. Possible + values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', + 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription' + :type reason: str or ~azure.mgmt.servicebus.models.UnavailableReason + """ + + _validation = { + 'message': {'readonly': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'UnavailableReason'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.message = None + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CorrelationFilter(Model): + """Represents the correlation filter expression. + + :param properties: dictionary object for custom filters + :type properties: dict[str, str] + :param correlation_id: Identifier of the correlation. + :type correlation_id: str + :param message_id: Identifier of the message. + :type message_id: str + :param to: Address to send to. + :type to: str + :param reply_to: Address of the queue to reply to. + :type reply_to: str + :param label: Application specific label. + :type label: str + :param session_id: Session identifier. + :type session_id: str + :param reply_to_session_id: Session identifier to reply to. + :type reply_to_session_id: str + :param content_type: Content type of the message. + :type content_type: str + :param requires_preprocessing: Value that indicates whether the rule + action requires preprocessing. Default value: True . + :type requires_preprocessing: bool + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': '{str}'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'to': {'key': 'to', 'type': 'str'}, + 'reply_to': {'key': 'replyTo', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'reply_to_session_id': {'key': 'replyToSessionId', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CorrelationFilter, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.message_id = kwargs.get('message_id', None) + self.to = kwargs.get('to', None) + self.reply_to = kwargs.get('reply_to', None) + self.label = kwargs.get('label', None) + self.session_id = kwargs.get('session_id', None) + self.reply_to_session_id = kwargs.get('reply_to_session_id', None) + self.content_type = kwargs.get('content_type', None) + self.requires_preprocessing = kwargs.get('requires_preprocessing', True) + + +class Destination(Model): + """Capture storage details for capture description. + + :param name: Name for capture destination + :type name: str + :param storage_account_resource_id: Resource id of the storage account to + be used to create the blobs + :type storage_account_resource_id: str + :param blob_container: Blob container Name + :type blob_container: str + :param archive_name_format: Blob naming convention for archive, e.g. + {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. + Here all the parameters (Namespace,EventHub .. etc) are mandatory + irrespective of order + :type archive_name_format: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, + 'blob_container': {'key': 'properties.blobContainer', 'type': 'str'}, + 'archive_name_format': {'key': 'properties.archiveNameFormat', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Destination, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.storage_account_resource_id = kwargs.get('storage_account_resource_id', None) + self.blob_container = kwargs.get('blob_container', None) + self.archive_name_format = kwargs.get('archive_name_format', None) + + +class ErrorResponse(Model): + """Error response indicates ServiceBus service is not able to process the + incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', 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 Eventhub(Resource): + """Single item in List or Get Event Hub operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar partition_ids: Current number of shards on the Event Hub. + :vartype partition_ids: list[str] + :ivar created_at: Exact time the Event Hub was created. + :vartype created_at: datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: datetime + :param message_retention_in_days: Number of days to retain the events for + this Event Hub, value should be 1 to 7 days + :type message_retention_in_days: long + :param partition_count: Number of partitions created for the Event Hub, + allowed values are from 1 to 32 partitions. + :type partition_count: long + :param status: Enumerates the possible values for the status of the Event + Hub. Possible values include: 'Active', 'Disabled', 'Restoring', + 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', + 'Unknown' + :type status: str or ~azure.mgmt.servicebus.models.EntityStatus + :param capture_description: Properties of capture description + :type capture_description: + ~azure.mgmt.servicebus.models.CaptureDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'partition_ids': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'message_retention_in_days': {'maximum': 7, 'minimum': 1}, + 'partition_count': {'maximum': 32, 'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'partition_ids': {'key': 'properties.partitionIds', 'type': '[str]'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'message_retention_in_days': {'key': 'properties.messageRetentionInDays', 'type': 'long'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'long'}, + 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, + 'capture_description': {'key': 'properties.captureDescription', 'type': 'CaptureDescription'}, + } + + def __init__(self, **kwargs): + super(Eventhub, self).__init__(**kwargs) + self.partition_ids = None + self.created_at = None + self.updated_at = None + self.message_retention_in_days = kwargs.get('message_retention_in_days', None) + self.partition_count = kwargs.get('partition_count', None) + self.status = kwargs.get('status', None) + self.capture_description = kwargs.get('capture_description', None) + + +class MessageCountDetails(Model): + """Message Count Details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar active_message_count: Number of active messages in the queue, topic, + or subscription. + :vartype active_message_count: long + :ivar dead_letter_message_count: Number of messages that are dead + lettered. + :vartype dead_letter_message_count: long + :ivar scheduled_message_count: Number of scheduled messages. + :vartype scheduled_message_count: long + :ivar transfer_message_count: Number of messages transferred to another + queue, topic, or subscription. + :vartype transfer_message_count: long + :ivar transfer_dead_letter_message_count: Number of messages transferred + into dead letters. + :vartype transfer_dead_letter_message_count: long + """ + + _validation = { + 'active_message_count': {'readonly': True}, + 'dead_letter_message_count': {'readonly': True}, + 'scheduled_message_count': {'readonly': True}, + 'transfer_message_count': {'readonly': True}, + 'transfer_dead_letter_message_count': {'readonly': True}, + } + + _attribute_map = { + 'active_message_count': {'key': 'activeMessageCount', 'type': 'long'}, + 'dead_letter_message_count': {'key': 'deadLetterMessageCount', 'type': 'long'}, + 'scheduled_message_count': {'key': 'scheduledMessageCount', 'type': 'long'}, + 'transfer_message_count': {'key': 'transferMessageCount', 'type': 'long'}, + 'transfer_dead_letter_message_count': {'key': 'transferDeadLetterMessageCount', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(MessageCountDetails, self).__init__(**kwargs) + self.active_message_count = None + self.dead_letter_message_count = None + self.scheduled_message_count = None + self.transfer_message_count = None + self.transfer_dead_letter_message_count = None + + +class MigrationConfigProperties(Resource): + """Single item in List or Get Migration Config operation. + + 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar provisioning_state: Provisioning state of Migration Configuration + :vartype provisioning_state: str + :ivar pending_replication_operations_count: Number of entities pending to + be replicated. + :vartype pending_replication_operations_count: long + :param target_namespace: Required. Existing premium Namespace ARM Id name + which has no entities, will be used for migration + :type target_namespace: str + :param post_migration_name: Required. Name to access Standard Namespace + after migration + :type post_migration_name: str + :ivar migration_state: State in which Standard to Premium Migration is, + possible values : Unknown, Reverting, Completing, Initiating, Syncing, + Active + :vartype migration_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pending_replication_operations_count': {'readonly': True}, + 'target_namespace': {'required': True}, + 'post_migration_name': {'required': True}, + 'migration_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'pending_replication_operations_count': {'key': 'properties.pendingReplicationOperationsCount', 'type': 'long'}, + 'target_namespace': {'key': 'properties.targetNamespace', 'type': 'str'}, + 'post_migration_name': {'key': 'properties.postMigrationName', 'type': 'str'}, + 'migration_state': {'key': 'properties.migrationState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MigrationConfigProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.pending_replication_operations_count = None + self.target_namespace = kwargs.get('target_namespace', None) + self.post_migration_name = kwargs.get('post_migration_name', None) + self.migration_state = None + + +class NetworkRuleSet(Resource): + """Description of NetworkRuleSet resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param default_action: Default Action for Network Rule Set. Possible + values include: 'Allow', 'Deny' + :type default_action: str or ~azure.mgmt.servicebus.models.DefaultAction + :param virtual_network_rules: List VirtualNetwork Rules + :type virtual_network_rules: + list[~azure.mgmt.servicebus.models.NWRuleSetVirtualNetworkRules] + :param ip_rules: List of IpRules + :type ip_rules: list[~azure.mgmt.servicebus.models.NWRuleSetIpRules] + """ + + _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'}, + 'default_action': {'key': 'properties.defaultAction', 'type': 'str'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'}, + } + + def __init__(self, **kwargs): + super(NetworkRuleSet, self).__init__(**kwargs) + self.default_action = kwargs.get('default_action', None) + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + self.ip_rules = kwargs.get('ip_rules', None) + + +class NWRuleSetIpRules(Model): + """Description of NetWorkRuleSet - IpRules resource. + + :param ip_mask: IP Mask + :type ip_mask: str + :param action: The IP Filter Action. Possible values include: 'Allow'. + Default value: "Allow" . + :type action: str or ~azure.mgmt.servicebus.models.NetworkRuleIPAction + """ + + _attribute_map = { + 'ip_mask': {'key': 'ipMask', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NWRuleSetIpRules, self).__init__(**kwargs) + self.ip_mask = kwargs.get('ip_mask', None) + self.action = kwargs.get('action', "Allow") + + +class NWRuleSetVirtualNetworkRules(Model): + """Description of VirtualNetworkRules - NetworkRules resource. + + :param subnet: Subnet properties + :type subnet: ~azure.mgmt.servicebus.models.Subnet + :param ignore_missing_vnet_service_endpoint: Value that indicates whether + to ignore missing VNet Service Endpoint + :type ignore_missing_vnet_service_endpoint: bool + """ + + _attribute_map = { + 'subnet': {'key': 'subnet', 'type': 'Subnet'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(NWRuleSetVirtualNetworkRules, self).__init__(**kwargs) + self.subnet = kwargs.get('subnet', None) + self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) + + +class Operation(Model): + """A ServiceBus REST API operation. + + 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 object that represents the operation. + :type display: ~azure.mgmt.servicebus.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.ServiceBus + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Invoice, + etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + + +class ResourceNamespacePatch(Resource): + """The Resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, 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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ResourceNamespacePatch, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class PremiumMessagingRegions(ResourceNamespacePatch): + """Premium Messaging Region. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: + :type properties: + ~azure.mgmt.servicebus.models.PremiumMessagingRegionsProperties + """ + + _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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'PremiumMessagingRegionsProperties'}, + } + + def __init__(self, **kwargs): + super(PremiumMessagingRegions, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class PremiumMessagingRegionsProperties(Model): + """PremiumMessagingRegionsProperties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Region code + :vartype code: str + :ivar full_name: Full name of the region + :vartype full_name: str + """ + + _validation = { + 'code': {'readonly': True}, + 'full_name': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'full_name': {'key': 'fullName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PremiumMessagingRegionsProperties, self).__init__(**kwargs) + self.code = None + self.full_name = None + + +class RegenerateAccessKeyParameters(Model): + """Parameters supplied to the Regenerate Authorization Rule operation, + specifies which key needs to be reset. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. The access key to regenerate. Possible values + include: 'PrimaryKey', 'SecondaryKey' + :type key_type: str or ~azure.mgmt.servicebus.models.KeyType + :param key: Optional, if the key value provided, is reset for KeyType + value or autogenerate Key value set for keyType + :type key: str + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'KeyType'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegenerateAccessKeyParameters, self).__init__(**kwargs) + self.key_type = kwargs.get('key_type', None) + self.key = kwargs.get('key', None) + + +class Rule(Resource): + """Description of Rule Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param action: Represents the filter actions which are allowed for the + transformation of a message that have been matched by a filter expression. + :type action: ~azure.mgmt.servicebus.models.Action + :param filter_type: Filter type that is evaluated against a + BrokeredMessage. Possible values include: 'SqlFilter', 'CorrelationFilter' + :type filter_type: str or ~azure.mgmt.servicebus.models.FilterType + :param sql_filter: Properties of sqlFilter + :type sql_filter: ~azure.mgmt.servicebus.models.SqlFilter + :param correlation_filter: Properties of correlationFilter + :type correlation_filter: ~azure.mgmt.servicebus.models.CorrelationFilter + """ + + _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'}, + 'action': {'key': 'properties.action', 'type': 'Action'}, + 'filter_type': {'key': 'properties.filterType', 'type': 'FilterType'}, + 'sql_filter': {'key': 'properties.sqlFilter', 'type': 'SqlFilter'}, + 'correlation_filter': {'key': 'properties.correlationFilter', 'type': 'CorrelationFilter'}, + } + + def __init__(self, **kwargs): + super(Rule, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.filter_type = kwargs.get('filter_type', None) + self.sql_filter = kwargs.get('sql_filter', None) + self.correlation_filter = kwargs.get('correlation_filter', None) + + +class SBAuthorizationRule(Resource): + """Description of a namespace authorization rule. + + 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param rights: Required. The rights associated with the rule. + :type rights: list[str or ~azure.mgmt.servicebus.models.AccessRights] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'rights': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'rights': {'key': 'properties.rights', 'type': '[AccessRights]'}, + } + + def __init__(self, **kwargs): + super(SBAuthorizationRule, self).__init__(**kwargs) + self.rights = kwargs.get('rights', None) + + +class TrackedResource(Resource): + """The Resource definition. + + 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. The Geo-location where the resource lives + :type location: str + :param tags: Resource tags + :type tags: dict[str, 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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class SBNamespace(TrackedResource): + """Description of a namespace 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. The Geo-location where the resource lives + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: Properties of Sku + :type sku: ~azure.mgmt.servicebus.models.SBSku + :ivar provisioning_state: Provisioning state of the namespace. + :vartype provisioning_state: str + :ivar created_at: The time the namespace was created. + :vartype created_at: datetime + :ivar updated_at: The time the namespace was updated. + :vartype updated_at: datetime + :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus + operations. + :vartype service_bus_endpoint: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'service_bus_endpoint': {'readonly': True}, + 'metric_id': {'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': 'SBSku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SBNamespace, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.provisioning_state = None + self.created_at = None + self.updated_at = None + self.service_bus_endpoint = None + self.metric_id = None + + +class SBNamespaceMigrate(Model): + """Namespace Migrate Object. + + All required parameters must be populated in order to send to Azure. + + :param target_namespace_type: Required. Type of namespaces. Possible + values include: 'Messaging', 'NotificationHub', 'Mixed', 'EventHub', + 'Relay' + :type target_namespace_type: str or + ~azure.mgmt.servicebus.models.NameSpaceType + """ + + _validation = { + 'target_namespace_type': {'required': True}, + } + + _attribute_map = { + 'target_namespace_type': {'key': 'targetNamespaceType', 'type': 'NameSpaceType'}, + } + + def __init__(self, **kwargs): + super(SBNamespaceMigrate, self).__init__(**kwargs) + self.target_namespace_type = kwargs.get('target_namespace_type', None) + + +class SBNamespaceUpdateParameters(ResourceNamespacePatch): + """Description of a namespace resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: Properties of Sku + :type sku: ~azure.mgmt.servicebus.models.SBSku + :ivar provisioning_state: Provisioning state of the namespace. + :vartype provisioning_state: str + :ivar created_at: The time the namespace was created. + :vartype created_at: datetime + :ivar updated_at: The time the namespace was updated. + :vartype updated_at: datetime + :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus + operations. + :vartype service_bus_endpoint: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'service_bus_endpoint': {'readonly': True}, + 'metric_id': {'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': 'SBSku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SBNamespaceUpdateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.provisioning_state = None + self.created_at = None + self.updated_at = None + self.service_bus_endpoint = None + self.metric_id = None + + +class SBQueue(Resource): + """Description of queue Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar count_details: Message Count Details. + :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails + :ivar created_at: The exact time the message was created. + :vartype created_at: datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: datetime + :ivar accessed_at: Last time a message was sent, or the last time there + was a receive request to this queue. + :vartype accessed_at: datetime + :ivar size_in_bytes: The size of the queue, in bytes. + :vartype size_in_bytes: long + :ivar message_count: The number of messages in the queue. + :vartype message_count: long + :param lock_duration: ISO 8601 timespan duration of a peek-lock; that is, + the amount of time that the message is locked for other receivers. The + maximum value for LockDuration is 5 minutes; the default value is 1 + minute. + :type lock_duration: timedelta + :param max_size_in_megabytes: The maximum size of the queue in megabytes, + which is the size of memory allocated for the queue. Default is 1024. + :type max_size_in_megabytes: int + :param requires_duplicate_detection: A value indicating if this queue + requires duplicate detection. + :type requires_duplicate_detection: bool + :param requires_session: A value that indicates whether the queue supports + the concept of sessions. + :type requires_session: bool + :param default_message_time_to_live: ISO 8601 default message timespan to + live value. This is the duration after which the message expires, starting + from when the message is sent to Service Bus. This is the default value + used when TimeToLive is not set on a message itself. + :type default_message_time_to_live: timedelta + :param dead_lettering_on_message_expiration: A value that indicates + whether this queue has dead letter support when a message expires. + :type dead_lettering_on_message_expiration: bool + :param duplicate_detection_history_time_window: ISO 8601 timeSpan + structure that defines the duration of the duplicate detection history. + The default value is 10 minutes. + :type duplicate_detection_history_time_window: timedelta + :param max_delivery_count: The maximum delivery count. A message is + automatically deadlettered after this number of deliveries. default value + is 10. + :type max_delivery_count: int + :param status: Enumerates the possible values for the status of a + messaging entity. Possible values include: 'Active', 'Disabled', + 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', + 'Renaming', 'Unknown' + :type status: str or ~azure.mgmt.servicebus.models.EntityStatus + :param enable_batched_operations: Value that indicates whether server-side + batched operations are enabled. + :type enable_batched_operations: bool + :param auto_delete_on_idle: ISO 8061 timeSpan idle interval after which + the queue is automatically deleted. The minimum duration is 5 minutes. + :type auto_delete_on_idle: timedelta + :param enable_partitioning: A value that indicates whether the queue is to + be partitioned across multiple message brokers. + :type enable_partitioning: bool + :param enable_express: A value that indicates whether Express Entities are + enabled. An express queue holds a message in memory temporarily before + writing it to persistent storage. + :type enable_express: bool + :param forward_to: Queue/Topic name to forward the messages + :type forward_to: str + :param forward_dead_lettered_messages_to: Queue/Topic name to forward the + Dead Letter message + :type forward_dead_lettered_messages_to: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'count_details': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'accessed_at': {'readonly': True}, + 'size_in_bytes': {'readonly': True}, + 'message_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'count_details': {'key': 'properties.countDetails', 'type': 'MessageCountDetails'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'accessed_at': {'key': 'properties.accessedAt', 'type': 'iso-8601'}, + 'size_in_bytes': {'key': 'properties.sizeInBytes', 'type': 'long'}, + 'message_count': {'key': 'properties.messageCount', 'type': 'long'}, + 'lock_duration': {'key': 'properties.lockDuration', 'type': 'duration'}, + 'max_size_in_megabytes': {'key': 'properties.maxSizeInMegabytes', 'type': 'int'}, + 'requires_duplicate_detection': {'key': 'properties.requiresDuplicateDetection', 'type': 'bool'}, + 'requires_session': {'key': 'properties.requiresSession', 'type': 'bool'}, + 'default_message_time_to_live': {'key': 'properties.defaultMessageTimeToLive', 'type': 'duration'}, + 'dead_lettering_on_message_expiration': {'key': 'properties.deadLetteringOnMessageExpiration', 'type': 'bool'}, + 'duplicate_detection_history_time_window': {'key': 'properties.duplicateDetectionHistoryTimeWindow', 'type': 'duration'}, + 'max_delivery_count': {'key': 'properties.maxDeliveryCount', 'type': 'int'}, + 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, + 'enable_batched_operations': {'key': 'properties.enableBatchedOperations', 'type': 'bool'}, + 'auto_delete_on_idle': {'key': 'properties.autoDeleteOnIdle', 'type': 'duration'}, + 'enable_partitioning': {'key': 'properties.enablePartitioning', 'type': 'bool'}, + 'enable_express': {'key': 'properties.enableExpress', 'type': 'bool'}, + 'forward_to': {'key': 'properties.forwardTo', 'type': 'str'}, + 'forward_dead_lettered_messages_to': {'key': 'properties.forwardDeadLetteredMessagesTo', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SBQueue, self).__init__(**kwargs) + self.count_details = None + self.created_at = None + self.updated_at = None + self.accessed_at = None + self.size_in_bytes = None + self.message_count = None + self.lock_duration = kwargs.get('lock_duration', None) + self.max_size_in_megabytes = kwargs.get('max_size_in_megabytes', None) + self.requires_duplicate_detection = kwargs.get('requires_duplicate_detection', None) + self.requires_session = kwargs.get('requires_session', None) + self.default_message_time_to_live = kwargs.get('default_message_time_to_live', None) + self.dead_lettering_on_message_expiration = kwargs.get('dead_lettering_on_message_expiration', None) + self.duplicate_detection_history_time_window = kwargs.get('duplicate_detection_history_time_window', None) + self.max_delivery_count = kwargs.get('max_delivery_count', None) + self.status = kwargs.get('status', None) + self.enable_batched_operations = kwargs.get('enable_batched_operations', None) + self.auto_delete_on_idle = kwargs.get('auto_delete_on_idle', None) + self.enable_partitioning = kwargs.get('enable_partitioning', None) + self.enable_express = kwargs.get('enable_express', None) + self.forward_to = kwargs.get('forward_to', None) + self.forward_dead_lettered_messages_to = kwargs.get('forward_dead_lettered_messages_to', None) + + +class SBSku(Model): + """SKU of the namespace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of this SKU. Possible values include: 'Basic', + 'Standard', 'Premium' + :type name: str or ~azure.mgmt.servicebus.models.SkuName + :param tier: The billing tier of this particular SKU. Possible values + include: 'Basic', 'Standard', 'Premium' + :type tier: str or ~azure.mgmt.servicebus.models.SkuTier + :param capacity: The specified messaging units for the tier. For Premium + tier, capacity are 1,2 and 4. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SBSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + + +class SBSubscription(Resource): + """Description of subscription resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar message_count: Number of messages. + :vartype message_count: long + :ivar created_at: Exact time the message was created. + :vartype created_at: datetime + :ivar accessed_at: Last time there was a receive request to this + subscription. + :vartype accessed_at: datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: datetime + :ivar count_details: Message count details + :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails + :param lock_duration: ISO 8061 lock duration timespan for the + subscription. The default value is 1 minute. + :type lock_duration: timedelta + :param requires_session: Value indicating if a subscription supports the + concept of sessions. + :type requires_session: bool + :param default_message_time_to_live: ISO 8061 Default message timespan to + live value. This is the duration after which the message expires, starting + from when the message is sent to Service Bus. This is the default value + used when TimeToLive is not set on a message itself. + :type default_message_time_to_live: timedelta + :param dead_lettering_on_filter_evaluation_exceptions: Value that + indicates whether a subscription has dead letter support on filter + evaluation exceptions. + :type dead_lettering_on_filter_evaluation_exceptions: bool + :param dead_lettering_on_message_expiration: Value that indicates whether + a subscription has dead letter support when a message expires. + :type dead_lettering_on_message_expiration: bool + :param duplicate_detection_history_time_window: ISO 8601 timeSpan + structure that defines the duration of the duplicate detection history. + The default value is 10 minutes. + :type duplicate_detection_history_time_window: timedelta + :param max_delivery_count: Number of maximum deliveries. + :type max_delivery_count: int + :param status: Enumerates the possible values for the status of a + messaging entity. Possible values include: 'Active', 'Disabled', + 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', + 'Renaming', 'Unknown' + :type status: str or ~azure.mgmt.servicebus.models.EntityStatus + :param enable_batched_operations: Value that indicates whether server-side + batched operations are enabled. + :type enable_batched_operations: bool + :param auto_delete_on_idle: ISO 8061 timeSpan idle interval after which + the topic is automatically deleted. The minimum duration is 5 minutes. + :type auto_delete_on_idle: timedelta + :param forward_to: Queue/Topic name to forward the messages + :type forward_to: str + :param forward_dead_lettered_messages_to: Queue/Topic name to forward the + Dead Letter message + :type forward_dead_lettered_messages_to: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'message_count': {'readonly': True}, + 'created_at': {'readonly': True}, + 'accessed_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'count_details': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'message_count': {'key': 'properties.messageCount', 'type': 'long'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'accessed_at': {'key': 'properties.accessedAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'count_details': {'key': 'properties.countDetails', 'type': 'MessageCountDetails'}, + 'lock_duration': {'key': 'properties.lockDuration', 'type': 'duration'}, + 'requires_session': {'key': 'properties.requiresSession', 'type': 'bool'}, + 'default_message_time_to_live': {'key': 'properties.defaultMessageTimeToLive', 'type': 'duration'}, + 'dead_lettering_on_filter_evaluation_exceptions': {'key': 'properties.deadLetteringOnFilterEvaluationExceptions', 'type': 'bool'}, + 'dead_lettering_on_message_expiration': {'key': 'properties.deadLetteringOnMessageExpiration', 'type': 'bool'}, + 'duplicate_detection_history_time_window': {'key': 'properties.duplicateDetectionHistoryTimeWindow', 'type': 'duration'}, + 'max_delivery_count': {'key': 'properties.maxDeliveryCount', 'type': 'int'}, + 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, + 'enable_batched_operations': {'key': 'properties.enableBatchedOperations', 'type': 'bool'}, + 'auto_delete_on_idle': {'key': 'properties.autoDeleteOnIdle', 'type': 'duration'}, + 'forward_to': {'key': 'properties.forwardTo', 'type': 'str'}, + 'forward_dead_lettered_messages_to': {'key': 'properties.forwardDeadLetteredMessagesTo', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SBSubscription, self).__init__(**kwargs) + self.message_count = None + self.created_at = None + self.accessed_at = None + self.updated_at = None + self.count_details = None + self.lock_duration = kwargs.get('lock_duration', None) + self.requires_session = kwargs.get('requires_session', None) + self.default_message_time_to_live = kwargs.get('default_message_time_to_live', None) + self.dead_lettering_on_filter_evaluation_exceptions = kwargs.get('dead_lettering_on_filter_evaluation_exceptions', None) + self.dead_lettering_on_message_expiration = kwargs.get('dead_lettering_on_message_expiration', None) + self.duplicate_detection_history_time_window = kwargs.get('duplicate_detection_history_time_window', None) + self.max_delivery_count = kwargs.get('max_delivery_count', None) + self.status = kwargs.get('status', None) + self.enable_batched_operations = kwargs.get('enable_batched_operations', None) + self.auto_delete_on_idle = kwargs.get('auto_delete_on_idle', None) + self.forward_to = kwargs.get('forward_to', None) + self.forward_dead_lettered_messages_to = kwargs.get('forward_dead_lettered_messages_to', None) + + +class SBTopic(Resource): + """Description of topic resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar size_in_bytes: Size of the topic, in bytes. + :vartype size_in_bytes: long + :ivar created_at: Exact time the message was created. + :vartype created_at: datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: datetime + :ivar accessed_at: Last time the message was sent, or a request was + received, for this topic. + :vartype accessed_at: datetime + :ivar subscription_count: Number of subscriptions. + :vartype subscription_count: int + :ivar count_details: Message count details + :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails + :param default_message_time_to_live: ISO 8601 Default message timespan to + live value. This is the duration after which the message expires, starting + from when the message is sent to Service Bus. This is the default value + used when TimeToLive is not set on a message itself. + :type default_message_time_to_live: timedelta + :param max_size_in_megabytes: Maximum size of the topic in megabytes, + which is the size of the memory allocated for the topic. Default is 1024. + :type max_size_in_megabytes: int + :param requires_duplicate_detection: Value indicating if this topic + requires duplicate detection. + :type requires_duplicate_detection: bool + :param duplicate_detection_history_time_window: ISO8601 timespan structure + that defines the duration of the duplicate detection history. The default + value is 10 minutes. + :type duplicate_detection_history_time_window: timedelta + :param enable_batched_operations: Value that indicates whether server-side + batched operations are enabled. + :type enable_batched_operations: bool + :param status: Enumerates the possible values for the status of a + messaging entity. Possible values include: 'Active', 'Disabled', + 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', + 'Renaming', 'Unknown' + :type status: str or ~azure.mgmt.servicebus.models.EntityStatus + :param support_ordering: Value that indicates whether the topic supports + ordering. + :type support_ordering: bool + :param auto_delete_on_idle: ISO 8601 timespan idle interval after which + the topic is automatically deleted. The minimum duration is 5 minutes. + :type auto_delete_on_idle: timedelta + :param enable_partitioning: Value that indicates whether the topic to be + partitioned across multiple message brokers is enabled. + :type enable_partitioning: bool + :param enable_express: Value that indicates whether Express Entities are + enabled. An express topic holds a message in memory temporarily before + writing it to persistent storage. + :type enable_express: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'size_in_bytes': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'accessed_at': {'readonly': True}, + 'subscription_count': {'readonly': True}, + 'count_details': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'size_in_bytes': {'key': 'properties.sizeInBytes', 'type': 'long'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'accessed_at': {'key': 'properties.accessedAt', 'type': 'iso-8601'}, + 'subscription_count': {'key': 'properties.subscriptionCount', 'type': 'int'}, + 'count_details': {'key': 'properties.countDetails', 'type': 'MessageCountDetails'}, + 'default_message_time_to_live': {'key': 'properties.defaultMessageTimeToLive', 'type': 'duration'}, + 'max_size_in_megabytes': {'key': 'properties.maxSizeInMegabytes', 'type': 'int'}, + 'requires_duplicate_detection': {'key': 'properties.requiresDuplicateDetection', 'type': 'bool'}, + 'duplicate_detection_history_time_window': {'key': 'properties.duplicateDetectionHistoryTimeWindow', 'type': 'duration'}, + 'enable_batched_operations': {'key': 'properties.enableBatchedOperations', 'type': 'bool'}, + 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, + 'support_ordering': {'key': 'properties.supportOrdering', 'type': 'bool'}, + 'auto_delete_on_idle': {'key': 'properties.autoDeleteOnIdle', 'type': 'duration'}, + 'enable_partitioning': {'key': 'properties.enablePartitioning', 'type': 'bool'}, + 'enable_express': {'key': 'properties.enableExpress', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SBTopic, self).__init__(**kwargs) + self.size_in_bytes = None + self.created_at = None + self.updated_at = None + self.accessed_at = None + self.subscription_count = None + self.count_details = None + self.default_message_time_to_live = kwargs.get('default_message_time_to_live', None) + self.max_size_in_megabytes = kwargs.get('max_size_in_megabytes', None) + self.requires_duplicate_detection = kwargs.get('requires_duplicate_detection', None) + self.duplicate_detection_history_time_window = kwargs.get('duplicate_detection_history_time_window', None) + self.enable_batched_operations = kwargs.get('enable_batched_operations', None) + self.status = kwargs.get('status', None) + self.support_ordering = kwargs.get('support_ordering', None) + self.auto_delete_on_idle = kwargs.get('auto_delete_on_idle', None) + self.enable_partitioning = kwargs.get('enable_partitioning', None) + self.enable_express = kwargs.get('enable_express', None) + + +class SqlFilter(Model): + """Represents a filter which is a composition of an expression and an action + that is executed in the pub/sub pipeline. + + :param sql_expression: The SQL expression. e.g. MyProperty='ABC' + :type sql_expression: str + :param compatibility_level: This property is reserved for future use. An + integer value showing the compatibility level, currently hard-coded to 20. + Default value: 20 . + :type compatibility_level: int + :param requires_preprocessing: Value that indicates whether the rule + action requires preprocessing. Default value: True . + :type requires_preprocessing: bool + """ + + _validation = { + 'compatibility_level': {'maximum': 20, 'minimum': 20}, + } + + _attribute_map = { + 'sql_expression': {'key': 'sqlExpression', 'type': 'str'}, + 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'int'}, + 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SqlFilter, self).__init__(**kwargs) + self.sql_expression = kwargs.get('sql_expression', None) + self.compatibility_level = kwargs.get('compatibility_level', 20) + self.requires_preprocessing = kwargs.get('requires_preprocessing', True) + + +class SqlRuleAction(Action): + """Represents set of actions written in SQL language-based syntax that is + performed against a ServiceBus.Messaging.BrokeredMessage . + + :param sql_expression: SQL expression. e.g. MyProperty='ABC' + :type sql_expression: str + :param compatibility_level: This property is reserved for future use. An + integer value showing the compatibility level, currently hard-coded to 20. + :type compatibility_level: int + :param requires_preprocessing: Value that indicates whether the rule + action requires preprocessing. Default value: True . + :type requires_preprocessing: bool + """ + + _attribute_map = { + 'sql_expression': {'key': 'sqlExpression', 'type': 'str'}, + 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'int'}, + 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SqlRuleAction, self).__init__(**kwargs) + + +class Subnet(Model): + """Properties supplied for Subnet. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of Virtual Network Subnet + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Subnet, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_models_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_models_py3.py new file mode 100644 index 000000000000..945cf753e589 --- /dev/null +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_models_py3.py @@ -0,0 +1,1686 @@ +# 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 AccessKeys(Model): + """Namespace/ServiceBus Connection String. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_connection_string: Primary connection string of the created + namespace authorization rule. + :vartype primary_connection_string: str + :ivar secondary_connection_string: Secondary connection string of the + created namespace authorization rule. + :vartype secondary_connection_string: str + :ivar alias_primary_connection_string: Primary connection string of the + alias if GEO DR is enabled + :vartype alias_primary_connection_string: str + :ivar alias_secondary_connection_string: Secondary connection string of + the alias if GEO DR is enabled + :vartype alias_secondary_connection_string: str + :ivar primary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype primary_key: str + :ivar secondary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype secondary_key: str + :ivar key_name: A string that describes the authorization rule. + :vartype key_name: str + """ + + _validation = { + 'primary_connection_string': {'readonly': True}, + 'secondary_connection_string': {'readonly': True}, + 'alias_primary_connection_string': {'readonly': True}, + 'alias_secondary_connection_string': {'readonly': True}, + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + 'key_name': {'readonly': True}, + } + + _attribute_map = { + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + 'alias_primary_connection_string': {'key': 'aliasPrimaryConnectionString', 'type': 'str'}, + 'alias_secondary_connection_string': {'key': 'aliasSecondaryConnectionString', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AccessKeys, self).__init__(**kwargs) + self.primary_connection_string = None + self.secondary_connection_string = None + self.alias_primary_connection_string = None + self.alias_secondary_connection_string = None + self.primary_key = None + self.secondary_key = None + self.key_name = None + + +class Action(Model): + """Represents the filter actions which are allowed for the transformation of a + message that have been matched by a filter expression. + + :param sql_expression: SQL expression. e.g. MyProperty='ABC' + :type sql_expression: str + :param compatibility_level: This property is reserved for future use. An + integer value showing the compatibility level, currently hard-coded to 20. + :type compatibility_level: int + :param requires_preprocessing: Value that indicates whether the rule + action requires preprocessing. Default value: True . + :type requires_preprocessing: bool + """ + + _attribute_map = { + 'sql_expression': {'key': 'sqlExpression', 'type': 'str'}, + 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'int'}, + 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, + } + + def __init__(self, *, sql_expression: str=None, compatibility_level: int=None, requires_preprocessing: bool=True, **kwargs) -> None: + super(Action, self).__init__(**kwargs) + self.sql_expression = sql_expression + self.compatibility_level = compatibility_level + self.requires_preprocessing = requires_preprocessing + + +class Resource(Model): + """The Resource definition for other than namespace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: 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 + + +class ArmDisasterRecovery(Resource): + """Single item in List or Get Alias(Disaster Recovery configuration) + operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar provisioning_state: Provisioning state of the Alias(Disaster + Recovery configuration) - possible values 'Accepted' or 'Succeeded' or + 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.servicebus.models.ProvisioningStateDR + :ivar pending_replication_operations_count: Number of entities pending to + be replicated. + :vartype pending_replication_operations_count: long + :param partner_namespace: ARM Id of the Primary/Secondary eventhub + namespace name, which is part of GEO DR pairing + :type partner_namespace: str + :param alternate_name: Primary/Secondary eventhub namespace name, which is + part of GEO DR pairing + :type alternate_name: str + :ivar role: role of namespace in GEO DR - possible values 'Primary' or + 'PrimaryNotReplicating' or 'Secondary'. Possible values include: + 'Primary', 'PrimaryNotReplicating', 'Secondary' + :vartype role: str or ~azure.mgmt.servicebus.models.RoleDisasterRecovery + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pending_replication_operations_count': {'readonly': True}, + 'role': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateDR'}, + 'pending_replication_operations_count': {'key': 'properties.pendingReplicationOperationsCount', 'type': 'long'}, + 'partner_namespace': {'key': 'properties.partnerNamespace', 'type': 'str'}, + 'alternate_name': {'key': 'properties.alternateName', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'RoleDisasterRecovery'}, + } + + def __init__(self, *, partner_namespace: str=None, alternate_name: str=None, **kwargs) -> None: + super(ArmDisasterRecovery, self).__init__(**kwargs) + self.provisioning_state = None + self.pending_replication_operations_count = None + self.partner_namespace = partner_namespace + self.alternate_name = alternate_name + self.role = None + + +class AuthorizationRuleProperties(Model): + """AuthorizationRule properties. + + All required parameters must be populated in order to send to Azure. + + :param rights: Required. The rights associated with the rule. + :type rights: list[str or ~azure.mgmt.servicebus.models.AccessRights] + """ + + _validation = { + 'rights': {'required': True}, + } + + _attribute_map = { + 'rights': {'key': 'rights', 'type': '[AccessRights]'}, + } + + def __init__(self, *, rights, **kwargs) -> None: + super(AuthorizationRuleProperties, self).__init__(**kwargs) + self.rights = rights + + +class CaptureDescription(Model): + """Properties to configure capture description for eventhub. + + :param enabled: A value that indicates whether capture description is + enabled. + :type enabled: bool + :param encoding: Enumerates the possible values for the encoding format of + capture description. Possible values include: 'Avro', 'AvroDeflate' + :type encoding: str or + ~azure.mgmt.servicebus.models.EncodingCaptureDescription + :param interval_in_seconds: The time window allows you to set the + frequency with which the capture to Azure Blobs will happen, value should + between 60 to 900 seconds + :type interval_in_seconds: int + :param size_limit_in_bytes: The size window defines the amount of data + built up in your Event Hub before an capture operation, value should be + between 10485760 and 524288000 bytes + :type size_limit_in_bytes: int + :param destination: Properties of Destination where capture will be + stored. (Storage Account, Blob Names) + :type destination: ~azure.mgmt.servicebus.models.Destination + """ + + _validation = { + 'interval_in_seconds': {'maximum': 900, 'minimum': 60}, + 'size_limit_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'encoding': {'key': 'encoding', 'type': 'EncodingCaptureDescription'}, + 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, + 'size_limit_in_bytes': {'key': 'sizeLimitInBytes', 'type': 'int'}, + 'destination': {'key': 'destination', 'type': 'Destination'}, + } + + def __init__(self, *, enabled: bool=None, encoding=None, interval_in_seconds: int=None, size_limit_in_bytes: int=None, destination=None, **kwargs) -> None: + super(CaptureDescription, self).__init__(**kwargs) + self.enabled = enabled + self.encoding = encoding + self.interval_in_seconds = interval_in_seconds + self.size_limit_in_bytes = size_limit_in_bytes + self.destination = destination + + +class CheckNameAvailability(Model): + """Description of a Check Name availability request properties. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Name to check the namespace name availability + and The namespace name can contain only letters, numbers, and hyphens. The + namespace must start with a letter, and it must end with a letter or + number. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailability, self).__init__(**kwargs) + self.name = name + + +class CheckNameAvailabilityResult(Model): + """Description of a Check Name availability request properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar message: The detailed info regarding the reason associated with the + namespace. + :vartype message: str + :param name_available: Value indicating namespace is availability, true if + the namespace is available; otherwise, false. + :type name_available: bool + :param reason: The reason for unavailability of a namespace. Possible + values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', + 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription' + :type reason: str or ~azure.mgmt.servicebus.models.UnavailableReason + """ + + _validation = { + 'message': {'readonly': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'UnavailableReason'}, + } + + def __init__(self, *, name_available: bool=None, reason=None, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.message = None + self.name_available = name_available + self.reason = reason + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CorrelationFilter(Model): + """Represents the correlation filter expression. + + :param properties: dictionary object for custom filters + :type properties: dict[str, str] + :param correlation_id: Identifier of the correlation. + :type correlation_id: str + :param message_id: Identifier of the message. + :type message_id: str + :param to: Address to send to. + :type to: str + :param reply_to: Address of the queue to reply to. + :type reply_to: str + :param label: Application specific label. + :type label: str + :param session_id: Session identifier. + :type session_id: str + :param reply_to_session_id: Session identifier to reply to. + :type reply_to_session_id: str + :param content_type: Content type of the message. + :type content_type: str + :param requires_preprocessing: Value that indicates whether the rule + action requires preprocessing. Default value: True . + :type requires_preprocessing: bool + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': '{str}'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'to': {'key': 'to', 'type': 'str'}, + 'reply_to': {'key': 'replyTo', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'reply_to_session_id': {'key': 'replyToSessionId', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, + } + + def __init__(self, *, properties=None, correlation_id: str=None, message_id: str=None, to: str=None, reply_to: str=None, label: str=None, session_id: str=None, reply_to_session_id: str=None, content_type: str=None, requires_preprocessing: bool=True, **kwargs) -> None: + super(CorrelationFilter, self).__init__(**kwargs) + self.properties = properties + self.correlation_id = correlation_id + self.message_id = message_id + self.to = to + self.reply_to = reply_to + self.label = label + self.session_id = session_id + self.reply_to_session_id = reply_to_session_id + self.content_type = content_type + self.requires_preprocessing = requires_preprocessing + + +class Destination(Model): + """Capture storage details for capture description. + + :param name: Name for capture destination + :type name: str + :param storage_account_resource_id: Resource id of the storage account to + be used to create the blobs + :type storage_account_resource_id: str + :param blob_container: Blob container Name + :type blob_container: str + :param archive_name_format: Blob naming convention for archive, e.g. + {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. + Here all the parameters (Namespace,EventHub .. etc) are mandatory + irrespective of order + :type archive_name_format: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, + 'blob_container': {'key': 'properties.blobContainer', 'type': 'str'}, + 'archive_name_format': {'key': 'properties.archiveNameFormat', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, storage_account_resource_id: str=None, blob_container: str=None, archive_name_format: str=None, **kwargs) -> None: + super(Destination, self).__init__(**kwargs) + self.name = name + self.storage_account_resource_id = storage_account_resource_id + self.blob_container = blob_container + self.archive_name_format = archive_name_format + + +class ErrorResponse(Model): + """Error response indicates ServiceBus service is not able to process the + incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +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 Eventhub(Resource): + """Single item in List or Get Event Hub operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar partition_ids: Current number of shards on the Event Hub. + :vartype partition_ids: list[str] + :ivar created_at: Exact time the Event Hub was created. + :vartype created_at: datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: datetime + :param message_retention_in_days: Number of days to retain the events for + this Event Hub, value should be 1 to 7 days + :type message_retention_in_days: long + :param partition_count: Number of partitions created for the Event Hub, + allowed values are from 1 to 32 partitions. + :type partition_count: long + :param status: Enumerates the possible values for the status of the Event + Hub. Possible values include: 'Active', 'Disabled', 'Restoring', + 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', + 'Unknown' + :type status: str or ~azure.mgmt.servicebus.models.EntityStatus + :param capture_description: Properties of capture description + :type capture_description: + ~azure.mgmt.servicebus.models.CaptureDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'partition_ids': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'message_retention_in_days': {'maximum': 7, 'minimum': 1}, + 'partition_count': {'maximum': 32, 'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'partition_ids': {'key': 'properties.partitionIds', 'type': '[str]'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'message_retention_in_days': {'key': 'properties.messageRetentionInDays', 'type': 'long'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'long'}, + 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, + 'capture_description': {'key': 'properties.captureDescription', 'type': 'CaptureDescription'}, + } + + def __init__(self, *, message_retention_in_days: int=None, partition_count: int=None, status=None, capture_description=None, **kwargs) -> None: + super(Eventhub, self).__init__(**kwargs) + self.partition_ids = None + self.created_at = None + self.updated_at = None + self.message_retention_in_days = message_retention_in_days + self.partition_count = partition_count + self.status = status + self.capture_description = capture_description + + +class MessageCountDetails(Model): + """Message Count Details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar active_message_count: Number of active messages in the queue, topic, + or subscription. + :vartype active_message_count: long + :ivar dead_letter_message_count: Number of messages that are dead + lettered. + :vartype dead_letter_message_count: long + :ivar scheduled_message_count: Number of scheduled messages. + :vartype scheduled_message_count: long + :ivar transfer_message_count: Number of messages transferred to another + queue, topic, or subscription. + :vartype transfer_message_count: long + :ivar transfer_dead_letter_message_count: Number of messages transferred + into dead letters. + :vartype transfer_dead_letter_message_count: long + """ + + _validation = { + 'active_message_count': {'readonly': True}, + 'dead_letter_message_count': {'readonly': True}, + 'scheduled_message_count': {'readonly': True}, + 'transfer_message_count': {'readonly': True}, + 'transfer_dead_letter_message_count': {'readonly': True}, + } + + _attribute_map = { + 'active_message_count': {'key': 'activeMessageCount', 'type': 'long'}, + 'dead_letter_message_count': {'key': 'deadLetterMessageCount', 'type': 'long'}, + 'scheduled_message_count': {'key': 'scheduledMessageCount', 'type': 'long'}, + 'transfer_message_count': {'key': 'transferMessageCount', 'type': 'long'}, + 'transfer_dead_letter_message_count': {'key': 'transferDeadLetterMessageCount', 'type': 'long'}, + } + + def __init__(self, **kwargs) -> None: + super(MessageCountDetails, self).__init__(**kwargs) + self.active_message_count = None + self.dead_letter_message_count = None + self.scheduled_message_count = None + self.transfer_message_count = None + self.transfer_dead_letter_message_count = None + + +class MigrationConfigProperties(Resource): + """Single item in List or Get Migration Config operation. + + 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar provisioning_state: Provisioning state of Migration Configuration + :vartype provisioning_state: str + :ivar pending_replication_operations_count: Number of entities pending to + be replicated. + :vartype pending_replication_operations_count: long + :param target_namespace: Required. Existing premium Namespace ARM Id name + which has no entities, will be used for migration + :type target_namespace: str + :param post_migration_name: Required. Name to access Standard Namespace + after migration + :type post_migration_name: str + :ivar migration_state: State in which Standard to Premium Migration is, + possible values : Unknown, Reverting, Completing, Initiating, Syncing, + Active + :vartype migration_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'pending_replication_operations_count': {'readonly': True}, + 'target_namespace': {'required': True}, + 'post_migration_name': {'required': True}, + 'migration_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'pending_replication_operations_count': {'key': 'properties.pendingReplicationOperationsCount', 'type': 'long'}, + 'target_namespace': {'key': 'properties.targetNamespace', 'type': 'str'}, + 'post_migration_name': {'key': 'properties.postMigrationName', 'type': 'str'}, + 'migration_state': {'key': 'properties.migrationState', 'type': 'str'}, + } + + def __init__(self, *, target_namespace: str, post_migration_name: str, **kwargs) -> None: + super(MigrationConfigProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.pending_replication_operations_count = None + self.target_namespace = target_namespace + self.post_migration_name = post_migration_name + self.migration_state = None + + +class NetworkRuleSet(Resource): + """Description of NetworkRuleSet resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param default_action: Default Action for Network Rule Set. Possible + values include: 'Allow', 'Deny' + :type default_action: str or ~azure.mgmt.servicebus.models.DefaultAction + :param virtual_network_rules: List VirtualNetwork Rules + :type virtual_network_rules: + list[~azure.mgmt.servicebus.models.NWRuleSetVirtualNetworkRules] + :param ip_rules: List of IpRules + :type ip_rules: list[~azure.mgmt.servicebus.models.NWRuleSetIpRules] + """ + + _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'}, + 'default_action': {'key': 'properties.defaultAction', 'type': 'str'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'}, + } + + def __init__(self, *, default_action=None, virtual_network_rules=None, ip_rules=None, **kwargs) -> None: + super(NetworkRuleSet, self).__init__(**kwargs) + self.default_action = default_action + self.virtual_network_rules = virtual_network_rules + self.ip_rules = ip_rules + + +class NWRuleSetIpRules(Model): + """Description of NetWorkRuleSet - IpRules resource. + + :param ip_mask: IP Mask + :type ip_mask: str + :param action: The IP Filter Action. Possible values include: 'Allow'. + Default value: "Allow" . + :type action: str or ~azure.mgmt.servicebus.models.NetworkRuleIPAction + """ + + _attribute_map = { + 'ip_mask': {'key': 'ipMask', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__(self, *, ip_mask: str=None, action="Allow", **kwargs) -> None: + super(NWRuleSetIpRules, self).__init__(**kwargs) + self.ip_mask = ip_mask + self.action = action + + +class NWRuleSetVirtualNetworkRules(Model): + """Description of VirtualNetworkRules - NetworkRules resource. + + :param subnet: Subnet properties + :type subnet: ~azure.mgmt.servicebus.models.Subnet + :param ignore_missing_vnet_service_endpoint: Value that indicates whether + to ignore missing VNet Service Endpoint + :type ignore_missing_vnet_service_endpoint: bool + """ + + _attribute_map = { + 'subnet': {'key': 'subnet', 'type': 'Subnet'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + } + + def __init__(self, *, subnet=None, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: + super(NWRuleSetVirtualNetworkRules, self).__init__(**kwargs) + self.subnet = subnet + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint + + +class Operation(Model): + """A ServiceBus REST API operation. + + 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 object that represents the operation. + :type display: ~azure.mgmt.servicebus.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.ServiceBus + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Invoice, + etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + + +class ResourceNamespacePatch(Resource): + """The Resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, 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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(ResourceNamespacePatch, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class PremiumMessagingRegions(ResourceNamespacePatch): + """Premium Messaging Region. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: + :type properties: + ~azure.mgmt.servicebus.models.PremiumMessagingRegionsProperties + """ + + _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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'PremiumMessagingRegionsProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: + super(PremiumMessagingRegions, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + + +class PremiumMessagingRegionsProperties(Model): + """PremiumMessagingRegionsProperties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Region code + :vartype code: str + :ivar full_name: Full name of the region + :vartype full_name: str + """ + + _validation = { + 'code': {'readonly': True}, + 'full_name': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'full_name': {'key': 'fullName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PremiumMessagingRegionsProperties, self).__init__(**kwargs) + self.code = None + self.full_name = None + + +class RegenerateAccessKeyParameters(Model): + """Parameters supplied to the Regenerate Authorization Rule operation, + specifies which key needs to be reset. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. The access key to regenerate. Possible values + include: 'PrimaryKey', 'SecondaryKey' + :type key_type: str or ~azure.mgmt.servicebus.models.KeyType + :param key: Optional, if the key value provided, is reset for KeyType + value or autogenerate Key value set for keyType + :type key: str + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'KeyType'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, *, key_type, key: str=None, **kwargs) -> None: + super(RegenerateAccessKeyParameters, self).__init__(**kwargs) + self.key_type = key_type + self.key = key + + +class Rule(Resource): + """Description of Rule Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param action: Represents the filter actions which are allowed for the + transformation of a message that have been matched by a filter expression. + :type action: ~azure.mgmt.servicebus.models.Action + :param filter_type: Filter type that is evaluated against a + BrokeredMessage. Possible values include: 'SqlFilter', 'CorrelationFilter' + :type filter_type: str or ~azure.mgmt.servicebus.models.FilterType + :param sql_filter: Properties of sqlFilter + :type sql_filter: ~azure.mgmt.servicebus.models.SqlFilter + :param correlation_filter: Properties of correlationFilter + :type correlation_filter: ~azure.mgmt.servicebus.models.CorrelationFilter + """ + + _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'}, + 'action': {'key': 'properties.action', 'type': 'Action'}, + 'filter_type': {'key': 'properties.filterType', 'type': 'FilterType'}, + 'sql_filter': {'key': 'properties.sqlFilter', 'type': 'SqlFilter'}, + 'correlation_filter': {'key': 'properties.correlationFilter', 'type': 'CorrelationFilter'}, + } + + def __init__(self, *, action=None, filter_type=None, sql_filter=None, correlation_filter=None, **kwargs) -> None: + super(Rule, self).__init__(**kwargs) + self.action = action + self.filter_type = filter_type + self.sql_filter = sql_filter + self.correlation_filter = correlation_filter + + +class SBAuthorizationRule(Resource): + """Description of a namespace authorization rule. + + 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param rights: Required. The rights associated with the rule. + :type rights: list[str or ~azure.mgmt.servicebus.models.AccessRights] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'rights': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'rights': {'key': 'properties.rights', 'type': '[AccessRights]'}, + } + + def __init__(self, *, rights, **kwargs) -> None: + super(SBAuthorizationRule, self).__init__(**kwargs) + self.rights = rights + + +class TrackedResource(Resource): + """The Resource definition. + + 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. The Geo-location where the resource lives + :type location: str + :param tags: Resource tags + :type tags: dict[str, 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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class SBNamespace(TrackedResource): + """Description of a namespace 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: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. The Geo-location where the resource lives + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: Properties of Sku + :type sku: ~azure.mgmt.servicebus.models.SBSku + :ivar provisioning_state: Provisioning state of the namespace. + :vartype provisioning_state: str + :ivar created_at: The time the namespace was created. + :vartype created_at: datetime + :ivar updated_at: The time the namespace was updated. + :vartype updated_at: datetime + :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus + operations. + :vartype service_bus_endpoint: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'service_bus_endpoint': {'readonly': True}, + 'metric_id': {'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': 'SBSku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, **kwargs) -> None: + super(SBNamespace, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.provisioning_state = None + self.created_at = None + self.updated_at = None + self.service_bus_endpoint = None + self.metric_id = None + + +class SBNamespaceMigrate(Model): + """Namespace Migrate Object. + + All required parameters must be populated in order to send to Azure. + + :param target_namespace_type: Required. Type of namespaces. Possible + values include: 'Messaging', 'NotificationHub', 'Mixed', 'EventHub', + 'Relay' + :type target_namespace_type: str or + ~azure.mgmt.servicebus.models.NameSpaceType + """ + + _validation = { + 'target_namespace_type': {'required': True}, + } + + _attribute_map = { + 'target_namespace_type': {'key': 'targetNamespaceType', 'type': 'NameSpaceType'}, + } + + def __init__(self, *, target_namespace_type, **kwargs) -> None: + super(SBNamespaceMigrate, self).__init__(**kwargs) + self.target_namespace_type = target_namespace_type + + +class SBNamespaceUpdateParameters(ResourceNamespacePatch): + """Description of a namespace resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: Properties of Sku + :type sku: ~azure.mgmt.servicebus.models.SBSku + :ivar provisioning_state: Provisioning state of the namespace. + :vartype provisioning_state: str + :ivar created_at: The time the namespace was created. + :vartype created_at: datetime + :ivar updated_at: The time the namespace was updated. + :vartype updated_at: datetime + :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus + operations. + :vartype service_bus_endpoint: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'service_bus_endpoint': {'readonly': True}, + 'metric_id': {'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': 'SBSku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, **kwargs) -> None: + super(SBNamespaceUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.provisioning_state = None + self.created_at = None + self.updated_at = None + self.service_bus_endpoint = None + self.metric_id = None + + +class SBQueue(Resource): + """Description of queue Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar count_details: Message Count Details. + :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails + :ivar created_at: The exact time the message was created. + :vartype created_at: datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: datetime + :ivar accessed_at: Last time a message was sent, or the last time there + was a receive request to this queue. + :vartype accessed_at: datetime + :ivar size_in_bytes: The size of the queue, in bytes. + :vartype size_in_bytes: long + :ivar message_count: The number of messages in the queue. + :vartype message_count: long + :param lock_duration: ISO 8601 timespan duration of a peek-lock; that is, + the amount of time that the message is locked for other receivers. The + maximum value for LockDuration is 5 minutes; the default value is 1 + minute. + :type lock_duration: timedelta + :param max_size_in_megabytes: The maximum size of the queue in megabytes, + which is the size of memory allocated for the queue. Default is 1024. + :type max_size_in_megabytes: int + :param requires_duplicate_detection: A value indicating if this queue + requires duplicate detection. + :type requires_duplicate_detection: bool + :param requires_session: A value that indicates whether the queue supports + the concept of sessions. + :type requires_session: bool + :param default_message_time_to_live: ISO 8601 default message timespan to + live value. This is the duration after which the message expires, starting + from when the message is sent to Service Bus. This is the default value + used when TimeToLive is not set on a message itself. + :type default_message_time_to_live: timedelta + :param dead_lettering_on_message_expiration: A value that indicates + whether this queue has dead letter support when a message expires. + :type dead_lettering_on_message_expiration: bool + :param duplicate_detection_history_time_window: ISO 8601 timeSpan + structure that defines the duration of the duplicate detection history. + The default value is 10 minutes. + :type duplicate_detection_history_time_window: timedelta + :param max_delivery_count: The maximum delivery count. A message is + automatically deadlettered after this number of deliveries. default value + is 10. + :type max_delivery_count: int + :param status: Enumerates the possible values for the status of a + messaging entity. Possible values include: 'Active', 'Disabled', + 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', + 'Renaming', 'Unknown' + :type status: str or ~azure.mgmt.servicebus.models.EntityStatus + :param enable_batched_operations: Value that indicates whether server-side + batched operations are enabled. + :type enable_batched_operations: bool + :param auto_delete_on_idle: ISO 8061 timeSpan idle interval after which + the queue is automatically deleted. The minimum duration is 5 minutes. + :type auto_delete_on_idle: timedelta + :param enable_partitioning: A value that indicates whether the queue is to + be partitioned across multiple message brokers. + :type enable_partitioning: bool + :param enable_express: A value that indicates whether Express Entities are + enabled. An express queue holds a message in memory temporarily before + writing it to persistent storage. + :type enable_express: bool + :param forward_to: Queue/Topic name to forward the messages + :type forward_to: str + :param forward_dead_lettered_messages_to: Queue/Topic name to forward the + Dead Letter message + :type forward_dead_lettered_messages_to: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'count_details': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'accessed_at': {'readonly': True}, + 'size_in_bytes': {'readonly': True}, + 'message_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'count_details': {'key': 'properties.countDetails', 'type': 'MessageCountDetails'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'accessed_at': {'key': 'properties.accessedAt', 'type': 'iso-8601'}, + 'size_in_bytes': {'key': 'properties.sizeInBytes', 'type': 'long'}, + 'message_count': {'key': 'properties.messageCount', 'type': 'long'}, + 'lock_duration': {'key': 'properties.lockDuration', 'type': 'duration'}, + 'max_size_in_megabytes': {'key': 'properties.maxSizeInMegabytes', 'type': 'int'}, + 'requires_duplicate_detection': {'key': 'properties.requiresDuplicateDetection', 'type': 'bool'}, + 'requires_session': {'key': 'properties.requiresSession', 'type': 'bool'}, + 'default_message_time_to_live': {'key': 'properties.defaultMessageTimeToLive', 'type': 'duration'}, + 'dead_lettering_on_message_expiration': {'key': 'properties.deadLetteringOnMessageExpiration', 'type': 'bool'}, + 'duplicate_detection_history_time_window': {'key': 'properties.duplicateDetectionHistoryTimeWindow', 'type': 'duration'}, + 'max_delivery_count': {'key': 'properties.maxDeliveryCount', 'type': 'int'}, + 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, + 'enable_batched_operations': {'key': 'properties.enableBatchedOperations', 'type': 'bool'}, + 'auto_delete_on_idle': {'key': 'properties.autoDeleteOnIdle', 'type': 'duration'}, + 'enable_partitioning': {'key': 'properties.enablePartitioning', 'type': 'bool'}, + 'enable_express': {'key': 'properties.enableExpress', 'type': 'bool'}, + 'forward_to': {'key': 'properties.forwardTo', 'type': 'str'}, + 'forward_dead_lettered_messages_to': {'key': 'properties.forwardDeadLetteredMessagesTo', 'type': 'str'}, + } + + def __init__(self, *, lock_duration=None, max_size_in_megabytes: int=None, requires_duplicate_detection: bool=None, requires_session: bool=None, default_message_time_to_live=None, dead_lettering_on_message_expiration: bool=None, duplicate_detection_history_time_window=None, max_delivery_count: int=None, status=None, enable_batched_operations: bool=None, auto_delete_on_idle=None, enable_partitioning: bool=None, enable_express: bool=None, forward_to: str=None, forward_dead_lettered_messages_to: str=None, **kwargs) -> None: + super(SBQueue, self).__init__(**kwargs) + self.count_details = None + self.created_at = None + self.updated_at = None + self.accessed_at = None + self.size_in_bytes = None + self.message_count = None + self.lock_duration = lock_duration + self.max_size_in_megabytes = max_size_in_megabytes + self.requires_duplicate_detection = requires_duplicate_detection + self.requires_session = requires_session + self.default_message_time_to_live = default_message_time_to_live + self.dead_lettering_on_message_expiration = dead_lettering_on_message_expiration + self.duplicate_detection_history_time_window = duplicate_detection_history_time_window + self.max_delivery_count = max_delivery_count + self.status = status + self.enable_batched_operations = enable_batched_operations + self.auto_delete_on_idle = auto_delete_on_idle + self.enable_partitioning = enable_partitioning + self.enable_express = enable_express + self.forward_to = forward_to + self.forward_dead_lettered_messages_to = forward_dead_lettered_messages_to + + +class SBSku(Model): + """SKU of the namespace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of this SKU. Possible values include: 'Basic', + 'Standard', 'Premium' + :type name: str or ~azure.mgmt.servicebus.models.SkuName + :param tier: The billing tier of this particular SKU. Possible values + include: 'Basic', 'Standard', 'Premium' + :type tier: str or ~azure.mgmt.servicebus.models.SkuTier + :param capacity: The specified messaging units for the tier. For Premium + tier, capacity are 1,2 and 4. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name, tier=None, capacity: int=None, **kwargs) -> None: + super(SBSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class SBSubscription(Resource): + """Description of subscription resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar message_count: Number of messages. + :vartype message_count: long + :ivar created_at: Exact time the message was created. + :vartype created_at: datetime + :ivar accessed_at: Last time there was a receive request to this + subscription. + :vartype accessed_at: datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: datetime + :ivar count_details: Message count details + :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails + :param lock_duration: ISO 8061 lock duration timespan for the + subscription. The default value is 1 minute. + :type lock_duration: timedelta + :param requires_session: Value indicating if a subscription supports the + concept of sessions. + :type requires_session: bool + :param default_message_time_to_live: ISO 8061 Default message timespan to + live value. This is the duration after which the message expires, starting + from when the message is sent to Service Bus. This is the default value + used when TimeToLive is not set on a message itself. + :type default_message_time_to_live: timedelta + :param dead_lettering_on_filter_evaluation_exceptions: Value that + indicates whether a subscription has dead letter support on filter + evaluation exceptions. + :type dead_lettering_on_filter_evaluation_exceptions: bool + :param dead_lettering_on_message_expiration: Value that indicates whether + a subscription has dead letter support when a message expires. + :type dead_lettering_on_message_expiration: bool + :param duplicate_detection_history_time_window: ISO 8601 timeSpan + structure that defines the duration of the duplicate detection history. + The default value is 10 minutes. + :type duplicate_detection_history_time_window: timedelta + :param max_delivery_count: Number of maximum deliveries. + :type max_delivery_count: int + :param status: Enumerates the possible values for the status of a + messaging entity. Possible values include: 'Active', 'Disabled', + 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', + 'Renaming', 'Unknown' + :type status: str or ~azure.mgmt.servicebus.models.EntityStatus + :param enable_batched_operations: Value that indicates whether server-side + batched operations are enabled. + :type enable_batched_operations: bool + :param auto_delete_on_idle: ISO 8061 timeSpan idle interval after which + the topic is automatically deleted. The minimum duration is 5 minutes. + :type auto_delete_on_idle: timedelta + :param forward_to: Queue/Topic name to forward the messages + :type forward_to: str + :param forward_dead_lettered_messages_to: Queue/Topic name to forward the + Dead Letter message + :type forward_dead_lettered_messages_to: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'message_count': {'readonly': True}, + 'created_at': {'readonly': True}, + 'accessed_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'count_details': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'message_count': {'key': 'properties.messageCount', 'type': 'long'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'accessed_at': {'key': 'properties.accessedAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'count_details': {'key': 'properties.countDetails', 'type': 'MessageCountDetails'}, + 'lock_duration': {'key': 'properties.lockDuration', 'type': 'duration'}, + 'requires_session': {'key': 'properties.requiresSession', 'type': 'bool'}, + 'default_message_time_to_live': {'key': 'properties.defaultMessageTimeToLive', 'type': 'duration'}, + 'dead_lettering_on_filter_evaluation_exceptions': {'key': 'properties.deadLetteringOnFilterEvaluationExceptions', 'type': 'bool'}, + 'dead_lettering_on_message_expiration': {'key': 'properties.deadLetteringOnMessageExpiration', 'type': 'bool'}, + 'duplicate_detection_history_time_window': {'key': 'properties.duplicateDetectionHistoryTimeWindow', 'type': 'duration'}, + 'max_delivery_count': {'key': 'properties.maxDeliveryCount', 'type': 'int'}, + 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, + 'enable_batched_operations': {'key': 'properties.enableBatchedOperations', 'type': 'bool'}, + 'auto_delete_on_idle': {'key': 'properties.autoDeleteOnIdle', 'type': 'duration'}, + 'forward_to': {'key': 'properties.forwardTo', 'type': 'str'}, + 'forward_dead_lettered_messages_to': {'key': 'properties.forwardDeadLetteredMessagesTo', 'type': 'str'}, + } + + def __init__(self, *, lock_duration=None, requires_session: bool=None, default_message_time_to_live=None, dead_lettering_on_filter_evaluation_exceptions: bool=None, dead_lettering_on_message_expiration: bool=None, duplicate_detection_history_time_window=None, max_delivery_count: int=None, status=None, enable_batched_operations: bool=None, auto_delete_on_idle=None, forward_to: str=None, forward_dead_lettered_messages_to: str=None, **kwargs) -> None: + super(SBSubscription, self).__init__(**kwargs) + self.message_count = None + self.created_at = None + self.accessed_at = None + self.updated_at = None + self.count_details = None + self.lock_duration = lock_duration + self.requires_session = requires_session + self.default_message_time_to_live = default_message_time_to_live + self.dead_lettering_on_filter_evaluation_exceptions = dead_lettering_on_filter_evaluation_exceptions + self.dead_lettering_on_message_expiration = dead_lettering_on_message_expiration + self.duplicate_detection_history_time_window = duplicate_detection_history_time_window + self.max_delivery_count = max_delivery_count + self.status = status + self.enable_batched_operations = enable_batched_operations + self.auto_delete_on_idle = auto_delete_on_idle + self.forward_to = forward_to + self.forward_dead_lettered_messages_to = forward_dead_lettered_messages_to + + +class SBTopic(Resource): + """Description of topic resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :ivar size_in_bytes: Size of the topic, in bytes. + :vartype size_in_bytes: long + :ivar created_at: Exact time the message was created. + :vartype created_at: datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: datetime + :ivar accessed_at: Last time the message was sent, or a request was + received, for this topic. + :vartype accessed_at: datetime + :ivar subscription_count: Number of subscriptions. + :vartype subscription_count: int + :ivar count_details: Message count details + :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails + :param default_message_time_to_live: ISO 8601 Default message timespan to + live value. This is the duration after which the message expires, starting + from when the message is sent to Service Bus. This is the default value + used when TimeToLive is not set on a message itself. + :type default_message_time_to_live: timedelta + :param max_size_in_megabytes: Maximum size of the topic in megabytes, + which is the size of the memory allocated for the topic. Default is 1024. + :type max_size_in_megabytes: int + :param requires_duplicate_detection: Value indicating if this topic + requires duplicate detection. + :type requires_duplicate_detection: bool + :param duplicate_detection_history_time_window: ISO8601 timespan structure + that defines the duration of the duplicate detection history. The default + value is 10 minutes. + :type duplicate_detection_history_time_window: timedelta + :param enable_batched_operations: Value that indicates whether server-side + batched operations are enabled. + :type enable_batched_operations: bool + :param status: Enumerates the possible values for the status of a + messaging entity. Possible values include: 'Active', 'Disabled', + 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', + 'Renaming', 'Unknown' + :type status: str or ~azure.mgmt.servicebus.models.EntityStatus + :param support_ordering: Value that indicates whether the topic supports + ordering. + :type support_ordering: bool + :param auto_delete_on_idle: ISO 8601 timespan idle interval after which + the topic is automatically deleted. The minimum duration is 5 minutes. + :type auto_delete_on_idle: timedelta + :param enable_partitioning: Value that indicates whether the topic to be + partitioned across multiple message brokers is enabled. + :type enable_partitioning: bool + :param enable_express: Value that indicates whether Express Entities are + enabled. An express topic holds a message in memory temporarily before + writing it to persistent storage. + :type enable_express: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'size_in_bytes': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'accessed_at': {'readonly': True}, + 'subscription_count': {'readonly': True}, + 'count_details': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'size_in_bytes': {'key': 'properties.sizeInBytes', 'type': 'long'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'accessed_at': {'key': 'properties.accessedAt', 'type': 'iso-8601'}, + 'subscription_count': {'key': 'properties.subscriptionCount', 'type': 'int'}, + 'count_details': {'key': 'properties.countDetails', 'type': 'MessageCountDetails'}, + 'default_message_time_to_live': {'key': 'properties.defaultMessageTimeToLive', 'type': 'duration'}, + 'max_size_in_megabytes': {'key': 'properties.maxSizeInMegabytes', 'type': 'int'}, + 'requires_duplicate_detection': {'key': 'properties.requiresDuplicateDetection', 'type': 'bool'}, + 'duplicate_detection_history_time_window': {'key': 'properties.duplicateDetectionHistoryTimeWindow', 'type': 'duration'}, + 'enable_batched_operations': {'key': 'properties.enableBatchedOperations', 'type': 'bool'}, + 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, + 'support_ordering': {'key': 'properties.supportOrdering', 'type': 'bool'}, + 'auto_delete_on_idle': {'key': 'properties.autoDeleteOnIdle', 'type': 'duration'}, + 'enable_partitioning': {'key': 'properties.enablePartitioning', 'type': 'bool'}, + 'enable_express': {'key': 'properties.enableExpress', 'type': 'bool'}, + } + + def __init__(self, *, default_message_time_to_live=None, max_size_in_megabytes: int=None, requires_duplicate_detection: bool=None, duplicate_detection_history_time_window=None, enable_batched_operations: bool=None, status=None, support_ordering: bool=None, auto_delete_on_idle=None, enable_partitioning: bool=None, enable_express: bool=None, **kwargs) -> None: + super(SBTopic, self).__init__(**kwargs) + self.size_in_bytes = None + self.created_at = None + self.updated_at = None + self.accessed_at = None + self.subscription_count = None + self.count_details = None + self.default_message_time_to_live = default_message_time_to_live + self.max_size_in_megabytes = max_size_in_megabytes + self.requires_duplicate_detection = requires_duplicate_detection + self.duplicate_detection_history_time_window = duplicate_detection_history_time_window + self.enable_batched_operations = enable_batched_operations + self.status = status + self.support_ordering = support_ordering + self.auto_delete_on_idle = auto_delete_on_idle + self.enable_partitioning = enable_partitioning + self.enable_express = enable_express + + +class SqlFilter(Model): + """Represents a filter which is a composition of an expression and an action + that is executed in the pub/sub pipeline. + + :param sql_expression: The SQL expression. e.g. MyProperty='ABC' + :type sql_expression: str + :param compatibility_level: This property is reserved for future use. An + integer value showing the compatibility level, currently hard-coded to 20. + Default value: 20 . + :type compatibility_level: int + :param requires_preprocessing: Value that indicates whether the rule + action requires preprocessing. Default value: True . + :type requires_preprocessing: bool + """ + + _validation = { + 'compatibility_level': {'maximum': 20, 'minimum': 20}, + } + + _attribute_map = { + 'sql_expression': {'key': 'sqlExpression', 'type': 'str'}, + 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'int'}, + 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, + } + + def __init__(self, *, sql_expression: str=None, compatibility_level: int=20, requires_preprocessing: bool=True, **kwargs) -> None: + super(SqlFilter, self).__init__(**kwargs) + self.sql_expression = sql_expression + self.compatibility_level = compatibility_level + self.requires_preprocessing = requires_preprocessing + + +class SqlRuleAction(Action): + """Represents set of actions written in SQL language-based syntax that is + performed against a ServiceBus.Messaging.BrokeredMessage . + + :param sql_expression: SQL expression. e.g. MyProperty='ABC' + :type sql_expression: str + :param compatibility_level: This property is reserved for future use. An + integer value showing the compatibility level, currently hard-coded to 20. + :type compatibility_level: int + :param requires_preprocessing: Value that indicates whether the rule + action requires preprocessing. Default value: True . + :type requires_preprocessing: bool + """ + + _attribute_map = { + 'sql_expression': {'key': 'sqlExpression', 'type': 'str'}, + 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'int'}, + 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, + } + + def __init__(self, *, sql_expression: str=None, compatibility_level: int=None, requires_preprocessing: bool=True, **kwargs) -> None: + super(SqlRuleAction, self).__init__(sql_expression=sql_expression, compatibility_level=compatibility_level, requires_preprocessing=requires_preprocessing, **kwargs) + + +class Subnet(Model): + """Properties supplied for Subnet. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of Virtual Network Subnet + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(Subnet, self).__init__(**kwargs) + self.id = id diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_paged_models.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_paged_models.py new file mode 100644 index 000000000000..24f5278b98fd --- /dev/null +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_paged_models.py @@ -0,0 +1,170 @@ +# 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 OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class SBNamespacePaged(Paged): + """ + A paging container for iterating over a list of :class:`SBNamespace ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SBNamespace]'} + } + + def __init__(self, *args, **kwargs): + + super(SBNamespacePaged, self).__init__(*args, **kwargs) +class SBAuthorizationRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`SBAuthorizationRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SBAuthorizationRule]'} + } + + def __init__(self, *args, **kwargs): + + super(SBAuthorizationRulePaged, self).__init__(*args, **kwargs) +class NetworkRuleSetPaged(Paged): + """ + A paging container for iterating over a list of :class:`NetworkRuleSet ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NetworkRuleSet]'} + } + + def __init__(self, *args, **kwargs): + + super(NetworkRuleSetPaged, self).__init__(*args, **kwargs) +class ArmDisasterRecoveryPaged(Paged): + """ + A paging container for iterating over a list of :class:`ArmDisasterRecovery ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ArmDisasterRecovery]'} + } + + def __init__(self, *args, **kwargs): + + super(ArmDisasterRecoveryPaged, self).__init__(*args, **kwargs) +class MigrationConfigPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`MigrationConfigProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MigrationConfigProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(MigrationConfigPropertiesPaged, self).__init__(*args, **kwargs) +class SBQueuePaged(Paged): + """ + A paging container for iterating over a list of :class:`SBQueue ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SBQueue]'} + } + + def __init__(self, *args, **kwargs): + + super(SBQueuePaged, self).__init__(*args, **kwargs) +class SBTopicPaged(Paged): + """ + A paging container for iterating over a list of :class:`SBTopic ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SBTopic]'} + } + + def __init__(self, *args, **kwargs): + + super(SBTopicPaged, self).__init__(*args, **kwargs) +class SBSubscriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`SBSubscription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SBSubscription]'} + } + + def __init__(self, *args, **kwargs): + + super(SBSubscriptionPaged, self).__init__(*args, **kwargs) +class RulePaged(Paged): + """ + A paging container for iterating over a list of :class:`Rule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Rule]'} + } + + def __init__(self, *args, **kwargs): + + super(RulePaged, self).__init__(*args, **kwargs) +class PremiumMessagingRegionsPaged(Paged): + """ + A paging container for iterating over a list of :class:`PremiumMessagingRegions ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PremiumMessagingRegions]'} + } + + def __init__(self, *args, **kwargs): + + super(PremiumMessagingRegionsPaged, self).__init__(*args, **kwargs) +class EventhubPaged(Paged): + """ + A paging container for iterating over a list of :class:`Eventhub ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Eventhub]'} + } + + def __init__(self, *args, **kwargs): + + super(EventhubPaged, self).__init__(*args, **kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_service_bus_management_client_enums.py similarity index 100% rename from sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py rename to sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/_service_bus_management_client_enums.py diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/access_keys.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/access_keys.py deleted file mode 100644 index 4995a92fa359..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/access_keys.py +++ /dev/null @@ -1,71 +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 AccessKeys(Model): - """Namespace/ServiceBus Connection String. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_connection_string: Primary connection string of the created - namespace authorization rule. - :vartype primary_connection_string: str - :ivar secondary_connection_string: Secondary connection string of the - created namespace authorization rule. - :vartype secondary_connection_string: str - :ivar alias_primary_connection_string: Primary connection string of the - alias if GEO DR is enabled - :vartype alias_primary_connection_string: str - :ivar alias_secondary_connection_string: Secondary connection string of - the alias if GEO DR is enabled - :vartype alias_secondary_connection_string: str - :ivar primary_key: A base64-encoded 256-bit primary key for signing and - validating the SAS token. - :vartype primary_key: str - :ivar secondary_key: A base64-encoded 256-bit primary key for signing and - validating the SAS token. - :vartype secondary_key: str - :ivar key_name: A string that describes the authorization rule. - :vartype key_name: str - """ - - _validation = { - 'primary_connection_string': {'readonly': True}, - 'secondary_connection_string': {'readonly': True}, - 'alias_primary_connection_string': {'readonly': True}, - 'alias_secondary_connection_string': {'readonly': True}, - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - 'key_name': {'readonly': True}, - } - - _attribute_map = { - 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, - 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, - 'alias_primary_connection_string': {'key': 'aliasPrimaryConnectionString', 'type': 'str'}, - 'alias_secondary_connection_string': {'key': 'aliasSecondaryConnectionString', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AccessKeys, self).__init__(**kwargs) - self.primary_connection_string = None - self.secondary_connection_string = None - self.alias_primary_connection_string = None - self.alias_secondary_connection_string = None - self.primary_key = None - self.secondary_key = None - self.key_name = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/access_keys_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/access_keys_py3.py deleted file mode 100644 index c21004e78f4b..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/access_keys_py3.py +++ /dev/null @@ -1,71 +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 AccessKeys(Model): - """Namespace/ServiceBus Connection String. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_connection_string: Primary connection string of the created - namespace authorization rule. - :vartype primary_connection_string: str - :ivar secondary_connection_string: Secondary connection string of the - created namespace authorization rule. - :vartype secondary_connection_string: str - :ivar alias_primary_connection_string: Primary connection string of the - alias if GEO DR is enabled - :vartype alias_primary_connection_string: str - :ivar alias_secondary_connection_string: Secondary connection string of - the alias if GEO DR is enabled - :vartype alias_secondary_connection_string: str - :ivar primary_key: A base64-encoded 256-bit primary key for signing and - validating the SAS token. - :vartype primary_key: str - :ivar secondary_key: A base64-encoded 256-bit primary key for signing and - validating the SAS token. - :vartype secondary_key: str - :ivar key_name: A string that describes the authorization rule. - :vartype key_name: str - """ - - _validation = { - 'primary_connection_string': {'readonly': True}, - 'secondary_connection_string': {'readonly': True}, - 'alias_primary_connection_string': {'readonly': True}, - 'alias_secondary_connection_string': {'readonly': True}, - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - 'key_name': {'readonly': True}, - } - - _attribute_map = { - 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, - 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, - 'alias_primary_connection_string': {'key': 'aliasPrimaryConnectionString', 'type': 'str'}, - 'alias_secondary_connection_string': {'key': 'aliasSecondaryConnectionString', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AccessKeys, self).__init__(**kwargs) - self.primary_connection_string = None - self.secondary_connection_string = None - self.alias_primary_connection_string = None - self.alias_secondary_connection_string = None - self.primary_key = None - self.secondary_key = None - self.key_name = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/action.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/action.py deleted file mode 100644 index 8aa038c7cddb..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/action.py +++ /dev/null @@ -1,39 +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 Action(Model): - """Represents the filter actions which are allowed for the transformation of a - message that have been matched by a filter expression. - - :param sql_expression: SQL expression. e.g. MyProperty='ABC' - :type sql_expression: str - :param compatibility_level: This property is reserved for future use. An - integer value showing the compatibility level, currently hard-coded to 20. - :type compatibility_level: int - :param requires_preprocessing: Value that indicates whether the rule - action requires preprocessing. Default value: True . - :type requires_preprocessing: bool - """ - - _attribute_map = { - 'sql_expression': {'key': 'sqlExpression', 'type': 'str'}, - 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'int'}, - 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(Action, self).__init__(**kwargs) - self.sql_expression = kwargs.get('sql_expression', None) - self.compatibility_level = kwargs.get('compatibility_level', None) - self.requires_preprocessing = kwargs.get('requires_preprocessing', True) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/action_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/action_py3.py deleted file mode 100644 index f1dfd16c6a44..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/action_py3.py +++ /dev/null @@ -1,39 +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 Action(Model): - """Represents the filter actions which are allowed for the transformation of a - message that have been matched by a filter expression. - - :param sql_expression: SQL expression. e.g. MyProperty='ABC' - :type sql_expression: str - :param compatibility_level: This property is reserved for future use. An - integer value showing the compatibility level, currently hard-coded to 20. - :type compatibility_level: int - :param requires_preprocessing: Value that indicates whether the rule - action requires preprocessing. Default value: True . - :type requires_preprocessing: bool - """ - - _attribute_map = { - 'sql_expression': {'key': 'sqlExpression', 'type': 'str'}, - 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'int'}, - 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, - } - - def __init__(self, *, sql_expression: str=None, compatibility_level: int=None, requires_preprocessing: bool=True, **kwargs) -> None: - super(Action, self).__init__(**kwargs) - self.sql_expression = sql_expression - self.compatibility_level = compatibility_level - self.requires_preprocessing = requires_preprocessing diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery.py deleted file mode 100644 index fd5cbb1978d6..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery.py +++ /dev/null @@ -1,74 +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 ArmDisasterRecovery(Resource): - """Single item in List or Get Alias(Disaster Recovery configuration) - operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar provisioning_state: Provisioning state of the Alias(Disaster - Recovery configuration) - possible values 'Accepted' or 'Succeeded' or - 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.servicebus.models.ProvisioningStateDR - :ivar pending_replication_operations_count: Number of entities pending to - be replicated. - :vartype pending_replication_operations_count: long - :param partner_namespace: ARM Id of the Primary/Secondary eventhub - namespace name, which is part of GEO DR pairing - :type partner_namespace: str - :param alternate_name: Primary/Secondary eventhub namespace name, which is - part of GEO DR pairing - :type alternate_name: str - :ivar role: role of namespace in GEO DR - possible values 'Primary' or - 'PrimaryNotReplicating' or 'Secondary'. Possible values include: - 'Primary', 'PrimaryNotReplicating', 'Secondary' - :vartype role: str or ~azure.mgmt.servicebus.models.RoleDisasterRecovery - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pending_replication_operations_count': {'readonly': True}, - 'role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateDR'}, - 'pending_replication_operations_count': {'key': 'properties.pendingReplicationOperationsCount', 'type': 'long'}, - 'partner_namespace': {'key': 'properties.partnerNamespace', 'type': 'str'}, - 'alternate_name': {'key': 'properties.alternateName', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'RoleDisasterRecovery'}, - } - - def __init__(self, **kwargs): - super(ArmDisasterRecovery, self).__init__(**kwargs) - self.provisioning_state = None - self.pending_replication_operations_count = None - self.partner_namespace = kwargs.get('partner_namespace', None) - self.alternate_name = kwargs.get('alternate_name', None) - self.role = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_paged.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_paged.py deleted file mode 100644 index 819a03618254..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_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 ArmDisasterRecoveryPaged(Paged): - """ - A paging container for iterating over a list of :class:`ArmDisasterRecovery ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ArmDisasterRecovery]'} - } - - def __init__(self, *args, **kwargs): - - super(ArmDisasterRecoveryPaged, self).__init__(*args, **kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_py3.py deleted file mode 100644 index e9247b683da8..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/arm_disaster_recovery_py3.py +++ /dev/null @@ -1,74 +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_py3 import Resource - - -class ArmDisasterRecovery(Resource): - """Single item in List or Get Alias(Disaster Recovery configuration) - operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar provisioning_state: Provisioning state of the Alias(Disaster - Recovery configuration) - possible values 'Accepted' or 'Succeeded' or - 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed' - :vartype provisioning_state: str or - ~azure.mgmt.servicebus.models.ProvisioningStateDR - :ivar pending_replication_operations_count: Number of entities pending to - be replicated. - :vartype pending_replication_operations_count: long - :param partner_namespace: ARM Id of the Primary/Secondary eventhub - namespace name, which is part of GEO DR pairing - :type partner_namespace: str - :param alternate_name: Primary/Secondary eventhub namespace name, which is - part of GEO DR pairing - :type alternate_name: str - :ivar role: role of namespace in GEO DR - possible values 'Primary' or - 'PrimaryNotReplicating' or 'Secondary'. Possible values include: - 'Primary', 'PrimaryNotReplicating', 'Secondary' - :vartype role: str or ~azure.mgmt.servicebus.models.RoleDisasterRecovery - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pending_replication_operations_count': {'readonly': True}, - 'role': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateDR'}, - 'pending_replication_operations_count': {'key': 'properties.pendingReplicationOperationsCount', 'type': 'long'}, - 'partner_namespace': {'key': 'properties.partnerNamespace', 'type': 'str'}, - 'alternate_name': {'key': 'properties.alternateName', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'RoleDisasterRecovery'}, - } - - def __init__(self, *, partner_namespace: str=None, alternate_name: str=None, **kwargs) -> None: - super(ArmDisasterRecovery, self).__init__(**kwargs) - self.provisioning_state = None - self.pending_replication_operations_count = None - self.partner_namespace = partner_namespace - self.alternate_name = alternate_name - self.role = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/authorization_rule_properties.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/authorization_rule_properties.py deleted file mode 100644 index 5d48e82cf3a3..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/authorization_rule_properties.py +++ /dev/null @@ -1,34 +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 AuthorizationRuleProperties(Model): - """AuthorizationRule properties. - - All required parameters must be populated in order to send to Azure. - - :param rights: Required. The rights associated with the rule. - :type rights: list[str or ~azure.mgmt.servicebus.models.AccessRights] - """ - - _validation = { - 'rights': {'required': True}, - } - - _attribute_map = { - 'rights': {'key': 'rights', 'type': '[AccessRights]'}, - } - - def __init__(self, **kwargs): - super(AuthorizationRuleProperties, self).__init__(**kwargs) - self.rights = kwargs.get('rights', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/authorization_rule_properties_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/authorization_rule_properties_py3.py deleted file mode 100644 index 810b59a3a42b..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/authorization_rule_properties_py3.py +++ /dev/null @@ -1,34 +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 AuthorizationRuleProperties(Model): - """AuthorizationRule properties. - - All required parameters must be populated in order to send to Azure. - - :param rights: Required. The rights associated with the rule. - :type rights: list[str or ~azure.mgmt.servicebus.models.AccessRights] - """ - - _validation = { - 'rights': {'required': True}, - } - - _attribute_map = { - 'rights': {'key': 'rights', 'type': '[AccessRights]'}, - } - - def __init__(self, *, rights, **kwargs) -> None: - super(AuthorizationRuleProperties, self).__init__(**kwargs) - self.rights = rights diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/capture_description.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/capture_description.py deleted file mode 100644 index ac65ccb3f40f..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/capture_description.py +++ /dev/null @@ -1,57 +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 CaptureDescription(Model): - """Properties to configure capture description for eventhub. - - :param enabled: A value that indicates whether capture description is - enabled. - :type enabled: bool - :param encoding: Enumerates the possible values for the encoding format of - capture description. Possible values include: 'Avro', 'AvroDeflate' - :type encoding: str or - ~azure.mgmt.servicebus.models.EncodingCaptureDescription - :param interval_in_seconds: The time window allows you to set the - frequency with which the capture to Azure Blobs will happen, value should - between 60 to 900 seconds - :type interval_in_seconds: int - :param size_limit_in_bytes: The size window defines the amount of data - built up in your Event Hub before an capture operation, value should be - between 10485760 and 524288000 bytes - :type size_limit_in_bytes: int - :param destination: Properties of Destination where capture will be - stored. (Storage Account, Blob Names) - :type destination: ~azure.mgmt.servicebus.models.Destination - """ - - _validation = { - 'interval_in_seconds': {'maximum': 900, 'minimum': 60}, - 'size_limit_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'encoding': {'key': 'encoding', 'type': 'EncodingCaptureDescription'}, - 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, - 'size_limit_in_bytes': {'key': 'sizeLimitInBytes', 'type': 'int'}, - 'destination': {'key': 'destination', 'type': 'Destination'}, - } - - def __init__(self, **kwargs): - super(CaptureDescription, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.encoding = kwargs.get('encoding', None) - self.interval_in_seconds = kwargs.get('interval_in_seconds', None) - self.size_limit_in_bytes = kwargs.get('size_limit_in_bytes', None) - self.destination = kwargs.get('destination', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/capture_description_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/capture_description_py3.py deleted file mode 100644 index f34f6be7252c..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/capture_description_py3.py +++ /dev/null @@ -1,57 +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 CaptureDescription(Model): - """Properties to configure capture description for eventhub. - - :param enabled: A value that indicates whether capture description is - enabled. - :type enabled: bool - :param encoding: Enumerates the possible values for the encoding format of - capture description. Possible values include: 'Avro', 'AvroDeflate' - :type encoding: str or - ~azure.mgmt.servicebus.models.EncodingCaptureDescription - :param interval_in_seconds: The time window allows you to set the - frequency with which the capture to Azure Blobs will happen, value should - between 60 to 900 seconds - :type interval_in_seconds: int - :param size_limit_in_bytes: The size window defines the amount of data - built up in your Event Hub before an capture operation, value should be - between 10485760 and 524288000 bytes - :type size_limit_in_bytes: int - :param destination: Properties of Destination where capture will be - stored. (Storage Account, Blob Names) - :type destination: ~azure.mgmt.servicebus.models.Destination - """ - - _validation = { - 'interval_in_seconds': {'maximum': 900, 'minimum': 60}, - 'size_limit_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'encoding': {'key': 'encoding', 'type': 'EncodingCaptureDescription'}, - 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, - 'size_limit_in_bytes': {'key': 'sizeLimitInBytes', 'type': 'int'}, - 'destination': {'key': 'destination', 'type': 'Destination'}, - } - - def __init__(self, *, enabled: bool=None, encoding=None, interval_in_seconds: int=None, size_limit_in_bytes: int=None, destination=None, **kwargs) -> None: - super(CaptureDescription, self).__init__(**kwargs) - self.enabled = enabled - self.encoding = encoding - self.interval_in_seconds = interval_in_seconds - self.size_limit_in_bytes = size_limit_in_bytes - self.destination = destination diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability.py deleted file mode 100644 index 1fb6c7d532af..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability.py +++ /dev/null @@ -1,37 +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 CheckNameAvailability(Model): - """Description of a Check Name availability request properties. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The Name to check the namespace name availability - and The namespace name can contain only letters, numbers, and hyphens. The - namespace must start with a letter, and it must end with a letter or - number. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailability, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability_py3.py deleted file mode 100644 index aa5cedb278ad..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability_py3.py +++ /dev/null @@ -1,37 +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 CheckNameAvailability(Model): - """Description of a Check Name availability request properties. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The Name to check the namespace name availability - and The namespace name can contain only letters, numbers, and hyphens. The - namespace must start with a letter, and it must end with a letter or - number. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, **kwargs) -> None: - super(CheckNameAvailability, self).__init__(**kwargs) - self.name = name diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability_result.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability_result.py deleted file mode 100644 index 08a5c03733ac..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability_result.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 CheckNameAvailabilityResult(Model): - """Description of a Check Name availability request properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar message: The detailed info regarding the reason associated with the - namespace. - :vartype message: str - :param name_available: Value indicating namespace is availability, true if - the namespace is available; otherwise, false. - :type name_available: bool - :param reason: The reason for unavailability of a namespace. Possible - values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', - 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription' - :type reason: str or ~azure.mgmt.servicebus.models.UnavailableReason - """ - - _validation = { - 'message': {'readonly': True}, - } - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'UnavailableReason'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityResult, self).__init__(**kwargs) - self.message = None - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability_result_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability_result_py3.py deleted file mode 100644 index 8e37f0c94559..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability_result_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 CheckNameAvailabilityResult(Model): - """Description of a Check Name availability request properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar message: The detailed info regarding the reason associated with the - namespace. - :vartype message: str - :param name_available: Value indicating namespace is availability, true if - the namespace is available; otherwise, false. - :type name_available: bool - :param reason: The reason for unavailability of a namespace. Possible - values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', - 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription' - :type reason: str or ~azure.mgmt.servicebus.models.UnavailableReason - """ - - _validation = { - 'message': {'readonly': True}, - } - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'UnavailableReason'}, - } - - def __init__(self, *, name_available: bool=None, reason=None, **kwargs) -> None: - super(CheckNameAvailabilityResult, self).__init__(**kwargs) - self.message = None - self.name_available = name_available - self.reason = reason diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/correlation_filter.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/correlation_filter.py deleted file mode 100644 index dfb1585de553..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/correlation_filter.py +++ /dev/null @@ -1,65 +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 CorrelationFilter(Model): - """Represents the correlation filter expression. - - :param properties: dictionary object for custom filters - :type properties: dict[str, str] - :param correlation_id: Identifier of the correlation. - :type correlation_id: str - :param message_id: Identifier of the message. - :type message_id: str - :param to: Address to send to. - :type to: str - :param reply_to: Address of the queue to reply to. - :type reply_to: str - :param label: Application specific label. - :type label: str - :param session_id: Session identifier. - :type session_id: str - :param reply_to_session_id: Session identifier to reply to. - :type reply_to_session_id: str - :param content_type: Content type of the message. - :type content_type: str - :param requires_preprocessing: Value that indicates whether the rule - action requires preprocessing. Default value: True . - :type requires_preprocessing: bool - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': '{str}'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'to': {'key': 'to', 'type': 'str'}, - 'reply_to': {'key': 'replyTo', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'session_id': {'key': 'sessionId', 'type': 'str'}, - 'reply_to_session_id': {'key': 'replyToSessionId', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(CorrelationFilter, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.message_id = kwargs.get('message_id', None) - self.to = kwargs.get('to', None) - self.reply_to = kwargs.get('reply_to', None) - self.label = kwargs.get('label', None) - self.session_id = kwargs.get('session_id', None) - self.reply_to_session_id = kwargs.get('reply_to_session_id', None) - self.content_type = kwargs.get('content_type', None) - self.requires_preprocessing = kwargs.get('requires_preprocessing', True) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/correlation_filter_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/correlation_filter_py3.py deleted file mode 100644 index a611bad640f0..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/correlation_filter_py3.py +++ /dev/null @@ -1,65 +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 CorrelationFilter(Model): - """Represents the correlation filter expression. - - :param properties: dictionary object for custom filters - :type properties: dict[str, str] - :param correlation_id: Identifier of the correlation. - :type correlation_id: str - :param message_id: Identifier of the message. - :type message_id: str - :param to: Address to send to. - :type to: str - :param reply_to: Address of the queue to reply to. - :type reply_to: str - :param label: Application specific label. - :type label: str - :param session_id: Session identifier. - :type session_id: str - :param reply_to_session_id: Session identifier to reply to. - :type reply_to_session_id: str - :param content_type: Content type of the message. - :type content_type: str - :param requires_preprocessing: Value that indicates whether the rule - action requires preprocessing. Default value: True . - :type requires_preprocessing: bool - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': '{str}'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'to': {'key': 'to', 'type': 'str'}, - 'reply_to': {'key': 'replyTo', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'session_id': {'key': 'sessionId', 'type': 'str'}, - 'reply_to_session_id': {'key': 'replyToSessionId', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, - } - - def __init__(self, *, properties=None, correlation_id: str=None, message_id: str=None, to: str=None, reply_to: str=None, label: str=None, session_id: str=None, reply_to_session_id: str=None, content_type: str=None, requires_preprocessing: bool=True, **kwargs) -> None: - super(CorrelationFilter, self).__init__(**kwargs) - self.properties = properties - self.correlation_id = correlation_id - self.message_id = message_id - self.to = to - self.reply_to = reply_to - self.label = label - self.session_id = session_id - self.reply_to_session_id = reply_to_session_id - self.content_type = content_type - self.requires_preprocessing = requires_preprocessing diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/destination.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/destination.py deleted file mode 100644 index 78eec889d171..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/destination.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 Destination(Model): - """Capture storage details for capture description. - - :param name: Name for capture destination - :type name: str - :param storage_account_resource_id: Resource id of the storage account to - be used to create the blobs - :type storage_account_resource_id: str - :param blob_container: Blob container Name - :type blob_container: str - :param archive_name_format: Blob naming convention for archive, e.g. - {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. - Here all the parameters (Namespace,EventHub .. etc) are mandatory - irrespective of order - :type archive_name_format: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, - 'blob_container': {'key': 'properties.blobContainer', 'type': 'str'}, - 'archive_name_format': {'key': 'properties.archiveNameFormat', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Destination, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.storage_account_resource_id = kwargs.get('storage_account_resource_id', None) - self.blob_container = kwargs.get('blob_container', None) - self.archive_name_format = kwargs.get('archive_name_format', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/destination_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/destination_py3.py deleted file mode 100644 index c2e3445cbf40..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/destination_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 Destination(Model): - """Capture storage details for capture description. - - :param name: Name for capture destination - :type name: str - :param storage_account_resource_id: Resource id of the storage account to - be used to create the blobs - :type storage_account_resource_id: str - :param blob_container: Blob container Name - :type blob_container: str - :param archive_name_format: Blob naming convention for archive, e.g. - {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. - Here all the parameters (Namespace,EventHub .. etc) are mandatory - irrespective of order - :type archive_name_format: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, - 'blob_container': {'key': 'properties.blobContainer', 'type': 'str'}, - 'archive_name_format': {'key': 'properties.archiveNameFormat', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, storage_account_resource_id: str=None, blob_container: str=None, archive_name_format: str=None, **kwargs) -> None: - super(Destination, self).__init__(**kwargs) - self.name = name - self.storage_account_resource_id = storage_account_resource_id - self.blob_container = blob_container - self.archive_name_format = archive_name_format diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response.py deleted file mode 100644 index 094413f37b29..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response.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 -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates ServiceBus service is not able to process the - incoming request. The reason is provided in the error message. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', 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) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response_py3.py deleted file mode 100644 index e9d51bc83f31..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/error_response_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 -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates ServiceBus service is not able to process the - incoming request. The reason is provided in the error message. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message - - -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) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/eventhub.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/eventhub.py deleted file mode 100644 index 08f0b44a9fac..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/eventhub.py +++ /dev/null @@ -1,81 +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 Eventhub(Resource): - """Single item in List or Get Event Hub operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar partition_ids: Current number of shards on the Event Hub. - :vartype partition_ids: list[str] - :ivar created_at: Exact time the Event Hub was created. - :vartype created_at: datetime - :ivar updated_at: The exact time the message was updated. - :vartype updated_at: datetime - :param message_retention_in_days: Number of days to retain the events for - this Event Hub, value should be 1 to 7 days - :type message_retention_in_days: long - :param partition_count: Number of partitions created for the Event Hub, - allowed values are from 1 to 32 partitions. - :type partition_count: long - :param status: Enumerates the possible values for the status of the Event - Hub. Possible values include: 'Active', 'Disabled', 'Restoring', - 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', - 'Unknown' - :type status: str or ~azure.mgmt.servicebus.models.EntityStatus - :param capture_description: Properties of capture description - :type capture_description: - ~azure.mgmt.servicebus.models.CaptureDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'partition_ids': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'message_retention_in_days': {'maximum': 7, 'minimum': 1}, - 'partition_count': {'maximum': 32, 'minimum': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'partition_ids': {'key': 'properties.partitionIds', 'type': '[str]'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'message_retention_in_days': {'key': 'properties.messageRetentionInDays', 'type': 'long'}, - 'partition_count': {'key': 'properties.partitionCount', 'type': 'long'}, - 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, - 'capture_description': {'key': 'properties.captureDescription', 'type': 'CaptureDescription'}, - } - - def __init__(self, **kwargs): - super(Eventhub, self).__init__(**kwargs) - self.partition_ids = None - self.created_at = None - self.updated_at = None - self.message_retention_in_days = kwargs.get('message_retention_in_days', None) - self.partition_count = kwargs.get('partition_count', None) - self.status = kwargs.get('status', None) - self.capture_description = kwargs.get('capture_description', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/eventhub_paged.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/eventhub_paged.py deleted file mode 100644 index 3de52d9d20e1..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/eventhub_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 EventhubPaged(Paged): - """ - A paging container for iterating over a list of :class:`Eventhub ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Eventhub]'} - } - - def __init__(self, *args, **kwargs): - - super(EventhubPaged, self).__init__(*args, **kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/eventhub_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/eventhub_py3.py deleted file mode 100644 index a16b7f175a5f..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/eventhub_py3.py +++ /dev/null @@ -1,81 +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_py3 import Resource - - -class Eventhub(Resource): - """Single item in List or Get Event Hub operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar partition_ids: Current number of shards on the Event Hub. - :vartype partition_ids: list[str] - :ivar created_at: Exact time the Event Hub was created. - :vartype created_at: datetime - :ivar updated_at: The exact time the message was updated. - :vartype updated_at: datetime - :param message_retention_in_days: Number of days to retain the events for - this Event Hub, value should be 1 to 7 days - :type message_retention_in_days: long - :param partition_count: Number of partitions created for the Event Hub, - allowed values are from 1 to 32 partitions. - :type partition_count: long - :param status: Enumerates the possible values for the status of the Event - Hub. Possible values include: 'Active', 'Disabled', 'Restoring', - 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', - 'Unknown' - :type status: str or ~azure.mgmt.servicebus.models.EntityStatus - :param capture_description: Properties of capture description - :type capture_description: - ~azure.mgmt.servicebus.models.CaptureDescription - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'partition_ids': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'message_retention_in_days': {'maximum': 7, 'minimum': 1}, - 'partition_count': {'maximum': 32, 'minimum': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'partition_ids': {'key': 'properties.partitionIds', 'type': '[str]'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'message_retention_in_days': {'key': 'properties.messageRetentionInDays', 'type': 'long'}, - 'partition_count': {'key': 'properties.partitionCount', 'type': 'long'}, - 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, - 'capture_description': {'key': 'properties.captureDescription', 'type': 'CaptureDescription'}, - } - - def __init__(self, *, message_retention_in_days: int=None, partition_count: int=None, status=None, capture_description=None, **kwargs) -> None: - super(Eventhub, self).__init__(**kwargs) - self.partition_ids = None - self.created_at = None - self.updated_at = None - self.message_retention_in_days = message_retention_in_days - self.partition_count = partition_count - self.status = status - self.capture_description = capture_description diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/message_count_details.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/message_count_details.py deleted file mode 100644 index 4ad9a33ceb92..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/message_count_details.py +++ /dev/null @@ -1,59 +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 MessageCountDetails(Model): - """Message Count Details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar active_message_count: Number of active messages in the queue, topic, - or subscription. - :vartype active_message_count: long - :ivar dead_letter_message_count: Number of messages that are dead - lettered. - :vartype dead_letter_message_count: long - :ivar scheduled_message_count: Number of scheduled messages. - :vartype scheduled_message_count: long - :ivar transfer_message_count: Number of messages transferred to another - queue, topic, or subscription. - :vartype transfer_message_count: long - :ivar transfer_dead_letter_message_count: Number of messages transferred - into dead letters. - :vartype transfer_dead_letter_message_count: long - """ - - _validation = { - 'active_message_count': {'readonly': True}, - 'dead_letter_message_count': {'readonly': True}, - 'scheduled_message_count': {'readonly': True}, - 'transfer_message_count': {'readonly': True}, - 'transfer_dead_letter_message_count': {'readonly': True}, - } - - _attribute_map = { - 'active_message_count': {'key': 'activeMessageCount', 'type': 'long'}, - 'dead_letter_message_count': {'key': 'deadLetterMessageCount', 'type': 'long'}, - 'scheduled_message_count': {'key': 'scheduledMessageCount', 'type': 'long'}, - 'transfer_message_count': {'key': 'transferMessageCount', 'type': 'long'}, - 'transfer_dead_letter_message_count': {'key': 'transferDeadLetterMessageCount', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(MessageCountDetails, self).__init__(**kwargs) - self.active_message_count = None - self.dead_letter_message_count = None - self.scheduled_message_count = None - self.transfer_message_count = None - self.transfer_dead_letter_message_count = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/message_count_details_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/message_count_details_py3.py deleted file mode 100644 index b3fdd6072dbf..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/message_count_details_py3.py +++ /dev/null @@ -1,59 +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 MessageCountDetails(Model): - """Message Count Details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar active_message_count: Number of active messages in the queue, topic, - or subscription. - :vartype active_message_count: long - :ivar dead_letter_message_count: Number of messages that are dead - lettered. - :vartype dead_letter_message_count: long - :ivar scheduled_message_count: Number of scheduled messages. - :vartype scheduled_message_count: long - :ivar transfer_message_count: Number of messages transferred to another - queue, topic, or subscription. - :vartype transfer_message_count: long - :ivar transfer_dead_letter_message_count: Number of messages transferred - into dead letters. - :vartype transfer_dead_letter_message_count: long - """ - - _validation = { - 'active_message_count': {'readonly': True}, - 'dead_letter_message_count': {'readonly': True}, - 'scheduled_message_count': {'readonly': True}, - 'transfer_message_count': {'readonly': True}, - 'transfer_dead_letter_message_count': {'readonly': True}, - } - - _attribute_map = { - 'active_message_count': {'key': 'activeMessageCount', 'type': 'long'}, - 'dead_letter_message_count': {'key': 'deadLetterMessageCount', 'type': 'long'}, - 'scheduled_message_count': {'key': 'scheduledMessageCount', 'type': 'long'}, - 'transfer_message_count': {'key': 'transferMessageCount', 'type': 'long'}, - 'transfer_dead_letter_message_count': {'key': 'transferDeadLetterMessageCount', 'type': 'long'}, - } - - def __init__(self, **kwargs) -> None: - super(MessageCountDetails, self).__init__(**kwargs) - self.active_message_count = None - self.dead_letter_message_count = None - self.scheduled_message_count = None - self.transfer_message_count = None - self.transfer_dead_letter_message_count = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/migration_config_properties.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/migration_config_properties.py deleted file mode 100644 index fcc461e67692..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/migration_config_properties.py +++ /dev/null @@ -1,74 +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 MigrationConfigProperties(Resource): - """Single item in List or Get Migration Config operation. - - 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: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar provisioning_state: Provisioning state of Migration Configuration - :vartype provisioning_state: str - :ivar pending_replication_operations_count: Number of entities pending to - be replicated. - :vartype pending_replication_operations_count: long - :param target_namespace: Required. Existing premium Namespace ARM Id name - which has no entities, will be used for migration - :type target_namespace: str - :param post_migration_name: Required. Name to access Standard Namespace - after migration - :type post_migration_name: str - :ivar migration_state: State in which Standard to Premium Migration is, - possible values : Unknown, Reverting, Completing, Initiating, Syncing, - Active - :vartype migration_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pending_replication_operations_count': {'readonly': True}, - 'target_namespace': {'required': True}, - 'post_migration_name': {'required': True}, - 'migration_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'pending_replication_operations_count': {'key': 'properties.pendingReplicationOperationsCount', 'type': 'long'}, - 'target_namespace': {'key': 'properties.targetNamespace', 'type': 'str'}, - 'post_migration_name': {'key': 'properties.postMigrationName', 'type': 'str'}, - 'migration_state': {'key': 'properties.migrationState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MigrationConfigProperties, self).__init__(**kwargs) - self.provisioning_state = None - self.pending_replication_operations_count = None - self.target_namespace = kwargs.get('target_namespace', None) - self.post_migration_name = kwargs.get('post_migration_name', None) - self.migration_state = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/migration_config_properties_paged.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/migration_config_properties_paged.py deleted file mode 100644 index 2f654c36e371..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/migration_config_properties_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 MigrationConfigPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`MigrationConfigProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MigrationConfigProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(MigrationConfigPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/migration_config_properties_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/migration_config_properties_py3.py deleted file mode 100644 index 0ea049421ed3..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/migration_config_properties_py3.py +++ /dev/null @@ -1,74 +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_py3 import Resource - - -class MigrationConfigProperties(Resource): - """Single item in List or Get Migration Config operation. - - 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: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar provisioning_state: Provisioning state of Migration Configuration - :vartype provisioning_state: str - :ivar pending_replication_operations_count: Number of entities pending to - be replicated. - :vartype pending_replication_operations_count: long - :param target_namespace: Required. Existing premium Namespace ARM Id name - which has no entities, will be used for migration - :type target_namespace: str - :param post_migration_name: Required. Name to access Standard Namespace - after migration - :type post_migration_name: str - :ivar migration_state: State in which Standard to Premium Migration is, - possible values : Unknown, Reverting, Completing, Initiating, Syncing, - Active - :vartype migration_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'pending_replication_operations_count': {'readonly': True}, - 'target_namespace': {'required': True}, - 'post_migration_name': {'required': True}, - 'migration_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'pending_replication_operations_count': {'key': 'properties.pendingReplicationOperationsCount', 'type': 'long'}, - 'target_namespace': {'key': 'properties.targetNamespace', 'type': 'str'}, - 'post_migration_name': {'key': 'properties.postMigrationName', 'type': 'str'}, - 'migration_state': {'key': 'properties.migrationState', 'type': 'str'}, - } - - def __init__(self, *, target_namespace: str, post_migration_name: str, **kwargs) -> None: - super(MigrationConfigProperties, self).__init__(**kwargs) - self.provisioning_state = None - self.pending_replication_operations_count = None - self.target_namespace = target_namespace - self.post_migration_name = post_migration_name - self.migration_state = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/network_rule_set.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/network_rule_set.py deleted file mode 100644 index b86e59dfbfae..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/network_rule_set.py +++ /dev/null @@ -1,56 +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 NetworkRuleSet(Resource): - """Description of NetworkRuleSet resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param default_action: Default Action for Network Rule Set. Possible - values include: 'Allow', 'Deny' - :type default_action: str or ~azure.mgmt.servicebus.models.DefaultAction - :param virtual_network_rules: List VirtualNetwork Rules - :type virtual_network_rules: - list[~azure.mgmt.servicebus.models.NWRuleSetVirtualNetworkRules] - :param ip_rules: List of IpRules - :type ip_rules: list[~azure.mgmt.servicebus.models.NWRuleSetIpRules] - """ - - _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'}, - 'default_action': {'key': 'properties.defaultAction', 'type': 'str'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'}, - } - - def __init__(self, **kwargs): - super(NetworkRuleSet, self).__init__(**kwargs) - self.default_action = kwargs.get('default_action', None) - self.virtual_network_rules = kwargs.get('virtual_network_rules', None) - self.ip_rules = kwargs.get('ip_rules', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/network_rule_set_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/network_rule_set_py3.py deleted file mode 100644 index 8a15c0e689cf..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/network_rule_set_py3.py +++ /dev/null @@ -1,56 +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_py3 import Resource - - -class NetworkRuleSet(Resource): - """Description of NetworkRuleSet resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param default_action: Default Action for Network Rule Set. Possible - values include: 'Allow', 'Deny' - :type default_action: str or ~azure.mgmt.servicebus.models.DefaultAction - :param virtual_network_rules: List VirtualNetwork Rules - :type virtual_network_rules: - list[~azure.mgmt.servicebus.models.NWRuleSetVirtualNetworkRules] - :param ip_rules: List of IpRules - :type ip_rules: list[~azure.mgmt.servicebus.models.NWRuleSetIpRules] - """ - - _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'}, - 'default_action': {'key': 'properties.defaultAction', 'type': 'str'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'}, - } - - def __init__(self, *, default_action=None, virtual_network_rules=None, ip_rules=None, **kwargs) -> None: - super(NetworkRuleSet, self).__init__(**kwargs) - self.default_action = default_action - self.virtual_network_rules = virtual_network_rules - self.ip_rules = ip_rules diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_ip_rules.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_ip_rules.py deleted file mode 100644 index 2d3b32b452c0..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_ip_rules.py +++ /dev/null @@ -1,33 +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 NWRuleSetIpRules(Model): - """Description of NetWorkRuleSet - IpRules resource. - - :param ip_mask: IP Mask - :type ip_mask: str - :param action: The IP Filter Action. Possible values include: 'Allow'. - Default value: "Allow" . - :type action: str or ~azure.mgmt.servicebus.models.NetworkRuleIPAction - """ - - _attribute_map = { - 'ip_mask': {'key': 'ipMask', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NWRuleSetIpRules, self).__init__(**kwargs) - self.ip_mask = kwargs.get('ip_mask', None) - self.action = kwargs.get('action', "Allow") diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_ip_rules_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_ip_rules_py3.py deleted file mode 100644 index e3fc2ba83bd3..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_ip_rules_py3.py +++ /dev/null @@ -1,33 +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 NWRuleSetIpRules(Model): - """Description of NetWorkRuleSet - IpRules resource. - - :param ip_mask: IP Mask - :type ip_mask: str - :param action: The IP Filter Action. Possible values include: 'Allow'. - Default value: "Allow" . - :type action: str or ~azure.mgmt.servicebus.models.NetworkRuleIPAction - """ - - _attribute_map = { - 'ip_mask': {'key': 'ipMask', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'str'}, - } - - def __init__(self, *, ip_mask: str=None, action="Allow", **kwargs) -> None: - super(NWRuleSetIpRules, self).__init__(**kwargs) - self.ip_mask = ip_mask - self.action = action diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_virtual_network_rules.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_virtual_network_rules.py deleted file mode 100644 index 1dd737cedaf7..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_virtual_network_rules.py +++ /dev/null @@ -1,33 +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 NWRuleSetVirtualNetworkRules(Model): - """Description of VirtualNetworkRules - NetworkRules resource. - - :param subnet: Subnet properties - :type subnet: ~azure.mgmt.servicebus.models.Subnet - :param ignore_missing_vnet_service_endpoint: Value that indicates whether - to ignore missing VNet Service Endpoint - :type ignore_missing_vnet_service_endpoint: bool - """ - - _attribute_map = { - 'subnet': {'key': 'subnet', 'type': 'Subnet'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(NWRuleSetVirtualNetworkRules, self).__init__(**kwargs) - self.subnet = kwargs.get('subnet', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_virtual_network_rules_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_virtual_network_rules_py3.py deleted file mode 100644 index 8ac33e005e27..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/nw_rule_set_virtual_network_rules_py3.py +++ /dev/null @@ -1,33 +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 NWRuleSetVirtualNetworkRules(Model): - """Description of VirtualNetworkRules - NetworkRules resource. - - :param subnet: Subnet properties - :type subnet: ~azure.mgmt.servicebus.models.Subnet - :param ignore_missing_vnet_service_endpoint: Value that indicates whether - to ignore missing VNet Service Endpoint - :type ignore_missing_vnet_service_endpoint: bool - """ - - _attribute_map = { - 'subnet': {'key': 'subnet', 'type': 'Subnet'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, - } - - def __init__(self, *, subnet=None, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(NWRuleSetVirtualNetworkRules, self).__init__(**kwargs) - self.subnet = subnet - self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation.py deleted file mode 100644 index 7f781b965a44..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation.py +++ /dev/null @@ -1,39 +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 Operation(Model): - """A ServiceBus REST API operation. - - 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 object that represents the operation. - :type display: ~azure.mgmt.servicebus.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = kwargs.get('display', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation_display.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation_display.py deleted file mode 100644 index 8f5292d9eba3..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation_display.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 OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft.ServiceBus - :vartype provider: str - :ivar resource: Resource on which the operation is performed: Invoice, - etc. - :vartype resource: str - :ivar operation: Operation type: Read, write, delete, etc. - :vartype operation: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation_display_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation_display_py3.py deleted file mode 100644 index 90b2be66e847..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation_display_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 OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft.ServiceBus - :vartype provider: str - :ivar resource: Resource on which the operation is performed: Invoice, - etc. - :vartype resource: str - :ivar operation: Operation type: Read, write, delete, etc. - :vartype operation: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation_paged.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation_paged.py deleted file mode 100644 index aaa7a15b3523..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation_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 OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation_py3.py deleted file mode 100644 index 726e23280203..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/operation_py3.py +++ /dev/null @@ -1,39 +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 Operation(Model): - """A ServiceBus REST API operation. - - 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 object that represents the operation. - :type display: ~azure.mgmt.servicebus.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = display diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions.py deleted file mode 100644 index 52cd2a921b61..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions.py +++ /dev/null @@ -1,53 +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_namespace_patch import ResourceNamespacePatch - - -class PremiumMessagingRegions(ResourceNamespacePatch): - """Premium Messaging Region. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param properties: - :type properties: - ~azure.mgmt.servicebus.models.PremiumMessagingRegionsProperties - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'PremiumMessagingRegionsProperties'}, - } - - def __init__(self, **kwargs): - super(PremiumMessagingRegions, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions_paged.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions_paged.py deleted file mode 100644 index 4d57754d8fb0..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions_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 PremiumMessagingRegionsPaged(Paged): - """ - A paging container for iterating over a list of :class:`PremiumMessagingRegions ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PremiumMessagingRegions]'} - } - - def __init__(self, *args, **kwargs): - - super(PremiumMessagingRegionsPaged, self).__init__(*args, **kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions_properties.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions_properties.py deleted file mode 100644 index 1e1a62d670eb..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions_properties.py +++ /dev/null @@ -1,40 +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 PremiumMessagingRegionsProperties(Model): - """PremiumMessagingRegionsProperties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Region code - :vartype code: str - :ivar full_name: Full name of the region - :vartype full_name: str - """ - - _validation = { - 'code': {'readonly': True}, - 'full_name': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'full_name': {'key': 'fullName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PremiumMessagingRegionsProperties, self).__init__(**kwargs) - self.code = None - self.full_name = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions_properties_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions_properties_py3.py deleted file mode 100644 index 6c9b7f29b787..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions_properties_py3.py +++ /dev/null @@ -1,40 +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 PremiumMessagingRegionsProperties(Model): - """PremiumMessagingRegionsProperties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Region code - :vartype code: str - :ivar full_name: Full name of the region - :vartype full_name: str - """ - - _validation = { - 'code': {'readonly': True}, - 'full_name': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'full_name': {'key': 'fullName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PremiumMessagingRegionsProperties, self).__init__(**kwargs) - self.code = None - self.full_name = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions_py3.py deleted file mode 100644 index 3c079ba666f3..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/premium_messaging_regions_py3.py +++ /dev/null @@ -1,53 +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_namespace_patch_py3 import ResourceNamespacePatch - - -class PremiumMessagingRegions(ResourceNamespacePatch): - """Premium Messaging Region. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param properties: - :type properties: - ~azure.mgmt.servicebus.models.PremiumMessagingRegionsProperties - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'PremiumMessagingRegionsProperties'}, - } - - def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: - super(PremiumMessagingRegions, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters.py deleted file mode 100644 index a4526b2eba48..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters.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 RegenerateAccessKeyParameters(Model): - """Parameters supplied to the Regenerate Authorization Rule operation, - specifies which key needs to be reset. - - All required parameters must be populated in order to send to Azure. - - :param key_type: Required. The access key to regenerate. Possible values - include: 'PrimaryKey', 'SecondaryKey' - :type key_type: str or ~azure.mgmt.servicebus.models.KeyType - :param key: Optional, if the key value provided, is reset for KeyType - value or autogenerate Key value set for keyType - :type key: str - """ - - _validation = { - 'key_type': {'required': True}, - } - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'KeyType'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegenerateAccessKeyParameters, self).__init__(**kwargs) - self.key_type = kwargs.get('key_type', None) - self.key = kwargs.get('key', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters_py3.py deleted file mode 100644 index b18043d81452..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters_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 RegenerateAccessKeyParameters(Model): - """Parameters supplied to the Regenerate Authorization Rule operation, - specifies which key needs to be reset. - - All required parameters must be populated in order to send to Azure. - - :param key_type: Required. The access key to regenerate. Possible values - include: 'PrimaryKey', 'SecondaryKey' - :type key_type: str or ~azure.mgmt.servicebus.models.KeyType - :param key: Optional, if the key value provided, is reset for KeyType - value or autogenerate Key value set for keyType - :type key: str - """ - - _validation = { - 'key_type': {'required': True}, - } - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'KeyType'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, *, key_type, key: str=None, **kwargs) -> None: - super(RegenerateAccessKeyParameters, self).__init__(**kwargs) - self.key_type = key_type - self.key = key diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/resource.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/resource.py deleted file mode 100644 index f2f4bcd9cd55..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/resource.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 Resource(Model): - """The Resource definition for other than namespace. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: 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/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/resource_namespace_patch.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/resource_namespace_patch.py deleted file mode 100644 index 2ac18a403bce..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/resource_namespace_patch.py +++ /dev/null @@ -1,50 +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 ResourceNamespacePatch(Resource): - """The Resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, 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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ResourceNamespacePatch, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/resource_namespace_patch_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/resource_namespace_patch_py3.py deleted file mode 100644 index 937efe445588..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/resource_namespace_patch_py3.py +++ /dev/null @@ -1,50 +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_py3 import Resource - - -class ResourceNamespacePatch(Resource): - """The Resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, 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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(ResourceNamespacePatch, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/resource_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/resource_py3.py deleted file mode 100644 index 6a1c6db582ed..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/resource_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 Resource(Model): - """The Resource definition for other than namespace. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: 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/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/rule.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/rule.py deleted file mode 100644 index 9b3c0e5ca7fa..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/rule.py +++ /dev/null @@ -1,60 +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 Rule(Resource): - """Description of Rule Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param action: Represents the filter actions which are allowed for the - transformation of a message that have been matched by a filter expression. - :type action: ~azure.mgmt.servicebus.models.Action - :param filter_type: Filter type that is evaluated against a - BrokeredMessage. Possible values include: 'SqlFilter', 'CorrelationFilter' - :type filter_type: str or ~azure.mgmt.servicebus.models.FilterType - :param sql_filter: Properties of sqlFilter - :type sql_filter: ~azure.mgmt.servicebus.models.SqlFilter - :param correlation_filter: Properties of correlationFilter - :type correlation_filter: ~azure.mgmt.servicebus.models.CorrelationFilter - """ - - _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'}, - 'action': {'key': 'properties.action', 'type': 'Action'}, - 'filter_type': {'key': 'properties.filterType', 'type': 'FilterType'}, - 'sql_filter': {'key': 'properties.sqlFilter', 'type': 'SqlFilter'}, - 'correlation_filter': {'key': 'properties.correlationFilter', 'type': 'CorrelationFilter'}, - } - - def __init__(self, **kwargs): - super(Rule, self).__init__(**kwargs) - self.action = kwargs.get('action', None) - self.filter_type = kwargs.get('filter_type', None) - self.sql_filter = kwargs.get('sql_filter', None) - self.correlation_filter = kwargs.get('correlation_filter', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/rule_paged.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/rule_paged.py deleted file mode 100644 index 1cfb1a4e8369..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/rule_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 RulePaged(Paged): - """ - A paging container for iterating over a list of :class:`Rule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Rule]'} - } - - def __init__(self, *args, **kwargs): - - super(RulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/rule_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/rule_py3.py deleted file mode 100644 index 89c536c57bdf..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/rule_py3.py +++ /dev/null @@ -1,60 +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_py3 import Resource - - -class Rule(Resource): - """Description of Rule Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param action: Represents the filter actions which are allowed for the - transformation of a message that have been matched by a filter expression. - :type action: ~azure.mgmt.servicebus.models.Action - :param filter_type: Filter type that is evaluated against a - BrokeredMessage. Possible values include: 'SqlFilter', 'CorrelationFilter' - :type filter_type: str or ~azure.mgmt.servicebus.models.FilterType - :param sql_filter: Properties of sqlFilter - :type sql_filter: ~azure.mgmt.servicebus.models.SqlFilter - :param correlation_filter: Properties of correlationFilter - :type correlation_filter: ~azure.mgmt.servicebus.models.CorrelationFilter - """ - - _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'}, - 'action': {'key': 'properties.action', 'type': 'Action'}, - 'filter_type': {'key': 'properties.filterType', 'type': 'FilterType'}, - 'sql_filter': {'key': 'properties.sqlFilter', 'type': 'SqlFilter'}, - 'correlation_filter': {'key': 'properties.correlationFilter', 'type': 'CorrelationFilter'}, - } - - def __init__(self, *, action=None, filter_type=None, sql_filter=None, correlation_filter=None, **kwargs) -> None: - super(Rule, self).__init__(**kwargs) - self.action = action - self.filter_type = filter_type - self.sql_filter = sql_filter - self.correlation_filter = correlation_filter diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_authorization_rule.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_authorization_rule.py deleted file mode 100644 index 13660f930bf8..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_authorization_rule.py +++ /dev/null @@ -1,49 +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 SBAuthorizationRule(Resource): - """Description of a namespace authorization rule. - - 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: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param rights: Required. The rights associated with the rule. - :type rights: list[str or ~azure.mgmt.servicebus.models.AccessRights] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'rights': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'rights': {'key': 'properties.rights', 'type': '[AccessRights]'}, - } - - def __init__(self, **kwargs): - super(SBAuthorizationRule, self).__init__(**kwargs) - self.rights = kwargs.get('rights', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_authorization_rule_paged.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_authorization_rule_paged.py deleted file mode 100644 index 24c4f71b0001..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_authorization_rule_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 SBAuthorizationRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`SBAuthorizationRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SBAuthorizationRule]'} - } - - def __init__(self, *args, **kwargs): - - super(SBAuthorizationRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_authorization_rule_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_authorization_rule_py3.py deleted file mode 100644 index bc56273b70c9..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_authorization_rule_py3.py +++ /dev/null @@ -1,49 +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_py3 import Resource - - -class SBAuthorizationRule(Resource): - """Description of a namespace authorization rule. - - 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: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param rights: Required. The rights associated with the rule. - :type rights: list[str or ~azure.mgmt.servicebus.models.AccessRights] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'rights': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'rights': {'key': 'properties.rights', 'type': '[AccessRights]'}, - } - - def __init__(self, *, rights, **kwargs) -> None: - super(SBAuthorizationRule, self).__init__(**kwargs) - self.rights = rights diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace.py deleted file mode 100644 index 94c70ca44055..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace.py +++ /dev/null @@ -1,81 +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 .tracked_resource import TrackedResource - - -class SBNamespace(TrackedResource): - """Description of a namespace 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: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. The Geo-location where the resource lives - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: Properties of Sku - :type sku: ~azure.mgmt.servicebus.models.SBSku - :ivar provisioning_state: Provisioning state of the namespace. - :vartype provisioning_state: str - :ivar created_at: The time the namespace was created. - :vartype created_at: datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: datetime - :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus - operations. - :vartype service_bus_endpoint: str - :ivar metric_id: Identifier for Azure Insights metrics - :vartype metric_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'service_bus_endpoint': {'readonly': True}, - 'metric_id': {'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': 'SBSku'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, - 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SBNamespace, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.provisioning_state = None - self.created_at = None - self.updated_at = None - self.service_bus_endpoint = None - self.metric_id = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_migrate.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_migrate.py deleted file mode 100644 index a428dd686e41..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_migrate.py +++ /dev/null @@ -1,37 +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 SBNamespaceMigrate(Model): - """Namespace Migrate Object. - - All required parameters must be populated in order to send to Azure. - - :param target_namespace_type: Required. Type of namespaces. Possible - values include: 'Messaging', 'NotificationHub', 'Mixed', 'EventHub', - 'Relay' - :type target_namespace_type: str or - ~azure.mgmt.servicebus.models.NameSpaceType - """ - - _validation = { - 'target_namespace_type': {'required': True}, - } - - _attribute_map = { - 'target_namespace_type': {'key': 'targetNamespaceType', 'type': 'NameSpaceType'}, - } - - def __init__(self, **kwargs): - super(SBNamespaceMigrate, self).__init__(**kwargs) - self.target_namespace_type = kwargs.get('target_namespace_type', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_migrate_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_migrate_py3.py deleted file mode 100644 index 52e28dbea884..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_migrate_py3.py +++ /dev/null @@ -1,37 +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 SBNamespaceMigrate(Model): - """Namespace Migrate Object. - - All required parameters must be populated in order to send to Azure. - - :param target_namespace_type: Required. Type of namespaces. Possible - values include: 'Messaging', 'NotificationHub', 'Mixed', 'EventHub', - 'Relay' - :type target_namespace_type: str or - ~azure.mgmt.servicebus.models.NameSpaceType - """ - - _validation = { - 'target_namespace_type': {'required': True}, - } - - _attribute_map = { - 'target_namespace_type': {'key': 'targetNamespaceType', 'type': 'NameSpaceType'}, - } - - def __init__(self, *, target_namespace_type, **kwargs) -> None: - super(SBNamespaceMigrate, self).__init__(**kwargs) - self.target_namespace_type = target_namespace_type diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_paged.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_paged.py deleted file mode 100644 index e0e77d8c6052..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_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 SBNamespacePaged(Paged): - """ - A paging container for iterating over a list of :class:`SBNamespace ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SBNamespace]'} - } - - def __init__(self, *args, **kwargs): - - super(SBNamespacePaged, self).__init__(*args, **kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_py3.py deleted file mode 100644 index 72041e6d9a85..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_py3.py +++ /dev/null @@ -1,81 +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 .tracked_resource_py3 import TrackedResource - - -class SBNamespace(TrackedResource): - """Description of a namespace 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: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. The Geo-location where the resource lives - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: Properties of Sku - :type sku: ~azure.mgmt.servicebus.models.SBSku - :ivar provisioning_state: Provisioning state of the namespace. - :vartype provisioning_state: str - :ivar created_at: The time the namespace was created. - :vartype created_at: datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: datetime - :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus - operations. - :vartype service_bus_endpoint: str - :ivar metric_id: Identifier for Azure Insights metrics - :vartype metric_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'service_bus_endpoint': {'readonly': True}, - 'metric_id': {'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': 'SBSku'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, - 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, **kwargs) -> None: - super(SBNamespace, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.provisioning_state = None - self.created_at = None - self.updated_at = None - self.service_bus_endpoint = None - self.metric_id = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters.py deleted file mode 100644 index 76765c7ff07a..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters.py +++ /dev/null @@ -1,78 +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_namespace_patch import ResourceNamespacePatch - - -class SBNamespaceUpdateParameters(ResourceNamespacePatch): - """Description of a namespace resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: Properties of Sku - :type sku: ~azure.mgmt.servicebus.models.SBSku - :ivar provisioning_state: Provisioning state of the namespace. - :vartype provisioning_state: str - :ivar created_at: The time the namespace was created. - :vartype created_at: datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: datetime - :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus - operations. - :vartype service_bus_endpoint: str - :ivar metric_id: Identifier for Azure Insights metrics - :vartype metric_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'service_bus_endpoint': {'readonly': True}, - 'metric_id': {'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': 'SBSku'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, - 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SBNamespaceUpdateParameters, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.provisioning_state = None - self.created_at = None - self.updated_at = None - self.service_bus_endpoint = None - self.metric_id = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters_py3.py deleted file mode 100644 index d61858aa3328..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace_update_parameters_py3.py +++ /dev/null @@ -1,78 +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_namespace_patch_py3 import ResourceNamespacePatch - - -class SBNamespaceUpdateParameters(ResourceNamespacePatch): - """Description of a namespace resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param sku: Properties of Sku - :type sku: ~azure.mgmt.servicebus.models.SBSku - :ivar provisioning_state: Provisioning state of the namespace. - :vartype provisioning_state: str - :ivar created_at: The time the namespace was created. - :vartype created_at: datetime - :ivar updated_at: The time the namespace was updated. - :vartype updated_at: datetime - :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus - operations. - :vartype service_bus_endpoint: str - :ivar metric_id: Identifier for Azure Insights metrics - :vartype metric_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'service_bus_endpoint': {'readonly': True}, - 'metric_id': {'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': 'SBSku'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, - 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, sku=None, **kwargs) -> None: - super(SBNamespaceUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.provisioning_state = None - self.created_at = None - self.updated_at = None - self.service_bus_endpoint = None - self.metric_id = None diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_queue.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_queue.py deleted file mode 100644 index 41d2a45f277b..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_queue.py +++ /dev/null @@ -1,156 +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 SBQueue(Resource): - """Description of queue Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar count_details: Message Count Details. - :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails - :ivar created_at: The exact time the message was created. - :vartype created_at: datetime - :ivar updated_at: The exact time the message was updated. - :vartype updated_at: datetime - :ivar accessed_at: Last time a message was sent, or the last time there - was a receive request to this queue. - :vartype accessed_at: datetime - :ivar size_in_bytes: The size of the queue, in bytes. - :vartype size_in_bytes: long - :ivar message_count: The number of messages in the queue. - :vartype message_count: long - :param lock_duration: ISO 8601 timespan duration of a peek-lock; that is, - the amount of time that the message is locked for other receivers. The - maximum value for LockDuration is 5 minutes; the default value is 1 - minute. - :type lock_duration: timedelta - :param max_size_in_megabytes: The maximum size of the queue in megabytes, - which is the size of memory allocated for the queue. Default is 1024. - :type max_size_in_megabytes: int - :param requires_duplicate_detection: A value indicating if this queue - requires duplicate detection. - :type requires_duplicate_detection: bool - :param requires_session: A value that indicates whether the queue supports - the concept of sessions. - :type requires_session: bool - :param default_message_time_to_live: ISO 8601 default message timespan to - live value. This is the duration after which the message expires, starting - from when the message is sent to Service Bus. This is the default value - used when TimeToLive is not set on a message itself. - :type default_message_time_to_live: timedelta - :param dead_lettering_on_message_expiration: A value that indicates - whether this queue has dead letter support when a message expires. - :type dead_lettering_on_message_expiration: bool - :param duplicate_detection_history_time_window: ISO 8601 timeSpan - structure that defines the duration of the duplicate detection history. - The default value is 10 minutes. - :type duplicate_detection_history_time_window: timedelta - :param max_delivery_count: The maximum delivery count. A message is - automatically deadlettered after this number of deliveries. default value - is 10. - :type max_delivery_count: int - :param status: Enumerates the possible values for the status of a - messaging entity. Possible values include: 'Active', 'Disabled', - 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', - 'Renaming', 'Unknown' - :type status: str or ~azure.mgmt.servicebus.models.EntityStatus - :param enable_batched_operations: Value that indicates whether server-side - batched operations are enabled. - :type enable_batched_operations: bool - :param auto_delete_on_idle: ISO 8061 timeSpan idle interval after which - the queue is automatically deleted. The minimum duration is 5 minutes. - :type auto_delete_on_idle: timedelta - :param enable_partitioning: A value that indicates whether the queue is to - be partitioned across multiple message brokers. - :type enable_partitioning: bool - :param enable_express: A value that indicates whether Express Entities are - enabled. An express queue holds a message in memory temporarily before - writing it to persistent storage. - :type enable_express: bool - :param forward_to: Queue/Topic name to forward the messages - :type forward_to: str - :param forward_dead_lettered_messages_to: Queue/Topic name to forward the - Dead Letter message - :type forward_dead_lettered_messages_to: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count_details': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'accessed_at': {'readonly': True}, - 'size_in_bytes': {'readonly': True}, - 'message_count': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count_details': {'key': 'properties.countDetails', 'type': 'MessageCountDetails'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'accessed_at': {'key': 'properties.accessedAt', 'type': 'iso-8601'}, - 'size_in_bytes': {'key': 'properties.sizeInBytes', 'type': 'long'}, - 'message_count': {'key': 'properties.messageCount', 'type': 'long'}, - 'lock_duration': {'key': 'properties.lockDuration', 'type': 'duration'}, - 'max_size_in_megabytes': {'key': 'properties.maxSizeInMegabytes', 'type': 'int'}, - 'requires_duplicate_detection': {'key': 'properties.requiresDuplicateDetection', 'type': 'bool'}, - 'requires_session': {'key': 'properties.requiresSession', 'type': 'bool'}, - 'default_message_time_to_live': {'key': 'properties.defaultMessageTimeToLive', 'type': 'duration'}, - 'dead_lettering_on_message_expiration': {'key': 'properties.deadLetteringOnMessageExpiration', 'type': 'bool'}, - 'duplicate_detection_history_time_window': {'key': 'properties.duplicateDetectionHistoryTimeWindow', 'type': 'duration'}, - 'max_delivery_count': {'key': 'properties.maxDeliveryCount', 'type': 'int'}, - 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, - 'enable_batched_operations': {'key': 'properties.enableBatchedOperations', 'type': 'bool'}, - 'auto_delete_on_idle': {'key': 'properties.autoDeleteOnIdle', 'type': 'duration'}, - 'enable_partitioning': {'key': 'properties.enablePartitioning', 'type': 'bool'}, - 'enable_express': {'key': 'properties.enableExpress', 'type': 'bool'}, - 'forward_to': {'key': 'properties.forwardTo', 'type': 'str'}, - 'forward_dead_lettered_messages_to': {'key': 'properties.forwardDeadLetteredMessagesTo', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SBQueue, self).__init__(**kwargs) - self.count_details = None - self.created_at = None - self.updated_at = None - self.accessed_at = None - self.size_in_bytes = None - self.message_count = None - self.lock_duration = kwargs.get('lock_duration', None) - self.max_size_in_megabytes = kwargs.get('max_size_in_megabytes', None) - self.requires_duplicate_detection = kwargs.get('requires_duplicate_detection', None) - self.requires_session = kwargs.get('requires_session', None) - self.default_message_time_to_live = kwargs.get('default_message_time_to_live', None) - self.dead_lettering_on_message_expiration = kwargs.get('dead_lettering_on_message_expiration', None) - self.duplicate_detection_history_time_window = kwargs.get('duplicate_detection_history_time_window', None) - self.max_delivery_count = kwargs.get('max_delivery_count', None) - self.status = kwargs.get('status', None) - self.enable_batched_operations = kwargs.get('enable_batched_operations', None) - self.auto_delete_on_idle = kwargs.get('auto_delete_on_idle', None) - self.enable_partitioning = kwargs.get('enable_partitioning', None) - self.enable_express = kwargs.get('enable_express', None) - self.forward_to = kwargs.get('forward_to', None) - self.forward_dead_lettered_messages_to = kwargs.get('forward_dead_lettered_messages_to', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_queue_paged.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_queue_paged.py deleted file mode 100644 index f85adb4bb591..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_queue_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 SBQueuePaged(Paged): - """ - A paging container for iterating over a list of :class:`SBQueue ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SBQueue]'} - } - - def __init__(self, *args, **kwargs): - - super(SBQueuePaged, self).__init__(*args, **kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_queue_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_queue_py3.py deleted file mode 100644 index 44afe3abe826..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_queue_py3.py +++ /dev/null @@ -1,156 +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_py3 import Resource - - -class SBQueue(Resource): - """Description of queue Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar count_details: Message Count Details. - :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails - :ivar created_at: The exact time the message was created. - :vartype created_at: datetime - :ivar updated_at: The exact time the message was updated. - :vartype updated_at: datetime - :ivar accessed_at: Last time a message was sent, or the last time there - was a receive request to this queue. - :vartype accessed_at: datetime - :ivar size_in_bytes: The size of the queue, in bytes. - :vartype size_in_bytes: long - :ivar message_count: The number of messages in the queue. - :vartype message_count: long - :param lock_duration: ISO 8601 timespan duration of a peek-lock; that is, - the amount of time that the message is locked for other receivers. The - maximum value for LockDuration is 5 minutes; the default value is 1 - minute. - :type lock_duration: timedelta - :param max_size_in_megabytes: The maximum size of the queue in megabytes, - which is the size of memory allocated for the queue. Default is 1024. - :type max_size_in_megabytes: int - :param requires_duplicate_detection: A value indicating if this queue - requires duplicate detection. - :type requires_duplicate_detection: bool - :param requires_session: A value that indicates whether the queue supports - the concept of sessions. - :type requires_session: bool - :param default_message_time_to_live: ISO 8601 default message timespan to - live value. This is the duration after which the message expires, starting - from when the message is sent to Service Bus. This is the default value - used when TimeToLive is not set on a message itself. - :type default_message_time_to_live: timedelta - :param dead_lettering_on_message_expiration: A value that indicates - whether this queue has dead letter support when a message expires. - :type dead_lettering_on_message_expiration: bool - :param duplicate_detection_history_time_window: ISO 8601 timeSpan - structure that defines the duration of the duplicate detection history. - The default value is 10 minutes. - :type duplicate_detection_history_time_window: timedelta - :param max_delivery_count: The maximum delivery count. A message is - automatically deadlettered after this number of deliveries. default value - is 10. - :type max_delivery_count: int - :param status: Enumerates the possible values for the status of a - messaging entity. Possible values include: 'Active', 'Disabled', - 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', - 'Renaming', 'Unknown' - :type status: str or ~azure.mgmt.servicebus.models.EntityStatus - :param enable_batched_operations: Value that indicates whether server-side - batched operations are enabled. - :type enable_batched_operations: bool - :param auto_delete_on_idle: ISO 8061 timeSpan idle interval after which - the queue is automatically deleted. The minimum duration is 5 minutes. - :type auto_delete_on_idle: timedelta - :param enable_partitioning: A value that indicates whether the queue is to - be partitioned across multiple message brokers. - :type enable_partitioning: bool - :param enable_express: A value that indicates whether Express Entities are - enabled. An express queue holds a message in memory temporarily before - writing it to persistent storage. - :type enable_express: bool - :param forward_to: Queue/Topic name to forward the messages - :type forward_to: str - :param forward_dead_lettered_messages_to: Queue/Topic name to forward the - Dead Letter message - :type forward_dead_lettered_messages_to: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'count_details': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'accessed_at': {'readonly': True}, - 'size_in_bytes': {'readonly': True}, - 'message_count': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'count_details': {'key': 'properties.countDetails', 'type': 'MessageCountDetails'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'accessed_at': {'key': 'properties.accessedAt', 'type': 'iso-8601'}, - 'size_in_bytes': {'key': 'properties.sizeInBytes', 'type': 'long'}, - 'message_count': {'key': 'properties.messageCount', 'type': 'long'}, - 'lock_duration': {'key': 'properties.lockDuration', 'type': 'duration'}, - 'max_size_in_megabytes': {'key': 'properties.maxSizeInMegabytes', 'type': 'int'}, - 'requires_duplicate_detection': {'key': 'properties.requiresDuplicateDetection', 'type': 'bool'}, - 'requires_session': {'key': 'properties.requiresSession', 'type': 'bool'}, - 'default_message_time_to_live': {'key': 'properties.defaultMessageTimeToLive', 'type': 'duration'}, - 'dead_lettering_on_message_expiration': {'key': 'properties.deadLetteringOnMessageExpiration', 'type': 'bool'}, - 'duplicate_detection_history_time_window': {'key': 'properties.duplicateDetectionHistoryTimeWindow', 'type': 'duration'}, - 'max_delivery_count': {'key': 'properties.maxDeliveryCount', 'type': 'int'}, - 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, - 'enable_batched_operations': {'key': 'properties.enableBatchedOperations', 'type': 'bool'}, - 'auto_delete_on_idle': {'key': 'properties.autoDeleteOnIdle', 'type': 'duration'}, - 'enable_partitioning': {'key': 'properties.enablePartitioning', 'type': 'bool'}, - 'enable_express': {'key': 'properties.enableExpress', 'type': 'bool'}, - 'forward_to': {'key': 'properties.forwardTo', 'type': 'str'}, - 'forward_dead_lettered_messages_to': {'key': 'properties.forwardDeadLetteredMessagesTo', 'type': 'str'}, - } - - def __init__(self, *, lock_duration=None, max_size_in_megabytes: int=None, requires_duplicate_detection: bool=None, requires_session: bool=None, default_message_time_to_live=None, dead_lettering_on_message_expiration: bool=None, duplicate_detection_history_time_window=None, max_delivery_count: int=None, status=None, enable_batched_operations: bool=None, auto_delete_on_idle=None, enable_partitioning: bool=None, enable_express: bool=None, forward_to: str=None, forward_dead_lettered_messages_to: str=None, **kwargs) -> None: - super(SBQueue, self).__init__(**kwargs) - self.count_details = None - self.created_at = None - self.updated_at = None - self.accessed_at = None - self.size_in_bytes = None - self.message_count = None - self.lock_duration = lock_duration - self.max_size_in_megabytes = max_size_in_megabytes - self.requires_duplicate_detection = requires_duplicate_detection - self.requires_session = requires_session - self.default_message_time_to_live = default_message_time_to_live - self.dead_lettering_on_message_expiration = dead_lettering_on_message_expiration - self.duplicate_detection_history_time_window = duplicate_detection_history_time_window - self.max_delivery_count = max_delivery_count - self.status = status - self.enable_batched_operations = enable_batched_operations - self.auto_delete_on_idle = auto_delete_on_idle - self.enable_partitioning = enable_partitioning - self.enable_express = enable_express - self.forward_to = forward_to - self.forward_dead_lettered_messages_to = forward_dead_lettered_messages_to diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_sku.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_sku.py deleted file mode 100644 index f69f3b5de5fd..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_sku.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 SBSku(Model): - """SKU of the namespace. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of this SKU. Possible values include: 'Basic', - 'Standard', 'Premium' - :type name: str or ~azure.mgmt.servicebus.models.SkuName - :param tier: The billing tier of this particular SKU. Possible values - include: 'Basic', 'Standard', 'Premium' - :type tier: str or ~azure.mgmt.servicebus.models.SkuTier - :param capacity: The specified messaging units for the tier. For Premium - tier, capacity are 1,2 and 4. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'SkuName'}, - 'tier': {'key': 'tier', 'type': 'SkuTier'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SBSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_sku_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_sku_py3.py deleted file mode 100644 index f5adfee20c0a..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_sku_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 SBSku(Model): - """SKU of the namespace. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of this SKU. Possible values include: 'Basic', - 'Standard', 'Premium' - :type name: str or ~azure.mgmt.servicebus.models.SkuName - :param tier: The billing tier of this particular SKU. Possible values - include: 'Basic', 'Standard', 'Premium' - :type tier: str or ~azure.mgmt.servicebus.models.SkuTier - :param capacity: The specified messaging units for the tier. For Premium - tier, capacity are 1,2 and 4. - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'SkuName'}, - 'tier': {'key': 'tier', 'type': 'SkuTier'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, *, name, tier=None, capacity: int=None, **kwargs) -> None: - super(SBSku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_subscription.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_subscription.py deleted file mode 100644 index 426c99bcfd7c..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_subscription.py +++ /dev/null @@ -1,132 +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 SBSubscription(Resource): - """Description of subscription resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar message_count: Number of messages. - :vartype message_count: long - :ivar created_at: Exact time the message was created. - :vartype created_at: datetime - :ivar accessed_at: Last time there was a receive request to this - subscription. - :vartype accessed_at: datetime - :ivar updated_at: The exact time the message was updated. - :vartype updated_at: datetime - :ivar count_details: Message count details - :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails - :param lock_duration: ISO 8061 lock duration timespan for the - subscription. The default value is 1 minute. - :type lock_duration: timedelta - :param requires_session: Value indicating if a subscription supports the - concept of sessions. - :type requires_session: bool - :param default_message_time_to_live: ISO 8061 Default message timespan to - live value. This is the duration after which the message expires, starting - from when the message is sent to Service Bus. This is the default value - used when TimeToLive is not set on a message itself. - :type default_message_time_to_live: timedelta - :param dead_lettering_on_filter_evaluation_exceptions: Value that - indicates whether a subscription has dead letter support on filter - evaluation exceptions. - :type dead_lettering_on_filter_evaluation_exceptions: bool - :param dead_lettering_on_message_expiration: Value that indicates whether - a subscription has dead letter support when a message expires. - :type dead_lettering_on_message_expiration: bool - :param duplicate_detection_history_time_window: ISO 8601 timeSpan - structure that defines the duration of the duplicate detection history. - The default value is 10 minutes. - :type duplicate_detection_history_time_window: timedelta - :param max_delivery_count: Number of maximum deliveries. - :type max_delivery_count: int - :param status: Enumerates the possible values for the status of a - messaging entity. Possible values include: 'Active', 'Disabled', - 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', - 'Renaming', 'Unknown' - :type status: str or ~azure.mgmt.servicebus.models.EntityStatus - :param enable_batched_operations: Value that indicates whether server-side - batched operations are enabled. - :type enable_batched_operations: bool - :param auto_delete_on_idle: ISO 8061 timeSpan idle interval after which - the topic is automatically deleted. The minimum duration is 5 minutes. - :type auto_delete_on_idle: timedelta - :param forward_to: Queue/Topic name to forward the messages - :type forward_to: str - :param forward_dead_lettered_messages_to: Queue/Topic name to forward the - Dead Letter message - :type forward_dead_lettered_messages_to: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'message_count': {'readonly': True}, - 'created_at': {'readonly': True}, - 'accessed_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'count_details': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'message_count': {'key': 'properties.messageCount', 'type': 'long'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'accessed_at': {'key': 'properties.accessedAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'count_details': {'key': 'properties.countDetails', 'type': 'MessageCountDetails'}, - 'lock_duration': {'key': 'properties.lockDuration', 'type': 'duration'}, - 'requires_session': {'key': 'properties.requiresSession', 'type': 'bool'}, - 'default_message_time_to_live': {'key': 'properties.defaultMessageTimeToLive', 'type': 'duration'}, - 'dead_lettering_on_filter_evaluation_exceptions': {'key': 'properties.deadLetteringOnFilterEvaluationExceptions', 'type': 'bool'}, - 'dead_lettering_on_message_expiration': {'key': 'properties.deadLetteringOnMessageExpiration', 'type': 'bool'}, - 'duplicate_detection_history_time_window': {'key': 'properties.duplicateDetectionHistoryTimeWindow', 'type': 'duration'}, - 'max_delivery_count': {'key': 'properties.maxDeliveryCount', 'type': 'int'}, - 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, - 'enable_batched_operations': {'key': 'properties.enableBatchedOperations', 'type': 'bool'}, - 'auto_delete_on_idle': {'key': 'properties.autoDeleteOnIdle', 'type': 'duration'}, - 'forward_to': {'key': 'properties.forwardTo', 'type': 'str'}, - 'forward_dead_lettered_messages_to': {'key': 'properties.forwardDeadLetteredMessagesTo', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SBSubscription, self).__init__(**kwargs) - self.message_count = None - self.created_at = None - self.accessed_at = None - self.updated_at = None - self.count_details = None - self.lock_duration = kwargs.get('lock_duration', None) - self.requires_session = kwargs.get('requires_session', None) - self.default_message_time_to_live = kwargs.get('default_message_time_to_live', None) - self.dead_lettering_on_filter_evaluation_exceptions = kwargs.get('dead_lettering_on_filter_evaluation_exceptions', None) - self.dead_lettering_on_message_expiration = kwargs.get('dead_lettering_on_message_expiration', None) - self.duplicate_detection_history_time_window = kwargs.get('duplicate_detection_history_time_window', None) - self.max_delivery_count = kwargs.get('max_delivery_count', None) - self.status = kwargs.get('status', None) - self.enable_batched_operations = kwargs.get('enable_batched_operations', None) - self.auto_delete_on_idle = kwargs.get('auto_delete_on_idle', None) - self.forward_to = kwargs.get('forward_to', None) - self.forward_dead_lettered_messages_to = kwargs.get('forward_dead_lettered_messages_to', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_subscription_paged.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_subscription_paged.py deleted file mode 100644 index 019bb9524f99..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_subscription_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 SBSubscriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`SBSubscription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SBSubscription]'} - } - - def __init__(self, *args, **kwargs): - - super(SBSubscriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_subscription_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_subscription_py3.py deleted file mode 100644 index e2f9351a6a0b..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_subscription_py3.py +++ /dev/null @@ -1,132 +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_py3 import Resource - - -class SBSubscription(Resource): - """Description of subscription resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar message_count: Number of messages. - :vartype message_count: long - :ivar created_at: Exact time the message was created. - :vartype created_at: datetime - :ivar accessed_at: Last time there was a receive request to this - subscription. - :vartype accessed_at: datetime - :ivar updated_at: The exact time the message was updated. - :vartype updated_at: datetime - :ivar count_details: Message count details - :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails - :param lock_duration: ISO 8061 lock duration timespan for the - subscription. The default value is 1 minute. - :type lock_duration: timedelta - :param requires_session: Value indicating if a subscription supports the - concept of sessions. - :type requires_session: bool - :param default_message_time_to_live: ISO 8061 Default message timespan to - live value. This is the duration after which the message expires, starting - from when the message is sent to Service Bus. This is the default value - used when TimeToLive is not set on a message itself. - :type default_message_time_to_live: timedelta - :param dead_lettering_on_filter_evaluation_exceptions: Value that - indicates whether a subscription has dead letter support on filter - evaluation exceptions. - :type dead_lettering_on_filter_evaluation_exceptions: bool - :param dead_lettering_on_message_expiration: Value that indicates whether - a subscription has dead letter support when a message expires. - :type dead_lettering_on_message_expiration: bool - :param duplicate_detection_history_time_window: ISO 8601 timeSpan - structure that defines the duration of the duplicate detection history. - The default value is 10 minutes. - :type duplicate_detection_history_time_window: timedelta - :param max_delivery_count: Number of maximum deliveries. - :type max_delivery_count: int - :param status: Enumerates the possible values for the status of a - messaging entity. Possible values include: 'Active', 'Disabled', - 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', - 'Renaming', 'Unknown' - :type status: str or ~azure.mgmt.servicebus.models.EntityStatus - :param enable_batched_operations: Value that indicates whether server-side - batched operations are enabled. - :type enable_batched_operations: bool - :param auto_delete_on_idle: ISO 8061 timeSpan idle interval after which - the topic is automatically deleted. The minimum duration is 5 minutes. - :type auto_delete_on_idle: timedelta - :param forward_to: Queue/Topic name to forward the messages - :type forward_to: str - :param forward_dead_lettered_messages_to: Queue/Topic name to forward the - Dead Letter message - :type forward_dead_lettered_messages_to: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'message_count': {'readonly': True}, - 'created_at': {'readonly': True}, - 'accessed_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'count_details': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'message_count': {'key': 'properties.messageCount', 'type': 'long'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'accessed_at': {'key': 'properties.accessedAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'count_details': {'key': 'properties.countDetails', 'type': 'MessageCountDetails'}, - 'lock_duration': {'key': 'properties.lockDuration', 'type': 'duration'}, - 'requires_session': {'key': 'properties.requiresSession', 'type': 'bool'}, - 'default_message_time_to_live': {'key': 'properties.defaultMessageTimeToLive', 'type': 'duration'}, - 'dead_lettering_on_filter_evaluation_exceptions': {'key': 'properties.deadLetteringOnFilterEvaluationExceptions', 'type': 'bool'}, - 'dead_lettering_on_message_expiration': {'key': 'properties.deadLetteringOnMessageExpiration', 'type': 'bool'}, - 'duplicate_detection_history_time_window': {'key': 'properties.duplicateDetectionHistoryTimeWindow', 'type': 'duration'}, - 'max_delivery_count': {'key': 'properties.maxDeliveryCount', 'type': 'int'}, - 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, - 'enable_batched_operations': {'key': 'properties.enableBatchedOperations', 'type': 'bool'}, - 'auto_delete_on_idle': {'key': 'properties.autoDeleteOnIdle', 'type': 'duration'}, - 'forward_to': {'key': 'properties.forwardTo', 'type': 'str'}, - 'forward_dead_lettered_messages_to': {'key': 'properties.forwardDeadLetteredMessagesTo', 'type': 'str'}, - } - - def __init__(self, *, lock_duration=None, requires_session: bool=None, default_message_time_to_live=None, dead_lettering_on_filter_evaluation_exceptions: bool=None, dead_lettering_on_message_expiration: bool=None, duplicate_detection_history_time_window=None, max_delivery_count: int=None, status=None, enable_batched_operations: bool=None, auto_delete_on_idle=None, forward_to: str=None, forward_dead_lettered_messages_to: str=None, **kwargs) -> None: - super(SBSubscription, self).__init__(**kwargs) - self.message_count = None - self.created_at = None - self.accessed_at = None - self.updated_at = None - self.count_details = None - self.lock_duration = lock_duration - self.requires_session = requires_session - self.default_message_time_to_live = default_message_time_to_live - self.dead_lettering_on_filter_evaluation_exceptions = dead_lettering_on_filter_evaluation_exceptions - self.dead_lettering_on_message_expiration = dead_lettering_on_message_expiration - self.duplicate_detection_history_time_window = duplicate_detection_history_time_window - self.max_delivery_count = max_delivery_count - self.status = status - self.enable_batched_operations = enable_batched_operations - self.auto_delete_on_idle = auto_delete_on_idle - self.forward_to = forward_to - self.forward_dead_lettered_messages_to = forward_dead_lettered_messages_to diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic.py deleted file mode 100644 index d6606145f094..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic.py +++ /dev/null @@ -1,129 +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 SBTopic(Resource): - """Description of topic resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar size_in_bytes: Size of the topic, in bytes. - :vartype size_in_bytes: long - :ivar created_at: Exact time the message was created. - :vartype created_at: datetime - :ivar updated_at: The exact time the message was updated. - :vartype updated_at: datetime - :ivar accessed_at: Last time the message was sent, or a request was - received, for this topic. - :vartype accessed_at: datetime - :ivar subscription_count: Number of subscriptions. - :vartype subscription_count: int - :ivar count_details: Message count details - :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails - :param default_message_time_to_live: ISO 8601 Default message timespan to - live value. This is the duration after which the message expires, starting - from when the message is sent to Service Bus. This is the default value - used when TimeToLive is not set on a message itself. - :type default_message_time_to_live: timedelta - :param max_size_in_megabytes: Maximum size of the topic in megabytes, - which is the size of the memory allocated for the topic. Default is 1024. - :type max_size_in_megabytes: int - :param requires_duplicate_detection: Value indicating if this topic - requires duplicate detection. - :type requires_duplicate_detection: bool - :param duplicate_detection_history_time_window: ISO8601 timespan structure - that defines the duration of the duplicate detection history. The default - value is 10 minutes. - :type duplicate_detection_history_time_window: timedelta - :param enable_batched_operations: Value that indicates whether server-side - batched operations are enabled. - :type enable_batched_operations: bool - :param status: Enumerates the possible values for the status of a - messaging entity. Possible values include: 'Active', 'Disabled', - 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', - 'Renaming', 'Unknown' - :type status: str or ~azure.mgmt.servicebus.models.EntityStatus - :param support_ordering: Value that indicates whether the topic supports - ordering. - :type support_ordering: bool - :param auto_delete_on_idle: ISO 8601 timespan idle interval after which - the topic is automatically deleted. The minimum duration is 5 minutes. - :type auto_delete_on_idle: timedelta - :param enable_partitioning: Value that indicates whether the topic to be - partitioned across multiple message brokers is enabled. - :type enable_partitioning: bool - :param enable_express: Value that indicates whether Express Entities are - enabled. An express topic holds a message in memory temporarily before - writing it to persistent storage. - :type enable_express: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'size_in_bytes': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'accessed_at': {'readonly': True}, - 'subscription_count': {'readonly': True}, - 'count_details': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'size_in_bytes': {'key': 'properties.sizeInBytes', 'type': 'long'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'accessed_at': {'key': 'properties.accessedAt', 'type': 'iso-8601'}, - 'subscription_count': {'key': 'properties.subscriptionCount', 'type': 'int'}, - 'count_details': {'key': 'properties.countDetails', 'type': 'MessageCountDetails'}, - 'default_message_time_to_live': {'key': 'properties.defaultMessageTimeToLive', 'type': 'duration'}, - 'max_size_in_megabytes': {'key': 'properties.maxSizeInMegabytes', 'type': 'int'}, - 'requires_duplicate_detection': {'key': 'properties.requiresDuplicateDetection', 'type': 'bool'}, - 'duplicate_detection_history_time_window': {'key': 'properties.duplicateDetectionHistoryTimeWindow', 'type': 'duration'}, - 'enable_batched_operations': {'key': 'properties.enableBatchedOperations', 'type': 'bool'}, - 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, - 'support_ordering': {'key': 'properties.supportOrdering', 'type': 'bool'}, - 'auto_delete_on_idle': {'key': 'properties.autoDeleteOnIdle', 'type': 'duration'}, - 'enable_partitioning': {'key': 'properties.enablePartitioning', 'type': 'bool'}, - 'enable_express': {'key': 'properties.enableExpress', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SBTopic, self).__init__(**kwargs) - self.size_in_bytes = None - self.created_at = None - self.updated_at = None - self.accessed_at = None - self.subscription_count = None - self.count_details = None - self.default_message_time_to_live = kwargs.get('default_message_time_to_live', None) - self.max_size_in_megabytes = kwargs.get('max_size_in_megabytes', None) - self.requires_duplicate_detection = kwargs.get('requires_duplicate_detection', None) - self.duplicate_detection_history_time_window = kwargs.get('duplicate_detection_history_time_window', None) - self.enable_batched_operations = kwargs.get('enable_batched_operations', None) - self.status = kwargs.get('status', None) - self.support_ordering = kwargs.get('support_ordering', None) - self.auto_delete_on_idle = kwargs.get('auto_delete_on_idle', None) - self.enable_partitioning = kwargs.get('enable_partitioning', None) - self.enable_express = kwargs.get('enable_express', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic_paged.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic_paged.py deleted file mode 100644 index 1a1330b1d9d8..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic_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 SBTopicPaged(Paged): - """ - A paging container for iterating over a list of :class:`SBTopic ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SBTopic]'} - } - - def __init__(self, *args, **kwargs): - - super(SBTopicPaged, self).__init__(*args, **kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic_py3.py deleted file mode 100644 index 6a07ddcdfb91..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_topic_py3.py +++ /dev/null @@ -1,129 +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_py3 import Resource - - -class SBTopic(Resource): - """Description of topic resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :ivar size_in_bytes: Size of the topic, in bytes. - :vartype size_in_bytes: long - :ivar created_at: Exact time the message was created. - :vartype created_at: datetime - :ivar updated_at: The exact time the message was updated. - :vartype updated_at: datetime - :ivar accessed_at: Last time the message was sent, or a request was - received, for this topic. - :vartype accessed_at: datetime - :ivar subscription_count: Number of subscriptions. - :vartype subscription_count: int - :ivar count_details: Message count details - :vartype count_details: ~azure.mgmt.servicebus.models.MessageCountDetails - :param default_message_time_to_live: ISO 8601 Default message timespan to - live value. This is the duration after which the message expires, starting - from when the message is sent to Service Bus. This is the default value - used when TimeToLive is not set on a message itself. - :type default_message_time_to_live: timedelta - :param max_size_in_megabytes: Maximum size of the topic in megabytes, - which is the size of the memory allocated for the topic. Default is 1024. - :type max_size_in_megabytes: int - :param requires_duplicate_detection: Value indicating if this topic - requires duplicate detection. - :type requires_duplicate_detection: bool - :param duplicate_detection_history_time_window: ISO8601 timespan structure - that defines the duration of the duplicate detection history. The default - value is 10 minutes. - :type duplicate_detection_history_time_window: timedelta - :param enable_batched_operations: Value that indicates whether server-side - batched operations are enabled. - :type enable_batched_operations: bool - :param status: Enumerates the possible values for the status of a - messaging entity. Possible values include: 'Active', 'Disabled', - 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', - 'Renaming', 'Unknown' - :type status: str or ~azure.mgmt.servicebus.models.EntityStatus - :param support_ordering: Value that indicates whether the topic supports - ordering. - :type support_ordering: bool - :param auto_delete_on_idle: ISO 8601 timespan idle interval after which - the topic is automatically deleted. The minimum duration is 5 minutes. - :type auto_delete_on_idle: timedelta - :param enable_partitioning: Value that indicates whether the topic to be - partitioned across multiple message brokers is enabled. - :type enable_partitioning: bool - :param enable_express: Value that indicates whether Express Entities are - enabled. An express topic holds a message in memory temporarily before - writing it to persistent storage. - :type enable_express: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'size_in_bytes': {'readonly': True}, - 'created_at': {'readonly': True}, - 'updated_at': {'readonly': True}, - 'accessed_at': {'readonly': True}, - 'subscription_count': {'readonly': True}, - 'count_details': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'size_in_bytes': {'key': 'properties.sizeInBytes', 'type': 'long'}, - 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, - 'accessed_at': {'key': 'properties.accessedAt', 'type': 'iso-8601'}, - 'subscription_count': {'key': 'properties.subscriptionCount', 'type': 'int'}, - 'count_details': {'key': 'properties.countDetails', 'type': 'MessageCountDetails'}, - 'default_message_time_to_live': {'key': 'properties.defaultMessageTimeToLive', 'type': 'duration'}, - 'max_size_in_megabytes': {'key': 'properties.maxSizeInMegabytes', 'type': 'int'}, - 'requires_duplicate_detection': {'key': 'properties.requiresDuplicateDetection', 'type': 'bool'}, - 'duplicate_detection_history_time_window': {'key': 'properties.duplicateDetectionHistoryTimeWindow', 'type': 'duration'}, - 'enable_batched_operations': {'key': 'properties.enableBatchedOperations', 'type': 'bool'}, - 'status': {'key': 'properties.status', 'type': 'EntityStatus'}, - 'support_ordering': {'key': 'properties.supportOrdering', 'type': 'bool'}, - 'auto_delete_on_idle': {'key': 'properties.autoDeleteOnIdle', 'type': 'duration'}, - 'enable_partitioning': {'key': 'properties.enablePartitioning', 'type': 'bool'}, - 'enable_express': {'key': 'properties.enableExpress', 'type': 'bool'}, - } - - def __init__(self, *, default_message_time_to_live=None, max_size_in_megabytes: int=None, requires_duplicate_detection: bool=None, duplicate_detection_history_time_window=None, enable_batched_operations: bool=None, status=None, support_ordering: bool=None, auto_delete_on_idle=None, enable_partitioning: bool=None, enable_express: bool=None, **kwargs) -> None: - super(SBTopic, self).__init__(**kwargs) - self.size_in_bytes = None - self.created_at = None - self.updated_at = None - self.accessed_at = None - self.subscription_count = None - self.count_details = None - self.default_message_time_to_live = default_message_time_to_live - self.max_size_in_megabytes = max_size_in_megabytes - self.requires_duplicate_detection = requires_duplicate_detection - self.duplicate_detection_history_time_window = duplicate_detection_history_time_window - self.enable_batched_operations = enable_batched_operations - self.status = status - self.support_ordering = support_ordering - self.auto_delete_on_idle = auto_delete_on_idle - self.enable_partitioning = enable_partitioning - self.enable_express = enable_express diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sql_filter.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sql_filter.py deleted file mode 100644 index b8dd211d6bee..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sql_filter.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 SqlFilter(Model): - """Represents a filter which is a composition of an expression and an action - that is executed in the pub/sub pipeline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sql_expression: The SQL expression. e.g. MyProperty='ABC' - :type sql_expression: str - :ivar compatibility_level: This property is reserved for future use. An - integer value showing the compatibility level, currently hard-coded to 20. - Default value: 20 . - :vartype compatibility_level: int - :param requires_preprocessing: Value that indicates whether the rule - action requires preprocessing. Default value: True . - :type requires_preprocessing: bool - """ - - _validation = { - 'compatibility_level': {'readonly': True}, - } - - _attribute_map = { - 'sql_expression': {'key': 'sqlExpression', 'type': 'str'}, - 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'int'}, - 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SqlFilter, self).__init__(**kwargs) - self.sql_expression = kwargs.get('sql_expression', None) - self.compatibility_level = None - self.requires_preprocessing = kwargs.get('requires_preprocessing', True) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sql_filter_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sql_filter_py3.py deleted file mode 100644 index d6de31b2536b..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sql_filter_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 SqlFilter(Model): - """Represents a filter which is a composition of an expression and an action - that is executed in the pub/sub pipeline. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param sql_expression: The SQL expression. e.g. MyProperty='ABC' - :type sql_expression: str - :ivar compatibility_level: This property is reserved for future use. An - integer value showing the compatibility level, currently hard-coded to 20. - Default value: 20 . - :vartype compatibility_level: int - :param requires_preprocessing: Value that indicates whether the rule - action requires preprocessing. Default value: True . - :type requires_preprocessing: bool - """ - - _validation = { - 'compatibility_level': {'readonly': True}, - } - - _attribute_map = { - 'sql_expression': {'key': 'sqlExpression', 'type': 'str'}, - 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'int'}, - 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, - } - - def __init__(self, *, sql_expression: str=None, requires_preprocessing: bool=True, **kwargs) -> None: - super(SqlFilter, self).__init__(**kwargs) - self.sql_expression = sql_expression - self.compatibility_level = None - self.requires_preprocessing = requires_preprocessing diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sql_rule_action.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sql_rule_action.py deleted file mode 100644 index e6ef4d1fdb4e..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sql_rule_action.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 .action import Action - - -class SqlRuleAction(Action): - """Represents set of actions written in SQL language-based syntax that is - performed against a ServiceBus.Messaging.BrokeredMessage . - - :param sql_expression: SQL expression. e.g. MyProperty='ABC' - :type sql_expression: str - :param compatibility_level: This property is reserved for future use. An - integer value showing the compatibility level, currently hard-coded to 20. - :type compatibility_level: int - :param requires_preprocessing: Value that indicates whether the rule - action requires preprocessing. Default value: True . - :type requires_preprocessing: bool - """ - - _attribute_map = { - 'sql_expression': {'key': 'sqlExpression', 'type': 'str'}, - 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'int'}, - 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(SqlRuleAction, self).__init__(**kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sql_rule_action_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sql_rule_action_py3.py deleted file mode 100644 index d9534e0211a3..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sql_rule_action_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 .action_py3 import Action - - -class SqlRuleAction(Action): - """Represents set of actions written in SQL language-based syntax that is - performed against a ServiceBus.Messaging.BrokeredMessage . - - :param sql_expression: SQL expression. e.g. MyProperty='ABC' - :type sql_expression: str - :param compatibility_level: This property is reserved for future use. An - integer value showing the compatibility level, currently hard-coded to 20. - :type compatibility_level: int - :param requires_preprocessing: Value that indicates whether the rule - action requires preprocessing. Default value: True . - :type requires_preprocessing: bool - """ - - _attribute_map = { - 'sql_expression': {'key': 'sqlExpression', 'type': 'str'}, - 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'int'}, - 'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'}, - } - - def __init__(self, *, sql_expression: str=None, compatibility_level: int=None, requires_preprocessing: bool=True, **kwargs) -> None: - super(SqlRuleAction, self).__init__(sql_expression=sql_expression, compatibility_level=compatibility_level, requires_preprocessing=requires_preprocessing, **kwargs) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/subnet.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/subnet.py deleted file mode 100644 index 315dc091e4c3..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/subnet.py +++ /dev/null @@ -1,34 +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 Subnet(Model): - """Properties supplied for Subnet. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of Virtual Network Subnet - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Subnet, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/subnet_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/subnet_py3.py deleted file mode 100644 index ffe67f69d235..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/subnet_py3.py +++ /dev/null @@ -1,34 +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 Subnet(Model): - """Properties supplied for Subnet. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Resource ID of Virtual Network Subnet - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(Subnet, self).__init__(**kwargs) - self.id = id diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/tracked_resource.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/tracked_resource.py deleted file mode 100644 index dcd13ff085ec..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/tracked_resource.py +++ /dev/null @@ -1,53 +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 TrackedResource(Resource): - """The Resource definition. - - 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: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. The Geo-location where the resource lives - :type location: str - :param tags: Resource tags - :type tags: dict[str, 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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/tracked_resource_py3.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/tracked_resource_py3.py deleted file mode 100644 index f55c922babff..000000000000 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +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_py3 import Resource - - -class TrackedResource(Resource): - """The Resource definition. - - 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: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Required. The Geo-location where the resource lives - :type location: str - :param tags: Resource tags - :type tags: dict[str, 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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/__init__.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/__init__.py index 581b76b7eba4..f636099e0fbb 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/__init__.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/__init__.py @@ -9,17 +9,17 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .namespaces_operations import NamespacesOperations -from .disaster_recovery_configs_operations import DisasterRecoveryConfigsOperations -from .migration_configs_operations import MigrationConfigsOperations -from .queues_operations import QueuesOperations -from .topics_operations import TopicsOperations -from .subscriptions_operations import SubscriptionsOperations -from .rules_operations import RulesOperations -from .regions_operations import RegionsOperations -from .premium_messaging_regions_operations import PremiumMessagingRegionsOperations -from .event_hubs_operations import EventHubsOperations +from ._operations import Operations +from ._namespaces_operations import NamespacesOperations +from ._disaster_recovery_configs_operations import DisasterRecoveryConfigsOperations +from ._migration_configs_operations import MigrationConfigsOperations +from ._queues_operations import QueuesOperations +from ._topics_operations import TopicsOperations +from ._subscriptions_operations import SubscriptionsOperations +from ._rules_operations import RulesOperations +from ._regions_operations import RegionsOperations +from ._premium_messaging_regions_operations import PremiumMessagingRegionsOperations +from ._event_hubs_operations import EventHubsOperations __all__ = [ 'Operations', diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/disaster_recovery_configs_operations.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_disaster_recovery_configs_operations.py similarity index 98% rename from sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/disaster_recovery_configs_operations.py rename to sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_disaster_recovery_configs_operations.py index 5ee7b0bd605e..853942cf0951 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/disaster_recovery_configs_operations.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_disaster_recovery_configs_operations.py @@ -18,6 +18,8 @@ class DisasterRecoveryConfigsOperations(object): """DisasterRecoveryConfigsOperations 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. @@ -98,7 +100,6 @@ def check_name_availability_method( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResult', response) @@ -129,8 +130,7 @@ def list( :raises: :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.metadata['url'] @@ -161,6 +161,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -169,12 +174,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ArmDisasterRecoveryPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ArmDisasterRecoveryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ArmDisasterRecoveryPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs'} @@ -245,7 +248,6 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArmDisasterRecovery', response) @@ -367,7 +369,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ArmDisasterRecovery', response) @@ -514,8 +515,7 @@ def list_authorization_rules( :raises: :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_authorization_rules.metadata['url'] @@ -547,6 +547,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -555,12 +560,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SBAuthorizationRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SBAuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SBAuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules'} @@ -622,7 +625,6 @@ def get_authorization_rule( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBAuthorizationRule', response) @@ -690,7 +692,6 @@ def list_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AccessKeys', response) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/event_hubs_operations.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_event_hubs_operations.py similarity index 92% rename from sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/event_hubs_operations.py rename to sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_event_hubs_operations.py index ef36f7412fd2..0673314ecc7c 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/event_hubs_operations.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_event_hubs_operations.py @@ -18,6 +18,8 @@ class EventHubsOperations(object): """EventHubsOperations 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. @@ -56,8 +58,7 @@ def list_by_namespace( :raises: :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_namespace.metadata['url'] @@ -88,6 +89,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -96,12 +102,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.EventhubPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.EventhubPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.EventhubPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_namespace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/eventhubs'} diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/migration_configs_operations.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_migration_configs_operations.py similarity index 98% rename from sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/migration_configs_operations.py rename to sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_migration_configs_operations.py index 1fbda5b37da5..eac3fa9f3803 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/migration_configs_operations.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_migration_configs_operations.py @@ -20,6 +20,8 @@ class MigrationConfigsOperations(object): """MigrationConfigsOperations 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. @@ -60,8 +62,7 @@ def list( :raises: :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.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -100,12 +106,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MigrationConfigPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MigrationConfigPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MigrationConfigPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations'} @@ -326,7 +330,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('MigrationConfigProperties', response) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/namespaces_operations.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_namespaces_operations.py similarity index 92% rename from sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/namespaces_operations.py rename to sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_namespaces_operations.py index 07031de56219..2c26f3bba93a 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/namespaces_operations.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_namespaces_operations.py @@ -20,6 +20,8 @@ class NamespacesOperations(object): """NamespacesOperations 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. @@ -93,7 +95,6 @@ def check_name_availability_method( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityResult', response) @@ -120,8 +121,7 @@ def list( :raises: :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.metadata['url'] @@ -150,6 +150,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -158,12 +163,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SBNamespacePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SBNamespacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SBNamespacePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces'} @@ -186,8 +189,7 @@ def list_by_resource_group( :raises: :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'] @@ -217,6 +219,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -225,12 +232,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SBNamespacePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SBNamespacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SBNamespacePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces'} @@ -469,7 +474,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBNamespace', response) @@ -539,7 +543,6 @@ def update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBNamespace', response) if response.status_code == 201: @@ -572,8 +575,7 @@ def list_authorization_rules( :raises: :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_authorization_rules.metadata['url'] @@ -604,6 +606,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -612,12 +619,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SBAuthorizationRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SBAuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SBAuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules'} @@ -684,7 +689,6 @@ def create_or_update_authorization_rule( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBAuthorizationRule', response) @@ -805,7 +809,6 @@ def get_authorization_rule( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBAuthorizationRule', response) @@ -870,7 +873,6 @@ def list_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AccessKeys', response) @@ -948,7 +950,6 @@ def regenerate_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AccessKeys', response) @@ -1079,7 +1080,6 @@ def create_or_update_network_rule_set( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NetworkRuleSet', response) @@ -1141,7 +1141,6 @@ def get_network_rule_set( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NetworkRuleSet', response) @@ -1151,3 +1150,75 @@ def get_network_rule_set( return deserialized get_network_rule_set.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default'} + + def list_network_rule_sets( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): + """Gets list of NetworkRuleSet for a Namespace. + + :param resource_group_name: Name of the Resource group within the + Azure subscription. + :type resource_group_name: str + :param namespace_name: The namespace name + :type namespace_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 NetworkRuleSet + :rtype: + ~azure.mgmt.servicebus.models.NetworkRuleSetPaged[~azure.mgmt.servicebus.models.NetworkRuleSet] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_network_rule_sets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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') + + 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.NetworkRuleSetPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_network_rule_sets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets'} diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/operations.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_operations.py similarity index 90% rename from sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/operations.py rename to sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_operations.py index fb516c4ccb77..dff3a68c696d 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/operations.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_operations.py @@ -18,6 +18,8 @@ class Operations(object): """Operations 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. @@ -51,8 +53,7 @@ def list( :raises: :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.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -85,12 +91,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.ServiceBus/operations'} diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/premium_messaging_regions_operations.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_premium_messaging_regions_operations.py similarity index 90% rename from sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/premium_messaging_regions_operations.py rename to sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_premium_messaging_regions_operations.py index 553cc6384ba5..4bbdc73b6a21 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/premium_messaging_regions_operations.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_premium_messaging_regions_operations.py @@ -18,6 +18,8 @@ class PremiumMessagingRegionsOperations(object): """PremiumMessagingRegionsOperations 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. @@ -51,8 +53,7 @@ def list( :raises: :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.metadata['url'] @@ -81,6 +82,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -89,12 +95,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PremiumMessagingRegionsPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PremiumMessagingRegionsPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PremiumMessagingRegionsPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/premiumMessagingRegions'} diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/queues_operations.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_queues_operations.py similarity index 98% rename from sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/queues_operations.py rename to sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_queues_operations.py index 5e60e0854c50..45648e31cfef 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/queues_operations.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_queues_operations.py @@ -18,6 +18,8 @@ class QueuesOperations(object): """QueuesOperations 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. @@ -64,8 +66,7 @@ def list_by_namespace( :raises: :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_namespace.metadata['url'] @@ -100,6 +101,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SBQueuePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SBQueuePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SBQueuePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_namespace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues'} @@ -179,7 +183,6 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBQueue', response) @@ -300,7 +303,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBQueue', response) @@ -333,8 +335,7 @@ def list_authorization_rules( :raises: :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_authorization_rules.metadata['url'] @@ -366,6 +367,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -374,12 +380,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SBAuthorizationRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SBAuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SBAuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules'} @@ -449,7 +453,6 @@ def create_or_update_authorization_rule( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBAuthorizationRule', response) @@ -576,7 +579,6 @@ def get_authorization_rule( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBAuthorizationRule', response) @@ -644,7 +646,6 @@ def list_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AccessKeys', response) @@ -724,7 +725,6 @@ def regenerate_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AccessKeys', response) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/regions_operations.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_regions_operations.py similarity index 91% rename from sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/regions_operations.py rename to sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_regions_operations.py index f600bae07285..58ded4b89462 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/regions_operations.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_regions_operations.py @@ -18,6 +18,8 @@ class RegionsOperations(object): """RegionsOperations 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. @@ -53,8 +55,7 @@ def list_by_sku( :raises: :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_sku.metadata['url'] @@ -84,6 +85,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -92,12 +98,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PremiumMessagingRegionsPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PremiumMessagingRegionsPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PremiumMessagingRegionsPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_sku.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/sku/{sku}/regions'} diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/rules_operations.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_rules_operations.py similarity index 97% rename from sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/rules_operations.py rename to sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_rules_operations.py index 8685bfb37db5..82ebc836bc97 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/rules_operations.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_rules_operations.py @@ -18,6 +18,8 @@ class RulesOperations(object): """RulesOperations 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. @@ -68,8 +70,7 @@ def list_by_subscriptions( :raises: :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_subscriptions.metadata['url'] @@ -106,6 +107,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -114,12 +120,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscriptions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules'} @@ -190,7 +194,6 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Rule', response) @@ -323,7 +326,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Rule', response) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/subscriptions_operations.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_subscriptions_operations.py similarity index 97% rename from sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/subscriptions_operations.py rename to sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_subscriptions_operations.py index 31fcdee84b2c..d18012ffcd97 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/subscriptions_operations.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_subscriptions_operations.py @@ -18,6 +18,8 @@ class SubscriptionsOperations(object): """SubscriptionsOperations 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. @@ -66,8 +68,7 @@ def list_by_topic( :raises: :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_topic.metadata['url'] @@ -103,6 +104,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -111,12 +117,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SBSubscriptionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SBSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SBSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_topic.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions'} @@ -185,7 +189,6 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBSubscription', response) @@ -312,7 +315,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBSubscription', response) diff --git a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/topics_operations.py b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_topics_operations.py similarity index 98% rename from sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/topics_operations.py rename to sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_topics_operations.py index 4b8469557ad1..64ba671466ff 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/topics_operations.py +++ b/sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/operations/_topics_operations.py @@ -18,6 +18,8 @@ class TopicsOperations(object): """TopicsOperations 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. @@ -64,8 +66,7 @@ def list_by_namespace( :raises: :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_namespace.metadata['url'] @@ -100,6 +101,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SBTopicPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SBTopicPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SBTopicPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_namespace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics'} @@ -178,7 +182,6 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBTopic', response) @@ -299,7 +302,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBTopic', response) @@ -332,8 +334,7 @@ def list_authorization_rules( :raises: :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_authorization_rules.metadata['url'] @@ -365,6 +366,11 @@ def internal_paging(next_link=None, raw=False): # 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]: @@ -373,12 +379,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SBAuthorizationRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SBAuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SBAuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules'} @@ -448,7 +452,6 @@ def create_or_update_authorization_rule( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBAuthorizationRule', response) @@ -516,7 +519,6 @@ def get_authorization_rule( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SBAuthorizationRule', response) @@ -643,7 +645,6 @@ def list_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AccessKeys', response) @@ -723,7 +724,6 @@ def regenerate_keys( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AccessKeys', response) diff --git a/sdk/servicebus/azure-mgmt-servicebus/setup.py b/sdk/servicebus/azure-mgmt-servicebus/setup.py index 56179d34d1a1..4847297f735d 100644 --- a/sdk/servicebus/azure-mgmt-servicebus/setup.py +++ b/sdk/servicebus/azure-mgmt-servicebus/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',