# 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.
# --------------------------------------------------------------------------

import datetime
from typing import Dict, List, Optional, Union

import msrest.serialization

from ._kusto_management_client_enums import *


class Resource(msrest.serialization.Model):
    """Common fields that are returned in the response for all Azure Resource Manager 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. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :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 AttachedDatabaseConfiguration(Resource):
    """Class representing an attached database configuration.

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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :param location: Resource location.
    :type location: str
    :ivar provisioning_state: The provisioned state of the resource. Possible values include:
     "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
    :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState
    :param database_name: The name of the database which you would like to attach, use * if you
     want to follow all current and future databases.
    :type database_name: str
    :param cluster_resource_id: The resource id of the cluster where the databases you would like
     to attach reside.
    :type cluster_resource_id: str
    :ivar attached_database_names: The list of databases from the clusterResourceId which are
     currently attached to the cluster.
    :vartype attached_database_names: list[str]
    :param default_principals_modification_kind: The default principals modification kind. Possible
     values include: "Union", "Replace", "None".
    :type default_principals_modification_kind: str or
     ~azure.mgmt.kusto.models.DefaultPrincipalsModificationKind
    """

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

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'location': {'key': 'location', 'type': 'str'},
        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
        'database_name': {'key': 'properties.databaseName', 'type': 'str'},
        'cluster_resource_id': {'key': 'properties.clusterResourceId', 'type': 'str'},
        'attached_database_names': {'key': 'properties.attachedDatabaseNames', 'type': '[str]'},
        'default_principals_modification_kind': {'key': 'properties.defaultPrincipalsModificationKind', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        location: Optional[str] = None,
        database_name: Optional[str] = None,
        cluster_resource_id: Optional[str] = None,
        default_principals_modification_kind: Optional[Union[str, "DefaultPrincipalsModificationKind"]] = None,
        **kwargs
    ):
        super(AttachedDatabaseConfiguration, self).__init__(**kwargs)
        self.location = location
        self.provisioning_state = None
        self.database_name = database_name
        self.cluster_resource_id = cluster_resource_id
        self.attached_database_names = None
        self.default_principals_modification_kind = default_principals_modification_kind


class AttachedDatabaseConfigurationListResult(msrest.serialization.Model):
    """The list attached database configurations operation response.

    :param value: The list of attached database configurations.
    :type value: list[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration]
    """

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

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


class AzureCapacity(msrest.serialization.Model):
    """Azure capacity definition.

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

    :param scale_type: Required. Scale type. Possible values include: "automatic", "manual",
     "none".
    :type scale_type: str or ~azure.mgmt.kusto.models.AzureScaleType
    :param minimum: Required. Minimum allowed capacity.
    :type minimum: int
    :param maximum: Required. Maximum allowed capacity.
    :type maximum: int
    :param default: Required. The default capacity that would be used.
    :type default: int
    """

    _validation = {
        'scale_type': {'required': True},
        'minimum': {'required': True},
        'maximum': {'required': True},
        'default': {'required': True},
    }

    _attribute_map = {
        'scale_type': {'key': 'scaleType', 'type': 'str'},
        'minimum': {'key': 'minimum', 'type': 'int'},
        'maximum': {'key': 'maximum', 'type': 'int'},
        'default': {'key': 'default', 'type': 'int'},
    }

    def __init__(
        self,
        *,
        scale_type: Union[str, "AzureScaleType"],
        minimum: int,
        maximum: int,
        default: int,
        **kwargs
    ):
        super(AzureCapacity, self).__init__(**kwargs)
        self.scale_type = scale_type
        self.minimum = minimum
        self.maximum = maximum
        self.default = default


class AzureResourceSku(msrest.serialization.Model):
    """Azure resource SKU definition.

    :param resource_type: Resource Namespace and Type.
    :type resource_type: str
    :param sku: The SKU details.
    :type sku: ~azure.mgmt.kusto.models.AzureSku
    :param capacity: The number of instances of the cluster.
    :type capacity: ~azure.mgmt.kusto.models.AzureCapacity
    """

    _attribute_map = {
        'resource_type': {'key': 'resourceType', 'type': 'str'},
        'sku': {'key': 'sku', 'type': 'AzureSku'},
        'capacity': {'key': 'capacity', 'type': 'AzureCapacity'},
    }

    def __init__(
        self,
        *,
        resource_type: Optional[str] = None,
        sku: Optional["AzureSku"] = None,
        capacity: Optional["AzureCapacity"] = None,
        **kwargs
    ):
        super(AzureResourceSku, self).__init__(**kwargs)
        self.resource_type = resource_type
        self.sku = sku
        self.capacity = capacity


class AzureSku(msrest.serialization.Model):
    """Azure SKU definition.

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

    :param name: Required. SKU name. Possible values include: "Standard_DS13_v2+1TB_PS",
     "Standard_DS13_v2+2TB_PS", "Standard_DS14_v2+3TB_PS", "Standard_DS14_v2+4TB_PS",
     "Standard_D13_v2", "Standard_D14_v2", "Standard_L8s", "Standard_L16s", "Standard_D11_v2",
     "Standard_D12_v2", "Standard_L4s", "Dev(No SLA)_Standard_D11_v2", "Standard_E64i_v3",
     "Standard_E2a_v4", "Standard_E4a_v4", "Standard_E8a_v4", "Standard_E16a_v4",
     "Standard_E8as_v4+1TB_PS", "Standard_E8as_v4+2TB_PS", "Standard_E16as_v4+3TB_PS",
     "Standard_E16as_v4+4TB_PS", "Dev(No SLA)_Standard_E2a_v4".
    :type name: str or ~azure.mgmt.kusto.models.AzureSkuName
    :param capacity: The number of instances of the cluster.
    :type capacity: int
    :param tier: Required. SKU tier. Possible values include: "Basic", "Standard".
    :type tier: str or ~azure.mgmt.kusto.models.AzureSkuTier
    """

    _validation = {
        'name': {'required': True},
        'tier': {'required': True},
    }

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

    def __init__(
        self,
        *,
        name: Union[str, "AzureSkuName"],
        tier: Union[str, "AzureSkuTier"],
        capacity: Optional[int] = None,
        **kwargs
    ):
        super(AzureSku, self).__init__(**kwargs)
        self.name = name
        self.capacity = capacity
        self.tier = tier


class CheckNameRequest(msrest.serialization.Model):
    """The result returned from a database check name availability request.

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

    :param name: Required. Resource name.
    :type name: str
    :param type: Required. The type of resource, for instance Microsoft.Kusto/clusters/databases.
     Possible values include: "Microsoft.Kusto/clusters/databases",
     "Microsoft.Kusto/clusters/attachedDatabaseConfigurations".
    :type type: str or ~azure.mgmt.kusto.models.Type
    """

    _validation = {
        'name': {'required': True},
        'type': {'required': True},
    }

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

    def __init__(
        self,
        *,
        name: str,
        type: Union[str, "Type"],
        **kwargs
    ):
        super(CheckNameRequest, self).__init__(**kwargs)
        self.name = name
        self.type = type


class CheckNameResult(msrest.serialization.Model):
    """The result returned from a check name availability request.

    :param name_available: Specifies a Boolean value that indicates if the name is available.
    :type name_available: bool
    :param name: The name that was checked.
    :type name: str
    :param message: Message indicating an unavailable name due to a conflict, or a description of
     the naming rules that are violated.
    :type message: str
    :param reason: Message providing the reason why the given name is invalid. Possible values
     include: "Invalid", "AlreadyExists".
    :type reason: str or ~azure.mgmt.kusto.models.Reason
    """

    _attribute_map = {
        'name_available': {'key': 'nameAvailable', 'type': 'bool'},
        'name': {'key': 'name', 'type': 'str'},
        'message': {'key': 'message', 'type': 'str'},
        'reason': {'key': 'reason', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        name_available: Optional[bool] = None,
        name: Optional[str] = None,
        message: Optional[str] = None,
        reason: Optional[Union[str, "Reason"]] = None,
        **kwargs
    ):
        super(CheckNameResult, self).__init__(**kwargs)
        self.name_available = name_available
        self.name = name
        self.message = message
        self.reason = reason


class CloudErrorBody(msrest.serialization.Model):
    """An error response from Kusto.

    :param code: An identifier for the error. Codes are invariant and are intended to be consumed
     programmatically.
    :type code: str
    :param message: A message describing the error, intended to be suitable for displaying in a
     user interface.
    :type message: str
    :param target: The target of the particular error. For example, the name of the property in
     error.
    :type target: str
    :param details: A list of additional details about the error.
    :type details: list[~azure.mgmt.kusto.models.CloudErrorBody]
    """

    _attribute_map = {
        'code': {'key': 'code', 'type': 'str'},
        'message': {'key': 'message', 'type': 'str'},
        'target': {'key': 'target', 'type': 'str'},
        'details': {'key': 'details', 'type': '[CloudErrorBody]'},
    }

    def __init__(
        self,
        *,
        code: Optional[str] = None,
        message: Optional[str] = None,
        target: Optional[str] = None,
        details: Optional[List["CloudErrorBody"]] = None,
        **kwargs
    ):
        super(CloudErrorBody, self).__init__(**kwargs)
        self.code = code
        self.message = message
        self.target = target
        self.details = details


class TrackedResource(Resource):
    """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'.

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

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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :param tags: A set of tags. Resource tags.
    :type tags: dict[str, str]
    :param location: Required. The geo-location where the resource lives.
    :type location: str
    """

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

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

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


class Cluster(TrackedResource):
    """Class representing a Kusto 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.

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :param tags: A set of tags. Resource tags.
    :type tags: dict[str, str]
    :param location: Required. The geo-location where the resource lives.
    :type location: str
    :param sku: Required. The SKU of the cluster.
    :type sku: ~azure.mgmt.kusto.models.AzureSku
    :param zones: The availability zones of the cluster.
    :type zones: list[str]
    :param identity: The identity of the cluster, if configured.
    :type identity: ~azure.mgmt.kusto.models.Identity
    :ivar state: The state of the resource. Possible values include: "Creating", "Unavailable",
     "Running", "Deleting", "Deleted", "Stopping", "Stopped", "Starting", "Updating".
    :vartype state: str or ~azure.mgmt.kusto.models.State
    :ivar provisioning_state: The provisioned state of the resource. Possible values include:
     "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
    :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState
    :ivar uri: The cluster URI.
    :vartype uri: str
    :ivar data_ingestion_uri: The cluster data ingestion URI.
    :vartype data_ingestion_uri: str
    :ivar state_reason: The reason for the cluster's current state.
    :vartype state_reason: str
    :param trusted_external_tenants: The cluster's external tenants.
    :type trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant]
    :param optimized_autoscale: Optimized auto scale definition.
    :type optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale
    :param enable_disk_encryption: A boolean value that indicates if the cluster's disks are
     encrypted.
    :type enable_disk_encryption: bool
    :param enable_streaming_ingest: A boolean value that indicates if the streaming ingest is
     enabled.
    :type enable_streaming_ingest: bool
    :param virtual_network_configuration: Virtual network definition.
    :type virtual_network_configuration: ~azure.mgmt.kusto.models.VirtualNetworkConfiguration
    :param key_vault_properties: KeyVault properties for the cluster encryption.
    :type key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties
    :param enable_purge: A boolean value that indicates if the purge operations are enabled.
    :type enable_purge: bool
    :ivar language_extensions: List of the cluster's language extensions.
    :vartype language_extensions: ~azure.mgmt.kusto.models.LanguageExtensionsList
    :param enable_double_encryption: A boolean value that indicates if double encryption is
     enabled.
    :type enable_double_encryption: bool
    :param engine_type: The engine type. Possible values include: "V2", "V3".
    :type engine_type: str or ~azure.mgmt.kusto.models.EngineType
    """

    _validation = {
        'id': {'readonly': True},
        'name': {'readonly': True},
        'type': {'readonly': True},
        'location': {'required': True},
        'sku': {'required': True},
        'state': {'readonly': True},
        'provisioning_state': {'readonly': True},
        'uri': {'readonly': True},
        'data_ingestion_uri': {'readonly': True},
        'state_reason': {'readonly': True},
        'language_extensions': {'readonly': True},
    }

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'tags': {'key': 'tags', 'type': '{str}'},
        'location': {'key': 'location', 'type': 'str'},
        'sku': {'key': 'sku', 'type': 'AzureSku'},
        'zones': {'key': 'zones', 'type': '[str]'},
        'identity': {'key': 'identity', 'type': 'Identity'},
        'state': {'key': 'properties.state', 'type': 'str'},
        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
        'uri': {'key': 'properties.uri', 'type': 'str'},
        'data_ingestion_uri': {'key': 'properties.dataIngestionUri', 'type': 'str'},
        'state_reason': {'key': 'properties.stateReason', 'type': 'str'},
        'trusted_external_tenants': {'key': 'properties.trustedExternalTenants', 'type': '[TrustedExternalTenant]'},
        'optimized_autoscale': {'key': 'properties.optimizedAutoscale', 'type': 'OptimizedAutoscale'},
        'enable_disk_encryption': {'key': 'properties.enableDiskEncryption', 'type': 'bool'},
        'enable_streaming_ingest': {'key': 'properties.enableStreamingIngest', 'type': 'bool'},
        'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'},
        'key_vault_properties': {'key': 'properties.keyVaultProperties', 'type': 'KeyVaultProperties'},
        'enable_purge': {'key': 'properties.enablePurge', 'type': 'bool'},
        'language_extensions': {'key': 'properties.languageExtensions', 'type': 'LanguageExtensionsList'},
        'enable_double_encryption': {'key': 'properties.enableDoubleEncryption', 'type': 'bool'},
        'engine_type': {'key': 'properties.engineType', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        location: str,
        sku: "AzureSku",
        tags: Optional[Dict[str, str]] = None,
        zones: Optional[List[str]] = None,
        identity: Optional["Identity"] = None,
        trusted_external_tenants: Optional[List["TrustedExternalTenant"]] = None,
        optimized_autoscale: Optional["OptimizedAutoscale"] = None,
        enable_disk_encryption: Optional[bool] = None,
        enable_streaming_ingest: Optional[bool] = False,
        virtual_network_configuration: Optional["VirtualNetworkConfiguration"] = None,
        key_vault_properties: Optional["KeyVaultProperties"] = None,
        enable_purge: Optional[bool] = False,
        enable_double_encryption: Optional[bool] = False,
        engine_type: Optional[Union[str, "EngineType"]] = None,
        **kwargs
    ):
        super(Cluster, self).__init__(tags=tags, location=location, **kwargs)
        self.sku = sku
        self.zones = zones
        self.identity = identity
        self.state = None
        self.provisioning_state = None
        self.uri = None
        self.data_ingestion_uri = None
        self.state_reason = None
        self.trusted_external_tenants = trusted_external_tenants
        self.optimized_autoscale = optimized_autoscale
        self.enable_disk_encryption = enable_disk_encryption
        self.enable_streaming_ingest = enable_streaming_ingest
        self.virtual_network_configuration = virtual_network_configuration
        self.key_vault_properties = key_vault_properties
        self.enable_purge = enable_purge
        self.language_extensions = None
        self.enable_double_encryption = enable_double_encryption
        self.engine_type = engine_type


class ClusterCheckNameRequest(msrest.serialization.Model):
    """The result returned from a cluster check name availability request.

    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. Cluster name.
    :type name: str
    :ivar type: Required. The type of resource, Microsoft.Kusto/clusters. Default value:
     "Microsoft.Kusto/clusters".
    :vartype type: str
    """

    _validation = {
        'name': {'required': True},
        'type': {'required': True, 'constant': True},
    }

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

    type = "Microsoft.Kusto/clusters"

    def __init__(
        self,
        *,
        name: str,
        **kwargs
    ):
        super(ClusterCheckNameRequest, self).__init__(**kwargs)
        self.name = name


class ClusterListResult(msrest.serialization.Model):
    """The list Kusto clusters operation response.

    :param value: The list of Kusto clusters.
    :type value: list[~azure.mgmt.kusto.models.Cluster]
    """

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

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


class ClusterPrincipalAssignment(Resource):
    """Class representing a cluster principal assignment.

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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :param principal_id: The principal ID assigned to the cluster principal. It can be a user
     email, application ID, or security group name.
    :type principal_id: str
    :param role: Cluster principal role. Possible values include: "AllDatabasesAdmin",
     "AllDatabasesViewer".
    :type role: str or ~azure.mgmt.kusto.models.ClusterPrincipalRole
    :param tenant_id: The tenant id of the principal.
    :type tenant_id: str
    :param principal_type: Principal type. Possible values include: "App", "Group", "User".
    :type principal_type: str or ~azure.mgmt.kusto.models.PrincipalType
    :ivar tenant_name: The tenant name of the principal.
    :vartype tenant_name: str
    :ivar principal_name: The principal name.
    :vartype principal_name: str
    :ivar provisioning_state: The provisioned state of the resource. Possible values include:
     "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
    :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState
    """

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

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'principal_id': {'key': 'properties.principalId', 'type': 'str'},
        'role': {'key': 'properties.role', 'type': 'str'},
        'tenant_id': {'key': 'properties.tenantId', 'type': 'str'},
        'principal_type': {'key': 'properties.principalType', 'type': 'str'},
        'tenant_name': {'key': 'properties.tenantName', 'type': 'str'},
        'principal_name': {'key': 'properties.principalName', 'type': 'str'},
        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        principal_id: Optional[str] = None,
        role: Optional[Union[str, "ClusterPrincipalRole"]] = None,
        tenant_id: Optional[str] = None,
        principal_type: Optional[Union[str, "PrincipalType"]] = None,
        **kwargs
    ):
        super(ClusterPrincipalAssignment, self).__init__(**kwargs)
        self.principal_id = principal_id
        self.role = role
        self.tenant_id = tenant_id
        self.principal_type = principal_type
        self.tenant_name = None
        self.principal_name = None
        self.provisioning_state = None


class ClusterPrincipalAssignmentCheckNameRequest(msrest.serialization.Model):
    """A principal assignment check name availability request.

    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. Principal Assignment resource name.
    :type name: str
    :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/principalAssignments.
     Default value: "Microsoft.Kusto/clusters/principalAssignments".
    :vartype type: str
    """

    _validation = {
        'name': {'required': True},
        'type': {'required': True, 'constant': True},
    }

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

    type = "Microsoft.Kusto/clusters/principalAssignments"

    def __init__(
        self,
        *,
        name: str,
        **kwargs
    ):
        super(ClusterPrincipalAssignmentCheckNameRequest, self).__init__(**kwargs)
        self.name = name


class ClusterPrincipalAssignmentListResult(msrest.serialization.Model):
    """The list Kusto cluster principal assignments operation response.

    :param value: The list of Kusto cluster principal assignments.
    :type value: list[~azure.mgmt.kusto.models.ClusterPrincipalAssignment]
    """

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

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


class ClusterUpdate(Resource):
    """Class representing an update to a Kusto 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. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :param tags: A set of tags. Resource tags.
    :type tags: dict[str, str]
    :param location: Resource location.
    :type location: str
    :param sku: The SKU of the cluster.
    :type sku: ~azure.mgmt.kusto.models.AzureSku
    :param identity: The identity of the cluster, if configured.
    :type identity: ~azure.mgmt.kusto.models.Identity
    :ivar state: The state of the resource. Possible values include: "Creating", "Unavailable",
     "Running", "Deleting", "Deleted", "Stopping", "Stopped", "Starting", "Updating".
    :vartype state: str or ~azure.mgmt.kusto.models.State
    :ivar provisioning_state: The provisioned state of the resource. Possible values include:
     "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
    :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState
    :ivar uri: The cluster URI.
    :vartype uri: str
    :ivar data_ingestion_uri: The cluster data ingestion URI.
    :vartype data_ingestion_uri: str
    :ivar state_reason: The reason for the cluster's current state.
    :vartype state_reason: str
    :param trusted_external_tenants: The cluster's external tenants.
    :type trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant]
    :param optimized_autoscale: Optimized auto scale definition.
    :type optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale
    :param enable_disk_encryption: A boolean value that indicates if the cluster's disks are
     encrypted.
    :type enable_disk_encryption: bool
    :param enable_streaming_ingest: A boolean value that indicates if the streaming ingest is
     enabled.
    :type enable_streaming_ingest: bool
    :param virtual_network_configuration: Virtual network definition.
    :type virtual_network_configuration: ~azure.mgmt.kusto.models.VirtualNetworkConfiguration
    :param key_vault_properties: KeyVault properties for the cluster encryption.
    :type key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties
    :param enable_purge: A boolean value that indicates if the purge operations are enabled.
    :type enable_purge: bool
    :ivar language_extensions: List of the cluster's language extensions.
    :vartype language_extensions: ~azure.mgmt.kusto.models.LanguageExtensionsList
    :param enable_double_encryption: A boolean value that indicates if double encryption is
     enabled.
    :type enable_double_encryption: bool
    :param engine_type: The engine type. Possible values include: "V2", "V3".
    :type engine_type: str or ~azure.mgmt.kusto.models.EngineType
    """

    _validation = {
        'id': {'readonly': True},
        'name': {'readonly': True},
        'type': {'readonly': True},
        'state': {'readonly': True},
        'provisioning_state': {'readonly': True},
        'uri': {'readonly': True},
        'data_ingestion_uri': {'readonly': True},
        'state_reason': {'readonly': True},
        'language_extensions': {'readonly': True},
    }

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'tags': {'key': 'tags', 'type': '{str}'},
        'location': {'key': 'location', 'type': 'str'},
        'sku': {'key': 'sku', 'type': 'AzureSku'},
        'identity': {'key': 'identity', 'type': 'Identity'},
        'state': {'key': 'properties.state', 'type': 'str'},
        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
        'uri': {'key': 'properties.uri', 'type': 'str'},
        'data_ingestion_uri': {'key': 'properties.dataIngestionUri', 'type': 'str'},
        'state_reason': {'key': 'properties.stateReason', 'type': 'str'},
        'trusted_external_tenants': {'key': 'properties.trustedExternalTenants', 'type': '[TrustedExternalTenant]'},
        'optimized_autoscale': {'key': 'properties.optimizedAutoscale', 'type': 'OptimizedAutoscale'},
        'enable_disk_encryption': {'key': 'properties.enableDiskEncryption', 'type': 'bool'},
        'enable_streaming_ingest': {'key': 'properties.enableStreamingIngest', 'type': 'bool'},
        'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'},
        'key_vault_properties': {'key': 'properties.keyVaultProperties', 'type': 'KeyVaultProperties'},
        'enable_purge': {'key': 'properties.enablePurge', 'type': 'bool'},
        'language_extensions': {'key': 'properties.languageExtensions', 'type': 'LanguageExtensionsList'},
        'enable_double_encryption': {'key': 'properties.enableDoubleEncryption', 'type': 'bool'},
        'engine_type': {'key': 'properties.engineType', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        tags: Optional[Dict[str, str]] = None,
        location: Optional[str] = None,
        sku: Optional["AzureSku"] = None,
        identity: Optional["Identity"] = None,
        trusted_external_tenants: Optional[List["TrustedExternalTenant"]] = None,
        optimized_autoscale: Optional["OptimizedAutoscale"] = None,
        enable_disk_encryption: Optional[bool] = None,
        enable_streaming_ingest: Optional[bool] = False,
        virtual_network_configuration: Optional["VirtualNetworkConfiguration"] = None,
        key_vault_properties: Optional["KeyVaultProperties"] = None,
        enable_purge: Optional[bool] = False,
        enable_double_encryption: Optional[bool] = False,
        engine_type: Optional[Union[str, "EngineType"]] = None,
        **kwargs
    ):
        super(ClusterUpdate, self).__init__(**kwargs)
        self.tags = tags
        self.location = location
        self.sku = sku
        self.identity = identity
        self.state = None
        self.provisioning_state = None
        self.uri = None
        self.data_ingestion_uri = None
        self.state_reason = None
        self.trusted_external_tenants = trusted_external_tenants
        self.optimized_autoscale = optimized_autoscale
        self.enable_disk_encryption = enable_disk_encryption
        self.enable_streaming_ingest = enable_streaming_ingest
        self.virtual_network_configuration = virtual_network_configuration
        self.key_vault_properties = key_vault_properties
        self.enable_purge = enable_purge
        self.language_extensions = None
        self.enable_double_encryption = enable_double_encryption
        self.engine_type = engine_type


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

    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(ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs)
        self.principal_id = None
        self.client_id = None


class Database(Resource):
    """Class representing a Kusto database.

    You probably want to use the sub-classes and not this class directly. Known
    sub-classes are: ReadOnlyFollowingDatabase, ReadWriteDatabase.

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

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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :param location: Resource location.
    :type location: str
    :param kind: Required. Kind of the database.Constant filled by server.  Possible values
     include: "ReadWrite", "ReadOnlyFollowing".
    :type kind: str or ~azure.mgmt.kusto.models.Kind
    """

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

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

    _subtype_map = {
        'kind': {'ReadOnlyFollowing': 'ReadOnlyFollowingDatabase', 'ReadWrite': 'ReadWriteDatabase'}
    }

    def __init__(
        self,
        *,
        location: Optional[str] = None,
        **kwargs
    ):
        super(Database, self).__init__(**kwargs)
        self.location = location
        self.kind = 'Database'  # type: str


class DatabaseListResult(msrest.serialization.Model):
    """The list Kusto databases operation response.

    :param value: The list of Kusto databases.
    :type value: list[~azure.mgmt.kusto.models.Database]
    """

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

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


class DatabasePrincipal(msrest.serialization.Model):
    """A class representing database principal entity.

    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 role: Required. Database principal role. Possible values include: "Admin", "Ingestor",
     "Monitor", "User", "UnrestrictedViewers", "Viewer".
    :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole
    :param name: Required. Database principal name.
    :type name: str
    :param type: Required. Database principal type. Possible values include: "App", "Group",
     "User".
    :type type: str or ~azure.mgmt.kusto.models.DatabasePrincipalType
    :param fqn: Database principal fully qualified name.
    :type fqn: str
    :param email: Database principal email if exists.
    :type email: str
    :param app_id: Application id - relevant only for application principal type.
    :type app_id: str
    :ivar tenant_name: The tenant name of the principal.
    :vartype tenant_name: str
    """

    _validation = {
        'role': {'required': True},
        'name': {'required': True},
        'type': {'required': True},
        'tenant_name': {'readonly': True},
    }

    _attribute_map = {
        'role': {'key': 'role', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'fqn': {'key': 'fqn', 'type': 'str'},
        'email': {'key': 'email', 'type': 'str'},
        'app_id': {'key': 'appId', 'type': 'str'},
        'tenant_name': {'key': 'tenantName', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        role: Union[str, "DatabasePrincipalRole"],
        name: str,
        type: Union[str, "DatabasePrincipalType"],
        fqn: Optional[str] = None,
        email: Optional[str] = None,
        app_id: Optional[str] = None,
        **kwargs
    ):
        super(DatabasePrincipal, self).__init__(**kwargs)
        self.role = role
        self.name = name
        self.type = type
        self.fqn = fqn
        self.email = email
        self.app_id = app_id
        self.tenant_name = None


class DatabasePrincipalAssignment(Resource):
    """Class representing a database principal assignment.

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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :param principal_id: The principal ID assigned to the database principal. It can be a user
     email, application ID, or security group name.
    :type principal_id: str
    :param role: Database principal role. Possible values include: "Admin", "Ingestor", "Monitor",
     "User", "UnrestrictedViewers", "Viewer".
    :type role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole
    :param tenant_id: The tenant id of the principal.
    :type tenant_id: str
    :param principal_type: Principal type. Possible values include: "App", "Group", "User".
    :type principal_type: str or ~azure.mgmt.kusto.models.PrincipalType
    :ivar tenant_name: The tenant name of the principal.
    :vartype tenant_name: str
    :ivar principal_name: The principal name.
    :vartype principal_name: str
    :ivar provisioning_state: The provisioned state of the resource. Possible values include:
     "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
    :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState
    """

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

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'principal_id': {'key': 'properties.principalId', 'type': 'str'},
        'role': {'key': 'properties.role', 'type': 'str'},
        'tenant_id': {'key': 'properties.tenantId', 'type': 'str'},
        'principal_type': {'key': 'properties.principalType', 'type': 'str'},
        'tenant_name': {'key': 'properties.tenantName', 'type': 'str'},
        'principal_name': {'key': 'properties.principalName', 'type': 'str'},
        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        principal_id: Optional[str] = None,
        role: Optional[Union[str, "DatabasePrincipalRole"]] = None,
        tenant_id: Optional[str] = None,
        principal_type: Optional[Union[str, "PrincipalType"]] = None,
        **kwargs
    ):
        super(DatabasePrincipalAssignment, self).__init__(**kwargs)
        self.principal_id = principal_id
        self.role = role
        self.tenant_id = tenant_id
        self.principal_type = principal_type
        self.tenant_name = None
        self.principal_name = None
        self.provisioning_state = None


class DatabasePrincipalAssignmentCheckNameRequest(msrest.serialization.Model):
    """A principal assignment check name availability request.

    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. Principal Assignment resource name.
    :type name: str
    :ivar type: Required. The type of resource,
     Microsoft.Kusto/clusters/databases/principalAssignments. Default value:
     "Microsoft.Kusto/clusters/databases/principalAssignments".
    :vartype type: str
    """

    _validation = {
        'name': {'required': True},
        'type': {'required': True, 'constant': True},
    }

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

    type = "Microsoft.Kusto/clusters/databases/principalAssignments"

    def __init__(
        self,
        *,
        name: str,
        **kwargs
    ):
        super(DatabasePrincipalAssignmentCheckNameRequest, self).__init__(**kwargs)
        self.name = name


class DatabasePrincipalAssignmentListResult(msrest.serialization.Model):
    """The list Kusto database principal assignments operation response.

    :param value: The list of Kusto database principal assignments.
    :type value: list[~azure.mgmt.kusto.models.DatabasePrincipalAssignment]
    """

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

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


class DatabasePrincipalListRequest(msrest.serialization.Model):
    """The list Kusto database principals operation request.

    :param value: The list of Kusto database principals.
    :type value: list[~azure.mgmt.kusto.models.DatabasePrincipal]
    """

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

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


class DatabasePrincipalListResult(msrest.serialization.Model):
    """The list Kusto database principals operation response.

    :param value: The list of Kusto database principals.
    :type value: list[~azure.mgmt.kusto.models.DatabasePrincipal]
    """

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

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


class DatabaseStatistics(msrest.serialization.Model):
    """A class that contains database statistics information.

    :param size: The database size - the total size of compressed data and index in bytes.
    :type size: float
    """

    _attribute_map = {
        'size': {'key': 'size', 'type': 'float'},
    }

    def __init__(
        self,
        *,
        size: Optional[float] = None,
        **kwargs
    ):
        super(DatabaseStatistics, self).__init__(**kwargs)
        self.size = size


class DataConnection(Resource):
    """Class representing an data connection.

    You probably want to use the sub-classes and not this class directly. Known
    sub-classes are: EventGridDataConnection, EventHubDataConnection, IotHubDataConnection.

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

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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :param location: Resource location.
    :type location: str
    :param kind: Required. Kind of the endpoint for the data connection.Constant filled by server.
     Possible values include: "EventHub", "EventGrid", "IotHub".
    :type kind: str or ~azure.mgmt.kusto.models.DataConnectionKind
    """

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

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

    _subtype_map = {
        'kind': {'EventGrid': 'EventGridDataConnection', 'EventHub': 'EventHubDataConnection', 'IotHub': 'IotHubDataConnection'}
    }

    def __init__(
        self,
        *,
        location: Optional[str] = None,
        **kwargs
    ):
        super(DataConnection, self).__init__(**kwargs)
        self.location = location
        self.kind = 'DataConnection'  # type: str


class DataConnectionCheckNameRequest(msrest.serialization.Model):
    """A data connection check name availability request.

    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. Data Connection name.
    :type name: str
    :ivar type: Required. The type of resource, Microsoft.Kusto/clusters/databases/dataConnections.
     Default value: "Microsoft.Kusto/clusters/databases/dataConnections".
    :vartype type: str
    """

    _validation = {
        'name': {'required': True},
        'type': {'required': True, 'constant': True},
    }

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

    type = "Microsoft.Kusto/clusters/databases/dataConnections"

    def __init__(
        self,
        *,
        name: str,
        **kwargs
    ):
        super(DataConnectionCheckNameRequest, self).__init__(**kwargs)
        self.name = name


class DataConnectionListResult(msrest.serialization.Model):
    """The list Kusto data connections operation response.

    :param value: The list of Kusto data connections.
    :type value: list[~azure.mgmt.kusto.models.DataConnection]
    """

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

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


class DataConnectionValidation(msrest.serialization.Model):
    """Class representing an data connection validation.

    :param data_connection_name: The name of the data connection.
    :type data_connection_name: str
    :param properties: The data connection properties to validate.
    :type properties: ~azure.mgmt.kusto.models.DataConnection
    """

    _attribute_map = {
        'data_connection_name': {'key': 'dataConnectionName', 'type': 'str'},
        'properties': {'key': 'properties', 'type': 'DataConnection'},
    }

    def __init__(
        self,
        *,
        data_connection_name: Optional[str] = None,
        properties: Optional["DataConnection"] = None,
        **kwargs
    ):
        super(DataConnectionValidation, self).__init__(**kwargs)
        self.data_connection_name = data_connection_name
        self.properties = properties


class DataConnectionValidationListResult(msrest.serialization.Model):
    """The list Kusto data connection validation result.

    :param value: The list of Kusto data connection validation errors.
    :type value: list[~azure.mgmt.kusto.models.DataConnectionValidationResult]
    """

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

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


class DataConnectionValidationResult(msrest.serialization.Model):
    """The result returned from a data connection validation request.

    :param error_message: A message which indicates a problem in data connection validation.
    :type error_message: str
    """

    _attribute_map = {
        'error_message': {'key': 'errorMessage', 'type': 'str'},
    }

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


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

    :param findings: The list of network connectivity diagnostic finding.
    :type findings: list[str]
    """

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

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


