# 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 typing import Dict, List, Optional, Union

from azure.core.exceptions import HttpResponseError
import msrest.serialization

from ._hd_insight_management_client_enums import *


class Resource(msrest.serialization.Model):
    """The core properties of ARM resources.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar id: Fully qualified resource Id for the resource.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource.
    :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 Application(Resource):
    """The HDInsight cluster application.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar id: Fully qualified resource Id for the resource.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource.
    :vartype type: str
    :param etag: The ETag for the application.
    :type etag: str
    :param tags: A set of tags. The tags for the application.
    :type tags: dict[str, str]
    :param properties: The properties of the application.
    :type properties: ~azure.mgmt.hdinsight.models.ApplicationProperties
    """

    _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'},
        'etag': {'key': 'etag', 'type': 'str'},
        'tags': {'key': 'tags', 'type': '{str}'},
        'properties': {'key': 'properties', 'type': 'ApplicationProperties'},
    }

    def __init__(
        self,
        *,
        etag: Optional[str] = None,
        tags: Optional[Dict[str, str]] = None,
        properties: Optional["ApplicationProperties"] = None,
        **kwargs
    ):
        super(Application, self).__init__(**kwargs)
        self.etag = etag
        self.tags = tags
        self.properties = properties


class ApplicationGetEndpoint(msrest.serialization.Model):
    """Gets the application SSH endpoint.

    :param location: The location of the endpoint.
    :type location: str
    :param destination_port: The destination port to connect to.
    :type destination_port: int
    :param public_port: The public port to connect to.
    :type public_port: int
    """

    _attribute_map = {
        'location': {'key': 'location', 'type': 'str'},
        'destination_port': {'key': 'destinationPort', 'type': 'int'},
        'public_port': {'key': 'publicPort', 'type': 'int'},
    }

    def __init__(
        self,
        *,
        location: Optional[str] = None,
        destination_port: Optional[int] = None,
        public_port: Optional[int] = None,
        **kwargs
    ):
        super(ApplicationGetEndpoint, self).__init__(**kwargs)
        self.location = location
        self.destination_port = destination_port
        self.public_port = public_port


class ApplicationGetHttpsEndpoint(msrest.serialization.Model):
    """Gets the application HTTP endpoints.

    :param access_modes: The list of access modes for the application.
    :type access_modes: list[str]
    :param location: The location of the endpoint.
    :type location: str
    :param destination_port: The destination port to connect to.
    :type destination_port: int
    :param public_port: The public port to connect to.
    :type public_port: int
    :param sub_domain_suffix: The subdomain suffix of the application.
    :type sub_domain_suffix: str
    :param disable_gateway_auth: The value indicates whether to disable GatewayAuth.
    :type disable_gateway_auth: bool
    """

    _attribute_map = {
        'access_modes': {'key': 'accessModes', 'type': '[str]'},
        'location': {'key': 'location', 'type': 'str'},
        'destination_port': {'key': 'destinationPort', 'type': 'int'},
        'public_port': {'key': 'publicPort', 'type': 'int'},
        'sub_domain_suffix': {'key': 'subDomainSuffix', 'type': 'str'},
        'disable_gateway_auth': {'key': 'disableGatewayAuth', 'type': 'bool'},
    }

    def __init__(
        self,
        *,
        access_modes: Optional[List[str]] = None,
        location: Optional[str] = None,
        destination_port: Optional[int] = None,
        public_port: Optional[int] = None,
        sub_domain_suffix: Optional[str] = None,
        disable_gateway_auth: Optional[bool] = None,
        **kwargs
    ):
        super(ApplicationGetHttpsEndpoint, self).__init__(**kwargs)
        self.access_modes = access_modes
        self.location = location
        self.destination_port = destination_port
        self.public_port = public_port
        self.sub_domain_suffix = sub_domain_suffix
        self.disable_gateway_auth = disable_gateway_auth


class ApplicationListResult(msrest.serialization.Model):
    """Result of the request to list cluster Applications. It contains a list of operations and a URL link to get the next set of results.

    Variables are only populated by the server, and will be ignored when sending a request.

    :param value: The list of HDInsight applications installed on HDInsight cluster.
    :type value: list[~azure.mgmt.hdinsight.models.Application]
    :ivar next_link: The URL to get the next set of operation list results if there are any.
    :vartype next_link: str
    """

    _validation = {
        'next_link': {'readonly': True},
    }

    _attribute_map = {
        'value': {'key': 'value', 'type': '[Application]'},
        'next_link': {'key': 'nextLink', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        value: Optional[List["Application"]] = None,
        **kwargs
    ):
        super(ApplicationListResult, self).__init__(**kwargs)
        self.value = value
        self.next_link = None


class ApplicationProperties(msrest.serialization.Model):
    """The HDInsight cluster application GET response.

    Variables are only populated by the server, and will be ignored when sending a request.

    :param compute_profile: The list of roles in the cluster.
    :type compute_profile: ~azure.mgmt.hdinsight.models.ComputeProfile
    :param install_script_actions: The list of install script actions.
    :type install_script_actions: list[~azure.mgmt.hdinsight.models.RuntimeScriptAction]
    :param uninstall_script_actions: The list of uninstall script actions.
    :type uninstall_script_actions: list[~azure.mgmt.hdinsight.models.RuntimeScriptAction]
    :param https_endpoints: The list of application HTTPS endpoints.
    :type https_endpoints: list[~azure.mgmt.hdinsight.models.ApplicationGetHttpsEndpoint]
    :param ssh_endpoints: The list of application SSH endpoints.
    :type ssh_endpoints: list[~azure.mgmt.hdinsight.models.ApplicationGetEndpoint]
    :ivar provisioning_state: The provisioning state of the application.
    :vartype provisioning_state: str
    :param application_type: The application type.
    :type application_type: str
    :ivar application_state: The application state.
    :vartype application_state: str
    :param errors: The list of errors.
    :type errors: list[~azure.mgmt.hdinsight.models.Errors]
    :ivar created_date: The application create date time.
    :vartype created_date: str
    :ivar marketplace_identifier: The marketplace identifier.
    :vartype marketplace_identifier: str
    """

    _validation = {
        'provisioning_state': {'readonly': True},
        'application_state': {'readonly': True},
        'created_date': {'readonly': True},
        'marketplace_identifier': {'readonly': True},
    }

    _attribute_map = {
        'compute_profile': {'key': 'computeProfile', 'type': 'ComputeProfile'},
        'install_script_actions': {'key': 'installScriptActions', 'type': '[RuntimeScriptAction]'},
        'uninstall_script_actions': {'key': 'uninstallScriptActions', 'type': '[RuntimeScriptAction]'},
        'https_endpoints': {'key': 'httpsEndpoints', 'type': '[ApplicationGetHttpsEndpoint]'},
        'ssh_endpoints': {'key': 'sshEndpoints', 'type': '[ApplicationGetEndpoint]'},
        'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
        'application_type': {'key': 'applicationType', 'type': 'str'},
        'application_state': {'key': 'applicationState', 'type': 'str'},
        'errors': {'key': 'errors', 'type': '[Errors]'},
        'created_date': {'key': 'createdDate', 'type': 'str'},
        'marketplace_identifier': {'key': 'marketplaceIdentifier', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        compute_profile: Optional["ComputeProfile"] = None,
        install_script_actions: Optional[List["RuntimeScriptAction"]] = None,
        uninstall_script_actions: Optional[List["RuntimeScriptAction"]] = None,
        https_endpoints: Optional[List["ApplicationGetHttpsEndpoint"]] = None,
        ssh_endpoints: Optional[List["ApplicationGetEndpoint"]] = None,
        application_type: Optional[str] = None,
        errors: Optional[List["Errors"]] = None,
        **kwargs
    ):
        super(ApplicationProperties, self).__init__(**kwargs)
        self.compute_profile = compute_profile
        self.install_script_actions = install_script_actions
        self.uninstall_script_actions = uninstall_script_actions
        self.https_endpoints = https_endpoints
        self.ssh_endpoints = ssh_endpoints
        self.provisioning_state = None
        self.application_type = application_type
        self.application_state = None
        self.errors = errors
        self.created_date = None
        self.marketplace_identifier = None


class Autoscale(msrest.serialization.Model):
    """The autoscale request parameters.

    :param capacity: Parameters for load-based autoscale.
    :type capacity: ~azure.mgmt.hdinsight.models.AutoscaleCapacity
    :param recurrence: Parameters for schedule-based autoscale.
    :type recurrence: ~azure.mgmt.hdinsight.models.AutoscaleRecurrence
    """

    _attribute_map = {
        'capacity': {'key': 'capacity', 'type': 'AutoscaleCapacity'},
        'recurrence': {'key': 'recurrence', 'type': 'AutoscaleRecurrence'},
    }

    def __init__(
        self,
        *,
        capacity: Optional["AutoscaleCapacity"] = None,
        recurrence: Optional["AutoscaleRecurrence"] = None,
        **kwargs
    ):
        super(Autoscale, self).__init__(**kwargs)
        self.capacity = capacity
        self.recurrence = recurrence


class AutoscaleCapacity(msrest.serialization.Model):
    """The load-based autoscale request parameters.

    :param min_instance_count: The minimum instance count of the cluster.
    :type min_instance_count: int
    :param max_instance_count: The maximum instance count of the cluster.
    :type max_instance_count: int
    """

    _attribute_map = {
        'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'},
        'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'},
    }

    def __init__(
        self,
        *,
        min_instance_count: Optional[int] = None,
        max_instance_count: Optional[int] = None,
        **kwargs
    ):
        super(AutoscaleCapacity, self).__init__(**kwargs)
        self.min_instance_count = min_instance_count
        self.max_instance_count = max_instance_count


class AutoscaleConfigurationUpdateParameter(msrest.serialization.Model):
    """The autoscale configuration update parameter.

    :param autoscale: The autoscale configuration.
    :type autoscale: ~azure.mgmt.hdinsight.models.Autoscale
    """

    _attribute_map = {
        'autoscale': {'key': 'autoscale', 'type': 'Autoscale'},
    }

    def __init__(
        self,
        *,
        autoscale: Optional["Autoscale"] = None,
        **kwargs
    ):
        super(AutoscaleConfigurationUpdateParameter, self).__init__(**kwargs)
        self.autoscale = autoscale


class AutoscaleRecurrence(msrest.serialization.Model):
    """Schedule-based autoscale request parameters.

    :param time_zone: The time zone for the autoscale schedule times.
    :type time_zone: str
    :param schedule: Array of schedule-based autoscale rules.
    :type schedule: list[~azure.mgmt.hdinsight.models.AutoscaleSchedule]
    """

    _attribute_map = {
        'time_zone': {'key': 'timeZone', 'type': 'str'},
        'schedule': {'key': 'schedule', 'type': '[AutoscaleSchedule]'},
    }

    def __init__(
        self,
        *,
        time_zone: Optional[str] = None,
        schedule: Optional[List["AutoscaleSchedule"]] = None,
        **kwargs
    ):
        super(AutoscaleRecurrence, self).__init__(**kwargs)
        self.time_zone = time_zone
        self.schedule = schedule


class AutoscaleSchedule(msrest.serialization.Model):
    """Parameters for a schedule-based autoscale rule, consisting of an array of days + a time and capacity.

    :param days: Days of the week for a schedule-based autoscale rule.
    :type days: list[str or ~azure.mgmt.hdinsight.models.DaysOfWeek]
    :param time_and_capacity: Time and capacity for a schedule-based autoscale rule.
    :type time_and_capacity: ~azure.mgmt.hdinsight.models.AutoscaleTimeAndCapacity
    """

    _attribute_map = {
        'days': {'key': 'days', 'type': '[str]'},
        'time_and_capacity': {'key': 'timeAndCapacity', 'type': 'AutoscaleTimeAndCapacity'},
    }

    def __init__(
        self,
        *,
        days: Optional[List[Union[str, "DaysOfWeek"]]] = None,
        time_and_capacity: Optional["AutoscaleTimeAndCapacity"] = None,
        **kwargs
    ):
        super(AutoscaleSchedule, self).__init__(**kwargs)
        self.days = days
        self.time_and_capacity = time_and_capacity


class AutoscaleTimeAndCapacity(msrest.serialization.Model):
    """Time and capacity request parameters.

    :param time: 24-hour time in the form xx:xx.
    :type time: str
    :param min_instance_count: The minimum instance count of the cluster.
    :type min_instance_count: int
    :param max_instance_count: The maximum instance count of the cluster.
    :type max_instance_count: int
    """

    _attribute_map = {
        'time': {'key': 'time', 'type': 'str'},
        'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'},
        'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'},
    }

    def __init__(
        self,
        *,
        time: Optional[str] = None,
        min_instance_count: Optional[int] = None,
        max_instance_count: Optional[int] = None,
        **kwargs
    ):
        super(AutoscaleTimeAndCapacity, self).__init__(**kwargs)
        self.time = time
        self.min_instance_count = min_instance_count
        self.max_instance_count = max_instance_count


class BillingMeters(msrest.serialization.Model):
    """The billing meters.

    :param meter_parameter: The virtual machine sizes.
    :type meter_parameter: str
    :param meter: The HDInsight meter guid.
    :type meter: str
    :param unit: The unit of meter, VMHours or CoreHours.
    :type unit: str
    """

    _attribute_map = {
        'meter_parameter': {'key': 'meterParameter', 'type': 'str'},
        'meter': {'key': 'meter', 'type': 'str'},
        'unit': {'key': 'unit', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        meter_parameter: Optional[str] = None,
        meter: Optional[str] = None,
        unit: Optional[str] = None,
        **kwargs
    ):
        super(BillingMeters, self).__init__(**kwargs)
        self.meter_parameter = meter_parameter
        self.meter = meter
        self.unit = unit


class BillingResources(msrest.serialization.Model):
    """The billing resources.

    :param region: The region or location.
    :type region: str
    :param billing_meters: The billing meter information.
    :type billing_meters: list[~azure.mgmt.hdinsight.models.BillingMeters]
    :param disk_billing_meters: The managed disk billing information.
    :type disk_billing_meters: list[~azure.mgmt.hdinsight.models.DiskBillingMeters]
    """

    _attribute_map = {
        'region': {'key': 'region', 'type': 'str'},
        'billing_meters': {'key': 'billingMeters', 'type': '[BillingMeters]'},
        'disk_billing_meters': {'key': 'diskBillingMeters', 'type': '[DiskBillingMeters]'},
    }

    def __init__(
        self,
        *,
        region: Optional[str] = None,
        billing_meters: Optional[List["BillingMeters"]] = None,
        disk_billing_meters: Optional[List["DiskBillingMeters"]] = None,
        **kwargs
    ):
        super(BillingResources, self).__init__(**kwargs)
        self.region = region
        self.billing_meters = billing_meters
        self.disk_billing_meters = disk_billing_meters


class BillingResponseListResult(msrest.serialization.Model):
    """The response for the operation to get regional billingSpecs for a subscription.

    :param vm_sizes: The virtual machine sizes to include or exclude.
    :type vm_sizes: list[str]
    :param vm_size_filters: The virtual machine filtering mode. Effectively this can enabling or
     disabling the virtual machine sizes in a particular set.
    :type vm_size_filters: list[~azure.mgmt.hdinsight.models.VmSizeCompatibilityFilterV2]
    :param billing_resources: The billing and managed disk billing resources for a region.
    :type billing_resources: list[~azure.mgmt.hdinsight.models.BillingResources]
    """

    _attribute_map = {
        'vm_sizes': {'key': 'vmSizes', 'type': '[str]'},
        'vm_size_filters': {'key': 'vmSizeFilters', 'type': '[VmSizeCompatibilityFilterV2]'},
        'billing_resources': {'key': 'billingResources', 'type': '[BillingResources]'},
    }

    def __init__(
        self,
        *,
        vm_sizes: Optional[List[str]] = None,
        vm_size_filters: Optional[List["VmSizeCompatibilityFilterV2"]] = None,
        billing_resources: Optional[List["BillingResources"]] = None,
        **kwargs
    ):
        super(BillingResponseListResult, self).__init__(**kwargs)
        self.vm_sizes = vm_sizes
        self.vm_size_filters = vm_size_filters
        self.billing_resources = billing_resources


class CapabilitiesResult(msrest.serialization.Model):
    """The Get Capabilities operation response.

    Variables are only populated by the server, and will be ignored when sending a request.

    :param versions: The version capability.
    :type versions: dict[str, ~azure.mgmt.hdinsight.models.VersionsCapability]
    :param regions: The virtual machine size compatibility features.
    :type regions: dict[str, ~azure.mgmt.hdinsight.models.RegionsCapability]
    :param vm_sizes: The virtual machine sizes.
    :type vm_sizes: dict[str, ~azure.mgmt.hdinsight.models.VmSizesCapability]
    :param vm_size_filters: The virtual machine size compatibility filters.
    :type vm_size_filters: list[~azure.mgmt.hdinsight.models.VmSizeCompatibilityFilter]
    :param features: The capability features.
    :type features: list[str]
    :ivar quota: The quota capability.
    :vartype quota: ~azure.mgmt.hdinsight.models.QuotaCapability
    """

    _validation = {
        'quota': {'readonly': True},
    }

    _attribute_map = {
        'versions': {'key': 'versions', 'type': '{VersionsCapability}'},
        'regions': {'key': 'regions', 'type': '{RegionsCapability}'},
        'vm_sizes': {'key': 'vmSizes', 'type': '{VmSizesCapability}'},
        'vm_size_filters': {'key': 'vmSize_filters', 'type': '[VmSizeCompatibilityFilter]'},
        'features': {'key': 'features', 'type': '[str]'},
        'quota': {'key': 'quota', 'type': 'QuotaCapability'},
    }

    def __init__(
        self,
        *,
        versions: Optional[Dict[str, "VersionsCapability"]] = None,
        regions: Optional[Dict[str, "RegionsCapability"]] = None,
        vm_sizes: Optional[Dict[str, "VmSizesCapability"]] = None,
        vm_size_filters: Optional[List["VmSizeCompatibilityFilter"]] = None,
        features: Optional[List[str]] = None,
        **kwargs
    ):
        super(CapabilitiesResult, self).__init__(**kwargs)
        self.versions = versions
        self.regions = regions
        self.vm_sizes = vm_sizes
        self.vm_size_filters = vm_size_filters
        self.features = features
        self.quota = None


class ClientGroupInfo(msrest.serialization.Model):
    """The information of AAD security group.

    :param group_name: The AAD security group name.
    :type group_name: str
    :param group_id: The AAD security group id.
    :type group_id: str
    """

    _attribute_map = {
        'group_name': {'key': 'groupName', 'type': 'str'},
        'group_id': {'key': 'groupId', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        group_name: Optional[str] = None,
        group_id: Optional[str] = None,
        **kwargs
    ):
        super(ClientGroupInfo, self).__init__(**kwargs)
        self.group_name = group_name
        self.group_id = group_id


class TrackedResource(Resource):
    """The resource model definition for a ARM tracked top level resource.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar id: Fully qualified resource Id for the resource.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource.
    :vartype type: str
    :param location: The Azure Region where the resource lives.
    :type location: str
    :param tags: A set of 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: Optional[str] = None,
        tags: Optional[Dict[str, str]] = None,
        **kwargs
    ):
        super(TrackedResource, self).__init__(**kwargs)
        self.location = location
        self.tags = tags


