# pylint: disable=line-too-long,useless-suppression,too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.41.3)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from collections.abc import MutableMapping
import datetime
from typing import Any, Optional, TYPE_CHECKING, Union

from .._utils import serialization as _serialization

if TYPE_CHECKING:
    from .. import models as _models
JSON = MutableMapping[str, Any]


class AnalyzedTokenInfo(_serialization.Model):
    """Information about a token returned by an analyzer.

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

    :ivar token: The token returned by the analyzer. Required.
    :vartype token: str
    :ivar start_offset: The index of the first character of the token in the input text. Required.
    :vartype start_offset: int
    :ivar end_offset: The index of the last character of the token in the input text. Required.
    :vartype end_offset: int
    :ivar position: The position of the token in the input text relative to other tokens. The first
     token in the input text has position 0, the next has position 1, and so on. Depending on the
     analyzer used, some tokens might have the same position, for example if they are synonyms of
     each other. Required.
    :vartype position: int
    """

    _validation = {
        "token": {"required": True, "readonly": True},
        "start_offset": {"required": True, "readonly": True},
        "end_offset": {"required": True, "readonly": True},
        "position": {"required": True, "readonly": True},
    }

    _attribute_map = {
        "token": {"key": "token", "type": "str"},
        "start_offset": {"key": "startOffset", "type": "int"},
        "end_offset": {"key": "endOffset", "type": "int"},
        "position": {"key": "position", "type": "int"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.token: Optional[str] = None
        self.start_offset: Optional[int] = None
        self.end_offset: Optional[int] = None
        self.position: Optional[int] = None


class AnalyzeRequest(_serialization.Model):
    """Specifies some text and analysis components used to break that text into tokens.

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

    :ivar text: The text to break into tokens. Required.
    :vartype text: str
    :ivar analyzer: The name of the analyzer to use to break the given text. If this parameter is
     not specified, you must specify a tokenizer instead. The tokenizer and analyzer parameters are
     mutually exclusive. Known values are: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft",
     "eu.lucene", "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft",
     "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft",
     "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft",
     "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene",
     "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft",
     "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft",
     "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft",
     "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene",
     "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene",
     "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft",
     "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene",
     "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft",
     "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft",
     "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft",
     "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", and
     "whitespace".
    :vartype analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName
    :ivar tokenizer: The name of the tokenizer to use to break the given text. If this parameter is
     not specified, you must specify an analyzer instead. The tokenizer and analyzer parameters are
     mutually exclusive. Known values are: "classic", "edgeNGram", "keyword_v2", "letter",
     "lowercase", "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", "nGram",
     "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", and "whitespace".
    :vartype tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName
    :ivar normalizer: The name of the normalizer to use to normalize the given text. Known values
     are: "asciifolding", "elision", "lowercase", "standard", and "uppercase".
    :vartype normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName
    :ivar token_filters: An optional list of token filters to use when breaking the given text.
     This parameter can only be set when using the tokenizer parameter.
    :vartype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName]
    :ivar char_filters: An optional list of character filters to use when breaking the given text.
     This parameter can only be set when using the tokenizer parameter.
    :vartype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName]
    """

    _validation = {
        "text": {"required": True},
    }

    _attribute_map = {
        "text": {"key": "text", "type": "str"},
        "analyzer": {"key": "analyzer", "type": "str"},
        "tokenizer": {"key": "tokenizer", "type": "str"},
        "normalizer": {"key": "normalizer", "type": "str"},
        "token_filters": {"key": "tokenFilters", "type": "[str]"},
        "char_filters": {"key": "charFilters", "type": "[str]"},
    }

    def __init__(
        self,
        *,
        text: str,
        analyzer: Optional[Union[str, "_models.LexicalAnalyzerName"]] = None,
        tokenizer: Optional[Union[str, "_models.LexicalTokenizerName"]] = None,
        normalizer: Optional[Union[str, "_models.LexicalNormalizerName"]] = None,
        token_filters: Optional[list[Union[str, "_models.TokenFilterName"]]] = None,
        char_filters: Optional[list[Union[str, "_models.CharFilterName"]]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword text: The text to break into tokens. Required.
        :paramtype text: str
        :keyword analyzer: The name of the analyzer to use to break the given text. If this parameter
         is not specified, you must specify a tokenizer instead. The tokenizer and analyzer parameters
         are mutually exclusive. Known values are: "ar.microsoft", "ar.lucene", "hy.lucene",
         "bn.microsoft", "eu.lucene", "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene",
         "zh-Hans.microsoft", "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft",
         "cs.microsoft", "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene",
         "en.microsoft", "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft",
         "fr.lucene", "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene",
         "gu.microsoft", "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene",
         "is.microsoft", "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene",
         "ja.microsoft", "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft",
         "lv.lucene", "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft",
         "no.lucene", "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene",
         "pt-PT.microsoft", "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft",
         "ru.lucene", "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft",
         "es.microsoft", "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft",
         "th.microsoft", "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft",
         "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern",
         "simple", "stop", and "whitespace".
        :paramtype analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName
        :keyword tokenizer: The name of the tokenizer to use to break the given text. If this parameter
         is not specified, you must specify an analyzer instead. The tokenizer and analyzer parameters
         are mutually exclusive. Known values are: "classic", "edgeNGram", "keyword_v2", "letter",
         "lowercase", "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", "nGram",
         "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", and "whitespace".
        :paramtype tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName
        :keyword normalizer: The name of the normalizer to use to normalize the given text. Known
         values are: "asciifolding", "elision", "lowercase", "standard", and "uppercase".
        :paramtype normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName
        :keyword token_filters: An optional list of token filters to use when breaking the given text.
         This parameter can only be set when using the tokenizer parameter.
        :paramtype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName]
        :keyword char_filters: An optional list of character filters to use when breaking the given
         text. This parameter can only be set when using the tokenizer parameter.
        :paramtype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName]
        """
        super().__init__(**kwargs)
        self.text = text
        self.analyzer = analyzer
        self.tokenizer = tokenizer
        self.normalizer = normalizer
        self.token_filters = token_filters
        self.char_filters = char_filters


class AnalyzeResult(_serialization.Model):
    """The result of testing an analyzer on text.

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

    :ivar tokens: The list of tokens returned by the analyzer specified in the request. Required.
    :vartype tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo]
    """

    _validation = {
        "tokens": {"required": True},
    }

    _attribute_map = {
        "tokens": {"key": "tokens", "type": "[AnalyzedTokenInfo]"},
    }

    def __init__(self, *, tokens: list["_models.AnalyzedTokenInfo"], **kwargs: Any) -> None:
        """
        :keyword tokens: The list of tokens returned by the analyzer specified in the request.
         Required.
        :paramtype tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo]
        """
        super().__init__(**kwargs)
        self.tokens = tokens


class TokenFilter(_serialization.Model):
    """Base type for token filters.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    AsciiFoldingTokenFilter, CjkBigramTokenFilter, CommonGramTokenFilter,
    DictionaryDecompounderTokenFilter, EdgeNGramTokenFilter, EdgeNGramTokenFilterV2,
    ElisionTokenFilter, KeepTokenFilter, KeywordMarkerTokenFilter, LengthTokenFilter,
    LimitTokenFilter, NGramTokenFilter, NGramTokenFilterV2, PatternCaptureTokenFilter,
    PatternReplaceTokenFilter, PhoneticTokenFilter, ShingleTokenFilter, SnowballTokenFilter,
    StemmerOverrideTokenFilter, StemmerTokenFilter, StopwordsTokenFilter, SynonymTokenFilter,
    TruncateTokenFilter, UniqueTokenFilter, WordDelimiterTokenFilter

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
    }

    _subtype_map = {
        "odata_type": {
            "#Microsoft.Azure.Search.AsciiFoldingTokenFilter": "AsciiFoldingTokenFilter",
            "#Microsoft.Azure.Search.CjkBigramTokenFilter": "CjkBigramTokenFilter",
            "#Microsoft.Azure.Search.CommonGramTokenFilter": "CommonGramTokenFilter",
            "#Microsoft.Azure.Search.DictionaryDecompounderTokenFilter": "DictionaryDecompounderTokenFilter",
            "#Microsoft.Azure.Search.EdgeNGramTokenFilter": "EdgeNGramTokenFilter",
            "#Microsoft.Azure.Search.EdgeNGramTokenFilterV2": "EdgeNGramTokenFilterV2",
            "#Microsoft.Azure.Search.ElisionTokenFilter": "ElisionTokenFilter",
            "#Microsoft.Azure.Search.KeepTokenFilter": "KeepTokenFilter",
            "#Microsoft.Azure.Search.KeywordMarkerTokenFilter": "KeywordMarkerTokenFilter",
            "#Microsoft.Azure.Search.LengthTokenFilter": "LengthTokenFilter",
            "#Microsoft.Azure.Search.LimitTokenFilter": "LimitTokenFilter",
            "#Microsoft.Azure.Search.NGramTokenFilter": "NGramTokenFilter",
            "#Microsoft.Azure.Search.NGramTokenFilterV2": "NGramTokenFilterV2",
            "#Microsoft.Azure.Search.PatternCaptureTokenFilter": "PatternCaptureTokenFilter",
            "#Microsoft.Azure.Search.PatternReplaceTokenFilter": "PatternReplaceTokenFilter",
            "#Microsoft.Azure.Search.PhoneticTokenFilter": "PhoneticTokenFilter",
            "#Microsoft.Azure.Search.ShingleTokenFilter": "ShingleTokenFilter",
            "#Microsoft.Azure.Search.SnowballTokenFilter": "SnowballTokenFilter",
            "#Microsoft.Azure.Search.StemmerOverrideTokenFilter": "StemmerOverrideTokenFilter",
            "#Microsoft.Azure.Search.StemmerTokenFilter": "StemmerTokenFilter",
            "#Microsoft.Azure.Search.StopwordsTokenFilter": "StopwordsTokenFilter",
            "#Microsoft.Azure.Search.SynonymTokenFilter": "SynonymTokenFilter",
            "#Microsoft.Azure.Search.TruncateTokenFilter": "TruncateTokenFilter",
            "#Microsoft.Azure.Search.UniqueTokenFilter": "UniqueTokenFilter",
            "#Microsoft.Azure.Search.WordDelimiterTokenFilter": "WordDelimiterTokenFilter",
        }
    }

    def __init__(self, *, name: str, **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        """
        super().__init__(**kwargs)
        self.odata_type: Optional[str] = None
        self.name = name


class AsciiFoldingTokenFilter(TokenFilter):
    """Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127
    ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if such
    equivalents exist. This token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar preserve_original: A value indicating whether the original token will be kept. Default is
     false.
    :vartype preserve_original: bool
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "preserve_original": {"key": "preserveOriginal", "type": "bool"},
    }

    def __init__(self, *, name: str, preserve_original: bool = False, **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword preserve_original: A value indicating whether the original token will be kept. Default
         is false.
        :paramtype preserve_original: bool
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.AsciiFoldingTokenFilter"
        self.preserve_original = preserve_original


class AzureActiveDirectoryApplicationCredentials(_serialization.Model):  # pylint: disable=name-too-long
    """Credentials of a registered application created for your search service, used for authenticated
    access to the encryption keys stored in Azure Key Vault.

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

    :ivar application_id: An AAD Application ID that was granted the required access permissions to
     the Azure Key Vault that is to be used when encrypting your data at rest. The Application ID
     should not be confused with the Object ID for your AAD Application. Required.
    :vartype application_id: str
    :ivar application_secret: The authentication key of the specified AAD application.
    :vartype application_secret: str
    """

    _validation = {
        "application_id": {"required": True},
    }

    _attribute_map = {
        "application_id": {"key": "applicationId", "type": "str"},
        "application_secret": {"key": "applicationSecret", "type": "str"},
    }

    def __init__(self, *, application_id: str, application_secret: Optional[str] = None, **kwargs: Any) -> None:
        """
        :keyword application_id: An AAD Application ID that was granted the required access permissions
         to the Azure Key Vault that is to be used when encrypting your data at rest. The Application ID
         should not be confused with the Object ID for your AAD Application. Required.
        :paramtype application_id: str
        :keyword application_secret: The authentication key of the specified AAD application.
        :paramtype application_secret: str
        """
        super().__init__(**kwargs)
        self.application_id = application_id
        self.application_secret = application_secret


class AzureOpenAIVectorizerParameters(_serialization.Model):
    """Specifies the parameters for connecting to the Azure OpenAI resource.

    :ivar resource_url: The resource URI of the Azure OpenAI resource.
    :vartype resource_url: str
    :ivar deployment_name: ID of the Azure OpenAI model deployment on the designated resource.
    :vartype deployment_name: str
    :ivar api_key: API key of the designated Azure OpenAI resource.
    :vartype api_key: str
    :ivar auth_identity: The user-assigned managed identity used for outbound connections.
    :vartype auth_identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity
    :ivar model_name: The name of the embedding model that is deployed at the provided deploymentId
     path. Known values are: "text-embedding-ada-002", "text-embedding-3-large", and
     "text-embedding-3-small".
    :vartype model_name: str or ~azure.search.documents.indexes.models.AzureOpenAIModelName
    """

    _attribute_map = {
        "resource_url": {"key": "resourceUri", "type": "str"},
        "deployment_name": {"key": "deploymentId", "type": "str"},
        "api_key": {"key": "apiKey", "type": "str"},
        "auth_identity": {"key": "authIdentity", "type": "SearchIndexerDataIdentity"},
        "model_name": {"key": "modelName", "type": "str"},
    }

    def __init__(
        self,
        *,
        resource_url: Optional[str] = None,
        deployment_name: Optional[str] = None,
        api_key: Optional[str] = None,
        auth_identity: Optional["_models.SearchIndexerDataIdentity"] = None,
        model_name: Optional[Union[str, "_models.AzureOpenAIModelName"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword resource_url: The resource URI of the Azure OpenAI resource.
        :paramtype resource_url: str
        :keyword deployment_name: ID of the Azure OpenAI model deployment on the designated resource.
        :paramtype deployment_name: str
        :keyword api_key: API key of the designated Azure OpenAI resource.
        :paramtype api_key: str
        :keyword auth_identity: The user-assigned managed identity used for outbound connections.
        :paramtype auth_identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity
        :keyword model_name: The name of the embedding model that is deployed at the provided
         deploymentId path. Known values are: "text-embedding-ada-002", "text-embedding-3-large", and
         "text-embedding-3-small".
        :paramtype model_name: str or ~azure.search.documents.indexes.models.AzureOpenAIModelName
        """
        super().__init__(**kwargs)
        self.resource_url = resource_url
        self.deployment_name = deployment_name
        self.api_key = api_key
        self.auth_identity = auth_identity
        self.model_name = model_name


class SearchIndexerSkill(_serialization.Model):
    """Base type for skills.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    WebApiSkill, AzureOpenAIEmbeddingSkill, CustomEntityLookupSkill, EntityRecognitionSkill,
    KeyPhraseExtractionSkill, LanguageDetectionSkill, MergeSkill, PIIDetectionSkill,
    SentimentSkill, SplitSkill, TextTranslationSkill, EntityLinkingSkill, EntityRecognitionSkillV3,
    SentimentSkillV3, ConditionalSkill, DocumentExtractionSkill, DocumentIntelligenceLayoutSkill,
    ShaperSkill, ImageAnalysisSkill, OcrSkill

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
    }

    _subtype_map = {
        "odata_type": {
            "#Microsoft.Skills.Custom.WebApiSkill": "WebApiSkill",
            "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill": "AzureOpenAIEmbeddingSkill",
            "#Microsoft.Skills.Text.CustomEntityLookupSkill": "CustomEntityLookupSkill",
            "#Microsoft.Skills.Text.EntityRecognitionSkill": "EntityRecognitionSkill",
            "#Microsoft.Skills.Text.KeyPhraseExtractionSkill": "KeyPhraseExtractionSkill",
            "#Microsoft.Skills.Text.LanguageDetectionSkill": "LanguageDetectionSkill",
            "#Microsoft.Skills.Text.MergeSkill": "MergeSkill",
            "#Microsoft.Skills.Text.PIIDetectionSkill": "PIIDetectionSkill",
            "#Microsoft.Skills.Text.SentimentSkill": "SentimentSkill",
            "#Microsoft.Skills.Text.SplitSkill": "SplitSkill",
            "#Microsoft.Skills.Text.TranslationSkill": "TextTranslationSkill",
            "#Microsoft.Skills.Text.V3.EntityLinkingSkill": "EntityLinkingSkill",
            "#Microsoft.Skills.Text.V3.EntityRecognitionSkill": "EntityRecognitionSkillV3",
            "#Microsoft.Skills.Text.V3.SentimentSkill": "SentimentSkillV3",
            "#Microsoft.Skills.Util.ConditionalSkill": "ConditionalSkill",
            "#Microsoft.Skills.Util.DocumentExtractionSkill": "DocumentExtractionSkill",
            "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill": "DocumentIntelligenceLayoutSkill",
            "#Microsoft.Skills.Util.ShaperSkill": "ShaperSkill",
            "#Microsoft.Skills.Vision.ImageAnalysisSkill": "ImageAnalysisSkill",
            "#Microsoft.Skills.Vision.OcrSkill": "OcrSkill",
        }
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        """
        super().__init__(**kwargs)
        self.odata_type: Optional[str] = None
        self.name = name
        self.description = description
        self.context = context
        self.inputs = inputs
        self.outputs = outputs


class AzureOpenAIEmbeddingSkill(SearchIndexerSkill, AzureOpenAIVectorizerParameters):
    """Allows you to generate a vector embedding for a given text input using the Azure OpenAI
    resource.

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

    :ivar resource_url: The resource URI of the Azure OpenAI resource.
    :vartype resource_url: str
    :ivar deployment_name: ID of the Azure OpenAI model deployment on the designated resource.
    :vartype deployment_name: str
    :ivar api_key: API key of the designated Azure OpenAI resource.
    :vartype api_key: str
    :ivar auth_identity: The user-assigned managed identity used for outbound connections.
    :vartype auth_identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity
    :ivar model_name: The name of the embedding model that is deployed at the provided deploymentId
     path. Known values are: "text-embedding-ada-002", "text-embedding-3-large", and
     "text-embedding-3-small".
    :vartype model_name: str or ~azure.search.documents.indexes.models.AzureOpenAIModelName
    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar dimensions: The number of dimensions the resulting output embeddings should have. Only
     supported in text-embedding-3 and later models.
    :vartype dimensions: int
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "resource_url": {"key": "resourceUri", "type": "str"},
        "deployment_name": {"key": "deploymentId", "type": "str"},
        "api_key": {"key": "apiKey", "type": "str"},
        "auth_identity": {"key": "authIdentity", "type": "SearchIndexerDataIdentity"},
        "model_name": {"key": "modelName", "type": "str"},
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "dimensions": {"key": "dimensions", "type": "int"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        resource_url: Optional[str] = None,
        deployment_name: Optional[str] = None,
        api_key: Optional[str] = None,
        auth_identity: Optional["_models.SearchIndexerDataIdentity"] = None,
        model_name: Optional[Union[str, "_models.AzureOpenAIModelName"]] = None,
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        dimensions: Optional[int] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword resource_url: The resource URI of the Azure OpenAI resource.
        :paramtype resource_url: str
        :keyword deployment_name: ID of the Azure OpenAI model deployment on the designated resource.
        :paramtype deployment_name: str
        :keyword api_key: API key of the designated Azure OpenAI resource.
        :paramtype api_key: str
        :keyword auth_identity: The user-assigned managed identity used for outbound connections.
        :paramtype auth_identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity
        :keyword model_name: The name of the embedding model that is deployed at the provided
         deploymentId path. Known values are: "text-embedding-ada-002", "text-embedding-3-large", and
         "text-embedding-3-small".
        :paramtype model_name: str or ~azure.search.documents.indexes.models.AzureOpenAIModelName
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword dimensions: The number of dimensions the resulting output embeddings should have. Only
         supported in text-embedding-3 and later models.
        :paramtype dimensions: int
        """
        super().__init__(
            name=name,
            description=description,
            context=context,
            inputs=inputs,
            outputs=outputs,
            resource_url=resource_url,
            deployment_name=deployment_name,
            api_key=api_key,
            auth_identity=auth_identity,
            model_name=model_name,
            **kwargs
        )
        self.resource_url = resource_url
        self.deployment_name = deployment_name
        self.api_key = api_key
        self.auth_identity = auth_identity
        self.model_name = model_name
        self.odata_type: str = "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill"
        self.dimensions = dimensions
        self.name = name
        self.description = description
        self.context = context
        self.inputs = inputs
        self.outputs = outputs


class VectorSearchVectorizer(_serialization.Model):
    """Specifies the vectorization method to be used during query time.

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

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

    :ivar vectorizer_name: The name to associate with this particular vectorization method.
     Required.
    :vartype vectorizer_name: str
    :ivar kind: The name of the kind of vectorization method being configured for use with vector
     search. Required. Known values are: "azureOpenAI" and "customWebApi".
    :vartype kind: str or ~azure.search.documents.indexes.models.VectorSearchVectorizerKind
    """

    _validation = {
        "vectorizer_name": {"required": True},
        "kind": {"required": True},
    }

    _attribute_map = {
        "vectorizer_name": {"key": "name", "type": "str"},
        "kind": {"key": "kind", "type": "str"},
    }

    _subtype_map = {"kind": {"azureOpenAI": "AzureOpenAIVectorizer", "customWebApi": "WebApiVectorizer"}}

    def __init__(self, *, vectorizer_name: str, **kwargs: Any) -> None:
        """
        :keyword vectorizer_name: The name to associate with this particular vectorization method.
         Required.
        :paramtype vectorizer_name: str
        """
        super().__init__(**kwargs)
        self.vectorizer_name = vectorizer_name
        self.kind: Optional[str] = None


class AzureOpenAIVectorizer(VectorSearchVectorizer):
    """Specifies the Azure OpenAI resource used to vectorize a query string.

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

    :ivar vectorizer_name: The name to associate with this particular vectorization method.
     Required.
    :vartype vectorizer_name: str
    :ivar kind: The name of the kind of vectorization method being configured for use with vector
     search. Required. Known values are: "azureOpenAI" and "customWebApi".
    :vartype kind: str or ~azure.search.documents.indexes.models.VectorSearchVectorizerKind
    :ivar parameters: Contains the parameters specific to Azure OpenAI embedding vectorization.
    :vartype parameters: ~azure.search.documents.indexes.models.AzureOpenAIVectorizerParameters
    """

    _validation = {
        "vectorizer_name": {"required": True},
        "kind": {"required": True},
    }

    _attribute_map = {
        "vectorizer_name": {"key": "name", "type": "str"},
        "kind": {"key": "kind", "type": "str"},
        "parameters": {"key": "azureOpenAIParameters", "type": "AzureOpenAIVectorizerParameters"},
    }

    def __init__(
        self,
        *,
        vectorizer_name: str,
        parameters: Optional["_models.AzureOpenAIVectorizerParameters"] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword vectorizer_name: The name to associate with this particular vectorization method.
         Required.
        :paramtype vectorizer_name: str
        :keyword parameters: Contains the parameters specific to Azure OpenAI embedding vectorization.
        :paramtype parameters: ~azure.search.documents.indexes.models.AzureOpenAIVectorizerParameters
        """
        super().__init__(vectorizer_name=vectorizer_name, **kwargs)
        self.kind: str = "azureOpenAI"
        self.parameters = parameters


class VectorSearchCompression(_serialization.Model):
    """Contains configuration options specific to the compression method used during indexing or
       querying.

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

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

       :ivar compression_name: The name to associate with this particular configuration. Required.
       :vartype compression_name: str
       :ivar kind: The name of the kind of compression method being configured for use with vector
        search. Required. Known values are: "scalarQuantization" and "binaryQuantization".
       :vartype kind: str or ~azure.search.documents.indexes.models.VectorSearchCompressionKind
       :ivar rescoring_options: Contains the options for rescoring.
       :vartype rescoring_options: ~azure.search.documents.indexes.models.RescoringOptions
       :ivar truncation_dimension: The number of dimensions to truncate the vectors to. Truncating the
        vectors reduces the size of the vectors and the amount of data that needs to be transferred
        during search. This can save storage cost and improve search performance at the expense of
        recall. It should be only used for embeddings trained with Matryoshka Representation Learning
        (MRL) such as OpenAI text-embedding-3-large (small). The default value is null, which means no
        truncation.
       :vartype truncation_dimension: int
       :ivar rerank_with_original_vectors: If set to true, once the ordered set of results calculated
        using compressed vectors are obtained, they will be reranked again by recalculating the
        full-precision similarity scores. This will improve recall at the expense of latency.
        For use with only service version 2024-07-01. If using 2025-09-01 or later, use
        RescoringOptions.rescoringEnabled.
       :vartype rerank_with_original_vectors: bool
       :ivar default_oversampling: Default oversampling factor. Oversampling will internally request
        more documents (specified by this multiplier) in the initial search. This increases the set of
        results that will be reranked using recomputed similarity scores from full-precision vectors.
        Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when
        rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency.
        For use with only service version 2024-07-01. If using 2025-09-01 or later, use
        RescoringOptions.defaultOversampling.
       :vartype default_oversampling: float
    """

    _validation = {
        "compression_name": {"required": True},
        "kind": {"required": True},
    }

    _attribute_map = {
        "compression_name": {"key": "name", "type": "str"},
        "kind": {"key": "kind", "type": "str"},
        "rescoring_options": {"key": "rescoringOptions", "type": "RescoringOptions"},
        "truncation_dimension": {"key": "truncationDimension", "type": "int"},
        "rerank_with_original_vectors": {"key": "rerankWithOriginalVectors", "type": "bool"},
        "default_oversampling": {"key": "defaultOversampling", "type": "float"},
    }

    _subtype_map = {
        "kind": {
            "binaryQuantization": "BinaryQuantizationCompression",
            "scalarQuantization": "ScalarQuantizationCompression",
        }
    }

    def __init__(
        self,
        *,
        compression_name: str,
        rescoring_options: Optional["_models.RescoringOptions"] = None,
        truncation_dimension: Optional[int] = None,
        rerank_with_original_vectors: Optional[bool] = None,
        default_oversampling: Optional[float] = None,
        **kwargs: Any
    ) -> None:
        """
               :keyword compression_name: The name to associate with this particular configuration. Required.
               :paramtype compression_name: str
               :keyword rescoring_options: Contains the options for rescoring.
               :paramtype rescoring_options: ~azure.search.documents.indexes.models.RescoringOptions
               :keyword truncation_dimension: The number of dimensions to truncate the vectors to. Truncating
                the vectors reduces the size of the vectors and the amount of data that needs to be transferred
                during search. This can save storage cost and improve search performance at the expense of
                recall. It should be only used for embeddings trained with Matryoshka Representation Learning
                (MRL) such as OpenAI text-embedding-3-large (small). The default value is null, which means no
                truncation.
               :paramtype truncation_dimension: int
               :keyword rerank_with_original_vectors: If set to true, once the ordered set of results
                calculated using compressed vectors are obtained, they will be reranked again by recalculating
                the full-precision similarity scores. This will improve recall at the expense of latency.
        For use with only service version 2024-07-01. If using 2025-09-01 or later, use
                RescoringOptions.rescoringEnabled.
               :paramtype rerank_with_original_vectors: bool
               :keyword default_oversampling: Default oversampling factor. Oversampling will internally
                request more documents (specified by this multiplier) in the initial search. This increases the
                set of results that will be reranked using recomputed similarity scores from full-precision
                vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when
                rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency.
        For use with only service version 2024-07-01. If using 2025-09-01 or later, use
                RescoringOptions.defaultOversampling.
               :paramtype default_oversampling: float
        """
        super().__init__(**kwargs)
        self.compression_name = compression_name
        self.kind: Optional[str] = None
        self.rescoring_options = rescoring_options
        self.truncation_dimension = truncation_dimension
        self.rerank_with_original_vectors = rerank_with_original_vectors
        self.default_oversampling = default_oversampling


class BinaryQuantizationCompression(VectorSearchCompression):
    """Contains configuration options specific to the binary quantization compression method used
       during indexing and querying.

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

       :ivar compression_name: The name to associate with this particular configuration. Required.
       :vartype compression_name: str
       :ivar kind: The name of the kind of compression method being configured for use with vector
        search. Required. Known values are: "scalarQuantization" and "binaryQuantization".
       :vartype kind: str or ~azure.search.documents.indexes.models.VectorSearchCompressionKind
       :ivar rescoring_options: Contains the options for rescoring.
       :vartype rescoring_options: ~azure.search.documents.indexes.models.RescoringOptions
       :ivar truncation_dimension: The number of dimensions to truncate the vectors to. Truncating the
        vectors reduces the size of the vectors and the amount of data that needs to be transferred
        during search. This can save storage cost and improve search performance at the expense of
        recall. It should be only used for embeddings trained with Matryoshka Representation Learning
        (MRL) such as OpenAI text-embedding-3-large (small). The default value is null, which means no
        truncation.
       :vartype truncation_dimension: int
       :ivar rerank_with_original_vectors: If set to true, once the ordered set of results calculated
        using compressed vectors are obtained, they will be reranked again by recalculating the
        full-precision similarity scores. This will improve recall at the expense of latency.
    For use with only service version 2024-07-01. If using 2025-09-01 or later, use
        RescoringOptions.rescoringEnabled.
       :vartype rerank_with_original_vectors: bool
       :ivar default_oversampling: Default oversampling factor. Oversampling will internally request
        more documents (specified by this multiplier) in the initial search. This increases the set of
        results that will be reranked using recomputed similarity scores from full-precision vectors.
        Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when
        rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency.
    For use with only service version 2024-07-01. If using 2025-09-01 or later, use
        RescoringOptions.defaultOversampling.
       :vartype default_oversampling: float
    """

    _validation = {
        "compression_name": {"required": True},
        "kind": {"required": True},
    }

    _attribute_map = {
        "compression_name": {"key": "name", "type": "str"},
        "kind": {"key": "kind", "type": "str"},
        "rescoring_options": {"key": "rescoringOptions", "type": "RescoringOptions"},
        "truncation_dimension": {"key": "truncationDimension", "type": "int"},
        "rerank_with_original_vectors": {"key": "rerankWithOriginalVectors", "type": "bool"},
        "default_oversampling": {"key": "defaultOversampling", "type": "float"},
    }

    def __init__(
        self,
        *,
        compression_name: str,
        rescoring_options: Optional["_models.RescoringOptions"] = None,
        truncation_dimension: Optional[int] = None,
        rerank_with_original_vectors: Optional[bool] = None,
        default_oversampling: Optional[float] = None,
        **kwargs: Any
    ) -> None:
        """
               :keyword compression_name: The name to associate with this particular configuration. Required.
               :paramtype compression_name: str
               :keyword rescoring_options: Contains the options for rescoring.
               :paramtype rescoring_options: ~azure.search.documents.indexes.models.RescoringOptions
               :keyword truncation_dimension: The number of dimensions to truncate the vectors to. Truncating
                the vectors reduces the size of the vectors and the amount of data that needs to be transferred
                during search. This can save storage cost and improve search performance at the expense of
                recall. It should be only used for embeddings trained with Matryoshka Representation Learning
                (MRL) such as OpenAI text-embedding-3-large (small). The default value is null, which means no
                truncation.
               :paramtype truncation_dimension: int
               :keyword rerank_with_original_vectors: If set to true, once the ordered set of results
                calculated using compressed vectors are obtained, they will be reranked again by recalculating
                the full-precision similarity scores. This will improve recall at the expense of latency.
        For use with only service version 2024-07-01. If using 2025-09-01 or later, use
                RescoringOptions.rescoringEnabled.
               :paramtype rerank_with_original_vectors: bool
               :keyword default_oversampling: Default oversampling factor. Oversampling will internally
                request more documents (specified by this multiplier) in the initial search. This increases the
                set of results that will be reranked using recomputed similarity scores from full-precision
                vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when
                rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency.
        For use with only service version 2024-07-01. If using 2025-09-01 or later, use
                RescoringOptions.defaultOversampling.
               :paramtype default_oversampling: float
        """
        super().__init__(
            compression_name=compression_name,
            rescoring_options=rescoring_options,
            truncation_dimension=truncation_dimension,
            rerank_with_original_vectors=rerank_with_original_vectors,
            default_oversampling=default_oversampling,
            **kwargs
        )
        self.kind: str = "binaryQuantization"


class SimilarityAlgorithm(_serialization.Model):
    """Base type for similarity algorithms. Similarity algorithms are used to calculate scores that
    tie queries to documents. The higher the score, the more relevant the document is to that
    specific query. Those scores are used to rank the search results.

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

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

    :ivar odata_type: Required.
    :vartype odata_type: str
    """

    _validation = {
        "odata_type": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
    }

    _subtype_map = {
        "odata_type": {
            "#Microsoft.Azure.Search.BM25Similarity": "BM25SimilarityAlgorithm",
            "#Microsoft.Azure.Search.ClassicSimilarity": "ClassicSimilarityAlgorithm",
        }
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.odata_type: Optional[str] = None


class BM25SimilarityAlgorithm(SimilarityAlgorithm):
    """Ranking function based on the Okapi BM25 similarity algorithm. BM25 is a TF-IDF-like algorithm
    that includes length normalization (controlled by the 'b' parameter) as well as term frequency
    saturation (controlled by the 'k1' parameter).

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

    :ivar odata_type: Required.
    :vartype odata_type: str
    :ivar k1: This property controls the scaling function between the term frequency of each
     matching terms and the final relevance score of a document-query pair. By default, a value of
     1.2 is used. A value of 0.0 means the score does not scale with an increase in term frequency.
    :vartype k1: float
    :ivar b: This property controls how the length of a document affects the relevance score. By
     default, a value of 0.75 is used. A value of 0.0 means no length normalization is applied,
     while a value of 1.0 means the score is fully normalized by the length of the document.
    :vartype b: float
    """

    _validation = {
        "odata_type": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "k1": {"key": "k1", "type": "float"},
        "b": {"key": "b", "type": "float"},
    }

    def __init__(self, *, k1: Optional[float] = None, b: Optional[float] = None, **kwargs: Any) -> None:
        """
        :keyword k1: This property controls the scaling function between the term frequency of each
         matching terms and the final relevance score of a document-query pair. By default, a value of
         1.2 is used. A value of 0.0 means the score does not scale with an increase in term frequency.
        :paramtype k1: float
        :keyword b: This property controls how the length of a document affects the relevance score. By
         default, a value of 0.75 is used. A value of 0.0 means no length normalization is applied,
         while a value of 1.0 means the score is fully normalized by the length of the document.
        :paramtype b: float
        """
        super().__init__(**kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.BM25Similarity"
        self.k1 = k1
        self.b = b


class CharFilter(_serialization.Model):
    """Base type for character filters.

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

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

    :ivar odata_type: A URI fragment specifying the type of char filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the char filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
    }

    _subtype_map = {
        "odata_type": {
            "#Microsoft.Azure.Search.MappingCharFilter": "MappingCharFilter",
            "#Microsoft.Azure.Search.PatternReplaceCharFilter": "PatternReplaceCharFilter",
        }
    }

    def __init__(self, *, name: str, **kwargs: Any) -> None:
        """
        :keyword name: The name of the char filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        """
        super().__init__(**kwargs)
        self.odata_type: Optional[str] = None
        self.name = name


class CjkBigramTokenFilter(TokenFilter):
    """Forms bigrams of CJK terms that are generated from the standard tokenizer. This token filter is
    implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar ignore_scripts: The scripts to ignore.
    :vartype ignore_scripts: list[str or
     ~azure.search.documents.indexes.models.CjkBigramTokenFilterScripts]
    :ivar output_unigrams: A value indicating whether to output both unigrams and bigrams (if
     true), or just bigrams (if false). Default is false.
    :vartype output_unigrams: bool
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "ignore_scripts": {"key": "ignoreScripts", "type": "[str]"},
        "output_unigrams": {"key": "outputUnigrams", "type": "bool"},
    }

    def __init__(
        self,
        *,
        name: str,
        ignore_scripts: Optional[list[Union[str, "_models.CjkBigramTokenFilterScripts"]]] = None,
        output_unigrams: bool = False,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword ignore_scripts: The scripts to ignore.
        :paramtype ignore_scripts: list[str or
         ~azure.search.documents.indexes.models.CjkBigramTokenFilterScripts]
        :keyword output_unigrams: A value indicating whether to output both unigrams and bigrams (if
         true), or just bigrams (if false). Default is false.
        :paramtype output_unigrams: bool
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.CjkBigramTokenFilter"
        self.ignore_scripts = ignore_scripts
        self.output_unigrams = output_unigrams


class ClassicSimilarityAlgorithm(SimilarityAlgorithm):
    """Legacy similarity algorithm which uses the Lucene TFIDFSimilarity implementation of TF-IDF.
    This variation of TF-IDF introduces static document length normalization as well as
    coordinating factors that penalize documents that only partially match the searched queries.

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

    :ivar odata_type: Required.
    :vartype odata_type: str
    """

    _validation = {
        "odata_type": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.ClassicSimilarity"


class LexicalTokenizer(_serialization.Model):
    """Base type for tokenizers.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ClassicTokenizer, EdgeNGramTokenizer, KeywordTokenizer, KeywordTokenizerV2,
    MicrosoftLanguageStemmingTokenizer, MicrosoftLanguageTokenizer, NGramTokenizer,
    PathHierarchyTokenizerV2, PatternTokenizer, LuceneStandardTokenizer, LuceneStandardTokenizerV2,
    UaxUrlEmailTokenizer

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

    :ivar odata_type: A URI fragment specifying the type of tokenizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
    }

    _subtype_map = {
        "odata_type": {
            "#Microsoft.Azure.Search.ClassicTokenizer": "ClassicTokenizer",
            "#Microsoft.Azure.Search.EdgeNGramTokenizer": "EdgeNGramTokenizer",
            "#Microsoft.Azure.Search.KeywordTokenizer": "KeywordTokenizer",
            "#Microsoft.Azure.Search.KeywordTokenizerV2": "KeywordTokenizerV2",
            "#Microsoft.Azure.Search.MicrosoftLanguageStemmingTokenizer": "MicrosoftLanguageStemmingTokenizer",
            "#Microsoft.Azure.Search.MicrosoftLanguageTokenizer": "MicrosoftLanguageTokenizer",
            "#Microsoft.Azure.Search.NGramTokenizer": "NGramTokenizer",
            "#Microsoft.Azure.Search.PathHierarchyTokenizerV2": "PathHierarchyTokenizerV2",
            "#Microsoft.Azure.Search.PatternTokenizer": "PatternTokenizer",
            "#Microsoft.Azure.Search.StandardTokenizer": "LuceneStandardTokenizer",
            "#Microsoft.Azure.Search.StandardTokenizerV2": "LuceneStandardTokenizerV2",
            "#Microsoft.Azure.Search.UaxUrlEmailTokenizer": "UaxUrlEmailTokenizer",
        }
    }

    def __init__(self, *, name: str, **kwargs: Any) -> None:
        """
        :keyword name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        """
        super().__init__(**kwargs)
        self.odata_type: Optional[str] = None
        self.name = name


class ClassicTokenizer(LexicalTokenizer):
    """Grammar-based tokenizer that is suitable for processing most European-language documents. This
    tokenizer is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of tokenizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the
     maximum length are split. The maximum token length that can be used is 300 characters.
    :vartype max_token_length: int
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "max_token_length": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "max_token_length": {"key": "maxTokenLength", "type": "int"},
    }

    def __init__(self, *, name: str, max_token_length: int = 255, **kwargs: Any) -> None:
        """
        :keyword name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the
         maximum length are split. The maximum token length that can be used is 300 characters.
        :paramtype max_token_length: int
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.ClassicTokenizer"
        self.max_token_length = max_token_length


class CognitiveServicesAccount(_serialization.Model):
    """Base type for describing any Azure AI service resource attached to a skillset.

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

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

    :ivar odata_type: A URI fragment specifying the type of Azure AI service resource attached to a
     skillset. Required.
    :vartype odata_type: str
    :ivar description: Description of the Azure AI service resource attached to a skillset.
    :vartype description: str
    """

    _validation = {
        "odata_type": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "description": {"key": "description", "type": "str"},
    }

    _subtype_map = {
        "odata_type": {
            "#Microsoft.Azure.Search.CognitiveServicesByKey": "CognitiveServicesAccountKey",
            "#Microsoft.Azure.Search.DefaultCognitiveServices": "DefaultCognitiveServicesAccount",
        }
    }

    def __init__(self, *, description: Optional[str] = None, **kwargs: Any) -> None:
        """
        :keyword description: Description of the Azure AI service resource attached to a skillset.
        :paramtype description: str
        """
        super().__init__(**kwargs)
        self.odata_type: Optional[str] = None
        self.description = description


class CognitiveServicesAccountKey(CognitiveServicesAccount):
    """The multi-region account key of an Azure AI service resource that's attached to a skillset.

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

    :ivar odata_type: A URI fragment specifying the type of Azure AI service resource attached to a
     skillset. Required.
    :vartype odata_type: str
    :ivar description: Description of the Azure AI service resource attached to a skillset.
    :vartype description: str
    :ivar key: The key used to provision the Azure AI service resource attached to a skillset.
     Required.
    :vartype key: str
    """

    _validation = {
        "odata_type": {"required": True},
        "key": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "key": {"key": "key", "type": "str"},
    }

    def __init__(self, *, key: str, description: Optional[str] = None, **kwargs: Any) -> None:
        """
        :keyword description: Description of the Azure AI service resource attached to a skillset.
        :paramtype description: str
        :keyword key: The key used to provision the Azure AI service resource attached to a skillset.
         Required.
        :paramtype key: str
        """
        super().__init__(description=description, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.CognitiveServicesByKey"
        self.key = key


class CommonGramTokenFilter(TokenFilter):
    """Construct bigrams for frequently occurring terms while indexing. Single terms are still indexed
    too, with bigrams overlaid. This token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar common_words: The set of common words. Required.
    :vartype common_words: list[str]
    :ivar ignore_case: A value indicating whether common words matching will be case insensitive.
     Default is false.
    :vartype ignore_case: bool
    :ivar use_query_mode: A value that indicates whether the token filter is in query mode. When in
     query mode, the token filter generates bigrams and then removes common words and single terms
     followed by a common word. Default is false.
    :vartype use_query_mode: bool
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "common_words": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "common_words": {"key": "commonWords", "type": "[str]"},
        "ignore_case": {"key": "ignoreCase", "type": "bool"},
        "use_query_mode": {"key": "queryMode", "type": "bool"},
    }

    def __init__(
        self,
        *,
        name: str,
        common_words: list[str],
        ignore_case: bool = False,
        use_query_mode: bool = False,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword common_words: The set of common words. Required.
        :paramtype common_words: list[str]
        :keyword ignore_case: A value indicating whether common words matching will be case
         insensitive. Default is false.
        :paramtype ignore_case: bool
        :keyword use_query_mode: A value that indicates whether the token filter is in query mode. When
         in query mode, the token filter generates bigrams and then removes common words and single
         terms followed by a common word. Default is false.
        :paramtype use_query_mode: bool
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.CommonGramTokenFilter"
        self.common_words = common_words
        self.ignore_case = ignore_case
        self.use_query_mode = use_query_mode


class ConditionalSkill(SearchIndexerSkill):
    """A skill that enables scenarios that require a Boolean operation to determine the data to assign
    to an output.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Util.ConditionalSkill"


class CorsOptions(_serialization.Model):
    """Defines options to control Cross-Origin Resource Sharing (CORS) for an index.

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

    :ivar allowed_origins: The list of origins from which JavaScript code will be granted access to
     your index. Can contain a list of hosts of the form
     {protocol}://{fully-qualified-domain-name}[:{port#}], or a single '*' to allow all origins (not
     recommended). Required.
    :vartype allowed_origins: list[str]
    :ivar max_age_in_seconds: The duration for which browsers should cache CORS preflight
     responses. Defaults to 5 minutes.
    :vartype max_age_in_seconds: int
    """

    _validation = {
        "allowed_origins": {"required": True},
    }

    _attribute_map = {
        "allowed_origins": {"key": "allowedOrigins", "type": "[str]"},
        "max_age_in_seconds": {"key": "maxAgeInSeconds", "type": "int"},
    }

    def __init__(self, *, allowed_origins: list[str], max_age_in_seconds: Optional[int] = None, **kwargs: Any) -> None:
        """
        :keyword allowed_origins: The list of origins from which JavaScript code will be granted access
         to your index. Can contain a list of hosts of the form
         {protocol}://{fully-qualified-domain-name}[:{port#}], or a single '*' to allow all origins (not
         recommended). Required.
        :paramtype allowed_origins: list[str]
        :keyword max_age_in_seconds: The duration for which browsers should cache CORS preflight
         responses. Defaults to 5 minutes.
        :paramtype max_age_in_seconds: int
        """
        super().__init__(**kwargs)
        self.allowed_origins = allowed_origins
        self.max_age_in_seconds = max_age_in_seconds


class LexicalAnalyzer(_serialization.Model):
    """Base type for analyzers.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    CustomAnalyzer, PatternAnalyzer, LuceneStandardAnalyzer, StopAnalyzer

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

    :ivar odata_type: A URI fragment specifying the type of analyzer. Required.
    :vartype odata_type: str
    :ivar name: The name of the analyzer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
    }

    _subtype_map = {
        "odata_type": {
            "#Microsoft.Azure.Search.CustomAnalyzer": "CustomAnalyzer",
            "#Microsoft.Azure.Search.PatternAnalyzer": "PatternAnalyzer",
            "#Microsoft.Azure.Search.StandardAnalyzer": "LuceneStandardAnalyzer",
            "#Microsoft.Azure.Search.StopAnalyzer": "StopAnalyzer",
        }
    }

    def __init__(self, *, name: str, **kwargs: Any) -> None:
        """
        :keyword name: The name of the analyzer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        """
        super().__init__(**kwargs)
        self.odata_type: Optional[str] = None
        self.name = name


class CustomAnalyzer(LexicalAnalyzer):
    """Allows you to take control over the process of converting text into indexable/searchable
    tokens. It's a user-defined configuration consisting of a single predefined tokenizer and one
    or more filters. The tokenizer is responsible for breaking text into tokens, and the filters
    for modifying tokens emitted by the tokenizer.

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

    :ivar odata_type: A URI fragment specifying the type of analyzer. Required.
    :vartype odata_type: str
    :ivar name: The name of the analyzer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar tokenizer: The name of the tokenizer to use to divide continuous text into a sequence of
     tokens, such as breaking a sentence into words. Required. Known values are: "classic",
     "edgeNGram", "keyword_v2", "letter", "lowercase", "microsoft_language_tokenizer",
     "microsoft_language_stemming_tokenizer", "nGram", "path_hierarchy_v2", "pattern",
     "standard_v2", "uax_url_email", and "whitespace".
    :vartype tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName
    :ivar token_filters: A list of token filters used to filter out or modify the tokens generated
     by a tokenizer. For example, you can specify a lowercase filter that converts all characters to
     lowercase. The filters are run in the order in which they are listed.
    :vartype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName]
    :ivar char_filters: A list of character filters used to prepare input text before it is
     processed by the tokenizer. For instance, they can replace certain characters or symbols. The
     filters are run in the order in which they are listed.
    :vartype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName]
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "tokenizer": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "tokenizer": {"key": "tokenizer", "type": "str"},
        "token_filters": {"key": "tokenFilters", "type": "[str]"},
        "char_filters": {"key": "charFilters", "type": "[str]"},
    }

    def __init__(
        self,
        *,
        name: str,
        tokenizer: Union[str, "_models.LexicalTokenizerName"],
        token_filters: Optional[list[Union[str, "_models.TokenFilterName"]]] = None,
        char_filters: Optional[list[Union[str, "_models.CharFilterName"]]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the analyzer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword tokenizer: The name of the tokenizer to use to divide continuous text into a sequence
         of tokens, such as breaking a sentence into words. Required. Known values are: "classic",
         "edgeNGram", "keyword_v2", "letter", "lowercase", "microsoft_language_tokenizer",
         "microsoft_language_stemming_tokenizer", "nGram", "path_hierarchy_v2", "pattern",
         "standard_v2", "uax_url_email", and "whitespace".
        :paramtype tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName
        :keyword token_filters: A list of token filters used to filter out or modify the tokens
         generated by a tokenizer. For example, you can specify a lowercase filter that converts all
         characters to lowercase. The filters are run in the order in which they are listed.
        :paramtype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName]
        :keyword char_filters: A list of character filters used to prepare input text before it is
         processed by the tokenizer. For instance, they can replace certain characters or symbols. The
         filters are run in the order in which they are listed.
        :paramtype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName]
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.CustomAnalyzer"
        self.tokenizer = tokenizer
        self.token_filters = token_filters
        self.char_filters = char_filters


class CustomEntity(_serialization.Model):
    """An object that contains information about the matches that were found, and related metadata.

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

    :ivar name: The top-level entity descriptor. Matches in the skill output will be grouped by
     this name, and it should represent the "normalized" form of the text being found. Required.
    :vartype name: str
    :ivar description: This field can be used as a passthrough for custom metadata about the
     matched text(s). The value of this field will appear with every match of its entity in the
     skill output.
    :vartype description: str
    :ivar type: This field can be used as a passthrough for custom metadata about the matched
     text(s). The value of this field will appear with every match of its entity in the skill
     output.
    :vartype type: str
    :ivar subtype: This field can be used as a passthrough for custom metadata about the matched
     text(s). The value of this field will appear with every match of its entity in the skill
     output.
    :vartype subtype: str
    :ivar id: This field can be used as a passthrough for custom metadata about the matched
     text(s). The value of this field will appear with every match of its entity in the skill
     output.
    :vartype id: str
    :ivar case_sensitive: Defaults to false. Boolean value denoting whether comparisons with the
     entity name should be sensitive to character casing. Sample case insensitive matches of
     "Microsoft" could be: microsoft, microSoft, MICROSOFT.
    :vartype case_sensitive: bool
    :ivar accent_sensitive: Defaults to false. Boolean value denoting whether comparisons with the
     entity name should be sensitive to accent.
    :vartype accent_sensitive: bool
    :ivar fuzzy_edit_distance: Defaults to 0. Maximum value of 5. Denotes the acceptable number of
     divergent characters that would still constitute a match with the entity name. The smallest
     possible fuzziness for any given match is returned. For instance, if the edit distance is set
     to 3, "Windows10" would still match "Windows", "Windows10" and "Windows 7". When case
     sensitivity is set to false, case differences do NOT count towards fuzziness tolerance, but
     otherwise do.
    :vartype fuzzy_edit_distance: int
    :ivar default_case_sensitive: Changes the default case sensitivity value for this entity. It be
     used to change the default value of all aliases caseSensitive values.
    :vartype default_case_sensitive: bool
    :ivar default_accent_sensitive: Changes the default accent sensitivity value for this entity.
     It be used to change the default value of all aliases accentSensitive values.
    :vartype default_accent_sensitive: bool
    :ivar default_fuzzy_edit_distance: Changes the default fuzzy edit distance value for this
     entity. It can be used to change the default value of all aliases fuzzyEditDistance values.
    :vartype default_fuzzy_edit_distance: int
    :ivar aliases: An array of complex objects that can be used to specify alternative spellings or
     synonyms to the root entity name.
    :vartype aliases: list[~azure.search.documents.indexes.models.CustomEntityAlias]
    """

    _validation = {
        "name": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "type": {"key": "type", "type": "str"},
        "subtype": {"key": "subtype", "type": "str"},
        "id": {"key": "id", "type": "str"},
        "case_sensitive": {"key": "caseSensitive", "type": "bool"},
        "accent_sensitive": {"key": "accentSensitive", "type": "bool"},
        "fuzzy_edit_distance": {"key": "fuzzyEditDistance", "type": "int"},
        "default_case_sensitive": {"key": "defaultCaseSensitive", "type": "bool"},
        "default_accent_sensitive": {"key": "defaultAccentSensitive", "type": "bool"},
        "default_fuzzy_edit_distance": {"key": "defaultFuzzyEditDistance", "type": "int"},
        "aliases": {"key": "aliases", "type": "[CustomEntityAlias]"},
    }

    def __init__(
        self,
        *,
        name: str,
        description: Optional[str] = None,
        type: Optional[str] = None,
        subtype: Optional[str] = None,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        case_sensitive: Optional[bool] = None,
        accent_sensitive: Optional[bool] = None,
        fuzzy_edit_distance: Optional[int] = None,
        default_case_sensitive: Optional[bool] = None,
        default_accent_sensitive: Optional[bool] = None,
        default_fuzzy_edit_distance: Optional[int] = None,
        aliases: Optional[list["_models.CustomEntityAlias"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The top-level entity descriptor. Matches in the skill output will be grouped by
         this name, and it should represent the "normalized" form of the text being found. Required.
        :paramtype name: str
        :keyword description: This field can be used as a passthrough for custom metadata about the
         matched text(s). The value of this field will appear with every match of its entity in the
         skill output.
        :paramtype description: str
        :keyword type: This field can be used as a passthrough for custom metadata about the matched
         text(s). The value of this field will appear with every match of its entity in the skill
         output.
        :paramtype type: str
        :keyword subtype: This field can be used as a passthrough for custom metadata about the matched
         text(s). The value of this field will appear with every match of its entity in the skill
         output.
        :paramtype subtype: str
        :keyword id: This field can be used as a passthrough for custom metadata about the matched
         text(s). The value of this field will appear with every match of its entity in the skill
         output.
        :paramtype id: str
        :keyword case_sensitive: Defaults to false. Boolean value denoting whether comparisons with the
         entity name should be sensitive to character casing. Sample case insensitive matches of
         "Microsoft" could be: microsoft, microSoft, MICROSOFT.
        :paramtype case_sensitive: bool
        :keyword accent_sensitive: Defaults to false. Boolean value denoting whether comparisons with
         the entity name should be sensitive to accent.
        :paramtype accent_sensitive: bool
        :keyword fuzzy_edit_distance: Defaults to 0. Maximum value of 5. Denotes the acceptable number
         of divergent characters that would still constitute a match with the entity name. The smallest
         possible fuzziness for any given match is returned. For instance, if the edit distance is set
         to 3, "Windows10" would still match "Windows", "Windows10" and "Windows 7". When case
         sensitivity is set to false, case differences do NOT count towards fuzziness tolerance, but
         otherwise do.
        :paramtype fuzzy_edit_distance: int
        :keyword default_case_sensitive: Changes the default case sensitivity value for this entity. It
         be used to change the default value of all aliases caseSensitive values.
        :paramtype default_case_sensitive: bool
        :keyword default_accent_sensitive: Changes the default accent sensitivity value for this
         entity. It be used to change the default value of all aliases accentSensitive values.
        :paramtype default_accent_sensitive: bool
        :keyword default_fuzzy_edit_distance: Changes the default fuzzy edit distance value for this
         entity. It can be used to change the default value of all aliases fuzzyEditDistance values.
        :paramtype default_fuzzy_edit_distance: int
        :keyword aliases: An array of complex objects that can be used to specify alternative spellings
         or synonyms to the root entity name.
        :paramtype aliases: list[~azure.search.documents.indexes.models.CustomEntityAlias]
        """
        super().__init__(**kwargs)
        self.name = name
        self.description = description
        self.type = type
        self.subtype = subtype
        self.id = id
        self.case_sensitive = case_sensitive
        self.accent_sensitive = accent_sensitive
        self.fuzzy_edit_distance = fuzzy_edit_distance
        self.default_case_sensitive = default_case_sensitive
        self.default_accent_sensitive = default_accent_sensitive
        self.default_fuzzy_edit_distance = default_fuzzy_edit_distance
        self.aliases = aliases


class CustomEntityAlias(_serialization.Model):
    """A complex object that can be used to specify alternative spellings or synonyms to the root
    entity name.

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

    :ivar text: The text of the alias. Required.
    :vartype text: str
    :ivar case_sensitive: Determine if the alias is case sensitive.
    :vartype case_sensitive: bool
    :ivar accent_sensitive: Determine if the alias is accent sensitive.
    :vartype accent_sensitive: bool
    :ivar fuzzy_edit_distance: Determine the fuzzy edit distance of the alias.
    :vartype fuzzy_edit_distance: int
    """

    _validation = {
        "text": {"required": True},
    }

    _attribute_map = {
        "text": {"key": "text", "type": "str"},
        "case_sensitive": {"key": "caseSensitive", "type": "bool"},
        "accent_sensitive": {"key": "accentSensitive", "type": "bool"},
        "fuzzy_edit_distance": {"key": "fuzzyEditDistance", "type": "int"},
    }

    def __init__(
        self,
        *,
        text: str,
        case_sensitive: Optional[bool] = None,
        accent_sensitive: Optional[bool] = None,
        fuzzy_edit_distance: Optional[int] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword text: The text of the alias. Required.
        :paramtype text: str
        :keyword case_sensitive: Determine if the alias is case sensitive.
        :paramtype case_sensitive: bool
        :keyword accent_sensitive: Determine if the alias is accent sensitive.
        :paramtype accent_sensitive: bool
        :keyword fuzzy_edit_distance: Determine the fuzzy edit distance of the alias.
        :paramtype fuzzy_edit_distance: int
        """
        super().__init__(**kwargs)
        self.text = text
        self.case_sensitive = case_sensitive
        self.accent_sensitive = accent_sensitive
        self.fuzzy_edit_distance = fuzzy_edit_distance


class CustomEntityLookupSkill(SearchIndexerSkill):
    """A skill looks for text from a custom, user-defined list of words and phrases.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar default_language_code: A value indicating which language code to use. Default is ``en``.
     Known values are: "da", "de", "en", "es", "fi", "fr", "it", "ko", and "pt".
    :vartype default_language_code: str or
     ~azure.search.documents.indexes.models.CustomEntityLookupSkillLanguage
    :ivar entities_definition_uri: Path to a JSON or CSV file containing all the target text to
     match against. This entity definition is read at the beginning of an indexer run. Any updates
     to this file during an indexer run will not take effect until subsequent runs. This config must
     be accessible over HTTPS.
    :vartype entities_definition_uri: str
    :ivar inline_entities_definition: The inline CustomEntity definition.
    :vartype inline_entities_definition: list[~azure.search.documents.indexes.models.CustomEntity]
    :ivar global_default_case_sensitive: A global flag for CaseSensitive. If CaseSensitive is not
     set in CustomEntity, this value will be the default value.
    :vartype global_default_case_sensitive: bool
    :ivar global_default_accent_sensitive: A global flag for AccentSensitive. If AccentSensitive is
     not set in CustomEntity, this value will be the default value.
    :vartype global_default_accent_sensitive: bool
    :ivar global_default_fuzzy_edit_distance: A global flag for FuzzyEditDistance. If
     FuzzyEditDistance is not set in CustomEntity, this value will be the default value.
    :vartype global_default_fuzzy_edit_distance: int
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "default_language_code": {"key": "defaultLanguageCode", "type": "str"},
        "entities_definition_uri": {"key": "entitiesDefinitionUri", "type": "str"},
        "inline_entities_definition": {"key": "inlineEntitiesDefinition", "type": "[CustomEntity]"},
        "global_default_case_sensitive": {"key": "globalDefaultCaseSensitive", "type": "bool"},
        "global_default_accent_sensitive": {"key": "globalDefaultAccentSensitive", "type": "bool"},
        "global_default_fuzzy_edit_distance": {"key": "globalDefaultFuzzyEditDistance", "type": "int"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        default_language_code: Optional[Union[str, "_models.CustomEntityLookupSkillLanguage"]] = None,
        entities_definition_uri: Optional[str] = None,
        inline_entities_definition: Optional[list["_models.CustomEntity"]] = None,
        global_default_case_sensitive: Optional[bool] = None,
        global_default_accent_sensitive: Optional[bool] = None,
        global_default_fuzzy_edit_distance: Optional[int] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword default_language_code: A value indicating which language code to use. Default is
         ``en``. Known values are: "da", "de", "en", "es", "fi", "fr", "it", "ko", and "pt".
        :paramtype default_language_code: str or
         ~azure.search.documents.indexes.models.CustomEntityLookupSkillLanguage
        :keyword entities_definition_uri: Path to a JSON or CSV file containing all the target text to
         match against. This entity definition is read at the beginning of an indexer run. Any updates
         to this file during an indexer run will not take effect until subsequent runs. This config must
         be accessible over HTTPS.
        :paramtype entities_definition_uri: str
        :keyword inline_entities_definition: The inline CustomEntity definition.
        :paramtype inline_entities_definition:
         list[~azure.search.documents.indexes.models.CustomEntity]
        :keyword global_default_case_sensitive: A global flag for CaseSensitive. If CaseSensitive is
         not set in CustomEntity, this value will be the default value.
        :paramtype global_default_case_sensitive: bool
        :keyword global_default_accent_sensitive: A global flag for AccentSensitive. If AccentSensitive
         is not set in CustomEntity, this value will be the default value.
        :paramtype global_default_accent_sensitive: bool
        :keyword global_default_fuzzy_edit_distance: A global flag for FuzzyEditDistance. If
         FuzzyEditDistance is not set in CustomEntity, this value will be the default value.
        :paramtype global_default_fuzzy_edit_distance: int
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Text.CustomEntityLookupSkill"
        self.default_language_code = default_language_code
        self.entities_definition_uri = entities_definition_uri
        self.inline_entities_definition = inline_entities_definition
        self.global_default_case_sensitive = global_default_case_sensitive
        self.global_default_accent_sensitive = global_default_accent_sensitive
        self.global_default_fuzzy_edit_distance = global_default_fuzzy_edit_distance


class LexicalNormalizer(_serialization.Model):
    """Base type for normalizers.

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

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

    :ivar odata_type: A URI fragment specifying the type of normalizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the normalizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding',
     'standard', 'lowercase', 'uppercase', or 'elision'. Required.
    :vartype name: str
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
    }

    _subtype_map = {"odata_type": {"#Microsoft.Azure.Search.CustomNormalizer": "CustomNormalizer"}}

    def __init__(self, *, name: str, **kwargs: Any) -> None:
        """
        :keyword name: The name of the normalizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding',
         'standard', 'lowercase', 'uppercase', or 'elision'. Required.
        :paramtype name: str
        """
        super().__init__(**kwargs)
        self.odata_type: Optional[str] = None
        self.name = name


class CustomNormalizer(LexicalNormalizer):
    """Allows you to configure normalization for filterable, sortable, and facetable fields, which by
    default operate with strict matching. This is a user-defined configuration consisting of at
    least one or more filters, which modify the token that is stored.

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

    :ivar odata_type: A URI fragment specifying the type of normalizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the normalizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding',
     'standard', 'lowercase', 'uppercase', or 'elision'. Required.
    :vartype name: str
    :ivar token_filters: A list of token filters used to filter out or modify the input token. For
     example, you can specify a lowercase filter that converts all characters to lowercase. The
     filters are run in the order in which they are listed.
    :vartype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName]
    :ivar char_filters: A list of character filters used to prepare input text before it is
     processed. For instance, they can replace certain characters or symbols. The filters are run in
     the order in which they are listed.
    :vartype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName]
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "token_filters": {"key": "tokenFilters", "type": "[str]"},
        "char_filters": {"key": "charFilters", "type": "[str]"},
    }

    def __init__(
        self,
        *,
        name: str,
        token_filters: Optional[list[Union[str, "_models.TokenFilterName"]]] = None,
        char_filters: Optional[list[Union[str, "_models.CharFilterName"]]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the normalizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding',
         'standard', 'lowercase', 'uppercase', or 'elision'. Required.
        :paramtype name: str
        :keyword token_filters: A list of token filters used to filter out or modify the input token.
         For example, you can specify a lowercase filter that converts all characters to lowercase. The
         filters are run in the order in which they are listed.
        :paramtype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName]
        :keyword char_filters: A list of character filters used to prepare input text before it is
         processed. For instance, they can replace certain characters or symbols. The filters are run in
         the order in which they are listed.
        :paramtype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName]
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.CustomNormalizer"
        self.token_filters = token_filters
        self.char_filters = char_filters


class DataChangeDetectionPolicy(_serialization.Model):
    """Base type for data change detection policies.

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

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

    :ivar odata_type: A URI fragment specifying the type of data change detection policy. Required.
    :vartype odata_type: str
    """

    _validation = {
        "odata_type": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
    }

    _subtype_map = {
        "odata_type": {
            "#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy": "HighWaterMarkChangeDetectionPolicy",
            "#Microsoft.Azure.Search.SqlIntegratedChangeTrackingPolicy": "SqlIntegratedChangeTrackingPolicy",
        }
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.odata_type: Optional[str] = None


class DataDeletionDetectionPolicy(_serialization.Model):
    """Base type for data deletion detection policies.

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

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

    :ivar odata_type: A URI fragment specifying the type of data deletion detection policy.
     Required.
    :vartype odata_type: str
    """

    _validation = {
        "odata_type": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
    }

    _subtype_map = {
        "odata_type": {
            "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy": "SoftDeleteColumnDeletionDetectionPolicy"
        }
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.odata_type: Optional[str] = None


class DataSourceCredentials(_serialization.Model):
    """Represents credentials that can be used to connect to a datasource.

    :ivar connection_string: The connection string for the datasource. For Azure SQL, Azure Blob,
     ADLS Gen 2 and Azure Table, this would be the connection string or resource ID if using managed
     identity. For CosmosDB this would be a formatted connection string specifying ApiKind or
     resource ID for managed identity. For Onelake files, connection string would be either the
     workspace guid or workspace FQDN; Onelake only supports managed identity connections. Set to
     ``<unchanged>`` (with brackets) if you don't want the connection string updated. Set to
     ``<redacted>`` if you want to remove the connection string value from the datasource.
    :vartype connection_string: str
    """

    _attribute_map = {
        "connection_string": {"key": "connectionString", "type": "str"},
    }

    def __init__(self, *, connection_string: Optional[str] = None, **kwargs: Any) -> None:
        """
        :keyword connection_string: The connection string for the datasource. For Azure SQL, Azure
         Blob, ADLS Gen 2 and Azure Table, this would be the connection string or resource ID if using
         managed identity. For CosmosDB this would be a formatted connection string specifying ApiKind
         or resource ID for managed identity. For Onelake files, connection string would be either the
         workspace guid or workspace FQDN; Onelake only supports managed identity connections. Set to
         ``<unchanged>`` (with brackets) if you don't want the connection string updated. Set to
         ``<redacted>`` if you want to remove the connection string value from the datasource.
        :paramtype connection_string: str
        """
        super().__init__(**kwargs)
        self.connection_string = connection_string


class DefaultCognitiveServicesAccount(CognitiveServicesAccount):
    """An empty object that represents the default Azure AI service resource for a skillset.

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

    :ivar odata_type: A URI fragment specifying the type of Azure AI service resource attached to a
     skillset. Required.
    :vartype odata_type: str
    :ivar description: Description of the Azure AI service resource attached to a skillset.
    :vartype description: str
    """

    _validation = {
        "odata_type": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "description": {"key": "description", "type": "str"},
    }

    def __init__(self, *, description: Optional[str] = None, **kwargs: Any) -> None:
        """
        :keyword description: Description of the Azure AI service resource attached to a skillset.
        :paramtype description: str
        """
        super().__init__(description=description, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.DefaultCognitiveServices"


class DictionaryDecompounderTokenFilter(TokenFilter):
    """Decomposes compound words found in many Germanic languages. This token filter is implemented
    using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar word_list: The list of words to match against. Required.
    :vartype word_list: list[str]
    :ivar min_word_size: The minimum word size. Only words longer than this get processed. Default
     is 5. Maximum is 300.
    :vartype min_word_size: int
    :ivar min_subword_size: The minimum subword size. Only subwords longer than this are outputted.
     Default is 2. Maximum is 300.
    :vartype min_subword_size: int
    :ivar max_subword_size: The maximum subword size. Only subwords shorter than this are
     outputted. Default is 15. Maximum is 300.
    :vartype max_subword_size: int
    :ivar only_longest_match: A value indicating whether to add only the longest matching subword
     to the output. Default is false.
    :vartype only_longest_match: bool
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "word_list": {"required": True},
        "min_word_size": {"maximum": 300},
        "min_subword_size": {"maximum": 300},
        "max_subword_size": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "word_list": {"key": "wordList", "type": "[str]"},
        "min_word_size": {"key": "minWordSize", "type": "int"},
        "min_subword_size": {"key": "minSubwordSize", "type": "int"},
        "max_subword_size": {"key": "maxSubwordSize", "type": "int"},
        "only_longest_match": {"key": "onlyLongestMatch", "type": "bool"},
    }

    def __init__(
        self,
        *,
        name: str,
        word_list: list[str],
        min_word_size: int = 5,
        min_subword_size: int = 2,
        max_subword_size: int = 15,
        only_longest_match: bool = False,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword word_list: The list of words to match against. Required.
        :paramtype word_list: list[str]
        :keyword min_word_size: The minimum word size. Only words longer than this get processed.
         Default is 5. Maximum is 300.
        :paramtype min_word_size: int
        :keyword min_subword_size: The minimum subword size. Only subwords longer than this are
         outputted. Default is 2. Maximum is 300.
        :paramtype min_subword_size: int
        :keyword max_subword_size: The maximum subword size. Only subwords shorter than this are
         outputted. Default is 15. Maximum is 300.
        :paramtype max_subword_size: int
        :keyword only_longest_match: A value indicating whether to add only the longest matching
         subword to the output. Default is false.
        :paramtype only_longest_match: bool
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.DictionaryDecompounderTokenFilter"
        self.word_list = word_list
        self.min_word_size = min_word_size
        self.min_subword_size = min_subword_size
        self.max_subword_size = max_subword_size
        self.only_longest_match = only_longest_match


class ScoringFunction(_serialization.Model):
    """Base type for functions that can modify document scores during ranking.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    DistanceScoringFunction, FreshnessScoringFunction, MagnitudeScoringFunction, TagScoringFunction

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

    :ivar type: Indicates the type of function to use. Valid values include magnitude, freshness,
     distance, and tag. The function type must be lower case. Required.
    :vartype type: str
    :ivar field_name: The name of the field used as input to the scoring function. Required.
    :vartype field_name: str
    :ivar boost: A multiplier for the raw score. Must be a positive number not equal to 1.0.
     Required.
    :vartype boost: float
    :ivar interpolation: A value indicating how boosting will be interpolated across document
     scores; defaults to "Linear". Known values are: "linear", "constant", "quadratic", and
     "logarithmic".
    :vartype interpolation: str or
     ~azure.search.documents.indexes.models.ScoringFunctionInterpolation
    """

    _validation = {
        "type": {"required": True},
        "field_name": {"required": True},
        "boost": {"required": True},
    }

    _attribute_map = {
        "type": {"key": "type", "type": "str"},
        "field_name": {"key": "fieldName", "type": "str"},
        "boost": {"key": "boost", "type": "float"},
        "interpolation": {"key": "interpolation", "type": "str"},
    }

    _subtype_map = {
        "type": {
            "distance": "DistanceScoringFunction",
            "freshness": "FreshnessScoringFunction",
            "magnitude": "MagnitudeScoringFunction",
            "tag": "TagScoringFunction",
        }
    }

    def __init__(
        self,
        *,
        field_name: str,
        boost: float,
        interpolation: Optional[Union[str, "_models.ScoringFunctionInterpolation"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword field_name: The name of the field used as input to the scoring function. Required.
        :paramtype field_name: str
        :keyword boost: A multiplier for the raw score. Must be a positive number not equal to 1.0.
         Required.
        :paramtype boost: float
        :keyword interpolation: A value indicating how boosting will be interpolated across document
         scores; defaults to "Linear". Known values are: "linear", "constant", "quadratic", and
         "logarithmic".
        :paramtype interpolation: str or
         ~azure.search.documents.indexes.models.ScoringFunctionInterpolation
        """
        super().__init__(**kwargs)
        self.type: Optional[str] = None
        self.field_name = field_name
        self.boost = boost
        self.interpolation = interpolation


class DistanceScoringFunction(ScoringFunction):
    """Defines a function that boosts scores based on distance from a geographic location.

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

    :ivar type: Indicates the type of function to use. Valid values include magnitude, freshness,
     distance, and tag. The function type must be lower case. Required.
    :vartype type: str
    :ivar field_name: The name of the field used as input to the scoring function. Required.
    :vartype field_name: str
    :ivar boost: A multiplier for the raw score. Must be a positive number not equal to 1.0.
     Required.
    :vartype boost: float
    :ivar interpolation: A value indicating how boosting will be interpolated across document
     scores; defaults to "Linear". Known values are: "linear", "constant", "quadratic", and
     "logarithmic".
    :vartype interpolation: str or
     ~azure.search.documents.indexes.models.ScoringFunctionInterpolation
    :ivar parameters: Parameter values for the distance scoring function. Required.
    :vartype parameters: ~azure.search.documents.indexes.models.DistanceScoringParameters
    """

    _validation = {
        "type": {"required": True},
        "field_name": {"required": True},
        "boost": {"required": True},
        "parameters": {"required": True},
    }

    _attribute_map = {
        "type": {"key": "type", "type": "str"},
        "field_name": {"key": "fieldName", "type": "str"},
        "boost": {"key": "boost", "type": "float"},
        "interpolation": {"key": "interpolation", "type": "str"},
        "parameters": {"key": "distance", "type": "DistanceScoringParameters"},
    }

    def __init__(
        self,
        *,
        field_name: str,
        boost: float,
        parameters: "_models.DistanceScoringParameters",
        interpolation: Optional[Union[str, "_models.ScoringFunctionInterpolation"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword field_name: The name of the field used as input to the scoring function. Required.
        :paramtype field_name: str
        :keyword boost: A multiplier for the raw score. Must be a positive number not equal to 1.0.
         Required.
        :paramtype boost: float
        :keyword interpolation: A value indicating how boosting will be interpolated across document
         scores; defaults to "Linear". Known values are: "linear", "constant", "quadratic", and
         "logarithmic".
        :paramtype interpolation: str or
         ~azure.search.documents.indexes.models.ScoringFunctionInterpolation
        :keyword parameters: Parameter values for the distance scoring function. Required.
        :paramtype parameters: ~azure.search.documents.indexes.models.DistanceScoringParameters
        """
        super().__init__(field_name=field_name, boost=boost, interpolation=interpolation, **kwargs)
        self.type: str = "distance"
        self.parameters = parameters


class DistanceScoringParameters(_serialization.Model):
    """Provides parameter values to a distance scoring function.

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

    :ivar reference_point_parameter: The name of the parameter passed in search queries to specify
     the reference location. Required.
    :vartype reference_point_parameter: str
    :ivar boosting_distance: The distance in kilometers from the reference location where the
     boosting range ends. Required.
    :vartype boosting_distance: float
    """

    _validation = {
        "reference_point_parameter": {"required": True},
        "boosting_distance": {"required": True},
    }

    _attribute_map = {
        "reference_point_parameter": {"key": "referencePointParameter", "type": "str"},
        "boosting_distance": {"key": "boostingDistance", "type": "float"},
    }

    def __init__(self, *, reference_point_parameter: str, boosting_distance: float, **kwargs: Any) -> None:
        """
        :keyword reference_point_parameter: The name of the parameter passed in search queries to
         specify the reference location. Required.
        :paramtype reference_point_parameter: str
        :keyword boosting_distance: The distance in kilometers from the reference location where the
         boosting range ends. Required.
        :paramtype boosting_distance: float
        """
        super().__init__(**kwargs)
        self.reference_point_parameter = reference_point_parameter
        self.boosting_distance = boosting_distance


class DocumentExtractionSkill(SearchIndexerSkill):
    """A skill that extracts content from a file within the enrichment pipeline.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar parsing_mode: The parsingMode for the skill. Will be set to 'default' if not defined.
    :vartype parsing_mode: str
    :ivar data_to_extract: The type of data to be extracted for the skill. Will be set to
     'contentAndMetadata' if not defined.
    :vartype data_to_extract: str
    :ivar configuration: A dictionary of configurations for the skill.
    :vartype configuration: dict[str, any]
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "parsing_mode": {"key": "parsingMode", "type": "str"},
        "data_to_extract": {"key": "dataToExtract", "type": "str"},
        "configuration": {"key": "configuration", "type": "{object}"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        parsing_mode: Optional[str] = None,
        data_to_extract: Optional[str] = None,
        configuration: Optional[dict[str, Any]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword parsing_mode: The parsingMode for the skill. Will be set to 'default' if not defined.
        :paramtype parsing_mode: str
        :keyword data_to_extract: The type of data to be extracted for the skill. Will be set to
         'contentAndMetadata' if not defined.
        :paramtype data_to_extract: str
        :keyword configuration: A dictionary of configurations for the skill.
        :paramtype configuration: dict[str, any]
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Util.DocumentExtractionSkill"
        self.parsing_mode = parsing_mode
        self.data_to_extract = data_to_extract
        self.configuration = configuration


class DocumentIntelligenceLayoutSkill(SearchIndexerSkill):
    """A skill that extracts content and layout information, via Azure AI Services, from files within
    the enrichment pipeline.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar output_format: Controls the cardinality of the output format. Default is 'markdown'.
     Known values are: "text" and "markdown".
    :vartype output_format: str or
     ~azure.search.documents.indexes.models.DocumentIntelligenceLayoutSkillOutputFormat
    :ivar output_mode: Controls the cardinality of the output produced by the skill. Default is
     'oneToMany'. "oneToMany"
    :vartype output_mode: str or
     ~azure.search.documents.indexes.models.DocumentIntelligenceLayoutSkillOutputMode
    :ivar markdown_header_depth: The depth of headers in the markdown output. Default is h6. Known
     values are: "h1", "h2", "h3", "h4", "h5", and "h6".
    :vartype markdown_header_depth: str or
     ~azure.search.documents.indexes.models.DocumentIntelligenceLayoutSkillMarkdownHeaderDepth
    :ivar extraction_options: Controls the cardinality of the content extracted from the document
     by the skill.
    :vartype extraction_options: list[str or
     ~azure.search.documents.indexes.models.DocumentIntelligenceLayoutSkillExtractionOptions]
    :ivar chunking_properties: Controls the cardinality for chunking the content.
    :vartype chunking_properties:
     ~azure.search.documents.indexes.models.DocumentIntelligenceLayoutSkillChunkingProperties
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "output_format": {"key": "outputFormat", "type": "str"},
        "output_mode": {"key": "outputMode", "type": "str"},
        "markdown_header_depth": {"key": "markdownHeaderDepth", "type": "str"},
        "extraction_options": {"key": "extractionOptions", "type": "[str]"},
        "chunking_properties": {
            "key": "chunkingProperties",
            "type": "DocumentIntelligenceLayoutSkillChunkingProperties",
        },
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        output_format: Union[str, "_models.DocumentIntelligenceLayoutSkillOutputFormat"] = "markdown",
        output_mode: Union[str, "_models.DocumentIntelligenceLayoutSkillOutputMode"] = "oneToMany",
        markdown_header_depth: Union[str, "_models.DocumentIntelligenceLayoutSkillMarkdownHeaderDepth"] = "h6",
        extraction_options: Optional[
            list[Union[str, "_models.DocumentIntelligenceLayoutSkillExtractionOptions"]]
        ] = None,
        chunking_properties: Optional["_models.DocumentIntelligenceLayoutSkillChunkingProperties"] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword output_format: Controls the cardinality of the output format. Default is 'markdown'.
         Known values are: "text" and "markdown".
        :paramtype output_format: str or
         ~azure.search.documents.indexes.models.DocumentIntelligenceLayoutSkillOutputFormat
        :keyword output_mode: Controls the cardinality of the output produced by the skill. Default is
         'oneToMany'. "oneToMany"
        :paramtype output_mode: str or
         ~azure.search.documents.indexes.models.DocumentIntelligenceLayoutSkillOutputMode
        :keyword markdown_header_depth: The depth of headers in the markdown output. Default is h6.
         Known values are: "h1", "h2", "h3", "h4", "h5", and "h6".
        :paramtype markdown_header_depth: str or
         ~azure.search.documents.indexes.models.DocumentIntelligenceLayoutSkillMarkdownHeaderDepth
        :keyword extraction_options: Controls the cardinality of the content extracted from the
         document by the skill.
        :paramtype extraction_options: list[str or
         ~azure.search.documents.indexes.models.DocumentIntelligenceLayoutSkillExtractionOptions]
        :keyword chunking_properties: Controls the cardinality for chunking the content.
        :paramtype chunking_properties:
         ~azure.search.documents.indexes.models.DocumentIntelligenceLayoutSkillChunkingProperties
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill"
        self.output_format = output_format
        self.output_mode = output_mode
        self.markdown_header_depth = markdown_header_depth
        self.extraction_options = extraction_options
        self.chunking_properties = chunking_properties


class DocumentIntelligenceLayoutSkillChunkingProperties(_serialization.Model):  # pylint: disable=name-too-long
    """Controls the cardinality for chunking the content.

    :ivar unit: The unit of the chunk. "characters"
    :vartype unit: str or
     ~azure.search.documents.indexes.models.DocumentIntelligenceLayoutSkillChunkingUnit
    :ivar maximum_length: The maximum chunk length in characters. Default is 500.
    :vartype maximum_length: int
    :ivar overlap_length: The length of overlap provided between two text chunks. Default is 0.
    :vartype overlap_length: int
    """

    _attribute_map = {
        "unit": {"key": "unit", "type": "str"},
        "maximum_length": {"key": "maximumLength", "type": "int"},
        "overlap_length": {"key": "overlapLength", "type": "int"},
    }

    def __init__(
        self,
        *,
        unit: Union[str, "_models.DocumentIntelligenceLayoutSkillChunkingUnit"] = "characters",
        maximum_length: Optional[int] = None,
        overlap_length: Optional[int] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword unit: The unit of the chunk. "characters"
        :paramtype unit: str or
         ~azure.search.documents.indexes.models.DocumentIntelligenceLayoutSkillChunkingUnit
        :keyword maximum_length: The maximum chunk length in characters. Default is 500.
        :paramtype maximum_length: int
        :keyword overlap_length: The length of overlap provided between two text chunks. Default is 0.
        :paramtype overlap_length: int
        """
        super().__init__(**kwargs)
        self.unit = unit
        self.maximum_length = maximum_length
        self.overlap_length = overlap_length


class EdgeNGramTokenFilter(TokenFilter):
    """Generates n-grams of the given size(s) starting from the front or the back of an input token.
    This token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar min_gram: The minimum n-gram length. Default is 1. Must be less than the value of
     maxGram.
    :vartype min_gram: int
    :ivar max_gram: The maximum n-gram length. Default is 2.
    :vartype max_gram: int
    :ivar side: Specifies which side of the input the n-gram should be generated from. Default is
     "front". Known values are: "front" and "back".
    :vartype side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "min_gram": {"key": "minGram", "type": "int"},
        "max_gram": {"key": "maxGram", "type": "int"},
        "side": {"key": "side", "type": "str"},
    }

    def __init__(
        self,
        *,
        name: str,
        min_gram: int = 1,
        max_gram: int = 2,
        side: Optional[Union[str, "_models.EdgeNGramTokenFilterSide"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword min_gram: The minimum n-gram length. Default is 1. Must be less than the value of
         maxGram.
        :paramtype min_gram: int
        :keyword max_gram: The maximum n-gram length. Default is 2.
        :paramtype max_gram: int
        :keyword side: Specifies which side of the input the n-gram should be generated from. Default
         is "front". Known values are: "front" and "back".
        :paramtype side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.EdgeNGramTokenFilter"
        self.min_gram = min_gram
        self.max_gram = max_gram
        self.side = side


class EdgeNGramTokenFilterV2(TokenFilter):
    """Generates n-grams of the given size(s) starting from the front or the back of an input token.
    This token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the
     value of maxGram.
    :vartype min_gram: int
    :ivar max_gram: The maximum n-gram length. Default is 2. Maximum is 300.
    :vartype max_gram: int
    :ivar side: Specifies which side of the input the n-gram should be generated from. Default is
     "front". Known values are: "front" and "back".
    :vartype side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "min_gram": {"maximum": 300},
        "max_gram": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "min_gram": {"key": "minGram", "type": "int"},
        "max_gram": {"key": "maxGram", "type": "int"},
        "side": {"key": "side", "type": "str"},
    }

    def __init__(
        self,
        *,
        name: str,
        min_gram: int = 1,
        max_gram: int = 2,
        side: Optional[Union[str, "_models.EdgeNGramTokenFilterSide"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than
         the value of maxGram.
        :paramtype min_gram: int
        :keyword max_gram: The maximum n-gram length. Default is 2. Maximum is 300.
        :paramtype max_gram: int
        :keyword side: Specifies which side of the input the n-gram should be generated from. Default
         is "front". Known values are: "front" and "back".
        :paramtype side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.EdgeNGramTokenFilterV2"
        self.min_gram = min_gram
        self.max_gram = max_gram
        self.side = side


class EdgeNGramTokenizer(LexicalTokenizer):
    """Tokenizes the input from an edge into n-grams of the given size(s). This tokenizer is
    implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of tokenizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the
     value of maxGram.
    :vartype min_gram: int
    :ivar max_gram: The maximum n-gram length. Default is 2. Maximum is 300.
    :vartype max_gram: int
    :ivar token_chars: Character classes to keep in the tokens.
    :vartype token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind]
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "min_gram": {"maximum": 300},
        "max_gram": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "min_gram": {"key": "minGram", "type": "int"},
        "max_gram": {"key": "maxGram", "type": "int"},
        "token_chars": {"key": "tokenChars", "type": "[str]"},
    }

    def __init__(
        self,
        *,
        name: str,
        min_gram: int = 1,
        max_gram: int = 2,
        token_chars: Optional[list[Union[str, "_models.TokenCharacterKind"]]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than
         the value of maxGram.
        :paramtype min_gram: int
        :keyword max_gram: The maximum n-gram length. Default is 2. Maximum is 300.
        :paramtype max_gram: int
        :keyword token_chars: Character classes to keep in the tokens.
        :paramtype token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind]
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.EdgeNGramTokenizer"
        self.min_gram = min_gram
        self.max_gram = max_gram
        self.token_chars = token_chars


class ElisionTokenFilter(TokenFilter):
    """Removes elisions. For example, "l'avion" (the plane) will be converted to "avion" (plane). This
    token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar articles: The set of articles to remove.
    :vartype articles: list[str]
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "articles": {"key": "articles", "type": "[str]"},
    }

    def __init__(self, *, name: str, articles: Optional[list[str]] = None, **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword articles: The set of articles to remove.
        :paramtype articles: list[str]
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.ElisionTokenFilter"
        self.articles = articles


class EntityLinkingSkill(SearchIndexerSkill):
    """Using the Text Analytics API, extracts linked entities from text.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar default_language_code: A value indicating which language code to use. Default is ``en``.
    :vartype default_language_code: str
    :ivar minimum_precision: A value between 0 and 1 that be used to only include entities whose
     confidence score is greater than the value specified. If not set (default), or if explicitly
     set to null, all entities will be included.
    :vartype minimum_precision: float
    :ivar model_version: The version of the model to use when calling the Text Analytics service.
     It will default to the latest available when not specified. We recommend you do not specify
     this value unless absolutely necessary.
    :vartype model_version: str
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
        "minimum_precision": {"maximum": 1, "minimum": 0},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "default_language_code": {"key": "defaultLanguageCode", "type": "str"},
        "minimum_precision": {"key": "minimumPrecision", "type": "float"},
        "model_version": {"key": "modelVersion", "type": "str"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        default_language_code: Optional[str] = None,
        minimum_precision: Optional[float] = None,
        model_version: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword default_language_code: A value indicating which language code to use. Default is
         ``en``.
        :paramtype default_language_code: str
        :keyword minimum_precision: A value between 0 and 1 that be used to only include entities whose
         confidence score is greater than the value specified. If not set (default), or if explicitly
         set to null, all entities will be included.
        :paramtype minimum_precision: float
        :keyword model_version: The version of the model to use when calling the Text Analytics
         service. It will default to the latest available when not specified. We recommend you do not
         specify this value unless absolutely necessary.
        :paramtype model_version: str
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Text.V3.EntityLinkingSkill"
        self.default_language_code = default_language_code
        self.minimum_precision = minimum_precision
        self.model_version = model_version


class EntityRecognitionSkill(SearchIndexerSkill):
    """This skill is deprecated. Use the V3.EntityRecognitionSkill instead.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar categories: A list of entity categories that should be extracted.
    :vartype categories: list[str or ~azure.search.documents.indexes.models.EntityCategory]
    :ivar default_language_code: A value indicating which language code to use. Default is ``en``.
     Known values are: "ar", "cs", "zh-Hans", "zh-Hant", "da", "nl", "en", "fi", "fr", "de", "el",
     "hu", "it", "ja", "ko", "no", "pl", "pt-PT", "pt-BR", "ru", "es", "sv", and "tr".
    :vartype default_language_code: str or
     ~azure.search.documents.indexes.models.EntityRecognitionSkillLanguage
    :ivar include_typeless_entities: Determines whether or not to include entities which are well
     known but don't conform to a pre-defined type. If this configuration is not set (default), set
     to null or set to false, entities which don't conform to one of the pre-defined types will not
     be surfaced.
    :vartype include_typeless_entities: bool
    :ivar minimum_precision: A value between 0 and 1 that be used to only include entities whose
     confidence score is greater than the value specified. If not set (default), or if explicitly
     set to null, all entities will be included.
    :vartype minimum_precision: float
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "categories": {"key": "categories", "type": "[str]"},
        "default_language_code": {"key": "defaultLanguageCode", "type": "str"},
        "include_typeless_entities": {"key": "includeTypelessEntities", "type": "bool"},
        "minimum_precision": {"key": "minimumPrecision", "type": "float"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        categories: Optional[list[Union[str, "_models.EntityCategory"]]] = None,
        default_language_code: Optional[Union[str, "_models.EntityRecognitionSkillLanguage"]] = None,
        include_typeless_entities: Optional[bool] = None,
        minimum_precision: Optional[float] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword categories: A list of entity categories that should be extracted.
        :paramtype categories: list[str or ~azure.search.documents.indexes.models.EntityCategory]
        :keyword default_language_code: A value indicating which language code to use. Default is
         ``en``. Known values are: "ar", "cs", "zh-Hans", "zh-Hant", "da", "nl", "en", "fi", "fr", "de",
         "el", "hu", "it", "ja", "ko", "no", "pl", "pt-PT", "pt-BR", "ru", "es", "sv", and "tr".
        :paramtype default_language_code: str or
         ~azure.search.documents.indexes.models.EntityRecognitionSkillLanguage
        :keyword include_typeless_entities: Determines whether or not to include entities which are
         well known but don't conform to a pre-defined type. If this configuration is not set (default),
         set to null or set to false, entities which don't conform to one of the pre-defined types will
         not be surfaced.
        :paramtype include_typeless_entities: bool
        :keyword minimum_precision: A value between 0 and 1 that be used to only include entities whose
         confidence score is greater than the value specified. If not set (default), or if explicitly
         set to null, all entities will be included.
        :paramtype minimum_precision: float
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Text.EntityRecognitionSkill"
        self.categories = categories
        self.default_language_code = default_language_code
        self.include_typeless_entities = include_typeless_entities
        self.minimum_precision = minimum_precision


class EntityRecognitionSkillV3(SearchIndexerSkill):
    """Using the Text Analytics API, extracts entities of different types from text.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar categories: A list of entity categories that should be extracted.
    :vartype categories: list[str]
    :ivar default_language_code: A value indicating which language code to use. Default is ``en``.
    :vartype default_language_code: str
    :ivar minimum_precision: A value between 0 and 1 that be used to only include entities whose
     confidence score is greater than the value specified. If not set (default), or if explicitly
     set to null, all entities will be included.
    :vartype minimum_precision: float
    :ivar model_version: The version of the model to use when calling the Text Analytics API. It
     will default to the latest available when not specified. We recommend you do not specify this
     value unless absolutely necessary.
    :vartype model_version: str
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
        "minimum_precision": {"maximum": 1, "minimum": 0},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "categories": {"key": "categories", "type": "[str]"},
        "default_language_code": {"key": "defaultLanguageCode", "type": "str"},
        "minimum_precision": {"key": "minimumPrecision", "type": "float"},
        "model_version": {"key": "modelVersion", "type": "str"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        categories: Optional[list[str]] = None,
        default_language_code: Optional[str] = None,
        minimum_precision: Optional[float] = None,
        model_version: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword categories: A list of entity categories that should be extracted.
        :paramtype categories: list[str]
        :keyword default_language_code: A value indicating which language code to use. Default is
         ``en``.
        :paramtype default_language_code: str
        :keyword minimum_precision: A value between 0 and 1 that be used to only include entities whose
         confidence score is greater than the value specified. If not set (default), or if explicitly
         set to null, all entities will be included.
        :paramtype minimum_precision: float
        :keyword model_version: The version of the model to use when calling the Text Analytics API. It
         will default to the latest available when not specified. We recommend you do not specify this
         value unless absolutely necessary.
        :paramtype model_version: str
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Text.V3.EntityRecognitionSkill"
        self.categories = categories
        self.default_language_code = default_language_code
        self.minimum_precision = minimum_precision
        self.model_version = model_version


class ErrorAdditionalInfo(_serialization.Model):
    """The resource management error additional info.

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

    :ivar type: The additional info type.
    :vartype type: str
    :ivar info: The additional info.
    :vartype info: JSON
    """

    _validation = {
        "type": {"readonly": True},
        "info": {"readonly": True},
    }

    _attribute_map = {
        "type": {"key": "type", "type": "str"},
        "info": {"key": "info", "type": "object"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.type: Optional[str] = None
        self.info: Optional[JSON] = None


class ErrorDetail(_serialization.Model):
    """The error detail.

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

    :ivar code: The error code.
    :vartype code: str
    :ivar message: The error message.
    :vartype message: str
    :ivar target: The error target.
    :vartype target: str
    :ivar details: The error details.
    :vartype details: list[~azure.search.documents.indexes.models.ErrorDetail]
    :ivar additional_info: The error additional info.
    :vartype additional_info: list[~azure.search.documents.indexes.models.ErrorAdditionalInfo]
    """

    _validation = {
        "code": {"readonly": True},
        "message": {"readonly": True},
        "target": {"readonly": True},
        "details": {"readonly": True},
        "additional_info": {"readonly": True},
    }

    _attribute_map = {
        "code": {"key": "code", "type": "str"},
        "message": {"key": "message", "type": "str"},
        "target": {"key": "target", "type": "str"},
        "details": {"key": "details", "type": "[ErrorDetail]"},
        "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.code: Optional[str] = None
        self.message: Optional[str] = None
        self.target: Optional[str] = None
        self.details: Optional[list["_models.ErrorDetail"]] = None
        self.additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = None


class ErrorResponse(_serialization.Model):
    """Common error response for all Azure Resource Manager APIs to return error details for failed
    operations. (This also follows the OData error response format.).

    :ivar error: The error object.
    :vartype error: ~azure.search.documents.indexes.models.ErrorDetail
    """

    _attribute_map = {
        "error": {"key": "error", "type": "ErrorDetail"},
    }

    def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None:
        """
        :keyword error: The error object.
        :paramtype error: ~azure.search.documents.indexes.models.ErrorDetail
        """
        super().__init__(**kwargs)
        self.error = error


class VectorSearchAlgorithmConfiguration(_serialization.Model):
    """Contains configuration options specific to the algorithm used during indexing or querying.

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

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

    :ivar name: The name to associate with this particular configuration. Required.
    :vartype name: str
    :ivar kind: The name of the kind of algorithm being configured for use with vector search.
     Required. Known values are: "hnsw" and "exhaustiveKnn".
    :vartype kind: str or ~azure.search.documents.indexes.models.VectorSearchAlgorithmKind
    """

    _validation = {
        "name": {"required": True},
        "kind": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "kind": {"key": "kind", "type": "str"},
    }

    _subtype_map = {
        "kind": {"exhaustiveKnn": "ExhaustiveKnnAlgorithmConfiguration", "hnsw": "HnswAlgorithmConfiguration"}
    }

    def __init__(self, *, name: str, **kwargs: Any) -> None:
        """
        :keyword name: The name to associate with this particular configuration. Required.
        :paramtype name: str
        """
        super().__init__(**kwargs)
        self.name = name
        self.kind: Optional[str] = None


class ExhaustiveKnnAlgorithmConfiguration(VectorSearchAlgorithmConfiguration):
    """Contains configuration options specific to the exhaustive KNN algorithm used during querying,
    which will perform brute-force search across the entire vector index.

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

    :ivar name: The name to associate with this particular configuration. Required.
    :vartype name: str
    :ivar kind: The name of the kind of algorithm being configured for use with vector search.
     Required. Known values are: "hnsw" and "exhaustiveKnn".
    :vartype kind: str or ~azure.search.documents.indexes.models.VectorSearchAlgorithmKind
    :ivar parameters: Contains the parameters specific to exhaustive KNN algorithm.
    :vartype parameters: ~azure.search.documents.indexes.models.ExhaustiveKnnParameters
    """

    _validation = {
        "name": {"required": True},
        "kind": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "kind": {"key": "kind", "type": "str"},
        "parameters": {"key": "exhaustiveKnnParameters", "type": "ExhaustiveKnnParameters"},
    }

    def __init__(
        self, *, name: str, parameters: Optional["_models.ExhaustiveKnnParameters"] = None, **kwargs: Any
    ) -> None:
        """
        :keyword name: The name to associate with this particular configuration. Required.
        :paramtype name: str
        :keyword parameters: Contains the parameters specific to exhaustive KNN algorithm.
        :paramtype parameters: ~azure.search.documents.indexes.models.ExhaustiveKnnParameters
        """
        super().__init__(name=name, **kwargs)
        self.kind: str = "exhaustiveKnn"
        self.parameters = parameters


class ExhaustiveKnnParameters(_serialization.Model):
    """Contains the parameters specific to exhaustive KNN algorithm.

    :ivar metric: The similarity metric to use for vector comparisons. Known values are: "cosine",
     "euclidean", "dotProduct", and "hamming".
    :vartype metric: str or ~azure.search.documents.indexes.models.VectorSearchAlgorithmMetric
    """

    _attribute_map = {
        "metric": {"key": "metric", "type": "str"},
    }

    def __init__(
        self, *, metric: Optional[Union[str, "_models.VectorSearchAlgorithmMetric"]] = None, **kwargs: Any
    ) -> None:
        """
        :keyword metric: The similarity metric to use for vector comparisons. Known values are:
         "cosine", "euclidean", "dotProduct", and "hamming".
        :paramtype metric: str or ~azure.search.documents.indexes.models.VectorSearchAlgorithmMetric
        """
        super().__init__(**kwargs)
        self.metric = metric


class FieldMapping(_serialization.Model):
    """Defines a mapping between a field in a data source and a target field in an index.

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

    :ivar source_field_name: The name of the field in the data source. Required.
    :vartype source_field_name: str
    :ivar target_field_name: The name of the target field in the index. Same as the source field
     name by default.
    :vartype target_field_name: str
    :ivar mapping_function: A function to apply to each source field value before indexing.
    :vartype mapping_function: ~azure.search.documents.indexes.models.FieldMappingFunction
    """

    _validation = {
        "source_field_name": {"required": True},
    }

    _attribute_map = {
        "source_field_name": {"key": "sourceFieldName", "type": "str"},
        "target_field_name": {"key": "targetFieldName", "type": "str"},
        "mapping_function": {"key": "mappingFunction", "type": "FieldMappingFunction"},
    }

    def __init__(
        self,
        *,
        source_field_name: str,
        target_field_name: Optional[str] = None,
        mapping_function: Optional["_models.FieldMappingFunction"] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword source_field_name: The name of the field in the data source. Required.
        :paramtype source_field_name: str
        :keyword target_field_name: The name of the target field in the index. Same as the source field
         name by default.
        :paramtype target_field_name: str
        :keyword mapping_function: A function to apply to each source field value before indexing.
        :paramtype mapping_function: ~azure.search.documents.indexes.models.FieldMappingFunction
        """
        super().__init__(**kwargs)
        self.source_field_name = source_field_name
        self.target_field_name = target_field_name
        self.mapping_function = mapping_function


class FieldMappingFunction(_serialization.Model):
    """Represents a function that transforms a value from a data source before indexing.

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

    :ivar name: The name of the field mapping function. Required.
    :vartype name: str
    :ivar parameters: A dictionary of parameter name/value pairs to pass to the function. Each
     value must be of a primitive type.
    :vartype parameters: dict[str, any]
    """

    _validation = {
        "name": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "parameters": {"key": "parameters", "type": "{object}"},
    }

    def __init__(self, *, name: str, parameters: Optional[dict[str, Any]] = None, **kwargs: Any) -> None:
        """
        :keyword name: The name of the field mapping function. Required.
        :paramtype name: str
        :keyword parameters: A dictionary of parameter name/value pairs to pass to the function. Each
         value must be of a primitive type.
        :paramtype parameters: dict[str, any]
        """
        super().__init__(**kwargs)
        self.name = name
        self.parameters = parameters


class FreshnessScoringFunction(ScoringFunction):
    """Defines a function that boosts scores based on the value of a date-time field.

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

    :ivar type: Indicates the type of function to use. Valid values include magnitude, freshness,
     distance, and tag. The function type must be lower case. Required.
    :vartype type: str
    :ivar field_name: The name of the field used as input to the scoring function. Required.
    :vartype field_name: str
    :ivar boost: A multiplier for the raw score. Must be a positive number not equal to 1.0.
     Required.
    :vartype boost: float
    :ivar interpolation: A value indicating how boosting will be interpolated across document
     scores; defaults to "Linear". Known values are: "linear", "constant", "quadratic", and
     "logarithmic".
    :vartype interpolation: str or
     ~azure.search.documents.indexes.models.ScoringFunctionInterpolation
    :ivar parameters: Parameter values for the freshness scoring function. Required.
    :vartype parameters: ~azure.search.documents.indexes.models.FreshnessScoringParameters
    """

    _validation = {
        "type": {"required": True},
        "field_name": {"required": True},
        "boost": {"required": True},
        "parameters": {"required": True},
    }

    _attribute_map = {
        "type": {"key": "type", "type": "str"},
        "field_name": {"key": "fieldName", "type": "str"},
        "boost": {"key": "boost", "type": "float"},
        "interpolation": {"key": "interpolation", "type": "str"},
        "parameters": {"key": "freshness", "type": "FreshnessScoringParameters"},
    }

    def __init__(
        self,
        *,
        field_name: str,
        boost: float,
        parameters: "_models.FreshnessScoringParameters",
        interpolation: Optional[Union[str, "_models.ScoringFunctionInterpolation"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword field_name: The name of the field used as input to the scoring function. Required.
        :paramtype field_name: str
        :keyword boost: A multiplier for the raw score. Must be a positive number not equal to 1.0.
         Required.
        :paramtype boost: float
        :keyword interpolation: A value indicating how boosting will be interpolated across document
         scores; defaults to "Linear". Known values are: "linear", "constant", "quadratic", and
         "logarithmic".
        :paramtype interpolation: str or
         ~azure.search.documents.indexes.models.ScoringFunctionInterpolation
        :keyword parameters: Parameter values for the freshness scoring function. Required.
        :paramtype parameters: ~azure.search.documents.indexes.models.FreshnessScoringParameters
        """
        super().__init__(field_name=field_name, boost=boost, interpolation=interpolation, **kwargs)
        self.type: str = "freshness"
        self.parameters = parameters


class FreshnessScoringParameters(_serialization.Model):
    """Provides parameter values to a freshness scoring function.

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

    :ivar boosting_duration: The expiration period after which boosting will stop for a particular
     document. Required.
    :vartype boosting_duration: ~datetime.timedelta
    """

    _validation = {
        "boosting_duration": {"required": True},
    }

    _attribute_map = {
        "boosting_duration": {"key": "boostingDuration", "type": "duration"},
    }

    def __init__(self, *, boosting_duration: datetime.timedelta, **kwargs: Any) -> None:
        """
        :keyword boosting_duration: The expiration period after which boosting will stop for a
         particular document. Required.
        :paramtype boosting_duration: ~datetime.timedelta
        """
        super().__init__(**kwargs)
        self.boosting_duration = boosting_duration


class GetIndexStatisticsResult(_serialization.Model):
    """Statistics for a given index. Statistics are collected periodically and are not guaranteed to
    always be up-to-date.

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

    :ivar document_count: The number of documents in the index. Required.
    :vartype document_count: int
    :ivar storage_size: The amount of storage in bytes consumed by the index. Required.
    :vartype storage_size: int
    :ivar vector_index_size: The amount of memory in bytes consumed by vectors in the index.
     Required.
    :vartype vector_index_size: int
    """

    _validation = {
        "document_count": {"required": True, "readonly": True},
        "storage_size": {"required": True, "readonly": True},
        "vector_index_size": {"required": True, "readonly": True},
    }

    _attribute_map = {
        "document_count": {"key": "documentCount", "type": "int"},
        "storage_size": {"key": "storageSize", "type": "int"},
        "vector_index_size": {"key": "vectorIndexSize", "type": "int"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.document_count: Optional[int] = None
        self.storage_size: Optional[int] = None
        self.vector_index_size: Optional[int] = None


class HighWaterMarkChangeDetectionPolicy(DataChangeDetectionPolicy):
    """Defines a data change detection policy that captures changes based on the value of a high water
    mark column.

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

    :ivar odata_type: A URI fragment specifying the type of data change detection policy. Required.
    :vartype odata_type: str
    :ivar high_water_mark_column_name: The name of the high water mark column. Required.
    :vartype high_water_mark_column_name: str
    """

    _validation = {
        "odata_type": {"required": True},
        "high_water_mark_column_name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "high_water_mark_column_name": {"key": "highWaterMarkColumnName", "type": "str"},
    }

    def __init__(self, *, high_water_mark_column_name: str, **kwargs: Any) -> None:
        """
        :keyword high_water_mark_column_name: The name of the high water mark column. Required.
        :paramtype high_water_mark_column_name: str
        """
        super().__init__(**kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy"
        self.high_water_mark_column_name = high_water_mark_column_name


class HnswAlgorithmConfiguration(VectorSearchAlgorithmConfiguration):
    """Contains configuration options specific to the HNSW approximate nearest neighbors algorithm
    used during indexing and querying. The HNSW algorithm offers a tunable trade-off between search
    speed and accuracy.

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

    :ivar name: The name to associate with this particular configuration. Required.
    :vartype name: str
    :ivar kind: The name of the kind of algorithm being configured for use with vector search.
     Required. Known values are: "hnsw" and "exhaustiveKnn".
    :vartype kind: str or ~azure.search.documents.indexes.models.VectorSearchAlgorithmKind
    :ivar parameters: Contains the parameters specific to HNSW algorithm.
    :vartype parameters: ~azure.search.documents.indexes.models.HnswParameters
    """

    _validation = {
        "name": {"required": True},
        "kind": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "kind": {"key": "kind", "type": "str"},
        "parameters": {"key": "hnswParameters", "type": "HnswParameters"},
    }

    def __init__(self, *, name: str, parameters: Optional["_models.HnswParameters"] = None, **kwargs: Any) -> None:
        """
        :keyword name: The name to associate with this particular configuration. Required.
        :paramtype name: str
        :keyword parameters: Contains the parameters specific to HNSW algorithm.
        :paramtype parameters: ~azure.search.documents.indexes.models.HnswParameters
        """
        super().__init__(name=name, **kwargs)
        self.kind: str = "hnsw"
        self.parameters = parameters


class HnswParameters(_serialization.Model):
    """Contains the parameters specific to the HNSW algorithm.

    :ivar m: The number of bi-directional links created for every new element during construction.
     Increasing this parameter value may improve recall and reduce retrieval times for datasets with
     high intrinsic dimensionality at the expense of increased memory consumption and longer
     indexing time.
    :vartype m: int
    :ivar ef_construction: The size of the dynamic list containing the nearest neighbors, which is
     used during index time. Increasing this parameter may improve index quality, at the expense of
     increased indexing time. At a certain point, increasing this parameter leads to diminishing
     returns.
    :vartype ef_construction: int
    :ivar ef_search: The size of the dynamic list containing the nearest neighbors, which is used
     during search time. Increasing this parameter may improve search results, at the expense of
     slower search. At a certain point, increasing this parameter leads to diminishing returns.
    :vartype ef_search: int
    :ivar metric: The similarity metric to use for vector comparisons. Known values are: "cosine",
     "euclidean", "dotProduct", and "hamming".
    :vartype metric: str or ~azure.search.documents.indexes.models.VectorSearchAlgorithmMetric
    """

    _validation = {
        "m": {"maximum": 10, "minimum": 4},
        "ef_construction": {"maximum": 1000, "minimum": 100},
        "ef_search": {"maximum": 1000, "minimum": 100},
    }

    _attribute_map = {
        "m": {"key": "m", "type": "int"},
        "ef_construction": {"key": "efConstruction", "type": "int"},
        "ef_search": {"key": "efSearch", "type": "int"},
        "metric": {"key": "metric", "type": "str"},
    }

    def __init__(
        self,
        *,
        m: int = 4,
        ef_construction: int = 400,
        ef_search: int = 500,
        metric: Optional[Union[str, "_models.VectorSearchAlgorithmMetric"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword m: The number of bi-directional links created for every new element during
         construction. Increasing this parameter value may improve recall and reduce retrieval times for
         datasets with high intrinsic dimensionality at the expense of increased memory consumption and
         longer indexing time.
        :paramtype m: int
        :keyword ef_construction: The size of the dynamic list containing the nearest neighbors, which
         is used during index time. Increasing this parameter may improve index quality, at the expense
         of increased indexing time. At a certain point, increasing this parameter leads to diminishing
         returns.
        :paramtype ef_construction: int
        :keyword ef_search: The size of the dynamic list containing the nearest neighbors, which is
         used during search time. Increasing this parameter may improve search results, at the expense
         of slower search. At a certain point, increasing this parameter leads to diminishing returns.
        :paramtype ef_search: int
        :keyword metric: The similarity metric to use for vector comparisons. Known values are:
         "cosine", "euclidean", "dotProduct", and "hamming".
        :paramtype metric: str or ~azure.search.documents.indexes.models.VectorSearchAlgorithmMetric
        """
        super().__init__(**kwargs)
        self.m = m
        self.ef_construction = ef_construction
        self.ef_search = ef_search
        self.metric = metric


class ImageAnalysisSkill(SearchIndexerSkill):
    """A skill that analyzes image files. It extracts a rich set of visual features based on the image
    content.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar default_language_code: A value indicating which language code to use. Default is ``en``.
     Known values are: "ar", "az", "bg", "bs", "ca", "cs", "cy", "da", "de", "el", "en", "es", "et",
     "eu", "fi", "fr", "ga", "gl", "he", "hi", "hr", "hu", "id", "it", "ja", "kk", "ko", "lt", "lv",
     "mk", "ms", "nb", "nl", "pl", "prs", "pt-BR", "pt", "pt-PT", "ro", "ru", "sk", "sl", "sr-Cyrl",
     "sr-Latn", "sv", "th", "tr", "uk", "vi", "zh", "zh-Hans", and "zh-Hant".
    :vartype default_language_code: str or
     ~azure.search.documents.indexes.models.ImageAnalysisSkillLanguage
    :ivar visual_features: A list of visual features.
    :vartype visual_features: list[str or ~azure.search.documents.indexes.models.VisualFeature]
    :ivar details: A string indicating which domain-specific details to return.
    :vartype details: list[str or ~azure.search.documents.indexes.models.ImageDetail]
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "default_language_code": {"key": "defaultLanguageCode", "type": "str"},
        "visual_features": {"key": "visualFeatures", "type": "[str]"},
        "details": {"key": "details", "type": "[str]"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        default_language_code: Optional[Union[str, "_models.ImageAnalysisSkillLanguage"]] = None,
        visual_features: Optional[list[Union[str, "_models.VisualFeature"]]] = None,
        details: Optional[list[Union[str, "_models.ImageDetail"]]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword default_language_code: A value indicating which language code to use. Default is
         ``en``. Known values are: "ar", "az", "bg", "bs", "ca", "cs", "cy", "da", "de", "el", "en",
         "es", "et", "eu", "fi", "fr", "ga", "gl", "he", "hi", "hr", "hu", "id", "it", "ja", "kk", "ko",
         "lt", "lv", "mk", "ms", "nb", "nl", "pl", "prs", "pt-BR", "pt", "pt-PT", "ro", "ru", "sk",
         "sl", "sr-Cyrl", "sr-Latn", "sv", "th", "tr", "uk", "vi", "zh", "zh-Hans", and "zh-Hant".
        :paramtype default_language_code: str or
         ~azure.search.documents.indexes.models.ImageAnalysisSkillLanguage
        :keyword visual_features: A list of visual features.
        :paramtype visual_features: list[str or ~azure.search.documents.indexes.models.VisualFeature]
        :keyword details: A string indicating which domain-specific details to return.
        :paramtype details: list[str or ~azure.search.documents.indexes.models.ImageDetail]
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Vision.ImageAnalysisSkill"
        self.default_language_code = default_language_code
        self.visual_features = visual_features
        self.details = details


class IndexerExecutionResult(_serialization.Model):
    """Represents the result of an individual indexer execution.

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

    :ivar status: The outcome of this indexer execution. Required. Known values are:
     "transientFailure", "success", "inProgress", and "reset".
    :vartype status: str or ~azure.search.documents.indexes.models.IndexerExecutionStatus
    :ivar error_message: The error message indicating the top-level error, if any.
    :vartype error_message: str
    :ivar start_time: The start time of this indexer execution.
    :vartype start_time: ~datetime.datetime
    :ivar end_time: The end time of this indexer execution, if the execution has already completed.
    :vartype end_time: ~datetime.datetime
    :ivar errors: The item-level indexing errors. Required.
    :vartype errors: list[~azure.search.documents.indexes.models.SearchIndexerError]
    :ivar warnings: The item-level indexing warnings. Required.
    :vartype warnings: list[~azure.search.documents.indexes.models.SearchIndexerWarning]
    :ivar item_count: The number of items that were processed during this indexer execution. This
     includes both successfully processed items and items where indexing was attempted but failed.
     Required.
    :vartype item_count: int
    :ivar failed_item_count: The number of items that failed to be indexed during this indexer
     execution. Required.
    :vartype failed_item_count: int
    :ivar initial_tracking_state: Change tracking state with which an indexer execution started.
    :vartype initial_tracking_state: str
    :ivar final_tracking_state: Change tracking state with which an indexer execution finished.
    :vartype final_tracking_state: str
    """

    _validation = {
        "status": {"required": True, "readonly": True},
        "error_message": {"readonly": True},
        "start_time": {"readonly": True},
        "end_time": {"readonly": True},
        "errors": {"required": True, "readonly": True},
        "warnings": {"required": True, "readonly": True},
        "item_count": {"required": True, "readonly": True},
        "failed_item_count": {"required": True, "readonly": True},
        "initial_tracking_state": {"readonly": True},
        "final_tracking_state": {"readonly": True},
    }

    _attribute_map = {
        "status": {"key": "status", "type": "str"},
        "error_message": {"key": "errorMessage", "type": "str"},
        "start_time": {"key": "startTime", "type": "iso-8601"},
        "end_time": {"key": "endTime", "type": "iso-8601"},
        "errors": {"key": "errors", "type": "[SearchIndexerError]"},
        "warnings": {"key": "warnings", "type": "[SearchIndexerWarning]"},
        "item_count": {"key": "itemsProcessed", "type": "int"},
        "failed_item_count": {"key": "itemsFailed", "type": "int"},
        "initial_tracking_state": {"key": "initialTrackingState", "type": "str"},
        "final_tracking_state": {"key": "finalTrackingState", "type": "str"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.status: Optional[Union[str, "_models.IndexerExecutionStatus"]] = None
        self.error_message: Optional[str] = None
        self.start_time: Optional[datetime.datetime] = None
        self.end_time: Optional[datetime.datetime] = None
        self.errors: Optional[list["_models.SearchIndexerError"]] = None
        self.warnings: Optional[list["_models.SearchIndexerWarning"]] = None
        self.item_count: Optional[int] = None
        self.failed_item_count: Optional[int] = None
        self.initial_tracking_state: Optional[str] = None
        self.final_tracking_state: Optional[str] = None


class IndexingParameters(_serialization.Model):
    """Represents parameters for indexer execution.

    :ivar batch_size: The number of items that are read from the data source and indexed as a
     single batch in order to improve performance. The default depends on the data source type.
    :vartype batch_size: int
    :ivar max_failed_items: The maximum number of items that can fail indexing for indexer
     execution to still be considered successful. -1 means no limit. Default is 0.
    :vartype max_failed_items: int
    :ivar max_failed_items_per_batch: The maximum number of items in a single batch that can fail
     indexing for the batch to still be considered successful. -1 means no limit. Default is 0.
    :vartype max_failed_items_per_batch: int
    :ivar configuration: A dictionary of indexer-specific configuration properties. Each name is
     the name of a specific property. Each value must be of a primitive type.
    :vartype configuration: ~azure.search.documents.indexes.models.IndexingParametersConfiguration
    """

    _attribute_map = {
        "batch_size": {"key": "batchSize", "type": "int"},
        "max_failed_items": {"key": "maxFailedItems", "type": "int"},
        "max_failed_items_per_batch": {"key": "maxFailedItemsPerBatch", "type": "int"},
        "configuration": {"key": "configuration", "type": "IndexingParametersConfiguration"},
    }

    def __init__(
        self,
        *,
        batch_size: Optional[int] = None,
        max_failed_items: int = 0,
        max_failed_items_per_batch: int = 0,
        configuration: Optional["_models.IndexingParametersConfiguration"] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword batch_size: The number of items that are read from the data source and indexed as a
         single batch in order to improve performance. The default depends on the data source type.
        :paramtype batch_size: int
        :keyword max_failed_items: The maximum number of items that can fail indexing for indexer
         execution to still be considered successful. -1 means no limit. Default is 0.
        :paramtype max_failed_items: int
        :keyword max_failed_items_per_batch: The maximum number of items in a single batch that can
         fail indexing for the batch to still be considered successful. -1 means no limit. Default is 0.
        :paramtype max_failed_items_per_batch: int
        :keyword configuration: A dictionary of indexer-specific configuration properties. Each name is
         the name of a specific property. Each value must be of a primitive type.
        :paramtype configuration:
         ~azure.search.documents.indexes.models.IndexingParametersConfiguration
        """
        super().__init__(**kwargs)
        self.batch_size = batch_size
        self.max_failed_items = max_failed_items
        self.max_failed_items_per_batch = max_failed_items_per_batch
        self.configuration = configuration


class IndexingParametersConfiguration(_serialization.Model):
    """A dictionary of indexer-specific configuration properties. Each name is the name of a specific
    property. Each value must be of a primitive type.

    :ivar additional_properties: Unmatched properties from the message are deserialized to this
     collection.
    :vartype additional_properties: dict[str, any]
    :ivar parsing_mode: Represents the parsing mode for indexing from an Azure blob data source.
     Known values are: "default", "text", "delimitedText", "json", "jsonArray", and "jsonLines".
    :vartype parsing_mode: str or ~azure.search.documents.indexes.models.BlobIndexerParsingMode
    :ivar excluded_file_name_extensions: Comma-delimited list of filename extensions to ignore when
     processing from Azure blob storage.  For example, you could exclude ".png, .mp4" to skip over
     those files during indexing.
    :vartype excluded_file_name_extensions: str
    :ivar indexed_file_name_extensions: Comma-delimited list of filename extensions to select when
     processing from Azure blob storage.  For example, you could focus indexing on specific
     application files ".docx, .pptx, .msg" to specifically include those file types.
    :vartype indexed_file_name_extensions: str
    :ivar fail_on_unsupported_content_type: For Azure blobs, set to false if you want to continue
     indexing when an unsupported content type is encountered, and you don't know all the content
     types (file extensions) in advance.
    :vartype fail_on_unsupported_content_type: bool
    :ivar fail_on_unprocessable_document: For Azure blobs, set to false if you want to continue
     indexing if a document fails indexing.
    :vartype fail_on_unprocessable_document: bool
    :ivar index_storage_metadata_only_for_oversized_documents: For Azure blobs, set this property
     to true to still index storage metadata for blob content that is too large to process.
     Oversized blobs are treated as errors by default. For limits on blob size, see
     https://learn.microsoft.com/azure/search/search-limits-quotas-capacity.
    :vartype index_storage_metadata_only_for_oversized_documents: bool
    :ivar delimited_text_headers: For CSV blobs, specifies a comma-delimited list of column
     headers, useful for mapping source fields to destination fields in an index.
    :vartype delimited_text_headers: str
    :ivar delimited_text_delimiter: For CSV blobs, specifies the end-of-line single-character
     delimiter for CSV files where each line starts a new document (for example, "|").
    :vartype delimited_text_delimiter: str
    :ivar first_line_contains_headers: For CSV blobs, indicates that the first (non-blank) line of
     each blob contains headers.
    :vartype first_line_contains_headers: bool
    :ivar document_root: For JSON arrays, given a structured or semi-structured document, you can
     specify a path to the array using this property.
    :vartype document_root: str
    :ivar data_to_extract: Specifies the data to extract from Azure blob storage and tells the
     indexer which data to extract from image content when "imageAction" is set to a value other
     than "none".  This applies to embedded image content in a .PDF or other application, or image
     files such as .jpg and .png, in Azure blobs. Known values are: "storageMetadata",
     "allMetadata", and "contentAndMetadata".
    :vartype data_to_extract: str or
     ~azure.search.documents.indexes.models.BlobIndexerDataToExtract
    :ivar image_action: Determines how to process embedded images and image files in Azure blob
     storage.  Setting the "imageAction" configuration to any value other than "none" requires that
     a skillset also be attached to that indexer. Known values are: "none",
     "generateNormalizedImages", and "generateNormalizedImagePerPage".
    :vartype image_action: str or ~azure.search.documents.indexes.models.BlobIndexerImageAction
    :ivar allow_skillset_to_read_file_data: If true, will create a path //document//file_data that
     is an object representing the original file data downloaded from your blob data source.  This
     allows you to pass the original file data to a custom skill for processing within the
     enrichment pipeline, or to the Document Extraction skill.
    :vartype allow_skillset_to_read_file_data: bool
    :ivar pdf_text_rotation_algorithm: Determines algorithm for text extraction from PDF files in
     Azure blob storage. Known values are: "none" and "detectAngles".
    :vartype pdf_text_rotation_algorithm: str or
     ~azure.search.documents.indexes.models.BlobIndexerPDFTextRotationAlgorithm
    :ivar execution_environment: Specifies the environment in which the indexer should execute.
     Known values are: "standard" and "private".
    :vartype execution_environment: str or
     ~azure.search.documents.indexes.models.IndexerExecutionEnvironment
    :ivar query_timeout: Increases the timeout beyond the 5-minute default for Azure SQL database
     data sources, specified in the format "hh:mm:ss".
    :vartype query_timeout: str
    """

    _attribute_map = {
        "additional_properties": {"key": "", "type": "{object}"},
        "parsing_mode": {"key": "parsingMode", "type": "str"},
        "excluded_file_name_extensions": {"key": "excludedFileNameExtensions", "type": "str"},
        "indexed_file_name_extensions": {"key": "indexedFileNameExtensions", "type": "str"},
        "fail_on_unsupported_content_type": {"key": "failOnUnsupportedContentType", "type": "bool"},
        "fail_on_unprocessable_document": {"key": "failOnUnprocessableDocument", "type": "bool"},
        "index_storage_metadata_only_for_oversized_documents": {
            "key": "indexStorageMetadataOnlyForOversizedDocuments",
            "type": "bool",
        },
        "delimited_text_headers": {"key": "delimitedTextHeaders", "type": "str"},
        "delimited_text_delimiter": {"key": "delimitedTextDelimiter", "type": "str"},
        "first_line_contains_headers": {"key": "firstLineContainsHeaders", "type": "bool"},
        "document_root": {"key": "documentRoot", "type": "str"},
        "data_to_extract": {"key": "dataToExtract", "type": "str"},
        "image_action": {"key": "imageAction", "type": "str"},
        "allow_skillset_to_read_file_data": {"key": "allowSkillsetToReadFileData", "type": "bool"},
        "pdf_text_rotation_algorithm": {"key": "pdfTextRotationAlgorithm", "type": "str"},
        "execution_environment": {"key": "executionEnvironment", "type": "str"},
        "query_timeout": {"key": "queryTimeout", "type": "str"},
    }

    def __init__(
        self,
        *,
        additional_properties: Optional[dict[str, Any]] = None,
        parsing_mode: Union[str, "_models.BlobIndexerParsingMode"] = "default",
        excluded_file_name_extensions: str = "",
        indexed_file_name_extensions: str = "",
        fail_on_unsupported_content_type: bool = False,
        fail_on_unprocessable_document: bool = False,
        index_storage_metadata_only_for_oversized_documents: bool = False,
        delimited_text_headers: Optional[str] = None,
        delimited_text_delimiter: Optional[str] = None,
        first_line_contains_headers: bool = True,
        document_root: Optional[str] = None,
        data_to_extract: Union[str, "_models.BlobIndexerDataToExtract"] = "contentAndMetadata",
        image_action: Union[str, "_models.BlobIndexerImageAction"] = "none",
        allow_skillset_to_read_file_data: bool = False,
        pdf_text_rotation_algorithm: Union[str, "_models.BlobIndexerPDFTextRotationAlgorithm"] = "none",
        execution_environment: Union[str, "_models.IndexerExecutionEnvironment"] = "standard",
        query_timeout: str = "00:05:00",
        **kwargs: Any
    ) -> None:
        """
        :keyword additional_properties: Unmatched properties from the message are deserialized to this
         collection.
        :paramtype additional_properties: dict[str, any]
        :keyword parsing_mode: Represents the parsing mode for indexing from an Azure blob data source.
         Known values are: "default", "text", "delimitedText", "json", "jsonArray", and "jsonLines".
        :paramtype parsing_mode: str or ~azure.search.documents.indexes.models.BlobIndexerParsingMode
        :keyword excluded_file_name_extensions: Comma-delimited list of filename extensions to ignore
         when processing from Azure blob storage.  For example, you could exclude ".png, .mp4" to skip
         over those files during indexing.
        :paramtype excluded_file_name_extensions: str
        :keyword indexed_file_name_extensions: Comma-delimited list of filename extensions to select
         when processing from Azure blob storage.  For example, you could focus indexing on specific
         application files ".docx, .pptx, .msg" to specifically include those file types.
        :paramtype indexed_file_name_extensions: str
        :keyword fail_on_unsupported_content_type: For Azure blobs, set to false if you want to
         continue indexing when an unsupported content type is encountered, and you don't know all the
         content types (file extensions) in advance.
        :paramtype fail_on_unsupported_content_type: bool
        :keyword fail_on_unprocessable_document: For Azure blobs, set to false if you want to continue
         indexing if a document fails indexing.
        :paramtype fail_on_unprocessable_document: bool
        :keyword index_storage_metadata_only_for_oversized_documents: For Azure blobs, set this
         property to true to still index storage metadata for blob content that is too large to process.
         Oversized blobs are treated as errors by default. For limits on blob size, see
         https://learn.microsoft.com/azure/search/search-limits-quotas-capacity.
        :paramtype index_storage_metadata_only_for_oversized_documents: bool
        :keyword delimited_text_headers: For CSV blobs, specifies a comma-delimited list of column
         headers, useful for mapping source fields to destination fields in an index.
        :paramtype delimited_text_headers: str
        :keyword delimited_text_delimiter: For CSV blobs, specifies the end-of-line single-character
         delimiter for CSV files where each line starts a new document (for example, "|").
        :paramtype delimited_text_delimiter: str
        :keyword first_line_contains_headers: For CSV blobs, indicates that the first (non-blank) line
         of each blob contains headers.
        :paramtype first_line_contains_headers: bool
        :keyword document_root: For JSON arrays, given a structured or semi-structured document, you
         can specify a path to the array using this property.
        :paramtype document_root: str
        :keyword data_to_extract: Specifies the data to extract from Azure blob storage and tells the
         indexer which data to extract from image content when "imageAction" is set to a value other
         than "none".  This applies to embedded image content in a .PDF or other application, or image
         files such as .jpg and .png, in Azure blobs. Known values are: "storageMetadata",
         "allMetadata", and "contentAndMetadata".
        :paramtype data_to_extract: str or
         ~azure.search.documents.indexes.models.BlobIndexerDataToExtract
        :keyword image_action: Determines how to process embedded images and image files in Azure blob
         storage.  Setting the "imageAction" configuration to any value other than "none" requires that
         a skillset also be attached to that indexer. Known values are: "none",
         "generateNormalizedImages", and "generateNormalizedImagePerPage".
        :paramtype image_action: str or ~azure.search.documents.indexes.models.BlobIndexerImageAction
        :keyword allow_skillset_to_read_file_data: If true, will create a path //document//file_data
         that is an object representing the original file data downloaded from your blob data source.
         This allows you to pass the original file data to a custom skill for processing within the
         enrichment pipeline, or to the Document Extraction skill.
        :paramtype allow_skillset_to_read_file_data: bool
        :keyword pdf_text_rotation_algorithm: Determines algorithm for text extraction from PDF files
         in Azure blob storage. Known values are: "none" and "detectAngles".
        :paramtype pdf_text_rotation_algorithm: str or
         ~azure.search.documents.indexes.models.BlobIndexerPDFTextRotationAlgorithm
        :keyword execution_environment: Specifies the environment in which the indexer should execute.
         Known values are: "standard" and "private".
        :paramtype execution_environment: str or
         ~azure.search.documents.indexes.models.IndexerExecutionEnvironment
        :keyword query_timeout: Increases the timeout beyond the 5-minute default for Azure SQL
         database data sources, specified in the format "hh:mm:ss".
        :paramtype query_timeout: str
        """
        super().__init__(**kwargs)
        self.additional_properties = additional_properties
        self.parsing_mode = parsing_mode
        self.excluded_file_name_extensions = excluded_file_name_extensions
        self.indexed_file_name_extensions = indexed_file_name_extensions
        self.fail_on_unsupported_content_type = fail_on_unsupported_content_type
        self.fail_on_unprocessable_document = fail_on_unprocessable_document
        self.index_storage_metadata_only_for_oversized_documents = index_storage_metadata_only_for_oversized_documents
        self.delimited_text_headers = delimited_text_headers
        self.delimited_text_delimiter = delimited_text_delimiter
        self.first_line_contains_headers = first_line_contains_headers
        self.document_root = document_root
        self.data_to_extract = data_to_extract
        self.image_action = image_action
        self.allow_skillset_to_read_file_data = allow_skillset_to_read_file_data
        self.pdf_text_rotation_algorithm = pdf_text_rotation_algorithm
        self.execution_environment = execution_environment
        self.query_timeout = query_timeout


class IndexingSchedule(_serialization.Model):
    """Represents a schedule for indexer execution.

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

    :ivar interval: The interval of time between indexer executions. Required.
    :vartype interval: ~datetime.timedelta
    :ivar start_time: The time when an indexer should start running.
    :vartype start_time: ~datetime.datetime
    """

    _validation = {
        "interval": {"required": True},
    }

    _attribute_map = {
        "interval": {"key": "interval", "type": "duration"},
        "start_time": {"key": "startTime", "type": "iso-8601"},
    }

    def __init__(
        self, *, interval: datetime.timedelta, start_time: Optional[datetime.datetime] = None, **kwargs: Any
    ) -> None:
        """
        :keyword interval: The interval of time between indexer executions. Required.
        :paramtype interval: ~datetime.timedelta
        :keyword start_time: The time when an indexer should start running.
        :paramtype start_time: ~datetime.datetime
        """
        super().__init__(**kwargs)
        self.interval = interval
        self.start_time = start_time


class InputFieldMappingEntry(_serialization.Model):
    """Input field mapping for a skill.

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

    :ivar name: The name of the input. Required.
    :vartype name: str
    :ivar source: The source of the input.
    :vartype source: str
    :ivar source_context: The source context used for selecting recursive inputs.
    :vartype source_context: str
    :ivar inputs: The recursive inputs used when creating a complex type.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    """

    _validation = {
        "name": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "source": {"key": "source", "type": "str"},
        "source_context": {"key": "sourceContext", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
    }

    def __init__(
        self,
        *,
        name: str,
        source: Optional[str] = None,
        source_context: Optional[str] = None,
        inputs: Optional[list["_models.InputFieldMappingEntry"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the input. Required.
        :paramtype name: str
        :keyword source: The source of the input.
        :paramtype source: str
        :keyword source_context: The source context used for selecting recursive inputs.
        :paramtype source_context: str
        :keyword inputs: The recursive inputs used when creating a complex type.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        """
        super().__init__(**kwargs)
        self.name = name
        self.source = source
        self.source_context = source_context
        self.inputs = inputs


class KeepTokenFilter(TokenFilter):
    """A token filter that only keeps tokens with text contained in a specified list of words. This
    token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar keep_words: The list of words to keep. Required.
    :vartype keep_words: list[str]
    :ivar lower_case_keep_words: A value indicating whether to lower case all words first. Default
     is false.
    :vartype lower_case_keep_words: bool
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "keep_words": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "keep_words": {"key": "keepWords", "type": "[str]"},
        "lower_case_keep_words": {"key": "keepWordsCase", "type": "bool"},
    }

    def __init__(self, *, name: str, keep_words: list[str], lower_case_keep_words: bool = False, **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword keep_words: The list of words to keep. Required.
        :paramtype keep_words: list[str]
        :keyword lower_case_keep_words: A value indicating whether to lower case all words first.
         Default is false.
        :paramtype lower_case_keep_words: bool
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.KeepTokenFilter"
        self.keep_words = keep_words
        self.lower_case_keep_words = lower_case_keep_words


class KeyPhraseExtractionSkill(SearchIndexerSkill):
    """A skill that uses text analytics for key phrase extraction.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar default_language_code: A value indicating which language code to use. Default is ``en``.
     Known values are: "da", "nl", "en", "fi", "fr", "de", "it", "ja", "ko", "no", "pl", "pt-PT",
     "pt-BR", "ru", "es", and "sv".
    :vartype default_language_code: str or
     ~azure.search.documents.indexes.models.KeyPhraseExtractionSkillLanguage
    :ivar max_key_phrase_count: A number indicating how many key phrases to return. If absent, all
     identified key phrases will be returned.
    :vartype max_key_phrase_count: int
    :ivar model_version: The version of the model to use when calling the Text Analytics service.
     It will default to the latest available when not specified. We recommend you do not specify
     this value unless absolutely necessary.
    :vartype model_version: str
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "default_language_code": {"key": "defaultLanguageCode", "type": "str"},
        "max_key_phrase_count": {"key": "maxKeyPhraseCount", "type": "int"},
        "model_version": {"key": "modelVersion", "type": "str"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        default_language_code: Optional[Union[str, "_models.KeyPhraseExtractionSkillLanguage"]] = None,
        max_key_phrase_count: Optional[int] = None,
        model_version: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword default_language_code: A value indicating which language code to use. Default is
         ``en``. Known values are: "da", "nl", "en", "fi", "fr", "de", "it", "ja", "ko", "no", "pl",
         "pt-PT", "pt-BR", "ru", "es", and "sv".
        :paramtype default_language_code: str or
         ~azure.search.documents.indexes.models.KeyPhraseExtractionSkillLanguage
        :keyword max_key_phrase_count: A number indicating how many key phrases to return. If absent,
         all identified key phrases will be returned.
        :paramtype max_key_phrase_count: int
        :keyword model_version: The version of the model to use when calling the Text Analytics
         service. It will default to the latest available when not specified. We recommend you do not
         specify this value unless absolutely necessary.
        :paramtype model_version: str
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Text.KeyPhraseExtractionSkill"
        self.default_language_code = default_language_code
        self.max_key_phrase_count = max_key_phrase_count
        self.model_version = model_version


class KeywordMarkerTokenFilter(TokenFilter):
    """Marks terms as keywords. This token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar keywords: A list of words to mark as keywords. Required.
    :vartype keywords: list[str]
    :ivar ignore_case: A value indicating whether to ignore case. If true, all words are converted
     to lower case first. Default is false.
    :vartype ignore_case: bool
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "keywords": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "keywords": {"key": "keywords", "type": "[str]"},
        "ignore_case": {"key": "ignoreCase", "type": "bool"},
    }

    def __init__(self, *, name: str, keywords: list[str], ignore_case: bool = False, **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword keywords: A list of words to mark as keywords. Required.
        :paramtype keywords: list[str]
        :keyword ignore_case: A value indicating whether to ignore case. If true, all words are
         converted to lower case first. Default is false.
        :paramtype ignore_case: bool
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.KeywordMarkerTokenFilter"
        self.keywords = keywords
        self.ignore_case = ignore_case


class KeywordTokenizer(LexicalTokenizer):
    """Emits the entire input as a single token. This tokenizer is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of tokenizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar buffer_size: The read buffer size in bytes. Default is 256.
    :vartype buffer_size: int
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "buffer_size": {"key": "bufferSize", "type": "int"},
    }

    def __init__(self, *, name: str, buffer_size: int = 256, **kwargs: Any) -> None:
        """
        :keyword name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword buffer_size: The read buffer size in bytes. Default is 256.
        :paramtype buffer_size: int
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.KeywordTokenizer"
        self.buffer_size = buffer_size


class KeywordTokenizerV2(LexicalTokenizer):
    """Emits the entire input as a single token. This tokenizer is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of tokenizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar max_token_length: The maximum token length. Default is 256. Tokens longer than the
     maximum length are split. The maximum token length that can be used is 300 characters.
    :vartype max_token_length: int
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "max_token_length": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "max_token_length": {"key": "maxTokenLength", "type": "int"},
    }

    def __init__(self, *, name: str, max_token_length: int = 256, **kwargs: Any) -> None:
        """
        :keyword name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword max_token_length: The maximum token length. Default is 256. Tokens longer than the
         maximum length are split. The maximum token length that can be used is 300 characters.
        :paramtype max_token_length: int
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.KeywordTokenizerV2"
        self.max_token_length = max_token_length


class LanguageDetectionSkill(SearchIndexerSkill):
    """A skill that detects the language of input text and reports a single language code for every
    document submitted on the request. The language code is paired with a score indicating the
    confidence of the analysis.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar default_country_hint: A country code to use as a hint to the language detection model if
     it cannot disambiguate the language.
    :vartype default_country_hint: str
    :ivar model_version: The version of the model to use when calling the Text Analytics service.
     It will default to the latest available when not specified. We recommend you do not specify
     this value unless absolutely necessary.
    :vartype model_version: str
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "default_country_hint": {"key": "defaultCountryHint", "type": "str"},
        "model_version": {"key": "modelVersion", "type": "str"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        default_country_hint: Optional[str] = None,
        model_version: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword default_country_hint: A country code to use as a hint to the language detection model
         if it cannot disambiguate the language.
        :paramtype default_country_hint: str
        :keyword model_version: The version of the model to use when calling the Text Analytics
         service. It will default to the latest available when not specified. We recommend you do not
         specify this value unless absolutely necessary.
        :paramtype model_version: str
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Text.LanguageDetectionSkill"
        self.default_country_hint = default_country_hint
        self.model_version = model_version


class LengthTokenFilter(TokenFilter):
    """Removes words that are too long or too short. This token filter is implemented using Apache
    Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar min_length: The minimum length in characters. Default is 0. Maximum is 300. Must be less
     than the value of max.
    :vartype min_length: int
    :ivar max_length: The maximum length in characters. Default and maximum is 300.
    :vartype max_length: int
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "min_length": {"maximum": 300},
        "max_length": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "min_length": {"key": "min", "type": "int"},
        "max_length": {"key": "max", "type": "int"},
    }

    def __init__(self, *, name: str, min_length: int = 0, max_length: int = 300, **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword min_length: The minimum length in characters. Default is 0. Maximum is 300. Must be
         less than the value of max.
        :paramtype min_length: int
        :keyword max_length: The maximum length in characters. Default and maximum is 300.
        :paramtype max_length: int
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.LengthTokenFilter"
        self.min_length = min_length
        self.max_length = max_length


class LimitTokenFilter(TokenFilter):
    """Limits the number of tokens while indexing. This token filter is implemented using Apache
    Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar max_token_count: The maximum number of tokens to produce. Default is 1.
    :vartype max_token_count: int
    :ivar consume_all_tokens: A value indicating whether all tokens from the input must be consumed
     even if maxTokenCount is reached. Default is false.
    :vartype consume_all_tokens: bool
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "max_token_count": {"key": "maxTokenCount", "type": "int"},
        "consume_all_tokens": {"key": "consumeAllTokens", "type": "bool"},
    }

    def __init__(self, *, name: str, max_token_count: int = 1, consume_all_tokens: bool = False, **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword max_token_count: The maximum number of tokens to produce. Default is 1.
        :paramtype max_token_count: int
        :keyword consume_all_tokens: A value indicating whether all tokens from the input must be
         consumed even if maxTokenCount is reached. Default is false.
        :paramtype consume_all_tokens: bool
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.LimitTokenFilter"
        self.max_token_count = max_token_count
        self.consume_all_tokens = consume_all_tokens


class ListDataSourcesResult(_serialization.Model):
    """Response from a List Datasources request. If successful, it includes the full definitions of
    all datasources.

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

    :ivar data_sources: The datasources in the Search service. Required.
    :vartype data_sources: list[~azure.search.documents.indexes.models.SearchIndexerDataSource]
    """

    _validation = {
        "data_sources": {"required": True, "readonly": True},
    }

    _attribute_map = {
        "data_sources": {"key": "value", "type": "[SearchIndexerDataSource]"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.data_sources: Optional[list["_models.SearchIndexerDataSource"]] = None


class ListIndexersResult(_serialization.Model):
    """Response from a List Indexers request. If successful, it includes the full definitions of all
    indexers.

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

    :ivar indexers: The indexers in the Search service. Required.
    :vartype indexers: list[~azure.search.documents.indexes.models.SearchIndexer]
    """

    _validation = {
        "indexers": {"required": True, "readonly": True},
    }

    _attribute_map = {
        "indexers": {"key": "value", "type": "[SearchIndexer]"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.indexers: Optional[list["_models.SearchIndexer"]] = None


class ListIndexesResult(_serialization.Model):
    """Response from a List Indexes request. If successful, it includes the full definitions of all
    indexes.

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

    :ivar indexes: The indexes in the Search service. Required.
    :vartype indexes: list[~azure.search.documents.indexes.models.SearchIndex]
    """

    _validation = {
        "indexes": {"required": True, "readonly": True},
    }

    _attribute_map = {
        "indexes": {"key": "value", "type": "[SearchIndex]"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.indexes: Optional[list["_models.SearchIndex"]] = None


class ListSkillsetsResult(_serialization.Model):
    """Response from a list skillset request. If successful, it includes the full definitions of all
    skillsets.

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

    :ivar skillsets: The skillsets defined in the Search service. Required.
    :vartype skillsets: list[~azure.search.documents.indexes.models.SearchIndexerSkillset]
    """

    _validation = {
        "skillsets": {"required": True, "readonly": True},
    }

    _attribute_map = {
        "skillsets": {"key": "value", "type": "[SearchIndexerSkillset]"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.skillsets: Optional[list["_models.SearchIndexerSkillset"]] = None


class ListSynonymMapsResult(_serialization.Model):
    """Response from a List SynonymMaps request. If successful, it includes the full definitions of
    all synonym maps.

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

    :ivar synonym_maps: The synonym maps in the Search service. Required.
    :vartype synonym_maps: list[~azure.search.documents.indexes.models.SynonymMap]
    """

    _validation = {
        "synonym_maps": {"required": True, "readonly": True},
    }

    _attribute_map = {
        "synonym_maps": {"key": "value", "type": "[SynonymMap]"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.synonym_maps: Optional[list["_models.SynonymMap"]] = None


class LuceneStandardAnalyzer(LexicalAnalyzer):
    """Standard Apache Lucene analyzer; Composed of the standard tokenizer, lowercase filter and stop
    filter.

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

    :ivar odata_type: A URI fragment specifying the type of analyzer. Required.
    :vartype odata_type: str
    :ivar name: The name of the analyzer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the
     maximum length are split. The maximum token length that can be used is 300 characters.
    :vartype max_token_length: int
    :ivar stopwords: A list of stopwords.
    :vartype stopwords: list[str]
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "max_token_length": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "max_token_length": {"key": "maxTokenLength", "type": "int"},
        "stopwords": {"key": "stopwords", "type": "[str]"},
    }

    def __init__(
        self, *, name: str, max_token_length: int = 255, stopwords: Optional[list[str]] = None, **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the analyzer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the
         maximum length are split. The maximum token length that can be used is 300 characters.
        :paramtype max_token_length: int
        :keyword stopwords: A list of stopwords.
        :paramtype stopwords: list[str]
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.StandardAnalyzer"
        self.max_token_length = max_token_length
        self.stopwords = stopwords


class LuceneStandardTokenizer(LexicalTokenizer):
    """Breaks text following the Unicode Text Segmentation rules. This tokenizer is implemented using
    Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of tokenizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the
     maximum length are split.
    :vartype max_token_length: int
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "max_token_length": {"key": "maxTokenLength", "type": "int"},
    }

    def __init__(self, *, name: str, max_token_length: int = 255, **kwargs: Any) -> None:
        """
        :keyword name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the
         maximum length are split.
        :paramtype max_token_length: int
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.StandardTokenizer"
        self.max_token_length = max_token_length


class LuceneStandardTokenizerV2(LexicalTokenizer):
    """Breaks text following the Unicode Text Segmentation rules. This tokenizer is implemented using
    Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of tokenizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the
     maximum length are split. The maximum token length that can be used is 300 characters.
    :vartype max_token_length: int
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "max_token_length": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "max_token_length": {"key": "maxTokenLength", "type": "int"},
    }

    def __init__(self, *, name: str, max_token_length: int = 255, **kwargs: Any) -> None:
        """
        :keyword name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the
         maximum length are split. The maximum token length that can be used is 300 characters.
        :paramtype max_token_length: int
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.StandardTokenizerV2"
        self.max_token_length = max_token_length


class MagnitudeScoringFunction(ScoringFunction):
    """Defines a function that boosts scores based on the magnitude of a numeric field.

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

    :ivar type: Indicates the type of function to use. Valid values include magnitude, freshness,
     distance, and tag. The function type must be lower case. Required.
    :vartype type: str
    :ivar field_name: The name of the field used as input to the scoring function. Required.
    :vartype field_name: str
    :ivar boost: A multiplier for the raw score. Must be a positive number not equal to 1.0.
     Required.
    :vartype boost: float
    :ivar interpolation: A value indicating how boosting will be interpolated across document
     scores; defaults to "Linear". Known values are: "linear", "constant", "quadratic", and
     "logarithmic".
    :vartype interpolation: str or
     ~azure.search.documents.indexes.models.ScoringFunctionInterpolation
    :ivar parameters: Parameter values for the magnitude scoring function. Required.
    :vartype parameters: ~azure.search.documents.indexes.models.MagnitudeScoringParameters
    """

    _validation = {
        "type": {"required": True},
        "field_name": {"required": True},
        "boost": {"required": True},
        "parameters": {"required": True},
    }

    _attribute_map = {
        "type": {"key": "type", "type": "str"},
        "field_name": {"key": "fieldName", "type": "str"},
        "boost": {"key": "boost", "type": "float"},
        "interpolation": {"key": "interpolation", "type": "str"},
        "parameters": {"key": "magnitude", "type": "MagnitudeScoringParameters"},
    }

    def __init__(
        self,
        *,
        field_name: str,
        boost: float,
        parameters: "_models.MagnitudeScoringParameters",
        interpolation: Optional[Union[str, "_models.ScoringFunctionInterpolation"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword field_name: The name of the field used as input to the scoring function. Required.
        :paramtype field_name: str
        :keyword boost: A multiplier for the raw score. Must be a positive number not equal to 1.0.
         Required.
        :paramtype boost: float
        :keyword interpolation: A value indicating how boosting will be interpolated across document
         scores; defaults to "Linear". Known values are: "linear", "constant", "quadratic", and
         "logarithmic".
        :paramtype interpolation: str or
         ~azure.search.documents.indexes.models.ScoringFunctionInterpolation
        :keyword parameters: Parameter values for the magnitude scoring function. Required.
        :paramtype parameters: ~azure.search.documents.indexes.models.MagnitudeScoringParameters
        """
        super().__init__(field_name=field_name, boost=boost, interpolation=interpolation, **kwargs)
        self.type: str = "magnitude"
        self.parameters = parameters


class MagnitudeScoringParameters(_serialization.Model):
    """Provides parameter values to a magnitude scoring function.

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

    :ivar boosting_range_start: The field value at which boosting starts. Required.
    :vartype boosting_range_start: float
    :ivar boosting_range_end: The field value at which boosting ends. Required.
    :vartype boosting_range_end: float
    :ivar should_boost_beyond_range_by_constant: A value indicating whether to apply a constant
     boost for field values beyond the range end value; default is false.
    :vartype should_boost_beyond_range_by_constant: bool
    """

    _validation = {
        "boosting_range_start": {"required": True},
        "boosting_range_end": {"required": True},
    }

    _attribute_map = {
        "boosting_range_start": {"key": "boostingRangeStart", "type": "float"},
        "boosting_range_end": {"key": "boostingRangeEnd", "type": "float"},
        "should_boost_beyond_range_by_constant": {"key": "constantBoostBeyondRange", "type": "bool"},
    }

    def __init__(
        self,
        *,
        boosting_range_start: float,
        boosting_range_end: float,
        should_boost_beyond_range_by_constant: Optional[bool] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword boosting_range_start: The field value at which boosting starts. Required.
        :paramtype boosting_range_start: float
        :keyword boosting_range_end: The field value at which boosting ends. Required.
        :paramtype boosting_range_end: float
        :keyword should_boost_beyond_range_by_constant: A value indicating whether to apply a constant
         boost for field values beyond the range end value; default is false.
        :paramtype should_boost_beyond_range_by_constant: bool
        """
        super().__init__(**kwargs)
        self.boosting_range_start = boosting_range_start
        self.boosting_range_end = boosting_range_end
        self.should_boost_beyond_range_by_constant = should_boost_beyond_range_by_constant


class MappingCharFilter(CharFilter):
    """A character filter that applies mappings defined with the mappings option. Matching is greedy
    (longest pattern matching at a given point wins). Replacement is allowed to be the empty
    string. This character filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of char filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the char filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar mappings: A list of mappings of the following format: "a=>b" (all occurrences of the
     character "a" will be replaced with character "b"). Required.
    :vartype mappings: list[str]
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "mappings": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "mappings": {"key": "mappings", "type": "[str]"},
    }

    def __init__(self, *, name: str, mappings: list[str], **kwargs: Any) -> None:
        """
        :keyword name: The name of the char filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword mappings: A list of mappings of the following format: "a=>b" (all occurrences of the
         character "a" will be replaced with character "b"). Required.
        :paramtype mappings: list[str]
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.MappingCharFilter"
        self.mappings = mappings


class MergeSkill(SearchIndexerSkill):
    """A skill for merging two or more strings into a single unified string, with an optional
    user-defined delimiter separating each component part.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar insert_pre_tag: The tag indicates the start of the merged text. By default, the tag is an
     empty space.
    :vartype insert_pre_tag: str
    :ivar insert_post_tag: The tag indicates the end of the merged text. By default, the tag is an
     empty space.
    :vartype insert_post_tag: str
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "insert_pre_tag": {"key": "insertPreTag", "type": "str"},
        "insert_post_tag": {"key": "insertPostTag", "type": "str"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        insert_pre_tag: str = " ",
        insert_post_tag: str = " ",
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword insert_pre_tag: The tag indicates the start of the merged text. By default, the tag is
         an empty space.
        :paramtype insert_pre_tag: str
        :keyword insert_post_tag: The tag indicates the end of the merged text. By default, the tag is
         an empty space.
        :paramtype insert_post_tag: str
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Text.MergeSkill"
        self.insert_pre_tag = insert_pre_tag
        self.insert_post_tag = insert_post_tag


class MicrosoftLanguageStemmingTokenizer(LexicalTokenizer):
    """Divides text using language-specific rules and reduces words to their base forms.

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

    :ivar odata_type: A URI fragment specifying the type of tokenizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar max_token_length: The maximum token length. Tokens longer than the maximum length are
     split. Maximum token length that can be used is 300 characters. Tokens longer than 300
     characters are first split into tokens of length 300 and then each of those tokens is split
     based on the max token length set. Default is 255.
    :vartype max_token_length: int
    :ivar is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used as
     the search tokenizer, set to false if used as the indexing tokenizer. Default is false.
    :vartype is_search_tokenizer: bool
    :ivar language: The language to use. The default is English. Known values are: "arabic",
     "bangla", "bulgarian", "catalan", "croatian", "czech", "danish", "dutch", "english",
     "estonian", "finnish", "french", "german", "greek", "gujarati", "hebrew", "hindi", "hungarian",
     "icelandic", "indonesian", "italian", "kannada", "latvian", "lithuanian", "malay", "malayalam",
     "marathi", "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi",
     "romanian", "russian", "serbianCyrillic", "serbianLatin", "slovak", "slovenian", "spanish",
     "swedish", "tamil", "telugu", "turkish", "ukrainian", and "urdu".
    :vartype language: str or
     ~azure.search.documents.indexes.models.MicrosoftStemmingTokenizerLanguage
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "max_token_length": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "max_token_length": {"key": "maxTokenLength", "type": "int"},
        "is_search_tokenizer": {"key": "isSearchTokenizer", "type": "bool"},
        "language": {"key": "language", "type": "str"},
    }

    def __init__(
        self,
        *,
        name: str,
        max_token_length: int = 255,
        is_search_tokenizer: bool = False,
        language: Optional[Union[str, "_models.MicrosoftStemmingTokenizerLanguage"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword max_token_length: The maximum token length. Tokens longer than the maximum length are
         split. Maximum token length that can be used is 300 characters. Tokens longer than 300
         characters are first split into tokens of length 300 and then each of those tokens is split
         based on the max token length set. Default is 255.
        :paramtype max_token_length: int
        :keyword is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used
         as the search tokenizer, set to false if used as the indexing tokenizer. Default is false.
        :paramtype is_search_tokenizer: bool
        :keyword language: The language to use. The default is English. Known values are: "arabic",
         "bangla", "bulgarian", "catalan", "croatian", "czech", "danish", "dutch", "english",
         "estonian", "finnish", "french", "german", "greek", "gujarati", "hebrew", "hindi", "hungarian",
         "icelandic", "indonesian", "italian", "kannada", "latvian", "lithuanian", "malay", "malayalam",
         "marathi", "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi",
         "romanian", "russian", "serbianCyrillic", "serbianLatin", "slovak", "slovenian", "spanish",
         "swedish", "tamil", "telugu", "turkish", "ukrainian", and "urdu".
        :paramtype language: str or
         ~azure.search.documents.indexes.models.MicrosoftStemmingTokenizerLanguage
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.MicrosoftLanguageStemmingTokenizer"
        self.max_token_length = max_token_length
        self.is_search_tokenizer = is_search_tokenizer
        self.language = language


class MicrosoftLanguageTokenizer(LexicalTokenizer):
    """Divides text using language-specific rules.

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

    :ivar odata_type: A URI fragment specifying the type of tokenizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar max_token_length: The maximum token length. Tokens longer than the maximum length are
     split. Maximum token length that can be used is 300 characters. Tokens longer than 300
     characters are first split into tokens of length 300 and then each of those tokens is split
     based on the max token length set. Default is 255.
    :vartype max_token_length: int
    :ivar is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used as
     the search tokenizer, set to false if used as the indexing tokenizer. Default is false.
    :vartype is_search_tokenizer: bool
    :ivar language: The language to use. The default is English. Known values are: "bangla",
     "bulgarian", "catalan", "chineseSimplified", "chineseTraditional", "croatian", "czech",
     "danish", "dutch", "english", "french", "german", "greek", "gujarati", "hindi", "icelandic",
     "indonesian", "italian", "japanese", "kannada", "korean", "malay", "malayalam", "marathi",
     "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", "romanian",
     "russian", "serbianCyrillic", "serbianLatin", "slovenian", "spanish", "swedish", "tamil",
     "telugu", "thai", "ukrainian", "urdu", and "vietnamese".
    :vartype language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "max_token_length": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "max_token_length": {"key": "maxTokenLength", "type": "int"},
        "is_search_tokenizer": {"key": "isSearchTokenizer", "type": "bool"},
        "language": {"key": "language", "type": "str"},
    }

    def __init__(
        self,
        *,
        name: str,
        max_token_length: int = 255,
        is_search_tokenizer: bool = False,
        language: Optional[Union[str, "_models.MicrosoftTokenizerLanguage"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword max_token_length: The maximum token length. Tokens longer than the maximum length are
         split. Maximum token length that can be used is 300 characters. Tokens longer than 300
         characters are first split into tokens of length 300 and then each of those tokens is split
         based on the max token length set. Default is 255.
        :paramtype max_token_length: int
        :keyword is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used
         as the search tokenizer, set to false if used as the indexing tokenizer. Default is false.
        :paramtype is_search_tokenizer: bool
        :keyword language: The language to use. The default is English. Known values are: "bangla",
         "bulgarian", "catalan", "chineseSimplified", "chineseTraditional", "croatian", "czech",
         "danish", "dutch", "english", "french", "german", "greek", "gujarati", "hindi", "icelandic",
         "indonesian", "italian", "japanese", "kannada", "korean", "malay", "malayalam", "marathi",
         "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", "romanian",
         "russian", "serbianCyrillic", "serbianLatin", "slovenian", "spanish", "swedish", "tamil",
         "telugu", "thai", "ukrainian", "urdu", and "vietnamese".
        :paramtype language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.MicrosoftLanguageTokenizer"
        self.max_token_length = max_token_length
        self.is_search_tokenizer = is_search_tokenizer
        self.language = language


class NGramTokenFilter(TokenFilter):
    """Generates n-grams of the given size(s). This token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar min_gram: The minimum n-gram length. Default is 1. Must be less than the value of
     maxGram.
    :vartype min_gram: int
    :ivar max_gram: The maximum n-gram length. Default is 2.
    :vartype max_gram: int
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "min_gram": {"key": "minGram", "type": "int"},
        "max_gram": {"key": "maxGram", "type": "int"},
    }

    def __init__(self, *, name: str, min_gram: int = 1, max_gram: int = 2, **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword min_gram: The minimum n-gram length. Default is 1. Must be less than the value of
         maxGram.
        :paramtype min_gram: int
        :keyword max_gram: The maximum n-gram length. Default is 2.
        :paramtype max_gram: int
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.NGramTokenFilter"
        self.min_gram = min_gram
        self.max_gram = max_gram


class NGramTokenFilterV2(TokenFilter):
    """Generates n-grams of the given size(s). This token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the
     value of maxGram.
    :vartype min_gram: int
    :ivar max_gram: The maximum n-gram length. Default is 2. Maximum is 300.
    :vartype max_gram: int
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "min_gram": {"maximum": 300},
        "max_gram": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "min_gram": {"key": "minGram", "type": "int"},
        "max_gram": {"key": "maxGram", "type": "int"},
    }

    def __init__(self, *, name: str, min_gram: int = 1, max_gram: int = 2, **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than
         the value of maxGram.
        :paramtype min_gram: int
        :keyword max_gram: The maximum n-gram length. Default is 2. Maximum is 300.
        :paramtype max_gram: int
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.NGramTokenFilterV2"
        self.min_gram = min_gram
        self.max_gram = max_gram


class NGramTokenizer(LexicalTokenizer):
    """Tokenizes the input into n-grams of the given size(s). This tokenizer is implemented using
    Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of tokenizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the
     value of maxGram.
    :vartype min_gram: int
    :ivar max_gram: The maximum n-gram length. Default is 2. Maximum is 300.
    :vartype max_gram: int
    :ivar token_chars: Character classes to keep in the tokens.
    :vartype token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind]
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "min_gram": {"maximum": 300},
        "max_gram": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "min_gram": {"key": "minGram", "type": "int"},
        "max_gram": {"key": "maxGram", "type": "int"},
        "token_chars": {"key": "tokenChars", "type": "[str]"},
    }

    def __init__(
        self,
        *,
        name: str,
        min_gram: int = 1,
        max_gram: int = 2,
        token_chars: Optional[list[Union[str, "_models.TokenCharacterKind"]]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than
         the value of maxGram.
        :paramtype min_gram: int
        :keyword max_gram: The maximum n-gram length. Default is 2. Maximum is 300.
        :paramtype max_gram: int
        :keyword token_chars: Character classes to keep in the tokens.
        :paramtype token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind]
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.NGramTokenizer"
        self.min_gram = min_gram
        self.max_gram = max_gram
        self.token_chars = token_chars


class OcrSkill(SearchIndexerSkill):
    """A skill that extracts text from image files.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar default_language_code: A value indicating which language code to use. Default is ``en``.
     Known values are: "af", "sq", "anp", "ar", "ast", "awa", "az", "bfy", "eu", "be", "be-cyrl",
     "be-latn", "bho", "bi", "brx", "bs", "bra", "br", "bg", "bns", "bua", "ca", "ceb", "rab", "ch",
     "hne", "zh-Hans", "zh-Hant", "kw", "co", "crh", "hr", "cs", "da", "prs", "dhi", "doi", "nl",
     "en", "myv", "et", "fo", "fj", "fil", "fi", "fr", "fur", "gag", "gl", "de", "gil", "gon", "el",
     "kl", "gvr", "ht", "hlb", "hni", "bgc", "haw", "hi", "mww", "hoc", "hu", "is", "smn", "id",
     "ia", "iu", "ga", "it", "ja", "Jns", "jv", "kea", "kac", "xnr", "krc", "kaa-cyrl", "kaa",
     "csb", "kk-cyrl", "kk-latn", "klr", "kha", "quc", "ko", "kfq", "kpy", "kos", "kum", "ku-arab",
     "ku-latn", "kru", "ky", "lkt", "la", "lt", "dsb", "smj", "lb", "bfz", "ms", "mt", "kmj", "gv",
     "mi", "mr", "mn", "cnr-cyrl", "cnr-latn", "nap", "ne", "niu", "nog", "sme", "nb", "no", "oc",
     "os", "ps", "fa", "pl", "pt", "pa", "ksh", "ro", "rm", "ru", "sck", "sm", "sa", "sat", "sco",
     "gd", "sr", "sr-Cyrl", "sr-Latn", "xsr", "srx", "sms", "sk", "sl", "so", "sma", "es", "sw",
     "sv", "tg", "tt", "tet", "thf", "to", "tr", "tk", "tyv", "hsb", "ur", "ug", "uz-arab",
     "uz-cyrl", "uz", "vo", "wae", "cy", "fy", "yua", "za", "zu", "unk", and "is".
    :vartype default_language_code: str or ~azure.search.documents.indexes.models.OcrSkillLanguage
    :ivar should_detect_orientation: A value indicating to turn orientation detection on or not.
     Default is false.
    :vartype should_detect_orientation: bool
    :ivar line_ending: Defines the sequence of characters to use between the lines of text
     recognized by the OCR skill. The default value is "space". Known values are: "space",
     "carriageReturn", "lineFeed", and "carriageReturnLineFeed".
    :vartype line_ending: str or ~azure.search.documents.indexes.models.OcrLineEnding
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "default_language_code": {"key": "defaultLanguageCode", "type": "str"},
        "should_detect_orientation": {"key": "detectOrientation", "type": "bool"},
        "line_ending": {"key": "lineEnding", "type": "str"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        default_language_code: Optional[Union[str, "_models.OcrSkillLanguage"]] = None,
        should_detect_orientation: bool = False,
        line_ending: Optional[Union[str, "_models.OcrLineEnding"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword default_language_code: A value indicating which language code to use. Default is
         ``en``. Known values are: "af", "sq", "anp", "ar", "ast", "awa", "az", "bfy", "eu", "be",
         "be-cyrl", "be-latn", "bho", "bi", "brx", "bs", "bra", "br", "bg", "bns", "bua", "ca", "ceb",
         "rab", "ch", "hne", "zh-Hans", "zh-Hant", "kw", "co", "crh", "hr", "cs", "da", "prs", "dhi",
         "doi", "nl", "en", "myv", "et", "fo", "fj", "fil", "fi", "fr", "fur", "gag", "gl", "de", "gil",
         "gon", "el", "kl", "gvr", "ht", "hlb", "hni", "bgc", "haw", "hi", "mww", "hoc", "hu", "is",
         "smn", "id", "ia", "iu", "ga", "it", "ja", "Jns", "jv", "kea", "kac", "xnr", "krc", "kaa-cyrl",
         "kaa", "csb", "kk-cyrl", "kk-latn", "klr", "kha", "quc", "ko", "kfq", "kpy", "kos", "kum",
         "ku-arab", "ku-latn", "kru", "ky", "lkt", "la", "lt", "dsb", "smj", "lb", "bfz", "ms", "mt",
         "kmj", "gv", "mi", "mr", "mn", "cnr-cyrl", "cnr-latn", "nap", "ne", "niu", "nog", "sme", "nb",
         "no", "oc", "os", "ps", "fa", "pl", "pt", "pa", "ksh", "ro", "rm", "ru", "sck", "sm", "sa",
         "sat", "sco", "gd", "sr", "sr-Cyrl", "sr-Latn", "xsr", "srx", "sms", "sk", "sl", "so", "sma",
         "es", "sw", "sv", "tg", "tt", "tet", "thf", "to", "tr", "tk", "tyv", "hsb", "ur", "ug",
         "uz-arab", "uz-cyrl", "uz", "vo", "wae", "cy", "fy", "yua", "za", "zu", "unk", and "is".
        :paramtype default_language_code: str or
         ~azure.search.documents.indexes.models.OcrSkillLanguage
        :keyword should_detect_orientation: A value indicating to turn orientation detection on or not.
         Default is false.
        :paramtype should_detect_orientation: bool
        :keyword line_ending: Defines the sequence of characters to use between the lines of text
         recognized by the OCR skill. The default value is "space". Known values are: "space",
         "carriageReturn", "lineFeed", and "carriageReturnLineFeed".
        :paramtype line_ending: str or ~azure.search.documents.indexes.models.OcrLineEnding
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Vision.OcrSkill"
        self.default_language_code = default_language_code
        self.should_detect_orientation = should_detect_orientation
        self.line_ending = line_ending


class OutputFieldMappingEntry(_serialization.Model):
    """Output field mapping for a skill.

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

    :ivar name: The name of the output defined by the skill. Required.
    :vartype name: str
    :ivar target_name: The target name of the output. It is optional and default to name.
    :vartype target_name: str
    """

    _validation = {
        "name": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "target_name": {"key": "targetName", "type": "str"},
    }

    def __init__(self, *, name: str, target_name: Optional[str] = None, **kwargs: Any) -> None:
        """
        :keyword name: The name of the output defined by the skill. Required.
        :paramtype name: str
        :keyword target_name: The target name of the output. It is optional and default to name.
        :paramtype target_name: str
        """
        super().__init__(**kwargs)
        self.name = name
        self.target_name = target_name


class PathHierarchyTokenizerV2(LexicalTokenizer):
    """Tokenizer for path-like hierarchies. This tokenizer is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of tokenizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar delimiter: The delimiter character to use. Default is "/".
    :vartype delimiter: str
    :ivar replacement: A value that, if set, replaces the delimiter character. Default is "/".
    :vartype replacement: str
    :ivar max_token_length: The maximum token length. Default and maximum is 300.
    :vartype max_token_length: int
    :ivar reverse_token_order: A value indicating whether to generate tokens in reverse order.
     Default is false.
    :vartype reverse_token_order: bool
    :ivar number_of_tokens_to_skip: The number of initial tokens to skip. Default is 0.
    :vartype number_of_tokens_to_skip: int
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "max_token_length": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "delimiter": {"key": "delimiter", "type": "str"},
        "replacement": {"key": "replacement", "type": "str"},
        "max_token_length": {"key": "maxTokenLength", "type": "int"},
        "reverse_token_order": {"key": "reverse", "type": "bool"},
        "number_of_tokens_to_skip": {"key": "skip", "type": "int"},
    }

    def __init__(
        self,
        *,
        name: str,
        delimiter: str = "/",
        replacement: str = "/",
        max_token_length: int = 300,
        reverse_token_order: bool = False,
        number_of_tokens_to_skip: int = 0,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword delimiter: The delimiter character to use. Default is "/".
        :paramtype delimiter: str
        :keyword replacement: A value that, if set, replaces the delimiter character. Default is "/".
        :paramtype replacement: str
        :keyword max_token_length: The maximum token length. Default and maximum is 300.
        :paramtype max_token_length: int
        :keyword reverse_token_order: A value indicating whether to generate tokens in reverse order.
         Default is false.
        :paramtype reverse_token_order: bool
        :keyword number_of_tokens_to_skip: The number of initial tokens to skip. Default is 0.
        :paramtype number_of_tokens_to_skip: int
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.PathHierarchyTokenizerV2"
        self.delimiter = delimiter
        self.replacement = replacement
        self.max_token_length = max_token_length
        self.reverse_token_order = reverse_token_order
        self.number_of_tokens_to_skip = number_of_tokens_to_skip


class PatternAnalyzer(LexicalAnalyzer):
    """Flexibly separates text into terms via a regular expression pattern. This analyzer is
    implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of analyzer. Required.
    :vartype odata_type: str
    :ivar name: The name of the analyzer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar lower_case_terms: A value indicating whether terms should be lower-cased. Default is
     true.
    :vartype lower_case_terms: bool
    :ivar pattern: A regular expression pattern to match token separators. Default is an expression
     that matches one or more non-word characters.
    :vartype pattern: str
    :ivar flags: Regular expression flags. Known values are: "CANON_EQ", "CASE_INSENSITIVE",
     "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", and "UNIX_LINES".
    :vartype flags: str or ~azure.search.documents.indexes.models.RegexFlags
    :ivar stopwords: A list of stopwords.
    :vartype stopwords: list[str]
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "lower_case_terms": {"key": "lowercase", "type": "bool"},
        "pattern": {"key": "pattern", "type": "str"},
        "flags": {"key": "flags", "type": "str"},
        "stopwords": {"key": "stopwords", "type": "[str]"},
    }

    def __init__(
        self,
        *,
        name: str,
        lower_case_terms: bool = True,
        pattern: str = "\W+",
        flags: Optional[Union[str, "_models.RegexFlags"]] = None,
        stopwords: Optional[list[str]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the analyzer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword lower_case_terms: A value indicating whether terms should be lower-cased. Default is
         true.
        :paramtype lower_case_terms: bool
        :keyword pattern: A regular expression pattern to match token separators. Default is an
         expression that matches one or more non-word characters.
        :paramtype pattern: str
        :keyword flags: Regular expression flags. Known values are: "CANON_EQ", "CASE_INSENSITIVE",
         "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", and "UNIX_LINES".
        :paramtype flags: str or ~azure.search.documents.indexes.models.RegexFlags
        :keyword stopwords: A list of stopwords.
        :paramtype stopwords: list[str]
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.PatternAnalyzer"
        self.lower_case_terms = lower_case_terms
        self.pattern = pattern
        self.flags = flags
        self.stopwords = stopwords


class PatternCaptureTokenFilter(TokenFilter):
    """Uses Java regexes to emit multiple tokens - one for each capture group in one or more patterns.
    This token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar patterns: A list of patterns to match against each token. Required.
    :vartype patterns: list[str]
    :ivar preserve_original: A value indicating whether to return the original token even if one of
     the patterns matches. Default is true.
    :vartype preserve_original: bool
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "patterns": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "patterns": {"key": "patterns", "type": "[str]"},
        "preserve_original": {"key": "preserveOriginal", "type": "bool"},
    }

    def __init__(self, *, name: str, patterns: list[str], preserve_original: bool = True, **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword patterns: A list of patterns to match against each token. Required.
        :paramtype patterns: list[str]
        :keyword preserve_original: A value indicating whether to return the original token even if one
         of the patterns matches. Default is true.
        :paramtype preserve_original: bool
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.PatternCaptureTokenFilter"
        self.patterns = patterns
        self.preserve_original = preserve_original


class PatternReplaceCharFilter(CharFilter):
    """A character filter that replaces characters in the input string. It uses a regular expression
    to identify character sequences to preserve and a replacement pattern to identify characters to
    replace. For example, given the input text "aa bb aa bb", pattern "(aa)\\s+(bb)", and
    replacement "$1#$2", the result would be "aa#bb aa#bb". This character filter is implemented
    using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of char filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the char filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar pattern: A regular expression pattern. Required.
    :vartype pattern: str
    :ivar replacement: The replacement text. Required.
    :vartype replacement: str
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "pattern": {"required": True},
        "replacement": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "pattern": {"key": "pattern", "type": "str"},
        "replacement": {"key": "replacement", "type": "str"},
    }

    def __init__(self, *, name: str, pattern: str, replacement: str, **kwargs: Any) -> None:
        """
        :keyword name: The name of the char filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword pattern: A regular expression pattern. Required.
        :paramtype pattern: str
        :keyword replacement: The replacement text. Required.
        :paramtype replacement: str
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.PatternReplaceCharFilter"
        self.pattern = pattern
        self.replacement = replacement


class PatternReplaceTokenFilter(TokenFilter):
    """A character filter that replaces characters in the input string. It uses a regular expression
    to identify character sequences to preserve and a replacement pattern to identify characters to
    replace. For example, given the input text "aa bb aa bb", pattern "(aa)\\s+(bb)", and
    replacement "$1#$2", the result would be "aa#bb aa#bb". This token filter is implemented using
    Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar pattern: A regular expression pattern. Required.
    :vartype pattern: str
    :ivar replacement: The replacement text. Required.
    :vartype replacement: str
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "pattern": {"required": True},
        "replacement": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "pattern": {"key": "pattern", "type": "str"},
        "replacement": {"key": "replacement", "type": "str"},
    }

    def __init__(self, *, name: str, pattern: str, replacement: str, **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword pattern: A regular expression pattern. Required.
        :paramtype pattern: str
        :keyword replacement: The replacement text. Required.
        :paramtype replacement: str
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.PatternReplaceTokenFilter"
        self.pattern = pattern
        self.replacement = replacement


class PatternTokenizer(LexicalTokenizer):
    """Tokenizer that uses regex pattern matching to construct distinct tokens. This tokenizer is
    implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of tokenizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar pattern: A regular expression pattern to match token separators. Default is an expression
     that matches one or more non-word characters.
    :vartype pattern: str
    :ivar flags: Regular expression flags. Known values are: "CANON_EQ", "CASE_INSENSITIVE",
     "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", and "UNIX_LINES".
    :vartype flags: str or ~azure.search.documents.indexes.models.RegexFlags
    :ivar group: The zero-based ordinal of the matching group in the regular expression pattern to
     extract into tokens. Use -1 if you want to use the entire pattern to split the input into
     tokens, irrespective of matching groups. Default is -1.
    :vartype group: int
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "pattern": {"key": "pattern", "type": "str"},
        "flags": {"key": "flags", "type": "str"},
        "group": {"key": "group", "type": "int"},
    }

    def __init__(
        self,
        *,
        name: str,
        pattern: str = "\W+",
        flags: Optional[Union[str, "_models.RegexFlags"]] = None,
        group: int = -1,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword pattern: A regular expression pattern to match token separators. Default is an
         expression that matches one or more non-word characters.
        :paramtype pattern: str
        :keyword flags: Regular expression flags. Known values are: "CANON_EQ", "CASE_INSENSITIVE",
         "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", and "UNIX_LINES".
        :paramtype flags: str or ~azure.search.documents.indexes.models.RegexFlags
        :keyword group: The zero-based ordinal of the matching group in the regular expression pattern
         to extract into tokens. Use -1 if you want to use the entire pattern to split the input into
         tokens, irrespective of matching groups. Default is -1.
        :paramtype group: int
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.PatternTokenizer"
        self.pattern = pattern
        self.flags = flags
        self.group = group


class PhoneticTokenFilter(TokenFilter):
    """Create tokens for phonetic matches. This token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar encoder: The phonetic encoder to use. Default is "metaphone". Known values are:
     "metaphone", "doubleMetaphone", "soundex", "refinedSoundex", "caverphone1", "caverphone2",
     "cologne", "nysiis", "koelnerPhonetik", "haasePhonetik", and "beiderMorse".
    :vartype encoder: str or ~azure.search.documents.indexes.models.PhoneticEncoder
    :ivar replace_original_tokens: A value indicating whether encoded tokens should replace
     original tokens. If false, encoded tokens are added as synonyms. Default is true.
    :vartype replace_original_tokens: bool
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "encoder": {"key": "encoder", "type": "str"},
        "replace_original_tokens": {"key": "replace", "type": "bool"},
    }

    def __init__(
        self,
        *,
        name: str,
        encoder: Optional[Union[str, "_models.PhoneticEncoder"]] = None,
        replace_original_tokens: bool = True,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword encoder: The phonetic encoder to use. Default is "metaphone". Known values are:
         "metaphone", "doubleMetaphone", "soundex", "refinedSoundex", "caverphone1", "caverphone2",
         "cologne", "nysiis", "koelnerPhonetik", "haasePhonetik", and "beiderMorse".
        :paramtype encoder: str or ~azure.search.documents.indexes.models.PhoneticEncoder
        :keyword replace_original_tokens: A value indicating whether encoded tokens should replace
         original tokens. If false, encoded tokens are added as synonyms. Default is true.
        :paramtype replace_original_tokens: bool
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.PhoneticTokenFilter"
        self.encoder = encoder
        self.replace_original_tokens = replace_original_tokens


class PIIDetectionSkill(SearchIndexerSkill):
    """Using the Text Analytics API, extracts personal information from an input text and gives you
    the option of masking it.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar default_language_code: A value indicating which language code to use. Default is ``en``.
    :vartype default_language_code: str
    :ivar minimum_precision: A value between 0 and 1 that be used to only include entities whose
     confidence score is greater than the value specified. If not set (default), or if explicitly
     set to null, all entities will be included.
    :vartype minimum_precision: float
    :ivar masking_mode: A parameter that provides various ways to mask the personal information
     detected in the input text. Default is 'none'. Known values are: "none" and "replace".
    :vartype masking_mode: str or
     ~azure.search.documents.indexes.models.PIIDetectionSkillMaskingMode
    :ivar model_version: The version of the model to use when calling the Text Analytics service.
     It will default to the latest available when not specified. We recommend you do not specify
     this value unless absolutely necessary.
    :vartype model_version: str
    :ivar pii_categories: A list of PII entity categories that should be extracted and masked.
    :vartype pii_categories: list[str]
    :ivar domain: If specified, will set the PII domain to include only a subset of the entity
     categories. Possible values include: 'phi', 'none'. Default is 'none'.
    :vartype domain: str
    :ivar mask: The character used to mask the text if the maskingMode parameter is set to replace.
     Default is '*'.
    :vartype mask: str
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
        "minimum_precision": {"maximum": 1, "minimum": 0},
        "mask": {"max_length": 1},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "default_language_code": {"key": "defaultLanguageCode", "type": "str"},
        "minimum_precision": {"key": "minimumPrecision", "type": "float"},
        "masking_mode": {"key": "maskingMode", "type": "str"},
        "model_version": {"key": "modelVersion", "type": "str"},
        "pii_categories": {"key": "piiCategories", "type": "[str]"},
        "domain": {"key": "domain", "type": "str"},
        "mask": {"key": "mask", "type": "str"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        default_language_code: Optional[str] = None,
        minimum_precision: Optional[float] = None,
        masking_mode: Optional[Union[str, "_models.PIIDetectionSkillMaskingMode"]] = None,
        model_version: Optional[str] = None,
        pii_categories: Optional[list[str]] = None,
        domain: Optional[str] = None,
        mask: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword default_language_code: A value indicating which language code to use. Default is
         ``en``.
        :paramtype default_language_code: str
        :keyword minimum_precision: A value between 0 and 1 that be used to only include entities whose
         confidence score is greater than the value specified. If not set (default), or if explicitly
         set to null, all entities will be included.
        :paramtype minimum_precision: float
        :keyword masking_mode: A parameter that provides various ways to mask the personal information
         detected in the input text. Default is 'none'. Known values are: "none" and "replace".
        :paramtype masking_mode: str or
         ~azure.search.documents.indexes.models.PIIDetectionSkillMaskingMode
        :keyword model_version: The version of the model to use when calling the Text Analytics
         service. It will default to the latest available when not specified. We recommend you do not
         specify this value unless absolutely necessary.
        :paramtype model_version: str
        :keyword pii_categories: A list of PII entity categories that should be extracted and masked.
        :paramtype pii_categories: list[str]
        :keyword domain: If specified, will set the PII domain to include only a subset of the entity
         categories. Possible values include: 'phi', 'none'. Default is 'none'.
        :paramtype domain: str
        :keyword mask: The character used to mask the text if the maskingMode parameter is set to
         replace. Default is '*'.
        :paramtype mask: str
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Text.PIIDetectionSkill"
        self.default_language_code = default_language_code
        self.minimum_precision = minimum_precision
        self.masking_mode = masking_mode
        self.model_version = model_version
        self.pii_categories = pii_categories
        self.domain = domain
        self.mask = mask


class RequestOptions(_serialization.Model):
    """Parameter group.

    :ivar x_ms_client_request_id: The tracking ID sent with the request to help with debugging.
    :vartype x_ms_client_request_id: str
    """

    _attribute_map = {
        "x_ms_client_request_id": {"key": "x-ms-client-request-id", "type": "str"},
    }

    def __init__(self, *, x_ms_client_request_id: Optional[str] = None, **kwargs: Any) -> None:
        """
        :keyword x_ms_client_request_id: The tracking ID sent with the request to help with debugging.
        :paramtype x_ms_client_request_id: str
        """
        super().__init__(**kwargs)
        self.x_ms_client_request_id = x_ms_client_request_id


class RescoringOptions(_serialization.Model):
    """Contains the options for rescoring.

    :ivar enable_rescoring: If set to true, after the initial search on the compressed vectors, the
     similarity scores are recalculated using the full-precision vectors. This will improve recall
     at the expense of latency.
    :vartype enable_rescoring: bool
    :ivar default_oversampling: Default oversampling factor. Oversampling retrieves a greater set
     of potential documents to offset the resolution loss due to quantization. This increases the
     set of results that will be rescored on full-precision vectors. Minimum value is 1, meaning no
     oversampling (1x). This parameter can only be set when 'enableRescoring' is true. Higher values
     improve recall at the expense of latency.
    :vartype default_oversampling: float
    :ivar rescore_storage_method: Controls the storage method for original vectors. This setting is
     immutable. Known values are: "preserveOriginals" and "discardOriginals".
    :vartype rescore_storage_method: str or
     ~azure.search.documents.indexes.models.VectorSearchCompressionRescoreStorageMethod
    """

    _attribute_map = {
        "enable_rescoring": {"key": "enableRescoring", "type": "bool"},
        "default_oversampling": {"key": "defaultOversampling", "type": "float"},
        "rescore_storage_method": {"key": "rescoreStorageMethod", "type": "str"},
    }

    def __init__(
        self,
        *,
        enable_rescoring: bool = True,
        default_oversampling: Optional[float] = None,
        rescore_storage_method: Optional[Union[str, "_models.VectorSearchCompressionRescoreStorageMethod"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword enable_rescoring: If set to true, after the initial search on the compressed vectors,
         the similarity scores are recalculated using the full-precision vectors. This will improve
         recall at the expense of latency.
        :paramtype enable_rescoring: bool
        :keyword default_oversampling: Default oversampling factor. Oversampling retrieves a greater
         set of potential documents to offset the resolution loss due to quantization. This increases
         the set of results that will be rescored on full-precision vectors. Minimum value is 1, meaning
         no oversampling (1x). This parameter can only be set when 'enableRescoring' is true. Higher
         values improve recall at the expense of latency.
        :paramtype default_oversampling: float
        :keyword rescore_storage_method: Controls the storage method for original vectors. This setting
         is immutable. Known values are: "preserveOriginals" and "discardOriginals".
        :paramtype rescore_storage_method: str or
         ~azure.search.documents.indexes.models.VectorSearchCompressionRescoreStorageMethod
        """
        super().__init__(**kwargs)
        self.enable_rescoring = enable_rescoring
        self.default_oversampling = default_oversampling
        self.rescore_storage_method = rescore_storage_method


class ResourceCounter(_serialization.Model):
    """Represents a resource's usage and quota.

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

    :ivar usage: The resource usage amount. Required.
    :vartype usage: int
    :ivar quota: The resource amount quota.
    :vartype quota: int
    """

    _validation = {
        "usage": {"required": True},
    }

    _attribute_map = {
        "usage": {"key": "usage", "type": "int"},
        "quota": {"key": "quota", "type": "int"},
    }

    def __init__(self, *, usage: int, quota: Optional[int] = None, **kwargs: Any) -> None:
        """
        :keyword usage: The resource usage amount. Required.
        :paramtype usage: int
        :keyword quota: The resource amount quota.
        :paramtype quota: int
        """
        super().__init__(**kwargs)
        self.usage = usage
        self.quota = quota


class ScalarQuantizationCompression(VectorSearchCompression):
    """Contains configuration options specific to the scalar quantization compression method used
       during indexing and querying.

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

       :ivar compression_name: The name to associate with this particular configuration. Required.
       :vartype compression_name: str
       :ivar kind: The name of the kind of compression method being configured for use with vector
        search. Required. Known values are: "scalarQuantization" and "binaryQuantization".
       :vartype kind: str or ~azure.search.documents.indexes.models.VectorSearchCompressionKind
       :ivar rescoring_options: Contains the options for rescoring.
       :vartype rescoring_options: ~azure.search.documents.indexes.models.RescoringOptions
       :ivar truncation_dimension: The number of dimensions to truncate the vectors to. Truncating the
        vectors reduces the size of the vectors and the amount of data that needs to be transferred
        during search. This can save storage cost and improve search performance at the expense of
        recall. It should be only used for embeddings trained with Matryoshka Representation Learning
        (MRL) such as OpenAI text-embedding-3-large (small). The default value is null, which means no
        truncation.
       :vartype truncation_dimension: int
       :ivar rerank_with_original_vectors: If set to true, once the ordered set of results calculated
        using compressed vectors are obtained, they will be reranked again by recalculating the
        full-precision similarity scores. This will improve recall at the expense of latency.
    For use with only service version 2024-07-01. If using 2025-09-01 or later, use
        RescoringOptions.rescoringEnabled.
       :vartype rerank_with_original_vectors: bool
       :ivar default_oversampling: Default oversampling factor. Oversampling will internally request
        more documents (specified by this multiplier) in the initial search. This increases the set of
        results that will be reranked using recomputed similarity scores from full-precision vectors.
        Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when
        rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency.
    For use with only service version 2024-07-01. If using 2025-09-01 or later, use
        RescoringOptions.defaultOversampling.
       :vartype default_oversampling: float
       :ivar parameters: Contains the parameters specific to Scalar Quantization.
       :vartype parameters: ~azure.search.documents.indexes.models.ScalarQuantizationParameters
    """

    _validation = {
        "compression_name": {"required": True},
        "kind": {"required": True},
    }

    _attribute_map = {
        "compression_name": {"key": "name", "type": "str"},
        "kind": {"key": "kind", "type": "str"},
        "rescoring_options": {"key": "rescoringOptions", "type": "RescoringOptions"},
        "truncation_dimension": {"key": "truncationDimension", "type": "int"},
        "rerank_with_original_vectors": {"key": "rerankWithOriginalVectors", "type": "bool"},
        "default_oversampling": {"key": "defaultOversampling", "type": "float"},
        "parameters": {"key": "scalarQuantizationParameters", "type": "ScalarQuantizationParameters"},
    }

    def __init__(
        self,
        *,
        compression_name: str,
        rescoring_options: Optional["_models.RescoringOptions"] = None,
        truncation_dimension: Optional[int] = None,
        rerank_with_original_vectors: Optional[bool] = None,
        default_oversampling: Optional[float] = None,
        parameters: Optional["_models.ScalarQuantizationParameters"] = None,
        **kwargs: Any
    ) -> None:
        """
               :keyword compression_name: The name to associate with this particular configuration. Required.
               :paramtype compression_name: str
               :keyword rescoring_options: Contains the options for rescoring.
               :paramtype rescoring_options: ~azure.search.documents.indexes.models.RescoringOptions
               :keyword truncation_dimension: The number of dimensions to truncate the vectors to. Truncating
                the vectors reduces the size of the vectors and the amount of data that needs to be transferred
                during search. This can save storage cost and improve search performance at the expense of
                recall. It should be only used for embeddings trained with Matryoshka Representation Learning
                (MRL) such as OpenAI text-embedding-3-large (small). The default value is null, which means no
                truncation.
               :paramtype truncation_dimension: int
               :keyword rerank_with_original_vectors: If set to true, once the ordered set of results
                calculated using compressed vectors are obtained, they will be reranked again by recalculating
                the full-precision similarity scores. This will improve recall at the expense of latency.
        For use with only service version 2024-07-01. If using 2025-09-01 or later, use
                RescoringOptions.rescoringEnabled.
               :paramtype rerank_with_original_vectors: bool
               :keyword default_oversampling: Default oversampling factor. Oversampling will internally
                request more documents (specified by this multiplier) in the initial search. This increases the
                set of results that will be reranked using recomputed similarity scores from full-precision
                vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when
                rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency.
        For use with only service version 2024-07-01. If using 2025-09-01 or later, use
                RescoringOptions.defaultOversampling.
               :paramtype default_oversampling: float
               :keyword parameters: Contains the parameters specific to Scalar Quantization.
               :paramtype parameters: ~azure.search.documents.indexes.models.ScalarQuantizationParameters
        """
        super().__init__(
            compression_name=compression_name,
            rescoring_options=rescoring_options,
            truncation_dimension=truncation_dimension,
            rerank_with_original_vectors=rerank_with_original_vectors,
            default_oversampling=default_oversampling,
            **kwargs
        )
        self.kind: str = "scalarQuantization"
        self.parameters = parameters


class ScalarQuantizationParameters(_serialization.Model):
    """Contains the parameters specific to Scalar Quantization.

    :ivar quantized_data_type: The quantized data type of compressed vector values. "int8"
    :vartype quantized_data_type: str or
     ~azure.search.documents.indexes.models.VectorSearchCompressionTarget
    """

    _attribute_map = {
        "quantized_data_type": {"key": "quantizedDataType", "type": "str"},
    }

    def __init__(
        self,
        *,
        quantized_data_type: Optional[Union[str, "_models.VectorSearchCompressionTarget"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword quantized_data_type: The quantized data type of compressed vector values. "int8"
        :paramtype quantized_data_type: str or
         ~azure.search.documents.indexes.models.VectorSearchCompressionTarget
        """
        super().__init__(**kwargs)
        self.quantized_data_type = quantized_data_type


class ScoringProfile(_serialization.Model):
    """Defines parameters for a search index that influence scoring in search queries.

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

    :ivar name: The name of the scoring profile. Required.
    :vartype name: str
    :ivar text_weights: Parameters that boost scoring based on text matches in certain index
     fields.
    :vartype text_weights: ~azure.search.documents.indexes.models.TextWeights
    :ivar functions: The collection of functions that influence the scoring of documents.
    :vartype functions: list[~azure.search.documents.indexes.models.ScoringFunction]
    :ivar function_aggregation: A value indicating how the results of individual scoring functions
     should be combined. Defaults to "Sum". Ignored if there are no scoring functions. Known values
     are: "sum", "average", "minimum", "maximum", and "firstMatching".
    :vartype function_aggregation: str or
     ~azure.search.documents.indexes.models.ScoringFunctionAggregation
    """

    _validation = {
        "name": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "text_weights": {"key": "text", "type": "TextWeights"},
        "functions": {"key": "functions", "type": "[ScoringFunction]"},
        "function_aggregation": {"key": "functionAggregation", "type": "str"},
    }

    def __init__(
        self,
        *,
        name: str,
        text_weights: Optional["_models.TextWeights"] = None,
        functions: Optional[list["_models.ScoringFunction"]] = None,
        function_aggregation: Optional[Union[str, "_models.ScoringFunctionAggregation"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the scoring profile. Required.
        :paramtype name: str
        :keyword text_weights: Parameters that boost scoring based on text matches in certain index
         fields.
        :paramtype text_weights: ~azure.search.documents.indexes.models.TextWeights
        :keyword functions: The collection of functions that influence the scoring of documents.
        :paramtype functions: list[~azure.search.documents.indexes.models.ScoringFunction]
        :keyword function_aggregation: A value indicating how the results of individual scoring
         functions should be combined. Defaults to "Sum". Ignored if there are no scoring functions.
         Known values are: "sum", "average", "minimum", "maximum", and "firstMatching".
        :paramtype function_aggregation: str or
         ~azure.search.documents.indexes.models.ScoringFunctionAggregation
        """
        super().__init__(**kwargs)
        self.name = name
        self.text_weights = text_weights
        self.functions = functions
        self.function_aggregation = function_aggregation


class SearchField(_serialization.Model):
    """Represents a field in an index definition, which describes the name, data type, and search
    behavior of a field.

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

    :ivar name: The name of the field, which must be unique within the fields collection of the
     index or parent field. Required.
    :vartype name: str
    :ivar type: The data type of the field. Required. Known values are: "Edm.String", "Edm.Int32",
     "Edm.Int64", "Edm.Double", "Edm.Boolean", "Edm.DateTimeOffset", "Edm.GeographyPoint",
     "Edm.ComplexType", "Edm.Single", "Edm.Half", "Edm.Int16", "Edm.SByte", and "Edm.Byte".
    :vartype type: str or ~azure.search.documents.indexes.models.SearchFieldDataType
    :ivar key: A value indicating whether the field uniquely identifies documents in the index.
     Exactly one top-level field in each index must be chosen as the key field and it must be of
     type Edm.String. Key fields can be used to look up documents directly and update or delete
     specific documents. Default is false for simple fields and null for complex fields.
    :vartype key: bool
    :ivar retrievable: A value indicating whether the field can be returned in a search result. You
     can disable this option if you want to use a field (for example, margin) as a filter, sorting,
     or scoring mechanism but do not want the field to be visible to the end user. This property
     must be true for key fields, and it must be null for complex fields. This property can be
     changed on existing fields. Enabling this property does not cause any increase in index storage
     requirements. Default is true for simple fields, false for vector fields, and null for complex
     fields.
    :vartype retrievable: bool
    :ivar stored: An immutable value indicating whether the field will be persisted separately on
     disk to be returned in a search result. You can disable this option if you don't plan to return
     the field contents in a search response to save on storage overhead. This can only be set
     during index creation and only for vector fields. This property cannot be changed for existing
     fields or set as false for new fields. If this property is set as false, the property
     'retrievable' must also be set to false. This property must be true or unset for key fields,
     for new fields, and for non-vector fields, and it must be null for complex fields. Disabling
     this property will reduce index storage requirements. The default is true for vector fields.
    :vartype stored: bool
    :ivar searchable: A value indicating whether the field is full-text searchable. This means it
     will undergo analysis such as word-breaking during indexing. If you set a searchable field to a
     value like "sunny day", internally it will be split into the individual tokens "sunny" and
     "day". This enables full-text searches for these terms. Fields of type Edm.String or
     Collection(Edm.String) are searchable by default. This property must be false for simple fields
     of other non-string data types, and it must be null for complex fields. Note: searchable fields
     consume extra space in your index to accommodate additional tokenized versions of the field
     value for full-text searches. If you want to save space in your index and you don't need a
     field to be included in searches, set searchable to false.
    :vartype searchable: bool
    :ivar filterable: A value indicating whether to enable the field to be referenced in $filter
     queries. filterable differs from searchable in how strings are handled. Fields of type
     Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so
     comparisons are for exact matches only. For example, if you set such a field f to "sunny day",
     $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. This property
     must be null for complex fields. Default is true for simple fields and null for complex fields.
    :vartype filterable: bool
    :ivar sortable: A value indicating whether to enable the field to be referenced in $orderby
     expressions. By default, the search engine sorts results by score, but in many experiences
     users will want to sort by fields in the documents. A simple field can be sortable only if it
     is single-valued (it has a single value in the scope of the parent document). Simple collection
     fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex
     collections are also multi-valued, and therefore cannot be sortable. This is true whether it's
     an immediate parent field, or an ancestor field, that's the complex collection. Complex fields
     cannot be sortable and the sortable property must be null for such fields. The default for
     sortable is true for single-valued simple fields, false for multi-valued simple fields, and
     null for complex fields.
    :vartype sortable: bool
    :ivar facetable: A value indicating whether to enable the field to be referenced in facet
     queries. Typically used in a presentation of search results that includes hit count by category
     (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so
     on). This property must be null for complex fields. Fields of type Edm.GeographyPoint or
     Collection(Edm.GeographyPoint) cannot be facetable. Default is true for all other simple
     fields.
    :vartype facetable: bool
    :ivar analyzer: The name of the analyzer to use for the field. This option can be used only
     with searchable fields and it can't be set together with either searchAnalyzer or
     indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null
     for complex fields. Known values are: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft",
     "eu.lucene", "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft",
     "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft",
     "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft",
     "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene",
     "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft",
     "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft",
     "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft",
     "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene",
     "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene",
     "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft",
     "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene",
     "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft",
     "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft",
     "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft",
     "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", and
     "whitespace".
    :vartype analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName
    :ivar search_analyzer: The name of the analyzer used at search time for the field. This option
     can be used only with searchable fields. It must be set together with indexAnalyzer and it
     cannot be set together with the analyzer option. This property cannot be set to the name of a
     language analyzer; use the analyzer property instead if you need a language analyzer. This
     analyzer can be updated on an existing field. Must be null for complex fields. Known values
     are: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", "bg.microsoft",
     "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh-Hans.lucene",
     "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", "cs.lucene",
     "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", "en.lucene",
     "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", "gl.lucene",
     "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", "he.microsoft",
     "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", "id.microsoft",
     "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", "ja.lucene",
     "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", "lt.microsoft",
     "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", "fa.lucene",
     "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft",
     "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene",
     "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft",
     "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft",
     "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft",
     "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", and
     "whitespace".
    :vartype search_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName
    :ivar index_analyzer: The name of the analyzer used at indexing time for the field. This option
     can be used only with searchable fields. It must be set together with searchAnalyzer and it
     cannot be set together with the analyzer option.  This property cannot be set to the name of a
     language analyzer; use the analyzer property instead if you need a language analyzer. Once the
     analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. Known
     values are: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene",
     "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft",
     "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft",
     "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft",
     "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene",
     "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft",
     "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft",
     "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft",
     "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene",
     "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene",
     "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft",
     "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene",
     "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft",
     "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft",
     "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft",
     "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", and
     "whitespace".
    :vartype index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName
    :ivar normalizer: The name of the normalizer to use for the field. This option can be used only
     with fields with filterable, sortable, or facetable enabled. Once the normalizer is chosen, it
     cannot be changed for the field. Must be null for complex fields. Known values are:
     "asciifolding", "elision", "lowercase", "standard", and "uppercase".
    :vartype normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName
    :ivar vector_search_dimensions: The dimensionality of the vector field.
    :vartype vector_search_dimensions: int
    :ivar vector_search_profile_name: The name of the vector search profile that specifies the
     algorithm and vectorizer to use when searching the vector field.
    :vartype vector_search_profile_name: str
    :ivar vector_encoding_format: The encoding format to interpret the field contents. "packedBit"
    :vartype vector_encoding_format: str or
     ~azure.search.documents.indexes.models.VectorEncodingFormat
    :ivar synonym_maps: A list of the names of synonym maps to associate with this field. This
     option can be used only with searchable fields. Currently only one synonym map per field is
     supported. Assigning a synonym map to a field ensures that query terms targeting that field are
     expanded at query-time using the rules in the synonym map. This attribute can be changed on
     existing fields. Must be null or an empty collection for complex fields.
    :vartype synonym_maps: list[str]
    :ivar fields: A list of sub-fields if this is a field of type Edm.ComplexType or
     Collection(Edm.ComplexType). Must be null or empty for simple fields.
    :vartype fields: list[~azure.search.documents.indexes.models.SearchField]
    """

    _validation = {
        "name": {"required": True},
        "type": {"required": True},
        "vector_search_dimensions": {"maximum": 4096, "minimum": 2},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "type": {"key": "type", "type": "str"},
        "key": {"key": "key", "type": "bool"},
        "retrievable": {"key": "retrievable", "type": "bool"},
        "stored": {"key": "stored", "type": "bool"},
        "searchable": {"key": "searchable", "type": "bool"},
        "filterable": {"key": "filterable", "type": "bool"},
        "sortable": {"key": "sortable", "type": "bool"},
        "facetable": {"key": "facetable", "type": "bool"},
        "analyzer": {"key": "analyzer", "type": "str"},
        "search_analyzer": {"key": "searchAnalyzer", "type": "str"},
        "index_analyzer": {"key": "indexAnalyzer", "type": "str"},
        "normalizer": {"key": "normalizer", "type": "str"},
        "vector_search_dimensions": {"key": "dimensions", "type": "int"},
        "vector_search_profile_name": {"key": "vectorSearchProfile", "type": "str"},
        "vector_encoding_format": {"key": "vectorEncoding", "type": "str"},
        "synonym_maps": {"key": "synonymMaps", "type": "[str]"},
        "fields": {"key": "fields", "type": "[SearchField]"},
    }

    def __init__(
        self,
        *,
        name: str,
        type: Union[str, "_models.SearchFieldDataType"],
        key: Optional[bool] = None,
        retrievable: Optional[bool] = None,
        stored: Optional[bool] = None,
        searchable: Optional[bool] = None,
        filterable: Optional[bool] = None,
        sortable: Optional[bool] = None,
        facetable: Optional[bool] = None,
        analyzer: Optional[Union[str, "_models.LexicalAnalyzerName"]] = None,
        search_analyzer: Optional[Union[str, "_models.LexicalAnalyzerName"]] = None,
        index_analyzer: Optional[Union[str, "_models.LexicalAnalyzerName"]] = None,
        normalizer: Optional[Union[str, "_models.LexicalNormalizerName"]] = None,
        vector_search_dimensions: Optional[int] = None,
        vector_search_profile_name: Optional[str] = None,
        vector_encoding_format: Optional[Union[str, "_models.VectorEncodingFormat"]] = None,
        synonym_maps: Optional[list[str]] = None,
        fields: Optional[list["_models.SearchField"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the field, which must be unique within the fields collection of the
         index or parent field. Required.
        :paramtype name: str
        :keyword type: The data type of the field. Required. Known values are: "Edm.String",
         "Edm.Int32", "Edm.Int64", "Edm.Double", "Edm.Boolean", "Edm.DateTimeOffset",
         "Edm.GeographyPoint", "Edm.ComplexType", "Edm.Single", "Edm.Half", "Edm.Int16", "Edm.SByte",
         and "Edm.Byte".
        :paramtype type: str or ~azure.search.documents.indexes.models.SearchFieldDataType
        :keyword key: A value indicating whether the field uniquely identifies documents in the index.
         Exactly one top-level field in each index must be chosen as the key field and it must be of
         type Edm.String. Key fields can be used to look up documents directly and update or delete
         specific documents. Default is false for simple fields and null for complex fields.
        :paramtype key: bool
        :keyword retrievable: A value indicating whether the field can be returned in a search result.
         You can disable this option if you want to use a field (for example, margin) as a filter,
         sorting, or scoring mechanism but do not want the field to be visible to the end user. This
         property must be true for key fields, and it must be null for complex fields. This property can
         be changed on existing fields. Enabling this property does not cause any increase in index
         storage requirements. Default is true for simple fields, false for vector fields, and null for
         complex fields.
        :paramtype retrievable: bool
        :keyword stored: An immutable value indicating whether the field will be persisted separately
         on disk to be returned in a search result. You can disable this option if you don't plan to
         return the field contents in a search response to save on storage overhead. This can only be
         set during index creation and only for vector fields. This property cannot be changed for
         existing fields or set as false for new fields. If this property is set as false, the property
         'retrievable' must also be set to false. This property must be true or unset for key fields,
         for new fields, and for non-vector fields, and it must be null for complex fields. Disabling
         this property will reduce index storage requirements. The default is true for vector fields.
        :paramtype stored: bool
        :keyword searchable: A value indicating whether the field is full-text searchable. This means
         it will undergo analysis such as word-breaking during indexing. If you set a searchable field
         to a value like "sunny day", internally it will be split into the individual tokens "sunny" and
         "day". This enables full-text searches for these terms. Fields of type Edm.String or
         Collection(Edm.String) are searchable by default. This property must be false for simple fields
         of other non-string data types, and it must be null for complex fields. Note: searchable fields
         consume extra space in your index to accommodate additional tokenized versions of the field
         value for full-text searches. If you want to save space in your index and you don't need a
         field to be included in searches, set searchable to false.
        :paramtype searchable: bool
        :keyword filterable: A value indicating whether to enable the field to be referenced in $filter
         queries. filterable differs from searchable in how strings are handled. Fields of type
         Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so
         comparisons are for exact matches only. For example, if you set such a field f to "sunny day",
         $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. This property
         must be null for complex fields. Default is true for simple fields and null for complex fields.
        :paramtype filterable: bool
        :keyword sortable: A value indicating whether to enable the field to be referenced in $orderby
         expressions. By default, the search engine sorts results by score, but in many experiences
         users will want to sort by fields in the documents. A simple field can be sortable only if it
         is single-valued (it has a single value in the scope of the parent document). Simple collection
         fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex
         collections are also multi-valued, and therefore cannot be sortable. This is true whether it's
         an immediate parent field, or an ancestor field, that's the complex collection. Complex fields
         cannot be sortable and the sortable property must be null for such fields. The default for
         sortable is true for single-valued simple fields, false for multi-valued simple fields, and
         null for complex fields.
        :paramtype sortable: bool
        :keyword facetable: A value indicating whether to enable the field to be referenced in facet
         queries. Typically used in a presentation of search results that includes hit count by category
         (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so
         on). This property must be null for complex fields. Fields of type Edm.GeographyPoint or
         Collection(Edm.GeographyPoint) cannot be facetable. Default is true for all other simple
         fields.
        :paramtype facetable: bool
        :keyword analyzer: The name of the analyzer to use for the field. This option can be used only
         with searchable fields and it can't be set together with either searchAnalyzer or
         indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null
         for complex fields. Known values are: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft",
         "eu.lucene", "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft",
         "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft",
         "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft",
         "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene",
         "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft",
         "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft",
         "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft",
         "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene",
         "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene",
         "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft",
         "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene",
         "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft",
         "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft",
         "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft",
         "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", and
         "whitespace".
        :paramtype analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName
        :keyword search_analyzer: The name of the analyzer used at search time for the field. This
         option can be used only with searchable fields. It must be set together with indexAnalyzer and
         it cannot be set together with the analyzer option. This property cannot be set to the name of
         a language analyzer; use the analyzer property instead if you need a language analyzer. This
         analyzer can be updated on an existing field. Must be null for complex fields. Known values
         are: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", "bg.microsoft",
         "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh-Hans.lucene",
         "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", "cs.lucene",
         "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", "en.lucene",
         "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", "gl.lucene",
         "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", "he.microsoft",
         "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", "id.microsoft",
         "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", "ja.lucene",
         "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", "lt.microsoft",
         "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", "fa.lucene",
         "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft",
         "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene",
         "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft",
         "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft",
         "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft",
         "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", and
         "whitespace".
        :paramtype search_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName
        :keyword index_analyzer: The name of the analyzer used at indexing time for the field. This
         option can be used only with searchable fields. It must be set together with searchAnalyzer and
         it cannot be set together with the analyzer option.  This property cannot be set to the name of
         a language analyzer; use the analyzer property instead if you need a language analyzer. Once
         the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields.
         Known values are: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene",
         "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft",
         "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft",
         "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft",
         "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene",
         "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft",
         "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft",
         "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft",
         "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene",
         "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene",
         "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft",
         "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene",
         "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft",
         "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft",
         "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft",
         "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", and
         "whitespace".
        :paramtype index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName
        :keyword normalizer: The name of the normalizer to use for the field. This option can be used
         only with fields with filterable, sortable, or facetable enabled. Once the normalizer is
         chosen, it cannot be changed for the field. Must be null for complex fields. Known values are:
         "asciifolding", "elision", "lowercase", "standard", and "uppercase".
        :paramtype normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName
        :keyword vector_search_dimensions: The dimensionality of the vector field.
        :paramtype vector_search_dimensions: int
        :keyword vector_search_profile_name: The name of the vector search profile that specifies the
         algorithm and vectorizer to use when searching the vector field.
        :paramtype vector_search_profile_name: str
        :keyword vector_encoding_format: The encoding format to interpret the field contents.
         "packedBit"
        :paramtype vector_encoding_format: str or
         ~azure.search.documents.indexes.models.VectorEncodingFormat
        :keyword synonym_maps: A list of the names of synonym maps to associate with this field. This
         option can be used only with searchable fields. Currently only one synonym map per field is
         supported. Assigning a synonym map to a field ensures that query terms targeting that field are
         expanded at query-time using the rules in the synonym map. This attribute can be changed on
         existing fields. Must be null or an empty collection for complex fields.
        :paramtype synonym_maps: list[str]
        :keyword fields: A list of sub-fields if this is a field of type Edm.ComplexType or
         Collection(Edm.ComplexType). Must be null or empty for simple fields.
        :paramtype fields: list[~azure.search.documents.indexes.models.SearchField]
        """
        super().__init__(**kwargs)
        self.name = name
        self.type = type
        self.key = key
        self.retrievable = retrievable
        self.stored = stored
        self.searchable = searchable
        self.filterable = filterable
        self.sortable = sortable
        self.facetable = facetable
        self.analyzer = analyzer
        self.search_analyzer = search_analyzer
        self.index_analyzer = index_analyzer
        self.normalizer = normalizer
        self.vector_search_dimensions = vector_search_dimensions
        self.vector_search_profile_name = vector_search_profile_name
        self.vector_encoding_format = vector_encoding_format
        self.synonym_maps = synonym_maps
        self.fields = fields


class SearchIndex(_serialization.Model):
    """Represents a search index definition, which describes the fields and search behavior of an
    index.

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

    :ivar name: The name of the index. Required.
    :vartype name: str
    :ivar description: The description of the index.
    :vartype description: str
    :ivar fields: The fields of the index. Required.
    :vartype fields: list[~azure.search.documents.indexes.models.SearchField]
    :ivar scoring_profiles: The scoring profiles for the index.
    :vartype scoring_profiles: list[~azure.search.documents.indexes.models.ScoringProfile]
    :ivar default_scoring_profile: The name of the scoring profile to use if none is specified in
     the query. If this property is not set and no scoring profile is specified in the query, then
     default scoring (tf-idf) will be used.
    :vartype default_scoring_profile: str
    :ivar cors_options: Options to control Cross-Origin Resource Sharing (CORS) for the index.
    :vartype cors_options: ~azure.search.documents.indexes.models.CorsOptions
    :ivar suggesters: The suggesters for the index.
    :vartype suggesters: list[~azure.search.documents.indexes.models.SearchSuggester]
    :ivar analyzers: The analyzers for the index.
    :vartype analyzers: list[~azure.search.documents.indexes.models.LexicalAnalyzer]
    :ivar tokenizers: The tokenizers for the index.
    :vartype tokenizers: list[~azure.search.documents.indexes.models.LexicalTokenizer]
    :ivar token_filters: The token filters for the index.
    :vartype token_filters: list[~azure.search.documents.indexes.models.TokenFilter]
    :ivar char_filters: The character filters for the index.
    :vartype char_filters: list[~azure.search.documents.indexes.models.CharFilter]
    :ivar normalizers: The normalizers for the index.
    :vartype normalizers: list[~azure.search.documents.indexes.models.LexicalNormalizer]
    :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault.
     This key is used to provide an additional level of encryption-at-rest for your data when you
     want full assurance that no one, not even Microsoft, can decrypt your data. Once you have
     encrypted your data, it will always remain encrypted. The search service will ignore attempts
     to set this property to null. You can change this property as needed if you want to rotate your
     encryption key; Your data will be unaffected. Encryption with customer-managed keys is not
     available for free search services, and is only available for paid services created on or after
     January 1, 2019.
    :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey
    :ivar similarity: The type of similarity algorithm to be used when scoring and ranking the
     documents matching a search query. The similarity algorithm can only be defined at index
     creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity
     algorithm is used.
    :vartype similarity: ~azure.search.documents.indexes.models.SimilarityAlgorithm
    :ivar semantic_search: Defines parameters for a search index that influence semantic
     capabilities.
    :vartype semantic_search: ~azure.search.documents.indexes.models.SemanticSearch
    :ivar vector_search: Contains configuration options related to vector search.
    :vartype vector_search: ~azure.search.documents.indexes.models.VectorSearch
    :ivar e_tag: The ETag of the index.
    :vartype e_tag: str
    """

    _validation = {
        "name": {"required": True},
        "fields": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "fields": {"key": "fields", "type": "[SearchField]"},
        "scoring_profiles": {"key": "scoringProfiles", "type": "[ScoringProfile]"},
        "default_scoring_profile": {"key": "defaultScoringProfile", "type": "str"},
        "cors_options": {"key": "corsOptions", "type": "CorsOptions"},
        "suggesters": {"key": "suggesters", "type": "[SearchSuggester]"},
        "analyzers": {"key": "analyzers", "type": "[LexicalAnalyzer]"},
        "tokenizers": {"key": "tokenizers", "type": "[LexicalTokenizer]"},
        "token_filters": {"key": "tokenFilters", "type": "[TokenFilter]"},
        "char_filters": {"key": "charFilters", "type": "[CharFilter]"},
        "normalizers": {"key": "normalizers", "type": "[LexicalNormalizer]"},
        "encryption_key": {"key": "encryptionKey", "type": "SearchResourceEncryptionKey"},
        "similarity": {"key": "similarity", "type": "SimilarityAlgorithm"},
        "semantic_search": {"key": "semantic", "type": "SemanticSearch"},
        "vector_search": {"key": "vectorSearch", "type": "VectorSearch"},
        "e_tag": {"key": "@odata\\.etag", "type": "str"},
    }

    def __init__(
        self,
        *,
        name: str,
        fields: list["_models.SearchField"],
        description: Optional[str] = None,
        scoring_profiles: Optional[list["_models.ScoringProfile"]] = None,
        default_scoring_profile: Optional[str] = None,
        cors_options: Optional["_models.CorsOptions"] = None,
        suggesters: Optional[list["_models.SearchSuggester"]] = None,
        analyzers: Optional[list["_models.LexicalAnalyzer"]] = None,
        tokenizers: Optional[list["_models.LexicalTokenizer"]] = None,
        token_filters: Optional[list["_models.TokenFilter"]] = None,
        char_filters: Optional[list["_models.CharFilter"]] = None,
        normalizers: Optional[list["_models.LexicalNormalizer"]] = None,
        encryption_key: Optional["_models.SearchResourceEncryptionKey"] = None,
        similarity: Optional["_models.SimilarityAlgorithm"] = None,
        semantic_search: Optional["_models.SemanticSearch"] = None,
        vector_search: Optional["_models.VectorSearch"] = None,
        e_tag: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the index. Required.
        :paramtype name: str
        :keyword description: The description of the index.
        :paramtype description: str
        :keyword fields: The fields of the index. Required.
        :paramtype fields: list[~azure.search.documents.indexes.models.SearchField]
        :keyword scoring_profiles: The scoring profiles for the index.
        :paramtype scoring_profiles: list[~azure.search.documents.indexes.models.ScoringProfile]
        :keyword default_scoring_profile: The name of the scoring profile to use if none is specified
         in the query. If this property is not set and no scoring profile is specified in the query,
         then default scoring (tf-idf) will be used.
        :paramtype default_scoring_profile: str
        :keyword cors_options: Options to control Cross-Origin Resource Sharing (CORS) for the index.
        :paramtype cors_options: ~azure.search.documents.indexes.models.CorsOptions
        :keyword suggesters: The suggesters for the index.
        :paramtype suggesters: list[~azure.search.documents.indexes.models.SearchSuggester]
        :keyword analyzers: The analyzers for the index.
        :paramtype analyzers: list[~azure.search.documents.indexes.models.LexicalAnalyzer]
        :keyword tokenizers: The tokenizers for the index.
        :paramtype tokenizers: list[~azure.search.documents.indexes.models.LexicalTokenizer]
        :keyword token_filters: The token filters for the index.
        :paramtype token_filters: list[~azure.search.documents.indexes.models.TokenFilter]
        :keyword char_filters: The character filters for the index.
        :paramtype char_filters: list[~azure.search.documents.indexes.models.CharFilter]
        :keyword normalizers: The normalizers for the index.
        :paramtype normalizers: list[~azure.search.documents.indexes.models.LexicalNormalizer]
        :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault.
         This key is used to provide an additional level of encryption-at-rest for your data when you
         want full assurance that no one, not even Microsoft, can decrypt your data. Once you have
         encrypted your data, it will always remain encrypted. The search service will ignore attempts
         to set this property to null. You can change this property as needed if you want to rotate your
         encryption key; Your data will be unaffected. Encryption with customer-managed keys is not
         available for free search services, and is only available for paid services created on or after
         January 1, 2019.
        :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey
        :keyword similarity: The type of similarity algorithm to be used when scoring and ranking the
         documents matching a search query. The similarity algorithm can only be defined at index
         creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity
         algorithm is used.
        :paramtype similarity: ~azure.search.documents.indexes.models.SimilarityAlgorithm
        :keyword semantic_search: Defines parameters for a search index that influence semantic
         capabilities.
        :paramtype semantic_search: ~azure.search.documents.indexes.models.SemanticSearch
        :keyword vector_search: Contains configuration options related to vector search.
        :paramtype vector_search: ~azure.search.documents.indexes.models.VectorSearch
        :keyword e_tag: The ETag of the index.
        :paramtype e_tag: str
        """
        super().__init__(**kwargs)
        self.name = name
        self.description = description
        self.fields = fields
        self.scoring_profiles = scoring_profiles
        self.default_scoring_profile = default_scoring_profile
        self.cors_options = cors_options
        self.suggesters = suggesters
        self.analyzers = analyzers
        self.tokenizers = tokenizers
        self.token_filters = token_filters
        self.char_filters = char_filters
        self.normalizers = normalizers
        self.encryption_key = encryption_key
        self.similarity = similarity
        self.semantic_search = semantic_search
        self.vector_search = vector_search
        self.e_tag = e_tag


class SearchIndexer(_serialization.Model):
    """Represents an indexer.

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

    :ivar name: The name of the indexer. Required.
    :vartype name: str
    :ivar description: The description of the indexer.
    :vartype description: str
    :ivar data_source_name: The name of the datasource from which this indexer reads data.
     Required.
    :vartype data_source_name: str
    :ivar skillset_name: The name of the skillset executing with this indexer.
    :vartype skillset_name: str
    :ivar target_index_name: The name of the index to which this indexer writes data. Required.
    :vartype target_index_name: str
    :ivar schedule: The schedule for this indexer.
    :vartype schedule: ~azure.search.documents.indexes.models.IndexingSchedule
    :ivar parameters: Parameters for indexer execution.
    :vartype parameters: ~azure.search.documents.indexes.models.IndexingParameters
    :ivar field_mappings: Defines mappings between fields in the data source and corresponding
     target fields in the index.
    :vartype field_mappings: list[~azure.search.documents.indexes.models.FieldMapping]
    :ivar output_field_mappings: Output field mappings are applied after enrichment and immediately
     before indexing.
    :vartype output_field_mappings: list[~azure.search.documents.indexes.models.FieldMapping]
    :ivar is_disabled: A value indicating whether the indexer is disabled. Default is false.
    :vartype is_disabled: bool
    :ivar e_tag: The ETag of the indexer.
    :vartype e_tag: str
    :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault.
     This key is used to provide an additional level of encryption-at-rest for your indexer
     definition (as well as indexer execution status) when you want full assurance that no one, not
     even Microsoft, can decrypt them. Once you have encrypted your indexer definition, it will
     always remain encrypted. The search service will ignore attempts to set this property to null.
     You can change this property as needed if you want to rotate your encryption key; Your indexer
     definition (and indexer execution status) will be unaffected. Encryption with customer-managed
     keys is not available for free search services, and is only available for paid services created
     on or after January 1, 2019.
    :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey
    """

    _validation = {
        "name": {"required": True},
        "data_source_name": {"required": True},
        "target_index_name": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "data_source_name": {"key": "dataSourceName", "type": "str"},
        "skillset_name": {"key": "skillsetName", "type": "str"},
        "target_index_name": {"key": "targetIndexName", "type": "str"},
        "schedule": {"key": "schedule", "type": "IndexingSchedule"},
        "parameters": {"key": "parameters", "type": "IndexingParameters"},
        "field_mappings": {"key": "fieldMappings", "type": "[FieldMapping]"},
        "output_field_mappings": {"key": "outputFieldMappings", "type": "[FieldMapping]"},
        "is_disabled": {"key": "disabled", "type": "bool"},
        "e_tag": {"key": "@odata\\.etag", "type": "str"},
        "encryption_key": {"key": "encryptionKey", "type": "SearchResourceEncryptionKey"},
    }

    def __init__(
        self,
        *,
        name: str,
        data_source_name: str,
        target_index_name: str,
        description: Optional[str] = None,
        skillset_name: Optional[str] = None,
        schedule: Optional["_models.IndexingSchedule"] = None,
        parameters: Optional["_models.IndexingParameters"] = None,
        field_mappings: Optional[list["_models.FieldMapping"]] = None,
        output_field_mappings: Optional[list["_models.FieldMapping"]] = None,
        is_disabled: bool = False,
        e_tag: Optional[str] = None,
        encryption_key: Optional["_models.SearchResourceEncryptionKey"] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the indexer. Required.
        :paramtype name: str
        :keyword description: The description of the indexer.
        :paramtype description: str
        :keyword data_source_name: The name of the datasource from which this indexer reads data.
         Required.
        :paramtype data_source_name: str
        :keyword skillset_name: The name of the skillset executing with this indexer.
        :paramtype skillset_name: str
        :keyword target_index_name: The name of the index to which this indexer writes data. Required.
        :paramtype target_index_name: str
        :keyword schedule: The schedule for this indexer.
        :paramtype schedule: ~azure.search.documents.indexes.models.IndexingSchedule
        :keyword parameters: Parameters for indexer execution.
        :paramtype parameters: ~azure.search.documents.indexes.models.IndexingParameters
        :keyword field_mappings: Defines mappings between fields in the data source and corresponding
         target fields in the index.
        :paramtype field_mappings: list[~azure.search.documents.indexes.models.FieldMapping]
        :keyword output_field_mappings: Output field mappings are applied after enrichment and
         immediately before indexing.
        :paramtype output_field_mappings: list[~azure.search.documents.indexes.models.FieldMapping]
        :keyword is_disabled: A value indicating whether the indexer is disabled. Default is false.
        :paramtype is_disabled: bool
        :keyword e_tag: The ETag of the indexer.
        :paramtype e_tag: str
        :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault.
         This key is used to provide an additional level of encryption-at-rest for your indexer
         definition (as well as indexer execution status) when you want full assurance that no one, not
         even Microsoft, can decrypt them. Once you have encrypted your indexer definition, it will
         always remain encrypted. The search service will ignore attempts to set this property to null.
         You can change this property as needed if you want to rotate your encryption key; Your indexer
         definition (and indexer execution status) will be unaffected. Encryption with customer-managed
         keys is not available for free search services, and is only available for paid services created
         on or after January 1, 2019.
        :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey
        """
        super().__init__(**kwargs)
        self.name = name
        self.description = description
        self.data_source_name = data_source_name
        self.skillset_name = skillset_name
        self.target_index_name = target_index_name
        self.schedule = schedule
        self.parameters = parameters
        self.field_mappings = field_mappings
        self.output_field_mappings = output_field_mappings
        self.is_disabled = is_disabled
        self.e_tag = e_tag
        self.encryption_key = encryption_key


class SearchIndexerDataContainer(_serialization.Model):
    """Represents information about the entity (such as Azure SQL table or CosmosDB collection) that
    will be indexed.

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

    :ivar name: The name of the table or view (for Azure SQL datasource), collection (for CosmosDB
     datasource), container (for Azure Blob and ADLS Gen 2 datasources), Azure Table (for Azure
     Table datasource), or lakehouse (for Onelake datasource) that will be indexed. Required.
    :vartype name: str
    :ivar query: A query that is applied to this data container. For CosmosDB datasource query can
     flatten and filter data. For Azure Blob and ADLS Gen 2 query can filter by folders. For Azure
     Table query can filter by row data. For Onelake query can filter by folder or shortcut. Not
     supported by Azure SQL datasources.
    :vartype query: str
    """

    _validation = {
        "name": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "query": {"key": "query", "type": "str"},
    }

    def __init__(self, *, name: str, query: Optional[str] = None, **kwargs: Any) -> None:
        """
        :keyword name: The name of the table or view (for Azure SQL datasource), collection (for
         CosmosDB datasource), container (for Azure Blob and ADLS Gen 2 datasources), Azure Table (for
         Azure Table datasource), or lakehouse (for Onelake datasource) that will be indexed. Required.
        :paramtype name: str
        :keyword query: A query that is applied to this data container. For CosmosDB datasource query
         can flatten and filter data. For Azure Blob and ADLS Gen 2 query can filter by folders. For
         Azure Table query can filter by row data. For Onelake query can filter by folder or shortcut.
         Not supported by Azure SQL datasources.
        :paramtype query: str
        """
        super().__init__(**kwargs)
        self.name = name
        self.query = query


class SearchIndexerDataIdentity(_serialization.Model):
    """Abstract base type for data identities.

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

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

    :ivar odata_type: A URI fragment specifying the type of identity. Required.
    :vartype odata_type: str
    """

    _validation = {
        "odata_type": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
    }

    _subtype_map = {
        "odata_type": {
            "#Microsoft.Azure.Search.DataNoneIdentity": "SearchIndexerDataNoneIdentity",
            "#Microsoft.Azure.Search.DataUserAssignedIdentity": "SearchIndexerDataUserAssignedIdentity",
        }
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.odata_type: Optional[str] = None


class SearchIndexerDataNoneIdentity(SearchIndexerDataIdentity):
    """Clears the identity property of a datasource.

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

    :ivar odata_type: A URI fragment specifying the type of identity. Required.
    :vartype odata_type: str
    """

    _validation = {
        "odata_type": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.DataNoneIdentity"


class SearchIndexerDataSource(_serialization.Model):
    """Represents a datasource definition, which can be used to configure an indexer.

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

    :ivar name: The name of the datasource. Required.
    :vartype name: str
    :ivar description: The description of the datasource.
    :vartype description: str
    :ivar type: The type of the datasource. Required. Known values are: "azuresql", "cosmosdb",
     "azureblob", "azuretable", "mysql", "adlsgen2", and "onelake".
    :vartype type: str or ~azure.search.documents.indexes.models.SearchIndexerDataSourceType
    :ivar credentials: Credentials for the datasource. Required.
    :vartype credentials: ~azure.search.documents.indexes.models.DataSourceCredentials
    :ivar container: The data container for the datasource. Required.
    :vartype container: ~azure.search.documents.indexes.models.SearchIndexerDataContainer
    :ivar data_change_detection_policy: The data change detection policy for the datasource.
    :vartype data_change_detection_policy:
     ~azure.search.documents.indexes.models.DataChangeDetectionPolicy
    :ivar data_deletion_detection_policy: The data deletion detection policy for the datasource.
    :vartype data_deletion_detection_policy:
     ~azure.search.documents.indexes.models.DataDeletionDetectionPolicy
    :ivar e_tag: The ETag of the data source.
    :vartype e_tag: str
    :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault.
     This key is used to provide an additional level of encryption-at-rest for your datasource
     definition when you want full assurance that no one, not even Microsoft, can decrypt your data
     source definition. Once you have encrypted your data source definition, it will always remain
     encrypted. The search service will ignore attempts to set this property to null. You can change
     this property as needed if you want to rotate your encryption key; Your datasource definition
     will be unaffected. Encryption with customer-managed keys is not available for free search
     services, and is only available for paid services created on or after January 1, 2019.
    :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey
    """

    _validation = {
        "name": {"required": True},
        "type": {"required": True},
        "credentials": {"required": True},
        "container": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "type": {"key": "type", "type": "str"},
        "credentials": {"key": "credentials", "type": "DataSourceCredentials"},
        "container": {"key": "container", "type": "SearchIndexerDataContainer"},
        "data_change_detection_policy": {"key": "dataChangeDetectionPolicy", "type": "DataChangeDetectionPolicy"},
        "data_deletion_detection_policy": {"key": "dataDeletionDetectionPolicy", "type": "DataDeletionDetectionPolicy"},
        "e_tag": {"key": "@odata\\.etag", "type": "str"},
        "encryption_key": {"key": "encryptionKey", "type": "SearchResourceEncryptionKey"},
    }

    def __init__(
        self,
        *,
        name: str,
        type: Union[str, "_models.SearchIndexerDataSourceType"],
        credentials: "_models.DataSourceCredentials",
        container: "_models.SearchIndexerDataContainer",
        description: Optional[str] = None,
        data_change_detection_policy: Optional["_models.DataChangeDetectionPolicy"] = None,
        data_deletion_detection_policy: Optional["_models.DataDeletionDetectionPolicy"] = None,
        e_tag: Optional[str] = None,
        encryption_key: Optional["_models.SearchResourceEncryptionKey"] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the datasource. Required.
        :paramtype name: str
        :keyword description: The description of the datasource.
        :paramtype description: str
        :keyword type: The type of the datasource. Required. Known values are: "azuresql", "cosmosdb",
         "azureblob", "azuretable", "mysql", "adlsgen2", and "onelake".
        :paramtype type: str or ~azure.search.documents.indexes.models.SearchIndexerDataSourceType
        :keyword credentials: Credentials for the datasource. Required.
        :paramtype credentials: ~azure.search.documents.indexes.models.DataSourceCredentials
        :keyword container: The data container for the datasource. Required.
        :paramtype container: ~azure.search.documents.indexes.models.SearchIndexerDataContainer
        :keyword data_change_detection_policy: The data change detection policy for the datasource.
        :paramtype data_change_detection_policy:
         ~azure.search.documents.indexes.models.DataChangeDetectionPolicy
        :keyword data_deletion_detection_policy: The data deletion detection policy for the datasource.
        :paramtype data_deletion_detection_policy:
         ~azure.search.documents.indexes.models.DataDeletionDetectionPolicy
        :keyword e_tag: The ETag of the data source.
        :paramtype e_tag: str
        :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault.
         This key is used to provide an additional level of encryption-at-rest for your datasource
         definition when you want full assurance that no one, not even Microsoft, can decrypt your data
         source definition. Once you have encrypted your data source definition, it will always remain
         encrypted. The search service will ignore attempts to set this property to null. You can change
         this property as needed if you want to rotate your encryption key; Your datasource definition
         will be unaffected. Encryption with customer-managed keys is not available for free search
         services, and is only available for paid services created on or after January 1, 2019.
        :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey
        """
        super().__init__(**kwargs)
        self.name = name
        self.description = description
        self.type = type
        self.credentials = credentials
        self.container = container
        self.data_change_detection_policy = data_change_detection_policy
        self.data_deletion_detection_policy = data_deletion_detection_policy
        self.e_tag = e_tag
        self.encryption_key = encryption_key


class SearchIndexerDataUserAssignedIdentity(SearchIndexerDataIdentity):
    """Specifies the identity for a datasource to use.

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

    :ivar odata_type: A URI fragment specifying the type of identity. Required.
    :vartype odata_type: str
    :ivar resource_id: The fully qualified Azure resource Id of a user assigned managed identity
     typically in the form
     "/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId"
     that should have been assigned to the search service. Required.
    :vartype resource_id: str
    """

    _validation = {
        "odata_type": {"required": True},
        "resource_id": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "resource_id": {"key": "userAssignedIdentity", "type": "str"},
    }

    def __init__(self, *, resource_id: str, **kwargs: Any) -> None:
        """
        :keyword resource_id: The fully qualified Azure resource Id of a user assigned managed identity
         typically in the form
         "/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId"
         that should have been assigned to the search service. Required.
        :paramtype resource_id: str
        """
        super().__init__(**kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.DataUserAssignedIdentity"
        self.resource_id = resource_id


class SearchIndexerError(_serialization.Model):
    """Represents an item- or document-level indexing error.

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

    :ivar key: The key of the item for which indexing failed.
    :vartype key: str
    :ivar error_message: The message describing the error that occurred while processing the item.
     Required.
    :vartype error_message: str
    :ivar status_code: The status code indicating why the indexing operation failed. Possible
     values include: 400 for a malformed input document, 404 for document not found, 409 for a
     version conflict, 422 when the index is temporarily unavailable, or 503 for when the service is
     too busy. Required.
    :vartype status_code: int
    :ivar name: The name of the source at which the error originated. For example, this could refer
     to a particular skill in the attached skillset. This may not be always available.
    :vartype name: str
    :ivar details: Additional, verbose details about the error to assist in debugging the indexer.
     This may not be always available.
    :vartype details: str
    :ivar documentation_link: A link to a troubleshooting guide for these classes of errors. This
     may not be always available.
    :vartype documentation_link: str
    """

    _validation = {
        "key": {"readonly": True},
        "error_message": {"required": True, "readonly": True},
        "status_code": {"required": True, "readonly": True},
        "name": {"readonly": True},
        "details": {"readonly": True},
        "documentation_link": {"readonly": True},
    }

    _attribute_map = {
        "key": {"key": "key", "type": "str"},
        "error_message": {"key": "errorMessage", "type": "str"},
        "status_code": {"key": "statusCode", "type": "int"},
        "name": {"key": "name", "type": "str"},
        "details": {"key": "details", "type": "str"},
        "documentation_link": {"key": "documentationLink", "type": "str"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.key: Optional[str] = None
        self.error_message: Optional[str] = None
        self.status_code: Optional[int] = None
        self.name: Optional[str] = None
        self.details: Optional[str] = None
        self.documentation_link: Optional[str] = None


class SearchIndexerIndexProjection(_serialization.Model):
    """Definition of additional projections to secondary search indexes.

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

    :ivar selectors: A list of projections to be performed to secondary search indexes. Required.
    :vartype selectors:
     list[~azure.search.documents.indexes.models.SearchIndexerIndexProjectionSelector]
    :ivar parameters: A dictionary of index projection-specific configuration properties. Each name
     is the name of a specific property. Each value must be of a primitive type.
    :vartype parameters:
     ~azure.search.documents.indexes.models.SearchIndexerIndexProjectionsParameters
    """

    _validation = {
        "selectors": {"required": True},
    }

    _attribute_map = {
        "selectors": {"key": "selectors", "type": "[SearchIndexerIndexProjectionSelector]"},
        "parameters": {"key": "parameters", "type": "SearchIndexerIndexProjectionsParameters"},
    }

    def __init__(
        self,
        *,
        selectors: list["_models.SearchIndexerIndexProjectionSelector"],
        parameters: Optional["_models.SearchIndexerIndexProjectionsParameters"] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword selectors: A list of projections to be performed to secondary search indexes.
         Required.
        :paramtype selectors:
         list[~azure.search.documents.indexes.models.SearchIndexerIndexProjectionSelector]
        :keyword parameters: A dictionary of index projection-specific configuration properties. Each
         name is the name of a specific property. Each value must be of a primitive type.
        :paramtype parameters:
         ~azure.search.documents.indexes.models.SearchIndexerIndexProjectionsParameters
        """
        super().__init__(**kwargs)
        self.selectors = selectors
        self.parameters = parameters


class SearchIndexerIndexProjectionSelector(_serialization.Model):
    """Description for what data to store in the designated search index.

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

    :ivar target_index_name: Name of the search index to project to. Must have a key field with the
     'keyword' analyzer set. Required.
    :vartype target_index_name: str
    :ivar parent_key_field_name: Name of the field in the search index to map the parent document's
     key value to. Must be a string field that is filterable and not the key field. Required.
    :vartype parent_key_field_name: str
    :ivar source_context: Source context for the projections. Represents the cardinality at which
     the document will be split into multiple sub documents. Required.
    :vartype source_context: str
    :ivar mappings: Mappings for the projection, or which source should be mapped to which field in
     the target index. Required.
    :vartype mappings: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    """

    _validation = {
        "target_index_name": {"required": True},
        "parent_key_field_name": {"required": True},
        "source_context": {"required": True},
        "mappings": {"required": True},
    }

    _attribute_map = {
        "target_index_name": {"key": "targetIndexName", "type": "str"},
        "parent_key_field_name": {"key": "parentKeyFieldName", "type": "str"},
        "source_context": {"key": "sourceContext", "type": "str"},
        "mappings": {"key": "mappings", "type": "[InputFieldMappingEntry]"},
    }

    def __init__(
        self,
        *,
        target_index_name: str,
        parent_key_field_name: str,
        source_context: str,
        mappings: list["_models.InputFieldMappingEntry"],
        **kwargs: Any
    ) -> None:
        """
        :keyword target_index_name: Name of the search index to project to. Must have a key field with
         the 'keyword' analyzer set. Required.
        :paramtype target_index_name: str
        :keyword parent_key_field_name: Name of the field in the search index to map the parent
         document's key value to. Must be a string field that is filterable and not the key field.
         Required.
        :paramtype parent_key_field_name: str
        :keyword source_context: Source context for the projections. Represents the cardinality at
         which the document will be split into multiple sub documents. Required.
        :paramtype source_context: str
        :keyword mappings: Mappings for the projection, or which source should be mapped to which field
         in the target index. Required.
        :paramtype mappings: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        """
        super().__init__(**kwargs)
        self.target_index_name = target_index_name
        self.parent_key_field_name = parent_key_field_name
        self.source_context = source_context
        self.mappings = mappings


class SearchIndexerIndexProjectionsParameters(_serialization.Model):
    """A dictionary of index projection-specific configuration properties. Each name is the name of a
    specific property. Each value must be of a primitive type.

    :ivar additional_properties: Unmatched properties from the message are deserialized to this
     collection.
    :vartype additional_properties: dict[str, any]
    :ivar projection_mode: Defines behavior of the index projections in relation to the rest of the
     indexer. Known values are: "skipIndexingParentDocuments" and "includeIndexingParentDocuments".
    :vartype projection_mode: str or ~azure.search.documents.indexes.models.IndexProjectionMode
    """

    _attribute_map = {
        "additional_properties": {"key": "", "type": "{object}"},
        "projection_mode": {"key": "projectionMode", "type": "str"},
    }

    def __init__(
        self,
        *,
        additional_properties: Optional[dict[str, Any]] = None,
        projection_mode: Optional[Union[str, "_models.IndexProjectionMode"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword additional_properties: Unmatched properties from the message are deserialized to this
         collection.
        :paramtype additional_properties: dict[str, any]
        :keyword projection_mode: Defines behavior of the index projections in relation to the rest of
         the indexer. Known values are: "skipIndexingParentDocuments" and
         "includeIndexingParentDocuments".
        :paramtype projection_mode: str or ~azure.search.documents.indexes.models.IndexProjectionMode
        """
        super().__init__(**kwargs)
        self.additional_properties = additional_properties
        self.projection_mode = projection_mode


class SearchIndexerKnowledgeStore(_serialization.Model):
    """Definition of additional projections to azure blob, table, or files, of enriched data.

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

    :ivar storage_connection_string: The connection string to the storage account projections will
     be stored in. Required.
    :vartype storage_connection_string: str
    :ivar projections: A list of additional projections to perform during indexing. Required.
    :vartype projections:
     list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreProjection]
    """

    _validation = {
        "storage_connection_string": {"required": True},
        "projections": {"required": True},
    }

    _attribute_map = {
        "storage_connection_string": {"key": "storageConnectionString", "type": "str"},
        "projections": {"key": "projections", "type": "[SearchIndexerKnowledgeStoreProjection]"},
    }

    def __init__(
        self,
        *,
        storage_connection_string: str,
        projections: list["_models.SearchIndexerKnowledgeStoreProjection"],
        **kwargs: Any
    ) -> None:
        """
        :keyword storage_connection_string: The connection string to the storage account projections
         will be stored in. Required.
        :paramtype storage_connection_string: str
        :keyword projections: A list of additional projections to perform during indexing. Required.
        :paramtype projections:
         list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreProjection]
        """
        super().__init__(**kwargs)
        self.storage_connection_string = storage_connection_string
        self.projections = projections


class SearchIndexerKnowledgeStoreProjectionSelector(_serialization.Model):  # pylint: disable=name-too-long
    """Abstract class to share properties between concrete selectors.

    :ivar reference_key_name: Name of reference key to different projection.
    :vartype reference_key_name: str
    :ivar generated_key_name: Name of generated key to store projection under.
    :vartype generated_key_name: str
    :ivar source: Source data to project.
    :vartype source: str
    :ivar source_context: Source context for complex projections.
    :vartype source_context: str
    :ivar inputs: Nested inputs for complex projections.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    """

    _attribute_map = {
        "reference_key_name": {"key": "referenceKeyName", "type": "str"},
        "generated_key_name": {"key": "generatedKeyName", "type": "str"},
        "source": {"key": "source", "type": "str"},
        "source_context": {"key": "sourceContext", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
    }

    def __init__(
        self,
        *,
        reference_key_name: Optional[str] = None,
        generated_key_name: Optional[str] = None,
        source: Optional[str] = None,
        source_context: Optional[str] = None,
        inputs: Optional[list["_models.InputFieldMappingEntry"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword reference_key_name: Name of reference key to different projection.
        :paramtype reference_key_name: str
        :keyword generated_key_name: Name of generated key to store projection under.
        :paramtype generated_key_name: str
        :keyword source: Source data to project.
        :paramtype source: str
        :keyword source_context: Source context for complex projections.
        :paramtype source_context: str
        :keyword inputs: Nested inputs for complex projections.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        """
        super().__init__(**kwargs)
        self.reference_key_name = reference_key_name
        self.generated_key_name = generated_key_name
        self.source = source
        self.source_context = source_context
        self.inputs = inputs


class SearchIndexerKnowledgeStoreBlobProjectionSelector(
    SearchIndexerKnowledgeStoreProjectionSelector
):  # pylint: disable=name-too-long
    """Abstract class to share properties between concrete selectors.

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

    :ivar reference_key_name: Name of reference key to different projection.
    :vartype reference_key_name: str
    :ivar generated_key_name: Name of generated key to store projection under.
    :vartype generated_key_name: str
    :ivar source: Source data to project.
    :vartype source: str
    :ivar source_context: Source context for complex projections.
    :vartype source_context: str
    :ivar inputs: Nested inputs for complex projections.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar storage_container: Blob container to store projections in. Required.
    :vartype storage_container: str
    """

    _validation = {
        "storage_container": {"required": True},
    }

    _attribute_map = {
        "reference_key_name": {"key": "referenceKeyName", "type": "str"},
        "generated_key_name": {"key": "generatedKeyName", "type": "str"},
        "source": {"key": "source", "type": "str"},
        "source_context": {"key": "sourceContext", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "storage_container": {"key": "storageContainer", "type": "str"},
    }

    def __init__(
        self,
        *,
        storage_container: str,
        reference_key_name: Optional[str] = None,
        generated_key_name: Optional[str] = None,
        source: Optional[str] = None,
        source_context: Optional[str] = None,
        inputs: Optional[list["_models.InputFieldMappingEntry"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword reference_key_name: Name of reference key to different projection.
        :paramtype reference_key_name: str
        :keyword generated_key_name: Name of generated key to store projection under.
        :paramtype generated_key_name: str
        :keyword source: Source data to project.
        :paramtype source: str
        :keyword source_context: Source context for complex projections.
        :paramtype source_context: str
        :keyword inputs: Nested inputs for complex projections.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword storage_container: Blob container to store projections in. Required.
        :paramtype storage_container: str
        """
        super().__init__(
            reference_key_name=reference_key_name,
            generated_key_name=generated_key_name,
            source=source,
            source_context=source_context,
            inputs=inputs,
            **kwargs
        )
        self.storage_container = storage_container


class SearchIndexerKnowledgeStoreFileProjectionSelector(
    SearchIndexerKnowledgeStoreBlobProjectionSelector
):  # pylint: disable=name-too-long
    """Projection definition for what data to store in Azure Files.

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

    :ivar reference_key_name: Name of reference key to different projection.
    :vartype reference_key_name: str
    :ivar generated_key_name: Name of generated key to store projection under.
    :vartype generated_key_name: str
    :ivar source: Source data to project.
    :vartype source: str
    :ivar source_context: Source context for complex projections.
    :vartype source_context: str
    :ivar inputs: Nested inputs for complex projections.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar storage_container: Blob container to store projections in. Required.
    :vartype storage_container: str
    """


class SearchIndexerKnowledgeStoreObjectProjectionSelector(
    SearchIndexerKnowledgeStoreBlobProjectionSelector
):  # pylint: disable=name-too-long
    """Projection definition for what data to store in Azure Blob.

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

    :ivar reference_key_name: Name of reference key to different projection.
    :vartype reference_key_name: str
    :ivar generated_key_name: Name of generated key to store projection under.
    :vartype generated_key_name: str
    :ivar source: Source data to project.
    :vartype source: str
    :ivar source_context: Source context for complex projections.
    :vartype source_context: str
    :ivar inputs: Nested inputs for complex projections.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar storage_container: Blob container to store projections in. Required.
    :vartype storage_container: str
    """


class SearchIndexerKnowledgeStoreParameters(_serialization.Model):
    """A dictionary of knowledge store-specific configuration properties. Each name is the name of a
    specific property. Each value must be of a primitive type.

    :ivar additional_properties: Unmatched properties from the message are deserialized to this
     collection.
    :vartype additional_properties: dict[str, any]
    :ivar synthesize_generated_key_name: Whether or not projections should synthesize a generated
     key name if one isn't already present.
    :vartype synthesize_generated_key_name: bool
    """

    _attribute_map = {
        "additional_properties": {"key": "", "type": "{object}"},
        "synthesize_generated_key_name": {"key": "synthesizeGeneratedKeyName", "type": "bool"},
    }

    def __init__(
        self,
        *,
        additional_properties: Optional[dict[str, Any]] = None,
        synthesize_generated_key_name: bool = False,
        **kwargs: Any
    ) -> None:
        """
        :keyword additional_properties: Unmatched properties from the message are deserialized to this
         collection.
        :paramtype additional_properties: dict[str, any]
        :keyword synthesize_generated_key_name: Whether or not projections should synthesize a
         generated key name if one isn't already present.
        :paramtype synthesize_generated_key_name: bool
        """
        super().__init__(**kwargs)
        self.additional_properties = additional_properties
        self.synthesize_generated_key_name = synthesize_generated_key_name


class SearchIndexerKnowledgeStoreProjection(_serialization.Model):
    """Container object for various projection selectors.

    :ivar tables: Projections to Azure Table storage.
    :vartype tables:
     list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreTableProjectionSelector]
    :ivar objects: Projections to Azure Blob storage.
    :vartype objects:
     list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreObjectProjectionSelector]
    :ivar files: Projections to Azure File storage.
    :vartype files:
     list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreFileProjectionSelector]
    """

    _attribute_map = {
        "tables": {"key": "tables", "type": "[SearchIndexerKnowledgeStoreTableProjectionSelector]"},
        "objects": {"key": "objects", "type": "[SearchIndexerKnowledgeStoreObjectProjectionSelector]"},
        "files": {"key": "files", "type": "[SearchIndexerKnowledgeStoreFileProjectionSelector]"},
    }

    def __init__(
        self,
        *,
        tables: Optional[list["_models.SearchIndexerKnowledgeStoreTableProjectionSelector"]] = None,
        objects: Optional[list["_models.SearchIndexerKnowledgeStoreObjectProjectionSelector"]] = None,
        files: Optional[list["_models.SearchIndexerKnowledgeStoreFileProjectionSelector"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword tables: Projections to Azure Table storage.
        :paramtype tables:
         list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreTableProjectionSelector]
        :keyword objects: Projections to Azure Blob storage.
        :paramtype objects:
         list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreObjectProjectionSelector]
        :keyword files: Projections to Azure File storage.
        :paramtype files:
         list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreFileProjectionSelector]
        """
        super().__init__(**kwargs)
        self.tables = tables
        self.objects = objects
        self.files = files


class SearchIndexerKnowledgeStoreTableProjectionSelector(
    SearchIndexerKnowledgeStoreProjectionSelector
):  # pylint: disable=name-too-long
    """Description for what data to store in Azure Tables.

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

    :ivar reference_key_name: Name of reference key to different projection.
    :vartype reference_key_name: str
    :ivar generated_key_name: Name of generated key to store projection under.
    :vartype generated_key_name: str
    :ivar source: Source data to project.
    :vartype source: str
    :ivar source_context: Source context for complex projections.
    :vartype source_context: str
    :ivar inputs: Nested inputs for complex projections.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar table_name: Name of the Azure table to store projected data in. Required.
    :vartype table_name: str
    """

    _validation = {
        "table_name": {"required": True},
    }

    _attribute_map = {
        "reference_key_name": {"key": "referenceKeyName", "type": "str"},
        "generated_key_name": {"key": "generatedKeyName", "type": "str"},
        "source": {"key": "source", "type": "str"},
        "source_context": {"key": "sourceContext", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "table_name": {"key": "tableName", "type": "str"},
    }

    def __init__(
        self,
        *,
        table_name: str,
        reference_key_name: Optional[str] = None,
        generated_key_name: Optional[str] = None,
        source: Optional[str] = None,
        source_context: Optional[str] = None,
        inputs: Optional[list["_models.InputFieldMappingEntry"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword reference_key_name: Name of reference key to different projection.
        :paramtype reference_key_name: str
        :keyword generated_key_name: Name of generated key to store projection under.
        :paramtype generated_key_name: str
        :keyword source: Source data to project.
        :paramtype source: str
        :keyword source_context: Source context for complex projections.
        :paramtype source_context: str
        :keyword inputs: Nested inputs for complex projections.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword table_name: Name of the Azure table to store projected data in. Required.
        :paramtype table_name: str
        """
        super().__init__(
            reference_key_name=reference_key_name,
            generated_key_name=generated_key_name,
            source=source,
            source_context=source_context,
            inputs=inputs,
            **kwargs
        )
        self.table_name = table_name


class SearchIndexerLimits(_serialization.Model):
    """SearchIndexerLimits.

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

    :ivar max_run_time: The maximum duration that the indexer is permitted to run for one
     execution.
    :vartype max_run_time: ~datetime.timedelta
    :ivar max_document_extraction_size: The maximum size of a document, in bytes, which will be
     considered valid for indexing.
    :vartype max_document_extraction_size: int
    :ivar max_document_content_characters_to_extract: The maximum number of characters that will be
     extracted from a document picked up for indexing.
    :vartype max_document_content_characters_to_extract: int
    """

    _validation = {
        "max_run_time": {"readonly": True},
        "max_document_extraction_size": {"readonly": True},
        "max_document_content_characters_to_extract": {"readonly": True},
    }

    _attribute_map = {
        "max_run_time": {"key": "maxRunTime", "type": "duration"},
        "max_document_extraction_size": {"key": "maxDocumentExtractionSize", "type": "int"},
        "max_document_content_characters_to_extract": {"key": "maxDocumentContentCharactersToExtract", "type": "int"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.max_run_time: Optional[datetime.timedelta] = None
        self.max_document_extraction_size: Optional[int] = None
        self.max_document_content_characters_to_extract: Optional[int] = None


class SearchIndexerSkillset(_serialization.Model):
    """A list of skills.

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

    :ivar name: The name of the skillset. Required.
    :vartype name: str
    :ivar description: The description of the skillset.
    :vartype description: str
    :ivar skills: A list of skills in the skillset. Required.
    :vartype skills: list[~azure.search.documents.indexes.models.SearchIndexerSkill]
    :ivar cognitive_services_account: Details about the Azure AI service to be used when running
     skills.
    :vartype cognitive_services_account:
     ~azure.search.documents.indexes.models.CognitiveServicesAccount
    :ivar knowledge_store: Definition of additional projections to Azure blob, table, or files, of
     enriched data.
    :vartype knowledge_store: ~azure.search.documents.indexes.models.SearchIndexerKnowledgeStore
    :ivar index_projection: Definition of additional projections to secondary search index(es).
    :vartype index_projection: ~azure.search.documents.indexes.models.SearchIndexerIndexProjection
    :ivar e_tag: The ETag of the skillset.
    :vartype e_tag: str
    :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault.
     This key is used to provide an additional level of encryption-at-rest for your skillset
     definition when you want full assurance that no one, not even Microsoft, can decrypt your
     skillset definition. Once you have encrypted your skillset definition, it will always remain
     encrypted. The search service will ignore attempts to set this property to null. You can change
     this property as needed if you want to rotate your encryption key; Your skillset definition
     will be unaffected. Encryption with customer-managed keys is not available for free search
     services, and is only available for paid services created on or after January 1, 2019.
    :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey
    """

    _validation = {
        "name": {"required": True},
        "skills": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "skills": {"key": "skills", "type": "[SearchIndexerSkill]"},
        "cognitive_services_account": {"key": "cognitiveServices", "type": "CognitiveServicesAccount"},
        "knowledge_store": {"key": "knowledgeStore", "type": "SearchIndexerKnowledgeStore"},
        "index_projection": {"key": "indexProjections", "type": "SearchIndexerIndexProjection"},
        "e_tag": {"key": "@odata\\.etag", "type": "str"},
        "encryption_key": {"key": "encryptionKey", "type": "SearchResourceEncryptionKey"},
    }

    def __init__(
        self,
        *,
        name: str,
        skills: list["_models.SearchIndexerSkill"],
        description: Optional[str] = None,
        cognitive_services_account: Optional["_models.CognitiveServicesAccount"] = None,
        knowledge_store: Optional["_models.SearchIndexerKnowledgeStore"] = None,
        index_projection: Optional["_models.SearchIndexerIndexProjection"] = None,
        e_tag: Optional[str] = None,
        encryption_key: Optional["_models.SearchResourceEncryptionKey"] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skillset. Required.
        :paramtype name: str
        :keyword description: The description of the skillset.
        :paramtype description: str
        :keyword skills: A list of skills in the skillset. Required.
        :paramtype skills: list[~azure.search.documents.indexes.models.SearchIndexerSkill]
        :keyword cognitive_services_account: Details about the Azure AI service to be used when running
         skills.
        :paramtype cognitive_services_account:
         ~azure.search.documents.indexes.models.CognitiveServicesAccount
        :keyword knowledge_store: Definition of additional projections to Azure blob, table, or files,
         of enriched data.
        :paramtype knowledge_store: ~azure.search.documents.indexes.models.SearchIndexerKnowledgeStore
        :keyword index_projection: Definition of additional projections to secondary search index(es).
        :paramtype index_projection:
         ~azure.search.documents.indexes.models.SearchIndexerIndexProjection
        :keyword e_tag: The ETag of the skillset.
        :paramtype e_tag: str
        :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault.
         This key is used to provide an additional level of encryption-at-rest for your skillset
         definition when you want full assurance that no one, not even Microsoft, can decrypt your
         skillset definition. Once you have encrypted your skillset definition, it will always remain
         encrypted. The search service will ignore attempts to set this property to null. You can change
         this property as needed if you want to rotate your encryption key; Your skillset definition
         will be unaffected. Encryption with customer-managed keys is not available for free search
         services, and is only available for paid services created on or after January 1, 2019.
        :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey
        """
        super().__init__(**kwargs)
        self.name = name
        self.description = description
        self.skills = skills
        self.cognitive_services_account = cognitive_services_account
        self.knowledge_store = knowledge_store
        self.index_projection = index_projection
        self.e_tag = e_tag
        self.encryption_key = encryption_key


class SearchIndexerStatus(_serialization.Model):
    """Represents the current status and execution history of an indexer.

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

    :ivar name: The name of the indexer. Required.
    :vartype name: str
    :ivar status: Overall indexer status. Required. Known values are: "unknown", "error", and
     "running".
    :vartype status: str or ~azure.search.documents.indexes.models.IndexerStatus
    :ivar last_result: The result of the most recent or an in-progress indexer execution.
    :vartype last_result: ~azure.search.documents.indexes.models.IndexerExecutionResult
    :ivar execution_history: History of the recent indexer executions, sorted in reverse
     chronological order. Required.
    :vartype execution_history: list[~azure.search.documents.indexes.models.IndexerExecutionResult]
    :ivar limits: The execution limits for the indexer. Required.
    :vartype limits: ~azure.search.documents.indexes.models.SearchIndexerLimits
    """

    _validation = {
        "name": {"required": True, "readonly": True},
        "status": {"required": True, "readonly": True},
        "last_result": {"readonly": True},
        "execution_history": {"required": True, "readonly": True},
        "limits": {"required": True, "readonly": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "status": {"key": "status", "type": "str"},
        "last_result": {"key": "lastResult", "type": "IndexerExecutionResult"},
        "execution_history": {"key": "executionHistory", "type": "[IndexerExecutionResult]"},
        "limits": {"key": "limits", "type": "SearchIndexerLimits"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.name: Optional[str] = None
        self.status: Optional[Union[str, "_models.IndexerStatus"]] = None
        self.last_result: Optional["_models.IndexerExecutionResult"] = None
        self.execution_history: Optional[list["_models.IndexerExecutionResult"]] = None
        self.limits: Optional["_models.SearchIndexerLimits"] = None


class SearchIndexerWarning(_serialization.Model):
    """Represents an item-level warning.

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

    :ivar key: The key of the item which generated a warning.
    :vartype key: str
    :ivar message: The message describing the warning that occurred while processing the item.
     Required.
    :vartype message: str
    :ivar name: The name of the source at which the warning originated. For example, this could
     refer to a particular skill in the attached skillset. This may not be always available.
    :vartype name: str
    :ivar details: Additional, verbose details about the warning to assist in debugging the
     indexer. This may not be always available.
    :vartype details: str
    :ivar documentation_link: A link to a troubleshooting guide for these classes of warnings. This
     may not be always available.
    :vartype documentation_link: str
    """

    _validation = {
        "key": {"readonly": True},
        "message": {"required": True, "readonly": True},
        "name": {"readonly": True},
        "details": {"readonly": True},
        "documentation_link": {"readonly": True},
    }

    _attribute_map = {
        "key": {"key": "key", "type": "str"},
        "message": {"key": "message", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "details": {"key": "details", "type": "str"},
        "documentation_link": {"key": "documentationLink", "type": "str"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.key: Optional[str] = None
        self.message: Optional[str] = None
        self.name: Optional[str] = None
        self.details: Optional[str] = None
        self.documentation_link: Optional[str] = None


class SearchResourceEncryptionKey(_serialization.Model):
    """A customer-managed encryption key in Azure Key Vault. Keys that you create and manage can be
    used to encrypt or decrypt data-at-rest, such as indexes and synonym maps.

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

    :ivar key_name: The name of your Azure Key Vault key to be used to encrypt your data at rest.
     Required.
    :vartype key_name: str
    :ivar key_version: The version of your Azure Key Vault key to be used to encrypt your data at
     rest. Required.
    :vartype key_version: str
    :ivar vault_uri: The URI of your Azure Key Vault, also referred to as DNS name, that contains
     the key to be used to encrypt your data at rest. An example URI might be
     ``https://my-keyvault-name.vault.azure.net``. Required.
    :vartype vault_uri: str
    :ivar access_credentials: Optional Azure Active Directory credentials used for accessing your
     Azure Key Vault. Not required if using managed identity instead.
    :vartype access_credentials:
     ~azure.search.documents.indexes.models.AzureActiveDirectoryApplicationCredentials
    """

    _validation = {
        "key_name": {"required": True},
        "key_version": {"required": True},
        "vault_uri": {"required": True},
    }

    _attribute_map = {
        "key_name": {"key": "keyVaultKeyName", "type": "str"},
        "key_version": {"key": "keyVaultKeyVersion", "type": "str"},
        "vault_uri": {"key": "keyVaultUri", "type": "str"},
        "access_credentials": {"key": "accessCredentials", "type": "AzureActiveDirectoryApplicationCredentials"},
    }

    def __init__(
        self,
        *,
        key_name: str,
        key_version: str,
        vault_uri: str,
        access_credentials: Optional["_models.AzureActiveDirectoryApplicationCredentials"] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword key_name: The name of your Azure Key Vault key to be used to encrypt your data at
         rest. Required.
        :paramtype key_name: str
        :keyword key_version: The version of your Azure Key Vault key to be used to encrypt your data
         at rest. Required.
        :paramtype key_version: str
        :keyword vault_uri: The URI of your Azure Key Vault, also referred to as DNS name, that
         contains the key to be used to encrypt your data at rest. An example URI might be
         ``https://my-keyvault-name.vault.azure.net``. Required.
        :paramtype vault_uri: str
        :keyword access_credentials: Optional Azure Active Directory credentials used for accessing
         your Azure Key Vault. Not required if using managed identity instead.
        :paramtype access_credentials:
         ~azure.search.documents.indexes.models.AzureActiveDirectoryApplicationCredentials
        """
        super().__init__(**kwargs)
        self.key_name = key_name
        self.key_version = key_version
        self.vault_uri = vault_uri
        self.access_credentials = access_credentials


class SearchServiceCounters(_serialization.Model):
    """Represents service-level resource counters and quotas.

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

    :ivar document_counter: Total number of documents across all indexes in the service. Required.
    :vartype document_counter: ~azure.search.documents.indexes.models.ResourceCounter
    :ivar index_counter: Total number of indexes. Required.
    :vartype index_counter: ~azure.search.documents.indexes.models.ResourceCounter
    :ivar indexer_counter: Total number of indexers. Required.
    :vartype indexer_counter: ~azure.search.documents.indexes.models.ResourceCounter
    :ivar data_source_counter: Total number of data sources. Required.
    :vartype data_source_counter: ~azure.search.documents.indexes.models.ResourceCounter
    :ivar storage_size_counter: Total size of used storage in bytes. Required.
    :vartype storage_size_counter: ~azure.search.documents.indexes.models.ResourceCounter
    :ivar synonym_map_counter: Total number of synonym maps. Required.
    :vartype synonym_map_counter: ~azure.search.documents.indexes.models.ResourceCounter
    :ivar skillset_counter: Total number of skillsets. Required.
    :vartype skillset_counter: ~azure.search.documents.indexes.models.ResourceCounter
    :ivar vector_index_size_counter: Total memory consumption of all vector indexes within the
     service, in bytes. Required.
    :vartype vector_index_size_counter: ~azure.search.documents.indexes.models.ResourceCounter
    """

    _validation = {
        "document_counter": {"required": True},
        "index_counter": {"required": True},
        "indexer_counter": {"required": True},
        "data_source_counter": {"required": True},
        "storage_size_counter": {"required": True},
        "synonym_map_counter": {"required": True},
        "skillset_counter": {"required": True},
        "vector_index_size_counter": {"required": True},
    }

    _attribute_map = {
        "document_counter": {"key": "documentCount", "type": "ResourceCounter"},
        "index_counter": {"key": "indexesCount", "type": "ResourceCounter"},
        "indexer_counter": {"key": "indexersCount", "type": "ResourceCounter"},
        "data_source_counter": {"key": "dataSourcesCount", "type": "ResourceCounter"},
        "storage_size_counter": {"key": "storageSize", "type": "ResourceCounter"},
        "synonym_map_counter": {"key": "synonymMaps", "type": "ResourceCounter"},
        "skillset_counter": {"key": "skillsetCount", "type": "ResourceCounter"},
        "vector_index_size_counter": {"key": "vectorIndexSize", "type": "ResourceCounter"},
    }

    def __init__(
        self,
        *,
        document_counter: "_models.ResourceCounter",
        index_counter: "_models.ResourceCounter",
        indexer_counter: "_models.ResourceCounter",
        data_source_counter: "_models.ResourceCounter",
        storage_size_counter: "_models.ResourceCounter",
        synonym_map_counter: "_models.ResourceCounter",
        skillset_counter: "_models.ResourceCounter",
        vector_index_size_counter: "_models.ResourceCounter",
        **kwargs: Any
    ) -> None:
        """
        :keyword document_counter: Total number of documents across all indexes in the service.
         Required.
        :paramtype document_counter: ~azure.search.documents.indexes.models.ResourceCounter
        :keyword index_counter: Total number of indexes. Required.
        :paramtype index_counter: ~azure.search.documents.indexes.models.ResourceCounter
        :keyword indexer_counter: Total number of indexers. Required.
        :paramtype indexer_counter: ~azure.search.documents.indexes.models.ResourceCounter
        :keyword data_source_counter: Total number of data sources. Required.
        :paramtype data_source_counter: ~azure.search.documents.indexes.models.ResourceCounter
        :keyword storage_size_counter: Total size of used storage in bytes. Required.
        :paramtype storage_size_counter: ~azure.search.documents.indexes.models.ResourceCounter
        :keyword synonym_map_counter: Total number of synonym maps. Required.
        :paramtype synonym_map_counter: ~azure.search.documents.indexes.models.ResourceCounter
        :keyword skillset_counter: Total number of skillsets. Required.
        :paramtype skillset_counter: ~azure.search.documents.indexes.models.ResourceCounter
        :keyword vector_index_size_counter: Total memory consumption of all vector indexes within the
         service, in bytes. Required.
        :paramtype vector_index_size_counter: ~azure.search.documents.indexes.models.ResourceCounter
        """
        super().__init__(**kwargs)
        self.document_counter = document_counter
        self.index_counter = index_counter
        self.indexer_counter = indexer_counter
        self.data_source_counter = data_source_counter
        self.storage_size_counter = storage_size_counter
        self.synonym_map_counter = synonym_map_counter
        self.skillset_counter = skillset_counter
        self.vector_index_size_counter = vector_index_size_counter


class SearchServiceLimits(_serialization.Model):
    """Represents various service level limits.

    :ivar max_fields_per_index: The maximum allowed fields per index.
    :vartype max_fields_per_index: int
    :ivar max_field_nesting_depth_per_index: The maximum depth which you can nest sub-fields in an
     index, including the top-level complex field. For example, a/b/c has a nesting depth of 3.
    :vartype max_field_nesting_depth_per_index: int
    :ivar max_complex_collection_fields_per_index: The maximum number of fields of type
     Collection(Edm.ComplexType) allowed in an index.
    :vartype max_complex_collection_fields_per_index: int
    :ivar max_complex_objects_in_collections_per_document: The maximum number of objects in complex
     collections allowed per document.
    :vartype max_complex_objects_in_collections_per_document: int
    :ivar max_storage_per_index_in_bytes: The maximum amount of storage in bytes allowed per index.
    :vartype max_storage_per_index_in_bytes: int
    """

    _attribute_map = {
        "max_fields_per_index": {"key": "maxFieldsPerIndex", "type": "int"},
        "max_field_nesting_depth_per_index": {"key": "maxFieldNestingDepthPerIndex", "type": "int"},
        "max_complex_collection_fields_per_index": {"key": "maxComplexCollectionFieldsPerIndex", "type": "int"},
        "max_complex_objects_in_collections_per_document": {
            "key": "maxComplexObjectsInCollectionsPerDocument",
            "type": "int",
        },
        "max_storage_per_index_in_bytes": {"key": "maxStoragePerIndex", "type": "int"},
    }

    def __init__(
        self,
        *,
        max_fields_per_index: Optional[int] = None,
        max_field_nesting_depth_per_index: Optional[int] = None,
        max_complex_collection_fields_per_index: Optional[int] = None,
        max_complex_objects_in_collections_per_document: Optional[int] = None,
        max_storage_per_index_in_bytes: Optional[int] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword max_fields_per_index: The maximum allowed fields per index.
        :paramtype max_fields_per_index: int
        :keyword max_field_nesting_depth_per_index: The maximum depth which you can nest sub-fields in
         an index, including the top-level complex field. For example, a/b/c has a nesting depth of 3.
        :paramtype max_field_nesting_depth_per_index: int
        :keyword max_complex_collection_fields_per_index: The maximum number of fields of type
         Collection(Edm.ComplexType) allowed in an index.
        :paramtype max_complex_collection_fields_per_index: int
        :keyword max_complex_objects_in_collections_per_document: The maximum number of objects in
         complex collections allowed per document.
        :paramtype max_complex_objects_in_collections_per_document: int
        :keyword max_storage_per_index_in_bytes: The maximum amount of storage in bytes allowed per
         index.
        :paramtype max_storage_per_index_in_bytes: int
        """
        super().__init__(**kwargs)
        self.max_fields_per_index = max_fields_per_index
        self.max_field_nesting_depth_per_index = max_field_nesting_depth_per_index
        self.max_complex_collection_fields_per_index = max_complex_collection_fields_per_index
        self.max_complex_objects_in_collections_per_document = max_complex_objects_in_collections_per_document
        self.max_storage_per_index_in_bytes = max_storage_per_index_in_bytes


class SearchServiceStatistics(_serialization.Model):
    """Response from a get service statistics request. If successful, it includes service level
    counters and limits.

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

    :ivar counters: Service level resource counters. Required.
    :vartype counters: ~azure.search.documents.indexes.models.SearchServiceCounters
    :ivar limits: Service level general limits. Required.
    :vartype limits: ~azure.search.documents.indexes.models.SearchServiceLimits
    """

    _validation = {
        "counters": {"required": True},
        "limits": {"required": True},
    }

    _attribute_map = {
        "counters": {"key": "counters", "type": "SearchServiceCounters"},
        "limits": {"key": "limits", "type": "SearchServiceLimits"},
    }

    def __init__(
        self, *, counters: "_models.SearchServiceCounters", limits: "_models.SearchServiceLimits", **kwargs: Any
    ) -> None:
        """
        :keyword counters: Service level resource counters. Required.
        :paramtype counters: ~azure.search.documents.indexes.models.SearchServiceCounters
        :keyword limits: Service level general limits. Required.
        :paramtype limits: ~azure.search.documents.indexes.models.SearchServiceLimits
        """
        super().__init__(**kwargs)
        self.counters = counters
        self.limits = limits


class SearchSuggester(_serialization.Model):
    """Defines how the Suggest API should apply to a group of fields in the index.

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

    :ivar name: The name of the suggester. Required.
    :vartype name: str
    :ivar search_mode: A value indicating the capabilities of the suggester. Required. Default
     value is "analyzingInfixMatching".
    :vartype search_mode: str
    :ivar source_fields: The list of field names to which the suggester applies. Each field must be
     searchable. Required.
    :vartype source_fields: list[str]
    """

    _validation = {
        "name": {"required": True},
        "search_mode": {"required": True, "constant": True},
        "source_fields": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "search_mode": {"key": "searchMode", "type": "str"},
        "source_fields": {"key": "sourceFields", "type": "[str]"},
    }

    search_mode = "analyzingInfixMatching"

    def __init__(self, *, name: str, source_fields: list[str], **kwargs: Any) -> None:
        """
        :keyword name: The name of the suggester. Required.
        :paramtype name: str
        :keyword source_fields: The list of field names to which the suggester applies. Each field must
         be searchable. Required.
        :paramtype source_fields: list[str]
        """
        super().__init__(**kwargs)
        self.name = name
        self.source_fields = source_fields


class SemanticConfiguration(_serialization.Model):
    """Defines a specific configuration to be used in the context of semantic capabilities.

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

    :ivar name: The name of the semantic configuration. Required.
    :vartype name: str
    :ivar prioritized_fields: Describes the title, content, and keyword fields to be used for
     semantic ranking, captions, highlights, and answers. At least one of the three sub properties
     (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. Required.
    :vartype prioritized_fields: ~azure.search.documents.indexes.models.SemanticPrioritizedFields
    :ivar ranking_order: Specifies the score type to be used for the sort order of the search
     results. Known values are: "BoostedRerankerScore" and "RerankerScore".
    :vartype ranking_order: str or ~azure.search.documents.indexes.models.RankingOrder
    """

    _validation = {
        "name": {"required": True},
        "prioritized_fields": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "prioritized_fields": {"key": "prioritizedFields", "type": "SemanticPrioritizedFields"},
        "ranking_order": {"key": "rankingOrder", "type": "str"},
    }

    def __init__(
        self,
        *,
        name: str,
        prioritized_fields: "_models.SemanticPrioritizedFields",
        ranking_order: Optional[Union[str, "_models.RankingOrder"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the semantic configuration. Required.
        :paramtype name: str
        :keyword prioritized_fields: Describes the title, content, and keyword fields to be used for
         semantic ranking, captions, highlights, and answers. At least one of the three sub properties
         (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. Required.
        :paramtype prioritized_fields: ~azure.search.documents.indexes.models.SemanticPrioritizedFields
        :keyword ranking_order: Specifies the score type to be used for the sort order of the search
         results. Known values are: "BoostedRerankerScore" and "RerankerScore".
        :paramtype ranking_order: str or ~azure.search.documents.indexes.models.RankingOrder
        """
        super().__init__(**kwargs)
        self.name = name
        self.prioritized_fields = prioritized_fields
        self.ranking_order = ranking_order


class SemanticField(_serialization.Model):
    """A field that is used as part of the semantic configuration.

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

    :ivar field_name: Required.
    :vartype field_name: str
    """

    _validation = {
        "field_name": {"required": True},
    }

    _attribute_map = {
        "field_name": {"key": "fieldName", "type": "str"},
    }

    def __init__(self, *, field_name: str, **kwargs: Any) -> None:
        """
        :keyword field_name: Required.
        :paramtype field_name: str
        """
        super().__init__(**kwargs)
        self.field_name = field_name


class SemanticPrioritizedFields(_serialization.Model):
    """Describes the title, content, and keywords fields to be used for semantic ranking, captions,
    highlights, and answers.

    :ivar title_field: Defines the title field to be used for semantic ranking, captions,
     highlights, and answers. If you don't have a title field in your index, leave this blank.
    :vartype title_field: ~azure.search.documents.indexes.models.SemanticField
    :ivar content_fields: Defines the content fields to be used for semantic ranking, captions,
     highlights, and answers. For the best result, the selected fields should contain text in
     natural language form. The order of the fields in the array represents their priority. Fields
     with lower priority may get truncated if the content is long.
    :vartype content_fields: list[~azure.search.documents.indexes.models.SemanticField]
    :ivar keywords_fields: Defines the keyword fields to be used for semantic ranking, captions,
     highlights, and answers. For the best result, the selected fields should contain a list of
     keywords. The order of the fields in the array represents their priority. Fields with lower
     priority may get truncated if the content is long.
    :vartype keywords_fields: list[~azure.search.documents.indexes.models.SemanticField]
    """

    _attribute_map = {
        "title_field": {"key": "titleField", "type": "SemanticField"},
        "content_fields": {"key": "prioritizedContentFields", "type": "[SemanticField]"},
        "keywords_fields": {"key": "prioritizedKeywordsFields", "type": "[SemanticField]"},
    }

    def __init__(
        self,
        *,
        title_field: Optional["_models.SemanticField"] = None,
        content_fields: Optional[list["_models.SemanticField"]] = None,
        keywords_fields: Optional[list["_models.SemanticField"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword title_field: Defines the title field to be used for semantic ranking, captions,
         highlights, and answers. If you don't have a title field in your index, leave this blank.
        :paramtype title_field: ~azure.search.documents.indexes.models.SemanticField
        :keyword content_fields: Defines the content fields to be used for semantic ranking, captions,
         highlights, and answers. For the best result, the selected fields should contain text in
         natural language form. The order of the fields in the array represents their priority. Fields
         with lower priority may get truncated if the content is long.
        :paramtype content_fields: list[~azure.search.documents.indexes.models.SemanticField]
        :keyword keywords_fields: Defines the keyword fields to be used for semantic ranking, captions,
         highlights, and answers. For the best result, the selected fields should contain a list of
         keywords. The order of the fields in the array represents their priority. Fields with lower
         priority may get truncated if the content is long.
        :paramtype keywords_fields: list[~azure.search.documents.indexes.models.SemanticField]
        """
        super().__init__(**kwargs)
        self.title_field = title_field
        self.content_fields = content_fields
        self.keywords_fields = keywords_fields


class SemanticSearch(_serialization.Model):
    """Defines parameters for a search index that influence semantic capabilities.

    :ivar default_configuration_name: Allows you to set the name of a default semantic
     configuration in your index, making it optional to pass it on as a query parameter every time.
    :vartype default_configuration_name: str
    :ivar configurations: The semantic configurations for the index.
    :vartype configurations: list[~azure.search.documents.indexes.models.SemanticConfiguration]
    """

    _attribute_map = {
        "default_configuration_name": {"key": "defaultConfiguration", "type": "str"},
        "configurations": {"key": "configurations", "type": "[SemanticConfiguration]"},
    }

    def __init__(
        self,
        *,
        default_configuration_name: Optional[str] = None,
        configurations: Optional[list["_models.SemanticConfiguration"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword default_configuration_name: Allows you to set the name of a default semantic
         configuration in your index, making it optional to pass it on as a query parameter every time.
        :paramtype default_configuration_name: str
        :keyword configurations: The semantic configurations for the index.
        :paramtype configurations: list[~azure.search.documents.indexes.models.SemanticConfiguration]
        """
        super().__init__(**kwargs)
        self.default_configuration_name = default_configuration_name
        self.configurations = configurations


class SentimentSkill(SearchIndexerSkill):
    """This skill is deprecated. Use the V3.SentimentSkill instead.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar default_language_code: A value indicating which language code to use. Default is ``en``.
     Known values are: "da", "nl", "en", "fi", "fr", "de", "el", "it", "no", "pl", "pt-PT", "ru",
     "es", "sv", and "tr".
    :vartype default_language_code: str or
     ~azure.search.documents.indexes.models.SentimentSkillLanguage
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "default_language_code": {"key": "defaultLanguageCode", "type": "str"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        default_language_code: Optional[Union[str, "_models.SentimentSkillLanguage"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword default_language_code: A value indicating which language code to use. Default is
         ``en``. Known values are: "da", "nl", "en", "fi", "fr", "de", "el", "it", "no", "pl", "pt-PT",
         "ru", "es", "sv", and "tr".
        :paramtype default_language_code: str or
         ~azure.search.documents.indexes.models.SentimentSkillLanguage
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Text.SentimentSkill"
        self.default_language_code = default_language_code


class SentimentSkillV3(SearchIndexerSkill):
    """Using the Text Analytics API, evaluates unstructured text and for each record, provides
    sentiment labels (such as "negative", "neutral" and "positive") based on the highest confidence
    score found by the service at a sentence and document-level.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar default_language_code: A value indicating which language code to use. Default is ``en``.
    :vartype default_language_code: str
    :ivar include_opinion_mining: If set to true, the skill output will include information from
     Text Analytics for opinion mining, namely targets (nouns or verbs) and their associated
     assessment (adjective) in the text. Default is false.
    :vartype include_opinion_mining: bool
    :ivar model_version: The version of the model to use when calling the Text Analytics service.
     It will default to the latest available when not specified. We recommend you do not specify
     this value unless absolutely necessary.
    :vartype model_version: str
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "default_language_code": {"key": "defaultLanguageCode", "type": "str"},
        "include_opinion_mining": {"key": "includeOpinionMining", "type": "bool"},
        "model_version": {"key": "modelVersion", "type": "str"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        default_language_code: Optional[str] = None,
        include_opinion_mining: bool = False,
        model_version: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword default_language_code: A value indicating which language code to use. Default is
         ``en``.
        :paramtype default_language_code: str
        :keyword include_opinion_mining: If set to true, the skill output will include information from
         Text Analytics for opinion mining, namely targets (nouns or verbs) and their associated
         assessment (adjective) in the text. Default is false.
        :paramtype include_opinion_mining: bool
        :keyword model_version: The version of the model to use when calling the Text Analytics
         service. It will default to the latest available when not specified. We recommend you do not
         specify this value unless absolutely necessary.
        :paramtype model_version: str
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Text.V3.SentimentSkill"
        self.default_language_code = default_language_code
        self.include_opinion_mining = include_opinion_mining
        self.model_version = model_version


class ShaperSkill(SearchIndexerSkill):
    """A skill for reshaping the outputs. It creates a complex type to support composite fields (also
    known as multipart fields).

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Util.ShaperSkill"


class ShingleTokenFilter(TokenFilter):
    """Creates combinations of tokens as a single token. This token filter is implemented using Apache
    Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar max_shingle_size: The maximum shingle size. Default and minimum value is 2.
    :vartype max_shingle_size: int
    :ivar min_shingle_size: The minimum shingle size. Default and minimum value is 2. Must be less
     than the value of maxShingleSize.
    :vartype min_shingle_size: int
    :ivar output_unigrams: A value indicating whether the output stream will contain the input
     tokens (unigrams) as well as shingles. Default is true.
    :vartype output_unigrams: bool
    :ivar output_unigrams_if_no_shingles: A value indicating whether to output unigrams for those
     times when no shingles are available. This property takes precedence when outputUnigrams is set
     to false. Default is false.
    :vartype output_unigrams_if_no_shingles: bool
    :ivar token_separator: The string to use when joining adjacent tokens to form a shingle.
     Default is a single space (" ").
    :vartype token_separator: str
    :ivar filter_token: The string to insert for each position at which there is no token. Default
     is an underscore ("_").
    :vartype filter_token: str
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "max_shingle_size": {"minimum": 2},
        "min_shingle_size": {"minimum": 2},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "max_shingle_size": {"key": "maxShingleSize", "type": "int"},
        "min_shingle_size": {"key": "minShingleSize", "type": "int"},
        "output_unigrams": {"key": "outputUnigrams", "type": "bool"},
        "output_unigrams_if_no_shingles": {"key": "outputUnigramsIfNoShingles", "type": "bool"},
        "token_separator": {"key": "tokenSeparator", "type": "str"},
        "filter_token": {"key": "filterToken", "type": "str"},
    }

    def __init__(
        self,
        *,
        name: str,
        max_shingle_size: int = 2,
        min_shingle_size: int = 2,
        output_unigrams: bool = True,
        output_unigrams_if_no_shingles: bool = False,
        token_separator: str = " ",
        filter_token: str = "_",
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword max_shingle_size: The maximum shingle size. Default and minimum value is 2.
        :paramtype max_shingle_size: int
        :keyword min_shingle_size: The minimum shingle size. Default and minimum value is 2. Must be
         less than the value of maxShingleSize.
        :paramtype min_shingle_size: int
        :keyword output_unigrams: A value indicating whether the output stream will contain the input
         tokens (unigrams) as well as shingles. Default is true.
        :paramtype output_unigrams: bool
        :keyword output_unigrams_if_no_shingles: A value indicating whether to output unigrams for
         those times when no shingles are available. This property takes precedence when outputUnigrams
         is set to false. Default is false.
        :paramtype output_unigrams_if_no_shingles: bool
        :keyword token_separator: The string to use when joining adjacent tokens to form a shingle.
         Default is a single space (" ").
        :paramtype token_separator: str
        :keyword filter_token: The string to insert for each position at which there is no token.
         Default is an underscore ("_").
        :paramtype filter_token: str
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.ShingleTokenFilter"
        self.max_shingle_size = max_shingle_size
        self.min_shingle_size = min_shingle_size
        self.output_unigrams = output_unigrams
        self.output_unigrams_if_no_shingles = output_unigrams_if_no_shingles
        self.token_separator = token_separator
        self.filter_token = filter_token


class SnowballTokenFilter(TokenFilter):
    """A filter that stems words using a Snowball-generated stemmer. This token filter is implemented
    using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar language: The language to use. Required. Known values are: "armenian", "basque",
     "catalan", "danish", "dutch", "english", "finnish", "french", "german", "german2", "hungarian",
     "italian", "kp", "lovins", "norwegian", "porter", "portuguese", "romanian", "russian",
     "spanish", "swedish", and "turkish".
    :vartype language: str or ~azure.search.documents.indexes.models.SnowballTokenFilterLanguage
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "language": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "language": {"key": "language", "type": "str"},
    }

    def __init__(
        self, *, name: str, language: Union[str, "_models.SnowballTokenFilterLanguage"], **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword language: The language to use. Required. Known values are: "armenian", "basque",
         "catalan", "danish", "dutch", "english", "finnish", "french", "german", "german2", "hungarian",
         "italian", "kp", "lovins", "norwegian", "porter", "portuguese", "romanian", "russian",
         "spanish", "swedish", and "turkish".
        :paramtype language: str or ~azure.search.documents.indexes.models.SnowballTokenFilterLanguage
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.SnowballTokenFilter"
        self.language = language


class SoftDeleteColumnDeletionDetectionPolicy(DataDeletionDetectionPolicy):
    """Defines a data deletion detection policy that implements a soft-deletion strategy. It
    determines whether an item should be deleted based on the value of a designated 'soft delete'
    column.

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

    :ivar odata_type: A URI fragment specifying the type of data deletion detection policy.
     Required.
    :vartype odata_type: str
    :ivar soft_delete_column_name: The name of the column to use for soft-deletion detection.
    :vartype soft_delete_column_name: str
    :ivar soft_delete_marker_value: The marker value that identifies an item as deleted.
    :vartype soft_delete_marker_value: str
    """

    _validation = {
        "odata_type": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "soft_delete_column_name": {"key": "softDeleteColumnName", "type": "str"},
        "soft_delete_marker_value": {"key": "softDeleteMarkerValue", "type": "str"},
    }

    def __init__(
        self,
        *,
        soft_delete_column_name: Optional[str] = None,
        soft_delete_marker_value: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword soft_delete_column_name: The name of the column to use for soft-deletion detection.
        :paramtype soft_delete_column_name: str
        :keyword soft_delete_marker_value: The marker value that identifies an item as deleted.
        :paramtype soft_delete_marker_value: str
        """
        super().__init__(**kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy"
        self.soft_delete_column_name = soft_delete_column_name
        self.soft_delete_marker_value = soft_delete_marker_value


class SplitSkill(SearchIndexerSkill):
    """A skill to split a string into chunks of text.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar default_language_code: A value indicating which language code to use. Default is ``en``.
     Known values are: "am", "bs", "cs", "da", "de", "en", "es", "et", "fi", "fr", "he", "hi", "hr",
     "hu", "id", "is", "it", "ja", "ko", "lv", "nb", "nl", "pl", "pt", "pt-br", "ru", "sk", "sl",
     "sr", "sv", "tr", "ur", "zh", and "is".
    :vartype default_language_code: str or
     ~azure.search.documents.indexes.models.SplitSkillLanguage
    :ivar text_split_mode: A value indicating which split mode to perform. Known values are:
     "pages" and "sentences".
    :vartype text_split_mode: str or ~azure.search.documents.indexes.models.TextSplitMode
    :ivar maximum_page_length: The desired maximum page length. Default is 10000.
    :vartype maximum_page_length: int
    :ivar page_overlap_length: Only applicable when textSplitMode is set to 'pages'. If specified,
     n+1th chunk will start with this number of characters/tokens from the end of the nth chunk.
    :vartype page_overlap_length: int
    :ivar maximum_pages_to_take: Only applicable when textSplitMode is set to 'pages'. If
     specified, the SplitSkill will discontinue splitting after processing the first
     'maximumPagesToTake' pages, in order to improve performance when only a few initial pages are
     needed from each document.
    :vartype maximum_pages_to_take: int
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "default_language_code": {"key": "defaultLanguageCode", "type": "str"},
        "text_split_mode": {"key": "textSplitMode", "type": "str"},
        "maximum_page_length": {"key": "maximumPageLength", "type": "int"},
        "page_overlap_length": {"key": "pageOverlapLength", "type": "int"},
        "maximum_pages_to_take": {"key": "maximumPagesToTake", "type": "int"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        default_language_code: Optional[Union[str, "_models.SplitSkillLanguage"]] = None,
        text_split_mode: Optional[Union[str, "_models.TextSplitMode"]] = None,
        maximum_page_length: Optional[int] = None,
        page_overlap_length: Optional[int] = None,
        maximum_pages_to_take: Optional[int] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword default_language_code: A value indicating which language code to use. Default is
         ``en``. Known values are: "am", "bs", "cs", "da", "de", "en", "es", "et", "fi", "fr", "he",
         "hi", "hr", "hu", "id", "is", "it", "ja", "ko", "lv", "nb", "nl", "pl", "pt", "pt-br", "ru",
         "sk", "sl", "sr", "sv", "tr", "ur", "zh", and "is".
        :paramtype default_language_code: str or
         ~azure.search.documents.indexes.models.SplitSkillLanguage
        :keyword text_split_mode: A value indicating which split mode to perform. Known values are:
         "pages" and "sentences".
        :paramtype text_split_mode: str or ~azure.search.documents.indexes.models.TextSplitMode
        :keyword maximum_page_length: The desired maximum page length. Default is 10000.
        :paramtype maximum_page_length: int
        :keyword page_overlap_length: Only applicable when textSplitMode is set to 'pages'. If
         specified, n+1th chunk will start with this number of characters/tokens from the end of the nth
         chunk.
        :paramtype page_overlap_length: int
        :keyword maximum_pages_to_take: Only applicable when textSplitMode is set to 'pages'. If
         specified, the SplitSkill will discontinue splitting after processing the first
         'maximumPagesToTake' pages, in order to improve performance when only a few initial pages are
         needed from each document.
        :paramtype maximum_pages_to_take: int
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Text.SplitSkill"
        self.default_language_code = default_language_code
        self.text_split_mode = text_split_mode
        self.maximum_page_length = maximum_page_length
        self.page_overlap_length = page_overlap_length
        self.maximum_pages_to_take = maximum_pages_to_take


class SqlIntegratedChangeTrackingPolicy(DataChangeDetectionPolicy):
    """Defines a data change detection policy that captures changes using the Integrated Change
    Tracking feature of Azure SQL Database.

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

    :ivar odata_type: A URI fragment specifying the type of data change detection policy. Required.
    :vartype odata_type: str
    """

    _validation = {
        "odata_type": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
    }

    def __init__(self, **kwargs: Any) -> None:
        """ """
        super().__init__(**kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.SqlIntegratedChangeTrackingPolicy"


class StemmerOverrideTokenFilter(TokenFilter):
    """Provides the ability to override other stemming filters with custom dictionary-based stemming.
    Any dictionary-stemmed terms will be marked as keywords so that they will not be stemmed with
    stemmers down the chain. Must be placed before any stemming filters. This token filter is
    implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar rules: A list of stemming rules in the following format: "word => stem", for example:
     "ran => run". Required.
    :vartype rules: list[str]
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "rules": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "rules": {"key": "rules", "type": "[str]"},
    }

    def __init__(self, *, name: str, rules: list[str], **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword rules: A list of stemming rules in the following format: "word => stem", for example:
         "ran => run". Required.
        :paramtype rules: list[str]
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.StemmerOverrideTokenFilter"
        self.rules = rules


class StemmerTokenFilter(TokenFilter):
    """Language specific stemming filter. This token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar language: The language to use. Required. Known values are: "arabic", "armenian",
     "basque", "brazilian", "bulgarian", "catalan", "czech", "danish", "dutch", "dutchKp",
     "english", "lightEnglish", "minimalEnglish", "possessiveEnglish", "porter2", "lovins",
     "finnish", "lightFinnish", "french", "lightFrench", "minimalFrench", "galician",
     "minimalGalician", "german", "german2", "lightGerman", "minimalGerman", "greek", "hindi",
     "hungarian", "lightHungarian", "indonesian", "irish", "italian", "lightItalian", "sorani",
     "latvian", "norwegian", "lightNorwegian", "minimalNorwegian", "lightNynorsk", "minimalNynorsk",
     "portuguese", "lightPortuguese", "minimalPortuguese", "portugueseRslp", "romanian", "russian",
     "lightRussian", "spanish", "lightSpanish", "swedish", "lightSwedish", and "turkish".
    :vartype language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "language": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "language": {"key": "language", "type": "str"},
    }

    def __init__(self, *, name: str, language: Union[str, "_models.StemmerTokenFilterLanguage"], **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword language: The language to use. Required. Known values are: "arabic", "armenian",
         "basque", "brazilian", "bulgarian", "catalan", "czech", "danish", "dutch", "dutchKp",
         "english", "lightEnglish", "minimalEnglish", "possessiveEnglish", "porter2", "lovins",
         "finnish", "lightFinnish", "french", "lightFrench", "minimalFrench", "galician",
         "minimalGalician", "german", "german2", "lightGerman", "minimalGerman", "greek", "hindi",
         "hungarian", "lightHungarian", "indonesian", "irish", "italian", "lightItalian", "sorani",
         "latvian", "norwegian", "lightNorwegian", "minimalNorwegian", "lightNynorsk", "minimalNynorsk",
         "portuguese", "lightPortuguese", "minimalPortuguese", "portugueseRslp", "romanian", "russian",
         "lightRussian", "spanish", "lightSpanish", "swedish", "lightSwedish", and "turkish".
        :paramtype language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.StemmerTokenFilter"
        self.language = language


class StopAnalyzer(LexicalAnalyzer):
    """Divides text at non-letters; Applies the lowercase and stopword token filters. This analyzer is
    implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of analyzer. Required.
    :vartype odata_type: str
    :ivar name: The name of the analyzer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar stopwords: A list of stopwords.
    :vartype stopwords: list[str]
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "stopwords": {"key": "stopwords", "type": "[str]"},
    }

    def __init__(self, *, name: str, stopwords: Optional[list[str]] = None, **kwargs: Any) -> None:
        """
        :keyword name: The name of the analyzer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword stopwords: A list of stopwords.
        :paramtype stopwords: list[str]
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.StopAnalyzer"
        self.stopwords = stopwords


class StopwordsTokenFilter(TokenFilter):
    """Removes stop words from a token stream. This token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar stopwords: The list of stopwords. This property and the stopwords list property cannot
     both be set.
    :vartype stopwords: list[str]
    :ivar stopwords_list: A predefined list of stopwords to use. This property and the stopwords
     property cannot both be set. Default is English. Known values are: "arabic", "armenian",
     "basque", "brazilian", "bulgarian", "catalan", "czech", "danish", "dutch", "english",
     "finnish", "french", "galician", "german", "greek", "hindi", "hungarian", "indonesian",
     "irish", "italian", "latvian", "norwegian", "persian", "portuguese", "romanian", "russian",
     "sorani", "spanish", "swedish", "thai", and "turkish".
    :vartype stopwords_list: str or ~azure.search.documents.indexes.models.StopwordsList
    :ivar ignore_case: A value indicating whether to ignore case. If true, all words are converted
     to lower case first. Default is false.
    :vartype ignore_case: bool
    :ivar remove_trailing_stop_words: A value indicating whether to ignore the last search term if
     it's a stop word. Default is true.
    :vartype remove_trailing_stop_words: bool
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "stopwords": {"key": "stopwords", "type": "[str]"},
        "stopwords_list": {"key": "stopwordsList", "type": "str"},
        "ignore_case": {"key": "ignoreCase", "type": "bool"},
        "remove_trailing_stop_words": {"key": "removeTrailing", "type": "bool"},
    }

    def __init__(
        self,
        *,
        name: str,
        stopwords: Optional[list[str]] = None,
        stopwords_list: Optional[Union[str, "_models.StopwordsList"]] = None,
        ignore_case: bool = False,
        remove_trailing_stop_words: bool = True,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword stopwords: The list of stopwords. This property and the stopwords list property cannot
         both be set.
        :paramtype stopwords: list[str]
        :keyword stopwords_list: A predefined list of stopwords to use. This property and the stopwords
         property cannot both be set. Default is English. Known values are: "arabic", "armenian",
         "basque", "brazilian", "bulgarian", "catalan", "czech", "danish", "dutch", "english",
         "finnish", "french", "galician", "german", "greek", "hindi", "hungarian", "indonesian",
         "irish", "italian", "latvian", "norwegian", "persian", "portuguese", "romanian", "russian",
         "sorani", "spanish", "swedish", "thai", and "turkish".
        :paramtype stopwords_list: str or ~azure.search.documents.indexes.models.StopwordsList
        :keyword ignore_case: A value indicating whether to ignore case. If true, all words are
         converted to lower case first. Default is false.
        :paramtype ignore_case: bool
        :keyword remove_trailing_stop_words: A value indicating whether to ignore the last search term
         if it's a stop word. Default is true.
        :paramtype remove_trailing_stop_words: bool
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.StopwordsTokenFilter"
        self.stopwords = stopwords
        self.stopwords_list = stopwords_list
        self.ignore_case = ignore_case
        self.remove_trailing_stop_words = remove_trailing_stop_words


class SynonymMap(_serialization.Model):
    """Represents a synonym map definition.

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

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

    :ivar name: The name of the synonym map. Required.
    :vartype name: str
    :ivar format: The format of the synonym map. Only the 'solr' format is currently supported.
     Required. Default value is "solr".
    :vartype format: str
    :ivar synonyms: A series of synonym rules in the specified synonym map format. The rules must
     be separated by newlines. Required.
    :vartype synonyms: str
    :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault.
     This key is used to provide an additional level of encryption-at-rest for your data when you
     want full assurance that no one, not even Microsoft, can decrypt your data. Once you have
     encrypted your data, it will always remain encrypted. The search service will ignore attempts
     to set this property to null. You can change this property as needed if you want to rotate your
     encryption key; Your data will be unaffected. Encryption with customer-managed keys is not
     available for free search services, and is only available for paid services created on or after
     January 1, 2019.
    :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey
    :ivar e_tag: The ETag of the synonym map.
    :vartype e_tag: str
    """

    _validation = {
        "name": {"required": True},
        "format": {"required": True, "constant": True},
        "synonyms": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "format": {"key": "format", "type": "str"},
        "synonyms": {"key": "synonyms", "type": "str"},
        "encryption_key": {"key": "encryptionKey", "type": "SearchResourceEncryptionKey"},
        "e_tag": {"key": "@odata\\.etag", "type": "str"},
    }

    format = "solr"

    def __init__(
        self,
        *,
        name: str,
        synonyms: str,
        encryption_key: Optional["_models.SearchResourceEncryptionKey"] = None,
        e_tag: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the synonym map. Required.
        :paramtype name: str
        :keyword synonyms: A series of synonym rules in the specified synonym map format. The rules
         must be separated by newlines. Required.
        :paramtype synonyms: str
        :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault.
         This key is used to provide an additional level of encryption-at-rest for your data when you
         want full assurance that no one, not even Microsoft, can decrypt your data. Once you have
         encrypted your data, it will always remain encrypted. The search service will ignore attempts
         to set this property to null. You can change this property as needed if you want to rotate your
         encryption key; Your data will be unaffected. Encryption with customer-managed keys is not
         available for free search services, and is only available for paid services created on or after
         January 1, 2019.
        :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey
        :keyword e_tag: The ETag of the synonym map.
        :paramtype e_tag: str
        """
        super().__init__(**kwargs)
        self.name = name
        self.synonyms = synonyms
        self.encryption_key = encryption_key
        self.e_tag = e_tag


class SynonymTokenFilter(TokenFilter):
    """Matches single or multi-word synonyms in a token stream. This token filter is implemented using
    Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar synonyms: A list of synonyms in following one of two formats: 1. incredible,
     unbelievable, fabulous => amazing - all terms on the left side of => symbol will be replaced
     with all terms on its right side; 2. incredible, unbelievable, fabulous, amazing - comma
     separated list of equivalent words. Set the expand option to change how this list is
     interpreted. Required.
    :vartype synonyms: list[str]
    :ivar ignore_case: A value indicating whether to case-fold input for matching. Default is
     false.
    :vartype ignore_case: bool
    :ivar expand: A value indicating whether all words in the list of synonyms (if => notation is
     not used) will map to one another. If true, all words in the list of synonyms (if => notation
     is not used) will map to one another. The following list: incredible, unbelievable, fabulous,
     amazing is equivalent to: incredible, unbelievable, fabulous, amazing => incredible,
     unbelievable, fabulous, amazing. If false, the following list: incredible, unbelievable,
     fabulous, amazing will be equivalent to: incredible, unbelievable, fabulous, amazing =>
     incredible. Default is true.
    :vartype expand: bool
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "synonyms": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "synonyms": {"key": "synonyms", "type": "[str]"},
        "ignore_case": {"key": "ignoreCase", "type": "bool"},
        "expand": {"key": "expand", "type": "bool"},
    }

    def __init__(
        self, *, name: str, synonyms: list[str], ignore_case: bool = False, expand: bool = True, **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword synonyms: A list of synonyms in following one of two formats: 1. incredible,
         unbelievable, fabulous => amazing - all terms on the left side of => symbol will be replaced
         with all terms on its right side; 2. incredible, unbelievable, fabulous, amazing - comma
         separated list of equivalent words. Set the expand option to change how this list is
         interpreted. Required.
        :paramtype synonyms: list[str]
        :keyword ignore_case: A value indicating whether to case-fold input for matching. Default is
         false.
        :paramtype ignore_case: bool
        :keyword expand: A value indicating whether all words in the list of synonyms (if => notation
         is not used) will map to one another. If true, all words in the list of synonyms (if =>
         notation is not used) will map to one another. The following list: incredible, unbelievable,
         fabulous, amazing is equivalent to: incredible, unbelievable, fabulous, amazing => incredible,
         unbelievable, fabulous, amazing. If false, the following list: incredible, unbelievable,
         fabulous, amazing will be equivalent to: incredible, unbelievable, fabulous, amazing =>
         incredible. Default is true.
        :paramtype expand: bool
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.SynonymTokenFilter"
        self.synonyms = synonyms
        self.ignore_case = ignore_case
        self.expand = expand


class TagScoringFunction(ScoringFunction):
    """Defines a function that boosts scores of documents with string values matching a given list of
    tags.

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

    :ivar type: Indicates the type of function to use. Valid values include magnitude, freshness,
     distance, and tag. The function type must be lower case. Required.
    :vartype type: str
    :ivar field_name: The name of the field used as input to the scoring function. Required.
    :vartype field_name: str
    :ivar boost: A multiplier for the raw score. Must be a positive number not equal to 1.0.
     Required.
    :vartype boost: float
    :ivar interpolation: A value indicating how boosting will be interpolated across document
     scores; defaults to "Linear". Known values are: "linear", "constant", "quadratic", and
     "logarithmic".
    :vartype interpolation: str or
     ~azure.search.documents.indexes.models.ScoringFunctionInterpolation
    :ivar parameters: Parameter values for the tag scoring function. Required.
    :vartype parameters: ~azure.search.documents.indexes.models.TagScoringParameters
    """

    _validation = {
        "type": {"required": True},
        "field_name": {"required": True},
        "boost": {"required": True},
        "parameters": {"required": True},
    }

    _attribute_map = {
        "type": {"key": "type", "type": "str"},
        "field_name": {"key": "fieldName", "type": "str"},
        "boost": {"key": "boost", "type": "float"},
        "interpolation": {"key": "interpolation", "type": "str"},
        "parameters": {"key": "tag", "type": "TagScoringParameters"},
    }

    def __init__(
        self,
        *,
        field_name: str,
        boost: float,
        parameters: "_models.TagScoringParameters",
        interpolation: Optional[Union[str, "_models.ScoringFunctionInterpolation"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword field_name: The name of the field used as input to the scoring function. Required.
        :paramtype field_name: str
        :keyword boost: A multiplier for the raw score. Must be a positive number not equal to 1.0.
         Required.
        :paramtype boost: float
        :keyword interpolation: A value indicating how boosting will be interpolated across document
         scores; defaults to "Linear". Known values are: "linear", "constant", "quadratic", and
         "logarithmic".
        :paramtype interpolation: str or
         ~azure.search.documents.indexes.models.ScoringFunctionInterpolation
        :keyword parameters: Parameter values for the tag scoring function. Required.
        :paramtype parameters: ~azure.search.documents.indexes.models.TagScoringParameters
        """
        super().__init__(field_name=field_name, boost=boost, interpolation=interpolation, **kwargs)
        self.type: str = "tag"
        self.parameters = parameters


class TagScoringParameters(_serialization.Model):
    """Provides parameter values to a tag scoring function.

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

    :ivar tags_parameter: The name of the parameter passed in search queries to specify the list of
     tags to compare against the target field. Required.
    :vartype tags_parameter: str
    """

    _validation = {
        "tags_parameter": {"required": True},
    }

    _attribute_map = {
        "tags_parameter": {"key": "tagsParameter", "type": "str"},
    }

    def __init__(self, *, tags_parameter: str, **kwargs: Any) -> None:
        """
        :keyword tags_parameter: The name of the parameter passed in search queries to specify the list
         of tags to compare against the target field. Required.
        :paramtype tags_parameter: str
        """
        super().__init__(**kwargs)
        self.tags_parameter = tags_parameter


class TextTranslationSkill(SearchIndexerSkill):
    """A skill to translate text from one language to another.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar default_to_language_code: The language code to translate documents into for documents
     that don't specify the to language explicitly. Required. Known values are: "af", "ar", "bn",
     "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", "fil",
     "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw", "tlh",
     "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "pt-br",
     "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta",
     "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa", and "is".
    :vartype default_to_language_code: str or
     ~azure.search.documents.indexes.models.TextTranslationSkillLanguage
    :ivar default_from_language_code: The language code to translate documents from for documents
     that don't specify the from language explicitly. Known values are: "af", "ar", "bn", "bs",
     "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", "fil", "fi",
     "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw", "tlh",
     "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "pt-br",
     "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta",
     "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa", and "is".
    :vartype default_from_language_code: str or
     ~azure.search.documents.indexes.models.TextTranslationSkillLanguage
    :ivar suggested_from: The language code to translate documents from when neither the
     fromLanguageCode input nor the defaultFromLanguageCode parameter are provided, and the
     automatic language detection is unsuccessful. Default is ``en``. Known values are: "af", "ar",
     "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj",
     "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw",
     "tlh", "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt",
     "pt-br", "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty",
     "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa", and
     "is".
    :vartype suggested_from: str or
     ~azure.search.documents.indexes.models.TextTranslationSkillLanguage
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
        "default_to_language_code": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "default_to_language_code": {"key": "defaultToLanguageCode", "type": "str"},
        "default_from_language_code": {"key": "defaultFromLanguageCode", "type": "str"},
        "suggested_from": {"key": "suggestedFrom", "type": "str"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        default_to_language_code: Union[str, "_models.TextTranslationSkillLanguage"],
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        default_from_language_code: Optional[Union[str, "_models.TextTranslationSkillLanguage"]] = None,
        suggested_from: Optional[Union[str, "_models.TextTranslationSkillLanguage"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword default_to_language_code: The language code to translate documents into for documents
         that don't specify the to language explicitly. Required. Known values are: "af", "ar", "bn",
         "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", "fil",
         "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw", "tlh",
         "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "pt-br",
         "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta",
         "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa", and "is".
        :paramtype default_to_language_code: str or
         ~azure.search.documents.indexes.models.TextTranslationSkillLanguage
        :keyword default_from_language_code: The language code to translate documents from for
         documents that don't specify the from language explicitly. Known values are: "af", "ar", "bn",
         "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", "fil",
         "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw", "tlh",
         "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "pt-br",
         "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta",
         "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa", and "is".
        :paramtype default_from_language_code: str or
         ~azure.search.documents.indexes.models.TextTranslationSkillLanguage
        :keyword suggested_from: The language code to translate documents from when neither the
         fromLanguageCode input nor the defaultFromLanguageCode parameter are provided, and the
         automatic language detection is unsuccessful. Default is ``en``. Known values are: "af", "ar",
         "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj",
         "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw",
         "tlh", "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt",
         "pt-br", "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty",
         "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa", and
         "is".
        :paramtype suggested_from: str or
         ~azure.search.documents.indexes.models.TextTranslationSkillLanguage
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Text.TranslationSkill"
        self.default_to_language_code = default_to_language_code
        self.default_from_language_code = default_from_language_code
        self.suggested_from = suggested_from


class TextWeights(_serialization.Model):
    """Defines weights on index fields for which matches should boost scoring in search queries.

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

    :ivar weights: The dictionary of per-field weights to boost document scoring. The keys are
     field names and the values are the weights for each field. Required.
    :vartype weights: dict[str, float]
    """

    _validation = {
        "weights": {"required": True},
    }

    _attribute_map = {
        "weights": {"key": "weights", "type": "{float}"},
    }

    def __init__(self, *, weights: dict[str, float], **kwargs: Any) -> None:
        """
        :keyword weights: The dictionary of per-field weights to boost document scoring. The keys are
         field names and the values are the weights for each field. Required.
        :paramtype weights: dict[str, float]
        """
        super().__init__(**kwargs)
        self.weights = weights


class TruncateTokenFilter(TokenFilter):
    """Truncates the terms to a specific length. This token filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar length: The length at which terms will be truncated. Default and maximum is 300.
    :vartype length: int
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "length": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "length": {"key": "length", "type": "int"},
    }

    def __init__(self, *, name: str, length: int = 300, **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword length: The length at which terms will be truncated. Default and maximum is 300.
        :paramtype length: int
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.TruncateTokenFilter"
        self.length = length


class UaxUrlEmailTokenizer(LexicalTokenizer):
    """Tokenizes urls and emails as one token. This tokenizer is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of tokenizer. Required.
    :vartype odata_type: str
    :ivar name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes or
     underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the
     maximum length are split. The maximum token length that can be used is 300 characters.
    :vartype max_token_length: int
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
        "max_token_length": {"maximum": 300},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "max_token_length": {"key": "maxTokenLength", "type": "int"},
    }

    def __init__(self, *, name: str, max_token_length: int = 255, **kwargs: Any) -> None:
        """
        :keyword name: The name of the tokenizer. It must only contain letters, digits, spaces, dashes
         or underscores, can only start and end with alphanumeric characters, and is limited to 128
         characters. Required.
        :paramtype name: str
        :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the
         maximum length are split. The maximum token length that can be used is 300 characters.
        :paramtype max_token_length: int
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.UaxUrlEmailTokenizer"
        self.max_token_length = max_token_length


class UniqueTokenFilter(TokenFilter):
    """Filters out tokens with same text as the previous token. This token filter is implemented using
    Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar only_on_same_position: A value indicating whether to remove duplicates only at the same
     position. Default is false.
    :vartype only_on_same_position: bool
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "only_on_same_position": {"key": "onlyOnSamePosition", "type": "bool"},
    }

    def __init__(self, *, name: str, only_on_same_position: bool = False, **kwargs: Any) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword only_on_same_position: A value indicating whether to remove duplicates only at the
         same position. Default is false.
        :paramtype only_on_same_position: bool
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.UniqueTokenFilter"
        self.only_on_same_position = only_on_same_position


class VectorSearch(_serialization.Model):
    """Contains configuration options related to vector search.

    :ivar profiles: Defines combinations of configurations to use with vector search.
    :vartype profiles: list[~azure.search.documents.indexes.models.VectorSearchProfile]
    :ivar algorithms: Contains configuration options specific to the algorithm used during indexing
     or querying.
    :vartype algorithms:
     list[~azure.search.documents.indexes.models.VectorSearchAlgorithmConfiguration]
    :ivar vectorizers: Contains configuration options on how to vectorize text vector queries.
    :vartype vectorizers: list[~azure.search.documents.indexes.models.VectorSearchVectorizer]
    :ivar compressions: Contains configuration options specific to the compression method used
     during indexing or querying.
    :vartype compressions: list[~azure.search.documents.indexes.models.VectorSearchCompression]
    """

    _attribute_map = {
        "profiles": {"key": "profiles", "type": "[VectorSearchProfile]"},
        "algorithms": {"key": "algorithms", "type": "[VectorSearchAlgorithmConfiguration]"},
        "vectorizers": {"key": "vectorizers", "type": "[VectorSearchVectorizer]"},
        "compressions": {"key": "compressions", "type": "[VectorSearchCompression]"},
    }

    def __init__(
        self,
        *,
        profiles: Optional[list["_models.VectorSearchProfile"]] = None,
        algorithms: Optional[list["_models.VectorSearchAlgorithmConfiguration"]] = None,
        vectorizers: Optional[list["_models.VectorSearchVectorizer"]] = None,
        compressions: Optional[list["_models.VectorSearchCompression"]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword profiles: Defines combinations of configurations to use with vector search.
        :paramtype profiles: list[~azure.search.documents.indexes.models.VectorSearchProfile]
        :keyword algorithms: Contains configuration options specific to the algorithm used during
         indexing or querying.
        :paramtype algorithms:
         list[~azure.search.documents.indexes.models.VectorSearchAlgorithmConfiguration]
        :keyword vectorizers: Contains configuration options on how to vectorize text vector queries.
        :paramtype vectorizers: list[~azure.search.documents.indexes.models.VectorSearchVectorizer]
        :keyword compressions: Contains configuration options specific to the compression method used
         during indexing or querying.
        :paramtype compressions: list[~azure.search.documents.indexes.models.VectorSearchCompression]
        """
        super().__init__(**kwargs)
        self.profiles = profiles
        self.algorithms = algorithms
        self.vectorizers = vectorizers
        self.compressions = compressions


class VectorSearchProfile(_serialization.Model):
    """Defines a combination of configurations to use with vector search.

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

    :ivar name: The name to associate with this particular vector search profile. Required.
    :vartype name: str
    :ivar algorithm_configuration_name: The name of the vector search algorithm configuration that
     specifies the algorithm and optional parameters. Required.
    :vartype algorithm_configuration_name: str
    :ivar vectorizer_name: The name of the vectorization being configured for use with vector
     search.
    :vartype vectorizer_name: str
    :ivar compression_name: The name of the compression method configuration that specifies the
     compression method and optional parameters.
    :vartype compression_name: str
    """

    _validation = {
        "name": {"required": True},
        "algorithm_configuration_name": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "algorithm_configuration_name": {"key": "algorithm", "type": "str"},
        "vectorizer_name": {"key": "vectorizer", "type": "str"},
        "compression_name": {"key": "compression", "type": "str"},
    }

    def __init__(
        self,
        *,
        name: str,
        algorithm_configuration_name: str,
        vectorizer_name: Optional[str] = None,
        compression_name: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name to associate with this particular vector search profile. Required.
        :paramtype name: str
        :keyword algorithm_configuration_name: The name of the vector search algorithm configuration
         that specifies the algorithm and optional parameters. Required.
        :paramtype algorithm_configuration_name: str
        :keyword vectorizer_name: The name of the vectorization being configured for use with vector
         search.
        :paramtype vectorizer_name: str
        :keyword compression_name: The name of the compression method configuration that specifies the
         compression method and optional parameters.
        :paramtype compression_name: str
        """
        super().__init__(**kwargs)
        self.name = name
        self.algorithm_configuration_name = algorithm_configuration_name
        self.vectorizer_name = vectorizer_name
        self.compression_name = compression_name


class WebApiSkill(SearchIndexerSkill):
    """A skill that can call a Web API endpoint, allowing you to extend a skillset by having it call
    your custom code.

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

    :ivar odata_type: A URI fragment specifying the type of skill. Required.
    :vartype odata_type: str
    :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill
     with no name defined will be given a default name of its 1-based index in the skills array,
     prefixed with the character '#'.
    :vartype name: str
    :ivar description: The description of the skill which describes the inputs, outputs, and usage
     of the skill.
    :vartype description: str
    :ivar context: Represents the level at which operations take place, such as the document root
     or document content (for example, /document or /document/content). The default is /document.
    :vartype context: str
    :ivar inputs: Inputs of the skills could be a column in the source data set, or the output of
     an upstream skill. Required.
    :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
    :ivar outputs: The output of a skill is either a field in a search index, or a value that can
     be consumed as an input by another skill. Required.
    :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
    :ivar uri: The url for the Web API. Required.
    :vartype uri: str
    :ivar http_headers: The headers required to make the http request.
    :vartype http_headers: dict[str, str]
    :ivar http_method: The method for the http request.
    :vartype http_method: str
    :ivar timeout: The desired timeout for the request. Default is 30 seconds.
    :vartype timeout: ~datetime.timedelta
    :ivar batch_size: The desired batch size which indicates number of documents.
    :vartype batch_size: int
    :ivar degree_of_parallelism: If set, the number of parallel calls that can be made to the Web
     API.
    :vartype degree_of_parallelism: int
    :ivar auth_resource_id: Applies to custom skills that connect to external code in an Azure
     function or some other application that provides the transformations. This value should be the
     application ID created for the function or app when it was registered with Azure Active
     Directory. When specified, the custom skill connects to the function or app using a managed ID
     (either system or user-assigned) of the search service and the access token of the function or
     app, using this value as the resource id for creating the scope of the access token.
    :vartype auth_resource_id: str
    :ivar auth_identity: The user-assigned managed identity used for outbound connections. If an
     authResourceId is provided and it's not specified, the system-assigned managed identity is
     used. On updates to the indexer, if the identity is unspecified, the value remains unchanged.
     If set to "none", the value of this property is cleared.
    :vartype auth_identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity
    """

    _validation = {
        "odata_type": {"required": True},
        "inputs": {"required": True},
        "outputs": {"required": True},
        "uri": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "description": {"key": "description", "type": "str"},
        "context": {"key": "context", "type": "str"},
        "inputs": {"key": "inputs", "type": "[InputFieldMappingEntry]"},
        "outputs": {"key": "outputs", "type": "[OutputFieldMappingEntry]"},
        "uri": {"key": "uri", "type": "str"},
        "http_headers": {"key": "httpHeaders", "type": "{str}"},
        "http_method": {"key": "httpMethod", "type": "str"},
        "timeout": {"key": "timeout", "type": "duration"},
        "batch_size": {"key": "batchSize", "type": "int"},
        "degree_of_parallelism": {"key": "degreeOfParallelism", "type": "int"},
        "auth_resource_id": {"key": "authResourceId", "type": "str"},
        "auth_identity": {"key": "authIdentity", "type": "SearchIndexerDataIdentity"},
    }

    def __init__(
        self,
        *,
        inputs: list["_models.InputFieldMappingEntry"],
        outputs: list["_models.OutputFieldMappingEntry"],
        uri: str,
        name: Optional[str] = None,
        description: Optional[str] = None,
        context: Optional[str] = None,
        http_headers: Optional[dict[str, str]] = None,
        http_method: Optional[str] = None,
        timeout: Optional[datetime.timedelta] = None,
        batch_size: Optional[int] = None,
        degree_of_parallelism: Optional[int] = None,
        auth_resource_id: Optional[str] = None,
        auth_identity: Optional["_models.SearchIndexerDataIdentity"] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill
         with no name defined will be given a default name of its 1-based index in the skills array,
         prefixed with the character '#'.
        :paramtype name: str
        :keyword description: The description of the skill which describes the inputs, outputs, and
         usage of the skill.
        :paramtype description: str
        :keyword context: Represents the level at which operations take place, such as the document
         root or document content (for example, /document or /document/content). The default is
         /document.
        :paramtype context: str
        :keyword inputs: Inputs of the skills could be a column in the source data set, or the output
         of an upstream skill. Required.
        :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
        :keyword outputs: The output of a skill is either a field in a search index, or a value that
         can be consumed as an input by another skill. Required.
        :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry]
        :keyword uri: The url for the Web API. Required.
        :paramtype uri: str
        :keyword http_headers: The headers required to make the http request.
        :paramtype http_headers: dict[str, str]
        :keyword http_method: The method for the http request.
        :paramtype http_method: str
        :keyword timeout: The desired timeout for the request. Default is 30 seconds.
        :paramtype timeout: ~datetime.timedelta
        :keyword batch_size: The desired batch size which indicates number of documents.
        :paramtype batch_size: int
        :keyword degree_of_parallelism: If set, the number of parallel calls that can be made to the
         Web API.
        :paramtype degree_of_parallelism: int
        :keyword auth_resource_id: Applies to custom skills that connect to external code in an Azure
         function or some other application that provides the transformations. This value should be the
         application ID created for the function or app when it was registered with Azure Active
         Directory. When specified, the custom skill connects to the function or app using a managed ID
         (either system or user-assigned) of the search service and the access token of the function or
         app, using this value as the resource id for creating the scope of the access token.
        :paramtype auth_resource_id: str
        :keyword auth_identity: The user-assigned managed identity used for outbound connections. If an
         authResourceId is provided and it's not specified, the system-assigned managed identity is
         used. On updates to the indexer, if the identity is unspecified, the value remains unchanged.
         If set to "none", the value of this property is cleared.
        :paramtype auth_identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity
        """
        super().__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs)
        self.odata_type: str = "#Microsoft.Skills.Custom.WebApiSkill"
        self.uri = uri
        self.http_headers = http_headers
        self.http_method = http_method
        self.timeout = timeout
        self.batch_size = batch_size
        self.degree_of_parallelism = degree_of_parallelism
        self.auth_resource_id = auth_resource_id
        self.auth_identity = auth_identity


class WebApiVectorizer(VectorSearchVectorizer):
    """Specifies a user-defined vectorizer for generating the vector embedding of a query string.
    Integration of an external vectorizer is achieved using the custom Web API interface of a
    skillset.

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

    :ivar vectorizer_name: The name to associate with this particular vectorization method.
     Required.
    :vartype vectorizer_name: str
    :ivar kind: The name of the kind of vectorization method being configured for use with vector
     search. Required. Known values are: "azureOpenAI" and "customWebApi".
    :vartype kind: str or ~azure.search.documents.indexes.models.VectorSearchVectorizerKind
    :ivar web_api_parameters: Specifies the properties of the user-defined vectorizer.
    :vartype web_api_parameters: ~azure.search.documents.indexes.models.WebApiVectorizerParameters
    """

    _validation = {
        "vectorizer_name": {"required": True},
        "kind": {"required": True},
    }

    _attribute_map = {
        "vectorizer_name": {"key": "name", "type": "str"},
        "kind": {"key": "kind", "type": "str"},
        "web_api_parameters": {"key": "customWebApiParameters", "type": "WebApiVectorizerParameters"},
    }

    def __init__(
        self,
        *,
        vectorizer_name: str,
        web_api_parameters: Optional["_models.WebApiVectorizerParameters"] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword vectorizer_name: The name to associate with this particular vectorization method.
         Required.
        :paramtype vectorizer_name: str
        :keyword web_api_parameters: Specifies the properties of the user-defined vectorizer.
        :paramtype web_api_parameters:
         ~azure.search.documents.indexes.models.WebApiVectorizerParameters
        """
        super().__init__(vectorizer_name=vectorizer_name, **kwargs)
        self.kind: str = "customWebApi"
        self.web_api_parameters = web_api_parameters


class WebApiVectorizerParameters(_serialization.Model):
    """Specifies the properties for connecting to a user-defined vectorizer.

    :ivar url: The URI of the Web API providing the vectorizer.
    :vartype url: str
    :ivar http_headers: The headers required to make the HTTP request.
    :vartype http_headers: dict[str, str]
    :ivar http_method: The method for the HTTP request.
    :vartype http_method: str
    :ivar timeout: The desired timeout for the request. Default is 30 seconds.
    :vartype timeout: ~datetime.timedelta
    :ivar auth_resource_id: Applies to custom endpoints that connect to external code in an Azure
     function or some other application that provides the transformations. This value should be the
     application ID created for the function or app when it was registered with Azure Active
     Directory. When specified, the vectorization connects to the function or app using a managed ID
     (either system or user-assigned) of the search service and the access token of the function or
     app, using this value as the resource id for creating the scope of the access token.
    :vartype auth_resource_id: str
    :ivar auth_identity: The user-assigned managed identity used for outbound connections. If an
     authResourceId is provided and it's not specified, the system-assigned managed identity is
     used. On updates to the indexer, if the identity is unspecified, the value remains unchanged.
     If set to "none", the value of this property is cleared.
    :vartype auth_identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity
    """

    _attribute_map = {
        "url": {"key": "uri", "type": "str"},
        "http_headers": {"key": "httpHeaders", "type": "{str}"},
        "http_method": {"key": "httpMethod", "type": "str"},
        "timeout": {"key": "timeout", "type": "duration"},
        "auth_resource_id": {"key": "authResourceId", "type": "str"},
        "auth_identity": {"key": "authIdentity", "type": "SearchIndexerDataIdentity"},
    }

    def __init__(
        self,
        *,
        url: Optional[str] = None,
        http_headers: Optional[dict[str, str]] = None,
        http_method: Optional[str] = None,
        timeout: Optional[datetime.timedelta] = None,
        auth_resource_id: Optional[str] = None,
        auth_identity: Optional["_models.SearchIndexerDataIdentity"] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword url: The URI of the Web API providing the vectorizer.
        :paramtype url: str
        :keyword http_headers: The headers required to make the HTTP request.
        :paramtype http_headers: dict[str, str]
        :keyword http_method: The method for the HTTP request.
        :paramtype http_method: str
        :keyword timeout: The desired timeout for the request. Default is 30 seconds.
        :paramtype timeout: ~datetime.timedelta
        :keyword auth_resource_id: Applies to custom endpoints that connect to external code in an
         Azure function or some other application that provides the transformations. This value should
         be the application ID created for the function or app when it was registered with Azure Active
         Directory. When specified, the vectorization connects to the function or app using a managed ID
         (either system or user-assigned) of the search service and the access token of the function or
         app, using this value as the resource id for creating the scope of the access token.
        :paramtype auth_resource_id: str
        :keyword auth_identity: The user-assigned managed identity used for outbound connections. If an
         authResourceId is provided and it's not specified, the system-assigned managed identity is
         used. On updates to the indexer, if the identity is unspecified, the value remains unchanged.
         If set to "none", the value of this property is cleared.
        :paramtype auth_identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity
        """
        super().__init__(**kwargs)
        self.url = url
        self.http_headers = http_headers
        self.http_method = http_method
        self.timeout = timeout
        self.auth_resource_id = auth_resource_id
        self.auth_identity = auth_identity


class WordDelimiterTokenFilter(TokenFilter):
    """Splits words into subwords and performs optional transformations on subword groups. This token
    filter is implemented using Apache Lucene.

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

    :ivar odata_type: A URI fragment specifying the type of token filter. Required.
    :vartype odata_type: str
    :ivar name: The name of the token filter. It must only contain letters, digits, spaces, dashes
     or underscores, can only start and end with alphanumeric characters, and is limited to 128
     characters. Required.
    :vartype name: str
    :ivar generate_word_parts: A value indicating whether to generate part words. If set, causes
     parts of words to be generated; for example "AzureSearch" becomes "Azure" "Search". Default is
     true.
    :vartype generate_word_parts: bool
    :ivar generate_number_parts: A value indicating whether to generate number subwords. Default is
     true.
    :vartype generate_number_parts: bool
    :ivar catenate_words: A value indicating whether maximum runs of word parts will be catenated.
     For example, if this is set to true, "Azure-Search" becomes "AzureSearch". Default is false.
    :vartype catenate_words: bool
    :ivar catenate_numbers: A value indicating whether maximum runs of number parts will be
     catenated. For example, if this is set to true, "1-2" becomes "12". Default is false.
    :vartype catenate_numbers: bool
    :ivar catenate_all: A value indicating whether all subword parts will be catenated. For
     example, if this is set to true, "Azure-Search-1" becomes "AzureSearch1". Default is false.
    :vartype catenate_all: bool
    :ivar split_on_case_change: A value indicating whether to split words on caseChange. For
     example, if this is set to true, "AzureSearch" becomes "Azure" "Search". Default is true.
    :vartype split_on_case_change: bool
    :ivar preserve_original: A value indicating whether original words will be preserved and added
     to the subword list. Default is false.
    :vartype preserve_original: bool
    :ivar split_on_numerics: A value indicating whether to split on numbers. For example, if this
     is set to true, "Azure1Search" becomes "Azure" "1" "Search". Default is true.
    :vartype split_on_numerics: bool
    :ivar stem_english_possessive: A value indicating whether to remove trailing "'s" for each
     subword. Default is true.
    :vartype stem_english_possessive: bool
    :ivar protected_words: A list of tokens to protect from being delimited.
    :vartype protected_words: list[str]
    """

    _validation = {
        "odata_type": {"required": True},
        "name": {"required": True},
    }

    _attribute_map = {
        "odata_type": {"key": "@odata\\.type", "type": "str"},
        "name": {"key": "name", "type": "str"},
        "generate_word_parts": {"key": "generateWordParts", "type": "bool"},
        "generate_number_parts": {"key": "generateNumberParts", "type": "bool"},
        "catenate_words": {"key": "catenateWords", "type": "bool"},
        "catenate_numbers": {"key": "catenateNumbers", "type": "bool"},
        "catenate_all": {"key": "catenateAll", "type": "bool"},
        "split_on_case_change": {"key": "splitOnCaseChange", "type": "bool"},
        "preserve_original": {"key": "preserveOriginal", "type": "bool"},
        "split_on_numerics": {"key": "splitOnNumerics", "type": "bool"},
        "stem_english_possessive": {"key": "stemEnglishPossessive", "type": "bool"},
        "protected_words": {"key": "protectedWords", "type": "[str]"},
    }

    def __init__(
        self,
        *,
        name: str,
        generate_word_parts: bool = True,
        generate_number_parts: bool = True,
        catenate_words: bool = False,
        catenate_numbers: bool = False,
        catenate_all: bool = False,
        split_on_case_change: bool = True,
        preserve_original: bool = False,
        split_on_numerics: bool = True,
        stem_english_possessive: bool = True,
        protected_words: Optional[list[str]] = None,
        **kwargs: Any
    ) -> None:
        """
        :keyword name: The name of the token filter. It must only contain letters, digits, spaces,
         dashes or underscores, can only start and end with alphanumeric characters, and is limited to
         128 characters. Required.
        :paramtype name: str
        :keyword generate_word_parts: A value indicating whether to generate part words. If set, causes
         parts of words to be generated; for example "AzureSearch" becomes "Azure" "Search". Default is
         true.
        :paramtype generate_word_parts: bool
        :keyword generate_number_parts: A value indicating whether to generate number subwords. Default
         is true.
        :paramtype generate_number_parts: bool
        :keyword catenate_words: A value indicating whether maximum runs of word parts will be
         catenated. For example, if this is set to true, "Azure-Search" becomes "AzureSearch". Default
         is false.
        :paramtype catenate_words: bool
        :keyword catenate_numbers: A value indicating whether maximum runs of number parts will be
         catenated. For example, if this is set to true, "1-2" becomes "12". Default is false.
        :paramtype catenate_numbers: bool
        :keyword catenate_all: A value indicating whether all subword parts will be catenated. For
         example, if this is set to true, "Azure-Search-1" becomes "AzureSearch1". Default is false.
        :paramtype catenate_all: bool
        :keyword split_on_case_change: A value indicating whether to split words on caseChange. For
         example, if this is set to true, "AzureSearch" becomes "Azure" "Search". Default is true.
        :paramtype split_on_case_change: bool
        :keyword preserve_original: A value indicating whether original words will be preserved and
         added to the subword list. Default is false.
        :paramtype preserve_original: bool
        :keyword split_on_numerics: A value indicating whether to split on numbers. For example, if
         this is set to true, "Azure1Search" becomes "Azure" "1" "Search". Default is true.
        :paramtype split_on_numerics: bool
        :keyword stem_english_possessive: A value indicating whether to remove trailing "'s" for each
         subword. Default is true.
        :paramtype stem_english_possessive: bool
        :keyword protected_words: A list of tokens to protect from being delimited.
        :paramtype protected_words: list[str]
        """
        super().__init__(name=name, **kwargs)
        self.odata_type: str = "#Microsoft.Azure.Search.WordDelimiterTokenFilter"
        self.generate_word_parts = generate_word_parts
        self.generate_number_parts = generate_number_parts
        self.catenate_words = catenate_words
        self.catenate_numbers = catenate_numbers
        self.catenate_all = catenate_all
        self.split_on_case_change = split_on_case_change
        self.preserve_original = preserve_original
        self.split_on_numerics = split_on_numerics
        self.stem_english_possessive = stem_english_possessive
        self.protected_words = protected_words