class EventGridDataConnection(DataConnection):
    """Class representing an Event Grid data connection.

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

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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :param location: Resource location.
    :type location: str
    :param kind: Required. Kind of the endpoint for the data connection.Constant filled by server.
     Possible values include: "EventHub", "EventGrid", "IotHub".
    :type kind: str or ~azure.mgmt.kusto.models.DataConnectionKind
    :param storage_account_resource_id: The resource ID of the storage account where the data
     resides.
    :type storage_account_resource_id: str
    :param event_hub_resource_id: The resource ID where the event grid is configured to send
     events.
    :type event_hub_resource_id: str
    :param consumer_group: The event hub consumer group.
    :type consumer_group: str
    :param table_name: The table where the data should be ingested. Optionally the table
     information can be added to each message.
    :type table_name: str
    :param mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the
     mapping information can be added to each message.
    :type mapping_rule_name: str
    :param data_format: The data format of the message. Optionally the data format can be added to
     each message. Possible values include: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV",
     "PSV", "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO",
     "W3CLOGFILE".
    :type data_format: str or ~azure.mgmt.kusto.models.EventGridDataFormat
    :param ignore_first_record: A Boolean value that, if set to true, indicates that ingestion
     should ignore the first record of every file.
    :type ignore_first_record: bool
    :param blob_storage_event_type: The name of blob storage event type to process. Possible values
     include: "Microsoft.Storage.BlobCreated", "Microsoft.Storage.BlobRenamed".
    :type blob_storage_event_type: str or ~azure.mgmt.kusto.models.BlobStorageEventType
    :ivar provisioning_state: The provisioned state of the resource. Possible values include:
     "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
    :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState
    """

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

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'location': {'key': 'location', 'type': 'str'},
        'kind': {'key': 'kind', 'type': 'str'},
        'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'},
        'event_hub_resource_id': {'key': 'properties.eventHubResourceId', 'type': 'str'},
        'consumer_group': {'key': 'properties.consumerGroup', 'type': 'str'},
        'table_name': {'key': 'properties.tableName', 'type': 'str'},
        'mapping_rule_name': {'key': 'properties.mappingRuleName', 'type': 'str'},
        'data_format': {'key': 'properties.dataFormat', 'type': 'str'},
        'ignore_first_record': {'key': 'properties.ignoreFirstRecord', 'type': 'bool'},
        'blob_storage_event_type': {'key': 'properties.blobStorageEventType', 'type': 'str'},
        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        location: Optional[str] = None,
        storage_account_resource_id: Optional[str] = None,
        event_hub_resource_id: Optional[str] = None,
        consumer_group: Optional[str] = None,
        table_name: Optional[str] = None,
        mapping_rule_name: Optional[str] = None,
        data_format: Optional[Union[str, "EventGridDataFormat"]] = None,
        ignore_first_record: Optional[bool] = None,
        blob_storage_event_type: Optional[Union[str, "BlobStorageEventType"]] = None,
        **kwargs
    ):
        super(EventGridDataConnection, self).__init__(location=location, **kwargs)
        self.kind = 'EventGrid'  # type: str
        self.storage_account_resource_id = storage_account_resource_id
        self.event_hub_resource_id = event_hub_resource_id
        self.consumer_group = consumer_group
        self.table_name = table_name
        self.mapping_rule_name = mapping_rule_name
        self.data_format = data_format
        self.ignore_first_record = ignore_first_record
        self.blob_storage_event_type = blob_storage_event_type
        self.provisioning_state = None