class Cluster(TrackedResource):
    """The HDInsight cluster.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar id: Fully qualified resource Id for the resource.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource.
    :vartype type: str
    :param location: The Azure Region where the resource lives.
    :type location: str
    :param tags: A set of tags. Resource tags.
    :type tags: dict[str, str]
    :param etag: The ETag for the resource.
    :type etag: str
    :param properties: The properties of the cluster.
    :type properties: ~azure.mgmt.hdinsight.models.ClusterGetProperties
    :param identity: The identity of the cluster, if configured.
    :type identity: ~azure.mgmt.hdinsight.models.ClusterIdentity
    """

    _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}'},
        'etag': {'key': 'etag', 'type': 'str'},
        'properties': {'key': 'properties', 'type': 'ClusterGetProperties'},
        'identity': {'key': 'identity', 'type': 'ClusterIdentity'},
    }

    def __init__(
        self,
        *,
        location: Optional[str] = None,
        tags: Optional[Dict[str, str]] = None,
        etag: Optional[str] = None,
        properties: Optional["ClusterGetProperties"] = None,
        identity: Optional["ClusterIdentity"] = None,
        **kwargs
    ):
        super(Cluster, self).__init__(location=location, tags=tags, **kwargs)
        self.etag = etag
        self.properties = properties
        self.identity = identity


class ClusterConfigurations(msrest.serialization.Model):
    """The configuration object for the specified cluster.

    :param configurations: The configuration object for the specified configuration for the
     specified cluster.
    :type configurations: dict[str, object]
    """

    _attribute_map = {
        'configurations': {'key': 'configurations', 'type': '{object}'},
    }

    def __init__(
        self,
        *,
        configurations: Optional[Dict[str, object]] = None,
        **kwargs
    ):
        super(ClusterConfigurations, self).__init__(**kwargs)
        self.configurations = configurations


class ClusterCreateParametersExtended(msrest.serialization.Model):
    """The CreateCluster request parameters.

    :param location: The location of the cluster.
    :type location: str
    :param tags: A set of tags. The resource tags.
    :type tags: dict[str, str]
    :param properties: The cluster create parameters.
    :type properties: ~azure.mgmt.hdinsight.models.ClusterCreateProperties
    :param identity: The identity of the cluster, if configured.
    :type identity: ~azure.mgmt.hdinsight.models.ClusterIdentity
    """

    _attribute_map = {
        'location': {'key': 'location', 'type': 'str'},
        'tags': {'key': 'tags', 'type': '{str}'},
        'properties': {'key': 'properties', 'type': 'ClusterCreateProperties'},
        'identity': {'key': 'identity', 'type': 'ClusterIdentity'},
    }

    def __init__(
        self,
        *,
        location: Optional[str] = None,
        tags: Optional[Dict[str, str]] = None,
        properties: Optional["ClusterCreateProperties"] = None,
        identity: Optional["ClusterIdentity"] = None,
        **kwargs
    ):
        super(ClusterCreateParametersExtended, self).__init__(**kwargs)
        self.location = location
        self.tags = tags
        self.properties = properties
        self.identity = identity


