# Source code for azure.mgmt.eventhub.v2018_01_01_preview.models._models_py3

    # 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 AvailableCluster(Model):
        """Pre-provisioned and readily available Event Hubs Cluster count per region.

        :param location: Location fo the Available Cluster
        :type location: str
        """

        _attribute_map = {
            'location': {'key': 'location', 'type': 'str'},
        }

        def __init__(self, *, location: str=None, **kwargs) -> None:
            super(AvailableCluster, self).__init__(**kwargs)
            self.location = location

    class AvailableClustersList(Model):
        """The response of the List Available Clusters operation.

        :param value: The count of readily available and pre-provisioned Event
         Hubs Clusters per region.
        :type value:
         list[~azure.mgmt.eventhub.v2018_01_01_preview.models.AvailableCluster]
        """

        _attribute_map = {
            'value': {'key': 'value', 'type': '[AvailableCluster]'},
        }

        def __init__(self, *, value=None, **kwargs) -> None:
            super(AvailableClustersList, self).__init__(**kwargs)
            self.value = value

    class CloudError(Model):
        """CloudError.
        """

        _attribute_map = {
        }

    class Resource(Model):
        """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
        """

        _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 TrackedResource(Resource):
        """Definition of an Azure 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]
        """

        _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(TrackedResource, self).__init__(**kwargs)
            self.location = location
            self.tags = tags

    class Cluster(TrackedResource):
        """Single Event Hubs Cluster resource in List or Get operations.

        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 the cluster SKU.
        :type sku: ~azure.mgmt.eventhub.v2018_01_01_preview.models.ClusterSku
        :ivar created: The UTC time when the Event Hubs Cluster was created.
        :vartype created: str
        :ivar updated: The UTC time when the Event Hubs Cluster was last updated.
        :vartype updated: str
        :ivar metric_id: The metric ID of the cluster resource. Provided by the
         service and not modifiable by the user.
        :vartype metric_id: str
        :ivar status: Status of the Cluster resource
        :vartype status: str
        """

        _validation = {
            'id': {'readonly': True},
            'name': {'readonly': True},
            'type': {'readonly': True},
            'created': {'readonly': True},
            'updated': {'readonly': True},
            'metric_id': {'readonly': True},
            'status': {'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': 'ClusterSku'},
            'created': {'key': 'properties.created', 'type': 'str'},
            'updated': {'key': 'properties.updated', 'type': 'str'},
            'metric_id': {'key': 'properties.metricId', 'type': 'str'},
            'status': {'key': 'properties.status', 'type': 'str'},
        }

        def __init__(self, *, location: str=None, tags=None, sku=None, **kwargs) -> None:
            super(Cluster, self).__init__(location=location, tags=tags, **kwargs)
            self.sku = sku
            self.created = None
            self.updated = None
            self.metric_id = None
            self.status = None

    class ClusterQuotaConfigurationProperties(Model):
        """Contains all settings for the cluster.

        :param settings: All possible Cluster settings - a collection of key/value
         paired settings which apply to quotas and configurations imposed on the
         cluster.
        :type settings: dict[str, str]
        """

        _attribute_map = {
            'settings': {'key': 'settings', 'type': '{str}'},
        }

        def __init__(self, *, settings=None, **kwargs) -> None:
            super(ClusterQuotaConfigurationProperties, self).__init__(**kwargs)
            self.settings = settings

    class ClusterSku(Model):
        """SKU parameters particular to a cluster instance.

        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 name: Required. Name of this SKU. Default value: "Dedicated" .
        :vartype name: str
        :param capacity: The quantity of Event Hubs Cluster Capacity Units
         contained in this cluster.
        :type capacity: int
        """

        _validation = {
            'name': {'required': True, 'constant': True},
            'capacity': {'maximum': 32, 'minimum': 1},
        }

        _attribute_map = {
            'name': {'key': 'name', 'type': 'str'},
            'capacity': {'key': 'capacity', 'type': 'int'},
        }

        name = "Dedicated"

        def __init__(self, *, capacity: int=None, **kwargs) -> None:
            super(ClusterSku, self).__init__(**kwargs)
            self.capacity = capacity

    class EHNamespace(TrackedResource):
        """Single Namespace item in List or Get 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
        :param location: Resource location
        :type location: str
        :param tags: Resource tags
        :type tags: dict[str, str]
        :param sku: Properties of sku resource
        :type sku: ~azure.mgmt.eventhub.v2018_01_01_preview.models.Sku
        :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
        :param is_auto_inflate_enabled: Value that indicates whether AutoInflate
         is enabled for eventhub namespace.
        :type is_auto_inflate_enabled: bool
        :param maximum_throughput_units: Upper limit of throughput units when
         AutoInflate is enabled, value should be within 0 to 20 throughput units. (
         '0' if AutoInflateEnabled = true)
        :type maximum_throughput_units: int
        :param kafka_enabled: Value that indicates whether Kafka is enabled for
         eventhub namespace.
        :type kafka_enabled: bool
        :param zone_redundant: Enabling this property creates a Standard Event
         Hubs Namespace in regions supported availability zones.
        :type zone_redundant: bool
        """

        _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},
            'maximum_throughput_units': {'maximum': 20, 'minimum': 0},
        }

        _attribute_map = {
            'id': {'key': 'id', 'type': 'str'},
            'name': {'key': 'name', 'type': 'str'},
            'type': {'key': 'type', 'type': 'str'},
            'location': {'key': 'location', 'type': 'str'},
            'tags': {'key': 'tags', 'type': '{str}'},
            'sku': {'key': 'sku', 'type': 'Sku'},
            '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'},
            'is_auto_inflate_enabled': {'key': 'properties.isAutoInflateEnabled', 'type': 'bool'},
            'maximum_throughput_units': {'key': 'properties.maximumThroughputUnits', 'type': 'int'},
            'kafka_enabled': {'key': 'properties.kafkaEnabled', 'type': 'bool'},
            'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'},
        }

        def __init__(self, *, location: str=None, tags=None, sku=None, is_auto_inflate_enabled: bool=None, maximum_throughput_units: int=None, kafka_enabled: bool=None, zone_redundant: bool=None, **kwargs) -> None:
            super(EHNamespace, 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
            self.is_auto_inflate_enabled = is_auto_inflate_enabled
            self.maximum_throughput_units = maximum_throughput_units
            self.kafka_enabled = kafka_enabled
            self.zone_redundant = zone_redundant

    class EHNamespaceIdContainer(Model):
        """The full ARM ID of an Event Hubs Namespace.

        :param id: id parameter
        :type id: str
        """

        _attribute_map = {
            'id': {'key': 'id', 'type': 'str'},
        }

        def __init__(self, *, id: str=None, **kwargs) -> None:
            super(EHNamespaceIdContainer, self).__init__(**kwargs)
            self.id = id

    class EHNamespaceIdListResult(Model):
        """The response of the List Namespace IDs operation.

        :param value: Result of the List Namespace IDs operation
        :type value:
         list[~azure.mgmt.eventhub.v2018_01_01_preview.models.EHNamespaceIdContainer]
        """

        _attribute_map = {
            'value': {'key': 'value', 'type': '[EHNamespaceIdContainer]'},
        }

        def __init__(self, *, value=None, **kwargs) -> None:
            super(EHNamespaceIdListResult, self).__init__(**kwargs)
            self.value = value

    class ErrorResponse(Model):
        """Error response that indicates the 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 IpFilterRule(Resource):
        """Single item in a List or Get IpFilterRules 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
        :param ip_mask: IP Mask
        :type ip_mask: str
        :param action: The IP Filter Action. Possible values include: 'Accept',
         'Reject'
        :type action: str or
         ~azure.mgmt.eventhub.v2018_01_01_preview.models.IPAction
        :param filter_name: IP Filter name
        :type filter_name: 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'},
            'ip_mask': {'key': 'properties.ipMask', 'type': 'str'},
            'action': {'key': 'properties.action', 'type': 'str'},
            'filter_name': {'key': 'properties.filterName', 'type': 'str'},
        }

        def __init__(self, *, ip_mask: str=None, action=None, filter_name: str=None, **kwargs) -> None:
            super(IpFilterRule, self).__init__(**kwargs)
            self.ip_mask = ip_mask
            self.action = action
            self.filter_name = filter_name

    class NetworkRuleSet(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
        :param default_action: Default Action for Network Rule Set. Possible
         values include: 'Allow', 'Deny'
        :type default_action: str or
         ~azure.mgmt.eventhub.v2018_01_01_preview.models.DefaultAction
        :param virtual_network_rules: List VirtualNetwork Rules
        :type virtual_network_rules:
         list[~azure.mgmt.eventhub.v2018_01_01_preview.models.NWRuleSetVirtualNetworkRules]
        :param ip_rules: List of IpRules
        :type ip_rules:
         list[~azure.mgmt.eventhub.v2018_01_01_preview.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):
        """The response from the List namespace operation.

        :param ip_mask: IP Mask
        :type ip_mask: str
        :param action: The IP Filter Action. Possible values include: 'Allow'
        :type action: str or
         ~azure.mgmt.eventhub.v2018_01_01_preview.models.NetworkRuleIPAction
        """

        _attribute_map = {
            'ip_mask': {'key': 'ipMask', 'type': 'str'},
            'action': {'key': 'action', 'type': 'str'},
        }

        def __init__(self, *, ip_mask: str=None, action=None, **kwargs) -> None:
            super(NWRuleSetIpRules, self).__init__(**kwargs)
            self.ip_mask = ip_mask
            self.action = action

    class NWRuleSetVirtualNetworkRules(Model):
        """The response from the List namespace operation.

        :param subnet: Subnet properties
        :type subnet: ~azure.mgmt.eventhub.v2018_01_01_preview.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 Event Hub 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.eventhub.v2018_01_01_preview.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.EventHub
        :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 Sku(Model):
        """SKU parameters supplied to the create namespace operation.

        All required parameters must be populated in order to send to Azure.

        :param name: Required. Name of this SKU. Possible values include: 'Basic',
         'Standard'
        :type name: str or ~azure.mgmt.eventhub.v2018_01_01_preview.models.SkuName
        :param tier: The billing tier of this particular SKU. Possible values
         include: 'Basic', 'Standard'
        :type tier: str or ~azure.mgmt.eventhub.v2018_01_01_preview.models.SkuTier
        :param capacity: The Event Hubs throughput units, value should be 0 to 20
         throughput units.
        :type capacity: int
        """

        _validation = {
            'name': {'required': True},
            'capacity': {'maximum': 20, 'minimum': 0},
        }

        _attribute_map = {
            'name': {'key': 'name', 'type': 'str'},
            'tier': {'key': 'tier', 'type': 'str'},
            'capacity': {'key': 'capacity', 'type': 'int'},
        }

        def __init__(self, *, name, tier=None, capacity: int=None, **kwargs) -> None:
            super(Sku, self).__init__(**kwargs)
            self.name = name
            self.tier = tier
            self.capacity = capacity

    class Subnet(Model):
        """Properties supplied for Subnet.

        :param id: Resource ID of Virtual Network Subnet
        :type id: str
        """

        _attribute_map = {
            'id': {'key': 'id', 'type': 'str'},
        }

        def __init__(self, *, id: str=None, **kwargs) -> None:
            super(Subnet, self).__init__(**kwargs)
            self.id = id

    class VirtualNetworkRule(Resource):
        """Single item in a List or Get VirtualNetworkRules 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
        :param virtual_network_subnet_id: ARM ID of Virtual Network Subnet
        :type virtual_network_subnet_id: 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'},
            'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'},
        }

        def __init__(self, *, virtual_network_subnet_id: str=None, **kwargs) -> None:
            super(VirtualNetworkRule, self).__init__(**kwargs)
            self.virtual_network_subnet_id = virtual_network_subnet_id