class EventHubDataConnection(DataConnection):
    """Class representing an event hub data connection.

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

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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :param location: Resource location.
    :type location: str
    :param kind: Required. Kind of the endpoint for the data connection.Constant filled by server.
     Possible values include: "EventHub", "EventGrid", "IotHub".
    :type kind: str or ~azure.mgmt.kusto.models.DataConnectionKind
    :param event_hub_resource_id: The resource ID of the event hub to be used to create a data
     connection.
    :type event_hub_resource_id: str
    :param consumer_group: The event hub consumer group.
    :type consumer_group: str
    :param table_name: The table where the data should be ingested. Optionally the table
     information can be added to each message.
    :type table_name: str
    :param mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the
     mapping information can be added to each message.
    :type mapping_rule_name: str
    :param data_format: The data format of the message. Optionally the data format can be added to
     each message. Possible values include: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV",
     "PSV", "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO",
     "W3CLOGFILE".
    :type data_format: str or ~azure.mgmt.kusto.models.EventHubDataFormat
    :param event_system_properties: System properties of the event hub.
    :type event_system_properties: list[str]
    :param compression: The event hub messages compression type. Possible values include: "None",
     "GZip".
    :type compression: str or ~azure.mgmt.kusto.models.Compression
    :ivar provisioning_state: The provisioned state of the resource. Possible values include:
     "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
    :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState
    """

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

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'location': {'key': 'location', 'type': 'str'},
        'kind': {'key': 'kind', 'type': 'str'},
        'event_hub_resource_id': {'key': 'properties.eventHubResourceId', 'type': 'str'},
        'consumer_group': {'key': 'properties.consumerGroup', 'type': 'str'},
        'table_name': {'key': 'properties.tableName', 'type': 'str'},
        'mapping_rule_name': {'key': 'properties.mappingRuleName', 'type': 'str'},
        'data_format': {'key': 'properties.dataFormat', 'type': 'str'},
        'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'},
        'compression': {'key': 'properties.compression', 'type': 'str'},
        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        location: Optional[str] = None,
        event_hub_resource_id: Optional[str] = None,
        consumer_group: Optional[str] = None,
        table_name: Optional[str] = None,
        mapping_rule_name: Optional[str] = None,
        data_format: Optional[Union[str, "EventHubDataFormat"]] = None,
        event_system_properties: Optional[List[str]] = None,
        compression: Optional[Union[str, "Compression"]] = None,
        **kwargs
    ):
        super(EventHubDataConnection, self).__init__(location=location, **kwargs)
        self.kind = 'EventHub'  # type: str
        self.event_hub_resource_id = event_hub_resource_id
        self.consumer_group = consumer_group
        self.table_name = table_name
        self.mapping_rule_name = mapping_rule_name
        self.data_format = data_format
        self.event_system_properties = event_system_properties
        self.compression = compression
        self.provisioning_state = None