class ClusterCreateProperties(msrest.serialization.Model):
    """The cluster create parameters.

    :param cluster_version: The version of the cluster.
    :type cluster_version: str
    :param os_type: The type of operating system. Possible values include: "Windows", "Linux".
    :type os_type: str or ~azure.mgmt.hdinsight.models.OSType
    :param tier: The cluster tier. Possible values include: "Standard", "Premium".
    :type tier: str or ~azure.mgmt.hdinsight.models.Tier
    :param cluster_definition: The cluster definition.
    :type cluster_definition: ~azure.mgmt.hdinsight.models.ClusterDefinition
    :param kafka_rest_properties: The cluster kafka rest proxy configuration.
    :type kafka_rest_properties: ~azure.mgmt.hdinsight.models.KafkaRestProperties
    :param security_profile: The security profile.
    :type security_profile: ~azure.mgmt.hdinsight.models.SecurityProfile
    :param compute_profile: The compute profile.
    :type compute_profile: ~azure.mgmt.hdinsight.models.ComputeProfile
    :param storage_profile: The storage profile.
    :type storage_profile: ~azure.mgmt.hdinsight.models.StorageProfile
    :param disk_encryption_properties: The disk encryption properties.
    :type disk_encryption_properties: ~azure.mgmt.hdinsight.models.DiskEncryptionProperties
    :param encryption_in_transit_properties: The encryption-in-transit properties.
    :type encryption_in_transit_properties:
     ~azure.mgmt.hdinsight.models.EncryptionInTransitProperties
    :param min_supported_tls_version: The minimal supported tls version.
    :type min_supported_tls_version: str
    :param network_properties: The network properties.
    :type network_properties: ~azure.mgmt.hdinsight.models.NetworkProperties
    """

    _attribute_map = {
        'cluster_version': {'key': 'clusterVersion', 'type': 'str'},
        'os_type': {'key': 'osType', 'type': 'str'},
        'tier': {'key': 'tier', 'type': 'str'},
        'cluster_definition': {'key': 'clusterDefinition', 'type': 'ClusterDefinition'},
        'kafka_rest_properties': {'key': 'kafkaRestProperties', 'type': 'KafkaRestProperties'},
        'security_profile': {'key': 'securityProfile', 'type': 'SecurityProfile'},
        'compute_profile': {'key': 'computeProfile', 'type': 'ComputeProfile'},
        'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'},
        'disk_encryption_properties': {'key': 'diskEncryptionProperties', 'type': 'DiskEncryptionProperties'},
        'encryption_in_transit_properties': {'key': 'encryptionInTransitProperties', 'type': 'EncryptionInTransitProperties'},
        'min_supported_tls_version': {'key': 'minSupportedTlsVersion', 'type': 'str'},
        'network_properties': {'key': 'networkProperties', 'type': 'NetworkProperties'},
    }

    def __init__(
        self,
        *,
        cluster_version: Optional[str] = None,
        os_type: Optional[Union[str, "OSType"]] = None,
        tier: Optional[Union[str, "Tier"]] = None,
        cluster_definition: Optional["ClusterDefinition"] = None,
        kafka_rest_properties: Optional["KafkaRestProperties"] = None,
        security_profile: Optional["SecurityProfile"] = None,
        compute_profile: Optional["ComputeProfile"] = None,
        storage_profile: Optional["StorageProfile"] = None,
        disk_encryption_properties: Optional["DiskEncryptionProperties"] = None,
        encryption_in_transit_properties: Optional["EncryptionInTransitProperties"] = None,
        min_supported_tls_version: Optional[str] = None,
        network_properties: Optional["NetworkProperties"] = None,
        **kwargs
    ):
        super(ClusterCreateProperties, self).__init__(**kwargs)
        self.cluster_version = cluster_version
        self.os_type = os_type
        self.tier = tier
        self.cluster_definition = cluster_definition
        self.kafka_rest_properties = kafka_rest_properties
        self.security_profile = security_profile
        self.compute_profile = compute_profile
        self.storage_profile = storage_profile
        self.disk_encryption_properties = disk_encryption_properties
        self.encryption_in_transit_properties = encryption_in_transit_properties
        self.min_supported_tls_version = min_supported_tls_version
        self.network_properties = network_properties


class ClusterDefinition(msrest.serialization.Model):
    """The cluster definition.

    :param blueprint: The link to the blueprint.
    :type blueprint: str
    :param kind: The type of cluster.
    :type kind: str
    :param component_version: The versions of different services in the cluster.
    :type component_version: dict[str, str]
    :param configurations: The cluster configurations.
    :type configurations: object
    """

    _attribute_map = {
        'blueprint': {'key': 'blueprint', 'type': 'str'},
        'kind': {'key': 'kind', 'type': 'str'},
        'component_version': {'key': 'componentVersion', 'type': '{str}'},
        'configurations': {'key': 'configurations', 'type': 'object'},
    }

    def __init__(
        self,
        *,
        blueprint: Optional[str] = None,
        kind: Optional[str] = None,
        component_version: Optional[Dict[str, str]] = None,
        configurations: Optional[object] = None,
        **kwargs
    ):
        super(ClusterDefinition, self).__init__(**kwargs)
        self.blueprint = blueprint
        self.kind = kind
        self.component_version = component_version
        self.configurations = configurations


