From 1fd8e2d6fc6abb20cc81b43ab532afe1aa901c7a Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Mon, 13 Sep 2021 18:38:14 -0700 Subject: [PATCH 1/3] regenerate with version 3.2-preview.2 --- .../_generated/_operations_mixin.py | 102 +- .../_generated/_text_analytics_client.py | 12 +- .../_generated/aio/_operations_mixin.py | 102 +- .../_generated/aio/_text_analytics_client.py | 12 +- .../ai/textanalytics/_generated/models.py | 2 +- .../__init__.py | 0 .../_configuration.py | 0 .../_metadata.json | 54 +- .../_text_analytics_client.py | 2 +- .../aio/__init__.py | 0 .../aio/_configuration.py | 0 .../aio/_text_analytics_client.py | 2 +- .../aio/operations/__init__.py | 0 .../_text_analytics_client_operations.py | 48 +- .../models/__init__.py | 54 + .../models/_models.py | 923 ++++++++++++--- .../models/_models_py3.py | 1003 ++++++++++++++--- .../models/_text_analytics_client_enums.py | 0 .../operations/__init__.py | 0 .../_text_analytics_client_operations.py | 48 +- .../py.typed | 0 .../azure-ai-textanalytics/swagger/README.md | 30 +- 22 files changed, 1897 insertions(+), 497 deletions(-) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/__init__.py (100%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/_configuration.py (100%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/_metadata.json (94%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/_text_analytics_client.py (98%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/aio/__init__.py (100%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/aio/_configuration.py (100%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/aio/_text_analytics_client.py (98%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/aio/operations/__init__.py (100%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/aio/operations/_text_analytics_client_operations.py (98%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/models/__init__.py (80%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/models/_models.py (76%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/models/_models_py3.py (76%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/models/_text_analytics_client_enums.py (100%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/operations/__init__.py (100%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/operations/_text_analytics_client_operations.py (98%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/py.typed (100%) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py index 9126c492e7bc..3946776732c3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py @@ -54,14 +54,14 @@ def analyze_status( :type skip: int :keyword callable cls: A custom type or function that will be passed the direct response :return: AnalyzeJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('analyze_status') if api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'analyze_status'".format(api_version)) mixin_instance = OperationClass() @@ -83,7 +83,7 @@ def begin_analyze( executed. :param body: Collection of documents to analyze and tasks to execute. - :type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput + :type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod. @@ -91,14 +91,14 @@ def begin_analyze( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response) - :rtype: ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState] + :rtype: ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState] :raises ~azure.core.exceptions.HttpResponseError: """ api_version = self._get_api_version('begin_analyze') if api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze'".format(api_version)) mixin_instance = OperationClass() @@ -133,8 +133,8 @@ def begin_cancel_health_job( api_version = self._get_api_version('begin_cancel_health_job') if api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_cancel_health_job'".format(api_version)) mixin_instance = OperationClass() @@ -159,14 +159,14 @@ def begin_health( symptoms, etc) and their relations. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with the Text Analytics natural language @@ -182,14 +182,14 @@ def begin_health( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response) - :rtype: ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState] + :rtype: ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState] :raises ~azure.core.exceptions.HttpResponseError: """ api_version = self._get_api_version('begin_health') if api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_health'".format(api_version)) mixin_instance = OperationClass() @@ -216,7 +216,7 @@ def entities_linking( the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -234,10 +234,10 @@ def entities_linking( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntityLinkingResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_linking') @@ -245,8 +245,8 @@ def entities_linking( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_linking'".format(api_version)) mixin_instance = OperationClass() @@ -258,7 +258,7 @@ def entities_linking( # FIXME: this is handwritten if api_version == 'v3.0': return mixin_instance.entities_linking(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return mixin_instance.entities_linking(documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs) def entities_recognition_general( @@ -278,7 +278,7 @@ def entities_recognition_general( Analytics API` for the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -296,10 +296,10 @@ def entities_recognition_general( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntitiesResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_recognition_general') @@ -307,8 +307,8 @@ def entities_recognition_general( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_recognition_general'".format(api_version)) mixin_instance = OperationClass() @@ -320,7 +320,7 @@ def entities_recognition_general( # FIXME: this is handwritten if api_version == 'v3.0': return mixin_instance.entities_recognition_general(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return mixin_instance.entities_recognition_general(documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs) def entities_recognition_pii( @@ -343,7 +343,7 @@ def entities_recognition_pii( list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -364,19 +364,19 @@ def entities_recognition_pii( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory] + :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] :keyword callable cls: A custom type or function that will be passed the direct response :return: PiiResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_recognition_pii') if api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_recognition_pii'".format(api_version)) mixin_instance = OperationClass() @@ -412,14 +412,14 @@ def health_status( :type show_stats: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: HealthcareJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('health_status') if api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'health_status'".format(api_version)) mixin_instance = OperationClass() @@ -445,7 +445,7 @@ def key_phrases( enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -462,7 +462,7 @@ def key_phrases( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyPhraseResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('key_phrases') @@ -470,8 +470,8 @@ def key_phrases( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'key_phrases'".format(api_version)) mixin_instance = OperationClass() @@ -483,7 +483,7 @@ def key_phrases( # FIXME: this is handwritten if api_version == 'v3.0': return mixin_instance.key_phrases(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return mixin_instance.key_phrases(documents, model_version, show_stats, logging_opt_out, **kwargs) def languages( @@ -502,7 +502,7 @@ def languages( enabled languages. :param documents: - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -519,7 +519,7 @@ def languages( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: LanguageResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.LanguageResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.LanguageResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('languages') @@ -527,8 +527,8 @@ def languages( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'languages'".format(api_version)) mixin_instance = OperationClass() @@ -540,7 +540,7 @@ def languages( # FIXME: this is handwritten if api_version == 'v3.0': return mixin_instance.languages(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return mixin_instance.languages(documents, model_version, show_stats, logging_opt_out, **kwargs) def sentiment( @@ -560,7 +560,7 @@ def sentiment( (targets and assessments). :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -581,10 +581,10 @@ def sentiment( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: SentimentResponse, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('sentiment') @@ -592,8 +592,8 @@ def sentiment( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'sentiment'".format(api_version)) mixin_instance = OperationClass() @@ -605,5 +605,5 @@ def sentiment( # FIXME: this is handwritten if api_version == 'v3.0': return mixin_instance.sentiment(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return mixin_instance.sentiment(documents, model_version, show_stats, logging_opt_out, opinion_mining, string_index_type, **kwargs) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py index 8954bdf48d9e..7cba63c4359c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py @@ -55,7 +55,7 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin, MultiApiClientMixi :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = 'v3.2-preview.1' + DEFAULT_API_VERSION = 'v3.2-preview.2' _PROFILE_TAG = "azure.ai.textanalytics.TextAnalyticsClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -76,8 +76,8 @@ def __init__( base_url = '{Endpoint}/text/analytics/v3.0' elif api_version == 'v3.1': base_url = '{Endpoint}/text/analytics/v3.1' - elif api_version == 'v3.2-preview.1': - base_url = '{Endpoint}/text/analytics/v3.2-preview.1' + elif api_version == 'v3.2-preview.2': + base_url = '{Endpoint}/text/analytics/v3.2-preview.2' else: raise ValueError("API version {} is not available".format(api_version)) self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) @@ -97,7 +97,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * v3.0: :mod:`v3_0.models` * v3.1: :mod:`v3_1.models` - * v3.2-preview.1: :mod:`v3_2_preview_1.models` + * v3.2-preview.2: :mod:`v3_2_preview_2.models` """ if api_version == 'v3.0': from .v3_0 import models @@ -105,8 +105,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == 'v3.1': from .v3_1 import models return models - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1 import models + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2 import models return models raise ValueError("API version {} is not available".format(api_version)) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin.py index 1271b33c08b2..b4bb93f4c6cf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin.py @@ -50,14 +50,14 @@ async def analyze_status( :type skip: int :keyword callable cls: A custom type or function that will be passed the direct response :return: AnalyzeJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('analyze_status') if api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'analyze_status'".format(api_version)) mixin_instance = OperationClass() @@ -79,7 +79,7 @@ async def begin_analyze( executed. :param body: Collection of documents to analyze and tasks to execute. - :type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput + :type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncAnalyzeActionsLROPollingMethod. @@ -87,14 +87,14 @@ async def begin_analyze( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response) - :rtype: ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState] + :rtype: ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState] :raises ~azure.core.exceptions.HttpResponseError: """ api_version = self._get_api_version('begin_analyze') if api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze'".format(api_version)) mixin_instance = OperationClass() @@ -129,8 +129,8 @@ async def begin_cancel_health_job( api_version = self._get_api_version('begin_cancel_health_job') if api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_cancel_health_job'".format(api_version)) mixin_instance = OperationClass() @@ -155,14 +155,14 @@ async def begin_health( symptoms, etc) and their relations. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with the Text Analytics natural language @@ -178,14 +178,14 @@ async def begin_health( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response) - :rtype: ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState] + :rtype: ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState] :raises ~azure.core.exceptions.HttpResponseError: """ api_version = self._get_api_version('begin_health') if api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_health'".format(api_version)) mixin_instance = OperationClass() @@ -212,7 +212,7 @@ async def entities_linking( the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -230,10 +230,10 @@ async def entities_linking( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntityLinkingResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_linking') @@ -241,8 +241,8 @@ async def entities_linking( from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_linking'".format(api_version)) mixin_instance = OperationClass() @@ -254,7 +254,7 @@ async def entities_linking( # FIXME: this is handwritten if api_version == 'v3.0': return await mixin_instance.entities_linking(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return await mixin_instance.entities_linking(documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs) async def entities_recognition_general( @@ -274,7 +274,7 @@ async def entities_recognition_general( Analytics API` for the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -292,10 +292,10 @@ async def entities_recognition_general( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntitiesResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_recognition_general') @@ -303,8 +303,8 @@ async def entities_recognition_general( from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_recognition_general'".format(api_version)) mixin_instance = OperationClass() @@ -316,7 +316,7 @@ async def entities_recognition_general( # FIXME: this is handwritten if api_version == 'v3.0': return await mixin_instance.entities_recognition_general(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return await mixin_instance.entities_recognition_general(documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs) async def entities_recognition_pii( @@ -339,7 +339,7 @@ async def entities_recognition_pii( list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -360,19 +360,19 @@ async def entities_recognition_pii( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory] + :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] :keyword callable cls: A custom type or function that will be passed the direct response :return: PiiResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_recognition_pii') if api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_recognition_pii'".format(api_version)) mixin_instance = OperationClass() @@ -408,14 +408,14 @@ async def health_status( :type show_stats: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: HealthcareJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('health_status') if api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'health_status'".format(api_version)) mixin_instance = OperationClass() @@ -441,7 +441,7 @@ async def key_phrases( enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -458,7 +458,7 @@ async def key_phrases( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyPhraseResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('key_phrases') @@ -466,8 +466,8 @@ async def key_phrases( from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'key_phrases'".format(api_version)) mixin_instance = OperationClass() @@ -479,7 +479,7 @@ async def key_phrases( # FIXME: this is handwritten if api_version == 'v3.0': return await mixin_instance.key_phrases(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return await mixin_instance.key_phrases(documents, model_version, show_stats, logging_opt_out, **kwargs) async def languages( @@ -498,7 +498,7 @@ async def languages( enabled languages. :param documents: - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -515,7 +515,7 @@ async def languages( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: LanguageResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.LanguageResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.LanguageResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('languages') @@ -523,8 +523,8 @@ async def languages( from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'languages'".format(api_version)) mixin_instance = OperationClass() @@ -536,7 +536,7 @@ async def languages( # FIXME: this is handwritten if api_version == 'v3.0': return await mixin_instance.languages(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return await mixin_instance.languages(documents, model_version, show_stats, logging_opt_out, **kwargs) async def sentiment( @@ -556,7 +556,7 @@ async def sentiment( (targets and assessments). :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -577,10 +577,10 @@ async def sentiment( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: SentimentResponse, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('sentiment') @@ -588,8 +588,8 @@ async def sentiment( from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'sentiment'".format(api_version)) mixin_instance = OperationClass() @@ -601,5 +601,5 @@ async def sentiment( # FIXME: this is handwritten if api_version == 'v3.0': return await mixin_instance.sentiment(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return await mixin_instance.sentiment(documents, model_version, show_stats, logging_opt_out, opinion_mining, string_index_type, **kwargs) \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client.py index 00cada7d6d11..70a99709c5f6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client.py @@ -53,7 +53,7 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin, MultiApiClientMixi :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = 'v3.2-preview.1' + DEFAULT_API_VERSION = 'v3.2-preview.2' _PROFILE_TAG = "azure.ai.textanalytics.TextAnalyticsClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -74,8 +74,8 @@ def __init__( base_url = '{Endpoint}/text/analytics/v3.0' elif api_version == 'v3.1': base_url = '{Endpoint}/text/analytics/v3.1' - elif api_version == 'v3.2-preview.1': - base_url = '{Endpoint}/text/analytics/v3.2-preview.1' + elif api_version == 'v3.2-preview.2': + base_url = '{Endpoint}/text/analytics/v3.2-preview.2' else: raise ValueError("API version {} is not available".format(api_version)) self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) @@ -95,7 +95,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * v3.0: :mod:`v3_0.models` * v3.1: :mod:`v3_1.models` - * v3.2-preview.1: :mod:`v3_2_preview_1.models` + * v3.2-preview.2: :mod:`v3_2_preview_2.models` """ if api_version == 'v3.0': from ..v3_0 import models @@ -103,8 +103,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == 'v3.1': from ..v3_1 import models return models - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1 import models + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2 import models return models raise ValueError("API version {} is not available".format(api_version)) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/models.py index 2b7242edae9b..eb341f025c78 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/models.py @@ -4,4 +4,4 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from .v3_2_preview_1.models import * +from .v3_2_preview_2.models import * diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/__init__.py similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/__init__.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/__init__.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_configuration.py similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_configuration.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_configuration.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_metadata.json b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_metadata.json similarity index 94% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_metadata.json rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_metadata.json index 2de55395aa4e..c30e3aa4ce9e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_metadata.json +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_metadata.json @@ -1,12 +1,12 @@ { - "chosen_version": "v3.2-preview.1", - "total_api_version_list": ["v3.2-preview.1"], + "chosen_version": "v3.2-preview.2", + "total_api_version_list": ["v3.2-preview.2"], "client": { "name": "TextAnalyticsClient", "filename": "_text_analytics_client", "description": "The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. Functionality for analysis of text specific to the healthcare domain and personal information are also available in the API. Further documentation can be found in :code:`\u003ca href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview\"\u003ehttps://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview\u003c/a\u003e`.", "base_url": null, - "custom_base_url": "\u0027{Endpoint}/text/analytics/v3.2-preview.1\u0027", + "custom_base_url": "\u0027{Endpoint}/text/analytics/v3.2-preview.2\u0027", "azure_arm": false, "has_lro_operations": true, "client_side_validation": false, @@ -94,48 +94,48 @@ "_analyze_initial" : { "sync": { "signature": "def _analyze_initial(\n self,\n body=None, # type: Optional[\"_models.AnalyzeBatchInput\"]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _analyze_initial(\n self,\n body: Optional[\"_models.AnalyzeBatchInput\"] = None,\n **kwargs: Any\n) -\u003e Optional[\"_models.AnalyzeJobState\"]:\n", - "doc": "\"\"\"\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "body" }, "begin_analyze" : { "sync": { "signature": "def begin_analyze(\n self,\n body=None, # type: Optional[\"_models.AnalyzeBatchInput\"]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Submit analysis job.\n\nSubmit a collection of text documents for analysis. Specify one or more unique tasks to be\nexecuted.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response)\n:rtype: ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Submit analysis job.\n\nSubmit a collection of text documents for analysis. Specify one or more unique tasks to be\nexecuted.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response)\n:rtype: ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_analyze(\n self,\n body: Optional[\"_models.AnalyzeBatchInput\"] = None,\n **kwargs: Any\n) -\u003e AsyncAnalyzeActionsLROPoller[\"_models.AnalyzeJobState\"]:\n", - "doc": "\"\"\"Submit analysis job.\n\nSubmit a collection of text documents for analysis. Specify one or more unique tasks to be\nexecuted.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncAnalyzeActionsLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response)\n:rtype: ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Submit analysis job.\n\nSubmit a collection of text documents for analysis. Specify one or more unique tasks to be\nexecuted.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncAnalyzeActionsLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response)\n:rtype: ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "call": "body" }, "analyze_status" : { "sync": { "signature": "def analyze_status(\n self,\n job_id, # type: str\n show_stats=None, # type: Optional[bool]\n top=20, # type: Optional[int]\n skip=0, # type: Optional[int]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get analysis status and results.\n\nGet the status of an analysis job. A job may consist of one or more tasks. Once all tasks are\ncompleted, the job will transition to the completed state and results will be available for\neach task.\n\n:param job_id: Job ID for Analyze.\n:type job_id: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get analysis status and results.\n\nGet the status of an analysis job. A job may consist of one or more tasks. Once all tasks are\ncompleted, the job will transition to the completed state and results will be available for\neach task.\n\n:param job_id: Job ID for Analyze.\n:type job_id: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def analyze_status(\n self,\n job_id: str,\n show_stats: Optional[bool] = None,\n top: Optional[int] = 20,\n skip: Optional[int] = 0,\n **kwargs: Any\n) -\u003e \"_models.AnalyzeJobState\":\n", - "doc": "\"\"\"Get analysis status and results.\n\nGet the status of an analysis job. A job may consist of one or more tasks. Once all tasks are\ncompleted, the job will transition to the completed state and results will be available for\neach task.\n\n:param job_id: Job ID for Analyze.\n:type job_id: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get analysis status and results.\n\nGet the status of an analysis job. A job may consist of one or more tasks. Once all tasks are\ncompleted, the job will transition to the completed state and results will be available for\neach task.\n\n:param job_id: Job ID for Analyze.\n:type job_id: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "job_id, show_stats, top, skip" }, "health_status" : { "sync": { "signature": "def health_status(\n self,\n job_id, # type: str\n top=20, # type: Optional[int]\n skip=0, # type: Optional[int]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get healthcare analysis job status and results.\n\nGet details of the healthcare prediction job specified by the jobId.\n\n:param job_id: Job ID.\n:type job_id: str\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get healthcare analysis job status and results.\n\nGet details of the healthcare prediction job specified by the jobId.\n\n:param job_id: Job ID.\n:type job_id: str\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def health_status(\n self,\n job_id: str,\n top: Optional[int] = 20,\n skip: Optional[int] = 0,\n show_stats: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.HealthcareJobState\":\n", - "doc": "\"\"\"Get healthcare analysis job status and results.\n\nGet details of the healthcare prediction job specified by the jobId.\n\n:param job_id: Job ID.\n:type job_id: str\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get healthcare analysis job status and results.\n\nGet details of the healthcare prediction job specified by the jobId.\n\n:param job_id: Job ID.\n:type job_id: str\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "job_id, top, skip, show_stats" }, @@ -166,96 +166,96 @@ "_health_initial" : { "sync": { "signature": "def _health_initial(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _health_initial(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n logging_opt_out: Optional[bool] = None,\n **kwargs: Any\n) -\u003e Optional[\"_models.HealthcareJobState\"]:\n", - "doc": "\"\"\"\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, string_index_type, logging_opt_out" }, "begin_health" : { "sync": { "signature": "def begin_health(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Submit healthcare analysis job.\n\nStart a healthcare analysis job to recognize healthcare related entities (drugs, conditions,\nsymptoms, etc) and their relations.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AnalyzeHealthcareEntitiesLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response)\n:rtype: ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Submit healthcare analysis job.\n\nStart a healthcare analysis job to recognize healthcare related entities (drugs, conditions,\nsymptoms, etc) and their relations.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AnalyzeHealthcareEntitiesLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response)\n:rtype: ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_health(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n logging_opt_out: Optional[bool] = None,\n **kwargs: Any\n) -\u003e AsyncAnalyzeHealthcareEntitiesLROPoller[\"_models.HealthcareJobState\"]:\n", - "doc": "\"\"\"Submit healthcare analysis job.\n\nStart a healthcare analysis job to recognize healthcare related entities (drugs, conditions,\nsymptoms, etc) and their relations.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncAnalyzeHealthcareEntitiesLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response)\n:rtype: ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Submit healthcare analysis job.\n\nStart a healthcare analysis job to recognize healthcare related entities (drugs, conditions,\nsymptoms, etc) and their relations.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncAnalyzeHealthcareEntitiesLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response)\n:rtype: ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "call": "documents, model_version, string_index_type, logging_opt_out" }, "entities_recognition_general" : { "sync": { "signature": "def entities_recognition_general(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def entities_recognition_general(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n logging_opt_out: Optional[bool] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n **kwargs: Any\n) -\u003e \"_models.EntitiesResult\":\n", - "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats, logging_opt_out, string_index_type" }, "entities_recognition_pii" : { "sync": { "signature": "def entities_recognition_pii(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n domain=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n pii_categories=None, # type: Optional[List[Union[str, \"_models.PiiCategory\"]]]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param domain: (Optional) if specified, will set the PII domain to include only a subset of the\n entity categories. Possible values include: \u0027PHI\u0027, \u0027none\u0027.\n:type domain: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:param pii_categories: (Optional) describes the PII categories to return.\n:type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory]\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PiiResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param domain: (Optional) if specified, will set the PII domain to include only a subset of the\n entity categories. Possible values include: \u0027PHI\u0027, \u0027none\u0027.\n:type domain: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:param pii_categories: (Optional) describes the PII categories to return.\n:type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory]\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PiiResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def entities_recognition_pii(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n logging_opt_out: Optional[bool] = None,\n domain: Optional[str] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n pii_categories: Optional[List[Union[str, \"_models.PiiCategory\"]]] = None,\n **kwargs: Any\n) -\u003e \"_models.PiiResult\":\n", - "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param domain: (Optional) if specified, will set the PII domain to include only a subset of the\n entity categories. Possible values include: \u0027PHI\u0027, \u0027none\u0027.\n:type domain: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:param pii_categories: (Optional) describes the PII categories to return.\n:type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory]\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PiiResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param domain: (Optional) if specified, will set the PII domain to include only a subset of the\n entity categories. Possible values include: \u0027PHI\u0027, \u0027none\u0027.\n:type domain: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:param pii_categories: (Optional) describes the PII categories to return.\n:type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory]\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PiiResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats, logging_opt_out, domain, string_index_type, pii_categories" }, "entities_linking" : { "sync": { "signature": "def entities_linking(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Linked entities from a well known knowledge base.\n\nThe API returns a list of recognized entities with links to a well known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Linked entities from a well known knowledge base.\n\nThe API returns a list of recognized entities with links to a well known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def entities_linking(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n logging_opt_out: Optional[bool] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n **kwargs: Any\n) -\u003e \"_models.EntityLinkingResult\":\n", - "doc": "\"\"\"Linked entities from a well known knowledge base.\n\nThe API returns a list of recognized entities with links to a well known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Linked entities from a well known knowledge base.\n\nThe API returns a list of recognized entities with links to a well known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats, logging_opt_out, string_index_type" }, "key_phrases" : { "sync": { "signature": "def key_phrases(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def key_phrases(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n logging_opt_out: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.KeyPhraseResult\":\n", - "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats, logging_opt_out" }, "languages" : { "sync": { "signature": "def languages(\n self,\n documents, # type: List[\"_models.LanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def languages(\n self,\n documents: List[\"_models.LanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n logging_opt_out: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.LanguageResult\":\n", - "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats, logging_opt_out" }, "sentiment" : { "sync": { "signature": "def sentiment(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n opinion_mining=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(targets and assessments).\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param opinion_mining: (Optional) if set to true, response will contain not only sentiment\n prediction but also opinion mining (aspect-based sentiment analysis) results.\n:type opinion_mining: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(targets and assessments).\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param opinion_mining: (Optional) if set to true, response will contain not only sentiment\n prediction but also opinion mining (aspect-based sentiment analysis) results.\n:type opinion_mining: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def sentiment(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n logging_opt_out: Optional[bool] = None,\n opinion_mining: Optional[bool] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n **kwargs: Any\n) -\u003e \"_models.SentimentResponse\":\n", - "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(targets and assessments).\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param opinion_mining: (Optional) if set to true, response will contain not only sentiment\n prediction but also opinion mining (aspect-based sentiment analysis) results.\n:type opinion_mining: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(targets and assessments).\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param opinion_mining: (Optional) if set to true, response will contain not only sentiment\n prediction but also opinion mining (aspect-based sentiment analysis) results.\n:type opinion_mining: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats, logging_opt_out, opinion_mining, string_index_type" } diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_text_analytics_client.py similarity index 98% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_text_analytics_client.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_text_analytics_client.py index 508b5421ffa8..59716e7b2f9d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_text_analytics_client.py @@ -40,7 +40,7 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{Endpoint}/text/analytics/v3.2-preview.1' + base_url = '{Endpoint}/text/analytics/v3.2-preview.2' self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/__init__.py similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/__init__.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/__init__.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/_configuration.py similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/_configuration.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/_configuration.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/_text_analytics_client.py similarity index 98% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/_text_analytics_client.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/_text_analytics_client.py index c2363aa1e6a4..221b9ec9f1d9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/_text_analytics_client.py @@ -37,7 +37,7 @@ def __init__( endpoint: str, **kwargs: Any ) -> None: - base_url = '{Endpoint}/text/analytics/v3.2-preview.1' + base_url = '{Endpoint}/text/analytics/v3.2-preview.2' self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/operations/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/operations/__init__.py similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/operations/__init__.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/operations/__init__.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/operations/_text_analytics_client_operations.py similarity index 98% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/operations/_text_analytics_client_operations.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/operations/_text_analytics_client_operations.py index ab03931dd124..e575cdc93bb5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/operations/_text_analytics_client_operations.py @@ -90,7 +90,7 @@ async def begin_analyze( executed. :param body: Collection of documents to analyze and tasks to execute. - :type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput + :type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncAnalyzeActionsLROPollingMethod. @@ -98,7 +98,7 @@ async def begin_analyze( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response) - :rtype: ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState] + :rtype: ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -170,7 +170,7 @@ async def analyze_status( :type skip: int :keyword callable cls: A custom type or function that will be passed the direct response :return: AnalyzeJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalyzeJobState"] @@ -243,7 +243,7 @@ async def health_status( :type show_stats: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: HealthcareJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.HealthcareJobState"] @@ -475,14 +475,14 @@ async def begin_health( symptoms, etc) and their relations. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with the Text Analytics natural language @@ -498,7 +498,7 @@ async def begin_health( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response) - :rtype: ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState] + :rtype: ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -563,7 +563,7 @@ async def entities_recognition_general( Analytics API` for the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -581,10 +581,10 @@ async def entities_recognition_general( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntitiesResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.EntitiesResult"] @@ -660,7 +660,7 @@ async def entities_recognition_pii( list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -681,12 +681,12 @@ async def entities_recognition_pii( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory] + :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] :keyword callable cls: A custom type or function that will be passed the direct response :return: PiiResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PiiResult"] @@ -762,7 +762,7 @@ async def entities_linking( the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -780,10 +780,10 @@ async def entities_linking( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntityLinkingResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.EntityLinkingResult"] @@ -854,7 +854,7 @@ async def key_phrases( enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -871,7 +871,7 @@ async def key_phrases( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyPhraseResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyPhraseResult"] @@ -941,7 +941,7 @@ async def languages( enabled languages. :param documents: - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -958,7 +958,7 @@ async def languages( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: LanguageResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.LanguageResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.LanguageResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LanguageResult"] @@ -1029,7 +1029,7 @@ async def sentiment( (targets and assessments). :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -1050,10 +1050,10 @@ async def sentiment( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: SentimentResponse, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SentimentResponse"] diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/__init__.py similarity index 80% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/__init__.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/__init__.py index a947b92f2552..4b2a6064fdfe 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/__init__.py @@ -13,6 +13,19 @@ from ._models_py3 import AnalyzeJobErrorsAndStatistics from ._models_py3 import AnalyzeJobMetadata from ._models_py3 import AnalyzeJobState + from ._models_py3 import ClassificationResult + from ._models_py3 import CustomEntitiesResult + from ._models_py3 import CustomEntitiesTask + from ._models_py3 import CustomEntitiesTaskParameters + from ._models_py3 import CustomEntitiesTaskResult + from ._models_py3 import CustomMultiClassificationResult + from ._models_py3 import CustomMultiClassificationTask + from ._models_py3 import CustomMultiClassificationTaskParameters + from ._models_py3 import CustomMultiClassificationTaskResult + from ._models_py3 import CustomSingleClassificationResult + from ._models_py3 import CustomSingleClassificationTask + from ._models_py3 import CustomSingleClassificationTaskParameters + from ._models_py3 import CustomSingleClassificationTaskResult from ._models_py3 import DetectedLanguage from ._models_py3 import DocumentEntities from ._models_py3 import DocumentError @@ -62,6 +75,7 @@ from ._models_py3 import LanguageResult from ._models_py3 import LinkedEntity from ._models_py3 import Match + from ._models_py3 import MultiClassificationDocument from ._models_py3 import MultiLanguageBatchInput from ._models_py3 import MultiLanguageInput from ._models_py3 import Pagination @@ -79,11 +93,15 @@ from ._models_py3 import SentimentConfidenceScorePerLabel from ._models_py3 import SentimentResponse from ._models_py3 import SentimentTaskResult + from ._models_py3 import SingleClassificationDocument from ._models_py3 import TargetConfidenceScoreLabel from ._models_py3 import TargetRelation from ._models_py3 import TaskState from ._models_py3 import TasksState from ._models_py3 import TasksStateTasks + from ._models_py3 import TasksStateTasksCustomEntityRecognitionTasksItem + from ._models_py3 import TasksStateTasksCustomMultiClassificationTasksItem + from ._models_py3 import TasksStateTasksCustomSingleClassificationTasksItem from ._models_py3 import TasksStateTasksEntityLinkingTasksItem from ._models_py3 import TasksStateTasksEntityRecognitionPiiTasksItem from ._models_py3 import TasksStateTasksEntityRecognitionTasksItem @@ -99,6 +117,19 @@ from ._models import AnalyzeJobErrorsAndStatistics # type: ignore from ._models import AnalyzeJobMetadata # type: ignore from ._models import AnalyzeJobState # type: ignore + from ._models import ClassificationResult # type: ignore + from ._models import CustomEntitiesResult # type: ignore + from ._models import CustomEntitiesTask # type: ignore + from ._models import CustomEntitiesTaskParameters # type: ignore + from ._models import CustomEntitiesTaskResult # type: ignore + from ._models import CustomMultiClassificationResult # type: ignore + from ._models import CustomMultiClassificationTask # type: ignore + from ._models import CustomMultiClassificationTaskParameters # type: ignore + from ._models import CustomMultiClassificationTaskResult # type: ignore + from ._models import CustomSingleClassificationResult # type: ignore + from ._models import CustomSingleClassificationTask # type: ignore + from ._models import CustomSingleClassificationTaskParameters # type: ignore + from ._models import CustomSingleClassificationTaskResult # type: ignore from ._models import DetectedLanguage # type: ignore from ._models import DocumentEntities # type: ignore from ._models import DocumentError # type: ignore @@ -148,6 +179,7 @@ from ._models import LanguageResult # type: ignore from ._models import LinkedEntity # type: ignore from ._models import Match # type: ignore + from ._models import MultiClassificationDocument # type: ignore from ._models import MultiLanguageBatchInput # type: ignore from ._models import MultiLanguageInput # type: ignore from ._models import Pagination # type: ignore @@ -165,11 +197,15 @@ from ._models import SentimentConfidenceScorePerLabel # type: ignore from ._models import SentimentResponse # type: ignore from ._models import SentimentTaskResult # type: ignore + from ._models import SingleClassificationDocument # type: ignore from ._models import TargetConfidenceScoreLabel # type: ignore from ._models import TargetRelation # type: ignore from ._models import TaskState # type: ignore from ._models import TasksState # type: ignore from ._models import TasksStateTasks # type: ignore + from ._models import TasksStateTasksCustomEntityRecognitionTasksItem # type: ignore + from ._models import TasksStateTasksCustomMultiClassificationTasksItem # type: ignore + from ._models import TasksStateTasksCustomSingleClassificationTasksItem # type: ignore from ._models import TasksStateTasksEntityLinkingTasksItem # type: ignore from ._models import TasksStateTasksEntityRecognitionPiiTasksItem # type: ignore from ._models import TasksStateTasksEntityRecognitionTasksItem # type: ignore @@ -206,6 +242,19 @@ 'AnalyzeJobErrorsAndStatistics', 'AnalyzeJobMetadata', 'AnalyzeJobState', + 'ClassificationResult', + 'CustomEntitiesResult', + 'CustomEntitiesTask', + 'CustomEntitiesTaskParameters', + 'CustomEntitiesTaskResult', + 'CustomMultiClassificationResult', + 'CustomMultiClassificationTask', + 'CustomMultiClassificationTaskParameters', + 'CustomMultiClassificationTaskResult', + 'CustomSingleClassificationResult', + 'CustomSingleClassificationTask', + 'CustomSingleClassificationTaskParameters', + 'CustomSingleClassificationTaskResult', 'DetectedLanguage', 'DocumentEntities', 'DocumentError', @@ -255,6 +304,7 @@ 'LanguageResult', 'LinkedEntity', 'Match', + 'MultiClassificationDocument', 'MultiLanguageBatchInput', 'MultiLanguageInput', 'Pagination', @@ -272,11 +322,15 @@ 'SentimentConfidenceScorePerLabel', 'SentimentResponse', 'SentimentTaskResult', + 'SingleClassificationDocument', 'TargetConfidenceScoreLabel', 'TargetRelation', 'TaskState', 'TasksState', 'TasksStateTasks', + 'TasksStateTasksCustomEntityRecognitionTasksItem', + 'TasksStateTasksCustomMultiClassificationTasksItem', + 'TasksStateTasksCustomSingleClassificationTasksItem', 'TasksStateTasksEntityLinkingTasksItem', 'TasksStateTasksEntityRecognitionPiiTasksItem', 'TasksStateTasksEntityRecognitionTasksItem', diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models.py similarity index 76% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models.py index 4b7704342caa..064374a6b1e5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models.py @@ -17,7 +17,7 @@ class AnalysisInput(msrest.serialization.Model): :param analysis_input: Required. Contains a set of input documents to be analyzed by the service. - :type analysis_input: ~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageBatchInput + :type analysis_input: ~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageBatchInput """ _validation = { @@ -43,7 +43,7 @@ class JobManifest(msrest.serialization.Model): :param tasks: Required. The set of tasks to execute on the input documents. Cannot specify the same task more than once. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.JobManifestTasks + :type tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.JobManifestTasks """ _validation = { @@ -88,10 +88,10 @@ class AnalyzeBatchInput(JobDescriptor, AnalysisInput, JobManifest): :param tasks: Required. The set of tasks to execute on the input documents. Cannot specify the same task more than once. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.JobManifestTasks + :type tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.JobManifestTasks :param analysis_input: Required. Contains a set of input documents to be analyzed by the service. - :type analysis_input: ~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageBatchInput + :type analysis_input: ~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageBatchInput :param display_name: Optional display name for the analysis job. :type display_name: str """ @@ -143,10 +143,10 @@ class AnalyzeJobErrorsAndStatistics(msrest.serialization.Model): """AnalyzeJobErrorsAndStatistics. :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics """ _attribute_map = { @@ -178,7 +178,7 @@ class JobMetadata(msrest.serialization.Model): :type last_update_date_time: ~datetime.datetime :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -225,7 +225,7 @@ class AnalyzeJobMetadata(JobMetadata, AnalyzeJobDisplayName): :type last_update_date_time: ~datetime.datetime :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -282,7 +282,7 @@ class TasksState(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param tasks: Required. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasks + :type tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasks """ _validation = { @@ -309,12 +309,12 @@ class AnalyzeJobState(AnalyzeJobMetadata, TasksState, AnalyzeJobErrorsAndStatist :param next_link: :type next_link: str :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param tasks: Required. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasks + :type tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasks :param display_name: :type display_name: str :param created_date_time: Required. @@ -327,7 +327,7 @@ class AnalyzeJobState(AnalyzeJobMetadata, TasksState, AnalyzeJobErrorsAndStatist :type last_update_date_time: ~datetime.datetime :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -388,6 +388,409 @@ def __init__( self.status = kwargs['status'] +class ClassificationResult(msrest.serialization.Model): + """ClassificationResult. + + All required parameters must be populated in order to send to Azure. + + :param category: Required. Classification type. + :type category: str + :param confidence_score: Required. Confidence score between 0 and 1 of the recognized + classification. + :type confidence_score: float + """ + + _validation = { + 'category': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(ClassificationResult, self).__init__(**kwargs) + self.category = kwargs['category'] + self.confidence_score = kwargs['confidence_score'] + + +class CustomEntitiesResult(msrest.serialization.Model): + """CustomEntitiesResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentEntities] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :param project_name: Required. This field indicates the project name for the model. + :type project_name: str + :param deployment_name: Required. This field indicates the deployment name for the model. + :type deployment_name: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomEntitiesResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.project_name = kwargs['project_name'] + self.deployment_name = kwargs['deployment_name'] + + +class CustomEntitiesTask(msrest.serialization.Model): + """CustomEntitiesTask. + + :param parameters: + :type parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesTaskParameters + :param task_name: + :type task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'CustomEntitiesTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomEntitiesTask, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.task_name = kwargs.get('task_name', None) + + +class CustomEntitiesTaskParameters(msrest.serialization.Model): + """CustomEntitiesTaskParameters. + + All required parameters must be populated in order to send to Azure. + + :param project_name: Required. + :type project_name: str + :param deployment_name: Required. + :type deployment_name: str + :param logging_opt_out: + :type logging_opt_out: bool + :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + + _validation = { + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomEntitiesTaskParameters, self).__init__(**kwargs) + self.project_name = kwargs['project_name'] + self.deployment_name = kwargs['deployment_name'] + self.logging_opt_out = kwargs.get('logging_opt_out', False) + self.string_index_type = kwargs.get('string_index_type', None) + + +class CustomEntitiesTaskResult(msrest.serialization.Model): + """CustomEntitiesTaskResult. + + :param results: + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomEntitiesResult'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomEntitiesTaskResult, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class CustomMultiClassificationResult(msrest.serialization.Model): + """CustomMultiClassificationResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiClassificationDocument] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :param project_name: Required. This field indicates the project name for the model. + :type project_name: str + :param deployment_name: Required. This field indicates the deployment name for the model. + :type deployment_name: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[MultiClassificationDocument]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomMultiClassificationResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.project_name = kwargs['project_name'] + self.deployment_name = kwargs['deployment_name'] + + +class CustomMultiClassificationTask(msrest.serialization.Model): + """CustomMultiClassificationTask. + + :param parameters: + :type parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationTaskParameters + :param task_name: + :type task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'CustomMultiClassificationTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomMultiClassificationTask, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.task_name = kwargs.get('task_name', None) + + +class CustomMultiClassificationTaskParameters(msrest.serialization.Model): + """CustomMultiClassificationTaskParameters. + + All required parameters must be populated in order to send to Azure. + + :param project_name: Required. + :type project_name: str + :param deployment_name: Required. + :type deployment_name: str + :param logging_opt_out: + :type logging_opt_out: bool + """ + + _validation = { + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomMultiClassificationTaskParameters, self).__init__(**kwargs) + self.project_name = kwargs['project_name'] + self.deployment_name = kwargs['deployment_name'] + self.logging_opt_out = kwargs.get('logging_opt_out', False) + + +class CustomMultiClassificationTaskResult(msrest.serialization.Model): + """CustomMultiClassificationTaskResult. + + :param results: + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomMultiClassificationResult'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomMultiClassificationTaskResult, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class CustomSingleClassificationResult(msrest.serialization.Model): + """CustomSingleClassificationResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.SingleClassificationDocument] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :param project_name: Required. This field indicates the project name for the model. + :type project_name: str + :param deployment_name: Required. This field indicates the deployment name for the model. + :type deployment_name: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[SingleClassificationDocument]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomSingleClassificationResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.project_name = kwargs['project_name'] + self.deployment_name = kwargs['deployment_name'] + + +class CustomSingleClassificationTask(msrest.serialization.Model): + """CustomSingleClassificationTask. + + :param parameters: + :type parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationTaskParameters + :param task_name: + :type task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'CustomSingleClassificationTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomSingleClassificationTask, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.task_name = kwargs.get('task_name', None) + + +class CustomSingleClassificationTaskParameters(msrest.serialization.Model): + """CustomSingleClassificationTaskParameters. + + All required parameters must be populated in order to send to Azure. + + :param project_name: Required. + :type project_name: str + :param deployment_name: Required. + :type deployment_name: str + :param logging_opt_out: + :type logging_opt_out: bool + """ + + _validation = { + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomSingleClassificationTaskParameters, self).__init__(**kwargs) + self.project_name = kwargs['project_name'] + self.deployment_name = kwargs['deployment_name'] + self.logging_opt_out = kwargs.get('logging_opt_out', False) + + +class CustomSingleClassificationTaskResult(msrest.serialization.Model): + """CustomSingleClassificationTaskResult. + + :param results: + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomSingleClassificationResult'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomSingleClassificationTaskResult, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + class DetectedLanguage(msrest.serialization.Model): """DetectedLanguage. @@ -433,12 +836,12 @@ class DocumentEntities(msrest.serialization.Model): :param id: Required. Unique, non-empty document identifier. :type id: str :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.Entity] + :type entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.Entity] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -473,7 +876,7 @@ class DocumentError(msrest.serialization.Model): :param id: Required. Document Id. :type id: str :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError + :type error: ~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError """ _validation = { @@ -503,14 +906,14 @@ class DocumentHealthcareEntities(msrest.serialization.Model): :param id: Required. Unique, non-empty document identifier. :type id: str :param entities: Required. Healthcare entities. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntity] + :type entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntity] :param relations: Required. Healthcare entity relations. - :type relations: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareRelation] + :type relations: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareRelation] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -551,10 +954,10 @@ class DocumentKeyPhrases(msrest.serialization.Model): phrases returned is proportional to the number of words in the input document. :type key_phrases: list[str] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -589,12 +992,12 @@ class DocumentLanguage(msrest.serialization.Model): :param id: Required. Unique, non-empty document identifier. :type id: str :param detected_language: Required. Detected Language. - :type detected_language: ~azure.ai.textanalytics.v3_2_preview_1.models.DetectedLanguage + :type detected_language: ~azure.ai.textanalytics.v3_2_preview_2.models.DetectedLanguage :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -629,12 +1032,12 @@ class DocumentLinkedEntities(msrest.serialization.Model): :param id: Required. Unique, non-empty document identifier. :type id: str :param entities: Required. Recognized well known entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.LinkedEntity] + :type entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.LinkedEntity] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -670,18 +1073,18 @@ class DocumentSentiment(msrest.serialization.Model): :type id: str :param sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). Possible values include: "positive", "neutral", "negative", "mixed". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentSentimentValue + :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentSentimentValue :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics :param confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 for each sentiment class. :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentConfidenceScorePerLabel + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentConfidenceScorePerLabel :param sentences: Required. Sentence level sentiment analysis. - :type sentences: list[~azure.ai.textanalytics.v3_2_preview_1.models.SentenceSentiment] + :type sentences: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceSentiment] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] """ _validation = { @@ -750,12 +1153,12 @@ class EntitiesResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentEntities] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentEntities] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -788,7 +1191,7 @@ class EntitiesTask(msrest.serialization.Model): """EntitiesTask. :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesTaskParameters + :type parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesTaskParameters :param task_name: :type task_name: str """ @@ -816,7 +1219,7 @@ class EntitiesTaskParameters(msrest.serialization.Model): :type logging_opt_out: bool :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType """ _attribute_map = { @@ -839,7 +1242,7 @@ class EntitiesTaskResult(msrest.serialization.Model): """EntitiesTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult """ _attribute_map = { @@ -911,12 +1314,12 @@ class EntityLinkingResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentLinkedEntities] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentLinkedEntities] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -949,7 +1352,7 @@ class EntityLinkingTask(msrest.serialization.Model): """EntityLinkingTask. :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingTaskParameters + :type parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingTaskParameters :param task_name: :type task_name: str """ @@ -977,7 +1380,7 @@ class EntityLinkingTaskParameters(msrest.serialization.Model): :type logging_opt_out: bool :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType """ _attribute_map = { @@ -1000,7 +1403,7 @@ class EntityLinkingTaskResult(msrest.serialization.Model): """EntityLinkingTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult """ _attribute_map = { @@ -1021,7 +1424,7 @@ class ErrorResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError + :type error: ~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError """ _validation = { @@ -1048,12 +1451,12 @@ class ExtractedDocumentSummary(msrest.serialization.Model): :param id: Required. Unique, non-empty document identifier. :type id: str :param sentences: Required. A ranked list of sentences representing the extracted summary. - :type sentences: list[~azure.ai.textanalytics.v3_2_preview_1.models.ExtractedSummarySentence] + :type sentences: list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractedSummarySentence] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -1128,12 +1531,12 @@ class ExtractiveSummarizationResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.ExtractedDocumentSummary] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractedDocumentSummary] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -1167,7 +1570,7 @@ class ExtractiveSummarizationTask(msrest.serialization.Model): :param parameters: :type parameters: - ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationTaskParameters + ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTaskParameters :param task_name: :type task_name: str """ @@ -1195,12 +1598,12 @@ class ExtractiveSummarizationTaskParameters(msrest.serialization.Model): :type logging_opt_out: bool :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param sentence_count: :type sentence_count: int :param sort_by: Possible values include: "Offset", "Rank". Default value: "Offset". :type sort_by: str or - ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationTaskParametersSortBy + ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTaskParametersSortBy """ _attribute_map = { @@ -1227,7 +1630,7 @@ class ExtractiveSummarizationTaskResult(msrest.serialization.Model): """ExtractiveSummarizationTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationResult """ _attribute_map = { @@ -1247,13 +1650,13 @@ class HealthcareAssertion(msrest.serialization.Model): :param conditionality: Describes any conditionality on the entity. Possible values include: "hypothetical", "conditional". - :type conditionality: str or ~azure.ai.textanalytics.v3_2_preview_1.models.Conditionality + :type conditionality: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Conditionality :param certainty: Describes the entities certainty and polarity. Possible values include: "positive", "positivePossible", "neutralPossible", "negativePossible", "negative". - :type certainty: str or ~azure.ai.textanalytics.v3_2_preview_1.models.Certainty + :type certainty: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Certainty :param association: Describes if the entity is the subject of the text or if it describes someone else. Possible values include: "subject", "other". - :type association: str or ~azure.ai.textanalytics.v3_2_preview_1.models.Association + :type association: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Association """ _attribute_map = { @@ -1276,12 +1679,12 @@ class HealthcareLinkingProperties(msrest.serialization.Model): """HealthcareLinkingProperties. :param assertion: - :type assertion: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareAssertion + :type assertion: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareAssertion :param name: Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. :type name: str :param links: Entity references in known data sources. - :type links: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityLink] + :type links: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityLink] """ _attribute_map = { @@ -1313,7 +1716,7 @@ class HealthcareEntityProperties(msrest.serialization.Model): "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". - :type category: str or ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityCategory + :type category: str or ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityCategory :param subcategory: (Optional) Entity sub type. :type subcategory: str :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' @@ -1362,12 +1765,12 @@ class HealthcareEntity(HealthcareEntityProperties, HealthcareLinkingProperties): All required parameters must be populated in order to send to Azure. :param assertion: - :type assertion: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareAssertion + :type assertion: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareAssertion :param name: Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. :type name: str :param links: Entity references in known data sources. - :type links: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityLink] + :type links: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityLink] :param text: Required. Entity text as appears in the request. :type text: str :param category: Required. Healthcare Entity Category. Possible values include: @@ -1376,7 +1779,7 @@ class HealthcareEntity(HealthcareEntityProperties, HealthcareLinkingProperties): "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". - :type category: str or ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityCategory + :type category: str or ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityCategory :param subcategory: (Optional) Entity sub type. :type subcategory: str :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' @@ -1459,9 +1862,9 @@ class HealthcareTaskResult(msrest.serialization.Model): """HealthcareTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareResult :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] """ _attribute_map = { @@ -1484,9 +1887,9 @@ class HealthcareJobState(JobMetadata, Pagination, HealthcareTaskResult): All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareResult :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] :param next_link: :type next_link: str :param created_date_time: Required. @@ -1499,7 +1902,7 @@ class HealthcareJobState(JobMetadata, Pagination, HealthcareTaskResult): :type last_update_date_time: ~datetime.datetime :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -1555,9 +1958,9 @@ class HealthcareRelation(msrest.serialization.Model): "FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication", "TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment", "UnitOfCondition", "UnitOfExamination", "ValueOfCondition", "ValueOfExamination". - :type relation_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.RelationType + :type relation_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.RelationType :param entities: Required. The entities in the relation. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareRelationEntity] + :type entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareRelationEntity] """ _validation = { @@ -1618,12 +2021,12 @@ class HealthcareResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentHealthcareEntities] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentHealthcareEntities] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -1661,7 +2064,7 @@ class InnerError(msrest.serialization.Model): "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", "InvalidCountryHint". - :type code: str or ~azure.ai.textanalytics.v3_2_preview_1.models.InnerErrorCodeValue + :type code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.InnerErrorCodeValue :param message: Required. Error message. :type message: str :param details: Error details. @@ -1669,7 +2072,7 @@ class InnerError(msrest.serialization.Model): :param target: Error target. :type target: str :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_2_preview_1.models.InnerError + :type innererror: ~azure.ai.textanalytics.v3_2_preview_2.models.InnerError """ _validation = { @@ -1702,21 +2105,30 @@ class JobManifestTasks(msrest.serialization.Model): :param entity_recognition_tasks: :type entity_recognition_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesTask] + list[~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesTask] :param entity_recognition_pii_tasks: - :type entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_2_preview_1.models.PiiTask] + :type entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_2_preview_2.models.PiiTask] :param key_phrase_extraction_tasks: :type key_phrase_extraction_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhrasesTask] + list[~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhrasesTask] :param entity_linking_tasks: :type entity_linking_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingTask] + list[~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingTask] :param sentiment_analysis_tasks: :type sentiment_analysis_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.SentimentAnalysisTask] + list[~azure.ai.textanalytics.v3_2_preview_2.models.SentimentAnalysisTask] :param extractive_summarization_tasks: :type extractive_summarization_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationTask] + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTask] + :param custom_entity_recognition_tasks: + :type custom_entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesTask] + :param custom_single_classification_tasks: + :type custom_single_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationTask] + :param custom_multi_classification_tasks: + :type custom_multi_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationTask] """ _attribute_map = { @@ -1726,6 +2138,9 @@ class JobManifestTasks(msrest.serialization.Model): 'entity_linking_tasks': {'key': 'entityLinkingTasks', 'type': '[EntityLinkingTask]'}, 'sentiment_analysis_tasks': {'key': 'sentimentAnalysisTasks', 'type': '[SentimentAnalysisTask]'}, 'extractive_summarization_tasks': {'key': 'extractiveSummarizationTasks', 'type': '[ExtractiveSummarizationTask]'}, + 'custom_entity_recognition_tasks': {'key': 'customEntityRecognitionTasks', 'type': '[CustomEntitiesTask]'}, + 'custom_single_classification_tasks': {'key': 'customSingleClassificationTasks', 'type': '[CustomSingleClassificationTask]'}, + 'custom_multi_classification_tasks': {'key': 'customMultiClassificationTasks', 'type': '[CustomMultiClassificationTask]'}, } def __init__( @@ -1739,6 +2154,9 @@ def __init__( self.entity_linking_tasks = kwargs.get('entity_linking_tasks', None) self.sentiment_analysis_tasks = kwargs.get('sentiment_analysis_tasks', None) self.extractive_summarization_tasks = kwargs.get('extractive_summarization_tasks', None) + self.custom_entity_recognition_tasks = kwargs.get('custom_entity_recognition_tasks', None) + self.custom_single_classification_tasks = kwargs.get('custom_single_classification_tasks', None) + self.custom_multi_classification_tasks = kwargs.get('custom_multi_classification_tasks', None) class KeyPhraseResult(msrest.serialization.Model): @@ -1747,12 +2165,12 @@ class KeyPhraseResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentKeyPhrases] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentKeyPhrases] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -1785,7 +2203,7 @@ class KeyPhrasesTask(msrest.serialization.Model): """KeyPhrasesTask. :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhrasesTaskParameters + :type parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhrasesTaskParameters :param task_name: :type task_name: str """ @@ -1831,7 +2249,7 @@ class KeyPhraseTaskResult(msrest.serialization.Model): """KeyPhraseTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult """ _attribute_map = { @@ -1852,7 +2270,7 @@ class LanguageBatchInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] """ _validation = { @@ -1911,12 +2329,12 @@ class LanguageResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentLanguage] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentLanguage] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -1953,7 +2371,7 @@ class LinkedEntity(msrest.serialization.Model): :param name: Required. Entity Linking formal name. :type name: str :param matches: Required. List of instances this entity appears in the text. - :type matches: list[~azure.ai.textanalytics.v3_2_preview_1.models.Match] + :type matches: list[~azure.ai.textanalytics.v3_2_preview_2.models.Match] :param language: Required. Language used in the data source. :type language: str :param id: Unique identifier of the recognized entity from the data source. @@ -2040,13 +2458,53 @@ def __init__( self.length = kwargs['length'] +class MultiClassificationDocument(msrest.serialization.Model): + """MultiClassificationDocument. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param classifications: Required. Recognized classification results in the document. + :type classifications: list[~azure.ai.textanalytics.v3_2_preview_2.models.ClassificationResult] + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'classifications': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'classifications': {'key': 'classifications', 'type': '[ClassificationResult]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + super(MultiClassificationDocument, self).__init__(**kwargs) + self.id = kwargs['id'] + self.classifications = kwargs['classifications'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + class MultiLanguageBatchInput(msrest.serialization.Model): """Contains a set of input documents to be analyzed by the service. All required parameters must be populated in order to send to Azure. :param documents: Required. The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] """ _validation = { @@ -2111,12 +2569,12 @@ class PiiDocumentEntities(msrest.serialization.Model): :param redacted_text: Required. Returns redacted text. :type redacted_text: str :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.Entity] + :type entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.Entity] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -2152,12 +2610,12 @@ class PiiResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.PiiDocumentEntities] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.PiiDocumentEntities] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -2190,7 +2648,7 @@ class PiiTask(msrest.serialization.Model): """PiiTask. :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiTaskParameters + :type parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiTaskParameters :param task_name: :type task_name: str """ @@ -2213,16 +2671,16 @@ class PiiTaskParameters(msrest.serialization.Model): """PiiTaskParameters. :param domain: Possible values include: "phi", "none". Default value: "none". - :type domain: str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiTaskParametersDomain + :type domain: str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiTaskParametersDomain :param model_version: :type model_version: str :param logging_opt_out: :type logging_opt_out: bool :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory] + :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType """ _validation = { @@ -2253,7 +2711,7 @@ class PiiTaskResult(msrest.serialization.Model): """PiiTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult """ _attribute_map = { @@ -2317,10 +2775,10 @@ class SentenceAssessment(msrest.serialization.Model): :param sentiment: Required. Assessment sentiment in the sentence. Possible values include: "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.TokenSentimentValue + :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TokenSentimentValue :param confidence_scores: Required. Assessment sentiment confidence scores in the sentence. :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.TargetConfidenceScoreLabel + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetConfidenceScoreLabel :param offset: Required. The assessment offset from the start of the sentence. :type offset: int :param length: Required. The length of the assessment. @@ -2371,19 +2829,19 @@ class SentenceSentiment(msrest.serialization.Model): :type text: str :param sentiment: Required. The predicted Sentiment for the sentence. Possible values include: "positive", "neutral", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.SentenceSentimentValue + :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.SentenceSentimentValue :param confidence_scores: Required. The sentiment confidence score between 0 and 1 for the sentence for all classes. :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentConfidenceScorePerLabel + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentConfidenceScorePerLabel :param offset: Required. The sentence offset from the start of the document. :type offset: int :param length: Required. The length of the sentence. :type length: int :param targets: The array of sentence targets for the sentence. - :type targets: list[~azure.ai.textanalytics.v3_2_preview_1.models.SentenceTarget] + :type targets: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceTarget] :param assessments: The array of assessments for the sentence. - :type assessments: list[~azure.ai.textanalytics.v3_2_preview_1.models.SentenceAssessment] + :type assessments: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceAssessment] """ _validation = { @@ -2425,11 +2883,11 @@ class SentenceTarget(msrest.serialization.Model): :param sentiment: Required. Targeted sentiment in the sentence. Possible values include: "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.TokenSentimentValue + :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TokenSentimentValue :param confidence_scores: Required. Target sentiment confidence scores for the target in the sentence. :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.TargetConfidenceScoreLabel + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetConfidenceScoreLabel :param offset: Required. The target offset from the start of the sentence. :type offset: int :param length: Required. The length of the target. @@ -2438,7 +2896,7 @@ class SentenceTarget(msrest.serialization.Model): :type text: str :param relations: Required. The array of either assessment or target objects which is related to the target. - :type relations: list[~azure.ai.textanalytics.v3_2_preview_1.models.TargetRelation] + :type relations: list[~azure.ai.textanalytics.v3_2_preview_2.models.TargetRelation] """ _validation = { @@ -2476,7 +2934,7 @@ class SentimentAnalysisTask(msrest.serialization.Model): """SentimentAnalysisTask. :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentAnalysisTaskParameters + :type parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentAnalysisTaskParameters :param task_name: :type task_name: str """ @@ -2506,7 +2964,7 @@ class SentimentAnalysisTaskParameters(msrest.serialization.Model): :type opinion_mining: bool :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType """ _attribute_map = { @@ -2568,12 +3026,12 @@ class SentimentResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Sentiment analysis per document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentSentiment] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentSentiment] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -2606,7 +3064,7 @@ class SentimentTaskResult(msrest.serialization.Model): """SentimentTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse """ _attribute_map = { @@ -2621,6 +3079,46 @@ def __init__( self.results = kwargs.get('results', None) +class SingleClassificationDocument(msrest.serialization.Model): + """SingleClassificationDocument. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param classification: Required. + :type classification: ~azure.ai.textanalytics.v3_2_preview_2.models.ClassificationResult + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'classification': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'classification': {'key': 'classification', 'type': 'ClassificationResult'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + super(SingleClassificationDocument, self).__init__(**kwargs) + self.id = kwargs['id'] + self.classification = kwargs['classification'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + class TargetConfidenceScoreLabel(msrest.serialization.Model): """Represents the confidence scores across all sentiment classes: positive, neutral, negative. @@ -2658,7 +3156,7 @@ class TargetRelation(msrest.serialization.Model): :param relation_type: Required. The type related to the target. Possible values include: "assessment", "target". - :type relation_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.TargetRelationType + :type relation_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TargetRelationType :param ref: Required. The JSON pointer indicating the linked object. :type ref: str """ @@ -2697,22 +3195,31 @@ class TasksStateTasks(msrest.serialization.Model): :type total: int :param entity_recognition_tasks: :type entity_recognition_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksEntityRecognitionTasksItem] + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityRecognitionTasksItem] :param entity_recognition_pii_tasks: :type entity_recognition_pii_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksEntityRecognitionPiiTasksItem] + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityRecognitionPiiTasksItem] :param key_phrase_extraction_tasks: :type key_phrase_extraction_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksKeyPhraseExtractionTasksItem] + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksKeyPhraseExtractionTasksItem] :param entity_linking_tasks: :type entity_linking_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksEntityLinkingTasksItem] + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityLinkingTasksItem] :param sentiment_analysis_tasks: :type sentiment_analysis_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksSentimentAnalysisTasksItem] + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksSentimentAnalysisTasksItem] :param extractive_summarization_tasks: :type extractive_summarization_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksExtractiveSummarizationTasksItem] + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksExtractiveSummarizationTasksItem] + :param custom_entity_recognition_tasks: + :type custom_entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomEntityRecognitionTasksItem] + :param custom_single_classification_tasks: + :type custom_single_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomSingleClassificationTasksItem] + :param custom_multi_classification_tasks: + :type custom_multi_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomMultiClassificationTasksItem] """ _validation = { @@ -2733,6 +3240,9 @@ class TasksStateTasks(msrest.serialization.Model): 'entity_linking_tasks': {'key': 'entityLinkingTasks', 'type': '[TasksStateTasksEntityLinkingTasksItem]'}, 'sentiment_analysis_tasks': {'key': 'sentimentAnalysisTasks', 'type': '[TasksStateTasksSentimentAnalysisTasksItem]'}, 'extractive_summarization_tasks': {'key': 'extractiveSummarizationTasks', 'type': '[TasksStateTasksExtractiveSummarizationTasksItem]'}, + 'custom_entity_recognition_tasks': {'key': 'customEntityRecognitionTasks', 'type': '[TasksStateTasksCustomEntityRecognitionTasksItem]'}, + 'custom_single_classification_tasks': {'key': 'customSingleClassificationTasks', 'type': '[TasksStateTasksCustomSingleClassificationTasksItem]'}, + 'custom_multi_classification_tasks': {'key': 'customMultiClassificationTasks', 'type': '[TasksStateTasksCustomMultiClassificationTasksItem]'}, } def __init__( @@ -2750,6 +3260,9 @@ def __init__( self.entity_linking_tasks = kwargs.get('entity_linking_tasks', None) self.sentiment_analysis_tasks = kwargs.get('sentiment_analysis_tasks', None) self.extractive_summarization_tasks = kwargs.get('extractive_summarization_tasks', None) + self.custom_entity_recognition_tasks = kwargs.get('custom_entity_recognition_tasks', None) + self.custom_single_classification_tasks = kwargs.get('custom_single_classification_tasks', None) + self.custom_multi_classification_tasks = kwargs.get('custom_multi_classification_tasks', None) class TaskState(msrest.serialization.Model): @@ -2763,7 +3276,7 @@ class TaskState(msrest.serialization.Model): :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -2788,20 +3301,140 @@ def __init__( self.status = kwargs['status'] +class TasksStateTasksCustomEntityRecognitionTasksItem(TaskState, CustomEntitiesTaskResult): + """TasksStateTasksCustomEntityRecognitionTasksItem. + + All required parameters must be populated in order to send to Azure. + + :param results: + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesResult + :param last_update_date_time: Required. + :type last_update_date_time: ~datetime.datetime + :param task_name: Required. + :type task_name: str + :param status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomEntitiesResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TasksStateTasksCustomEntityRecognitionTasksItem, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.last_update_date_time = kwargs['last_update_date_time'] + self.task_name = kwargs['task_name'] + self.status = kwargs['status'] + + +class TasksStateTasksCustomMultiClassificationTasksItem(TaskState, CustomMultiClassificationTaskResult): + """TasksStateTasksCustomMultiClassificationTasksItem. + + All required parameters must be populated in order to send to Azure. + + :param results: + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationResult + :param last_update_date_time: Required. + :type last_update_date_time: ~datetime.datetime + :param task_name: Required. + :type task_name: str + :param status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomMultiClassificationResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TasksStateTasksCustomMultiClassificationTasksItem, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.last_update_date_time = kwargs['last_update_date_time'] + self.task_name = kwargs['task_name'] + self.status = kwargs['status'] + + +class TasksStateTasksCustomSingleClassificationTasksItem(TaskState, CustomSingleClassificationTaskResult): + """TasksStateTasksCustomSingleClassificationTasksItem. + + All required parameters must be populated in order to send to Azure. + + :param results: + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationResult + :param last_update_date_time: Required. + :type last_update_date_time: ~datetime.datetime + :param task_name: Required. + :type task_name: str + :param status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomSingleClassificationResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TasksStateTasksCustomSingleClassificationTasksItem, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.last_update_date_time = kwargs['last_update_date_time'] + self.task_name = kwargs['task_name'] + self.status = kwargs['status'] + + class TasksStateTasksEntityLinkingTasksItem(TaskState, EntityLinkingTaskResult): """TasksStateTasksEntityLinkingTasksItem. All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult :param last_update_date_time: Required. :type last_update_date_time: ~datetime.datetime :param task_name: Required. :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -2834,14 +3467,14 @@ class TasksStateTasksEntityRecognitionPiiTasksItem(TaskState, PiiTaskResult): All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult :param last_update_date_time: Required. :type last_update_date_time: ~datetime.datetime :param task_name: Required. :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -2874,14 +3507,14 @@ class TasksStateTasksEntityRecognitionTasksItem(TaskState, EntitiesTaskResult): All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult :param last_update_date_time: Required. :type last_update_date_time: ~datetime.datetime :param task_name: Required. :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -2914,14 +3547,14 @@ class TasksStateTasksExtractiveSummarizationTasksItem(TaskState, ExtractiveSumma All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationResult :param last_update_date_time: Required. :type last_update_date_time: ~datetime.datetime :param task_name: Required. :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -2954,14 +3587,14 @@ class TasksStateTasksKeyPhraseExtractionTasksItem(TaskState, KeyPhraseTaskResult All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult :param last_update_date_time: Required. :type last_update_date_time: ~datetime.datetime :param task_name: Required. :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -2994,14 +3627,14 @@ class TasksStateTasksSentimentAnalysisTasksItem(TaskState, SentimentTaskResult): All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse :param last_update_date_time: Required. :type last_update_date_time: ~datetime.datetime :param task_name: Required. :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -3035,15 +3668,15 @@ class TextAnalyticsError(msrest.serialization.Model): :param code: Required. Error code. Possible values include: "InvalidRequest", "InvalidArgument", "InternalServerError", "ServiceUnavailable", "NotFound". - :type code: str or ~azure.ai.textanalytics.v3_2_preview_1.models.ErrorCodeValue + :type code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.ErrorCodeValue :param message: Required. Error message. :type message: str :param target: Error target. :type target: str :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_2_preview_1.models.InnerError + :type innererror: ~azure.ai.textanalytics.v3_2_preview_2.models.InnerError :param details: Details about specific errors that led to this reported error. - :type details: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] + :type details: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] """ _validation = { @@ -3078,7 +3711,7 @@ class TextAnalyticsWarning(msrest.serialization.Model): :param code: Required. Error code. Possible values include: "LongWordsInDocument", "DocumentTruncated". - :type code: str or ~azure.ai.textanalytics.v3_2_preview_1.models.WarningCodeValue + :type code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.WarningCodeValue :param message: Required. Warning message. :type message: str :param target_ref: A JSON pointer reference indicating the target object. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models_py3.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models_py3.py similarity index 76% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models_py3.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models_py3.py index c4991dc07db7..a4bda184341d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models_py3.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models_py3.py @@ -22,7 +22,7 @@ class AnalysisInput(msrest.serialization.Model): :param analysis_input: Required. Contains a set of input documents to be analyzed by the service. - :type analysis_input: ~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageBatchInput + :type analysis_input: ~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageBatchInput """ _validation = { @@ -50,7 +50,7 @@ class JobManifest(msrest.serialization.Model): :param tasks: Required. The set of tasks to execute on the input documents. Cannot specify the same task more than once. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.JobManifestTasks + :type tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.JobManifestTasks """ _validation = { @@ -99,10 +99,10 @@ class AnalyzeBatchInput(JobDescriptor, AnalysisInput, JobManifest): :param tasks: Required. The set of tasks to execute on the input documents. Cannot specify the same task more than once. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.JobManifestTasks + :type tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.JobManifestTasks :param analysis_input: Required. Contains a set of input documents to be analyzed by the service. - :type analysis_input: ~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageBatchInput + :type analysis_input: ~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageBatchInput :param display_name: Optional display name for the analysis job. :type display_name: str """ @@ -160,10 +160,10 @@ class AnalyzeJobErrorsAndStatistics(msrest.serialization.Model): """AnalyzeJobErrorsAndStatistics. :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics """ _attribute_map = { @@ -198,7 +198,7 @@ class JobMetadata(msrest.serialization.Model): :type last_update_date_time: ~datetime.datetime :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -251,7 +251,7 @@ class AnalyzeJobMetadata(JobMetadata, AnalyzeJobDisplayName): :type last_update_date_time: ~datetime.datetime :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -317,7 +317,7 @@ class TasksState(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param tasks: Required. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasks + :type tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasks """ _validation = { @@ -346,12 +346,12 @@ class AnalyzeJobState(AnalyzeJobMetadata, TasksState, AnalyzeJobErrorsAndStatist :param next_link: :type next_link: str :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param tasks: Required. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasks + :type tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasks :param display_name: :type display_name: str :param created_date_time: Required. @@ -364,7 +364,7 @@ class AnalyzeJobState(AnalyzeJobMetadata, TasksState, AnalyzeJobErrorsAndStatist :type last_update_date_time: ~datetime.datetime :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -436,6 +436,458 @@ def __init__( self.status = status +class ClassificationResult(msrest.serialization.Model): + """ClassificationResult. + + All required parameters must be populated in order to send to Azure. + + :param category: Required. Classification type. + :type category: str + :param confidence_score: Required. Confidence score between 0 and 1 of the recognized + classification. + :type confidence_score: float + """ + + _validation = { + 'category': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + *, + category: str, + confidence_score: float, + **kwargs + ): + super(ClassificationResult, self).__init__(**kwargs) + self.category = category + self.confidence_score = confidence_score + + +class CustomEntitiesResult(msrest.serialization.Model): + """CustomEntitiesResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentEntities] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :param project_name: Required. This field indicates the project name for the model. + :type project_name: str + :param deployment_name: Required. This field indicates the deployment name for the model. + :type deployment_name: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["DocumentEntities"], + errors: List["DocumentError"], + project_name: str, + deployment_name: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + super(CustomEntitiesResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.project_name = project_name + self.deployment_name = deployment_name + + +class CustomEntitiesTask(msrest.serialization.Model): + """CustomEntitiesTask. + + :param parameters: + :type parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesTaskParameters + :param task_name: + :type task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'CustomEntitiesTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + *, + parameters: Optional["CustomEntitiesTaskParameters"] = None, + task_name: Optional[str] = None, + **kwargs + ): + super(CustomEntitiesTask, self).__init__(**kwargs) + self.parameters = parameters + self.task_name = task_name + + +class CustomEntitiesTaskParameters(msrest.serialization.Model): + """CustomEntitiesTaskParameters. + + All required parameters must be populated in order to send to Azure. + + :param project_name: Required. + :type project_name: str + :param deployment_name: Required. + :type deployment_name: str + :param logging_opt_out: + :type logging_opt_out: bool + :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + + _validation = { + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + } + + def __init__( + self, + *, + project_name: str, + deployment_name: str, + logging_opt_out: Optional[bool] = False, + string_index_type: Optional[Union[str, "StringIndexType"]] = None, + **kwargs + ): + super(CustomEntitiesTaskParameters, self).__init__(**kwargs) + self.project_name = project_name + self.deployment_name = deployment_name + self.logging_opt_out = logging_opt_out + self.string_index_type = string_index_type + + +class CustomEntitiesTaskResult(msrest.serialization.Model): + """CustomEntitiesTaskResult. + + :param results: + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomEntitiesResult'}, + } + + def __init__( + self, + *, + results: Optional["CustomEntitiesResult"] = None, + **kwargs + ): + super(CustomEntitiesTaskResult, self).__init__(**kwargs) + self.results = results + + +class CustomMultiClassificationResult(msrest.serialization.Model): + """CustomMultiClassificationResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiClassificationDocument] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :param project_name: Required. This field indicates the project name for the model. + :type project_name: str + :param deployment_name: Required. This field indicates the deployment name for the model. + :type deployment_name: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[MultiClassificationDocument]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["MultiClassificationDocument"], + errors: List["DocumentError"], + project_name: str, + deployment_name: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + super(CustomMultiClassificationResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.project_name = project_name + self.deployment_name = deployment_name + + +class CustomMultiClassificationTask(msrest.serialization.Model): + """CustomMultiClassificationTask. + + :param parameters: + :type parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationTaskParameters + :param task_name: + :type task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'CustomMultiClassificationTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + *, + parameters: Optional["CustomMultiClassificationTaskParameters"] = None, + task_name: Optional[str] = None, + **kwargs + ): + super(CustomMultiClassificationTask, self).__init__(**kwargs) + self.parameters = parameters + self.task_name = task_name + + +class CustomMultiClassificationTaskParameters(msrest.serialization.Model): + """CustomMultiClassificationTaskParameters. + + All required parameters must be populated in order to send to Azure. + + :param project_name: Required. + :type project_name: str + :param deployment_name: Required. + :type deployment_name: str + :param logging_opt_out: + :type logging_opt_out: bool + """ + + _validation = { + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + } + + def __init__( + self, + *, + project_name: str, + deployment_name: str, + logging_opt_out: Optional[bool] = False, + **kwargs + ): + super(CustomMultiClassificationTaskParameters, self).__init__(**kwargs) + self.project_name = project_name + self.deployment_name = deployment_name + self.logging_opt_out = logging_opt_out + + +class CustomMultiClassificationTaskResult(msrest.serialization.Model): + """CustomMultiClassificationTaskResult. + + :param results: + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomMultiClassificationResult'}, + } + + def __init__( + self, + *, + results: Optional["CustomMultiClassificationResult"] = None, + **kwargs + ): + super(CustomMultiClassificationTaskResult, self).__init__(**kwargs) + self.results = results + + +class CustomSingleClassificationResult(msrest.serialization.Model): + """CustomSingleClassificationResult. + + All required parameters must be populated in order to send to Azure. + + :param documents: Required. Response by document. + :type documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.SingleClassificationDocument] + :param errors: Required. Errors by document id. + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :param statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :param project_name: Required. This field indicates the project name for the model. + :type project_name: str + :param deployment_name: Required. This field indicates the deployment name for the model. + :type deployment_name: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[SingleClassificationDocument]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["SingleClassificationDocument"], + errors: List["DocumentError"], + project_name: str, + deployment_name: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + super(CustomSingleClassificationResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.project_name = project_name + self.deployment_name = deployment_name + + +class CustomSingleClassificationTask(msrest.serialization.Model): + """CustomSingleClassificationTask. + + :param parameters: + :type parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationTaskParameters + :param task_name: + :type task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'CustomSingleClassificationTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + *, + parameters: Optional["CustomSingleClassificationTaskParameters"] = None, + task_name: Optional[str] = None, + **kwargs + ): + super(CustomSingleClassificationTask, self).__init__(**kwargs) + self.parameters = parameters + self.task_name = task_name + + +class CustomSingleClassificationTaskParameters(msrest.serialization.Model): + """CustomSingleClassificationTaskParameters. + + All required parameters must be populated in order to send to Azure. + + :param project_name: Required. + :type project_name: str + :param deployment_name: Required. + :type deployment_name: str + :param logging_opt_out: + :type logging_opt_out: bool + """ + + _validation = { + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + } + + def __init__( + self, + *, + project_name: str, + deployment_name: str, + logging_opt_out: Optional[bool] = False, + **kwargs + ): + super(CustomSingleClassificationTaskParameters, self).__init__(**kwargs) + self.project_name = project_name + self.deployment_name = deployment_name + self.logging_opt_out = logging_opt_out + + +class CustomSingleClassificationTaskResult(msrest.serialization.Model): + """CustomSingleClassificationTaskResult. + + :param results: + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomSingleClassificationResult'}, + } + + def __init__( + self, + *, + results: Optional["CustomSingleClassificationResult"] = None, + **kwargs + ): + super(CustomSingleClassificationTaskResult, self).__init__(**kwargs) + self.results = results + + class DetectedLanguage(msrest.serialization.Model): """DetectedLanguage. @@ -485,12 +937,12 @@ class DocumentEntities(msrest.serialization.Model): :param id: Required. Unique, non-empty document identifier. :type id: str :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.Entity] + :type entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.Entity] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -530,7 +982,7 @@ class DocumentError(msrest.serialization.Model): :param id: Required. Document Id. :type id: str :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError + :type error: ~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError """ _validation = { @@ -563,14 +1015,14 @@ class DocumentHealthcareEntities(msrest.serialization.Model): :param id: Required. Unique, non-empty document identifier. :type id: str :param entities: Required. Healthcare entities. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntity] + :type entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntity] :param relations: Required. Healthcare entity relations. - :type relations: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareRelation] + :type relations: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareRelation] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -617,10 +1069,10 @@ class DocumentKeyPhrases(msrest.serialization.Model): phrases returned is proportional to the number of words in the input document. :type key_phrases: list[str] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -660,12 +1112,12 @@ class DocumentLanguage(msrest.serialization.Model): :param id: Required. Unique, non-empty document identifier. :type id: str :param detected_language: Required. Detected Language. - :type detected_language: ~azure.ai.textanalytics.v3_2_preview_1.models.DetectedLanguage + :type detected_language: ~azure.ai.textanalytics.v3_2_preview_2.models.DetectedLanguage :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -705,12 +1157,12 @@ class DocumentLinkedEntities(msrest.serialization.Model): :param id: Required. Unique, non-empty document identifier. :type id: str :param entities: Required. Recognized well known entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.LinkedEntity] + :type entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.LinkedEntity] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -751,18 +1203,18 @@ class DocumentSentiment(msrest.serialization.Model): :type id: str :param sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). Possible values include: "positive", "neutral", "negative", "mixed". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentSentimentValue + :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentSentimentValue :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics :param confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 for each sentiment class. :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentConfidenceScorePerLabel + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentConfidenceScorePerLabel :param sentences: Required. Sentence level sentiment analysis. - :type sentences: list[~azure.ai.textanalytics.v3_2_preview_1.models.SentenceSentiment] + :type sentences: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceSentiment] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] """ _validation = { @@ -841,12 +1293,12 @@ class EntitiesResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentEntities] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentEntities] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -884,7 +1336,7 @@ class EntitiesTask(msrest.serialization.Model): """EntitiesTask. :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesTaskParameters + :type parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesTaskParameters :param task_name: :type task_name: str """ @@ -915,7 +1367,7 @@ class EntitiesTaskParameters(msrest.serialization.Model): :type logging_opt_out: bool :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType """ _attribute_map = { @@ -942,7 +1394,7 @@ class EntitiesTaskResult(msrest.serialization.Model): """EntitiesTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult """ _attribute_map = { @@ -1023,12 +1475,12 @@ class EntityLinkingResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentLinkedEntities] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentLinkedEntities] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -1066,7 +1518,7 @@ class EntityLinkingTask(msrest.serialization.Model): """EntityLinkingTask. :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingTaskParameters + :type parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingTaskParameters :param task_name: :type task_name: str """ @@ -1097,7 +1549,7 @@ class EntityLinkingTaskParameters(msrest.serialization.Model): :type logging_opt_out: bool :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType """ _attribute_map = { @@ -1124,7 +1576,7 @@ class EntityLinkingTaskResult(msrest.serialization.Model): """EntityLinkingTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult """ _attribute_map = { @@ -1147,7 +1599,7 @@ class ErrorResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError + :type error: ~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError """ _validation = { @@ -1176,12 +1628,12 @@ class ExtractedDocumentSummary(msrest.serialization.Model): :param id: Required. Unique, non-empty document identifier. :type id: str :param sentences: Required. A ranked list of sentences representing the extracted summary. - :type sentences: list[~azure.ai.textanalytics.v3_2_preview_1.models.ExtractedSummarySentence] + :type sentences: list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractedSummarySentence] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -1266,12 +1718,12 @@ class ExtractiveSummarizationResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.ExtractedDocumentSummary] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractedDocumentSummary] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -1310,7 +1762,7 @@ class ExtractiveSummarizationTask(msrest.serialization.Model): :param parameters: :type parameters: - ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationTaskParameters + ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTaskParameters :param task_name: :type task_name: str """ @@ -1341,12 +1793,12 @@ class ExtractiveSummarizationTaskParameters(msrest.serialization.Model): :type logging_opt_out: bool :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param sentence_count: :type sentence_count: int :param sort_by: Possible values include: "Offset", "Rank". Default value: "Offset". :type sort_by: str or - ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationTaskParametersSortBy + ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTaskParametersSortBy """ _attribute_map = { @@ -1379,7 +1831,7 @@ class ExtractiveSummarizationTaskResult(msrest.serialization.Model): """ExtractiveSummarizationTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationResult """ _attribute_map = { @@ -1401,13 +1853,13 @@ class HealthcareAssertion(msrest.serialization.Model): :param conditionality: Describes any conditionality on the entity. Possible values include: "hypothetical", "conditional". - :type conditionality: str or ~azure.ai.textanalytics.v3_2_preview_1.models.Conditionality + :type conditionality: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Conditionality :param certainty: Describes the entities certainty and polarity. Possible values include: "positive", "positivePossible", "neutralPossible", "negativePossible", "negative". - :type certainty: str or ~azure.ai.textanalytics.v3_2_preview_1.models.Certainty + :type certainty: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Certainty :param association: Describes if the entity is the subject of the text or if it describes someone else. Possible values include: "subject", "other". - :type association: str or ~azure.ai.textanalytics.v3_2_preview_1.models.Association + :type association: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Association """ _attribute_map = { @@ -1434,12 +1886,12 @@ class HealthcareLinkingProperties(msrest.serialization.Model): """HealthcareLinkingProperties. :param assertion: - :type assertion: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareAssertion + :type assertion: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareAssertion :param name: Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. :type name: str :param links: Entity references in known data sources. - :type links: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityLink] + :type links: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityLink] """ _attribute_map = { @@ -1475,7 +1927,7 @@ class HealthcareEntityProperties(msrest.serialization.Model): "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". - :type category: str or ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityCategory + :type category: str or ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityCategory :param subcategory: (Optional) Entity sub type. :type subcategory: str :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' @@ -1531,12 +1983,12 @@ class HealthcareEntity(HealthcareEntityProperties, HealthcareLinkingProperties): All required parameters must be populated in order to send to Azure. :param assertion: - :type assertion: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareAssertion + :type assertion: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareAssertion :param name: Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. :type name: str :param links: Entity references in known data sources. - :type links: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityLink] + :type links: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityLink] :param text: Required. Entity text as appears in the request. :type text: str :param category: Required. Healthcare Entity Category. Possible values include: @@ -1545,7 +1997,7 @@ class HealthcareEntity(HealthcareEntityProperties, HealthcareLinkingProperties): "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". - :type category: str or ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityCategory + :type category: str or ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityCategory :param subcategory: (Optional) Entity sub type. :type subcategory: str :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' @@ -1641,9 +2093,9 @@ class HealthcareTaskResult(msrest.serialization.Model): """HealthcareTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareResult :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] """ _attribute_map = { @@ -1669,9 +2121,9 @@ class HealthcareJobState(JobMetadata, Pagination, HealthcareTaskResult): All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareResult :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] :param next_link: :type next_link: str :param created_date_time: Required. @@ -1684,7 +2136,7 @@ class HealthcareJobState(JobMetadata, Pagination, HealthcareTaskResult): :type last_update_date_time: ~datetime.datetime :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -1749,9 +2201,9 @@ class HealthcareRelation(msrest.serialization.Model): "FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication", "TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment", "UnitOfCondition", "UnitOfExamination", "ValueOfCondition", "ValueOfExamination". - :type relation_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.RelationType + :type relation_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.RelationType :param entities: Required. The entities in the relation. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareRelationEntity] + :type entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareRelationEntity] """ _validation = { @@ -1818,12 +2270,12 @@ class HealthcareResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentHealthcareEntities] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentHealthcareEntities] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -1866,7 +2318,7 @@ class InnerError(msrest.serialization.Model): "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", "InvalidCountryHint". - :type code: str or ~azure.ai.textanalytics.v3_2_preview_1.models.InnerErrorCodeValue + :type code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.InnerErrorCodeValue :param message: Required. Error message. :type message: str :param details: Error details. @@ -1874,7 +2326,7 @@ class InnerError(msrest.serialization.Model): :param target: Error target. :type target: str :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_2_preview_1.models.InnerError + :type innererror: ~azure.ai.textanalytics.v3_2_preview_2.models.InnerError """ _validation = { @@ -1913,21 +2365,30 @@ class JobManifestTasks(msrest.serialization.Model): :param entity_recognition_tasks: :type entity_recognition_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesTask] + list[~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesTask] :param entity_recognition_pii_tasks: - :type entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_2_preview_1.models.PiiTask] + :type entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_2_preview_2.models.PiiTask] :param key_phrase_extraction_tasks: :type key_phrase_extraction_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhrasesTask] + list[~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhrasesTask] :param entity_linking_tasks: :type entity_linking_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingTask] + list[~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingTask] :param sentiment_analysis_tasks: :type sentiment_analysis_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.SentimentAnalysisTask] + list[~azure.ai.textanalytics.v3_2_preview_2.models.SentimentAnalysisTask] :param extractive_summarization_tasks: :type extractive_summarization_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationTask] + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTask] + :param custom_entity_recognition_tasks: + :type custom_entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesTask] + :param custom_single_classification_tasks: + :type custom_single_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationTask] + :param custom_multi_classification_tasks: + :type custom_multi_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationTask] """ _attribute_map = { @@ -1937,6 +2398,9 @@ class JobManifestTasks(msrest.serialization.Model): 'entity_linking_tasks': {'key': 'entityLinkingTasks', 'type': '[EntityLinkingTask]'}, 'sentiment_analysis_tasks': {'key': 'sentimentAnalysisTasks', 'type': '[SentimentAnalysisTask]'}, 'extractive_summarization_tasks': {'key': 'extractiveSummarizationTasks', 'type': '[ExtractiveSummarizationTask]'}, + 'custom_entity_recognition_tasks': {'key': 'customEntityRecognitionTasks', 'type': '[CustomEntitiesTask]'}, + 'custom_single_classification_tasks': {'key': 'customSingleClassificationTasks', 'type': '[CustomSingleClassificationTask]'}, + 'custom_multi_classification_tasks': {'key': 'customMultiClassificationTasks', 'type': '[CustomMultiClassificationTask]'}, } def __init__( @@ -1948,6 +2412,9 @@ def __init__( entity_linking_tasks: Optional[List["EntityLinkingTask"]] = None, sentiment_analysis_tasks: Optional[List["SentimentAnalysisTask"]] = None, extractive_summarization_tasks: Optional[List["ExtractiveSummarizationTask"]] = None, + custom_entity_recognition_tasks: Optional[List["CustomEntitiesTask"]] = None, + custom_single_classification_tasks: Optional[List["CustomSingleClassificationTask"]] = None, + custom_multi_classification_tasks: Optional[List["CustomMultiClassificationTask"]] = None, **kwargs ): super(JobManifestTasks, self).__init__(**kwargs) @@ -1957,6 +2424,9 @@ def __init__( self.entity_linking_tasks = entity_linking_tasks self.sentiment_analysis_tasks = sentiment_analysis_tasks self.extractive_summarization_tasks = extractive_summarization_tasks + self.custom_entity_recognition_tasks = custom_entity_recognition_tasks + self.custom_single_classification_tasks = custom_single_classification_tasks + self.custom_multi_classification_tasks = custom_multi_classification_tasks class KeyPhraseResult(msrest.serialization.Model): @@ -1965,12 +2435,12 @@ class KeyPhraseResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentKeyPhrases] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentKeyPhrases] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -2008,7 +2478,7 @@ class KeyPhrasesTask(msrest.serialization.Model): """KeyPhrasesTask. :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhrasesTaskParameters + :type parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhrasesTaskParameters :param task_name: :type task_name: str """ @@ -2060,7 +2530,7 @@ class KeyPhraseTaskResult(msrest.serialization.Model): """KeyPhraseTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult """ _attribute_map = { @@ -2083,7 +2553,7 @@ class LanguageBatchInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] """ _validation = { @@ -2148,12 +2618,12 @@ class LanguageResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentLanguage] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentLanguage] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -2195,7 +2665,7 @@ class LinkedEntity(msrest.serialization.Model): :param name: Required. Entity Linking formal name. :type name: str :param matches: Required. List of instances this entity appears in the text. - :type matches: list[~azure.ai.textanalytics.v3_2_preview_1.models.Match] + :type matches: list[~azure.ai.textanalytics.v3_2_preview_2.models.Match] :param language: Required. Language used in the data source. :type language: str :param id: Unique identifier of the recognized entity from the data source. @@ -2295,13 +2765,58 @@ def __init__( self.length = length +class MultiClassificationDocument(msrest.serialization.Model): + """MultiClassificationDocument. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param classifications: Required. Recognized classification results in the document. + :type classifications: list[~azure.ai.textanalytics.v3_2_preview_2.models.ClassificationResult] + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'classifications': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'classifications': {'key': 'classifications', 'type': '[ClassificationResult]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + classifications: List["ClassificationResult"], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + super(MultiClassificationDocument, self).__init__(**kwargs) + self.id = id + self.classifications = classifications + self.warnings = warnings + self.statistics = statistics + + class MultiLanguageBatchInput(msrest.serialization.Model): """Contains a set of input documents to be analyzed by the service. All required parameters must be populated in order to send to Azure. :param documents: Required. The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] """ _validation = { @@ -2372,12 +2887,12 @@ class PiiDocumentEntities(msrest.serialization.Model): :param redacted_text: Required. Returns redacted text. :type redacted_text: str :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.Entity] + :type entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.Entity] :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] :param statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics """ _validation = { @@ -2419,12 +2934,12 @@ class PiiResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.PiiDocumentEntities] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.PiiDocumentEntities] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -2462,7 +2977,7 @@ class PiiTask(msrest.serialization.Model): """PiiTask. :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiTaskParameters + :type parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiTaskParameters :param task_name: :type task_name: str """ @@ -2488,16 +3003,16 @@ class PiiTaskParameters(msrest.serialization.Model): """PiiTaskParameters. :param domain: Possible values include: "phi", "none". Default value: "none". - :type domain: str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiTaskParametersDomain + :type domain: str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiTaskParametersDomain :param model_version: :type model_version: str :param logging_opt_out: :type logging_opt_out: bool :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory] + :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType """ _validation = { @@ -2534,7 +3049,7 @@ class PiiTaskResult(msrest.serialization.Model): """PiiTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult """ _attribute_map = { @@ -2605,10 +3120,10 @@ class SentenceAssessment(msrest.serialization.Model): :param sentiment: Required. Assessment sentiment in the sentence. Possible values include: "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.TokenSentimentValue + :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TokenSentimentValue :param confidence_scores: Required. Assessment sentiment confidence scores in the sentence. :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.TargetConfidenceScoreLabel + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetConfidenceScoreLabel :param offset: Required. The assessment offset from the start of the sentence. :type offset: int :param length: Required. The length of the assessment. @@ -2666,19 +3181,19 @@ class SentenceSentiment(msrest.serialization.Model): :type text: str :param sentiment: Required. The predicted Sentiment for the sentence. Possible values include: "positive", "neutral", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.SentenceSentimentValue + :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.SentenceSentimentValue :param confidence_scores: Required. The sentiment confidence score between 0 and 1 for the sentence for all classes. :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentConfidenceScorePerLabel + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentConfidenceScorePerLabel :param offset: Required. The sentence offset from the start of the document. :type offset: int :param length: Required. The length of the sentence. :type length: int :param targets: The array of sentence targets for the sentence. - :type targets: list[~azure.ai.textanalytics.v3_2_preview_1.models.SentenceTarget] + :type targets: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceTarget] :param assessments: The array of assessments for the sentence. - :type assessments: list[~azure.ai.textanalytics.v3_2_preview_1.models.SentenceAssessment] + :type assessments: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceAssessment] """ _validation = { @@ -2728,11 +3243,11 @@ class SentenceTarget(msrest.serialization.Model): :param sentiment: Required. Targeted sentiment in the sentence. Possible values include: "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.TokenSentimentValue + :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TokenSentimentValue :param confidence_scores: Required. Target sentiment confidence scores for the target in the sentence. :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.TargetConfidenceScoreLabel + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetConfidenceScoreLabel :param offset: Required. The target offset from the start of the sentence. :type offset: int :param length: Required. The length of the target. @@ -2741,7 +3256,7 @@ class SentenceTarget(msrest.serialization.Model): :type text: str :param relations: Required. The array of either assessment or target objects which is related to the target. - :type relations: list[~azure.ai.textanalytics.v3_2_preview_1.models.TargetRelation] + :type relations: list[~azure.ai.textanalytics.v3_2_preview_2.models.TargetRelation] """ _validation = { @@ -2786,7 +3301,7 @@ class SentimentAnalysisTask(msrest.serialization.Model): """SentimentAnalysisTask. :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentAnalysisTaskParameters + :type parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentAnalysisTaskParameters :param task_name: :type task_name: str """ @@ -2819,7 +3334,7 @@ class SentimentAnalysisTaskParameters(msrest.serialization.Model): :type opinion_mining: bool :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType """ _attribute_map = { @@ -2890,12 +3405,12 @@ class SentimentResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param documents: Required. Sentiment analysis per document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentSentiment] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentSentiment] :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] + :type errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] :param statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics :param model_version: Required. This field indicates which model is used for scoring. :type model_version: str """ @@ -2933,7 +3448,7 @@ class SentimentTaskResult(msrest.serialization.Model): """SentimentTaskResult. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse """ _attribute_map = { @@ -2950,6 +3465,51 @@ def __init__( self.results = results +class SingleClassificationDocument(msrest.serialization.Model): + """SingleClassificationDocument. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Unique, non-empty document identifier. + :type id: str + :param classification: Required. + :type classification: ~azure.ai.textanalytics.v3_2_preview_2.models.ClassificationResult + :param warnings: Required. Warnings encountered while processing document. + :type warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :param statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :type statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'classification': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'classification': {'key': 'classification', 'type': 'ClassificationResult'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + classification: "ClassificationResult", + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + super(SingleClassificationDocument, self).__init__(**kwargs) + self.id = id + self.classification = classification + self.warnings = warnings + self.statistics = statistics + + class TargetConfidenceScoreLabel(msrest.serialization.Model): """Represents the confidence scores across all sentiment classes: positive, neutral, negative. @@ -2990,7 +3550,7 @@ class TargetRelation(msrest.serialization.Model): :param relation_type: Required. The type related to the target. Possible values include: "assessment", "target". - :type relation_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.TargetRelationType + :type relation_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TargetRelationType :param ref: Required. The JSON pointer indicating the linked object. :type ref: str """ @@ -3032,22 +3592,31 @@ class TasksStateTasks(msrest.serialization.Model): :type total: int :param entity_recognition_tasks: :type entity_recognition_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksEntityRecognitionTasksItem] + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityRecognitionTasksItem] :param entity_recognition_pii_tasks: :type entity_recognition_pii_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksEntityRecognitionPiiTasksItem] + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityRecognitionPiiTasksItem] :param key_phrase_extraction_tasks: :type key_phrase_extraction_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksKeyPhraseExtractionTasksItem] + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksKeyPhraseExtractionTasksItem] :param entity_linking_tasks: :type entity_linking_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksEntityLinkingTasksItem] + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityLinkingTasksItem] :param sentiment_analysis_tasks: :type sentiment_analysis_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksSentimentAnalysisTasksItem] + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksSentimentAnalysisTasksItem] :param extractive_summarization_tasks: :type extractive_summarization_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksExtractiveSummarizationTasksItem] + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksExtractiveSummarizationTasksItem] + :param custom_entity_recognition_tasks: + :type custom_entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomEntityRecognitionTasksItem] + :param custom_single_classification_tasks: + :type custom_single_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomSingleClassificationTasksItem] + :param custom_multi_classification_tasks: + :type custom_multi_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomMultiClassificationTasksItem] """ _validation = { @@ -3068,6 +3637,9 @@ class TasksStateTasks(msrest.serialization.Model): 'entity_linking_tasks': {'key': 'entityLinkingTasks', 'type': '[TasksStateTasksEntityLinkingTasksItem]'}, 'sentiment_analysis_tasks': {'key': 'sentimentAnalysisTasks', 'type': '[TasksStateTasksSentimentAnalysisTasksItem]'}, 'extractive_summarization_tasks': {'key': 'extractiveSummarizationTasks', 'type': '[TasksStateTasksExtractiveSummarizationTasksItem]'}, + 'custom_entity_recognition_tasks': {'key': 'customEntityRecognitionTasks', 'type': '[TasksStateTasksCustomEntityRecognitionTasksItem]'}, + 'custom_single_classification_tasks': {'key': 'customSingleClassificationTasks', 'type': '[TasksStateTasksCustomSingleClassificationTasksItem]'}, + 'custom_multi_classification_tasks': {'key': 'customMultiClassificationTasks', 'type': '[TasksStateTasksCustomMultiClassificationTasksItem]'}, } def __init__( @@ -3083,6 +3655,9 @@ def __init__( entity_linking_tasks: Optional[List["TasksStateTasksEntityLinkingTasksItem"]] = None, sentiment_analysis_tasks: Optional[List["TasksStateTasksSentimentAnalysisTasksItem"]] = None, extractive_summarization_tasks: Optional[List["TasksStateTasksExtractiveSummarizationTasksItem"]] = None, + custom_entity_recognition_tasks: Optional[List["TasksStateTasksCustomEntityRecognitionTasksItem"]] = None, + custom_single_classification_tasks: Optional[List["TasksStateTasksCustomSingleClassificationTasksItem"]] = None, + custom_multi_classification_tasks: Optional[List["TasksStateTasksCustomMultiClassificationTasksItem"]] = None, **kwargs ): super(TasksStateTasks, self).__init__(**kwargs) @@ -3096,6 +3671,9 @@ def __init__( self.entity_linking_tasks = entity_linking_tasks self.sentiment_analysis_tasks = sentiment_analysis_tasks self.extractive_summarization_tasks = extractive_summarization_tasks + self.custom_entity_recognition_tasks = custom_entity_recognition_tasks + self.custom_single_classification_tasks = custom_single_classification_tasks + self.custom_multi_classification_tasks = custom_multi_classification_tasks class TaskState(msrest.serialization.Model): @@ -3109,7 +3687,7 @@ class TaskState(msrest.serialization.Model): :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -3138,20 +3716,155 @@ def __init__( self.status = status +class TasksStateTasksCustomEntityRecognitionTasksItem(TaskState, CustomEntitiesTaskResult): + """TasksStateTasksCustomEntityRecognitionTasksItem. + + All required parameters must be populated in order to send to Azure. + + :param results: + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesResult + :param last_update_date_time: Required. + :type last_update_date_time: ~datetime.datetime + :param task_name: Required. + :type task_name: str + :param status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomEntitiesResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + last_update_date_time: datetime.datetime, + task_name: str, + status: Union[str, "State"], + results: Optional["CustomEntitiesResult"] = None, + **kwargs + ): + super(TasksStateTasksCustomEntityRecognitionTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + self.results = results + self.last_update_date_time = last_update_date_time + self.task_name = task_name + self.status = status + + +class TasksStateTasksCustomMultiClassificationTasksItem(TaskState, CustomMultiClassificationTaskResult): + """TasksStateTasksCustomMultiClassificationTasksItem. + + All required parameters must be populated in order to send to Azure. + + :param results: + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationResult + :param last_update_date_time: Required. + :type last_update_date_time: ~datetime.datetime + :param task_name: Required. + :type task_name: str + :param status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomMultiClassificationResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + last_update_date_time: datetime.datetime, + task_name: str, + status: Union[str, "State"], + results: Optional["CustomMultiClassificationResult"] = None, + **kwargs + ): + super(TasksStateTasksCustomMultiClassificationTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + self.results = results + self.last_update_date_time = last_update_date_time + self.task_name = task_name + self.status = status + + +class TasksStateTasksCustomSingleClassificationTasksItem(TaskState, CustomSingleClassificationTaskResult): + """TasksStateTasksCustomSingleClassificationTasksItem. + + All required parameters must be populated in order to send to Azure. + + :param results: + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationResult + :param last_update_date_time: Required. + :type last_update_date_time: ~datetime.datetime + :param task_name: Required. + :type task_name: str + :param status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomSingleClassificationResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + last_update_date_time: datetime.datetime, + task_name: str, + status: Union[str, "State"], + results: Optional["CustomSingleClassificationResult"] = None, + **kwargs + ): + super(TasksStateTasksCustomSingleClassificationTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + self.results = results + self.last_update_date_time = last_update_date_time + self.task_name = task_name + self.status = status + + class TasksStateTasksEntityLinkingTasksItem(TaskState, EntityLinkingTaskResult): """TasksStateTasksEntityLinkingTasksItem. All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult :param last_update_date_time: Required. :type last_update_date_time: ~datetime.datetime :param task_name: Required. :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -3189,14 +3902,14 @@ class TasksStateTasksEntityRecognitionPiiTasksItem(TaskState, PiiTaskResult): All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult :param last_update_date_time: Required. :type last_update_date_time: ~datetime.datetime :param task_name: Required. :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -3234,14 +3947,14 @@ class TasksStateTasksEntityRecognitionTasksItem(TaskState, EntitiesTaskResult): All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult :param last_update_date_time: Required. :type last_update_date_time: ~datetime.datetime :param task_name: Required. :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -3279,14 +3992,14 @@ class TasksStateTasksExtractiveSummarizationTasksItem(TaskState, ExtractiveSumma All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationResult :param last_update_date_time: Required. :type last_update_date_time: ~datetime.datetime :param task_name: Required. :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -3324,14 +4037,14 @@ class TasksStateTasksKeyPhraseExtractionTasksItem(TaskState, KeyPhraseTaskResult All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult :param last_update_date_time: Required. :type last_update_date_time: ~datetime.datetime :param task_name: Required. :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -3369,14 +4082,14 @@ class TasksStateTasksSentimentAnalysisTasksItem(TaskState, SentimentTaskResult): All required parameters must be populated in order to send to Azure. :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse + :type results: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse :param last_update_date_time: Required. :type last_update_date_time: ~datetime.datetime :param task_name: Required. :type task_name: str :param status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State + :type status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State """ _validation = { @@ -3415,15 +4128,15 @@ class TextAnalyticsError(msrest.serialization.Model): :param code: Required. Error code. Possible values include: "InvalidRequest", "InvalidArgument", "InternalServerError", "ServiceUnavailable", "NotFound". - :type code: str or ~azure.ai.textanalytics.v3_2_preview_1.models.ErrorCodeValue + :type code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.ErrorCodeValue :param message: Required. Error message. :type message: str :param target: Error target. :type target: str :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_2_preview_1.models.InnerError + :type innererror: ~azure.ai.textanalytics.v3_2_preview_2.models.InnerError :param details: Details about specific errors that led to this reported error. - :type details: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] + :type details: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] """ _validation = { @@ -3464,7 +4177,7 @@ class TextAnalyticsWarning(msrest.serialization.Model): :param code: Required. Error code. Possible values include: "LongWordsInDocument", "DocumentTruncated". - :type code: str or ~azure.ai.textanalytics.v3_2_preview_1.models.WarningCodeValue + :type code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.WarningCodeValue :param message: Required. Warning message. :type message: str :param target_ref: A JSON pointer reference indicating the target object. diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_text_analytics_client_enums.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_text_analytics_client_enums.py similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_text_analytics_client_enums.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_text_analytics_client_enums.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/operations/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/operations/__init__.py similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/operations/__init__.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/operations/__init__.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/operations/_text_analytics_client_operations.py similarity index 98% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/operations/_text_analytics_client_operations.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/operations/_text_analytics_client_operations.py index 65b540342722..36c65ad8e120 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/operations/_text_analytics_client_operations.py @@ -96,7 +96,7 @@ def begin_analyze( executed. :param body: Collection of documents to analyze and tasks to execute. - :type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput + :type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod. @@ -104,7 +104,7 @@ def begin_analyze( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response) - :rtype: ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState] + :rtype: ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -177,7 +177,7 @@ def analyze_status( :type skip: int :keyword callable cls: A custom type or function that will be passed the direct response :return: AnalyzeJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalyzeJobState"] @@ -251,7 +251,7 @@ def health_status( :type show_stats: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: HealthcareJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.HealthcareJobState"] @@ -487,14 +487,14 @@ def begin_health( symptoms, etc) and their relations. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with the Text Analytics natural language @@ -510,7 +510,7 @@ def begin_health( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response) - :rtype: ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState] + :rtype: ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -576,7 +576,7 @@ def entities_recognition_general( Analytics API` for the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -594,10 +594,10 @@ def entities_recognition_general( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntitiesResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.EntitiesResult"] @@ -674,7 +674,7 @@ def entities_recognition_pii( list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -695,12 +695,12 @@ def entities_recognition_pii( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory] + :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] :keyword callable cls: A custom type or function that will be passed the direct response :return: PiiResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PiiResult"] @@ -777,7 +777,7 @@ def entities_linking( the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -795,10 +795,10 @@ def entities_linking( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntityLinkingResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.EntityLinkingResult"] @@ -870,7 +870,7 @@ def key_phrases( enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -887,7 +887,7 @@ def key_phrases( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyPhraseResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyPhraseResult"] @@ -958,7 +958,7 @@ def languages( enabled languages. :param documents: - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -975,7 +975,7 @@ def languages( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: LanguageResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.LanguageResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.LanguageResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LanguageResult"] @@ -1047,7 +1047,7 @@ def sentiment( (targets and assessments). :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -1068,10 +1068,10 @@ def sentiment( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: SentimentResponse, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SentimentResponse"] diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/py.typed b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/py.typed similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/py.typed rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/py.typed diff --git a/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md b/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md index ff1a29d6f5fe..49caeebf247a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md @@ -3,7 +3,7 @@ To generate this file, simply type ``` -autorest swagger/README.md +autorest swagger/README.md --python-sdks-folder= ``` We automatically hardcode in that this is `python` and `multiapi`. @@ -28,15 +28,15 @@ multiapi: true batch: - tag: release_3_0 - tag: release_3_1 - - tag: release_3_2_preview.1 + - tag: release_3_2_preview.2 - multiapiscript: true ``` ## Multiapiscript ```yaml $(multiapiscript) -output-folder: ../azure/ai/textanalytics/_generated/ -default-api: v3_2_preview_1 +output-folder: $(python-sdks-folder)/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/ +default-api: v3_2_preview_2 clear-output-folder: true perform-load: false ``` @@ -48,7 +48,7 @@ These settings apply only when `--tag=release_3_0` is specified on the command l ```yaml $(tag) == 'release_3_0' input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/TextAnalytics.json namespace: azure.ai.textanalytics.v3_0 -output-folder: ../azure/ai/textanalytics/_generated/v3_0 +output-folder: $(python-sdks-folder)/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0 ``` ## Release 3.1 @@ -58,17 +58,17 @@ These settings apply only when `--tag=release_3_1` is specified on the command l ```yaml $(tag) == 'release_3_1' input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json namespace: azure.ai.textanalytics.v3_1 -output-folder: ../azure/ai/textanalytics/_generated/v3_1 +output-folder: $(python-sdks-folder)/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1 ``` -## Release 3.2-preview.1 +## Release 3.2-preview.2 -These settings apply only when `--tag=release_3_2_preview.1` is specified on the command line. +These settings apply only when `--tag=release_3_2_preview.2` is specified on the command line. -```yaml $(tag) == 'release_3_2_preview.1' -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.1/TextAnalytics.json -namespace: azure.ai.textanalytics.v3_2_preview_1 -output-folder: ../azure/ai/textanalytics/_generated/v3_2_preview_1 +```yaml $(tag) == 'release_3_2_preview.2' +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/5efb2eca2fc3d94f27015f5d3176786c7497f946/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/TextAnalytics.json +namespace: azure.ai.textanalytics.v3_2_preview_2 +output-folder: $(python-sdks-folder)/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2 ``` ### Override Analyze's pager poller @@ -110,13 +110,13 @@ directive: $["parameters"] = [{"$ref": "#/parameters/Endpoint"}]; ``` -### Override parameterizing the ApiVersion v3.2-preview.1 +### Override parameterizing the ApiVersion v3.2-preview.2 -```yaml $(tag) == 'release_3_2_preview.1' +```yaml $(tag) == 'release_3_2_preview.2' directive: - from: swagger-document where: '$["x-ms-parameterized-host"]' transform: > - $["hostTemplate"] = "{Endpoint}/text/analytics/v3.2-preview.1"; + $["hostTemplate"] = "{Endpoint}/text/analytics/v3.2-preview.2"; $["parameters"] = [{"$ref": "#/parameters/Endpoint"}]; ``` \ No newline at end of file From 85c8ab1c07bd48743d2882b854e2da97723c2c50 Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Mon, 13 Sep 2021 18:44:21 -0700 Subject: [PATCH 2/3] hook up convenience layer to new api version --- sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md | 2 ++ sdk/textanalytics/azure-ai-textanalytics/README.md | 2 +- .../azure/ai/textanalytics/_base_client.py | 2 +- .../azure/ai/textanalytics/_models.py | 6 +++--- .../azure/ai/textanalytics/_version.py | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index c0b59419cb3c..c98fd49194cb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -2,6 +2,8 @@ ## 5.2.0b2 (Unreleased) +This version of the SDK defaults to the latest supported API version, which currently is `v3.2-preview.2`. + ### Features Added ### Breaking Changes diff --git a/sdk/textanalytics/azure-ai-textanalytics/README.md b/sdk/textanalytics/azure-ai-textanalytics/README.md index 5041adf62aa7..3c81481e854f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/README.md @@ -81,7 +81,7 @@ This table shows the relationship between SDK versions and supported API version | SDK version | Supported API version of service | | ------------ | --------------------------------- | -| 5.2.0b1 - Latest beta release | 3.0, 3.1, 3.2-preview.1 (default) | +| 5.2.0b1 - Latest beta release | 3.0, 3.1, 3.2-preview.2 (default) | | 5.1.0 - Latest GA release | 3.0, 3.1 (default) | | 5.0.0 | 3.0 | diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py index 320a26d389eb..7dbb24aefddd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py @@ -16,7 +16,7 @@ class TextAnalyticsApiVersion(str, Enum): """Text Analytics API versions supported by this package""" #: this is the default version - V3_2_PREVIEW = "v3.2-preview.1" + V3_2_PREVIEW = "v3.2-preview.2" V3_1 = "v3.1" V3_0 = "v3.0" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py index 8a43a22eaf52..c3a7e1f99969 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py @@ -11,7 +11,7 @@ ) from ._generated.v3_0 import models as _v3_0_models -from ._generated.v3_2_preview_1 import models as _v3_2_preview_1_models +from ._generated.v3_2_preview_2 import models as _v3_2_preview_models from ._version import DEFAULT_API_VERSION @@ -2141,8 +2141,8 @@ def __repr__(self): ) def _to_generated(self, api_version): # pylint: disable=unused-argument - return _v3_2_preview_1_models.ExtractiveSummarizationTask( - parameters=_v3_2_preview_1_models.ExtractiveSummarizationTaskParameters( + return _v3_2_preview_models.ExtractiveSummarizationTask( + parameters=_v3_2_preview_models.ExtractiveSummarizationTaskParameters( model_version=self.model_version, string_index_type=self.string_index_type, logging_opt_out=self.disable_service_logs, diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_version.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_version.py index adb97393c714..9faba3e954c6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_version.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_version.py @@ -5,4 +5,4 @@ # ------------------------------------ VERSION = "5.2.0b2" -DEFAULT_API_VERSION = "v3.2-preview.1" +DEFAULT_API_VERSION = "v3.2-preview.2" From 4f65bd75f9883f6000eaaa0e96e27c577527343a Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Wed, 15 Sep 2021 12:06:51 -0700 Subject: [PATCH 3/3] fix import and skip tests for now --- .../azure/ai/textanalytics/_models.py | 10 +++++----- .../azure-ai-textanalytics/tests/asynctestcase.py | 6 +++--- .../azure-ai-textanalytics/tests/testcase.py | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py index c3a7e1f99969..ee9c6b437b69 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py @@ -1797,7 +1797,7 @@ def __repr__(self, **kwargs): def _to_generated(self, api_version): if api_version == DEFAULT_API_VERSION: - from ._generated.v3_2_preview_1 import models + from ._generated.v3_2_preview_2 import models else: from ._generated.v3_1 import models return models.EntitiesTask( @@ -1874,7 +1874,7 @@ def __repr__(self, **kwargs): def _to_generated(self, api_version): if api_version == DEFAULT_API_VERSION: - from ._generated.v3_2_preview_1 import models + from ._generated.v3_2_preview_2 import models else: from ._generated.v3_1 import models return models.SentimentAnalysisTask( @@ -1956,7 +1956,7 @@ def __repr__(self, **kwargs): def _to_generated(self, api_version): if api_version == DEFAULT_API_VERSION: - from ._generated.v3_2_preview_1 import models + from ._generated.v3_2_preview_2 import models else: from ._generated.v3_1 import models return models.PiiTask( @@ -2011,7 +2011,7 @@ def __repr__(self, **kwargs): def _to_generated(self, api_version): if api_version == DEFAULT_API_VERSION: - from ._generated.v3_2_preview_1 import models + from ._generated.v3_2_preview_2 import models else: from ._generated.v3_1 import models return models.KeyPhrasesTask( @@ -2073,7 +2073,7 @@ def __repr__(self, **kwargs): def _to_generated(self, api_version): if api_version == DEFAULT_API_VERSION: - from ._generated.v3_2_preview_1 import models + from ._generated.v3_2_preview_2 import models else: from ._generated.v3_1 import models return models.EntityLinkingTask( diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/asynctestcase.py b/sdk/textanalytics/azure-ai-textanalytics/tests/asynctestcase.py index 708df984a98b..089f1e2881cf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/asynctestcase.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/asynctestcase.py @@ -5,10 +5,9 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -import asyncio + import os -import functools -from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function +import pytest from azure.core.credentials import AccessToken from testcase import TextAnalyticsTest @@ -24,6 +23,7 @@ async def get_token(self, *args): return self.token +@pytest.mark.skip("No active endpoints yet") class AsyncTextAnalyticsTest(TextAnalyticsTest): def generate_oauth_token(self): diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py b/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py index 7d49ea26d2fb..c5f440af6826 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py @@ -70,6 +70,7 @@ def get_token(self, *args): return self.token +@pytest.mark.skip("No active endpoints yet") class TextAnalyticsTest(AzureTestCase): FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['Ocp-Apim-Subscription-Key']