class FollowerDatabaseDefinition(msrest.serialization.Model):
    """A class representing follower database request.

    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 cluster_resource_id: Required. Resource id of the cluster that follows a database owned
     by this cluster.
    :type cluster_resource_id: str
    :param attached_database_configuration_name: Required. Resource name of the attached database
     configuration in the follower cluster.
    :type attached_database_configuration_name: str
    :ivar database_name: The database name owned by this cluster that was followed. * in case
     following all databases.
    :vartype database_name: str
    """

    _validation = {
        'cluster_resource_id': {'required': True},
        'attached_database_configuration_name': {'required': True},
        'database_name': {'readonly': True},
    }

    _attribute_map = {
        'cluster_resource_id': {'key': 'clusterResourceId', 'type': 'str'},
        'attached_database_configuration_name': {'key': 'attachedDatabaseConfigurationName', 'type': 'str'},
        'database_name': {'key': 'databaseName', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        cluster_resource_id: str,
        attached_database_configuration_name: str,
        **kwargs
    ):
        super(FollowerDatabaseDefinition, self).__init__(**kwargs)
        self.cluster_resource_id = cluster_resource_id
        self.attached_database_configuration_name = attached_database_configuration_name
        self.database_name = None


class FollowerDatabaseListResult(msrest.serialization.Model):
    """The list Kusto database principals operation response.

    :param value: The list of follower database result.
    :type value: list[~azure.mgmt.kusto.models.FollowerDatabaseDefinition]
    """

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

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


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

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

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

    :ivar principal_id: The principal ID of resource identity.
    :vartype principal_id: str
    :ivar tenant_id: The tenant ID of resource.
    :vartype tenant_id: str
    :param type: Required. The type of managed identity used. The type 'SystemAssigned,
     UserAssigned' includes both an implicitly created identity and a set of user-assigned
     identities. The type 'None' will remove all identities. Possible values include: "None",
     "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned".
    :type type: str or ~azure.mgmt.kusto.models.IdentityType
    :param user_assigned_identities: The list of user identities associated with the Kusto 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.kusto.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]
    """

    _validation = {
        'principal_id': {'readonly': True},
        'tenant_id': {'readonly': True},
        'type': {'required': 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': '{ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties}'},
    }

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


class IotHubDataConnection(DataConnection):
    """Class representing an iot hub data connection.

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

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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :param location: Resource location.
    :type location: str
    :param kind: Required. Kind of the endpoint for the data connection.Constant filled by server.
     Possible values include: "EventHub", "EventGrid", "IotHub".
    :type kind: str or ~azure.mgmt.kusto.models.DataConnectionKind
    :param iot_hub_resource_id: The resource ID of the Iot hub to be used to create a data
     connection.
    :type iot_hub_resource_id: str
    :param consumer_group: The iot hub consumer group.
    :type consumer_group: str
    :param table_name: The table where the data should be ingested. Optionally the table
     information can be added to each message.
    :type table_name: str
    :param mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the
     mapping information can be added to each message.
    :type mapping_rule_name: str
    :param data_format: The data format of the message. Optionally the data format can be added to
     each message. Possible values include: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV",
     "PSV", "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO",
     "W3CLOGFILE".
    :type data_format: str or ~azure.mgmt.kusto.models.IotHubDataFormat
    :param event_system_properties: System properties of the iot hub.
    :type event_system_properties: list[str]
    :param shared_access_policy_name: The name of the share access policy.
    :type shared_access_policy_name: str
    :ivar provisioning_state: The provisioned state of the resource. Possible values include:
     "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
    :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState
    """

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

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'location': {'key': 'location', 'type': 'str'},
        'kind': {'key': 'kind', 'type': 'str'},
        'iot_hub_resource_id': {'key': 'properties.iotHubResourceId', 'type': 'str'},
        'consumer_group': {'key': 'properties.consumerGroup', 'type': 'str'},
        'table_name': {'key': 'properties.tableName', 'type': 'str'},
        'mapping_rule_name': {'key': 'properties.mappingRuleName', 'type': 'str'},
        'data_format': {'key': 'properties.dataFormat', 'type': 'str'},
        'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'},
        'shared_access_policy_name': {'key': 'properties.sharedAccessPolicyName', 'type': 'str'},
        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        location: Optional[str] = None,
        iot_hub_resource_id: Optional[str] = None,
        consumer_group: Optional[str] = None,
        table_name: Optional[str] = None,
        mapping_rule_name: Optional[str] = None,
        data_format: Optional[Union[str, "IotHubDataFormat"]] = None,
        event_system_properties: Optional[List[str]] = None,
        shared_access_policy_name: Optional[str] = None,
        **kwargs
    ):
        super(IotHubDataConnection, self).__init__(location=location, **kwargs)
        self.kind = 'IotHub'  # type: str
        self.iot_hub_resource_id = iot_hub_resource_id
        self.consumer_group = consumer_group
        self.table_name = table_name
        self.mapping_rule_name = mapping_rule_name
        self.data_format = data_format
        self.event_system_properties = event_system_properties
        self.shared_access_policy_name = shared_access_policy_name
        self.provisioning_state = None


class KeyVaultProperties(msrest.serialization.Model):
    """Properties of the key vault.

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

    :param key_name: Required. The name of the key vault key.
    :type key_name: str
    :param key_version: The version of the key vault key.
    :type key_version: str
    :param key_vault_uri: Required. The Uri of the key vault.
    :type key_vault_uri: str
    :param user_identity: The user assigned identity (ARM resource id) that has access to the key.
    :type user_identity: str
    """

    _validation = {
        'key_name': {'required': True},
        'key_vault_uri': {'required': True},
    }

    _attribute_map = {
        'key_name': {'key': 'keyName', 'type': 'str'},
        'key_version': {'key': 'keyVersion', 'type': 'str'},
        'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'},
        'user_identity': {'key': 'userIdentity', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        key_name: str,
        key_vault_uri: str,
        key_version: Optional[str] = None,
        user_identity: Optional[str] = None,
        **kwargs
    ):
        super(KeyVaultProperties, self).__init__(**kwargs)
        self.key_name = key_name
        self.key_version = key_version
        self.key_vault_uri = key_vault_uri
        self.user_identity = user_identity


class LanguageExtension(msrest.serialization.Model):
    """The language extension object.

    :param language_extension_name: The language extension name. Possible values include: "PYTHON",
     "R".
    :type language_extension_name: str or ~azure.mgmt.kusto.models.LanguageExtensionName
    """

    _attribute_map = {
        'language_extension_name': {'key': 'languageExtensionName', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        language_extension_name: Optional[Union[str, "LanguageExtensionName"]] = None,
        **kwargs
    ):
        super(LanguageExtension, self).__init__(**kwargs)
        self.language_extension_name = language_extension_name


class LanguageExtensionsList(msrest.serialization.Model):
    """The list of language extension objects.

    :param value: The list of language extensions.
    :type value: list[~azure.mgmt.kusto.models.LanguageExtension]
    """

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

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


class ListResourceSkusResult(msrest.serialization.Model):
    """List of available SKUs for a Kusto Cluster.

    :param value: The collection of available SKUs for an existing resource.
    :type value: list[~azure.mgmt.kusto.models.AzureResourceSku]
    """

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

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


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

    :param name: This is of the format {provider}/{resource}/{operation}.
    :type name: str
    :param display: The object that describes the operation.
    :type display: ~azure.mgmt.kusto.models.OperationDisplay
    :param origin: The intended executor of the operation.
    :type origin: str
    :param properties: Any object.
    :type properties: object
    """

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

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


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

    :param provider: Friendly name of the resource provider.
    :type provider: str
    :param operation: For example: read, write, delete.
    :type operation: str
    :param resource: The resource type on which the operation is performed.
    :type resource: str
    :param description: The friendly name of the operation.
    :type description: str
    """

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

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


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

    :param value: The list of operations supported by the resource provider.
    :type value: list[~azure.mgmt.kusto.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 OptimizedAutoscale(msrest.serialization.Model):
    """A class that contains the optimized auto scale definition.

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

    :param version: Required. The version of the template defined, for instance 1.
    :type version: int
    :param is_enabled: Required. A boolean value that indicate if the optimized autoscale feature
     is enabled or not.
    :type is_enabled: bool
    :param minimum: Required. Minimum allowed instances count.
    :type minimum: int
    :param maximum: Required. Maximum allowed instances count.
    :type maximum: int
    """

    _validation = {
        'version': {'required': True},
        'is_enabled': {'required': True},
        'minimum': {'required': True},
        'maximum': {'required': True},
    }

    _attribute_map = {
        'version': {'key': 'version', 'type': 'int'},
        'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
        'minimum': {'key': 'minimum', 'type': 'int'},
        'maximum': {'key': 'maximum', 'type': 'int'},
    }

    def __init__(
        self,
        *,
        version: int,
        is_enabled: bool,
        minimum: int,
        maximum: int,
        **kwargs
    ):
        super(OptimizedAutoscale, self).__init__(**kwargs)
        self.version = version
        self.is_enabled = is_enabled
        self.minimum = minimum
        self.maximum = maximum


class ProxyResource(Resource):
    """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location.

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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :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 ReadOnlyFollowingDatabase(Database):
    """Class representing a read only following database.

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

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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :param location: Resource location.
    :type location: str
    :param kind: Required. Kind of the database.Constant filled by server.  Possible values
     include: "ReadWrite", "ReadOnlyFollowing".
    :type kind: str or ~azure.mgmt.kusto.models.Kind
    :ivar provisioning_state: The provisioned state of the resource. Possible values include:
     "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
    :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState
    :ivar soft_delete_period: The time the data should be kept before it stops being accessible to
     queries in TimeSpan.
    :vartype soft_delete_period: ~datetime.timedelta
    :param hot_cache_period: The time the data should be kept in cache for fast queries in
     TimeSpan.
    :type hot_cache_period: ~datetime.timedelta
    :ivar statistics: The statistics of the database.
    :vartype statistics: ~azure.mgmt.kusto.models.DatabaseStatistics
    :ivar leader_cluster_resource_id: The name of the leader cluster.
    :vartype leader_cluster_resource_id: str
    :ivar attached_database_configuration_name: The name of the attached database configuration
     cluster.
    :vartype attached_database_configuration_name: str
    :ivar principals_modification_kind: The principals modification kind of the database. Possible
     values include: "Union", "Replace", "None".
    :vartype principals_modification_kind: str or
     ~azure.mgmt.kusto.models.PrincipalsModificationKind
    """

    _validation = {
        'id': {'readonly': True},
        'name': {'readonly': True},
        'type': {'readonly': True},
        'kind': {'required': True},
        'provisioning_state': {'readonly': True},
        'soft_delete_period': {'readonly': True},
        'statistics': {'readonly': True},
        'leader_cluster_resource_id': {'readonly': True},
        'attached_database_configuration_name': {'readonly': True},
        'principals_modification_kind': {'readonly': True},
    }

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'location': {'key': 'location', 'type': 'str'},
        'kind': {'key': 'kind', 'type': 'str'},
        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
        'soft_delete_period': {'key': 'properties.softDeletePeriod', 'type': 'duration'},
        'hot_cache_period': {'key': 'properties.hotCachePeriod', 'type': 'duration'},
        'statistics': {'key': 'properties.statistics', 'type': 'DatabaseStatistics'},
        'leader_cluster_resource_id': {'key': 'properties.leaderClusterResourceId', 'type': 'str'},
        'attached_database_configuration_name': {'key': 'properties.attachedDatabaseConfigurationName', 'type': 'str'},
        'principals_modification_kind': {'key': 'properties.principalsModificationKind', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        location: Optional[str] = None,
        hot_cache_period: Optional[datetime.timedelta] = None,
        **kwargs
    ):
        super(ReadOnlyFollowingDatabase, self).__init__(location=location, **kwargs)
        self.kind = 'ReadOnlyFollowing'  # type: str
        self.provisioning_state = None
        self.soft_delete_period = None
        self.hot_cache_period = hot_cache_period
        self.statistics = None
        self.leader_cluster_resource_id = None
        self.attached_database_configuration_name = None
        self.principals_modification_kind = None