class ClusterDiskEncryptionParameters(msrest.serialization.Model):
    """The Disk Encryption Cluster request parameters.

    :param vault_uri: Base key vault URI where the customers key is located eg.
     https://myvault.vault.azure.net.
    :type vault_uri: str
    :param key_name: Key name that is used for enabling disk encryption.
    :type key_name: str
    :param key_version: Specific key version that is used for enabling disk encryption.
    :type key_version: str
    """

    _attribute_map = {
        'vault_uri': {'key': 'vaultUri', 'type': 'str'},
        'key_name': {'key': 'keyName', 'type': 'str'},
        'key_version': {'key': 'keyVersion', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        vault_uri: Optional[str] = None,
        key_name: Optional[str] = None,
        key_version: Optional[str] = None,
        **kwargs
    ):
        super(ClusterDiskEncryptionParameters, self).__init__(**kwargs)
        self.vault_uri = vault_uri
        self.key_name = key_name
        self.key_version = key_version


class ClusterGetProperties(msrest.serialization.Model):
    """The properties of cluster.

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

    :param cluster_version: The version of the cluster.
    :type cluster_version: str
    :param os_type: The type of operating system. Possible values include: "Windows", "Linux".
    :type os_type: str or ~azure.mgmt.hdinsight.models.OSType
    :param tier: The cluster tier. Possible values include: "Standard", "Premium".
    :type tier: str or ~azure.mgmt.hdinsight.models.Tier
    :param cluster_id: The cluster id.
    :type cluster_id: str
    :param cluster_definition: Required. The cluster definition.
    :type cluster_definition: ~azure.mgmt.hdinsight.models.ClusterDefinition
    :param kafka_rest_properties: The cluster kafka rest proxy configuration.
    :type kafka_rest_properties: ~azure.mgmt.hdinsight.models.KafkaRestProperties
    :param security_profile: The security profile.
    :type security_profile: ~azure.mgmt.hdinsight.models.SecurityProfile
    :param compute_profile: The compute profile.
    :type compute_profile: ~azure.mgmt.hdinsight.models.ComputeProfile
    :param provisioning_state: The provisioning state, which only appears in the response. Possible
     values include: "InProgress", "Failed", "Succeeded", "Canceled", "Deleting".
    :type provisioning_state: str or ~azure.mgmt.hdinsight.models.HDInsightClusterProvisioningState
    :param created_date: The date on which the cluster was created.
    :type created_date: str
    :param cluster_state: The state of the cluster.
    :type cluster_state: str
    :param quota_info: The quota information.
    :type quota_info: ~azure.mgmt.hdinsight.models.QuotaInfo
    :param errors: The list of errors.
    :type errors: list[~azure.mgmt.hdinsight.models.Errors]
    :param connectivity_endpoints: The list of connectivity endpoints.
    :type connectivity_endpoints: list[~azure.mgmt.hdinsight.models.ConnectivityEndpoint]
    :param disk_encryption_properties: The disk encryption properties.
    :type disk_encryption_properties: ~azure.mgmt.hdinsight.models.DiskEncryptionProperties
    :param encryption_in_transit_properties: The encryption-in-transit properties.
    :type encryption_in_transit_properties:
     ~azure.mgmt.hdinsight.models.EncryptionInTransitProperties
    :param min_supported_tls_version: The minimal supported tls version.
    :type min_supported_tls_version: str
    :param network_properties: The network properties.
    :type network_properties: ~azure.mgmt.hdinsight.models.NetworkProperties
    """

    _validation = {
        'cluster_definition': {'required': True},
    }

    _attribute_map = {
        'cluster_version': {'key': 'clusterVersion', 'type': 'str'},
        'os_type': {'key': 'osType', 'type': 'str'},
        'tier': {'key': 'tier', 'type': 'str'},
        'cluster_id': {'key': 'clusterId', 'type': 'str'},
        'cluster_definition': {'key': 'clusterDefinition', 'type': 'ClusterDefinition'},
        'kafka_rest_properties': {'key': 'kafkaRestProperties', 'type': 'KafkaRestProperties'},
        'security_profile': {'key': 'securityProfile', 'type': 'SecurityProfile'},
        'compute_profile': {'key': 'computeProfile', 'type': 'ComputeProfile'},
        'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
        'created_date': {'key': 'createdDate', 'type': 'str'},
        'cluster_state': {'key': 'clusterState', 'type': 'str'},
        'quota_info': {'key': 'quotaInfo', 'type': 'QuotaInfo'},
        'errors': {'key': 'errors', 'type': '[Errors]'},
        'connectivity_endpoints': {'key': 'connectivityEndpoints', 'type': '[ConnectivityEndpoint]'},
        'disk_encryption_properties': {'key': 'diskEncryptionProperties', 'type': 'DiskEncryptionProperties'},
        'encryption_in_transit_properties': {'key': 'encryptionInTransitProperties', 'type': 'EncryptionInTransitProperties'},
        'min_supported_tls_version': {'key': 'minSupportedTlsVersion', 'type': 'str'},
        'network_properties': {'key': 'networkProperties', 'type': 'NetworkProperties'},
    }

    def __init__(
        self,
        *,
        cluster_definition: "ClusterDefinition",
        cluster_version: Optional[str] = None,
        os_type: Optional[Union[str, "OSType"]] = None,
        tier: Optional[Union[str, "Tier"]] = None,
        cluster_id: Optional[str] = None,
        kafka_rest_properties: Optional["KafkaRestProperties"] = None,
        security_profile: Optional["SecurityProfile"] = None,
        compute_profile: Optional["ComputeProfile"] = None,
        provisioning_state: Optional[Union[str, "HDInsightClusterProvisioningState"]] = None,
        created_date: Optional[str] = None,
        cluster_state: Optional[str] = None,
        quota_info: Optional["QuotaInfo"] = None,
        errors: Optional[List["Errors"]] = None,
        connectivity_endpoints: Optional[List["ConnectivityEndpoint"]] = None,
        disk_encryption_properties: Optional["DiskEncryptionProperties"] = None,
        encryption_in_transit_properties: Optional["EncryptionInTransitProperties"] = None,
        min_supported_tls_version: Optional[str] = None,
        network_properties: Optional["NetworkProperties"] = None,
        **kwargs
    ):
        super(ClusterGetProperties, self).__init__(**kwargs)
        self.cluster_version = cluster_version
        self.os_type = os_type
        self.tier = tier
        self.cluster_id = cluster_id
        self.cluster_definition = cluster_definition
        self.kafka_rest_properties = kafka_rest_properties
        self.security_profile = security_profile
        self.compute_profile = compute_profile
        self.provisioning_state = provisioning_state
        self.created_date = created_date
        self.cluster_state = cluster_state
        self.quota_info = quota_info
        self.errors = errors
        self.connectivity_endpoints = connectivity_endpoints
        self.disk_encryption_properties = disk_encryption_properties
        self.encryption_in_transit_properties = encryption_in_transit_properties
        self.min_supported_tls_version = min_supported_tls_version
        self.network_properties = network_properties


class ClusterIdentity(msrest.serialization.Model):
    """Identity for the cluster.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar principal_id: The principal id of cluster identity. This property will only be provided
     for a system assigned identity.
    :vartype principal_id: str
    :ivar tenant_id: The tenant id associated with the cluster. This property will only be provided
     for a system assigned identity.
    :vartype tenant_id: str
    :param type: The type of identity used for the cluster. The type 'SystemAssigned, UserAssigned'
     includes both an implicitly created identity and a set of user assigned identities. Possible
     values include: "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None".
    :type type: str or ~azure.mgmt.hdinsight.models.ResourceIdentityType
    :param user_assigned_identities: The list of user identities associated with the cluster. The
     user identity dictionary key references will be ARM resource ids in the form:
     '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    :type user_assigned_identities: dict[str,
     ~azure.mgmt.hdinsight.models.ComponentsC51Ht8SchemasClusteridentityPropertiesUserassignedidentitiesAdditionalproperties]
    """

    _validation = {
        'principal_id': {'readonly': True},
        'tenant_id': {'readonly': True},
    }

    _attribute_map = {
        'principal_id': {'key': 'principalId', 'type': 'str'},
        'tenant_id': {'key': 'tenantId', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ComponentsC51Ht8SchemasClusteridentityPropertiesUserassignedidentitiesAdditionalproperties}'},
    }

    def __init__(
        self,
        *,
        type: Optional[Union[str, "ResourceIdentityType"]] = None,
        user_assigned_identities: Optional[Dict[str, "ComponentsC51Ht8SchemasClusteridentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None,
        **kwargs
    ):
        super(ClusterIdentity, self).__init__(**kwargs)
        self.principal_id = None
        self.tenant_id = None
        self.type = type
        self.user_assigned_identities = user_assigned_identities


class ClusterListPersistedScriptActionsResult(msrest.serialization.Model):
    """The ListPersistedScriptActions operation response.

    Variables are only populated by the server, and will be ignored when sending a request.

    :param value: The list of Persisted Script Actions.
    :type value: list[~azure.mgmt.hdinsight.models.RuntimeScriptAction]
    :ivar next_link: The link (url) to the next page of results.
    :vartype next_link: str
    """

    _validation = {
        'next_link': {'readonly': True},
    }

    _attribute_map = {
        'value': {'key': 'value', 'type': '[RuntimeScriptAction]'},
        'next_link': {'key': 'nextLink', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        value: Optional[List["RuntimeScriptAction"]] = None,
        **kwargs
    ):
        super(ClusterListPersistedScriptActionsResult, self).__init__(**kwargs)
        self.value = value
        self.next_link = None


class ClusterListResult(msrest.serialization.Model):
    """The List Cluster operation response.

    Variables are only populated by the server, and will be ignored when sending a request.

    :param value: The list of Clusters.
    :type value: list[~azure.mgmt.hdinsight.models.Cluster]
    :ivar next_link: The link (url) to the next page of results.
    :vartype next_link: str
    """

    _validation = {
        'next_link': {'readonly': True},
    }

    _attribute_map = {
        'value': {'key': 'value', 'type': '[Cluster]'},
        'next_link': {'key': 'nextLink', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        value: Optional[List["Cluster"]] = None,
        **kwargs
    ):
        super(ClusterListResult, self).__init__(**kwargs)
        self.value = value
        self.next_link = None


class ClusterListRuntimeScriptActionDetailResult(msrest.serialization.Model):
    """The list runtime script action detail response.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar value:
    :vartype value: list[~azure.mgmt.hdinsight.models.RuntimeScriptActionDetail]
    :ivar next_link: The link (url) to the next page of results.
    :vartype next_link: str
    """

    _validation = {
        'value': {'readonly': True},
        'next_link': {'readonly': True},
    }

    _attribute_map = {
        'value': {'key': 'value', 'type': '[RuntimeScriptActionDetail]'},
        'next_link': {'key': 'nextLink', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(ClusterListRuntimeScriptActionDetailResult, self).__init__(**kwargs)
        self.value = None
        self.next_link = None


class ClusterListRuntimeScriptActionDetailResultAutoGenerated(msrest.serialization.Model):
    """The list runtime script action detail response.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar value: The list of persisted script action details for the cluster.
    :vartype value: list[~azure.mgmt.hdinsight.models.RuntimeScriptActionDetail]
    :ivar next_link: The link (url) to the next page of results.
    :vartype next_link: str
    """

    _validation = {
        'value': {'readonly': True},
        'next_link': {'readonly': True},
    }

    _attribute_map = {
        'value': {'key': 'value', 'type': '[RuntimeScriptActionDetail]'},
        'next_link': {'key': 'nextLink', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(ClusterListRuntimeScriptActionDetailResultAutoGenerated, self).__init__(**kwargs)
        self.value = None
        self.next_link = None


class ClusterMonitoringRequest(msrest.serialization.Model):
    """The Operations Management Suite (OMS) parameters.

    :param workspace_id: The Operations Management Suite (OMS) workspace ID.
    :type workspace_id: str
    :param primary_key: The Operations Management Suite (OMS) workspace key.
    :type primary_key: str
    """

    _attribute_map = {
        'workspace_id': {'key': 'workspaceId', 'type': 'str'},
        'primary_key': {'key': 'primaryKey', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        workspace_id: Optional[str] = None,
        primary_key: Optional[str] = None,
        **kwargs
    ):
        super(ClusterMonitoringRequest, self).__init__(**kwargs)
        self.workspace_id = workspace_id
        self.primary_key = primary_key


class ClusterMonitoringResponse(msrest.serialization.Model):
    """The Operations Management Suite (OMS) status response.

    :param cluster_monitoring_enabled: The status of the Operations Management Suite (OMS) on the
     HDInsight cluster.
    :type cluster_monitoring_enabled: bool
    :param workspace_id: The workspace ID of the Operations Management Suite (OMS) on the HDInsight
     cluster.
    :type workspace_id: str
    """

    _attribute_map = {
        'cluster_monitoring_enabled': {'key': 'clusterMonitoringEnabled', 'type': 'bool'},
        'workspace_id': {'key': 'workspaceId', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        cluster_monitoring_enabled: Optional[bool] = None,
        workspace_id: Optional[str] = None,
        **kwargs
    ):
        super(ClusterMonitoringResponse, self).__init__(**kwargs)
        self.cluster_monitoring_enabled = cluster_monitoring_enabled
        self.workspace_id = workspace_id


class ClusterPatchParameters(msrest.serialization.Model):
    """The PatchCluster request parameters.

    :param tags: A set of tags. The resource tags.
    :type tags: dict[str, str]
    """

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

    def __init__(
        self,
        *,
        tags: Optional[Dict[str, str]] = None,
        **kwargs
    ):
        super(ClusterPatchParameters, self).__init__(**kwargs)
        self.tags = tags


class ClusterResizeParameters(msrest.serialization.Model):
    """The Resize Cluster request parameters.

    :param target_instance_count: The target instance count for the operation.
    :type target_instance_count: int
    """

    _attribute_map = {
        'target_instance_count': {'key': 'targetInstanceCount', 'type': 'int'},
    }

    def __init__(
        self,
        *,
        target_instance_count: Optional[int] = None,
        **kwargs
    ):
        super(ClusterResizeParameters, self).__init__(**kwargs)
        self.target_instance_count = target_instance_count


class ComponentsC51Ht8SchemasClusteridentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model):
    """ComponentsC51Ht8SchemasClusteridentityPropertiesUserassignedidentitiesAdditionalproperties.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar principal_id: The principal id of user assigned identity.
    :vartype principal_id: str
    :ivar client_id: The client id of user assigned identity.
    :vartype client_id: str
    """

    _validation = {
        'principal_id': {'readonly': True},
        'client_id': {'readonly': True},
    }

    _attribute_map = {
        'principal_id': {'key': 'principalId', 'type': 'str'},
        'client_id': {'key': 'clientId', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(ComponentsC51Ht8SchemasClusteridentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs)
        self.principal_id = None
        self.client_id = None


class ComputeProfile(msrest.serialization.Model):
    """Describes the compute profile.

    :param roles: The list of roles in the cluster.
    :type roles: list[~azure.mgmt.hdinsight.models.Role]
    """

    _attribute_map = {
        'roles': {'key': 'roles', 'type': '[Role]'},
    }

    def __init__(
        self,
        *,
        roles: Optional[List["Role"]] = None,
        **kwargs
    ):
        super(ComputeProfile, self).__init__(**kwargs)
        self.roles = roles


class ConnectivityEndpoint(msrest.serialization.Model):
    """The connectivity properties.

    :param name: The name of the endpoint.
    :type name: str
    :param protocol: The protocol of the endpoint.
    :type protocol: str
    :param location: The location of the endpoint.
    :type location: str
    :param port: The port to connect to.
    :type port: int
    """

    _attribute_map = {
        'name': {'key': 'name', 'type': 'str'},
        'protocol': {'key': 'protocol', 'type': 'str'},
        'location': {'key': 'location', 'type': 'str'},
        'port': {'key': 'port', 'type': 'int'},
    }

    def __init__(
        self,
        *,
        name: Optional[str] = None,
        protocol: Optional[str] = None,
        location: Optional[str] = None,
        port: Optional[int] = None,
        **kwargs
    ):
        super(ConnectivityEndpoint, self).__init__(**kwargs)
        self.name = name
        self.protocol = protocol
        self.location = location
        self.port = port


class DataDisksGroups(msrest.serialization.Model):
    """The data disks groups for the role.

    Variables are only populated by the server, and will be ignored when sending a request.

    :param disks_per_node: The number of disks per node.
    :type disks_per_node: int
    :ivar storage_account_type: ReadOnly. The storage account type. Do not set this value.
    :vartype storage_account_type: str
    :ivar disk_size_gb: ReadOnly. The DiskSize in GB. Do not set this value.
    :vartype disk_size_gb: int
    """

    _validation = {
        'storage_account_type': {'readonly': True},
        'disk_size_gb': {'readonly': True},
    }

    _attribute_map = {
        'disks_per_node': {'key': 'disksPerNode', 'type': 'int'},
        'storage_account_type': {'key': 'storageAccountType', 'type': 'str'},
        'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
    }

    def __init__(
        self,
        *,
        disks_per_node: Optional[int] = None,
        **kwargs
    ):
        super(DataDisksGroups, self).__init__(**kwargs)
        self.disks_per_node = disks_per_node
        self.storage_account_type = None
        self.disk_size_gb = None


class DiskBillingMeters(msrest.serialization.Model):
    """The disk billing meters.

    :param disk_rp_meter: The managed disk meter guid.
    :type disk_rp_meter: str
    :param sku: The managed disk billing sku, P30 or S30.
    :type sku: str
    :param tier: The managed disk billing tier, Standard or Premium. Possible values include:
     "Standard", "Premium".
    :type tier: str or ~azure.mgmt.hdinsight.models.Tier
    """

    _attribute_map = {
        'disk_rp_meter': {'key': 'diskRpMeter', 'type': 'str'},
        'sku': {'key': 'sku', 'type': 'str'},
        'tier': {'key': 'tier', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        disk_rp_meter: Optional[str] = None,
        sku: Optional[str] = None,
        tier: Optional[Union[str, "Tier"]] = None,
        **kwargs
    ):
        super(DiskBillingMeters, self).__init__(**kwargs)
        self.disk_rp_meter = disk_rp_meter
        self.sku = sku
        self.tier = tier


class DiskEncryptionProperties(msrest.serialization.Model):
    """The disk encryption properties.

    :param vault_uri: Base key vault URI where the customers key is located eg.
     https://myvault.vault.azure.net.
    :type vault_uri: str
    :param key_name: Key name that is used for enabling disk encryption.
    :type key_name: str
    :param key_version: Specific key version that is used for enabling disk encryption.
    :type key_version: str
    :param encryption_algorithm: Algorithm identifier for encryption, default RSA-OAEP. Possible
     values include: "RSA-OAEP", "RSA-OAEP-256", "RSA1_5".
    :type encryption_algorithm: str or ~azure.mgmt.hdinsight.models.JsonWebKeyEncryptionAlgorithm
    :param msi_resource_id: Resource ID of Managed Identity that is used to access the key vault.
    :type msi_resource_id: str
    :param encryption_at_host: Indicates whether or not resource disk encryption is enabled.
    :type encryption_at_host: bool
    """

    _attribute_map = {
        'vault_uri': {'key': 'vaultUri', 'type': 'str'},
        'key_name': {'key': 'keyName', 'type': 'str'},
        'key_version': {'key': 'keyVersion', 'type': 'str'},
        'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'},
        'msi_resource_id': {'key': 'msiResourceId', 'type': 'str'},
        'encryption_at_host': {'key': 'encryptionAtHost', 'type': 'bool'},
    }

    def __init__(
        self,
        *,
        vault_uri: Optional[str] = None,
        key_name: Optional[str] = None,
        key_version: Optional[str] = None,
        encryption_algorithm: Optional[Union[str, "JsonWebKeyEncryptionAlgorithm"]] = None,
        msi_resource_id: Optional[str] = None,
        encryption_at_host: Optional[bool] = False,
        **kwargs
    ):
        super(DiskEncryptionProperties, self).__init__(**kwargs)
        self.vault_uri = vault_uri
        self.key_name = key_name
        self.key_version = key_version
        self.encryption_algorithm = encryption_algorithm
        self.msi_resource_id = msi_resource_id
        self.encryption_at_host = encryption_at_host


class EncryptionInTransitProperties(msrest.serialization.Model):
    """The encryption-in-transit properties.

    :param is_encryption_in_transit_enabled: Indicates whether or not inter cluster node
     communication is encrypted in transit.
    :type is_encryption_in_transit_enabled: bool
    """

    _attribute_map = {
        'is_encryption_in_transit_enabled': {'key': 'isEncryptionInTransitEnabled', 'type': 'bool'},
    }

    def __init__(
        self,
        *,
        is_encryption_in_transit_enabled: Optional[bool] = False,
        **kwargs
    ):
        super(EncryptionInTransitProperties, self).__init__(**kwargs)
        self.is_encryption_in_transit_enabled = is_encryption_in_transit_enabled


class ErrorResponse(msrest.serialization.Model):
    """Describes the format of Error response.

    :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: Optional[str] = None,
        message: Optional[str] = None,
        **kwargs
    ):
        super(ErrorResponse, self).__init__(**kwargs)
        self.code = code
        self.message = message


class Errors(msrest.serialization.Model):
    """The error message associated with the cluster creation.

    :param code: The error code.
    :type code: str
    :param message: The error message.
    :type message: str
    """

    _attribute_map = {
        'code': {'key': 'code', 'type': 'str'},
        'message': {'key': 'message', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        code: Optional[str] = None,
        message: Optional[str] = None,
        **kwargs
    ):
        super(Errors, self).__init__(**kwargs)
        self.code = code
        self.message = message


class ExecuteScriptActionParameters(msrest.serialization.Model):
    """The parameters for the script actions to execute on a running cluster.

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

    :param script_actions: The list of run time script actions.
    :type script_actions: list[~azure.mgmt.hdinsight.models.RuntimeScriptAction]
    :param persist_on_success: Required. Gets or sets if the scripts needs to be persisted.
    :type persist_on_success: bool
    """

    _validation = {
        'persist_on_success': {'required': True},
    }

    _attribute_map = {
        'script_actions': {'key': 'scriptActions', 'type': '[RuntimeScriptAction]'},
        'persist_on_success': {'key': 'persistOnSuccess', 'type': 'bool'},
    }

    def __init__(
        self,
        *,
        persist_on_success: bool,
        script_actions: Optional[List["RuntimeScriptAction"]] = None,
        **kwargs
    ):
        super(ExecuteScriptActionParameters, self).__init__(**kwargs)
        self.script_actions = script_actions
        self.persist_on_success = persist_on_success


class Extension(msrest.serialization.Model):
    """Cluster monitoring extensions.

    :param workspace_id: The workspace ID for the cluster monitoring extension.
    :type workspace_id: str
    :param primary_key: The certificate for the cluster monitoring extensions.
    :type primary_key: str
    """

    _attribute_map = {
        'workspace_id': {'key': 'workspaceId', 'type': 'str'},
        'primary_key': {'key': 'primaryKey', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        workspace_id: Optional[str] = None,
        primary_key: Optional[str] = None,
        **kwargs
    ):
        super(Extension, self).__init__(**kwargs)
        self.workspace_id = workspace_id
        self.primary_key = primary_key


class GatewaySettings(msrest.serialization.Model):
    """Gateway settings.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar is_credential_enabled: Indicates whether or not the gateway settings based authorization
     is enabled.
    :vartype is_credential_enabled: str
    :ivar user_name: The gateway settings user name.
    :vartype user_name: str
    :ivar password: The gateway settings user password.
    :vartype password: str
    """

    _validation = {
        'is_credential_enabled': {'readonly': True},
        'user_name': {'readonly': True},
        'password': {'readonly': True},
    }

    _attribute_map = {
        'is_credential_enabled': {'key': 'restAuthCredential\\.isEnabled', 'type': 'str'},
        'user_name': {'key': 'restAuthCredential\\.username', 'type': 'str'},
        'password': {'key': 'restAuthCredential\\.password', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(GatewaySettings, self).__init__(**kwargs)
        self.is_credential_enabled = None
        self.user_name = None
        self.password = None


class HardwareProfile(msrest.serialization.Model):
    """The hardware profile.

    :param vm_size: The size of the VM.
    :type vm_size: str
    """

    _attribute_map = {
        'vm_size': {'key': 'vmSize', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        vm_size: Optional[str] = None,
        **kwargs
    ):
        super(HardwareProfile, self).__init__(**kwargs)
        self.vm_size = vm_size


class HostInfo(msrest.serialization.Model):
    """The cluster host information.

    :param name: The host name.
    :type name: str
    """

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

    def __init__(
        self,
        *,
        name: Optional[str] = None,
        **kwargs
    ):
        super(HostInfo, self).__init__(**kwargs)
        self.name = name


class KafkaRestProperties(msrest.serialization.Model):
    """The kafka rest proxy configuration which contains AAD security group information.

    :param client_group_info: The information of AAD security group.
    :type client_group_info: ~azure.mgmt.hdinsight.models.ClientGroupInfo
    """

    _attribute_map = {
        'client_group_info': {'key': 'clientGroupInfo', 'type': 'ClientGroupInfo'},
    }

    def __init__(
        self,
        *,
        client_group_info: Optional["ClientGroupInfo"] = None,
        **kwargs
    ):
        super(KafkaRestProperties, self).__init__(**kwargs)
        self.client_group_info = client_group_info


class LinuxOperatingSystemProfile(msrest.serialization.Model):
    """The ssh username, password, and ssh public key.

    :param username: The username.
    :type username: str
    :param password: The password.
    :type password: str
    :param ssh_profile: The SSH profile.
    :type ssh_profile: ~azure.mgmt.hdinsight.models.SshProfile
    """

    _attribute_map = {
        'username': {'key': 'username', 'type': 'str'},
        'password': {'key': 'password', 'type': 'str'},
        'ssh_profile': {'key': 'sshProfile', 'type': 'SshProfile'},
    }

    def __init__(
        self,
        *,
        username: Optional[str] = None,
        password: Optional[str] = None,
        ssh_profile: Optional["SshProfile"] = None,
        **kwargs
    ):
        super(LinuxOperatingSystemProfile, self).__init__(**kwargs)
        self.username = username
        self.password = password
        self.ssh_profile = ssh_profile


class LocalizedName(msrest.serialization.Model):
    """The details about the localizable name of a type of usage.

    :param value: The name of the used resource.
    :type value: str
    :param localized_value: The localized name of the used resource.
    :type localized_value: str
    """

    _attribute_map = {
        'value': {'key': 'value', 'type': 'str'},
        'localized_value': {'key': 'localizedValue', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        value: Optional[str] = None,
        localized_value: Optional[str] = None,
        **kwargs
    ):
        super(LocalizedName, self).__init__(**kwargs)
        self.value = value
        self.localized_value = localized_value


class NetworkProperties(msrest.serialization.Model):
    """The network properties.

    :param resource_provider_connection: The direction for the resource provider connection.
     Possible values include: "Inbound", "Outbound".
    :type resource_provider_connection: str or
     ~azure.mgmt.hdinsight.models.ResourceProviderConnection
    :param private_link: Indicates whether or not private link is enabled. Possible values include:
     "Disabled", "Enabled".
    :type private_link: str or ~azure.mgmt.hdinsight.models.PrivateLink
    """

    _attribute_map = {
        'resource_provider_connection': {'key': 'resourceProviderConnection', 'type': 'str'},
        'private_link': {'key': 'privateLink', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        resource_provider_connection: Optional[Union[str, "ResourceProviderConnection"]] = None,
        private_link: Optional[Union[str, "PrivateLink"]] = None,
        **kwargs
    ):
        super(NetworkProperties, self).__init__(**kwargs)
        self.resource_provider_connection = resource_provider_connection
        self.private_link = private_link


class Operation(msrest.serialization.Model):
    """The HDInsight REST API operation.

    :param name: The operation name: {provider}/{resource}/{operation}.
    :type name: str
    :param display: The object that represents the operation.
    :type display: ~azure.mgmt.hdinsight.models.OperationDisplay
    """

    _attribute_map = {
        'name': {'key': 'name', 'type': 'str'},
        'display': {'key': 'display', 'type': 'OperationDisplay'},
    }

    def __init__(
        self,
        *,
        name: Optional[str] = None,
        display: Optional["OperationDisplay"] = None,
        **kwargs
    ):
        super(Operation, self).__init__(**kwargs)
        self.name = name
        self.display = display


class OperationDisplay(msrest.serialization.Model):
    """The object that represents the operation.

    :param provider: The service provider: Microsoft.HDInsight.
    :type provider: str
    :param resource: The resource on which the operation is performed: Cluster, Applications, etc.
    :type resource: str
    :param operation: The operation type: read, write, delete, etc.
    :type operation: str
    """

    _attribute_map = {
        'provider': {'key': 'provider', 'type': 'str'},
        'resource': {'key': 'resource', 'type': 'str'},
        'operation': {'key': 'operation', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        provider: Optional[str] = None,
        resource: Optional[str] = None,
        operation: Optional[str] = None,
        **kwargs
    ):
        super(OperationDisplay, self).__init__(**kwargs)
        self.provider = provider
        self.resource = resource
        self.operation = operation


class OperationListResult(msrest.serialization.Model):
    """Result of the request to list HDInsight operations. It contains a list of operations and a URL link to get the next set of results.

    :param value: The list of HDInsight operations supported by the HDInsight resource provider.
    :type value: list[~azure.mgmt.hdinsight.models.Operation]
    :param next_link: The URL to get the next set of operation list results if there are any.
    :type next_link: str
    """

    _attribute_map = {
        'value': {'key': 'value', 'type': '[Operation]'},
        'next_link': {'key': 'nextLink', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        value: Optional[List["Operation"]] = None,
        next_link: Optional[str] = None,
        **kwargs
    ):
        super(OperationListResult, self).__init__(**kwargs)
        self.value = value
        self.next_link = next_link


class OperationResource(msrest.serialization.Model):
    """The azure async operation response.

    :param status: The async operation state. Possible values include: "InProgress", "Succeeded",
     "Failed".
    :type status: str or ~azure.mgmt.hdinsight.models.AsyncOperationState
    :param error: The operation error information.
    :type error: ~azure.mgmt.hdinsight.models.Errors
    """

    _attribute_map = {
        'status': {'key': 'status', 'type': 'str'},
        'error': {'key': 'error', 'type': 'Errors'},
    }

    def __init__(
        self,
        *,
        status: Optional[Union[str, "AsyncOperationState"]] = None,
        error: Optional["Errors"] = None,
        **kwargs
    ):
        super(OperationResource, self).__init__(**kwargs)
        self.status = status
        self.error = error


class OsProfile(msrest.serialization.Model):
    """The Linux operation systems profile.

    :param linux_operating_system_profile: The Linux OS profile.
    :type linux_operating_system_profile: ~azure.mgmt.hdinsight.models.LinuxOperatingSystemProfile
    """

    _attribute_map = {
        'linux_operating_system_profile': {'key': 'linuxOperatingSystemProfile', 'type': 'LinuxOperatingSystemProfile'},
    }

    def __init__(
        self,
        *,
        linux_operating_system_profile: Optional["LinuxOperatingSystemProfile"] = None,
        **kwargs
    ):
        super(OsProfile, self).__init__(**kwargs)
        self.linux_operating_system_profile = linux_operating_system_profile


class ProxyResource(Resource):
    """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar id: Fully qualified resource Id for the resource.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource.
    :vartype type: str
    """

    _validation = {
        'id': {'readonly': True},
        'name': {'readonly': True},
        'type': {'readonly': True},
    }

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

    def __init__(
        self,
        **kwargs
    ):
        super(ProxyResource, self).__init__(**kwargs)


class QuotaCapability(msrest.serialization.Model):
    """The regional quota capability.

    :param cores_used: The number of cores used in the subscription.
    :type cores_used: long
    :param max_cores_allowed: The number of cores that the subscription allowed.
    :type max_cores_allowed: long
    :param regional_quotas: The list of region quota capabilities.
    :type regional_quotas: list[~azure.mgmt.hdinsight.models.RegionalQuotaCapability]
    """

    _attribute_map = {
        'cores_used': {'key': 'cores_used', 'type': 'long'},
        'max_cores_allowed': {'key': 'max_cores_allowed', 'type': 'long'},
        'regional_quotas': {'key': 'regionalQuotas', 'type': '[RegionalQuotaCapability]'},
    }

    def __init__(
        self,
        *,
        cores_used: Optional[int] = None,
        max_cores_allowed: Optional[int] = None,
        regional_quotas: Optional[List["RegionalQuotaCapability"]] = None,
        **kwargs
    ):
        super(QuotaCapability, self).__init__(**kwargs)
        self.cores_used = cores_used
        self.max_cores_allowed = max_cores_allowed
        self.regional_quotas = regional_quotas


class QuotaInfo(msrest.serialization.Model):
    """The quota properties for the cluster.

    :param cores_used: The cores used by the cluster.
    :type cores_used: int
    """

    _attribute_map = {
        'cores_used': {'key': 'coresUsed', 'type': 'int'},
    }

    def __init__(
        self,
        *,
        cores_used: Optional[int] = None,
        **kwargs
    ):
        super(QuotaInfo, self).__init__(**kwargs)
        self.cores_used = cores_used


class RegionalQuotaCapability(msrest.serialization.Model):
    """The regional quota capacity.

    :param region_name: The region name.
    :type region_name: str
    :param cores_used: The number of cores used in the region.
    :type cores_used: long
    :param cores_available: The number of cores available in the region.
    :type cores_available: long
    """

    _attribute_map = {
        'region_name': {'key': 'region_name', 'type': 'str'},
        'cores_used': {'key': 'cores_used', 'type': 'long'},
        'cores_available': {'key': 'cores_available', 'type': 'long'},
    }

    def __init__(
        self,
        *,
        region_name: Optional[str] = None,
        cores_used: Optional[int] = None,
        cores_available: Optional[int] = None,
        **kwargs
    ):
        super(RegionalQuotaCapability, self).__init__(**kwargs)
        self.region_name = region_name
        self.cores_used = cores_used
        self.cores_available = cores_available


class RegionsCapability(msrest.serialization.Model):
    """The regions capability.

    :param available: The list of region capabilities.
    :type available: list[str]
    """

    _attribute_map = {
        'available': {'key': 'available', 'type': '[str]'},
    }

    def __init__(
        self,
        *,
        available: Optional[List[str]] = None,
        **kwargs
    ):
        super(RegionsCapability, self).__init__(**kwargs)
        self.available = available


class Role(msrest.serialization.Model):
    """Describes a role on the cluster.

    :param name: The name of the role.
    :type name: str
    :param min_instance_count: The minimum instance count of the cluster.
    :type min_instance_count: int
    :param target_instance_count: The instance count of the cluster.
    :type target_instance_count: int
    :param autoscale_configuration: The autoscale configurations.
    :type autoscale_configuration: ~azure.mgmt.hdinsight.models.Autoscale
    :param hardware_profile: The hardware profile.
    :type hardware_profile: ~azure.mgmt.hdinsight.models.HardwareProfile
    :param os_profile: The operating system profile.
    :type os_profile: ~azure.mgmt.hdinsight.models.OsProfile
    :param virtual_network_profile: The virtual network profile.
    :type virtual_network_profile: ~azure.mgmt.hdinsight.models.VirtualNetworkProfile
    :param data_disks_groups: The data disks groups for the role.
    :type data_disks_groups: list[~azure.mgmt.hdinsight.models.DataDisksGroups]
    :param script_actions: The list of script actions on the role.
    :type script_actions: list[~azure.mgmt.hdinsight.models.ScriptAction]
    """

    _attribute_map = {
        'name': {'key': 'name', 'type': 'str'},
        'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'},
        'target_instance_count': {'key': 'targetInstanceCount', 'type': 'int'},
        'autoscale_configuration': {'key': 'autoscale', 'type': 'Autoscale'},
        'hardware_profile': {'key': 'hardwareProfile', 'type': 'HardwareProfile'},
        'os_profile': {'key': 'osProfile', 'type': 'OsProfile'},
        'virtual_network_profile': {'key': 'virtualNetworkProfile', 'type': 'VirtualNetworkProfile'},
        'data_disks_groups': {'key': 'dataDisksGroups', 'type': '[DataDisksGroups]'},
        'script_actions': {'key': 'scriptActions', 'type': '[ScriptAction]'},
    }

    def __init__(
        self,
        *,
        name: Optional[str] = None,
        min_instance_count: Optional[int] = None,
        target_instance_count: Optional[int] = None,
        autoscale_configuration: Optional["Autoscale"] = None,
        hardware_profile: Optional["HardwareProfile"] = None,
        os_profile: Optional["OsProfile"] = None,
        virtual_network_profile: Optional["VirtualNetworkProfile"] = None,
        data_disks_groups: Optional[List["DataDisksGroups"]] = None,
        script_actions: Optional[List["ScriptAction"]] = None,
        **kwargs
    ):
        super(Role, self).__init__(**kwargs)
        self.name = name
        self.min_instance_count = min_instance_count
        self.target_instance_count = target_instance_count
        self.autoscale_configuration = autoscale_configuration
        self.hardware_profile = hardware_profile
        self.os_profile = os_profile
        self.virtual_network_profile = virtual_network_profile
        self.data_disks_groups = data_disks_groups
        self.script_actions = script_actions


class RuntimeScriptAction(msrest.serialization.Model):
    """Describes a script action on a running cluster.

    Variables are only populated by the server, and will be ignored when sending a request.

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

    :param name: Required. The name of the script action.
    :type name: str
    :param uri: Required. The URI to the script.
    :type uri: str
    :param parameters: The parameters for the script.
    :type parameters: str
    :param roles: Required. The list of roles where script will be executed.
    :type roles: list[str]
    :ivar application_name: The application name of the script action, if any.
    :vartype application_name: str
    """

    _validation = {
        'name': {'required': True},
        'uri': {'required': True},
        'roles': {'required': True},
        'application_name': {'readonly': True},
    }

    _attribute_map = {
        'name': {'key': 'name', 'type': 'str'},
        'uri': {'key': 'uri', 'type': 'str'},
        'parameters': {'key': 'parameters', 'type': 'str'},
        'roles': {'key': 'roles', 'type': '[str]'},
        'application_name': {'key': 'applicationName', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        name: str,
        uri: str,
        roles: List[str],
        parameters: Optional[str] = None,
        **kwargs
    ):
        super(RuntimeScriptAction, self).__init__(**kwargs)
        self.name = name
        self.uri = uri
        self.parameters = parameters
        self.roles = roles
        self.application_name = None


class RuntimeScriptActionDetail(RuntimeScriptAction):
    """The execution details of a script action.

    Variables are only populated by the server, and will be ignored when sending a request.

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

    :param name: Required. The name of the script action.
    :type name: str
    :param uri: Required. The URI to the script.
    :type uri: str
    :param parameters: The parameters for the script.
    :type parameters: str
    :param roles: Required. The list of roles where script will be executed.
    :type roles: list[str]
    :ivar application_name: The application name of the script action, if any.
    :vartype application_name: str
    :ivar script_execution_id: The execution id of the script action.
    :vartype script_execution_id: long
    :ivar start_time: The start time of script action execution.
    :vartype start_time: str
    :ivar end_time: The end time of script action execution.
    :vartype end_time: str
    :ivar status: The current execution status of the script action.
    :vartype status: str
    :ivar operation: The reason why the script action was executed.
    :vartype operation: str
    :ivar execution_summary: The summary of script action execution result.
    :vartype execution_summary: list[~azure.mgmt.hdinsight.models.ScriptActionExecutionSummary]
    :ivar debug_information: The script action execution debug information.
    :vartype debug_information: str
    """

    _validation = {
        'name': {'required': True},
        'uri': {'required': True},
        'roles': {'required': True},
        'application_name': {'readonly': True},
        'script_execution_id': {'readonly': True},
        'start_time': {'readonly': True},
        'end_time': {'readonly': True},
        'status': {'readonly': True},
        'operation': {'readonly': True},
        'execution_summary': {'readonly': True},
        'debug_information': {'readonly': True},
    }

    _attribute_map = {
        'name': {'key': 'name', 'type': 'str'},
        'uri': {'key': 'uri', 'type': 'str'},
        'parameters': {'key': 'parameters', 'type': 'str'},
        'roles': {'key': 'roles', 'type': '[str]'},
        'application_name': {'key': 'applicationName', 'type': 'str'},
        'script_execution_id': {'key': 'scriptExecutionId', 'type': 'long'},
        'start_time': {'key': 'startTime', 'type': 'str'},
        'end_time': {'key': 'endTime', 'type': 'str'},
        'status': {'key': 'status', 'type': 'str'},
        'operation': {'key': 'operation', 'type': 'str'},
        'execution_summary': {'key': 'executionSummary', 'type': '[ScriptActionExecutionSummary]'},
        'debug_information': {'key': 'debugInformation', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        name: str,
        uri: str,
        roles: List[str],
        parameters: Optional[str] = None,
        **kwargs
    ):
        super(RuntimeScriptActionDetail, self).__init__(name=name, uri=uri, parameters=parameters, roles=roles, **kwargs)
        self.script_execution_id = None
        self.start_time = None
        self.end_time = None
        self.status = None
        self.operation = None
        self.execution_summary = None
        self.debug_information = None


class ScriptAction(msrest.serialization.Model):
    """Describes a script action on role on the cluster.

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

    :param name: Required. The name of the script action.
    :type name: str
    :param uri: Required. The URI to the script.
    :type uri: str
    :param parameters: Required. The parameters for the script provided.
    :type parameters: str
    """

    _validation = {
        'name': {'required': True},
        'uri': {'required': True},
        'parameters': {'required': True},
    }

    _attribute_map = {
        'name': {'key': 'name', 'type': 'str'},
        'uri': {'key': 'uri', 'type': 'str'},
        'parameters': {'key': 'parameters', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        name: str,
        uri: str,
        parameters: str,
        **kwargs
    ):
        super(ScriptAction, self).__init__(**kwargs)
        self.name = name
        self.uri = uri
        self.parameters = parameters


class ScriptActionExecutionHistoryList(msrest.serialization.Model):
    """The list script execution history response.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar value: The list of persisted script action details for the cluster.
    :vartype value: list[~azure.mgmt.hdinsight.models.RuntimeScriptActionDetail]
    :ivar next_link: The link (url) to the next page of results.
    :vartype next_link: str
    """

    _validation = {
        'value': {'readonly': True},
        'next_link': {'readonly': True},
    }

    _attribute_map = {
        'value': {'key': 'value', 'type': '[RuntimeScriptActionDetail]'},
        'next_link': {'key': 'nextLink', 'type': 'str'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(ScriptActionExecutionHistoryList, self).__init__(**kwargs)
        self.value = None
        self.next_link = None


class ScriptActionExecutionSummary(msrest.serialization.Model):
    """The execution summary of a script action.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar status: The status of script action execution.
    :vartype status: str
    :ivar instance_count: The instance count for a given script action execution status.
    :vartype instance_count: int
    """

    _validation = {
        'status': {'readonly': True},
        'instance_count': {'readonly': True},
    }

    _attribute_map = {
        'status': {'key': 'status', 'type': 'str'},
        'instance_count': {'key': 'instanceCount', 'type': 'int'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(ScriptActionExecutionSummary, self).__init__(**kwargs)
        self.status = None
        self.instance_count = None


class ScriptActionPersistedGetResponseSpec(msrest.serialization.Model):
    """The persisted script action for cluster.

    :param name: The name of script action.
    :type name: str
    :param uri: The URI to the script.
    :type uri: str
    :param parameters: The parameters for the script provided.
    :type parameters: str
    :param roles: The list of roles where script will be executed.
    :type roles: list[str]
    :param application_name: The application name for the script action.
    :type application_name: str
    """

    _attribute_map = {
        'name': {'key': 'name', 'type': 'str'},
        'uri': {'key': 'uri', 'type': 'str'},
        'parameters': {'key': 'parameters', 'type': 'str'},
        'roles': {'key': 'roles', 'type': '[str]'},
        'application_name': {'key': 'applicationName', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        name: Optional[str] = None,
        uri: Optional[str] = None,
        parameters: Optional[str] = None,
        roles: Optional[List[str]] = None,
        application_name: Optional[str] = None,
        **kwargs
    ):
        super(ScriptActionPersistedGetResponseSpec, self).__init__(**kwargs)
        self.name = name
        self.uri = uri
        self.parameters = parameters
        self.roles = roles
        self.application_name = application_name


class ScriptActionsList(msrest.serialization.Model):
    """The persisted script action for the cluster.

    Variables are only populated by the server, and will be ignored when sending a request.

    :param value: The list of persisted script action details for the cluster.
    :type value: list[~azure.mgmt.hdinsight.models.RuntimeScriptActionDetail]
    :ivar next_link: The link (url) to the next page of results.
    :vartype next_link: str
    """

    _validation = {
        'next_link': {'readonly': True},
    }

    _attribute_map = {
        'value': {'key': 'value', 'type': '[RuntimeScriptActionDetail]'},
        'next_link': {'key': 'nextLink', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        value: Optional[List["RuntimeScriptActionDetail"]] = None,
        **kwargs
    ):
        super(ScriptActionsList, self).__init__(**kwargs)
        self.value = value
        self.next_link = None


class SecurityProfile(msrest.serialization.Model):
    """The security profile which contains Ssh public key for the HDInsight cluster.

    Variables are only populated by the server, and will be ignored when sending a request.

    :ivar directory_type: The directory type. Default value: "ActiveDirectory".
    :vartype directory_type: str
    :param domain: The organization's active directory domain.
    :type domain: str
    :param organizational_unit_dn: The organizational unit within the Active Directory to place the
     cluster and service accounts.
    :type organizational_unit_dn: str
    :param ldaps_urls: The LDAPS protocol URLs to communicate with the Active Directory.
    :type ldaps_urls: list[str]
    :param domain_username: The domain user account that will have admin privileges on the cluster.
    :type domain_username: str
    :param domain_user_password: The domain admin password.
    :type domain_user_password: str
    :param cluster_users_group_d_ns: Optional. The Distinguished Names for cluster user groups.
    :type cluster_users_group_d_ns: list[str]
    :param aadds_resource_id: The resource ID of the user's Azure Active Directory Domain Service.
    :type aadds_resource_id: str
    :param msi_resource_id: User assigned identity that has permissions to read and create cluster-
     related artifacts in the user's AADDS.
    :type msi_resource_id: str
    """

    _validation = {
        'directory_type': {'constant': True},
    }

    _attribute_map = {
        'directory_type': {'key': 'directoryType', 'type': 'str'},
        'domain': {'key': 'domain', 'type': 'str'},
        'organizational_unit_dn': {'key': 'organizationalUnitDN', 'type': 'str'},
        'ldaps_urls': {'key': 'ldapsUrls', 'type': '[str]'},
        'domain_username': {'key': 'domainUsername', 'type': 'str'},
        'domain_user_password': {'key': 'domainUserPassword', 'type': 'str'},
        'cluster_users_group_d_ns': {'key': 'clusterUsersGroupDNs', 'type': '[str]'},
        'aadds_resource_id': {'key': 'aaddsResourceId', 'type': 'str'},
        'msi_resource_id': {'key': 'msiResourceId', 'type': 'str'},
    }

    directory_type = "ActiveDirectory"

    def __init__(
        self,
        *,
        domain: Optional[str] = None,
        organizational_unit_dn: Optional[str] = None,
        ldaps_urls: Optional[List[str]] = None,
        domain_username: Optional[str] = None,
        domain_user_password: Optional[str] = None,
        cluster_users_group_d_ns: Optional[List[str]] = None,
        aadds_resource_id: Optional[str] = None,
        msi_resource_id: Optional[str] = None,
        **kwargs
    ):
        super(SecurityProfile, self).__init__(**kwargs)
        self.domain = domain
        self.organizational_unit_dn = organizational_unit_dn
        self.ldaps_urls = ldaps_urls
        self.domain_username = domain_username
        self.domain_user_password = domain_user_password
        self.cluster_users_group_d_ns = cluster_users_group_d_ns
        self.aadds_resource_id = aadds_resource_id
        self.msi_resource_id = msi_resource_id


class SshProfile(msrest.serialization.Model):
    """The list of SSH public keys.

    :param public_keys: The list of SSH public keys.
    :type public_keys: list[~azure.mgmt.hdinsight.models.SshPublicKey]
    """

    _attribute_map = {
        'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'},
    }

    def __init__(
        self,
        *,
        public_keys: Optional[List["SshPublicKey"]] = None,
        **kwargs
    ):
        super(SshProfile, self).__init__(**kwargs)
        self.public_keys = public_keys


class SshPublicKey(msrest.serialization.Model):
    """The SSH public key for the cluster nodes.

    :param certificate_data: The certificate for SSH.
    :type certificate_data: str
    """

    _attribute_map = {
        'certificate_data': {'key': 'certificateData', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        certificate_data: Optional[str] = None,
        **kwargs
    ):
        super(SshPublicKey, self).__init__(**kwargs)
        self.certificate_data = certificate_data


class StorageAccount(msrest.serialization.Model):
    """The storage Account.

    :param name: The name of the storage account.
    :type name: str
    :param is_default: Whether or not the storage account is the default storage account.
    :type is_default: bool
    :param container: The container in the storage account, only to be specified for WASB storage
     accounts.
    :type container: str
    :param file_system: The filesystem, only to be specified for Azure Data Lake Storage Gen 2.
    :type file_system: str
    :param key: The storage account access key.
    :type key: str
    :param resource_id: The resource ID of storage account, only to be specified for Azure Data
     Lake Storage Gen 2.
    :type resource_id: str
    :param msi_resource_id: The managed identity (MSI) that is allowed to access the storage
     account, only to be specified for Azure Data Lake Storage Gen 2.
    :type msi_resource_id: str
    """

    _attribute_map = {
        'name': {'key': 'name', 'type': 'str'},
        'is_default': {'key': 'isDefault', 'type': 'bool'},
        'container': {'key': 'container', 'type': 'str'},
        'file_system': {'key': 'fileSystem', 'type': 'str'},
        'key': {'key': 'key', 'type': 'str'},
        'resource_id': {'key': 'resourceId', 'type': 'str'},
        'msi_resource_id': {'key': 'msiResourceId', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        name: Optional[str] = None,
        is_default: Optional[bool] = None,
        container: Optional[str] = None,
        file_system: Optional[str] = None,
        key: Optional[str] = None,
        resource_id: Optional[str] = None,
        msi_resource_id: Optional[str] = None,
        **kwargs
    ):
        super(StorageAccount, self).__init__(**kwargs)
        self.name = name
        self.is_default = is_default
        self.container = container
        self.file_system = file_system
        self.key = key
        self.resource_id = resource_id
        self.msi_resource_id = msi_resource_id


class StorageProfile(msrest.serialization.Model):
    """The storage profile.

    :param storageaccounts: The list of storage accounts in the cluster.
    :type storageaccounts: list[~azure.mgmt.hdinsight.models.StorageAccount]
    """

    _attribute_map = {
        'storageaccounts': {'key': 'storageaccounts', 'type': '[StorageAccount]'},
    }

    def __init__(
        self,
        *,
        storageaccounts: Optional[List["StorageAccount"]] = None,
        **kwargs
    ):
        super(StorageProfile, self).__init__(**kwargs)
        self.storageaccounts = storageaccounts


class UpdateGatewaySettingsParameters(msrest.serialization.Model):
    """The update gateway settings request parameters.

    :param is_credential_enabled: Indicates whether or not the gateway settings based authorization
     is enabled.
    :type is_credential_enabled: bool
    :param user_name: The gateway settings user name.
    :type user_name: str
    :param password: The gateway settings user password.
    :type password: str
    """

    _attribute_map = {
        'is_credential_enabled': {'key': 'restAuthCredential\\.isEnabled', 'type': 'bool'},
        'user_name': {'key': 'restAuthCredential\\.username', 'type': 'str'},
        'password': {'key': 'restAuthCredential\\.password', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        is_credential_enabled: Optional[bool] = True,
        user_name: Optional[str] = None,
        password: Optional[str] = None,
        **kwargs
    ):
        super(UpdateGatewaySettingsParameters, self).__init__(**kwargs)
        self.is_credential_enabled = is_credential_enabled
        self.user_name = user_name
        self.password = password


class Usage(msrest.serialization.Model):
    """The details about the usage of a particular limited resource.

    Variables are only populated by the server, and will be ignored when sending a request.

    :param unit: The type of measurement for usage.
    :type unit: str
    :param current_value: The current usage.
    :type current_value: int
    :param limit: The maximum allowed usage.
    :type limit: int
    :ivar name: The details about the localizable name of the used resource.
    :vartype name: ~azure.mgmt.hdinsight.models.LocalizedName
    """

    _validation = {
        'name': {'readonly': True},
    }

    _attribute_map = {
        'unit': {'key': 'unit', 'type': 'str'},
        'current_value': {'key': 'currentValue', 'type': 'int'},
        'limit': {'key': 'limit', 'type': 'int'},
        'name': {'key': 'name', 'type': 'LocalizedName'},
    }

    def __init__(
        self,
        *,
        unit: Optional[str] = None,
        current_value: Optional[int] = None,
        limit: Optional[int] = None,
        **kwargs
    ):
        super(Usage, self).__init__(**kwargs)
        self.unit = unit
        self.current_value = current_value
        self.limit = limit
        self.name = None


class UsagesListResult(msrest.serialization.Model):
    """The response for the operation to get regional usages for a subscription.

    :param value: The list of usages.
    :type value: list[~azure.mgmt.hdinsight.models.Usage]
    """

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

    def __init__(
        self,
        *,
        value: Optional[List["Usage"]] = None,
        **kwargs
    ):
        super(UsagesListResult, self).__init__(**kwargs)
        self.value = value


class VersionsCapability(msrest.serialization.Model):
    """The version capability.

    :param available: The list of version capabilities.
    :type available: list[~azure.mgmt.hdinsight.models.VersionSpec]
    """

    _attribute_map = {
        'available': {'key': 'available', 'type': '[VersionSpec]'},
    }

    def __init__(
        self,
        *,
        available: Optional[List["VersionSpec"]] = None,
        **kwargs
    ):
        super(VersionsCapability, self).__init__(**kwargs)
        self.available = available


class VersionSpec(msrest.serialization.Model):
    """The version properties.

    :param friendly_name: The friendly name.
    :type friendly_name: str
    :param display_name: The display name.
    :type display_name: str
    :param is_default: Whether or not the version is the default version.
    :type is_default: str
    :param component_versions: The component version property.
    :type component_versions: dict[str, str]
    """

    _attribute_map = {
        'friendly_name': {'key': 'friendlyName', 'type': 'str'},
        'display_name': {'key': 'displayName', 'type': 'str'},
        'is_default': {'key': 'isDefault', 'type': 'str'},
        'component_versions': {'key': 'componentVersions', 'type': '{str}'},
    }

    def __init__(
        self,
        *,
        friendly_name: Optional[str] = None,
        display_name: Optional[str] = None,
        is_default: Optional[str] = None,
        component_versions: Optional[Dict[str, str]] = None,
        **kwargs
    ):
        super(VersionSpec, self).__init__(**kwargs)
        self.friendly_name = friendly_name
        self.display_name = display_name
        self.is_default = is_default
        self.component_versions = component_versions


class VirtualNetworkProfile(msrest.serialization.Model):
    """The virtual network properties.

    :param id: The ID of the virtual network.
    :type id: str
    :param subnet: The name of the subnet.
    :type subnet: str
    """

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

    def __init__(
        self,
        *,
        id: Optional[str] = None,
        subnet: Optional[str] = None,
        **kwargs
    ):
        super(VirtualNetworkProfile, self).__init__(**kwargs)
        self.id = id
        self.subnet = subnet


class VmSizeCompatibilityFilter(msrest.serialization.Model):
    """The virtual machine type compatibility filter.

    :param filter_mode: The mode for the filter.
    :type filter_mode: str
    :param regions: The list of regions.
    :type regions: list[str]
    :param cluster_flavors: The list of cluster types available.
    :type cluster_flavors: list[str]
    :param node_types: The list of node types.
    :type node_types: list[str]
    :param cluster_versions: The list of cluster versions.
    :type cluster_versions: list[str]
    :param vmsizes: The list of virtual machine sizes.
    :type vmsizes: list[str]
    """

    _attribute_map = {
        'filter_mode': {'key': 'FilterMode', 'type': 'str'},
        'regions': {'key': 'Regions', 'type': '[str]'},
        'cluster_flavors': {'key': 'ClusterFlavors', 'type': '[str]'},
        'node_types': {'key': 'NodeTypes', 'type': '[str]'},
        'cluster_versions': {'key': 'ClusterVersions', 'type': '[str]'},
        'vmsizes': {'key': 'vmsizes', 'type': '[str]'},
    }

    def __init__(
        self,
        *,
        filter_mode: Optional[str] = None,
        regions: Optional[List[str]] = None,
        cluster_flavors: Optional[List[str]] = None,
        node_types: Optional[List[str]] = None,
        cluster_versions: Optional[List[str]] = None,
        vmsizes: Optional[List[str]] = None,
        **kwargs
    ):
        super(VmSizeCompatibilityFilter, self).__init__(**kwargs)
        self.filter_mode = filter_mode
        self.regions = regions
        self.cluster_flavors = cluster_flavors
        self.node_types = node_types
        self.cluster_versions = cluster_versions
        self.vmsizes = vmsizes


class VmSizeCompatibilityFilterV2(msrest.serialization.Model):
    """This class represent a single filter object that defines a multidimensional set. The dimensions of this set are Regions, ClusterFlavors, NodeTypes and ClusterVersions. The constraint should be defined based on the following: FilterMode (Exclude vs Include), VMSizes (the vm sizes in affect of exclusion/inclusion) and the ordering of the Filters. Later filters override previous settings if conflicted.

    :param filter_mode: The filtering mode. Effectively this can enabling or disabling the VM sizes
     in a particular set. Possible values include: "Exclude", "Include".
    :type filter_mode: str or ~azure.mgmt.hdinsight.models.FilterMode
    :param regions: The list of regions under the effect of the filter.
    :type regions: list[str]
    :param cluster_flavors: The list of cluster flavors under the effect of the filter.
    :type cluster_flavors: list[str]
    :param node_types: The list of node types affected by the filter.
    :type node_types: list[str]
    :param cluster_versions: The list of cluster versions affected in Major.Minor format.
    :type cluster_versions: list[str]
    :param os_type: The OSType affected, Windows or Linux.
    :type os_type: list[str or ~azure.mgmt.hdinsight.models.OSType]
    :param vm_sizes: The list of virtual machine sizes to include or exclude.
    :type vm_sizes: list[str]
    """

    _attribute_map = {
        'filter_mode': {'key': 'filterMode', 'type': 'str'},
        'regions': {'key': 'regions', 'type': '[str]'},
        'cluster_flavors': {'key': 'clusterFlavors', 'type': '[str]'},
        'node_types': {'key': 'nodeTypes', 'type': '[str]'},
        'cluster_versions': {'key': 'clusterVersions', 'type': '[str]'},
        'os_type': {'key': 'osType', 'type': '[str]'},
        'vm_sizes': {'key': 'vmSizes', 'type': '[str]'},
    }

    def __init__(
        self,
        *,
        filter_mode: Optional[Union[str, "FilterMode"]] = None,
        regions: Optional[List[str]] = None,
        cluster_flavors: Optional[List[str]] = None,
        node_types: Optional[List[str]] = None,
        cluster_versions: Optional[List[str]] = None,
        os_type: Optional[List[Union[str, "OSType"]]] = None,
        vm_sizes: Optional[List[str]] = None,
        **kwargs
    ):
        super(VmSizeCompatibilityFilterV2, self).__init__(**kwargs)
        self.filter_mode = filter_mode
        self.regions = regions
        self.cluster_flavors = cluster_flavors
        self.node_types = node_types
        self.cluster_versions = cluster_versions
        self.os_type = os_type
        self.vm_sizes = vm_sizes


class VmSizesCapability(msrest.serialization.Model):
    """The virtual machine sizes capability.

    :param available: The list of virtual machine size capabilities.
    :type available: list[str]
    """

    _attribute_map = {
        'available': {'key': 'available', 'type': '[str]'},
    }

    def __init__(
        self,
        *,
        available: Optional[List[str]] = None,
        **kwargs
    ):
        super(VmSizesCapability, self).__init__(**kwargs)
        self.available = available