class ReadWriteDatabase(Database):
    """Class representing a read write database.

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

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

    :ivar id: Fully qualified resource ID for the resource. Ex -
     /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
    :vartype id: str
    :ivar name: The name of the resource.
    :vartype name: str
    :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
     "Microsoft.Storage/storageAccounts".
    :vartype type: str
    :param location: Resource location.
    :type location: str
    :param kind: Required. Kind of the database.Constant filled by server.  Possible values
     include: "ReadWrite", "ReadOnlyFollowing".
    :type kind: str or ~azure.mgmt.kusto.models.Kind
    :ivar provisioning_state: The provisioned state of the resource. Possible values include:
     "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving".
    :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState
    :param soft_delete_period: The time the data should be kept before it stops being accessible to
     queries in TimeSpan.
    :type soft_delete_period: ~datetime.timedelta
    :param hot_cache_period: The time the data should be kept in cache for fast queries in
     TimeSpan.
    :type hot_cache_period: ~datetime.timedelta
    :ivar statistics: The statistics of the database.
    :vartype statistics: ~azure.mgmt.kusto.models.DatabaseStatistics
    :ivar is_followed: Indicates whether the database is followed.
    :vartype is_followed: bool
    """

    _validation = {
        'id': {'readonly': True},
        'name': {'readonly': True},
        'type': {'readonly': True},
        'kind': {'required': True},
        'provisioning_state': {'readonly': True},
        'statistics': {'readonly': True},
        'is_followed': {'readonly': True},
    }

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'type': {'key': 'type', 'type': 'str'},
        'location': {'key': 'location', 'type': 'str'},
        'kind': {'key': 'kind', 'type': 'str'},
        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
        'soft_delete_period': {'key': 'properties.softDeletePeriod', 'type': 'duration'},
        'hot_cache_period': {'key': 'properties.hotCachePeriod', 'type': 'duration'},
        'statistics': {'key': 'properties.statistics', 'type': 'DatabaseStatistics'},
        'is_followed': {'key': 'properties.isFollowed', 'type': 'bool'},
    }

    def __init__(
        self,
        *,
        location: Optional[str] = None,
        soft_delete_period: Optional[datetime.timedelta] = None,
        hot_cache_period: Optional[datetime.timedelta] = None,
        **kwargs
    ):
        super(ReadWriteDatabase, self).__init__(location=location, **kwargs)
        self.kind = 'ReadWrite'  # type: str
        self.provisioning_state = None
        self.soft_delete_period = soft_delete_period
        self.hot_cache_period = hot_cache_period
        self.statistics = None
        self.is_followed = None


class SkuDescription(msrest.serialization.Model):
    """The Kusto SKU description of given resource type.

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

    :ivar resource_type: The resource type.
    :vartype resource_type: str
    :ivar name: The name of the SKU.
    :vartype name: str
    :ivar tier: The tier of the SKU.
    :vartype tier: str
    :ivar locations: The set of locations that the SKU is available.
    :vartype locations: list[str]
    :ivar location_info: Locations and zones.
    :vartype location_info: list[~azure.mgmt.kusto.models.SkuLocationInfoItem]
    :ivar restrictions: The restrictions because of which SKU cannot be used.
    :vartype restrictions: list[object]
    """

    _validation = {
        'resource_type': {'readonly': True},
        'name': {'readonly': True},
        'tier': {'readonly': True},
        'locations': {'readonly': True},
        'location_info': {'readonly': True},
        'restrictions': {'readonly': True},
    }

    _attribute_map = {
        'resource_type': {'key': 'resourceType', 'type': 'str'},
        'name': {'key': 'name', 'type': 'str'},
        'tier': {'key': 'tier', 'type': 'str'},
        'locations': {'key': 'locations', 'type': '[str]'},
        'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfoItem]'},
        'restrictions': {'key': 'restrictions', 'type': '[object]'},
    }

    def __init__(
        self,
        **kwargs
    ):
        super(SkuDescription, self).__init__(**kwargs)
        self.resource_type = None
        self.name = None
        self.tier = None
        self.locations = None
        self.location_info = None
        self.restrictions = None


class SkuDescriptionList(msrest.serialization.Model):
    """The list of the EngagementFabric SKU descriptions.

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

    :ivar value: SKU descriptions.
    :vartype value: list[~azure.mgmt.kusto.models.SkuDescription]
    """

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

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

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


class SkuLocationInfoItem(msrest.serialization.Model):
    """The locations and zones info for SKU.

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

    :param location: Required. The available location of the SKU.
    :type location: str
    :param zones: The available zone of the SKU.
    :type zones: list[str]
    """

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

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

    def __init__(
        self,
        *,
        location: str,
        zones: Optional[List[str]] = None,
        **kwargs
    ):
        super(SkuLocationInfoItem, self).__init__(**kwargs)
        self.location = location
        self.zones = zones


class TrustedExternalTenant(msrest.serialization.Model):
    """Represents a tenant ID that is trusted by the cluster.

    :param value: GUID representing an external tenant.
    :type value: str
    """

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

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


class VirtualNetworkConfiguration(msrest.serialization.Model):
    """A class that contains virtual network definition.

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

    :param subnet_id: Required. The subnet resource id.
    :type subnet_id: str
    :param engine_public_ip_id: Required. Engine service's public IP address resource id.
    :type engine_public_ip_id: str
    :param data_management_public_ip_id: Required. Data management's service public IP address
     resource id.
    :type data_management_public_ip_id: str
    """

    _validation = {
        'subnet_id': {'required': True},
        'engine_public_ip_id': {'required': True},
        'data_management_public_ip_id': {'required': True},
    }

    _attribute_map = {
        'subnet_id': {'key': 'subnetId', 'type': 'str'},
        'engine_public_ip_id': {'key': 'enginePublicIpId', 'type': 'str'},
        'data_management_public_ip_id': {'key': 'dataManagementPublicIpId', 'type': 'str'},
    }

    def __init__(
        self,
        *,
        subnet_id: str,
        engine_public_ip_id: str,
        data_management_public_ip_id: str,
        **kwargs
    ):
        super(VirtualNetworkConfiguration, self).__init__(**kwargs)
        self.subnet_id = subnet_id
        self.engine_public_ip_id = engine_public_ip_id
        self.data_management_public_ip_id = data_management_public_ip_id
