From 46b9caa30e4847f5d0938143ec6f5ae74f40afd9 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 22 Jul 2026 23:58:27 +0000 Subject: [PATCH] Configurations: 'specification/cognitiveservices/data-plane/LanguageAnalyzeText/tspconfig.yaml', API Version: 2026-05-15-preview, SDK Release Type: beta, and CommitSHA: '9ce7cb16c5e1827222bd52d1c1b476f294ab0316' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6604882 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../azure-ai-textanalytics/CHANGELOG.md | 4 + .../azure-ai-textanalytics/_metadata.json | 10 +- .../azure-ai-textanalytics/api.md | 4484 +++++++++++++++++ .../azure-ai-textanalytics/api.metadata.yml | 3 + .../apiview-properties.json | 3 +- .../azure/ai/textanalytics/_client.py | 12 +- .../azure/ai/textanalytics/_configuration.py | 7 +- .../textanalytics/_operations/_operations.py | 53 +- .../azure/ai/textanalytics/_patch.py | 331 +- .../ai/textanalytics/_utils/model_base.py | 629 ++- .../ai/textanalytics/_utils/serialization.py | 138 +- .../azure/ai/textanalytics/_version.py | 2 +- .../azure/ai/textanalytics/aio/_client.py | 12 +- .../ai/textanalytics/aio/_configuration.py | 7 +- .../aio/_operations/_operations.py | 45 +- .../azure/ai/textanalytics/aio/_patch.py | 327 +- .../azure/ai/textanalytics/models/_enums.py | 1370 ++--- .../azure/ai/textanalytics/models/_models.py | 293 +- .../azure/ai/textanalytics/types.py | 1352 +++++ ...ation_summary_length_prompt_task_result.py | 33 + ...ation_summary_length_prompt_task_submit.py | 53 + ...l_abstractive_summarization_task_result.py | 33 + ...l_abstractive_summarization_task_submit.py | 53 + ...essful_analyze_text_jobs_cancel_request.py | 32 + ..._text_jobs_multiple_task_status_request.py | 33 + ..._text_jobs_multiple_task_submit_request.py | 54 + .../successful_entity_linking_request.py | 42 + ...ul_entity_recognition_exclusion_request.py | 51 + ...ul_entity_recognition_inclusion_request.py | 47 + ...y_recognition_inference_options_request.py | 41 + ...ssful_entity_recognition_overlap_policy.py | 45 + .../successful_entity_recognition_request.py | 53 + ...l_healthcare_document_type_post_request.py | 48 + ...hcare_document_type_task_status_request.py | 33 + .../successful_healthcare_post_request.py | 39 + ...ccessful_healthcare_task_status_request.py | 33 + ...uccessful_key_phrase_extraction_request.py | 43 + .../successful_language_detection_request.py | 44 + ...ii_entity_recognition_exclusion_request.py | 48 + ..._pii_entity_recognition_masked_entities.py | 41 + ...ty_recognition_redaction_policy_request.py | 51 + ...ccessful_pii_entity_recognition_request.py | 48 + .../successful_sentiment_analysis_request.py | 46 + .../generated_tests/conftest.py | 37 + .../generated_tests/test_text_analysis.py | 69 + .../test_text_analysis_async.py | 74 + .../generated_tests/testpreparer.py | 26 + .../generated_tests/testpreparer_async.py | 20 + .../azure-ai-textanalytics/pyproject.toml | 4 +- .../sample_authentication_async.py | 4 +- .../samples/sample_authentication.py | 4 +- .../tests/test_abstract_summary_async.py | 4 +- .../tests/test_extract_summary_async.py | 4 +- .../tests/test_multi_label_classify_async.py | 4 +- .../test_recognize_pii_confidence_score.py | 4 +- ...st_recognize_pii_confidence_score_async.py | 6 +- ..._recognize_pii_redaction_policies_async.py | 4 +- .../tests/test_single_label_classify_async.py | 4 +- .../azure-ai-textanalytics/tsp-location.yaml | 2 +- .../azure-ai-textanalytics/api.md | 3468 +++++++++++++ .../azure-ai-textanalytics/api.metadata.yml | 3 + 61 files changed, 12254 insertions(+), 1613 deletions(-) create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/api.md create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/api.metadata.yml create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/types.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_summary_length_prompt_task_result.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_summary_length_prompt_task_submit.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_task_result.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_task_submit.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_analyze_text_jobs_cancel_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_analyze_text_jobs_multiple_task_status_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_analyze_text_jobs_multiple_task_submit_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_linking_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_exclusion_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_inclusion_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_inference_options_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_overlap_policy.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_document_type_post_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_document_type_task_status_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_post_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_task_status_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_key_phrase_extraction_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_language_detection_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_exclusion_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_masked_entities.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_redaction_policy_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_sentiment_analysis_request.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/conftest.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/test_text_analysis.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/test_text_analysis_async.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/testpreparer.py create mode 100644 sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/testpreparer_async.py create mode 100644 sdk/textanalytics/azure-ai-textanalytics/api.md create mode 100644 sdk/textanalytics/azure-ai-textanalytics/api.metadata.yml diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/CHANGELOG.md b/sdk/cognitivelanguage/azure-ai-textanalytics/CHANGELOG.md index 90e255b0ff80..6f66b776e47c 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 6.0.0b3 (2026-07-22) + +skip changelog generation for data-plane package and please add changelog manually. + ## 6.0.0b2 (2025-11-06) This version of the client library defaults to the service API version `2025-11-15-preview`. diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/_metadata.json b/sdk/cognitivelanguage/azure-ai-textanalytics/_metadata.json index 509044270b48..9d788222e23a 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/_metadata.json +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/_metadata.json @@ -1,3 +1,11 @@ { - "apiVersion": "2025-11-15-preview" + "apiVersion": "2026-05-15-preview", + "apiVersions": { + "Language.Text": "2026-05-15-preview" + }, + "commit": "9ce7cb16c5e1827222bd52d1c1b476f294ab0316", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "typespec_src": "specification/cognitiveservices/data-plane/LanguageAnalyzeText", + "emitterVersion": "0.63.3", + "httpClientPythonVersion": "^0.34.2" } \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/api.md b/sdk/cognitivelanguage/azure-ai-textanalytics/api.md new file mode 100644 index 000000000000..5cc48d2acb0f --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/api.md @@ -0,0 +1,4484 @@ +```py +namespace azure.ai.textanalytics + + class azure.ai.textanalytics.TextAnalysisClient(_TextAnalysisClientOperationsMixin): implements ContextManager + + def __init__( + self, + endpoint: str, + credential: Union[AzureKeyCredential, TokenCredential], + *, + api_version: str = ..., + polling_interval: Optional[int] = ..., + **kwargs: Any + ) -> None: ... + + @overload + def analyze_text( + self, + body: AnalyzeTextInput, + *, + content_type: str = "application/json", + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> AnalyzeTextResult: ... + + @overload + def analyze_text( + self, + body: AnalyzeTextInput, + *, + content_type: str = "application/json", + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> AnalyzeTextResult: ... + + @overload + def analyze_text( + self, + body: IO[bytes], + *, + content_type: str = "application/json", + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> AnalyzeTextResult: ... + + @overload + def begin_analyze_text_job( + self, + *, + actions: list[AnalyzeTextOperationAction], + cancel_after: Optional[float] = ..., + content_type: str = "application/json", + default_language: Optional[str] = ..., + display_name: Optional[str] = ..., + text_input: MultiLanguageTextInput, + **kwargs: Any + ) -> LROPoller[None]: ... + + @overload + def begin_analyze_text_job( + self, + body: AnalyzeTextSubmitJobRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... + + @overload + def begin_analyze_text_job( + self, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... + + @distributed_trace + def begin_cancel_job( + self, + job_id: str, + **kwargs: Any + ) -> LROPoller[None]: ... + + def close(self) -> None: ... + + @distributed_trace + def get_job_status( + self, + job_id: str, + *, + show_stats: Optional[bool] = ..., + skip: Optional[int] = ..., + top: Optional[int] = ..., + **kwargs: Any + ) -> AnalyzeTextOperationState: ... + + def send_request( + self, + request: HttpRequest, + *, + stream: bool = False, + **kwargs: Any + ) -> HttpResponse: ... + + +namespace azure.ai.textanalytics.aio + + class azure.ai.textanalytics.aio.TextAnalysisClient(_TextAnalysisClientOperationsMixin): implements AsyncContextManager + + def __init__( + self, + endpoint: str, + credential: Union[AzureKeyCredential, AsyncTokenCredential], + *, + api_version: str = ..., + polling_interval: Optional[int] = ..., + **kwargs: Any + ) -> None: ... + + @overload + async def analyze_text( + self, + body: AnalyzeTextInput, + *, + content_type: str = "application/json", + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> AnalyzeTextResult: ... + + @overload + async def analyze_text( + self, + body: AnalyzeTextInput, + *, + content_type: str = "application/json", + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> AnalyzeTextResult: ... + + @overload + async def analyze_text( + self, + body: IO[bytes], + *, + content_type: str = "application/json", + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> AnalyzeTextResult: ... + + @overload + async def begin_analyze_text_job( + self, + *, + actions: list[AnalyzeTextOperationAction], + cancel_after: Optional[float] = ..., + content_type: str = "application/json", + default_language: Optional[str] = ..., + display_name: Optional[str] = ..., + text_input: MultiLanguageTextInput, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @overload + async def begin_analyze_text_job( + self, + body: AnalyzeTextSubmitJobRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @overload + async def begin_analyze_text_job( + self, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @distributed_trace_async + async def begin_cancel_job( + self, + job_id: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + async def close(self) -> None: ... + + @distributed_trace_async + async def get_job_status( + self, + job_id: str, + *, + show_stats: Optional[bool] = ..., + skip: Optional[int] = ..., + top: Optional[int] = ..., + **kwargs: Any + ) -> AnalyzeTextOperationState: ... + + def send_request( + self, + request: HttpRequest, + *, + stream: bool = False, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: ... + + +namespace azure.ai.textanalytics.models + + class azure.ai.textanalytics.models.AbstractiveSummarizationActionContent(_Model): + instruction: Optional[str] + logging_opt_out: Optional[bool] + model_version: Optional[str] + sentence_count: Optional[int] + string_index_type: Optional[Union[str, StringIndexType]] + summary_length: Optional[Union[str, SummaryLengthBucket]] + + @overload + def __init__( + self, + *, + instruction: Optional[str] = ..., + logging_opt_out: Optional[bool] = ..., + model_version: Optional[str] = ..., + sentence_count: Optional[int] = ..., + string_index_type: Optional[Union[str, StringIndexType]] = ..., + summary_length: Optional[Union[str, SummaryLengthBucket]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AbstractiveSummarizationOperationAction(AnalyzeTextOperationAction, discriminator='AbstractiveSummarization'): + action_content: Optional[AbstractiveSummarizationActionContent] + kind: Literal[AnalyzeTextOperationActionKind.ABSTRACTIVE_SUMMARIZATION] + name: str + + @overload + def __init__( + self, + *, + action_content: Optional[AbstractiveSummarizationActionContent] = ..., + name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AbstractiveSummarizationOperationResult(AnalyzeTextLROResult, discriminator='AbstractiveSummarizationLROResults'): + kind: Literal[AnalyzeTextOperationResultsKind.ABSTRACTIVE_SUMMARIZATION_OPERATION_RESULTS] + last_update_date_time: datetime + results: AbstractiveSummarizationResult + status: Union[str, TextActionState] + task_name: str + + @overload + def __init__( + self, + *, + last_update_date_time: datetime, + results: AbstractiveSummarizationResult, + status: Union[str, TextActionState], + task_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AbstractiveSummarizationResult(_Model): + documents: list[AbstractiveSummaryActionResult] + errors: list[DocumentError] + model_version: str + statistics: Optional[RequestStatistics] + + @overload + def __init__( + self, + *, + documents: list[AbstractiveSummaryActionResult], + errors: list[DocumentError], + model_version: str, + statistics: Optional[RequestStatistics] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AbstractiveSummary(_Model): + contexts: Optional[list[SummaryContext]] + text: str + + @overload + def __init__( + self, + *, + contexts: Optional[list[SummaryContext]] = ..., + text: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AbstractiveSummaryActionResult(_Model): + detected_language: Optional[DetectedLanguage] + id: str + statistics: Optional[DocumentStatistics] + summaries: list[AbstractiveSummary] + warnings: list[DocumentWarning] + + @overload + def __init__( + self, + *, + detected_language: Optional[DetectedLanguage] = ..., + id: str, + statistics: Optional[DocumentStatistics] = ..., + summaries: list[AbstractiveSummary], + warnings: list[DocumentWarning] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AddressMetadata(BaseMetadata, discriminator='AddressMetadata'): + address_lines: list[str] + city: Optional[str] + country_or_region: Optional[str] + formated_address: str + metadata_kind: Literal[MetadataKind.ADDRESS_METADATA] + postal_code: Optional[str] + state: Optional[str] + + @overload + def __init__( + self, + *, + address_lines: list[str], + city: Optional[str] = ..., + country_or_region: Optional[str] = ..., + formated_address: str, + postal_code: Optional[str] = ..., + state: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AgeMetadata(BaseMetadata, discriminator='AgeMetadata'): + metadata_kind: Literal[MetadataKind.AGE_METADATA] + unit: Union[str, AgeUnit] + value: float + + @overload + def __init__( + self, + *, + unit: Union[str, AgeUnit], + value: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AgeUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DAY = "Day" + MONTH = "Month" + UNSPECIFIED = "Unspecified" + WEEK = "Week" + YEAR = "Year" + + + class azure.ai.textanalytics.models.AllowOverlapEntityPolicyType(EntityOverlapPolicy, discriminator='allowOverlap'): + policy_kind: Literal[PolicyKind.ALLOW_OVERLAP] + + @overload + def __init__(self) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AnalyzeTextEntitiesResult(AnalyzeTextResult, discriminator='EntityRecognitionResults'): + kind: Literal[AnalyzeTextResultsKind.ENTITY_RECOGNITION_RESULTS] + results: EntitiesWithMetadataAutoResult + + @overload + def __init__( + self, + *, + results: EntitiesWithMetadataAutoResult + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AnalyzeTextEntityLinkingResult(AnalyzeTextResult, discriminator='EntityLinkingResults'): + kind: Literal[AnalyzeTextResultsKind.ENTITY_LINKING_RESULTS] + results: EntityLinkingResult + + @overload + def __init__( + self, + *, + results: EntityLinkingResult + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AnalyzeTextError(_Model): + code: Union[str, AnalyzeTextErrorCode] + details: Optional[list[AnalyzeTextError]] + innererror: Optional[InnerErrorModel] + message: str + target: Optional[str] + + @overload + def __init__( + self, + *, + code: Union[str, AnalyzeTextErrorCode], + details: Optional[list[AnalyzeTextError]] = ..., + innererror: Optional[InnerErrorModel] = ..., + message: str, + target: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AnalyzeTextErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AZURE_COGNITIVE_SEARCH_INDEX_LIMIT_REACHED = "AzureCognitiveSearchIndexLimitReached" + AZURE_COGNITIVE_SEARCH_INDEX_NOT_FOUND = "AzureCognitiveSearchIndexNotFound" + AZURE_COGNITIVE_SEARCH_NOT_FOUND = "AzureCognitiveSearchNotFound" + AZURE_COGNITIVE_SEARCH_THROTTLING = "AzureCognitiveSearchThrottling" + CONFLICT = "Conflict" + FORBIDDEN = "Forbidden" + INTERNAL_SERVER_ERROR = "InternalServerError" + INVALID_ARGUMENT = "InvalidArgument" + INVALID_REQUEST = "InvalidRequest" + NOT_FOUND = "NotFound" + OPERATION_NOT_FOUND = "OperationNotFound" + PROJECT_NOT_FOUND = "ProjectNotFound" + QUOTA_EXCEEDED = "QuotaExceeded" + SERVICE_UNAVAILABLE = "ServiceUnavailable" + TIMEOUT = "Timeout" + TOO_MANY_REQUESTS = "TooManyRequests" + UNAUTHORIZED = "Unauthorized" + WARNING = "Warning" + + + class azure.ai.textanalytics.models.AnalyzeTextInput(_Model): + kind: str + + @overload + def __init__( + self, + *, + kind: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AnalyzeTextInputKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ENTITY_LINKING = "EntityLinking" + ENTITY_RECOGNITION = "EntityRecognition" + KEY_PHRASE_EXTRACTION = "KeyPhraseExtraction" + LANGUAGE_DETECTION = "LanguageDetection" + PII_ENTITY_RECOGNITION = "PiiEntityRecognition" + SENTIMENT_ANALYSIS = "SentimentAnalysis" + + + class azure.ai.textanalytics.models.AnalyzeTextKeyPhraseResult(AnalyzeTextResult, discriminator='KeyPhraseExtractionResults'): + kind: Literal[AnalyzeTextResultsKind.KEY_PHRASE_EXTRACTION_RESULTS] + results: KeyPhraseResult + + @overload + def __init__( + self, + *, + results: KeyPhraseResult + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AnalyzeTextLROResult(_Model): + kind: str + last_update_date_time: datetime + status: Union[str, TextActionState] + task_name: Optional[str] + + @overload + def __init__( + self, + *, + kind: str, + last_update_date_time: datetime, + status: Union[str, TextActionState], + task_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AnalyzeTextLanguageDetectionResult(AnalyzeTextResult, discriminator='LanguageDetectionResults'): + kind: Literal[AnalyzeTextResultsKind.LANGUAGE_DETECTION_RESULTS] + results: LanguageDetectionResult + + @overload + def __init__( + self, + *, + results: LanguageDetectionResult + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AnalyzeTextOperationAction(_Model): + kind: str + name: Optional[str] + + @overload + def __init__( + self, + *, + kind: str, + name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AnalyzeTextOperationActionKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ABSTRACTIVE_SUMMARIZATION = "AbstractiveSummarization" + CUSTOM_ENTITY_RECOGNITION = "CustomEntityRecognition" + CUSTOM_MULTI_LABEL_CLASSIFICATION = "CustomMultiLabelClassification" + CUSTOM_SINGLE_LABEL_CLASSIFICATION = "CustomSingleLabelClassification" + ENTITY_LINKING = "EntityLinking" + ENTITY_RECOGNITION = "EntityRecognition" + EXTRACTIVE_SUMMARIZATION = "ExtractiveSummarization" + HEALTHCARE = "Healthcare" + KEY_PHRASE_EXTRACTION = "KeyPhraseExtraction" + PII_ENTITY_RECOGNITION = "PiiEntityRecognition" + SENTIMENT_ANALYSIS = "SentimentAnalysis" + + + class azure.ai.textanalytics.models.AnalyzeTextOperationResultsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ABSTRACTIVE_SUMMARIZATION_OPERATION_RESULTS = "AbstractiveSummarizationLROResults" + CUSTOM_ENTITY_RECOGNITION_OPERATION_RESULTS = "CustomEntityRecognitionLROResults" + CUSTOM_MULTI_LABEL_CLASSIFICATION_OPERATION_RESULTS = "CustomMultiLabelClassificationLROResults" + CUSTOM_SINGLE_LABEL_CLASSIFICATION_OPERATION_RESULTS = "CustomSingleLabelClassificationLROResults" + ENTITY_LINKING_OPERATION_RESULTS = "EntityLinkingLROResults" + ENTITY_RECOGNITION_OPERATION_RESULTS = "EntityRecognitionLROResults" + EXTRACTIVE_SUMMARIZATION_OPERATION_RESULTS = "ExtractiveSummarizationLROResults" + HEALTHCARE_OPERATION_RESULTS = "HealthcareLROResults" + KEY_PHRASE_EXTRACTION_OPERATION_RESULTS = "KeyPhraseExtractionLROResults" + PII_ENTITY_RECOGNITION_OPERATION_RESULTS = "PiiEntityRecognitionLROResults" + SENTIMENT_ANALYSIS_OPERATION_RESULTS = "SentimentAnalysisLROResults" + + + class azure.ai.textanalytics.models.AnalyzeTextOperationState(_Model): + actions: TextActions + created_at: datetime + display_name: Optional[str] + errors: Optional[list[AnalyzeTextError]] + expires_on: Optional[datetime] + job_id: str + last_updated_at: datetime + next_link: Optional[str] + statistics: Optional[RequestStatistics] + status: Union[str, TextActionState] + + @overload + def __init__( + self, + *, + actions: TextActions, + created_at: datetime, + display_name: Optional[str] = ..., + errors: Optional[list[AnalyzeTextError]] = ..., + expires_on: Optional[datetime] = ..., + last_updated_at: datetime, + next_link: Optional[str] = ..., + statistics: Optional[RequestStatistics] = ..., + status: Union[str, TextActionState] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AnalyzeTextPiiResult(AnalyzeTextResult, discriminator='PiiEntityRecognitionResults'): + kind: Literal[AnalyzeTextResultsKind.PII_ENTITY_RECOGNITION_RESULTS] + results: PiiResult + + @overload + def __init__( + self, + *, + results: PiiResult + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AnalyzeTextResult(_Model): + kind: str + + @overload + def __init__( + self, + *, + kind: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AnalyzeTextResultsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ENTITY_LINKING_RESULTS = "EntityLinkingResults" + ENTITY_RECOGNITION_RESULTS = "EntityRecognitionResults" + KEY_PHRASE_EXTRACTION_RESULTS = "KeyPhraseExtractionResults" + LANGUAGE_DETECTION_RESULTS = "LanguageDetectionResults" + PII_ENTITY_RECOGNITION_RESULTS = "PiiEntityRecognitionResults" + SENTIMENT_ANALYSIS_RESULTS = "SentimentAnalysisResults" + + + class azure.ai.textanalytics.models.AnalyzeTextSentimentResult(AnalyzeTextResult, discriminator='SentimentAnalysisResults'): + kind: Literal[AnalyzeTextResultsKind.SENTIMENT_ANALYSIS_RESULTS] + results: SentimentResult + + @overload + def __init__( + self, + *, + results: SentimentResult + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AreaMetadata(BaseMetadata, discriminator='AreaMetadata'): + metadata_kind: Literal[MetadataKind.AREA_METADATA] + unit: Union[str, AreaUnit] + value: float + + @overload + def __init__( + self, + *, + unit: Union[str, AreaUnit], + value: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.AreaUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACRE = "Acre" + SQUARE_CENTIMETER = "SquareCentimeter" + SQUARE_DECAMETER = "SquareDecameter" + SQUARE_DECIMETER = "SquareDecimeter" + SQUARE_FOOT = "SquareFoot" + SQUARE_HECTOMETER = "SquareHectometer" + SQUARE_INCH = "SquareInch" + SQUARE_KILOMETER = "SquareKilometer" + SQUARE_METER = "SquareMeter" + SQUARE_MILE = "SquareMile" + SQUARE_MILLIMETER = "SquareMillimeter" + SQUARE_YARD = "SquareYard" + UNSPECIFIED = "Unspecified" + + + class azure.ai.textanalytics.models.BaseMetadata(_Model): + metadata_kind: str + + @overload + def __init__( + self, + *, + metadata_kind: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.BaseRedactionPolicy(_Model): + entity_types: Optional[list[Union[str, PiiCategoriesExclude]]] + is_default: Optional[bool] + policy_kind: str + policy_name: Optional[str] + + @overload + def __init__( + self, + *, + entity_types: Optional[list[Union[str, PiiCategoriesExclude]]] = ..., + is_default: Optional[bool] = ..., + policy_kind: str, + policy_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CharacterMaskPolicyType(BaseRedactionPolicy, discriminator='characterMask'): + entity_types: Union[list[str, PiiCategoriesExclude]] + is_default: bool + policy_kind: Literal[RedactionPolicyKind.CHARACTER_MASK] + policy_name: str + redaction_character: Optional[Union[str, RedactionCharacter]] + unmask_from_end: Optional[bool] + unmask_length: Optional[int] + + @overload + def __init__( + self, + *, + entity_types: Optional[list[Union[str, PiiCategoriesExclude]]] = ..., + is_default: Optional[bool] = ..., + policy_name: Optional[str] = ..., + redaction_character: Optional[Union[str, RedactionCharacter]] = ..., + unmask_from_end: Optional[bool] = ..., + unmask_length: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.ClassificationActionResult(_Model): + class_property: list[ClassificationResult] + detected_language: Optional[DetectedLanguage] + id: str + statistics: Optional[DocumentStatistics] + warnings: list[DocumentWarning] + + @overload + def __init__( + self, + *, + class_property: list[ClassificationResult], + detected_language: Optional[DetectedLanguage] = ..., + id: str, + statistics: Optional[DocumentStatistics] = ..., + warnings: list[DocumentWarning] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.ClassificationResult(_Model): + category: str + confidence_score: float + + @overload + def __init__( + self, + *, + category: str, + confidence_score: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.ConfidenceScoreThreshold(_Model): + default: float + overrides: Optional[list[ConfidenceScoreThresholdOverride]] + + @overload + def __init__( + self, + *, + default: float, + overrides: Optional[list[ConfidenceScoreThresholdOverride]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.ConfidenceScoreThresholdOverride(_Model): + entity: Union[str, PiiCategoriesExclude] + language: str + value: float + + @overload + def __init__( + self, + *, + entity: Union[str, PiiCategoriesExclude], + language: str, + value: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CurrencyMetadata(BaseMetadata, discriminator='CurrencyMetadata'): + iso4217: Optional[str] + metadata_kind: Literal[MetadataKind.CURRENCY_METADATA] + unit: str + value: float + + @overload + def __init__( + self, + *, + iso4217: Optional[str] = ..., + unit: str, + value: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CustomEntitiesActionContent(_Model): + deployment_name: str + logging_opt_out: Optional[bool] + project_name: str + string_index_type: Optional[Union[str, StringIndexType]] + + @overload + def __init__( + self, + *, + deployment_name: str, + logging_opt_out: Optional[bool] = ..., + project_name: str, + string_index_type: Optional[Union[str, StringIndexType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CustomEntitiesLROTask(AnalyzeTextOperationAction, discriminator='CustomEntityRecognition'): + kind: Literal[AnalyzeTextOperationActionKind.CUSTOM_ENTITY_RECOGNITION] + name: str + parameters: Optional[CustomEntitiesActionContent] + + @overload + def __init__( + self, + *, + name: Optional[str] = ..., + parameters: Optional[CustomEntitiesActionContent] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CustomEntitiesResult(_Model): + deployment_name: str + documents: list[CustomEntityActionResult] + errors: list[DocumentError] + project_name: str + statistics: Optional[RequestStatistics] + + @overload + def __init__( + self, + *, + deployment_name: str, + documents: list[CustomEntityActionResult], + errors: list[DocumentError], + project_name: str, + statistics: Optional[RequestStatistics] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CustomEntityActionResult(_Model): + detected_language: Optional[DetectedLanguage] + entities: list[NamedEntity] + id: str + statistics: Optional[DocumentStatistics] + warnings: list[DocumentWarning] + + @overload + def __init__( + self, + *, + detected_language: Optional[DetectedLanguage] = ..., + entities: list[NamedEntity], + id: str, + statistics: Optional[DocumentStatistics] = ..., + warnings: list[DocumentWarning] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CustomEntityRecognitionOperationResult(AnalyzeTextLROResult, discriminator='CustomEntityRecognitionLROResults'): + kind: Literal[AnalyzeTextOperationResultsKind.CUSTOM_ENTITY_RECOGNITION_OPERATION_RESULTS] + last_update_date_time: datetime + results: CustomEntitiesResult + status: Union[str, TextActionState] + task_name: str + + @overload + def __init__( + self, + *, + last_update_date_time: datetime, + results: CustomEntitiesResult, + status: Union[str, TextActionState], + task_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CustomLabelClassificationResult(_Model): + deployment_name: str + documents: list[ClassificationActionResult] + errors: list[DocumentError] + project_name: str + statistics: Optional[RequestStatistics] + + @overload + def __init__( + self, + *, + deployment_name: str, + documents: list[ClassificationActionResult], + errors: list[DocumentError], + project_name: str, + statistics: Optional[RequestStatistics] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CustomMultiLabelClassificationActionContent(_Model): + deployment_name: str + logging_opt_out: Optional[bool] + project_name: str + + @overload + def __init__( + self, + *, + deployment_name: str, + logging_opt_out: Optional[bool] = ..., + project_name: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CustomMultiLabelClassificationOperationAction(AnalyzeTextOperationAction, discriminator='CustomMultiLabelClassification'): + action_content: Optional[CustomMultiLabelClassificationActionContent] + kind: Literal[AnalyzeTextOperationActionKind.CUSTOM_MULTI_LABEL_CLASSIFICATION] + name: str + + @overload + def __init__( + self, + *, + action_content: Optional[CustomMultiLabelClassificationActionContent] = ..., + name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CustomMultiLabelClassificationOperationResult(AnalyzeTextLROResult, discriminator='CustomMultiLabelClassificationLROResults'): + kind: Literal[AnalyzeTextOperationResultsKind.CUSTOM_MULTI_LABEL_CLASSIFICATION_OPERATION_RESULTS] + last_update_date_time: datetime + results: CustomLabelClassificationResult + status: Union[str, TextActionState] + task_name: str + + @overload + def __init__( + self, + *, + last_update_date_time: datetime, + results: CustomLabelClassificationResult, + status: Union[str, TextActionState], + task_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CustomSingleLabelClassificationActionContent(_Model): + deployment_name: str + logging_opt_out: Optional[bool] + project_name: str + + @overload + def __init__( + self, + *, + deployment_name: str, + logging_opt_out: Optional[bool] = ..., + project_name: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CustomSingleLabelClassificationOperationAction(AnalyzeTextOperationAction, discriminator='CustomSingleLabelClassification'): + action_content: Optional[CustomSingleLabelClassificationActionContent] + kind: Literal[AnalyzeTextOperationActionKind.CUSTOM_SINGLE_LABEL_CLASSIFICATION] + name: str + + @overload + def __init__( + self, + *, + action_content: Optional[CustomSingleLabelClassificationActionContent] = ..., + name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.CustomSingleLabelClassificationOperationResult(AnalyzeTextLROResult, discriminator='CustomSingleLabelClassificationLROResults'): + kind: Literal[AnalyzeTextOperationResultsKind.CUSTOM_SINGLE_LABEL_CLASSIFICATION_OPERATION_RESULTS] + last_update_date_time: datetime + results: CustomLabelClassificationResult + status: Union[str, TextActionState] + task_name: str + + @overload + def __init__( + self, + *, + last_update_date_time: datetime, + results: CustomLabelClassificationResult, + status: Union[str, TextActionState], + task_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.DateMetadata(BaseMetadata, discriminator='DateMetadata'): + dates: Optional[list[DateValue]] + metadata_kind: Literal[MetadataKind.DATE_METADATA] + + @overload + def __init__( + self, + *, + dates: Optional[list[DateValue]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.DateTimeMetadata(BaseMetadata, discriminator='DateTimeMetadata'): + dates: Optional[list[DateValue]] + metadata_kind: Literal[MetadataKind.DATE_TIME_METADATA] + + @overload + def __init__( + self, + *, + dates: Optional[list[DateValue]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.DateValue(_Model): + modifier: Optional[Union[str, TemporalModifier]] + timex: str + value: str + + @overload + def __init__( + self, + *, + modifier: Optional[Union[str, TemporalModifier]] = ..., + timex: str, + value: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.DetectedLanguage(_Model): + confidence_score: float + iso6391_name: str + name: str + script_iso15924_code: Optional[Union[str, ScriptCode]] + script_name: Optional[Union[str, ScriptKind]] + + @overload + def __init__( + self, + *, + confidence_score: float, + iso6391_name: str, + name: str, + script_iso15924_code: Optional[Union[str, ScriptCode]] = ..., + script_name: Optional[Union[str, ScriptKind]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.DocumentError(_Model): + error: AnalyzeTextError + id: str + + @overload + def __init__( + self, + *, + error: AnalyzeTextError, + id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.DocumentSentiment(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MIXED = "mixed" + NEGATIVE = "negative" + NEUTRAL = "neutral" + POSITIVE = "positive" + + + class azure.ai.textanalytics.models.DocumentStatistics(_Model): + characters_count: int + transactions_count: int + + @overload + def __init__( + self, + *, + characters_count: int, + transactions_count: int + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.DocumentWarning(_Model): + code: Union[str, WarningCode] + message: str + target_ref: Optional[str] + + @overload + def __init__( + self, + *, + code: Union[str, WarningCode], + message: str, + target_ref: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntitiesActionContent(_Model): + exclusions: Optional[list[Union[str, EntityCategory]]] + inclusions: Optional[list[Union[str, EntityCategory]]] + inference_options: Optional[EntityInferenceConfig] + logging_opt_out: Optional[bool] + model_version: Optional[str] + overlap_policy: Optional[EntityOverlapPolicy] + string_index_type: Optional[Union[str, StringIndexType]] + + @overload + def __init__( + self, + *, + exclusions: Optional[list[Union[str, EntityCategory]]] = ..., + inclusions: Optional[list[Union[str, EntityCategory]]] = ..., + inference_options: Optional[EntityInferenceConfig] = ..., + logging_opt_out: Optional[bool] = ..., + model_version: Optional[str] = ..., + overlap_policy: Optional[EntityOverlapPolicy] = ..., + string_index_type: Optional[Union[str, StringIndexType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntitiesLROTask(AnalyzeTextOperationAction, discriminator='EntityRecognition'): + kind: Literal[AnalyzeTextOperationActionKind.ENTITY_RECOGNITION] + name: str + parameters: Optional[EntitiesActionContent] + + @overload + def __init__( + self, + *, + name: Optional[str] = ..., + parameters: Optional[EntitiesActionContent] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntitiesResult(_Model): + documents: list[EntityActionResultWithMetadata] + errors: list[DocumentError] + model_version: str + statistics: Optional[RequestStatistics] + + @overload + def __init__( + self, + *, + documents: list[EntityActionResultWithMetadata], + errors: list[DocumentError], + model_version: str, + statistics: Optional[RequestStatistics] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntitiesWithMetadataAutoResult(_Model): + documents: list[EntityActionResult] + errors: list[DocumentError] + model_version: str + statistics: Optional[RequestStatistics] + + @overload + def __init__( + self, + *, + documents: list[EntityActionResult], + errors: list[DocumentError], + model_version: str, + statistics: Optional[RequestStatistics] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntityActionResult(_Model): + detected_language: Optional[DetectedLanguage] + entities: list[NamedEntityWithMetadata] + id: str + statistics: Optional[DocumentStatistics] + warnings: list[DocumentWarning] + + @overload + def __init__( + self, + *, + detected_language: Optional[DetectedLanguage] = ..., + entities: list[NamedEntityWithMetadata], + id: str, + statistics: Optional[DocumentStatistics] = ..., + warnings: list[DocumentWarning] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntityActionResultWithMetadata(_Model): + entities: list[NamedEntityWithMetadata] + id: str + statistics: Optional[DocumentStatistics] + warnings: list[DocumentWarning] + + @overload + def __init__( + self, + *, + entities: list[NamedEntityWithMetadata], + id: str, + statistics: Optional[DocumentStatistics] = ..., + warnings: list[DocumentWarning] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ADDRESS = "Address" + AGE = "Age" + AIRPORT = "Airport" + AREA = "Area" + CITY = "City" + COMPUTING_PRODUCT = "ComputingProduct" + CONTINENT = "Continent" + COUNTRY_REGION = "CountryRegion" + CULTURAL_EVENT = "CulturalEvent" + CURRENCY = "Currency" + DATE = "Date" + DATE_RANGE = "DateRange" + DATE_TIME = "DateTime" + DATE_TIME_RANGE = "DateTimeRange" + DIMENSION = "Dimension" + DURATION = "Duration" + EMAIL = "Email" + EVENT = "Event" + GEOLOGICAL = "Geological" + GEO_POLITICAL_ENTITY = "GPE" + HEIGHT = "Height" + INFORMATION = "Information" + IP_ADDRESS = "IP" + LENGTH = "Length" + LOCATION = "Location" + NATURAL_EVENT = "NaturalEvent" + NUMBER = "Number" + NUMBER_RANGE = "NumberRange" + NUMERIC = "Numeric" + ORDINAL = "Ordinal" + ORGANIZATION = "Organization" + ORGANIZATION_MEDICAL = "OrganizationMedical" + ORGANIZATION_SPORTS = "OrganizationSports" + ORGANIZATION_STOCK_EXCHANGE = "OrganizationStockExchange" + PERCENTAGE = "Percentage" + PERSON = "Person" + PERSON_TYPE = "PersonType" + PHONE_NUMBER = "PhoneNumber" + PRODUCT = "Product" + SET_TEMPORAL = "SetTemporal" + SKILL = "Skill" + SPEED = "Speed" + SPORTS_EVENT = "SportsEvent" + STATE = "State" + STRUCTURAL = "Structural" + TEMPERATURE = "Temperature" + TEMPORAL = "Temporal" + TIME = "Time" + TIME_RANGE = "TimeRange" + URI = "URL" + VOLUME = "Volume" + WEIGHT = "Weight" + + + class azure.ai.textanalytics.models.EntityInferenceConfig(_Model): + exclude_normalized_values: Optional[bool] + + @overload + def __init__( + self, + *, + exclude_normalized_values: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntityLinkingActionContent(_Model): + logging_opt_out: Optional[bool] + model_version: Optional[str] + string_index_type: Optional[Union[str, StringIndexType]] + + @overload + def __init__( + self, + *, + logging_opt_out: Optional[bool] = ..., + model_version: Optional[str] = ..., + string_index_type: Optional[Union[str, StringIndexType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntityLinkingActionResult(_Model): + detected_language: Optional[DetectedLanguage] + entities: list[LinkedEntity] + id: str + statistics: Optional[DocumentStatistics] + warnings: list[DocumentWarning] + + @overload + def __init__( + self, + *, + detected_language: Optional[DetectedLanguage] = ..., + entities: list[LinkedEntity], + id: str, + statistics: Optional[DocumentStatistics] = ..., + warnings: list[DocumentWarning] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntityLinkingLROTask(AnalyzeTextOperationAction, discriminator='EntityLinking'): + kind: Literal[AnalyzeTextOperationActionKind.ENTITY_LINKING] + name: str + parameters: Optional[EntityLinkingActionContent] + + @overload + def __init__( + self, + *, + name: Optional[str] = ..., + parameters: Optional[EntityLinkingActionContent] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntityLinkingMatch(_Model): + confidence_score: float + length: int + offset: int + text: str + + @overload + def __init__( + self, + *, + confidence_score: float, + length: int, + offset: int, + text: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntityLinkingOperationResult(AnalyzeTextLROResult, discriminator='EntityLinkingLROResults'): + kind: Literal[AnalyzeTextOperationResultsKind.ENTITY_LINKING_OPERATION_RESULTS] + last_update_date_time: datetime + results: EntityLinkingResult + status: Union[str, TextActionState] + task_name: str + + @overload + def __init__( + self, + *, + last_update_date_time: datetime, + results: EntityLinkingResult, + status: Union[str, TextActionState], + task_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntityLinkingResult(_Model): + documents: list[EntityLinkingActionResult] + errors: list[DocumentError] + model_version: str + statistics: Optional[RequestStatistics] + + @overload + def __init__( + self, + *, + documents: list[EntityLinkingActionResult], + errors: list[DocumentError], + model_version: str, + statistics: Optional[RequestStatistics] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntityMaskPolicyType(BaseRedactionPolicy, discriminator='entityMask'): + entity_types: Union[list[str, PiiCategoriesExclude]] + is_default: bool + policy_kind: Literal[RedactionPolicyKind.ENTITY_MASK] + policy_name: str + + @overload + def __init__( + self, + *, + entity_types: Optional[list[Union[str, PiiCategoriesExclude]]] = ..., + is_default: Optional[bool] = ..., + policy_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntityOverlapPolicy(_Model): + policy_kind: str + + @overload + def __init__( + self, + *, + policy_kind: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntityRecognitionOperationResult(AnalyzeTextLROResult, discriminator='EntityRecognitionLROResults'): + kind: Literal[AnalyzeTextOperationResultsKind.ENTITY_RECOGNITION_OPERATION_RESULTS] + last_update_date_time: datetime + results: EntitiesResult + status: Union[str, TextActionState] + task_name: str + + @overload + def __init__( + self, + *, + last_update_date_time: datetime, + results: EntitiesResult, + status: Union[str, TextActionState], + task_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntitySynonym(_Model): + language: Optional[str] + synonym: str + + @overload + def __init__( + self, + *, + language: Optional[str] = ..., + synonym: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntitySynonyms(_Model): + entity_type: Union[str, PiiCategoriesExclude] + synonyms: list[EntitySynonym] + + @overload + def __init__( + self, + *, + entity_type: Union[str, PiiCategoriesExclude], + synonyms: list[EntitySynonym] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.EntityTag(_Model): + confidence_score: Optional[float] + name: str + + @overload + def __init__( + self, + *, + confidence_score: Optional[float] = ..., + name: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.ErrorResponse(_Model): + error: AnalyzeTextError + + @overload + def __init__( + self, + *, + error: AnalyzeTextError + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.ExtractedSummaryActionResult(_Model): + detected_language: Optional[DetectedLanguage] + id: str + sentences: list[ExtractedSummarySentence] + statistics: Optional[DocumentStatistics] + warnings: list[DocumentWarning] + + @overload + def __init__( + self, + *, + detected_language: Optional[DetectedLanguage] = ..., + id: str, + sentences: list[ExtractedSummarySentence], + statistics: Optional[DocumentStatistics] = ..., + warnings: list[DocumentWarning] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.ExtractedSummarySentence(_Model): + length: int + offset: int + rank_score: float + text: str + + @overload + def __init__( + self, + *, + length: int, + offset: int, + rank_score: float, + text: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.ExtractiveSummarizationActionContent(_Model): + logging_opt_out: Optional[bool] + model_version: Optional[str] + query: Optional[str] + sentence_count: Optional[int] + sort_by: Optional[Union[str, ExtractiveSummarizationSortingCriteria]] + string_index_type: Optional[Union[str, StringIndexType]] + + @overload + def __init__( + self, + *, + logging_opt_out: Optional[bool] = ..., + model_version: Optional[str] = ..., + query: Optional[str] = ..., + sentence_count: Optional[int] = ..., + sort_by: Optional[Union[str, ExtractiveSummarizationSortingCriteria]] = ..., + string_index_type: Optional[Union[str, StringIndexType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.ExtractiveSummarizationOperationAction(AnalyzeTextOperationAction, discriminator='ExtractiveSummarization'): + action_content: Optional[ExtractiveSummarizationActionContent] + kind: Literal[AnalyzeTextOperationActionKind.EXTRACTIVE_SUMMARIZATION] + name: str + + @overload + def __init__( + self, + *, + action_content: Optional[ExtractiveSummarizationActionContent] = ..., + name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.ExtractiveSummarizationOperationResult(AnalyzeTextLROResult, discriminator='ExtractiveSummarizationLROResults'): + kind: Literal[AnalyzeTextOperationResultsKind.EXTRACTIVE_SUMMARIZATION_OPERATION_RESULTS] + last_update_date_time: datetime + results: ExtractiveSummarizationResult + status: Union[str, TextActionState] + task_name: str + + @overload + def __init__( + self, + *, + last_update_date_time: datetime, + results: ExtractiveSummarizationResult, + status: Union[str, TextActionState], + task_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.ExtractiveSummarizationResult(_Model): + documents: list[ExtractedSummaryActionResult] + errors: list[DocumentError] + model_version: str + statistics: Optional[RequestStatistics] + + @overload + def __init__( + self, + *, + documents: list[ExtractedSummaryActionResult], + errors: list[DocumentError], + model_version: str, + statistics: Optional[RequestStatistics] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.ExtractiveSummarizationSortingCriteria(str, Enum, metaclass=CaseInsensitiveEnumMeta): + OFFSET = "Offset" + RANK = "Rank" + + + class azure.ai.textanalytics.models.FhirBundle(_Model): + + + class azure.ai.textanalytics.models.FhirVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ENUM4_0_1 = "4.0.1" + + + class azure.ai.textanalytics.models.HealthcareActionResult(_Model): + detected_language: Optional[DetectedLanguage] + entities: list[HealthcareEntity] + fhir_bundle: Optional[FhirBundle] + id: str + relations: list[HealthcareRelation] + statistics: Optional[DocumentStatistics] + warnings: list[DocumentWarning] + + @overload + def __init__( + self, + *, + detected_language: Optional[DetectedLanguage] = ..., + entities: list[HealthcareEntity], + fhir_bundle: Optional[FhirBundle] = ..., + id: str, + relations: list[HealthcareRelation], + statistics: Optional[DocumentStatistics] = ..., + warnings: list[DocumentWarning] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.HealthcareAssertion(_Model): + association: Optional[Union[str, HealthcareAssertionAssociation]] + certainty: Optional[Union[str, HealthcareAssertionCertainty]] + conditionality: Optional[Union[str, HealthcareAssertionConditionality]] + temporality: Optional[Union[str, HealthcareAssertionTemporality]] + + @overload + def __init__( + self, + *, + association: Optional[Union[str, HealthcareAssertionAssociation]] = ..., + certainty: Optional[Union[str, HealthcareAssertionCertainty]] = ..., + conditionality: Optional[Union[str, HealthcareAssertionConditionality]] = ..., + temporality: Optional[Union[str, HealthcareAssertionTemporality]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.HealthcareAssertionAssociation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + OTHER = "other" + SUBJECT = "subject" + + + class azure.ai.textanalytics.models.HealthcareAssertionCertainty(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NEGATIVE = "negative" + NEGATIVE_POSSIBLE = "negativePossible" + NEUTRAL_POSSIBLE = "neutralPossible" + POSITIVE = "positive" + POSITIVE_POSSIBLE = "positivePossible" + + + class azure.ai.textanalytics.models.HealthcareAssertionConditionality(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CONDITIONAL = "conditional" + HYPOTHETICAL = "hypothetical" + + + class azure.ai.textanalytics.models.HealthcareAssertionTemporality(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CURRENT = "current" + FUTURE = "future" + PAST = "past" + + + class azure.ai.textanalytics.models.HealthcareDocumentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CLINICAL_TRIAL = "ClinicalTrial" + CONSULT = "Consult" + DISCHARGE_SUMMARY = "DischargeSummary" + HISTORY_AND_PHYSICAL = "HistoryAndPhysical" + IMAGING = "Imaging" + NONE = "None" + PATHOLOGY = "Pathology" + PROCEDURE_NOTE = "ProcedureNote" + PROGRESS_NOTE = "ProgressNote" + + + class azure.ai.textanalytics.models.HealthcareEntity(_Model): + assertion: Optional[HealthcareAssertion] + category: Union[str, HealthcareEntityCategory] + confidence_score: float + length: int + links: Optional[list[HealthcareEntityLink]] + name: Optional[str] + offset: int + subcategory: Optional[str] + text: str + + @overload + def __init__( + self, + *, + assertion: Optional[HealthcareAssertion] = ..., + category: Union[str, HealthcareEntityCategory], + confidence_score: float, + length: int, + links: Optional[list[HealthcareEntityLink]] = ..., + name: Optional[str] = ..., + offset: int, + subcategory: Optional[str] = ..., + text: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.HealthcareEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ADMINISTRATIVE_EVENT = "AdministrativeEvent" + AGE = "Age" + ALLERGEN = "Allergen" + BODY_STRUCTURE = "BodyStructure" + CARE_ENVIRONMENT = "CareEnvironment" + CONDITION_QUALIFIER = "ConditionQualifier" + CONDITION_SCALE = "ConditionScale" + COURSE = "Course" + DATE = "Date" + DIAGNOSIS = "Diagnosis" + DIRECTION = "Direction" + DOSAGE = "Dosage" + EMPLOYMENT = "Employment" + ETHNICITY = "Ethnicity" + EXAMINATION_NAME = "ExaminationName" + EXPRESSION = "Expression" + FAMILY_RELATION = "FamilyRelation" + FREQUENCY = "Frequency" + GENDER = "Gender" + GENE_OR_PROTEIN = "GeneOrProtein" + HEALTHCARE_PROFESSION = "HealthcareProfession" + LIVING_STATUS = "LivingStatus" + MEASUREMENT_UNIT = "MeasurementUnit" + MEASUREMENT_VALUE = "MeasurementValue" + MEDICATION_CLASS = "MedicationClass" + MEDICATION_FORM = "MedicationForm" + MEDICATION_NAME = "MedicationName" + MEDICATION_ROUTE = "MedicationRoute" + MUTATION_TYPE = "MutationType" + RELATIONAL_OPERATOR = "RelationalOperator" + SUBSTANCE_USE = "SubstanceUse" + SUBSTANCE_USE_AMOUNT = "SubstanceUseAmount" + SYMPTOM_OR_SIGN = "SymptomOrSign" + TIME = "Time" + TREATMENT_NAME = "TreatmentName" + VARIANT = "Variant" + + + class azure.ai.textanalytics.models.HealthcareEntityLink(_Model): + data_source: str + id: str + + @overload + def __init__( + self, + *, + data_source: str, + id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.HealthcareLROResult(AnalyzeTextLROResult, discriminator='HealthcareLROResults'): + kind: Literal[AnalyzeTextOperationResultsKind.HEALTHCARE_OPERATION_RESULTS] + last_update_date_time: datetime + results: HealthcareResult + status: Union[str, TextActionState] + task_name: str + + @overload + def __init__( + self, + *, + last_update_date_time: datetime, + results: HealthcareResult, + status: Union[str, TextActionState], + task_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.HealthcareLROTask(AnalyzeTextOperationAction, discriminator='Healthcare'): + kind: Literal[AnalyzeTextOperationActionKind.HEALTHCARE] + name: str + parameters: Optional[HealthcareTaskParameters] + + @overload + def __init__( + self, + *, + name: Optional[str] = ..., + parameters: Optional[HealthcareTaskParameters] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.HealthcareRelation(_Model): + confidence_score: Optional[float] + entities: list[HealthcareRelationEntity] + relation_type: Union[str, RelationType] + + @overload + def __init__( + self, + *, + confidence_score: Optional[float] = ..., + entities: list[HealthcareRelationEntity], + relation_type: Union[str, RelationType] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.HealthcareRelationEntity(_Model): + ref: str + role: str + + @overload + def __init__( + self, + *, + ref: str, + role: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.HealthcareResult(_Model): + documents: list[HealthcareActionResult] + errors: list[DocumentError] + model_version: str + statistics: Optional[RequestStatistics] + + @overload + def __init__( + self, + *, + documents: list[HealthcareActionResult], + errors: list[DocumentError], + model_version: str, + statistics: Optional[RequestStatistics] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.HealthcareTaskParameters(_Model): + document_type: Optional[Union[str, HealthcareDocumentType]] + fhir_version: Optional[Union[str, FhirVersion]] + logging_opt_out: Optional[bool] + model_version: Optional[str] + string_index_type: Optional[Union[str, StringIndexType]] + + @overload + def __init__( + self, + *, + document_type: Optional[Union[str, HealthcareDocumentType]] = ..., + fhir_version: Optional[Union[str, FhirVersion]] = ..., + logging_opt_out: Optional[bool] = ..., + model_version: Optional[str] = ..., + string_index_type: Optional[Union[str, StringIndexType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.InformationMetadata(BaseMetadata, discriminator='InformationMetadata'): + metadata_kind: Literal[MetadataKind.INFORMATION_METADATA] + unit: Union[str, InformationUnit] + value: float + + @overload + def __init__( + self, + *, + unit: Union[str, InformationUnit], + value: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.InformationUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BIT = "Bit" + BYTE = "Byte" + GIGABIT = "Gigabit" + GIGABYTE = "Gigabyte" + KILOBIT = "Kilobit" + KILOBYTE = "Kilobyte" + MEGABIT = "Megabit" + MEGABYTE = "Megabyte" + PETABIT = "Petabit" + PETABYTE = "Petabyte" + TERABIT = "Terabit" + TERABYTE = "Terabyte" + UNSPECIFIED = "Unspecified" + + + class azure.ai.textanalytics.models.InnerErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AZURE_COGNITIVE_SEARCH_NOT_FOUND = "AzureCognitiveSearchNotFound" + AZURE_COGNITIVE_SEARCH_THROTTLING = "AzureCognitiveSearchThrottling" + EMPTY_REQUEST = "EmptyRequest" + EXTRACTION_FAILURE = "ExtractionFailure" + INVALID_COUNTRY_HINT = "InvalidCountryHint" + INVALID_DOCUMENT = "InvalidDocument" + INVALID_DOCUMENT_BATCH = "InvalidDocumentBatch" + INVALID_PARAMETER_VALUE = "InvalidParameterValue" + INVALID_REQUEST = "InvalidRequest" + INVALID_REQUEST_BODY_FORMAT = "InvalidRequestBodyFormat" + KNOWLEDGE_BASE_NOT_FOUND = "KnowledgeBaseNotFound" + MISSING_INPUT_DOCUMENTS = "MissingInputDocuments" + MODEL_VERSION_INCORRECT = "ModelVersionIncorrect" + UNSUPPORTED_LANGUAGE_CODE = "UnsupportedLanguageCode" + + + class azure.ai.textanalytics.models.InnerErrorModel(_Model): + code: Union[str, InnerErrorCode] + details: Optional[dict[str, str]] + innererror: Optional[InnerErrorModel] + message: str + target: Optional[str] + + @overload + def __init__( + self, + *, + code: Union[str, InnerErrorCode], + details: Optional[dict[str, str]] = ..., + innererror: Optional[InnerErrorModel] = ..., + message: str, + target: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.KeyPhraseActionContent(_Model): + logging_opt_out: Optional[bool] + model_version: Optional[str] + + @overload + def __init__( + self, + *, + logging_opt_out: Optional[bool] = ..., + model_version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.KeyPhraseExtractionOperationResult(AnalyzeTextLROResult, discriminator='KeyPhraseExtractionLROResults'): + kind: Literal[AnalyzeTextOperationResultsKind.KEY_PHRASE_EXTRACTION_OPERATION_RESULTS] + last_update_date_time: datetime + results: KeyPhraseResult + status: Union[str, TextActionState] + task_name: str + + @overload + def __init__( + self, + *, + last_update_date_time: datetime, + results: KeyPhraseResult, + status: Union[str, TextActionState], + task_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.KeyPhraseLROTask(AnalyzeTextOperationAction, discriminator='KeyPhraseExtraction'): + kind: Literal[AnalyzeTextOperationActionKind.KEY_PHRASE_EXTRACTION] + name: str + parameters: Optional[KeyPhraseActionContent] + + @overload + def __init__( + self, + *, + name: Optional[str] = ..., + parameters: Optional[KeyPhraseActionContent] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.KeyPhraseResult(_Model): + documents: list[KeyPhrasesActionResult] + errors: list[DocumentError] + model_version: str + statistics: Optional[RequestStatistics] + + @overload + def __init__( + self, + *, + documents: list[KeyPhrasesActionResult], + errors: list[DocumentError], + model_version: str, + statistics: Optional[RequestStatistics] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.KeyPhrasesActionResult(_Model): + detected_language: Optional[DetectedLanguage] + id: str + key_phrases: list[str] + statistics: Optional[DocumentStatistics] + warnings: list[DocumentWarning] + + @overload + def __init__( + self, + *, + detected_language: Optional[DetectedLanguage] = ..., + id: str, + key_phrases: list[str], + statistics: Optional[DocumentStatistics] = ..., + warnings: list[DocumentWarning] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.LanguageDetectionActionContent(_Model): + logging_opt_out: Optional[bool] + model_version: Optional[str] + + @overload + def __init__( + self, + *, + logging_opt_out: Optional[bool] = ..., + model_version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.LanguageDetectionDocumentResult(_Model): + detected_language: DetectedLanguage + id: str + statistics: Optional[DocumentStatistics] + warnings: list[DocumentWarning] + + @overload + def __init__( + self, + *, + detected_language: DetectedLanguage, + id: str, + statistics: Optional[DocumentStatistics] = ..., + warnings: list[DocumentWarning] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.LanguageDetectionResult(_Model): + documents: list[LanguageDetectionDocumentResult] + errors: list[DocumentError] + model_version: str + statistics: Optional[RequestStatistics] + + @overload + def __init__( + self, + *, + documents: list[LanguageDetectionDocumentResult], + errors: list[DocumentError], + model_version: str, + statistics: Optional[RequestStatistics] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.LanguageDetectionTextInput(_Model): + language_inputs: Optional[list[LanguageInput]] + + @overload + def __init__( + self, + *, + language_inputs: Optional[list[LanguageInput]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.LanguageInput(_Model): + country_hint: Optional[str] + id: str + text: str + + @overload + def __init__( + self, + *, + country_hint: Optional[str] = ..., + id: str, + text: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.LengthMetadata(BaseMetadata, discriminator='LengthMetadata'): + metadata_kind: Literal[MetadataKind.LENGTH_METADATA] + unit: Union[str, LengthUnit] + value: float + + @overload + def __init__( + self, + *, + unit: Union[str, LengthUnit], + value: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.LengthUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CENTIMETER = "Centimeter" + DECAMETER = "Decameter" + DECIMETER = "Decimeter" + FOOT = "Foot" + HECTOMETER = "Hectometer" + INCH = "Inch" + KILOMETER = "Kilometer" + LIGHT_YEAR = "LightYear" + METER = "Meter" + MICROMETER = "Micrometer" + MILE = "Mile" + MILLIMETER = "Millimeter" + NANOMETER = "Nanometer" + PICOMETER = "Picometer" + POINT = "Point" + UNSPECIFIED = "Unspecified" + YARD = "Yard" + + + class azure.ai.textanalytics.models.LinkedEntity(_Model): + bing_id: Optional[str] + data_source: str + id: Optional[str] + language: str + matches: list[EntityLinkingMatch] + name: str + url: str + + @overload + def __init__( + self, + *, + bing_id: Optional[str] = ..., + data_source: str, + id: Optional[str] = ..., + language: str, + matches: list[EntityLinkingMatch], + name: str, + url: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.MatchLongestEntityPolicyType(EntityOverlapPolicy, discriminator='matchLongest'): + policy_kind: Literal[PolicyKind.MATCH_LONGEST] + + @overload + def __init__(self) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.MetadataKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ADDRESS_METADATA = "AddressMetadata" + AGE_METADATA = "AgeMetadata" + AREA_METADATA = "AreaMetadata" + CURRENCY_METADATA = "CurrencyMetadata" + DATE_METADATA = "DateMetadata" + DATE_TIME_METADATA = "DateTimeMetadata" + INFORMATION_METADATA = "InformationMetadata" + LENGTH_METADATA = "LengthMetadata" + NUMBER_METADATA = "NumberMetadata" + NUMERIC_RANGE_METADATA = "NumericRangeMetadata" + ORDINAL_METADATA = "OrdinalMetadata" + SPEED_METADATA = "SpeedMetadata" + TEMPERATURE_METADATA = "TemperatureMetadata" + TEMPORAL_SET_METADATA = "TemporalSetMetadata" + TEMPORAL_SPAN_METADATA = "TemporalSpanMetadata" + TIME_METADATA = "TimeMetadata" + VOLUME_METADATA = "VolumeMetadata" + WEIGHT_METADATA = "WeightMetadata" + + + class azure.ai.textanalytics.models.MultiLanguageInput(_Model): + id: str + language: Optional[str] + text: str + + @overload + def __init__( + self, + *, + id: str, + language: Optional[str] = ..., + text: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.MultiLanguageTextInput(_Model): + multi_language_inputs: Optional[list[MultiLanguageInput]] + + @overload + def __init__( + self, + *, + multi_language_inputs: Optional[list[MultiLanguageInput]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.NamedEntity(_Model): + category: str + confidence_score: float + length: int + offset: int + subcategory: Optional[str] + text: str + + @overload + def __init__( + self, + *, + category: str, + confidence_score: float, + length: int, + offset: int, + subcategory: Optional[str] = ..., + text: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.NamedEntityWithMetadata(_Model): + category: str + confidence_score: float + length: int + metadata: Optional[BaseMetadata] + offset: int + subcategory: Optional[str] + tags: Optional[list[EntityTag]] + text: str + type: Optional[str] + + @overload + def __init__( + self, + *, + category: str, + confidence_score: float, + length: int, + metadata: Optional[BaseMetadata] = ..., + offset: int, + subcategory: Optional[str] = ..., + tags: Optional[list[EntityTag]] = ..., + text: str, + type: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.NoMaskPolicyType(BaseRedactionPolicy, discriminator='noMask'): + entity_types: Union[list[str, PiiCategoriesExclude]] + is_default: bool + policy_kind: Literal[RedactionPolicyKind.NO_MASK] + policy_name: str + + @overload + def __init__( + self, + *, + entity_types: Optional[list[Union[str, PiiCategoriesExclude]]] = ..., + is_default: Optional[bool] = ..., + policy_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.NumberKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DECIMAL = "Decimal" + FRACTION = "Fraction" + INTEGER = "Integer" + PERCENT = "Percent" + POWER = "Power" + UNSPECIFIED = "Unspecified" + + + class azure.ai.textanalytics.models.NumberMetadata(BaseMetadata, discriminator='NumberMetadata'): + metadata_kind: Literal[MetadataKind.NUMBER_METADATA] + number_kind: Union[str, NumberKind] + value: float + + @overload + def __init__( + self, + *, + number_kind: Union[str, NumberKind], + value: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.NumericRangeMetadata(BaseMetadata, discriminator='NumericRangeMetadata'): + maximum: float + metadata_kind: Literal[MetadataKind.NUMERIC_RANGE_METADATA] + minimum: float + range_inclusivity: Optional[Union[str, RangeInclusivity]] + range_kind: Union[str, RangeKind] + + @overload + def __init__( + self, + *, + maximum: float, + minimum: float, + range_inclusivity: Optional[Union[str, RangeInclusivity]] = ..., + range_kind: Union[str, RangeKind] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.OrdinalMetadata(BaseMetadata, discriminator='OrdinalMetadata'): + metadata_kind: Literal[MetadataKind.ORDINAL_METADATA] + offset: str + relative_to: Union[str, RelativeTo] + value: str + + @overload + def __init__( + self, + *, + offset: str, + relative_to: Union[str, RelativeTo], + value: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.PiiActionContent(_Model): + confidence_score_threshold: Optional[ConfidenceScoreThreshold] + disable_entity_validation: Optional[bool] + domain: Optional[Union[str, PiiDomain]] + entity_synonyms: Optional[list[EntitySynonyms]] + exclude_pii_categories: Optional[list[Union[str, PiiCategoriesExclude]]] + logging_opt_out: Optional[bool] + model_version: Optional[str] + pii_categories: Optional[list[Union[str, PiiCategory]]] + redaction_policies: Optional[list[BaseRedactionPolicy]] + string_index_type: Optional[Union[str, StringIndexType]] + value_exclusion_policy: Optional[ValueExclusionPolicy] + + @overload + def __init__( + self, + *, + confidence_score_threshold: Optional[ConfidenceScoreThreshold] = ..., + disable_entity_validation: Optional[bool] = ..., + domain: Optional[Union[str, PiiDomain]] = ..., + entity_synonyms: Optional[list[EntitySynonyms]] = ..., + exclude_pii_categories: Optional[list[Union[str, PiiCategoriesExclude]]] = ..., + logging_opt_out: Optional[bool] = ..., + model_version: Optional[str] = ..., + pii_categories: Optional[list[Union[str, PiiCategory]]] = ..., + redaction_policies: Optional[list[BaseRedactionPolicy]] = ..., + string_index_type: Optional[Union[str, StringIndexType]] = ..., + value_exclusion_policy: Optional[ValueExclusionPolicy] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.PiiCategoriesExclude(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ABA_ROUTING_NUMBER = "ABARoutingNumber" + ADDRESS = "Address" + AGE = "Age" + AIRPORT = "Airport" + AR_NATIONAL_IDENTITY_NUMBER = "ARNationalIdentityNumber" + AT_IDENTITY_CARD = "ATIdentityCard" + AT_TAX_IDENTIFICATION_NUMBER = "ATTaxIdentificationNumber" + AT_VALUE_ADDED_TAX_NUMBER = "ATValueAddedTaxNumber" + AU_BANK_ACCOUNT_NUMBER = "AUBankAccountNumber" + AU_BUSINESS_NUMBER = "AUBusinessNumber" + AU_COMPANY_NUMBER = "AUCompanyNumber" + AU_DRIVERS_LICENSE_NUMBER = "AUDriversLicenseNumber" + AU_MEDICAL_ACCOUNT_NUMBER = "AUMedicalAccountNumber" + AU_PASSPORT_NUMBER = "AUPassportNumber" + AU_TAX_FILE_NUMBER = "AUTaxFileNumber" + AZURE_DOCUMENT_DBAUTH_KEY = "AzureDocumentDBAuthKey" + AZURE_IAAS_DATABASE_CONNECTION_AND_SQL_STRING = "AzureIAASDatabaseConnectionAndSQLString" + AZURE_IO_T_CONNECTION_STRING = "AzureIoTConnectionString" + AZURE_PUBLISH_SETTING_PASSWORD = "AzurePublishSettingPassword" + AZURE_REDIS_CACHE_STRING = "AzureRedisCacheString" + AZURE_SAS = "AzureSAS" + AZURE_SERVICE_BUS_STRING = "AzureServiceBusString" + AZURE_STORAGE_ACCOUNT_GENERIC = "AzureStorageAccountGeneric" + AZURE_STORAGE_ACCOUNT_KEY = "AzureStorageAccountKey" + BANK_ACCOUNT_NUMBER = "BankAccountNumber" + BE_NATIONAL_NUMBER = "BENationalNumber" + BE_NATIONAL_NUMBER_V2 = "BENationalNumberV2" + BE_VALUE_ADDED_TAX_NUMBER = "BEValueAddedTaxNumber" + BG_UNIFORM_CIVIL_NUMBER = "BGUniformCivilNumber" + BR_CPF_NUMBER = "BRCPFNumber" + BR_LEGAL_ENTITY_NUMBER = "BRLegalEntityNumber" + BR_NATIONAL_ID_RG = "BRNationalIDRG" + CA_BANK_ACCOUNT_NUMBER = "CABankAccountNumber" + CA_DRIVERS_LICENSE_NUMBER = "CADriversLicenseNumber" + CA_HEALTH_SERVICE_NUMBER = "CAHealthServiceNumber" + CA_PASSPORT_NUMBER = "CAPassportNumber" + CA_PERSONAL_HEALTH_IDENTIFICATION = "CAPersonalHealthIdentification" + CA_SOCIAL_IDENTIFICATION_NUMBER = "CASocialIdentificationNumber" + CA_SOCIAL_INSURANCE_NUMBER = "CASocialInsuranceNumber" + CH_SOCIAL_SECURITY_NUMBER = "CHSocialSecurityNumber" + CITY = "City" + CL_IDENTITY_CARD_NUMBER = "CLIdentityCardNumber" + CN_RESIDENT_IDENTITY_CARD_NUMBER = "CNResidentIdentityCardNumber" + CREDIT_CARD_NUMBER = "CreditCardNumber" + CVV = "CVV" + CY_IDENTITY_CARD = "CYIdentityCard" + CY_TAX_IDENTIFICATION_NUMBER = "CYTaxIdentificationNumber" + CZ_PERSONAL_IDENTITY_NUMBER = "CZPersonalIdentityNumber" + CZ_PERSONAL_IDENTITY_V2 = "CZPersonalIdentityV2" + DATE = "Date" + DATE_OF_BIRTH = "DateOfBirth" + DE_DRIVERS_LICENSE_NUMBER = "DEDriversLicenseNumber" + DE_IDENTITY_CARD_NUMBER = "DEIdentityCardNumber" + DE_PASSPORT_NUMBER = "DEPassportNumber" + DE_TAX_IDENTIFICATION_NUMBER = "DETaxIdentificationNumber" + DE_VALUE_ADDED_NUMBER = "DEValueAddedNumber" + DK_PERSONAL_IDENTIFICATION_NUMBER = "DKPersonalIdentificationNumber" + DK_PERSONAL_IDENTIFICATION_V2 = "DKPersonalIdentificationV2" + DRIVERS_LICENSE_NUMBER = "DriversLicenseNumber" + DRUG_ENFORCEMENT_AGENCY_NUMBER = "DrugEnforcementAgencyNumber" + EE_PERSONAL_IDENTIFICATION_CODE = "EEPersonalIdentificationCode" + EMAIL = "Email" + ES_DNI = "ESDNI" + ES_SOCIAL_SECURITY_NUMBER = "ESSocialSecurityNumber" + ES_TAX_IDENTIFICATION_NUMBER = "ESTaxIdentificationNumber" + EU_DEBIT_CARD_NUMBER = "EUDebitCardNumber" + EU_DRIVERS_LICENSE_NUMBER = "EUDriversLicenseNumber" + EU_GPS_COORDINATES = "EUGPSCoordinates" + EU_NATIONAL_IDENTIFICATION_NUMBER = "EUNationalIdentificationNumber" + EU_PASSPORT_NUMBER = "EUPassportNumber" + EU_SOCIAL_SECURITY_NUMBER = "EUSocialSecurityNumber" + EU_TAX_IDENTIFICATION_NUMBER = "EUTaxIdentificationNumber" + EXPIRATION_DATE = "ExpirationDate" + FI_EUROPEAN_HEALTH_NUMBER = "FIEuropeanHealthNumber" + FI_NATIONAL_ID = "FINationalID" + FI_NATIONAL_ID_V2 = "FINationalIDV2" + FI_PASSPORT_NUMBER = "FIPassportNumber" + FR_DRIVERS_LICENSE_NUMBER = "FRDriversLicenseNumber" + FR_HEALTH_INSURANCE_NUMBER = "FRHealthInsuranceNumber" + FR_NATIONAL_ID = "FRNationalID" + FR_PASSPORT_NUMBER = "FRPassportNumber" + FR_SOCIAL_SECURITY_NUMBER = "FRSocialSecurityNumber" + FR_TAX_IDENTIFICATION_NUMBER = "FRTaxIdentificationNumber" + FR_VALUE_ADDED_TAX_NUMBER = "FRValueAddedTaxNumber" + GOVERNMENT_ISSUED_ID = "GovernmentIssuedId" + GPE = "GPE" + GR_NATIONAL_ID_CARD = "GRNationalIDCard" + GR_NATIONAL_ID_V2 = "GRNationalIDV2" + GR_TAX_IDENTIFICATION_NUMBER = "GRTaxIdentificationNumber" + HK_IDENTITY_CARD_NUMBER = "HKIdentityCardNumber" + HR_IDENTITY_CARD_NUMBER = "HRIdentityCardNumber" + HR_NATIONAL_ID_NUMBER = "HRNationalIDNumber" + HR_PERSONAL_IDENTIFICATION_NUMBER = "HRPersonalIdentificationNumber" + HR_PERSONAL_IDENTIFICATION_OIB_NUMBER_V2 = "HRPersonalIdentificationOIBNumberV2" + HU_PERSONAL_IDENTIFICATION_NUMBER = "HUPersonalIdentificationNumber" + HU_TAX_IDENTIFICATION_NUMBER = "HUTaxIdentificationNumber" + HU_VALUE_ADDED_NUMBER = "HUValueAddedNumber" + ID_IDENTITY_CARD_NUMBER = "IDIdentityCardNumber" + IE_PERSONAL_PUBLIC_SERVICE_NUMBER = "IEPersonalPublicServiceNumber" + IE_PERSONAL_PUBLIC_SERVICE_NUMBER_V2 = "IEPersonalPublicServiceNumberV2" + IL_BANK_ACCOUNT_NUMBER = "ILBankAccountNumber" + IL_NATIONAL_ID = "ILNationalID" + INTERNATIONAL_BANKING_ACCOUNT_NUMBER = "InternationalBankingAccountNumber" + IN_PERMANENT_ACCOUNT = "INPermanentAccount" + IN_UNIQUE_IDENTIFICATION_NUMBER = "INUniqueIdentificationNumber" + IP_ADDRESS = "IPAddress" + IT_DRIVERS_LICENSE_NUMBER = "ITDriversLicenseNumber" + IT_FISCAL_CODE = "ITFiscalCode" + IT_VALUE_ADDED_TAX_NUMBER = "ITValueAddedTaxNumber" + JP_BANK_ACCOUNT_NUMBER = "JPBankAccountNumber" + JP_DRIVERS_LICENSE_NUMBER = "JPDriversLicenseNumber" + JP_MY_NUMBER_CORPORATE = "JPMyNumberCorporate" + JP_MY_NUMBER_PERSONAL = "JPMyNumberPersonal" + JP_PASSPORT_NUMBER = "JPPassportNumber" + JP_RESIDENCE_CARD_NUMBER = "JPResidenceCardNumber" + JP_RESIDENT_REGISTRATION_NUMBER = "JPResidentRegistrationNumber" + JP_SOCIAL_INSURANCE_NUMBER = "JPSocialInsuranceNumber" + KR_DRIVERS_LICENSE_NUMBER = "KRDriversLicenseNumber" + KR_PASSPORT_NUMBER = "KRPassportNumber" + KR_RESIDENT_REGISTRATION_NUMBER = "KRResidentRegistrationNumber" + KR_SOCIAL_SECURITY_NUMBER = "KRSocialSecurityNumber" + LICENSE_PLATE = "LicensePlate" + LOCATION = "Location" + LT_PERSONAL_CODE = "LTPersonalCode" + LU_NATIONAL_IDENTIFICATION_NUMBER_NATURAL = "LUNationalIdentificationNumberNatural" + LU_NATIONAL_IDENTIFICATION_NUMBER_NON_NATURAL = "LUNationalIdentificationNumberNonNatural" + LV_PERSONAL_CODE = "LVPersonalCode" + MEDICARE_BENEFICIARY_ID = "USMedicareBeneficiaryId" + MT_IDENTITY_CARD_NUMBER = "MTIdentityCardNumber" + MT_TAX_ID_NUMBER = "MTTaxIDNumber" + MY_IDENTITY_CARD_NUMBER = "MYIdentityCardNumber" + NATIONAL_ID = "NationalId" + NEIGHBORHOOD = "Neighborhood" + NL_CITIZENS_SERVICE_NUMBER = "NLCitizensServiceNumber" + NL_CITIZENS_SERVICE_NUMBER_V2 = "NLCitizensServiceNumberV2" + NL_TAX_IDENTIFICATION_NUMBER = "NLTaxIdentificationNumber" + NL_VALUE_ADDED_TAX_NUMBER = "NLValueAddedTaxNumber" + NO_IDENTITY_NUMBER = "NOIdentityNumber" + NZ_BANK_ACCOUNT_NUMBER = "NZBankAccountNumber" + NZ_DRIVERS_LICENSE_NUMBER = "NZDriversLicenseNumber" + NZ_INLAND_REVENUE_NUMBER = "NZInlandRevenueNumber" + NZ_MINISTRY_OF_HEALTH_NUMBER = "NZMinistryOfHealthNumber" + NZ_SOCIAL_WELFARE_NUMBER = "NZSocialWelfareNumber" + ORGANIZATION = "Organization" + PASSPORT_NUMBER = "PassportNumber" + PASSWORD = "Password" + PERSON = "Person" + PHONE_NUMBER = "PhoneNumber" + PH_UNIFIED_MULTI_PURPOSE_ID_NUMBER = "PHUnifiedMultiPurposeIDNumber" + PIN = "PIN" + PL_IDENTITY_CARD = "PLIdentityCard" + PL_NATIONAL_ID = "PLNationalID" + PL_NATIONAL_ID_V2 = "PLNationalIDV2" + PL_PASSPORT_NUMBER = "PLPassportNumber" + PL_REGON_NUMBER = "PLREGONNumber" + PL_TAX_IDENTIFICATION_NUMBER = "PLTaxIdentificationNumber" + PT_CITIZEN_CARD_NUMBER = "PTCitizenCardNumber" + PT_CITIZEN_CARD_NUMBER_V2 = "PTCitizenCardNumberV2" + PT_TAX_IDENTIFICATION_NUMBER = "PTTaxIdentificationNumber" + RO_PERSONAL_NUMERICAL_CODE = "ROPersonalNumericalCode" + RU_PASSPORT_NUMBER_DOMESTIC = "RUPassportNumberDomestic" + RU_PASSPORT_NUMBER_INTERNATIONAL = "RUPassportNumberInternational" + SA_NATIONAL_ID = "SANationalID" + SE_NATIONAL_ID = "SENationalID" + SE_NATIONAL_ID_V2 = "SENationalIDV2" + SE_PASSPORT_NUMBER = "SEPassportNumber" + SE_TAX_IDENTIFICATION_NUMBER = "SETaxIdentificationNumber" + SG_NATIONAL_REGISTRATION_IDENTITY_CARD_NUMBER = "SGNationalRegistrationIdentityCardNumber" + SI_TAX_IDENTIFICATION_NUMBER = "SITaxIdentificationNumber" + SI_UNIQUE_MASTER_CITIZEN_NUMBER = "SIUniqueMasterCitizenNumber" + SK_PERSONAL_NUMBER = "SKPersonalNumber" + SORT_CODE = "SortCode" + SQL_SERVER_CONNECTION_STRING = "SQLServerConnectionString" + STATE = "State" + SWIFT_CODE = "SWIFTCode" + TH_POPULATION_IDENTIFICATION_CODE = "THPopulationIdentificationCode" + TR_NATIONAL_IDENTIFICATION_NUMBER = "TRNationalIdentificationNumber" + TW_NATIONAL_ID = "TWNationalID" + TW_PASSPORT_NUMBER = "TWPassportNumber" + TW_RESIDENT_CERTIFICATE = "TWResidentCertificate" + UA_PASSPORT_NUMBER_DOMESTIC = "UAPassportNumberDomestic" + UA_PASSPORT_NUMBER_INTERNATIONAL = "UAPassportNumberInternational" + UK_DRIVERS_LICENSE_NUMBER = "UKDriversLicenseNumber" + UK_ELECTORAL_ROLL_NUMBER = "UKElectoralRollNumber" + UK_NATIONAL_HEALTH_NUMBER = "UKNationalHealthNumber" + UK_NATIONAL_INSURANCE_NUMBER = "UKNationalInsuranceNumber" + UK_UNIQUE_TAXPAYER_NUMBER = "UKUniqueTaxpayerNumber" + URL = "URL" + US_BANK_ACCOUNT_NUMBER = "USBankAccountNumber" + US_DRIVERS_LICENSE_NUMBER = "USDriversLicenseNumber" + US_INDIVIDUAL_TAXPAYER_IDENTIFICATION = "USIndividualTaxpayerIdentification" + US_SOCIAL_SECURITY_NUMBER = "USSocialSecurityNumber" + US_UK_PASSPORT_NUMBER = "USUKPassportNumber" + VEHICLE_IDENTIFICATION_NUMBER = "VehicleIdentificationNumber" + VIN = "VIN" + ZA_IDENTIFICATION_NUMBER = "ZAIdentificationNumber" + ZIP_CODE = "ZipCode" + + + class azure.ai.textanalytics.models.PiiCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ABA_ROUTING_NUMBER = "ABARoutingNumber" + ADDRESS = "Address" + AGE = "Age" + AIRPORT = "Airport" + ALL = "All" + AR_NATIONAL_IDENTITY_NUMBER = "ARNationalIdentityNumber" + AT_IDENTITY_CARD = "ATIdentityCard" + AT_TAX_IDENTIFICATION_NUMBER = "ATTaxIdentificationNumber" + AT_VALUE_ADDED_TAX_NUMBER = "ATValueAddedTaxNumber" + AU_BANK_ACCOUNT_NUMBER = "AUBankAccountNumber" + AU_BUSINESS_NUMBER = "AUBusinessNumber" + AU_COMPANY_NUMBER = "AUCompanyNumber" + AU_DRIVERS_LICENSE_NUMBER = "AUDriversLicenseNumber" + AU_MEDICAL_ACCOUNT_NUMBER = "AUMedicalAccountNumber" + AU_PASSPORT_NUMBER = "AUPassportNumber" + AU_TAX_FILE_NUMBER = "AUTaxFileNumber" + AZURE_DOCUMENT_DBAUTH_KEY = "AzureDocumentDBAuthKey" + AZURE_IAAS_DATABASE_CONNECTION_AND_SQL_STRING = "AzureIAASDatabaseConnectionAndSQLString" + AZURE_IO_T_CONNECTION_STRING = "AzureIoTConnectionString" + AZURE_PUBLISH_SETTING_PASSWORD = "AzurePublishSettingPassword" + AZURE_REDIS_CACHE_STRING = "AzureRedisCacheString" + AZURE_SAS = "AzureSAS" + AZURE_SERVICE_BUS_STRING = "AzureServiceBusString" + AZURE_STORAGE_ACCOUNT_GENERIC = "AzureStorageAccountGeneric" + AZURE_STORAGE_ACCOUNT_KEY = "AzureStorageAccountKey" + BANK_ACCOUNT_NUMBER = "BankAccountNumber" + BE_NATIONAL_NUMBER = "BENationalNumber" + BE_NATIONAL_NUMBER_V2 = "BENationalNumberV2" + BE_VALUE_ADDED_TAX_NUMBER = "BEValueAddedTaxNumber" + BG_UNIFORM_CIVIL_NUMBER = "BGUniformCivilNumber" + BR_CPF_NUMBER = "BRCPFNumber" + BR_LEGAL_ENTITY_NUMBER = "BRLegalEntityNumber" + BR_NATIONAL_ID_RG = "BRNationalIDRG" + CA_BANK_ACCOUNT_NUMBER = "CABankAccountNumber" + CA_DRIVERS_LICENSE_NUMBER = "CADriversLicenseNumber" + CA_HEALTH_SERVICE_NUMBER = "CAHealthServiceNumber" + CA_PASSPORT_NUMBER = "CAPassportNumber" + CA_PERSONAL_HEALTH_IDENTIFICATION = "CAPersonalHealthIdentification" + CA_SOCIAL_IDENTIFICATION_NUMBER = "CASocialIdentificationNumber" + CA_SOCIAL_INSURANCE_NUMBER = "CASocialInsuranceNumber" + CH_SOCIAL_SECURITY_NUMBER = "CHSocialSecurityNumber" + CITY = "City" + CL_IDENTITY_CARD_NUMBER = "CLIdentityCardNumber" + CN_RESIDENT_IDENTITY_CARD_NUMBER = "CNResidentIdentityCardNumber" + CREDIT_CARD_NUMBER = "CreditCardNumber" + CVV = "CVV" + CY_IDENTITY_CARD = "CYIdentityCard" + CY_TAX_IDENTIFICATION_NUMBER = "CYTaxIdentificationNumber" + CZ_PERSONAL_IDENTITY_NUMBER = "CZPersonalIdentityNumber" + CZ_PERSONAL_IDENTITY_V2 = "CZPersonalIdentityV2" + DATE = "Date" + DATE_OF_BIRTH = "DateOfBirth" + DEFAULT = "Default" + DE_DRIVERS_LICENSE_NUMBER = "DEDriversLicenseNumber" + DE_IDENTITY_CARD_NUMBER = "DEIdentityCardNumber" + DE_PASSPORT_NUMBER = "DEPassportNumber" + DE_TAX_IDENTIFICATION_NUMBER = "DETaxIdentificationNumber" + DE_VALUE_ADDED_NUMBER = "DEValueAddedNumber" + DK_PERSONAL_IDENTIFICATION_NUMBER = "DKPersonalIdentificationNumber" + DK_PERSONAL_IDENTIFICATION_V2 = "DKPersonalIdentificationV2" + DRIVERS_LICENSE_NUMBER = "DriversLicenseNumber" + DRUG_ENFORCEMENT_AGENCY_NUMBER = "DrugEnforcementAgencyNumber" + EE_PERSONAL_IDENTIFICATION_CODE = "EEPersonalIdentificationCode" + EMAIL = "Email" + ES_DNI = "ESDNI" + ES_SOCIAL_SECURITY_NUMBER = "ESSocialSecurityNumber" + ES_TAX_IDENTIFICATION_NUMBER = "ESTaxIdentificationNumber" + EU_DEBIT_CARD_NUMBER = "EUDebitCardNumber" + EU_DRIVERS_LICENSE_NUMBER = "EUDriversLicenseNumber" + EU_GPS_COORDINATES = "EUGPSCoordinates" + EU_NATIONAL_IDENTIFICATION_NUMBER = "EUNationalIdentificationNumber" + EU_PASSPORT_NUMBER = "EUPassportNumber" + EU_SOCIAL_SECURITY_NUMBER = "EUSocialSecurityNumber" + EU_TAX_IDENTIFICATION_NUMBER = "EUTaxIdentificationNumber" + EXPIRATION_DATE = "ExpirationDate" + FI_EUROPEAN_HEALTH_NUMBER = "FIEuropeanHealthNumber" + FI_NATIONAL_ID = "FINationalID" + FI_NATIONAL_ID_V2 = "FINationalIDV2" + FI_PASSPORT_NUMBER = "FIPassportNumber" + FR_DRIVERS_LICENSE_NUMBER = "FRDriversLicenseNumber" + FR_HEALTH_INSURANCE_NUMBER = "FRHealthInsuranceNumber" + FR_NATIONAL_ID = "FRNationalID" + FR_PASSPORT_NUMBER = "FRPassportNumber" + FR_SOCIAL_SECURITY_NUMBER = "FRSocialSecurityNumber" + FR_TAX_IDENTIFICATION_NUMBER = "FRTaxIdentificationNumber" + FR_VALUE_ADDED_TAX_NUMBER = "FRValueAddedTaxNumber" + GOVERNMENT_ISSUED_ID = "GovernmentIssuedId" + GPE = "GPE" + GR_NATIONAL_ID_CARD = "GRNationalIDCard" + GR_NATIONAL_ID_V2 = "GRNationalIDV2" + GR_TAX_IDENTIFICATION_NUMBER = "GRTaxIdentificationNumber" + HK_IDENTITY_CARD_NUMBER = "HKIdentityCardNumber" + HR_IDENTITY_CARD_NUMBER = "HRIdentityCardNumber" + HR_NATIONAL_ID_NUMBER = "HRNationalIDNumber" + HR_PERSONAL_IDENTIFICATION_NUMBER = "HRPersonalIdentificationNumber" + HR_PERSONAL_IDENTIFICATION_OIB_NUMBER_V2 = "HRPersonalIdentificationOIBNumberV2" + HU_PERSONAL_IDENTIFICATION_NUMBER = "HUPersonalIdentificationNumber" + HU_TAX_IDENTIFICATION_NUMBER = "HUTaxIdentificationNumber" + HU_VALUE_ADDED_NUMBER = "HUValueAddedNumber" + ID_IDENTITY_CARD_NUMBER = "IDIdentityCardNumber" + IE_PERSONAL_PUBLIC_SERVICE_NUMBER = "IEPersonalPublicServiceNumber" + IE_PERSONAL_PUBLIC_SERVICE_NUMBER_V2 = "IEPersonalPublicServiceNumberV2" + IL_BANK_ACCOUNT_NUMBER = "ILBankAccountNumber" + IL_NATIONAL_ID = "ILNationalID" + INTERNATIONAL_BANKING_ACCOUNT_NUMBER = "InternationalBankingAccountNumber" + IN_PERMANENT_ACCOUNT = "INPermanentAccount" + IN_UNIQUE_IDENTIFICATION_NUMBER = "INUniqueIdentificationNumber" + IP_ADDRESS = "IPAddress" + IT_DRIVERS_LICENSE_NUMBER = "ITDriversLicenseNumber" + IT_FISCAL_CODE = "ITFiscalCode" + IT_VALUE_ADDED_TAX_NUMBER = "ITValueAddedTaxNumber" + JP_BANK_ACCOUNT_NUMBER = "JPBankAccountNumber" + JP_DRIVERS_LICENSE_NUMBER = "JPDriversLicenseNumber" + JP_MY_NUMBER_CORPORATE = "JPMyNumberCorporate" + JP_MY_NUMBER_PERSONAL = "JPMyNumberPersonal" + JP_PASSPORT_NUMBER = "JPPassportNumber" + JP_RESIDENCE_CARD_NUMBER = "JPResidenceCardNumber" + JP_RESIDENT_REGISTRATION_NUMBER = "JPResidentRegistrationNumber" + JP_SOCIAL_INSURANCE_NUMBER = "JPSocialInsuranceNumber" + KR_DRIVERS_LICENSE_NUMBER = "KRDriversLicenseNumber" + KR_PASSPORT_NUMBER = "KRPassportNumber" + KR_RESIDENT_REGISTRATION_NUMBER = "KRResidentRegistrationNumber" + KR_SOCIAL_SECURITY_NUMBER = "KRSocialSecurityNumber" + LICENSE_PLATE = "LicensePlate" + LOCATION = "Location" + LT_PERSONAL_CODE = "LTPersonalCode" + LU_NATIONAL_IDENTIFICATION_NUMBER_NATURAL = "LUNationalIdentificationNumberNatural" + LU_NATIONAL_IDENTIFICATION_NUMBER_NON_NATURAL = "LUNationalIdentificationNumberNonNatural" + LV_PERSONAL_CODE = "LVPersonalCode" + MEDICARE_BENEFICIARY_ID = "USMedicareBeneficiaryId" + MT_IDENTITY_CARD_NUMBER = "MTIdentityCardNumber" + MT_TAX_ID_NUMBER = "MTTaxIDNumber" + MY_IDENTITY_CARD_NUMBER = "MYIdentityCardNumber" + NATIONAL_ID = "NationalId" + NEIGHBORHOOD = "Neighborhood" + NL_CITIZENS_SERVICE_NUMBER = "NLCitizensServiceNumber" + NL_CITIZENS_SERVICE_NUMBER_V2 = "NLCitizensServiceNumberV2" + NL_TAX_IDENTIFICATION_NUMBER = "NLTaxIdentificationNumber" + NL_VALUE_ADDED_TAX_NUMBER = "NLValueAddedTaxNumber" + NO_IDENTITY_NUMBER = "NOIdentityNumber" + NZ_BANK_ACCOUNT_NUMBER = "NZBankAccountNumber" + NZ_DRIVERS_LICENSE_NUMBER = "NZDriversLicenseNumber" + NZ_INLAND_REVENUE_NUMBER = "NZInlandRevenueNumber" + NZ_MINISTRY_OF_HEALTH_NUMBER = "NZMinistryOfHealthNumber" + NZ_SOCIAL_WELFARE_NUMBER = "NZSocialWelfareNumber" + ORGANIZATION = "Organization" + PASSPORT_NUMBER = "PassportNumber" + PASSWORD = "Password" + PERSON = "Person" + PHONE_NUMBER = "PhoneNumber" + PH_UNIFIED_MULTI_PURPOSE_ID_NUMBER = "PHUnifiedMultiPurposeIDNumber" + PIN = "PIN" + PL_IDENTITY_CARD = "PLIdentityCard" + PL_NATIONAL_ID = "PLNationalID" + PL_NATIONAL_ID_V2 = "PLNationalIDV2" + PL_PASSPORT_NUMBER = "PLPassportNumber" + PL_REGON_NUMBER = "PLREGONNumber" + PL_TAX_IDENTIFICATION_NUMBER = "PLTaxIdentificationNumber" + PT_CITIZEN_CARD_NUMBER = "PTCitizenCardNumber" + PT_CITIZEN_CARD_NUMBER_V2 = "PTCitizenCardNumberV2" + PT_TAX_IDENTIFICATION_NUMBER = "PTTaxIdentificationNumber" + RO_PERSONAL_NUMERICAL_CODE = "ROPersonalNumericalCode" + RU_PASSPORT_NUMBER_DOMESTIC = "RUPassportNumberDomestic" + RU_PASSPORT_NUMBER_INTERNATIONAL = "RUPassportNumberInternational" + SA_NATIONAL_ID = "SANationalID" + SE_NATIONAL_ID = "SENationalID" + SE_NATIONAL_ID_V2 = "SENationalIDV2" + SE_PASSPORT_NUMBER = "SEPassportNumber" + SE_TAX_IDENTIFICATION_NUMBER = "SETaxIdentificationNumber" + SG_NATIONAL_REGISTRATION_IDENTITY_CARD_NUMBER = "SGNationalRegistrationIdentityCardNumber" + SI_TAX_IDENTIFICATION_NUMBER = "SITaxIdentificationNumber" + SI_UNIQUE_MASTER_CITIZEN_NUMBER = "SIUniqueMasterCitizenNumber" + SK_PERSONAL_NUMBER = "SKPersonalNumber" + SORT_CODE = "SortCode" + SQL_SERVER_CONNECTION_STRING = "SQLServerConnectionString" + STATE = "State" + SWIFT_CODE = "SWIFTCode" + TH_POPULATION_IDENTIFICATION_CODE = "THPopulationIdentificationCode" + TR_NATIONAL_IDENTIFICATION_NUMBER = "TRNationalIdentificationNumber" + TW_NATIONAL_ID = "TWNationalID" + TW_PASSPORT_NUMBER = "TWPassportNumber" + TW_RESIDENT_CERTIFICATE = "TWResidentCertificate" + UA_PASSPORT_NUMBER_DOMESTIC = "UAPassportNumberDomestic" + UA_PASSPORT_NUMBER_INTERNATIONAL = "UAPassportNumberInternational" + UK_DRIVERS_LICENSE_NUMBER = "UKDriversLicenseNumber" + UK_ELECTORAL_ROLL_NUMBER = "UKElectoralRollNumber" + UK_NATIONAL_HEALTH_NUMBER = "UKNationalHealthNumber" + UK_NATIONAL_INSURANCE_NUMBER = "UKNationalInsuranceNumber" + UK_UNIQUE_TAXPAYER_NUMBER = "UKUniqueTaxpayerNumber" + URL = "URL" + US_BANK_ACCOUNT_NUMBER = "USBankAccountNumber" + US_DRIVERS_LICENSE_NUMBER = "USDriversLicenseNumber" + US_INDIVIDUAL_TAXPAYER_IDENTIFICATION = "USIndividualTaxpayerIdentification" + US_SOCIAL_SECURITY_NUMBER = "USSocialSecurityNumber" + US_UK_PASSPORT_NUMBER = "USUKPassportNumber" + VEHICLE_IDENTIFICATION_NUMBER = "VehicleIdentificationNumber" + VIN = "VIN" + ZA_IDENTIFICATION_NUMBER = "ZAIdentificationNumber" + ZIP_CODE = "ZipCode" + + + class azure.ai.textanalytics.models.PiiDomain(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NONE = "none" + PHI = "phi" + + + class azure.ai.textanalytics.models.PiiEntity(_Model): + category: str + confidence_score: float + length: int + mask: Optional[str] + mask_length: Optional[int] + mask_offset: Optional[int] + offset: int + subcategory: Optional[str] + tags: Optional[list[EntityTag]] + text: str + type: Optional[str] + + @overload + def __init__( + self, + *, + category: str, + confidence_score: float, + length: int, + mask: Optional[str] = ..., + mask_length: Optional[int] = ..., + mask_offset: Optional[int] = ..., + offset: int, + subcategory: Optional[str] = ..., + tags: Optional[list[EntityTag]] = ..., + text: str, + type: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.PiiEntityRecognitionOperationResult(AnalyzeTextLROResult, discriminator='PiiEntityRecognitionLROResults'): + kind: Literal[AnalyzeTextOperationResultsKind.PII_ENTITY_RECOGNITION_OPERATION_RESULTS] + last_update_date_time: datetime + results: PiiResult + status: Union[str, TextActionState] + task_name: str + + @overload + def __init__( + self, + *, + last_update_date_time: datetime, + results: PiiResult, + status: Union[str, TextActionState], + task_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.PiiLROTask(AnalyzeTextOperationAction, discriminator='PiiEntityRecognition'): + kind: Literal[AnalyzeTextOperationActionKind.PII_ENTITY_RECOGNITION] + name: str + parameters: Optional[PiiActionContent] + + @overload + def __init__( + self, + *, + name: Optional[str] = ..., + parameters: Optional[PiiActionContent] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.PiiResult(_Model): + documents: list[PiiResultWithDetectedLanguage] + errors: list[DocumentError] + model_version: str + statistics: Optional[RequestStatistics] + + @overload + def __init__( + self, + *, + documents: list[PiiResultWithDetectedLanguage], + errors: list[DocumentError], + model_version: str, + statistics: Optional[RequestStatistics] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.PiiResultWithDetectedLanguage(_Model): + detected_language: Optional[DetectedLanguage] + entities: list[PiiEntity] + id: str + redacted_text: str + statistics: Optional[DocumentStatistics] + warnings: list[DocumentWarning] + + @overload + def __init__( + self, + *, + detected_language: Optional[DetectedLanguage] = ..., + entities: list[PiiEntity], + id: str, + redacted_text: str, + statistics: Optional[DocumentStatistics] = ..., + warnings: list[DocumentWarning] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.PolicyKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALLOW_OVERLAP = "allowOverlap" + MATCH_LONGEST = "matchLongest" + + + class azure.ai.textanalytics.models.RangeInclusivity(str, Enum, metaclass=CaseInsensitiveEnumMeta): + LEFT_INCLUSIVE = "LeftInclusive" + LEFT_RIGHT_INCLUSIVE = "LeftRightInclusive" + NONE_INCLUSIVE = "NoneInclusive" + RIGHT_INCLUSIVE = "RightInclusive" + + + class azure.ai.textanalytics.models.RangeKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AGE = "Age" + AREA = "Area" + CURRENCY = "Currency" + INFORMATION = "Information" + LENGTH = "Length" + NUMBER = "Number" + SPEED = "Speed" + TEMPERATURE = "Temperature" + VOLUME = "Volume" + WEIGHT = "Weight" + + + class azure.ai.textanalytics.models.RedactionCharacter(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AMPERSAND = "&" + ASTERISK = "*" + AT_SIGN = "@" + CARET = "^" + DOLLAR = "$" + EQUALS = "=" + EXCLAMATION_POINT = "!" + MINUS = "-" + NUMBER_SIGN = "#" + PER_CENT = "%" + PLUS = "+" + QUESTION_MARK = "?" + TILDE = "~" + UNDERSCORE = "_" + + + class azure.ai.textanalytics.models.RedactionPolicyKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CHARACTER_MASK = "characterMask" + ENTITY_MASK = "entityMask" + NO_MASK = "noMask" + SYNTHETIC_REPLACEMENT = "syntheticReplacement" + + + class azure.ai.textanalytics.models.RelationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ABBREVIATION = "Abbreviation" + BODY_SITE_OF_CONDITION = "BodySiteOfCondition" + BODY_SITE_OF_TREATMENT = "BodySiteOfTreatment" + COURSE_OF_CONDITION = "CourseOfCondition" + COURSE_OF_EXAMINATION = "CourseOfExamination" + COURSE_OF_MEDICATION = "CourseOfMedication" + COURSE_OF_TREATMENT = "CourseOfTreatment" + DIRECTION_OF_BODY_STRUCTURE = "DirectionOfBodyStructure" + DIRECTION_OF_CONDITION = "DirectionOfCondition" + DIRECTION_OF_EXAMINATION = "DirectionOfExamination" + DIRECTION_OF_TREATMENT = "DirectionOfTreatment" + DOSAGE_OF_MEDICATION = "DosageOfMedication" + EXAMINATION_FINDS_CONDITION = "ExaminationFindsCondition" + EXPRESSION_OF_GENE = "ExpressionOfGene" + EXPRESSION_OF_VARIANT = "ExpressionOfVariant" + FORM_OF_MEDICATION = "FormOfMedication" + FREQUENCY_OF_CONDITION = "FrequencyOfCondition" + FREQUENCY_OF_MEDICATION = "FrequencyOfMedication" + FREQUENCY_OF_TREATMENT = "FrequencyOfTreatment" + MUTATION_TYPE_OF_GENE = "MutationTypeOfGene" + MUTATION_TYPE_OF_VARIANT = "MutationTypeOfVariant" + QUALIFIER_OF_CONDITION = "QualifierOfCondition" + RELATION_OF_EXAMINATION = "RelationOfExamination" + ROUTE_OF_MEDICATION = "RouteOfMedication" + SCALE_OF_CONDITION = "ScaleOfCondition" + TIME_OF_CONDITION = "TimeOfCondition" + TIME_OF_EVENT = "TimeOfEvent" + TIME_OF_EXAMINATION = "TimeOfExamination" + TIME_OF_MEDICATION = "TimeOfMedication" + TIME_OF_TREATMENT = "TimeOfTreatment" + UNIT_OF_CONDITION = "UnitOfCondition" + UNIT_OF_EXAMINATION = "UnitOfExamination" + VALUE_OF_CONDITION = "ValueOfCondition" + VALUE_OF_EXAMINATION = "ValueOfExamination" + VARIANT_OF_GENE = "VariantOfGene" + + + class azure.ai.textanalytics.models.RelativeTo(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CURRENT = "Current" + END = "End" + START = "Start" + + + class azure.ai.textanalytics.models.RequestStatistics(_Model): + documents_count: int + erroneous_documents_count: int + transactions_count: int + valid_documents_count: int + + @overload + def __init__( + self, + *, + documents_count: int, + erroneous_documents_count: int, + transactions_count: int, + valid_documents_count: int + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.ScriptCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ARAB = "Arab" + ARMN = "Armn" + BENG = "Beng" + CANS = "Cans" + CYRL = "Cyrl" + DEVA = "Deva" + ETHI = "Ethi" + GEOR = "Geor" + GREK = "Grek" + GUJR = "Gujr" + GURU = "Guru" + HANG = "Hang" + HANI = "Hani" + HANS = "Hans" + HANT = "Hant" + HEBR = "Hebr" + JPAN = "Jpan" + KHMR = "Khmr" + KNDA = "Knda" + LAOO = "Laoo" + LATN = "Latn" + MLYM = "Mlym" + MONG = "Mong" + MTEI = "Mtei" + MYMR = "Mymr" + OLCK = "Olck" + ORYA = "Orya" + SHRD = "Shrd" + SINH = "Sinh" + TAML = "Taml" + TELU = "Telu" + THAA = "Thaa" + THAI = "Thai" + TIBT = "Tibt" + + + class azure.ai.textanalytics.models.ScriptKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ARABIC = "Arabic" + ARMENIAN = "Armenian" + BANGLA = "Bangla" + CYRILLIC = "Cyrillic" + DEVANAGARI = "Devanagari" + ETHIOPIC = "Ethiopic" + GEORGIAN = "Georgian" + GREEK = "Greek" + GUJARATI = "Gujarati" + GURMUKHI = "Gurmukhi" + HANGUL = "Hangul" + HAN_LITERAL = "HanLiteral" + HAN_SIMPLIFIED = "HanSimplified" + HAN_TRADITIONAL = "HanTraditional" + HEBREW = "Hebrew" + JAPANESE = "Japanese" + KANNADA = "Kannada" + KHMER = "Khmer" + LAO = "Lao" + LATIN = "Latin" + MALAYALAM = "Malayalam" + MEITEI = "Meitei" + MONGOLIAN = "Mongolian" + MYANMAR = "Myanmar" + ODIA = "Odia" + SANTALI = "Santali" + SHARADA = "Sharada" + SINHALA = "Sinhala" + TAMIL = "Tamil" + TELUGU = "Telugu" + THAANA = "Thaana" + THAI = "Thai" + TIBETAN = "Tibetan" + UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS = "UnifiedCanadianAboriginalSyllabics" + + + class azure.ai.textanalytics.models.SentenceAssessment(_Model): + confidence_scores: TargetConfidenceScoreLabel + is_negated: bool + length: int + offset: int + sentiment: Union[str, TokenSentiment] + text: str + + @overload + def __init__( + self, + *, + confidence_scores: TargetConfidenceScoreLabel, + is_negated: bool, + length: int, + offset: int, + sentiment: Union[str, TokenSentiment], + text: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.SentenceSentiment(_Model): + assessments: Optional[list[SentenceAssessment]] + confidence_scores: SentimentConfidenceScores + length: int + offset: int + sentiment: Union[str, SentenceSentimentValue] + targets: Optional[list[SentenceTarget]] + text: str + + @overload + def __init__( + self, + *, + assessments: Optional[list[SentenceAssessment]] = ..., + confidence_scores: SentimentConfidenceScores, + length: int, + offset: int, + sentiment: Union[str, SentenceSentimentValue], + targets: Optional[list[SentenceTarget]] = ..., + text: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.SentenceSentimentValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NEGATIVE = "negative" + NEUTRAL = "neutral" + POSITIVE = "positive" + + + class azure.ai.textanalytics.models.SentenceTarget(_Model): + confidence_scores: TargetConfidenceScoreLabel + length: int + offset: int + relations: list[TargetRelation] + sentiment: Union[str, TokenSentiment] + text: str + + @overload + def __init__( + self, + *, + confidence_scores: TargetConfidenceScoreLabel, + length: int, + offset: int, + relations: list[TargetRelation], + sentiment: Union[str, TokenSentiment], + text: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.SentimentActionResult(_Model): + confidence_scores: SentimentConfidenceScores + detected_language: Optional[DetectedLanguage] + id: str + sentences: list[SentenceSentiment] + sentiment: Union[str, DocumentSentiment] + statistics: Optional[DocumentStatistics] + warnings: list[DocumentWarning] + + @overload + def __init__( + self, + *, + confidence_scores: SentimentConfidenceScores, + detected_language: Optional[DetectedLanguage] = ..., + id: str, + sentences: list[SentenceSentiment], + sentiment: Union[str, DocumentSentiment], + statistics: Optional[DocumentStatistics] = ..., + warnings: list[DocumentWarning] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.SentimentAnalysisActionContent(_Model): + logging_opt_out: Optional[bool] + model_version: Optional[str] + opinion_mining: Optional[bool] + string_index_type: Optional[Union[str, StringIndexType]] + + @overload + def __init__( + self, + *, + logging_opt_out: Optional[bool] = ..., + model_version: Optional[str] = ..., + opinion_mining: Optional[bool] = ..., + string_index_type: Optional[Union[str, StringIndexType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.SentimentAnalysisOperationAction(AnalyzeTextOperationAction, discriminator='SentimentAnalysis'): + kind: Literal[AnalyzeTextOperationActionKind.SENTIMENT_ANALYSIS] + name: str + parameters: Optional[SentimentAnalysisActionContent] + + @overload + def __init__( + self, + *, + name: Optional[str] = ..., + parameters: Optional[SentimentAnalysisActionContent] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.SentimentConfidenceScores(_Model): + negative: float + neutral: float + positive: float + + @overload + def __init__( + self, + *, + negative: float, + neutral: float, + positive: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.SentimentLROResult(AnalyzeTextLROResult, discriminator='SentimentAnalysisLROResults'): + kind: Literal[AnalyzeTextOperationResultsKind.SENTIMENT_ANALYSIS_OPERATION_RESULTS] + last_update_date_time: datetime + results: SentimentResult + status: Union[str, TextActionState] + task_name: str + + @overload + def __init__( + self, + *, + last_update_date_time: datetime, + results: SentimentResult, + status: Union[str, TextActionState], + task_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.SentimentResult(_Model): + documents: list[SentimentActionResult] + errors: list[DocumentError] + model_version: str + statistics: Optional[RequestStatistics] + + @overload + def __init__( + self, + *, + documents: list[SentimentActionResult], + errors: list[DocumentError], + model_version: str, + statistics: Optional[RequestStatistics] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.SpeedMetadata(BaseMetadata, discriminator='SpeedMetadata'): + metadata_kind: Literal[MetadataKind.SPEED_METADATA] + unit: Union[str, SpeedUnit] + value: float + + @overload + def __init__( + self, + *, + unit: Union[str, SpeedUnit], + value: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.SpeedUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CENTIMETERS_PER_MILLISECOND = "CentimetersPerMillisecond" + FEET_PER_MINUTE = "FeetPerMinute" + FEET_PER_SECOND = "FeetPerSecond" + KILOMETERS_PER_HOUR = "KilometersPerHour" + KILOMETERS_PER_MILLISECOND = "KilometersPerMillisecond" + KILOMETERS_PER_MINUTE = "KilometersPerMinute" + KILOMETERS_PER_SECOND = "KilometersPerSecond" + KNOTS = "Knots" + METERS_PER_MILLISECOND = "MetersPerMillisecond" + METERS_PER_SECOND = "MetersPerSecond" + MILES_PER_HOUR = "MilesPerHour" + UNSPECIFIED = "Unspecified" + YARDS_PER_MINUTE = "YardsPerMinute" + YARDS_PER_SECOND = "YardsPerSecond" + + + class azure.ai.textanalytics.models.StringIndexType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + TEXT_ELEMENTS_V8 = "TextElements_v8" + UNICODE_CODE_POINT = "UnicodeCodePoint" + UTF16_CODE_UNIT = "Utf16CodeUnit" + + + class azure.ai.textanalytics.models.SummaryContext(_Model): + length: int + offset: int + + @overload + def __init__( + self, + *, + length: int, + offset: int + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.SummaryLengthBucket(str, Enum, metaclass=CaseInsensitiveEnumMeta): + LONG = "long" + MEDIUM = "medium" + SHORT = "short" + + + class azure.ai.textanalytics.models.SyntheticReplacementPolicyType(BaseRedactionPolicy, discriminator='syntheticReplacement'): + entity_types: Union[list[str, PiiCategoriesExclude]] + is_default: bool + policy_kind: Literal[RedactionPolicyKind.SYNTHETIC_REPLACEMENT] + policy_name: str + preserve_data_format: Optional[bool] + + @overload + def __init__( + self, + *, + entity_types: Optional[list[Union[str, PiiCategoriesExclude]]] = ..., + is_default: Optional[bool] = ..., + policy_name: Optional[str] = ..., + preserve_data_format: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TargetConfidenceScoreLabel(_Model): + negative: float + positive: float + + @overload + def __init__( + self, + *, + negative: float, + positive: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TargetRelation(_Model): + ref: str + relation_type: Union[str, TargetRelationType] + + @overload + def __init__( + self, + *, + ref: str, + relation_type: Union[str, TargetRelationType] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TargetRelationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ASSESSMENT = "assessment" + TARGET = "target" + + + class azure.ai.textanalytics.models.TemperatureMetadata(BaseMetadata, discriminator='TemperatureMetadata'): + metadata_kind: Literal[MetadataKind.TEMPERATURE_METADATA] + unit: Union[str, TemperatureUnit] + value: float + + @overload + def __init__( + self, + *, + unit: Union[str, TemperatureUnit], + value: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TemperatureUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CELSIUS = "Celsius" + FAHRENHEIT = "Fahrenheit" + KELVIN = "Kelvin" + RANKINE = "Rankine" + UNSPECIFIED = "Unspecified" + + + class azure.ai.textanalytics.models.TemporalModifier(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AFTER = "After" + AFTER_APPROX = "AfterApprox" + AFTER_MID = "AfterMid" + AFTER_START = "AfterStart" + APPROX = "Approx" + BEFORE = "Before" + BEFORE_APPROX = "BeforeApprox" + BEFORE_END = "BeforeEnd" + BEFORE_START = "BeforeStart" + END = "End" + LESS = "Less" + MID = "Mid" + MORE = "More" + REFERENCE_UNDEFINED = "ReferenceUndefined" + SINCE = "Since" + SINCE_END = "SinceEnd" + START = "Start" + UNTIL = "Until" + + + class azure.ai.textanalytics.models.TemporalSetMetadata(BaseMetadata, discriminator='TemporalSetMetadata'): + dates: Optional[list[DateValue]] + metadata_kind: Literal[MetadataKind.TEMPORAL_SET_METADATA] + + @overload + def __init__( + self, + *, + dates: Optional[list[DateValue]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TemporalSpanMetadata(BaseMetadata, discriminator='TemporalSpanMetadata'): + metadata_kind: Literal[MetadataKind.TEMPORAL_SPAN_METADATA] + span_values: Optional[list[TemporalSpanValues]] + + @overload + def __init__( + self, + *, + span_values: Optional[list[TemporalSpanValues]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TemporalSpanValues(_Model): + begin: Optional[str] + duration: Optional[str] + end: Optional[str] + modifier: Optional[Union[str, TemporalModifier]] + timex: Optional[str] + + @overload + def __init__( + self, + *, + begin: Optional[str] = ..., + duration: Optional[str] = ..., + end: Optional[str] = ..., + modifier: Optional[Union[str, TemporalModifier]] = ..., + timex: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TextActionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELLED = "cancelled" + CANCELLING = "cancelling" + FAILED = "failed" + NOT_STARTED = "notStarted" + PARTIALLY_COMPLETED = "partiallyCompleted" + RUNNING = "running" + SUCCEEDED = "succeeded" + + + class azure.ai.textanalytics.models.TextActions(_Model): + completed: int + failed: int + in_progress: int + items_property: Optional[list[AnalyzeTextLROResult]] + total: int + + @overload + def __init__( + self, + *, + completed: int, + failed: int, + in_progress: int, + items_property: Optional[list[AnalyzeTextLROResult]] = ..., + total: int + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TextEntityLinkingInput(AnalyzeTextInput, discriminator='EntityLinking'): + action_content: Optional[EntityLinkingActionContent] + kind: Literal[AnalyzeTextInputKind.ENTITY_LINKING] + text_input: Optional[MultiLanguageTextInput] + + @overload + def __init__( + self, + *, + action_content: Optional[EntityLinkingActionContent] = ..., + text_input: Optional[MultiLanguageTextInput] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TextEntityRecognitionInput(AnalyzeTextInput, discriminator='EntityRecognition'): + action_content: Optional[EntitiesActionContent] + kind: Literal[AnalyzeTextInputKind.ENTITY_RECOGNITION] + text_input: Optional[MultiLanguageTextInput] + + @overload + def __init__( + self, + *, + action_content: Optional[EntitiesActionContent] = ..., + text_input: Optional[MultiLanguageTextInput] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TextKeyPhraseExtractionInput(AnalyzeTextInput, discriminator='KeyPhraseExtraction'): + action_content: Optional[KeyPhraseActionContent] + kind: Literal[AnalyzeTextInputKind.KEY_PHRASE_EXTRACTION] + text_input: Optional[MultiLanguageTextInput] + + @overload + def __init__( + self, + *, + action_content: Optional[KeyPhraseActionContent] = ..., + text_input: Optional[MultiLanguageTextInput] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TextLanguageDetectionInput(AnalyzeTextInput, discriminator='LanguageDetection'): + action_content: Optional[LanguageDetectionActionContent] + kind: Literal[AnalyzeTextInputKind.LANGUAGE_DETECTION] + text_input: Optional[LanguageDetectionTextInput] + + @overload + def __init__( + self, + *, + action_content: Optional[LanguageDetectionActionContent] = ..., + text_input: Optional[LanguageDetectionTextInput] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TextPiiEntitiesRecognitionInput(AnalyzeTextInput, discriminator='PiiEntityRecognition'): + action_content: Optional[PiiActionContent] + kind: Literal[AnalyzeTextInputKind.PII_ENTITY_RECOGNITION] + text_input: Optional[MultiLanguageTextInput] + + @overload + def __init__( + self, + *, + action_content: Optional[PiiActionContent] = ..., + text_input: Optional[MultiLanguageTextInput] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TextSentimentAnalysisInput(AnalyzeTextInput, discriminator='SentimentAnalysis'): + action_content: Optional[SentimentAnalysisActionContent] + kind: Literal[AnalyzeTextInputKind.SENTIMENT_ANALYSIS] + text_input: Optional[MultiLanguageTextInput] + + @overload + def __init__( + self, + *, + action_content: Optional[SentimentAnalysisActionContent] = ..., + text_input: Optional[MultiLanguageTextInput] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TimeMetadata(BaseMetadata, discriminator='TimeMetadata'): + dates: Optional[list[DateValue]] + metadata_kind: Literal[MetadataKind.TIME_METADATA] + + @overload + def __init__( + self, + *, + dates: Optional[list[DateValue]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.TokenSentiment(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MIXED = "mixed" + NEGATIVE = "negative" + POSITIVE = "positive" + + + class azure.ai.textanalytics.models.ValueExclusionPolicy(_Model): + case_sensitive: bool + excluded_values: list[str] + + @overload + def __init__( + self, + *, + case_sensitive: bool, + excluded_values: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.VolumeMetadata(BaseMetadata, discriminator='VolumeMetadata'): + metadata_kind: Literal[MetadataKind.VOLUME_METADATA] + unit: Union[str, VolumeUnit] + value: float + + @overload + def __init__( + self, + *, + unit: Union[str, VolumeUnit], + value: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.VolumeUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BARREL = "Barrel" + BUSHEL = "Bushel" + CENTILITER = "Centiliter" + CORD = "Cord" + CUBIC_CENTIMETER = "CubicCentimeter" + CUBIC_FOOT = "CubicFoot" + CUBIC_INCH = "CubicInch" + CUBIC_METER = "CubicMeter" + CUBIC_MILE = "CubicMile" + CUBIC_MILLIMETER = "CubicMillimeter" + CUBIC_YARD = "CubicYard" + CUP = "Cup" + DECALITER = "Decaliter" + FLUID_DRAM = "FluidDram" + FLUID_OUNCE = "FluidOunce" + GILL = "Gill" + HECTOLITER = "Hectoliter" + HOGSHEAD = "Hogshead" + LITER = "Liter" + MILLILITER = "Milliliter" + MINIM = "Minim" + PECK = "Peck" + PINCH = "Pinch" + PINT = "Pint" + QUART = "Quart" + TABLESPOON = "Tablespoon" + TEASPOON = "Teaspoon" + UNSPECIFIED = "Unspecified" + + + class azure.ai.textanalytics.models.WarningCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DOCUMENT_TRUNCATED = "DocumentTruncated" + LONG_WORDS_IN_DOCUMENT = "LongWordsInDocument" + + + class azure.ai.textanalytics.models.WeightMetadata(BaseMetadata, discriminator='WeightMetadata'): + metadata_kind: Literal[MetadataKind.WEIGHT_METADATA] + unit: Union[str, WeightUnit] + value: float + + @overload + def __init__( + self, + *, + unit: Union[str, WeightUnit], + value: float + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.ai.textanalytics.models.WeightUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DRAM = "Dram" + GALLON = "Gallon" + GRAIN = "Grain" + GRAM = "Gram" + KILOGRAM = "Kilogram" + LONG_TON_BRITISH = "LongTonBritish" + METRIC_TON = "MetricTon" + MILLIGRAM = "Milligram" + OUNCE = "Ounce" + PENNY_WEIGHT = "PennyWeight" + POUND = "Pound" + SHORT_HUNDRED_WEIGHT_US = "ShortHundredWeightUS" + SHORT_TON_US = "ShortTonUS" + STONE = "Stone" + TON = "Ton" + UNSPECIFIED = "Unspecified" + + +namespace azure.ai.textanalytics.types + + class azure.ai.textanalytics.types.AbstractiveSummarizationActionContent(TypedDict, total=False): + key "instruction": str + key "loggingOptOut": bool + key "modelVersion": str + key "sentenceCount": int + key "stringIndexType": Union[str, StringIndexType] + key "summaryLength": Union[str, SummaryLengthBucket] + instruction: str + logging_opt_out: bool + model_version: str + sentence_count: int + string_index_type: Union[str, StringIndexType] + summary_length: Union[str, SummaryLengthBucket] + + + class azure.ai.textanalytics.types.AbstractiveSummarizationOperationAction(TypedDict, total=False): + key "kind": Required[Literal[AnalyzeTextOperationActionKind.ABSTRACTIVE_SUMMARIZATION]] + key "parameters": ForwardRef('AbstractiveSummarizationActionContent', module='types') + key "taskName": str + action_content: AbstractiveSummarizationActionContent + kind: Literal[AnalyzeTextOperationActionKind.ABSTRACTIVE_SUMMARIZATION] + name: str + + + class azure.ai.textanalytics.types.AllowOverlapEntityPolicyType(TypedDict, total=False): + key "policyKind": Required[Literal[PolicyKind.ALLOW_OVERLAP]] + policy_kind: Literal[PolicyKind.ALLOW_OVERLAP] + + + class azure.ai.textanalytics.types.AnalyzeTextInputKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ENTITY_LINKING = "EntityLinking" + ENTITY_RECOGNITION = "EntityRecognition" + KEY_PHRASE_EXTRACTION = "KeyPhraseExtraction" + LANGUAGE_DETECTION = "LanguageDetection" + PII_ENTITY_RECOGNITION = "PiiEntityRecognition" + SENTIMENT_ANALYSIS = "SentimentAnalysis" + + + class azure.ai.textanalytics.types.AnalyzeTextOperationActionKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ABSTRACTIVE_SUMMARIZATION = "AbstractiveSummarization" + CUSTOM_ENTITY_RECOGNITION = "CustomEntityRecognition" + CUSTOM_MULTI_LABEL_CLASSIFICATION = "CustomMultiLabelClassification" + CUSTOM_SINGLE_LABEL_CLASSIFICATION = "CustomSingleLabelClassification" + ENTITY_LINKING = "EntityLinking" + ENTITY_RECOGNITION = "EntityRecognition" + EXTRACTIVE_SUMMARIZATION = "ExtractiveSummarization" + HEALTHCARE = "Healthcare" + KEY_PHRASE_EXTRACTION = "KeyPhraseExtraction" + PII_ENTITY_RECOGNITION = "PiiEntityRecognition" + SENTIMENT_ANALYSIS = "SentimentAnalysis" + + + class azure.ai.textanalytics.types.AnalyzeTextSubmitJobRequest(TypedDict, total=False): + key "analysisInput": Required[MultiLanguageTextInput] + key "cancelAfter": float + key "defaultLanguage": str + key "displayName": str + key "tasks": Required[list[AnalyzeTextOperationAction]] + actions: list[AnalyzeTextOperationAction] + cancel_after: float + default_language: str + display_name: str + text_input: MultiLanguageTextInput + + + class azure.ai.textanalytics.types.CharacterMaskPolicyType(TypedDict, total=False): + key "isDefault": bool + key "policyKind": Required[Literal[RedactionPolicyKind.CHARACTER_MASK]] + key "policyName": str + key "redactionCharacter": Union[str, RedactionCharacter] + key "unmaskFromEnd": bool + key "unmaskLength": int + entityTypes: list[Union[str, PiiCategoriesExclude]] + entity_types: list[Union[str, PiiCategoriesExclude]] + is_default: bool + policy_kind: Literal[RedactionPolicyKind.CHARACTER_MASK] + policy_name: str + redaction_character: Union[str, RedactionCharacter] + unmask_from_end: bool + unmask_length: int + + + class azure.ai.textanalytics.types.ConfidenceScoreThreshold(TypedDict, total=False): + key "default": Required[float] + default: float + overrides: list[ConfidenceScoreThresholdOverride] + + + class azure.ai.textanalytics.types.ConfidenceScoreThresholdOverride(TypedDict, total=False): + key "entity": Required[Union[str, PiiCategoriesExclude]] + key "language": Required[str] + key "value": Required[float] + entity: Union[str, PiiCategoriesExclude] + language: str + value: float + + + class azure.ai.textanalytics.types.CustomEntitiesActionContent(TypedDict, total=False): + key "deploymentName": Required[str] + key "loggingOptOut": bool + key "projectName": Required[str] + key "stringIndexType": Union[str, StringIndexType] + deployment_name: str + logging_opt_out: bool + project_name: str + string_index_type: Union[str, StringIndexType] + + + class azure.ai.textanalytics.types.CustomEntitiesLROTask(TypedDict, total=False): + key "kind": Required[Literal[AnalyzeTextOperationActionKind.CUSTOM_ENTITY_RECOGNITION]] + key "parameters": ForwardRef('CustomEntitiesActionContent', module='types') + key "taskName": str + kind: Literal[AnalyzeTextOperationActionKind.CUSTOM_ENTITY_RECOGNITION] + name: str + parameters: CustomEntitiesActionContent + + + class azure.ai.textanalytics.types.CustomMultiLabelClassificationActionContent(TypedDict, total=False): + key "deploymentName": Required[str] + key "loggingOptOut": bool + key "projectName": Required[str] + deployment_name: str + logging_opt_out: bool + project_name: str + + + class azure.ai.textanalytics.types.CustomMultiLabelClassificationOperationAction(TypedDict, total=False): + key "kind": Required[Literal[AnalyzeTextOperationActionKind.CUSTOM_MULTI_LABEL_CLASSIFICATION]] + key "parameters": ForwardRef('CustomMultiLabelClassificationActionContent', module='types') + key "taskName": str + action_content: CustomMultiLabelClassificationActionContent + kind: Literal[AnalyzeTextOperationActionKind.CUSTOM_MULTI_LABEL_CLASSIFICATION] + name: str + + + class azure.ai.textanalytics.types.CustomSingleLabelClassificationActionContent(TypedDict, total=False): + key "deploymentName": Required[str] + key "loggingOptOut": bool + key "projectName": Required[str] + deployment_name: str + logging_opt_out: bool + project_name: str + + + class azure.ai.textanalytics.types.CustomSingleLabelClassificationOperationAction(TypedDict, total=False): + key "kind": Required[Literal[AnalyzeTextOperationActionKind.CUSTOM_SINGLE_LABEL_CLASSIFICATION]] + key "parameters": ForwardRef('CustomSingleLabelClassificationActionContent', module='types') + key "taskName": str + action_content: CustomSingleLabelClassificationActionContent + kind: Literal[AnalyzeTextOperationActionKind.CUSTOM_SINGLE_LABEL_CLASSIFICATION] + name: str + + + class azure.ai.textanalytics.types.EntitiesActionContent(TypedDict, total=False): + key "inferenceOptions": ForwardRef('EntityInferenceConfig', module='types') + key "loggingOptOut": bool + key "modelVersion": str + key "overlapPolicy": ForwardRef('EntityOverlapPolicy', module='types') + key "stringIndexType": Union[str, StringIndexType] + exclusionList: list[Union[str, EntityCategory]] + exclusions: list[Union[str, EntityCategory]] + inclusionList: list[Union[str, EntityCategory]] + inclusions: list[Union[str, EntityCategory]] + inference_options: EntityInferenceConfig + logging_opt_out: bool + model_version: str + overlap_policy: EntityOverlapPolicy + string_index_type: Union[str, StringIndexType] + + + class azure.ai.textanalytics.types.EntitiesLROTask(TypedDict, total=False): + key "kind": Required[Literal[AnalyzeTextOperationActionKind.ENTITY_RECOGNITION]] + key "parameters": ForwardRef('EntitiesActionContent', module='types') + key "taskName": str + kind: Literal[AnalyzeTextOperationActionKind.ENTITY_RECOGNITION] + name: str + parameters: EntitiesActionContent + + + class azure.ai.textanalytics.types.EntityInferenceConfig(TypedDict, total=False): + key "excludeNormalizedValues": bool + exclude_normalized_values: bool + + + class azure.ai.textanalytics.types.EntityLinkingActionContent(TypedDict, total=False): + key "loggingOptOut": bool + key "modelVersion": str + key "stringIndexType": Union[str, StringIndexType] + logging_opt_out: bool + model_version: str + string_index_type: Union[str, StringIndexType] + + + class azure.ai.textanalytics.types.EntityLinkingLROTask(TypedDict, total=False): + key "kind": Required[Literal[AnalyzeTextOperationActionKind.ENTITY_LINKING]] + key "parameters": ForwardRef('EntityLinkingActionContent', module='types') + key "taskName": str + kind: Literal[AnalyzeTextOperationActionKind.ENTITY_LINKING] + name: str + parameters: EntityLinkingActionContent + + + class azure.ai.textanalytics.types.EntityMaskPolicyType(TypedDict, total=False): + key "isDefault": bool + key "policyKind": Required[Literal[RedactionPolicyKind.ENTITY_MASK]] + key "policyName": str + entityTypes: list[Union[str, PiiCategoriesExclude]] + entity_types: list[Union[str, PiiCategoriesExclude]] + is_default: bool + policy_kind: Literal[RedactionPolicyKind.ENTITY_MASK] + policy_name: str + + + class azure.ai.textanalytics.types.EntitySynonym(TypedDict, total=False): + key "language": str + key "synonym": Required[str] + language: str + synonym: str + + + class azure.ai.textanalytics.types.EntitySynonyms(TypedDict, total=False): + key "entityType": Required[Union[str, PiiCategoriesExclude]] + key "synonyms": Required[list[EntitySynonym]] + entity_type: Union[str, PiiCategoriesExclude] + synonyms: list[EntitySynonym] + + + class azure.ai.textanalytics.types.ExtractiveSummarizationActionContent(TypedDict, total=False): + key "loggingOptOut": bool + key "modelVersion": str + key "query": str + key "sentenceCount": int + key "sortBy": Union[str, ExtractiveSummarizationSortingCriteria] + key "stringIndexType": Union[str, StringIndexType] + logging_opt_out: bool + model_version: str + query: str + sentence_count: int + sort_by: Union[str, ExtractiveSummarizationSortingCriteria] + string_index_type: Union[str, StringIndexType] + + + class azure.ai.textanalytics.types.ExtractiveSummarizationOperationAction(TypedDict, total=False): + key "kind": Required[Literal[AnalyzeTextOperationActionKind.EXTRACTIVE_SUMMARIZATION]] + key "parameters": ForwardRef('ExtractiveSummarizationActionContent', module='types') + key "taskName": str + action_content: ExtractiveSummarizationActionContent + kind: Literal[AnalyzeTextOperationActionKind.EXTRACTIVE_SUMMARIZATION] + name: str + + + class azure.ai.textanalytics.types.HealthcareLROTask(TypedDict, total=False): + key "kind": Required[Literal[AnalyzeTextOperationActionKind.HEALTHCARE]] + key "parameters": ForwardRef('HealthcareTaskParameters', module='types') + key "taskName": str + kind: Literal[AnalyzeTextOperationActionKind.HEALTHCARE] + name: str + parameters: HealthcareTaskParameters + + + class azure.ai.textanalytics.types.HealthcareTaskParameters(TypedDict, total=False): + key "documentType": Union[str, HealthcareDocumentType] + key "fhirVersion": Union[str, FhirVersion] + key "loggingOptOut": bool + key "modelVersion": str + key "stringIndexType": Union[str, StringIndexType] + document_type: Union[str, HealthcareDocumentType] + fhir_version: Union[str, FhirVersion] + logging_opt_out: bool + model_version: str + string_index_type: Union[str, StringIndexType] + + + class azure.ai.textanalytics.types.KeyPhraseActionContent(TypedDict, total=False): + key "loggingOptOut": bool + key "modelVersion": str + logging_opt_out: bool + model_version: str + + + class azure.ai.textanalytics.types.KeyPhraseLROTask(TypedDict, total=False): + key "kind": Required[Literal[AnalyzeTextOperationActionKind.KEY_PHRASE_EXTRACTION]] + key "parameters": ForwardRef('KeyPhraseActionContent', module='types') + key "taskName": str + kind: Literal[AnalyzeTextOperationActionKind.KEY_PHRASE_EXTRACTION] + name: str + parameters: KeyPhraseActionContent + + + class azure.ai.textanalytics.types.LanguageDetectionActionContent(TypedDict, total=False): + key "loggingOptOut": bool + key "modelVersion": str + logging_opt_out: bool + model_version: str + + + class azure.ai.textanalytics.types.LanguageDetectionTextInput(TypedDict, total=False): + documents: list[LanguageInput] + language_inputs: list[LanguageInput] + + + class azure.ai.textanalytics.types.LanguageInput(TypedDict, total=False): + key "countryHint": str + key "id": Required[str] + key "text": Required[str] + country_hint: str + id: str + text: str + + + class azure.ai.textanalytics.types.MatchLongestEntityPolicyType(TypedDict, total=False): + key "policyKind": Required[Literal[PolicyKind.MATCH_LONGEST]] + policy_kind: Literal[PolicyKind.MATCH_LONGEST] + + + class azure.ai.textanalytics.types.MultiLanguageInput(TypedDict, total=False): + key "id": Required[str] + key "language": str + key "text": Required[str] + id: str + language: str + text: str + + + class azure.ai.textanalytics.types.MultiLanguageTextInput(TypedDict, total=False): + documents: list[MultiLanguageInput] + multi_language_inputs: list[MultiLanguageInput] + + + class azure.ai.textanalytics.types.NoMaskPolicyType(TypedDict, total=False): + key "isDefault": bool + key "policyKind": Required[Literal[RedactionPolicyKind.NO_MASK]] + key "policyName": str + entityTypes: list[Union[str, PiiCategoriesExclude]] + entity_types: list[Union[str, PiiCategoriesExclude]] + is_default: bool + policy_kind: Literal[RedactionPolicyKind.NO_MASK] + policy_name: str + + + class azure.ai.textanalytics.types.PiiActionContent(TypedDict, total=False): + key "confidenceScoreThreshold": ForwardRef('ConfidenceScoreThreshold', module='types') + key "disableEntityValidation": bool + key "domain": Union[str, PiiDomain] + key "loggingOptOut": bool + key "modelVersion": str + key "stringIndexType": Union[str, StringIndexType] + key "valueExclusionPolicy": ForwardRef('ValueExclusionPolicy', module='types') + confidence_score_threshold: ConfidenceScoreThreshold + disable_entity_validation: bool + domain: Union[str, PiiDomain] + entitySynonyms: list[EntitySynonyms] + entity_synonyms: list[EntitySynonyms] + excludePiiCategories: list[Union[str, PiiCategoriesExclude]] + exclude_pii_categories: list[Union[str, PiiCategoriesExclude]] + logging_opt_out: bool + model_version: str + piiCategories: list[Union[str, PiiCategory]] + pii_categories: list[Union[str, PiiCategory]] + redactionPolicies: list[BaseRedactionPolicy] + redaction_policies: list[BaseRedactionPolicy] + string_index_type: Union[str, StringIndexType] + value_exclusion_policy: ValueExclusionPolicy + + + class azure.ai.textanalytics.types.PiiLROTask(TypedDict, total=False): + key "kind": Required[Literal[AnalyzeTextOperationActionKind.PII_ENTITY_RECOGNITION]] + key "parameters": ForwardRef('PiiActionContent', module='types') + key "taskName": str + kind: Literal[AnalyzeTextOperationActionKind.PII_ENTITY_RECOGNITION] + name: str + parameters: PiiActionContent + + + class azure.ai.textanalytics.types.PolicyKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALLOW_OVERLAP = "allowOverlap" + MATCH_LONGEST = "matchLongest" + + + class azure.ai.textanalytics.types.RedactionPolicyKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CHARACTER_MASK = "characterMask" + ENTITY_MASK = "entityMask" + NO_MASK = "noMask" + SYNTHETIC_REPLACEMENT = "syntheticReplacement" + + + class azure.ai.textanalytics.types.SentimentAnalysisActionContent(TypedDict, total=False): + key "loggingOptOut": bool + key "modelVersion": str + key "opinionMining": bool + key "stringIndexType": Union[str, StringIndexType] + logging_opt_out: bool + model_version: str + opinion_mining: bool + string_index_type: Union[str, StringIndexType] + + + class azure.ai.textanalytics.types.SentimentAnalysisOperationAction(TypedDict, total=False): + key "kind": Required[Literal[AnalyzeTextOperationActionKind.SENTIMENT_ANALYSIS]] + key "parameters": ForwardRef('SentimentAnalysisActionContent', module='types') + key "taskName": str + kind: Literal[AnalyzeTextOperationActionKind.SENTIMENT_ANALYSIS] + name: str + parameters: SentimentAnalysisActionContent + + + class azure.ai.textanalytics.types.SyntheticReplacementPolicyType(TypedDict, total=False): + key "isDefault": bool + key "policyKind": Required[Literal[RedactionPolicyKind.SYNTHETIC_REPLACEMENT]] + key "policyName": str + key "preserveDataFormat": bool + entityTypes: list[Union[str, PiiCategoriesExclude]] + entity_types: list[Union[str, PiiCategoriesExclude]] + is_default: bool + policy_kind: Literal[RedactionPolicyKind.SYNTHETIC_REPLACEMENT] + policy_name: str + preserve_data_format: bool + + + class azure.ai.textanalytics.types.TextEntityLinkingInput(TypedDict, total=False): + key "analysisInput": ForwardRef('MultiLanguageTextInput', module='types') + key "kind": Required[Literal[AnalyzeTextInputKind.ENTITY_LINKING]] + key "parameters": ForwardRef('EntityLinkingActionContent', module='types') + action_content: EntityLinkingActionContent + kind: Literal[AnalyzeTextInputKind.ENTITY_LINKING] + text_input: MultiLanguageTextInput + + + class azure.ai.textanalytics.types.TextEntityRecognitionInput(TypedDict, total=False): + key "analysisInput": ForwardRef('MultiLanguageTextInput', module='types') + key "kind": Required[Literal[AnalyzeTextInputKind.ENTITY_RECOGNITION]] + key "parameters": ForwardRef('EntitiesActionContent', module='types') + action_content: EntitiesActionContent + kind: Literal[AnalyzeTextInputKind.ENTITY_RECOGNITION] + text_input: MultiLanguageTextInput + + + class azure.ai.textanalytics.types.TextKeyPhraseExtractionInput(TypedDict, total=False): + key "analysisInput": ForwardRef('MultiLanguageTextInput', module='types') + key "kind": Required[Literal[AnalyzeTextInputKind.KEY_PHRASE_EXTRACTION]] + key "parameters": ForwardRef('KeyPhraseActionContent', module='types') + action_content: KeyPhraseActionContent + kind: Literal[AnalyzeTextInputKind.KEY_PHRASE_EXTRACTION] + text_input: MultiLanguageTextInput + + + class azure.ai.textanalytics.types.TextLanguageDetectionInput(TypedDict, total=False): + key "analysisInput": ForwardRef('LanguageDetectionTextInput', module='types') + key "kind": Required[Literal[AnalyzeTextInputKind.LANGUAGE_DETECTION]] + key "parameters": ForwardRef('LanguageDetectionActionContent', module='types') + action_content: LanguageDetectionActionContent + kind: Literal[AnalyzeTextInputKind.LANGUAGE_DETECTION] + text_input: LanguageDetectionTextInput + + + class azure.ai.textanalytics.types.TextPiiEntitiesRecognitionInput(TypedDict, total=False): + key "analysisInput": ForwardRef('MultiLanguageTextInput', module='types') + key "kind": Required[Literal[AnalyzeTextInputKind.PII_ENTITY_RECOGNITION]] + key "parameters": ForwardRef('PiiActionContent', module='types') + action_content: PiiActionContent + kind: Literal[AnalyzeTextInputKind.PII_ENTITY_RECOGNITION] + text_input: MultiLanguageTextInput + + + class azure.ai.textanalytics.types.TextSentimentAnalysisInput(TypedDict, total=False): + key "analysisInput": ForwardRef('MultiLanguageTextInput', module='types') + key "kind": Required[Literal[AnalyzeTextInputKind.SENTIMENT_ANALYSIS]] + key "parameters": ForwardRef('SentimentAnalysisActionContent', module='types') + action_content: SentimentAnalysisActionContent + kind: Literal[AnalyzeTextInputKind.SENTIMENT_ANALYSIS] + text_input: MultiLanguageTextInput + + + class azure.ai.textanalytics.types.ValueExclusionPolicy(TypedDict, total=False): + key "caseSensitive": Required[bool] + key "excludedValues": Required[list[str]] + case_sensitive: bool + excluded_values: list[str] + + +``` \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/api.metadata.yml b/sdk/cognitivelanguage/azure-ai-textanalytics/api.metadata.yml new file mode 100644 index 000000000000..50b6721ee4ad --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/api.metadata.yml @@ -0,0 +1,3 @@ +apiMdSha256: 4717b43f649dc4f1c8d293b6eb3a892198b1e80fe5fd32c799dce1831e67d5da +parserVersion: 0.3.30 +pythonVersion: 3.13.14 diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/apiview-properties.json b/sdk/cognitivelanguage/azure-ai-textanalytics/apiview-properties.json index d8345022e36c..fbc006e348d8 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/apiview-properties.json +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/apiview-properties.json @@ -200,5 +200,6 @@ "azure.ai.textanalytics.aio.TextAnalysisClient.begin_analyze_text_job": "Language.Text.analyzeTextSubmitJob", "azure.ai.textanalytics.TextAnalysisClient.begin_cancel_job": "Language.Text.analyzeTextCancelJob", "azure.ai.textanalytics.aio.TextAnalysisClient.begin_cancel_job": "Language.Text.analyzeTextCancelJob" - } + }, + "CrossLanguageVersion": "b62ef08f62e9" } \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_client.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_client.py index 21df77db5868..1c9ce86d0537 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_client.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_client.py @@ -8,8 +8,8 @@ # -------------------------------------------------------------------------- from copy import deepcopy +import sys from typing import Any, TYPE_CHECKING, Union -from typing_extensions import Self from azure.core import PipelineClient from azure.core.credentials import AzureKeyCredential @@ -20,6 +20,11 @@ from ._operations import _TextAnalysisClientOperationsMixin from ._utils.serialization import Deserializer, Serializer +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: from azure.core.credentials import TokenCredential @@ -39,8 +44,9 @@ class TextAnalysisClient(_TextAnalysisClientOperationsMixin): credential type or a token credential type. Required. :type credential: ~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential - :keyword api_version: The API version to use for this operation. Default value is - "2025-11-15-preview". Note that overriding this default value may result in unsupported + :keyword api_version: The API version to use for this operation. Known values are + "2026-05-15-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_configuration.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_configuration.py index 9b65c7d64d35..f47f98e4a5ca 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_configuration.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_configuration.py @@ -30,14 +30,15 @@ class TextAnalysisClientConfiguration: # pylint: disable=too-many-instance-attr credential type or a token credential type. Required. :type credential: ~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential - :keyword api_version: The API version to use for this operation. Default value is - "2025-11-15-preview". Note that overriding this default value may result in unsupported + :keyword api_version: The API version to use for this operation. Known values are + "2026-05-15-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2025-11-15-preview") + api_version: str = kwargs.pop("api_version", "2026-05-15-preview") if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_operations/_operations.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_operations/_operations.py index 361efb3e6a6c..49653c5498b4 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_operations/_operations.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_operations/_operations.py @@ -28,7 +28,7 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict -from .. import models as _models +from .. import models as _models, types as _types from .._configuration import TextAnalysisClientConfiguration from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from .._utils.serialization import Serializer @@ -48,7 +48,7 @@ def build_text_analysis_analyze_text_request(*, show_stats: Optional[bool] = Non _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -78,7 +78,7 @@ def build_text_analysis_get_job_status_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -109,7 +109,7 @@ def build_text_analysis_analyze_text_job_request(**kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-15-preview")) # Construct URL _url = "/analyze-text/jobs" @@ -126,7 +126,7 @@ def build_text_analysis_analyze_text_job_request(**kwargs: Any) -> HttpRequest: def build_text_analysis_cancel_job_request(job_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-11-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-05-15-preview")) # Construct URL _url = "/analyze-text/jobs/{jobId}:cancel" path_format_arguments = { @@ -171,12 +171,17 @@ def analyze_text( @overload def analyze_text( - self, body: JSON, *, show_stats: Optional[bool] = None, content_type: str = "application/json", **kwargs: Any + self, + body: _types.AnalyzeTextInput, + *, + show_stats: Optional[bool] = None, + content_type: str = "application/json", + **kwargs: Any ) -> _models.AnalyzeTextResult: """Request text analysis over a collection of documents. :param body: The input documents to analyze. Required. - :type body: JSON + :type body: ~azure.ai.textanalytics.types.AnalyzeTextInput :keyword show_stats: (Optional) if set to true, response will contain request and document level statistics. Default value is None. :paramtype show_stats: bool @@ -215,16 +220,17 @@ def analyze_text( @distributed_trace def analyze_text( self, - body: Union[_models.AnalyzeTextInput, JSON, IO[bytes]], + body: Union[_models.AnalyzeTextInput, _types.AnalyzeTextInput, IO[bytes]], *, show_stats: Optional[bool] = None, **kwargs: Any ) -> _models.AnalyzeTextResult: """Request text analysis over a collection of documents. - :param body: The input documents to analyze. Is one of the following types: AnalyzeTextInput, - JSON, IO[bytes] Required. - :type body: ~azure.ai.textanalytics.models.AnalyzeTextInput or JSON or IO[bytes] + :param body: The input documents to analyze. Is either a AnalyzeTextInput type or a IO[bytes] + type. Required. + :type body: ~azure.ai.textanalytics.models.AnalyzeTextInput or + ~azure.ai.textanalytics.types.AnalyzeTextInput or IO[bytes] :keyword show_stats: (Optional) if set to true, response will contain request and document level statistics. Default value is None. :paramtype show_stats: bool @@ -266,6 +272,7 @@ def analyze_text( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -287,7 +294,7 @@ def analyze_text( raise HttpResponseError(response=response, model=error) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.AnalyzeTextResult, response.json()) @@ -354,6 +361,7 @@ def get_job_status( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -375,7 +383,7 @@ def get_job_status( raise HttpResponseError(response=response, model=error) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.AnalyzeTextOperationState, response.json()) @@ -386,7 +394,7 @@ def get_job_status( def _analyze_text_job_initial( self, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.AnalyzeTextSubmitJobRequest, IO[bytes]] = _Unset, *, text_input: _models.MultiLanguageTextInput = _Unset, actions: list[_models.AnalyzeTextOperationAction] = _Unset, @@ -441,6 +449,7 @@ def _analyze_text_job_initial( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -463,7 +472,7 @@ def _analyze_text_job_initial( response_headers = {} response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -507,13 +516,13 @@ def begin_analyze_text_job( @overload def begin_analyze_text_job( - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, body: _types.AnalyzeTextSubmitJobRequest, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[None]: """Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. :param body: Required. - :type body: JSON + :type body: ~azure.ai.textanalytics.types.AnalyzeTextSubmitJobRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -542,7 +551,7 @@ def begin_analyze_text_job( @distributed_trace def begin_analyze_text_job( self, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.AnalyzeTextSubmitJobRequest, IO[bytes]] = _Unset, *, text_input: _models.MultiLanguageTextInput = _Unset, actions: list[_models.AnalyzeTextOperationAction] = _Unset, @@ -554,8 +563,9 @@ def begin_analyze_text_job( """Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, AnalyzeTextSubmitJobRequest, IO[bytes] + Required. + :type body: JSON or ~azure.ai.textanalytics.types.AnalyzeTextSubmitJobRequest or IO[bytes] :keyword text_input: Contains the input to be analyzed. Required. :paramtype text_input: ~azure.ai.textanalytics.models.MultiLanguageTextInput :keyword actions: List of tasks to be performed as part of the LRO. Required. @@ -647,6 +657,7 @@ def _cancel_job_initial(self, job_id: str, **kwargs: Any) -> Iterator[bytes]: } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -669,7 +680,7 @@ def _cancel_job_initial(self, job_id: str, **kwargs: Any) -> Iterator[bytes]: response_headers = {} response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_patch.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_patch.py index 155c134188dd..87676c65a8f0 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_patch.py @@ -1,4 +1,3 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -8,334 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -import json -from typing import Any, Callable, Dict, IO, Mapping, Optional, TypeVar, Union, cast, overload, Generic, TYPE_CHECKING -from collections.abc import MutableMapping # pylint:disable=import-error -from urllib.parse import urlparse -from azure.core.exceptions import HttpResponseError -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.polling.base_polling import LROBasePolling -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.core.credentials import AzureKeyCredential -from azure.core.paging import ItemPaged -from ._client import TextAnalysisClient as AnalysisTextClientGenerated -from . import models as _models -from .models import AnalyzeTextOperationState, TextActions # convenience re-exports if present -from ._utils.serialization import Serializer - -if TYPE_CHECKING: - from azure.core.credentials import TokenCredential - -JSON = MutableMapping[str, Any] -_Unset: Any = object() -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def _parse_operation_id(op_loc: Optional[str]) -> Optional[str]: - """Extract the operation ID from an Operation-Location URL. - - :param op_loc: The ``Operation-Location`` header value or URL to parse. - If ``None`` or malformed, no ID can be extracted. - :type op_loc: Optional[str] - :return: The trailing path segment as the operation ID, or ``None`` if not found. - :rtype: Optional[str] - """ - if not op_loc: - return None - path = urlparse(op_loc).path.rstrip("/") - if "/" not in path: - return None - return path.rsplit("/", 1)[-1] - - -PollingReturnType_co = TypeVar("PollingReturnType_co", covariant=True) - - -class AnalyzeTextLROPoller(LROPoller[PollingReturnType_co], Generic[PollingReturnType_co]): - """Custom poller that returns PollingReturnType_co and exposes operation metadata.""" - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - self._last_state: Optional[AnalyzeTextOperationState] = None # set by deserializer - - # internal: called by the deserializer to update details() - def _record_state_for_details(self, state: AnalyzeTextOperationState) -> None: - self._last_state = state - - @property - def details(self) -> Mapping[str, Any]: - """Metadata associated with the long-running operation. - - :return: A mapping with keys like ``operation_id`` and, when available, - ``status``, ``job_id``, ``display_name``, ``created_at``, - ``last_updated_at``, ``expires_on``, ``statistics``, - ``errors``, and ``next_link``. - :rtype: Mapping[str, Any] - """ - try: - headers = getattr(self.polling_method(), "_initial_response").http_response.headers # type: ignore[attr-defined] - op_loc = headers.get("Operation-Location") or headers.get("operation-location") - except (AttributeError, TypeError): - op_loc = None - - info: Dict[str, Any] = {"operation_id": _parse_operation_id(op_loc)} - if self._last_state is not None: - s = self._last_state - info.update( - { - "status": s.status, - "job_id": s.job_id, - "display_name": s.display_name, - "created_at": s.created_at, - "last_updated_at": s.last_updated_at, - "expires_on": s.expires_on, - "statistics": s.statistics, - "errors": s.errors, - "next_link": s.next_link, - } - ) - return info - - @classmethod - def from_continuation_token( - cls, - polling_method: PollingMethod[PollingReturnType_co], - continuation_token: str, - **kwargs: Any, - ) -> "AnalyzeTextLROPoller[PollingReturnType_co]": - client, initial_response, deserialization_callback = polling_method.from_continuation_token( - continuation_token, **kwargs - ) - return cls(client, initial_response, deserialization_callback, polling_method) - - -class TextAnalysisClient(AnalysisTextClientGenerated): - def __init__( - self, - endpoint: str, - credential: Union[AzureKeyCredential, "TokenCredential"], - *, - api_version: Optional[str] = None, - **kwargs: Any, - ) -> None: - """Create a TextAnalysisClient. - :param endpoint: Supported Cognitive Services endpoint. - :type endpoint: str - :param credential: Key or token credential. - :type credential: ~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential - :keyword api_version: The API version to use for this operation. Default value is - "2025-05-15-preview". Note that overriding this default value may result in unsupported - behavior. - :paramtype api_version: str` - """ - if api_version is not None: - kwargs["api_version"] = api_version - super().__init__(endpoint=endpoint, credential=credential, **kwargs) - - @overload # type: ignore[override] - def begin_analyze_text_job( - self, - *, - text_input: _models.MultiLanguageTextInput, - actions: list[_models.AnalyzeTextOperationAction], - content_type: str = "application/json", - display_name: Optional[str] = None, - default_language: Optional[str] = None, - cancel_after: Optional[float] = None, - **kwargs: Any, - ) -> AnalyzeTextLROPoller[ItemPaged["TextActions"]]: - """Submit a collection of text documents for analysis. Specify one or more unique tasks to be - executed as a long-running operation. - - :keyword text_input: Contains the input to be analyzed. Required. - :paramtype text_input: ~azure.ai.textanalytics.models.MultiLanguageTextInput - :keyword actions: List of tasks to be performed as part of the LRO. Required. - :paramtype actions: list[~azure.ai.textanalytics.models.AnalyzeTextOperationAction] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :keyword display_name: Name for the task. Default value is None. - :paramtype display_name: str - :keyword default_language: Default language to use for records requesting automatic language - detection. Default value is None. - :paramtype default_language: str - :keyword cancel_after: Optional duration in seconds after which the job will be canceled if not - completed. Default value is None. - :paramtype cancel_after: float - :return: A poller whose ``result()`` yields ``ItemPaged[TextActions]`` and exposes metadata via ``.details``. - :rtype: ~azure.ai.textanalytics.AnalyzeTextLROPoller[ - ~azure.core.paging.ItemPaged[~azure.ai.textanalytics.models.TextActions]] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_analyze_text_job( # type: ignore[override] - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> AnalyzeTextLROPoller[ItemPaged["TextActions"]]: - """Submit a collection of text documents for analysis. Specify one or more unique tasks to be - executed as a long-running operation. - - :param body: Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: A poller whose ``result()`` yields ``ItemPaged[TextActions]`` and exposes metadata via ``.details``. - :rtype: ~azure.ai.textanalytics.AnalyzeTextLROPoller[ - ~azure.core.paging.ItemPaged[~azure.ai.textanalytics.models.TextActions]] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_analyze_text_job( # type: ignore[override] - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AnalyzeTextLROPoller[ItemPaged["TextActions"]]: - """Submit a collection of text documents for analysis. Specify one or more unique tasks to be - executed as a long-running operation. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: A poller whose ``result()`` yields ``ItemPaged[TextActions]`` and exposes metadata via ``.details``. - :rtype: ~azure.ai.textanalytics.AnalyzeTextLROPoller[ - ~azure.core.paging.ItemPaged[~azure.ai.textanalytics.models.TextActions]] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_analyze_text_job( # type: ignore[override] - self, - body: Union[JSON, IO[bytes]] = _Unset, - *, - text_input: _models.MultiLanguageTextInput = _Unset, - actions: list[_models.AnalyzeTextOperationAction] = _Unset, - display_name: Optional[str] = None, - default_language: Optional[str] = None, - cancel_after: Optional[float] = None, - **kwargs: Any, - ) -> AnalyzeTextLROPoller[ItemPaged["TextActions"]]: - """Submit a collection of text documents for analysis. Specify one or more unique tasks to be - executed as a long-running operation. - - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] - :keyword text_input: Contains the input to be analyzed. Required. - :paramtype text_input: ~azure.ai.textanalytics.models.MultiLanguageTextInput - :keyword actions: List of tasks to be performed as part of the LRO. Required. - :paramtype actions: list[~azure.ai.textanalytics.models.AnalyzeTextOperationAction] - :keyword display_name: Name for the task. Default value is None. - :paramtype display_name: str - :keyword default_language: Default language to use for records requesting automatic language - detection. Default value is None. - :paramtype default_language: str - :keyword cancel_after: Optional duration in seconds after which the job will be canceled if not - completed. Default value is None. - :paramtype cancel_after: float - :return: A poller whose ``result()`` yields ``ItemPaged[TextActions]`` and exposes metadata via ``.details``. - :rtype: ~azure.ai.textanalytics.AnalyzeTextLROPoller[ - ~azure.core.paging.ItemPaged[~azure.ai.textanalytics.models.TextActions]] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - polling: Union[bool, PollingMethod[ItemPaged["TextActions"]]] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - cls: ClsType[ItemPaged["TextActions"]] = kwargs.pop("cls", None) - kwargs.pop("error_map", None) - - path_format_arguments = { - "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - - def _fetch_state_by_next_link(next_link: str) -> AnalyzeTextOperationState: - req = HttpRequest("GET", next_link) - resp = self._client.send_request(req) # type: ignore[attr-defined] - if resp.status_code != 200: - raise HttpResponseError(response=resp) - data = json.loads(resp.text()) - return AnalyzeTextOperationState(data) - - def _build_pager_from_state(state: AnalyzeTextOperationState) -> ItemPaged["TextActions"]: - def extract_data(s: AnalyzeTextOperationState): - next_link = s.next_link - actions_payload: TextActions = s.actions - return next_link, [actions_payload] - - def get_next(token: Optional[str]) -> Optional[AnalyzeTextOperationState]: - if token is None: # First call → return the initial state - return state - if not token: # No nextLink → stop iteration - return None - return _fetch_state_by_next_link(token) # Fetch next page - - return ItemPaged(get_next, extract_data) - - poller_holder: Dict[str, AnalyzeTextLROPoller[ItemPaged["TextActions"]]] = {} - - def get_long_running_output(pipeline_response: PipelineResponse[HttpRequest, HttpResponse]): - final_response = pipeline_response.http_response - if final_response.status_code == 200: - data = json.loads(final_response.text()) - op_state = AnalyzeTextOperationState(data) - poller_ref = poller_holder["poller"] - poller_ref._record_state_for_details(op_state) # pylint: disable=protected-access - paged = _build_pager_from_state(op_state) - return cls(pipeline_response, paged, {}) if cls else paged - raise HttpResponseError(response=final_response) - - if polling is True: - polling_method: PollingMethod[ItemPaged["TextActions"]] = cast( - PollingMethod[ItemPaged["TextActions"]], - LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod[ItemPaged["TextActions"]], NoPolling()) - else: - polling_method = cast(PollingMethod[ItemPaged["TextActions"]], polling) - - if cont_token: - return AnalyzeTextLROPoller[ItemPaged["TextActions"]].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - ) - - initial_kwargs = dict( # pylint:disable=use-dict-literal - text_input=text_input, - actions=actions, - display_name=display_name, - default_language=default_language, - cancel_after=cancel_after, - content_type=content_type, - cls=lambda x, y, z: x, # passthrough raw pipeline response - headers=_headers, - params=_params, - **kwargs, - ) - if body is not _Unset and body is not None: - initial_kwargs["body"] = body - - raw_result = self._analyze_text_job_initial(**initial_kwargs) - raw_result.http_response.read() # type: ignore[attr-defined] - - lro: AnalyzeTextLROPoller[ItemPaged["TextActions"]] = AnalyzeTextLROPoller( - self._client, raw_result, get_long_running_output, polling_method - ) - poller_holder["poller"] = lro - return lro +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): @@ -345,6 +19,3 @@ def patch_sdk(): you can't accomplish using the techniques described in https://aka.ms/azsdk/python/dpcodegen/python/customize """ - - -__all__ = ["TextAnalysisClient", "AnalyzeTextLROPoller"] diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_utils/model_base.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_utils/model_base.py index 097f8197cfd9..1934415c1369 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_utils/model_base.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_utils/model_base.py @@ -23,14 +23,19 @@ from json import JSONEncoder import xml.etree.ElementTree as ET from collections.abc import MutableMapping -from typing_extensions import Self import isodate from azure.core.exceptions import DeserializationError from azure.core import CaseInsensitiveEnumMeta from azure.core.pipeline import PipelineResponse from azure.core.serialization import _Null + from azure.core.rest import HttpResponse +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + _LOGGER = logging.getLogger(__name__) __all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] @@ -104,6 +109,29 @@ def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: return encoded +def _serialize_duration(td: timedelta, format: typing.Optional[str] = None): + """Serialize a timedelta to its wire representation. + + For the ``seconds``/``milliseconds`` encodings the value is converted to a + numeric value, otherwise it falls back to an ISO 8601 duration string. + + :param timedelta td: The timedelta to serialize. + :param str format: The duration encoding format. + :rtype: int or float or str + :return: serialized duration + """ + seconds = td.total_seconds() + if format == "duration-seconds-int": + return int(seconds) + if format == "duration-seconds-float": + return seconds + if format == "duration-milliseconds-int": + return int(seconds * 1000) + if format == "duration-milliseconds-float": + return seconds * 1000 + return _timedelta_as_isostr(td) + + def _serialize_datetime(o, format: typing.Optional[str] = None): if hasattr(o, "year") and hasattr(o, "hour"): if format == "rfc7231": @@ -296,6 +324,12 @@ def _deserialize_duration(attr): return isodate.parse_duration(attr) +def _deserialize_duration_numeric(attr, unit): + if isinstance(attr, timedelta): + return attr + return timedelta(**{unit: float(attr)}) + + def _deserialize_decimal(attr): if isinstance(attr, decimal.Decimal): return attr @@ -325,6 +359,10 @@ def _deserialize_int_as_str(attr): "unix-timestamp": _deserialize_datetime_unix_timestamp, "base64": _deserialize_bytes, "base64url": _deserialize_bytes_base64, + "duration-seconds-int": functools.partial(_deserialize_duration_numeric, unit="seconds"), + "duration-seconds-float": functools.partial(_deserialize_duration_numeric, unit="seconds"), + "duration-milliseconds-int": functools.partial(_deserialize_duration_numeric, unit="milliseconds"), + "duration-milliseconds-float": functools.partial(_deserialize_duration_numeric, unit="milliseconds"), } @@ -420,21 +458,21 @@ def __ne__(self, other: typing.Any) -> bool: def keys(self) -> typing.KeysView[str]: """ - :returns: a set-like object providing a view on D's keys + :returns: a set-like object providing a view on the mapping's keys :rtype: ~typing.KeysView """ return self._data.keys() def values(self) -> typing.ValuesView[typing.Any]: """ - :returns: an object providing a view on D's values + :returns: an object providing a view on the mapping's values :rtype: ~typing.ValuesView """ return self._data.values() def items(self) -> typing.ItemsView[str, typing.Any]: """ - :returns: set-like object providing a view on D's items + :returns: a set-like object providing a view on the mapping's items :rtype: ~typing.ItemsView """ return self._data.items() @@ -444,7 +482,7 @@ def get(self, key: str, default: typing.Any = None) -> typing.Any: Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None - :returns: D[k] if k in D, else d. + :returns: The value for key if key is in the dictionary, else default. :rtype: any """ try: @@ -479,19 +517,19 @@ def popitem(self) -> tuple[str, typing.Any]: Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple - :raises KeyError: if D is empty. + :raises KeyError: if the dictionary is empty. """ return self._data.popitem() def clear(self) -> None: """ - Remove all items from D. + Remove all items from the dictionary. """ self._data.clear() def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ """ - Updates D from mapping/iterable E and F. + Update the dictionary from a mapping or an iterable of key-value pairs. :param any args: Either a mapping object or an iterable of key-value pairs. """ self._data.update(*args, **kwargs) @@ -504,10 +542,11 @@ def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: """ - Same as calling D.get(k, d), and setting D[k]=d if k not found + Return the value for key if key is in the dictionary; otherwise set the key to + default and return default. :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary - :returns: D[k] if k in D, else d. + :returns: The value for key if key is in the dictionary, else default. :rtype: any """ if default is _UNSET: @@ -515,6 +554,8 @@ def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: return self._data.setdefault(key, default) def __eq__(self, other: typing.Any) -> bool: + if isinstance(other, _MyMutableMapping): + return self._data == other._data try: other_model = self.__class__(other) except Exception: @@ -557,7 +598,7 @@ def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-m pass # Last, try datetime.timedelta try: - return _timedelta_as_isostr(o) + return _serialize_duration(o, format) except AttributeError: # This will be raised when it hits value.total_seconds in the method above pass @@ -583,6 +624,239 @@ def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typin return _serialize(value, rf._format) +# ============================================================================ +# Fast-path scalar deserializer functions for rest_field(deserializer=...) +# These are referenced from rest_field declarations to bypass the generic +# _deserialize -> _deserialize_with_callable chain. +# Only simple/primitive types — no models or container types. +# ============================================================================ + + +def _xml_deser_str(value): + if isinstance(value, ET.Element): + return value.text or "" + return str(value) if value is not None else None + + +def _xml_deser_int(value): + if isinstance(value, ET.Element): + return int(value.text) if value.text else None + return int(value) if value is not None else None + + +def _xml_deser_float(value): + if isinstance(value, ET.Element): + return float(value.text) if value.text else None + return float(value) if value is not None else None + + +def _xml_deser_bool(value): + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + if text in (True, False): + return text + return text.lower() == "true" + + +# pylint: disable=docstring-missing-param +def _xml_deser_bytes(value): + """Deserialize bytes from XML (base64).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_bytes(text) + + +def _xml_deser_bytes_base64url(value): + """Deserialize bytes from XML (base64url).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_bytes_base64(text) + + +def _xml_deser_datetime(value): + """Deserialize a datetime from XML (ISO 8601 / rfc3339).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime(text) + + +def _xml_deser_datetime_rfc7231(value): + """Deserialize a datetime from XML (RFC7231 format).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime_rfc7231(text) + + +def _xml_deser_datetime_unix_timestamp(value): + """Deserialize a datetime from XML (Unix timestamp).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime_unix_timestamp(float(text)) + + +def _xml_deser_date(value): + """Deserialize a date from XML (ISO 8601).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_date(text) + + +def _xml_deser_time(value): + """Deserialize a time from XML (ISO 8601).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_time(text) + + +def _xml_deser_duration(value): + """Deserialize a timedelta from XML (ISO 8601 duration).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_duration(text) + + +def _xml_deser_decimal(value): + """Deserialize a Decimal from XML.""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_decimal(text) + + +def _xml_deser_enum_or_str(enum_cls, value): + """Deserialize a Union[EnumType, str] from XML.""" + text = value.text if isinstance(value, ET.Element) else value + if text is None: + return None + try: + return enum_cls(text) + except ValueError: + return text + + +def _extract_xml_model_type(rf_type): + """Extract the concrete Model class from a resolved rf._type partial chain. + + Unwraps ``Optional[Model]`` and ``_deserialize_model(Model, ...)`` + wrappers. Only handles Model and Optional[Model] — other composite + types (List, Dict, Union, etc.) return None and fall through to the + generic ``_deserialize`` path at runtime. + """ + if rf_type is None: + return None + if isinstance(rf_type, type) and _is_model(rf_type): + return rf_type + if not isinstance(rf_type, functools.partial): + return None + func = rf_type.func + args = rf_type.args + if func is _deserialize_with_optional and args: + return _extract_xml_model_type(args[0]) + if func is _deserialize_model and args: + cls = args[0] + return cls if isinstance(cls, type) and _is_model(cls) else None + return None + + +def _build_xml_field_plan( # pylint: disable=docstring-missing-return, docstring-missing-rtype, unused-variable + cls, attr_to_rest_field: dict +) -> list: + """Build a precomputed XML field plan for fast _init_from_xml iteration. + + Called once per model class in __new__. Returns a list of tuples: + (rest_name, xml_name, kind, deser, rf_type, is_optional, items_name) + + kind: 0=wrapped, 1=attribute, 2=unwrapped, 3=text + + For Model and Optional[Model] fields that lack a scalar + ``_deserializer``, this function precomputes the Model class as the + deserializer so ``_init_from_xml`` can call ``ModelClass(element)`` + directly instead of going through the expensive + ``_get_deserialize_callable_from_annotation`` chain at runtime. + """ + model_meta = getattr(cls, "_xml", {}) + model_ns = model_meta.get("ns") or model_meta.get("namespace") + plan = [] + + for rf in attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + deser = rf._deserializer + + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + is_optional = rf._is_optional + + # For Model / Optional[Model] fields without a scalar deserializer, + # precompute the Model class as the deserializer. + if deser is None and rf._type is not None: + model_cls = _extract_xml_model_type(rf._type) + if model_cls is not None: + deser = model_cls + + if prop_meta.get("attribute", False): + plan.append((rf._rest_name, xml_name, 1, deser, rf._type, is_optional, None)) + elif prop_meta.get("unwrapped", False): + items_name = prop_meta.get("itemsName") + if items_name: + items_ns = prop_meta.get("itemsNs") + if items_ns is not None: + xml_ns = items_ns + if xml_ns: + items_name = "{" + xml_ns + "}" + items_name + else: + items_name = xml_name + plan.append((rf._rest_name, xml_name, 2, deser, rf._type, is_optional, items_name)) + elif prop_meta.get("text", False): + plan.append((rf._rest_name, xml_name, 3, deser, rf._type, is_optional, None)) + else: + plan.append((rf._rest_name, xml_name, 0, deser, rf._type, is_optional, None)) + + return plan + + +# pylint: enable=docstring-missing-param class Model(_MyMutableMapping): _is_model = True # label whether current class's _attr_to_rest_field has been calculated @@ -593,59 +867,10 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: class_name = self.__class__.__name__ if len(args) > 1: raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") - dict_to_pass = { - rest_field._rest_name: rest_field._default - for rest_field in self._attr_to_rest_field.values() - if rest_field._default is not _UNSET - } - if args: # pylint: disable=too-many-nested-blocks + dict_to_pass: dict[str, typing.Any] = {} + if args: if isinstance(args[0], ET.Element): - existed_attr_keys = [] - model_meta = getattr(self, "_xml", {}) - - for rf in self._attr_to_rest_field.values(): - prop_meta = getattr(rf, "_xml", {}) - xml_name = prop_meta.get("name", rf._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - - # attribute - if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) - continue - - # unwrapped element is array - if prop_meta.get("unwrapped", False): - # unwrapped array could either use prop items meta/prop meta - if prop_meta.get("itemsName"): - xml_name = prop_meta.get("itemsName") - xml_ns = prop_meta.get("itemNs") - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - items = args[0].findall(xml_name) # pyright: ignore - if len(items) > 0: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) - continue - - # text element is primitive type - if prop_meta.get("text", False): - if args[0].text is not None: - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) - continue - - # wrapped element could be normal property or array, it should only have one element - item = args[0].find(xml_name) - if item is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) - - # rest thing is additional properties - for e in args[0]: - if e.tag not in existed_attr_keys: - dict_to_pass[e.tag] = _convert_element(e) + dict_to_pass.update(self._init_from_xml(args[0])) else: dict_to_pass.update( {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} @@ -662,8 +887,117 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: if v is not None } ) + # Apply client default values for fields the caller didn't set so that + # defaults are part of `_data` and therefore included during serialization. + for rf in self._attr_to_rest_field.values(): + if rf._default is _UNSET: + continue + if rf._rest_name in dict_to_pass: + continue + dict_to_pass[rf._rest_name] = _create_value(rf, rf._default) super().__init__(dict_to_pass) + def _init_from_xml( # pylint: disable=too-many-branches, too-many-statements + self, element: ET.Element + ) -> dict[str, typing.Any]: + """Deserialize an XML element into a dict mapping rest field names to values. + + :param ET.Element element: The XML element to deserialize from. + :returns: A dictionary of rest_name to deserialized value pairs. + :rtype: dict + """ + result: dict[str, typing.Any] = {} + existed_attr_keys: list[str] = [] + + field_plan = getattr(self, "_xml_field_plan", None) + if field_plan: + for rest_name, xml_name, kind, deser, rf_type, is_optional, items_name in field_plan: + if kind == 0: # wrapped element (most common) + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + if deser: + result[rest_name] = deser(item) + else: + result[rest_name] = _deserialize(rf_type, item) + elif kind == 1: # attribute + attr_val = element.get(xml_name) + if attr_val is not None: + existed_attr_keys.append(xml_name) + if deser: + result[rest_name] = deser(attr_val) + else: + result[rest_name] = attr_val + elif kind == 2: # unwrapped array + items = element.findall(items_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(items_name) + if deser: + result[rest_name] = deser(items) + else: + result[rest_name] = _deserialize(rf_type, items) + elif not is_optional: + existed_attr_keys.append(items_name) + result[rest_name] = [] + elif kind == 3: # text + if element.text is not None: + if deser: + result[rest_name] = deser(element.text) + else: + result[rest_name] = element.text + else: + model_meta = getattr(self, "_xml", {}) + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and element.get(xml_name) is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, element.get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + _items_name = prop_meta.get("itemsName") + if _items_name: + xml_name = _items_name + _items_ns = prop_meta.get("itemsNs") + if _items_ns is not None: + xml_ns = _items_ns + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = element.findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, items) + elif not rf._is_optional: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = [] + continue + + # text element is primitive type + if prop_meta.get("text", False): + if element.text is not None: + result[rf._rest_name] = _deserialize(rf._type, element.text) + continue + + # wrapped element could be normal property or array + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in element: + if e.tag not in existed_attr_keys: + result[e.tag] = _convert_element(e) + + return result + def copy(self) -> "Model": return Model(self.__dict__) @@ -692,6 +1026,9 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: Model._get_backcompat_attribute_name(cls._attr_to_rest_field, attr): rf for attr, rf in cls._attr_to_rest_field.items() } + # Build XML field plan for fast _init_from_xml (only for XML models) + if getattr(cls, "_xml", None): + cls._xml_field_plan = _build_xml_field_plan(cls, attr_to_rest_field) cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") return super().__new__(cls) @@ -730,7 +1067,7 @@ def _deserialize(cls, data, exist_discriminators): model_meta = getattr(cls, "_xml", {}) prop_meta = getattr(discriminator, "_xml", {}) xml_name = prop_meta.get("name", discriminator._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) if xml_ns: xml_name = "{" + xml_ns + "}" + xml_name @@ -822,6 +1159,14 @@ def _deserialize_multiple_sequence( return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) +def _is_array_encoded_deserializer(deserializer: functools.partial) -> bool: + return ( + isinstance(deserializer, functools.partial) + and isinstance(deserializer.args[0], functools.partial) + and deserializer.args[0].func == _deserialize_array_encoded # pylint: disable=comparison-with-callable + ) + + def _deserialize_sequence( deserializer: typing.Optional[typing.Callable], module: typing.Optional[str], @@ -831,17 +1176,19 @@ def _deserialize_sequence( return obj if isinstance(obj, ET.Element): obj = list(obj) - try: - if ( - isinstance(obj, str) - and isinstance(deserializer, functools.partial) - and isinstance(deserializer.args[0], functools.partial) - and deserializer.args[0].func == _deserialize_array_encoded # pylint: disable=comparison-with-callable - ): - # encoded string may be deserialized to sequence + + # encoded string may be deserialized to sequence + if isinstance(obj, str) and isinstance(deserializer, functools.partial): + # for list[str] + if _is_array_encoded_deserializer(deserializer): return deserializer(obj) - except: # pylint: disable=bare-except - pass + + # for list[Union[...]] + if isinstance(deserializer.args[0], list): + for sub_deserializer in deserializer.args[0]: + if _is_array_encoded_deserializer(sub_deserializer): + return sub_deserializer(obj) + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) @@ -893,6 +1240,8 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur # is it optional? try: if any(a is _NONE_TYPE for a in annotation.__args__): # pyright: ignore + if rf: + rf._is_optional = True if len(annotation.__args__) <= 2: # pyright: ignore if_obj_deserializer = _get_deserialize_callable_from_annotation( next(a for a in annotation.__args__ if a is not _NONE_TYPE), module, rf # pyright: ignore @@ -985,16 +1334,20 @@ def _deserialize_with_callable( return float(value.text) if value.text else None if deserializer is bool: return value.text == "true" if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING.values(): + return deserializer(value.text) if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING_WITHFORMAT.values(): + return deserializer(value.text) if value.text else None if deserializer is None: return value if deserializer in [int, float, bool]: return deserializer(value) if isinstance(deserializer, CaseInsensitiveEnumMeta): try: - return deserializer(value) + return deserializer(value.text if isinstance(value, ET.Element) else value) except ValueError: # for unknown value, return raw value - return value + return value.text if isinstance(value, ET.Element) else value if isinstance(deserializer, type) and issubclass(deserializer, Model): return deserializer._deserialize(value, []) return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) @@ -1027,7 +1380,7 @@ def _failsafe_deserialize( ) -> typing.Any: try: return _deserialize(deserializer, response.json(), module, rf, format) - except DeserializationError: + except Exception: # pylint: disable=broad-except _LOGGER.warning( "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True ) @@ -1040,7 +1393,7 @@ def _failsafe_deserialize_xml( ) -> typing.Any: try: return _deserialize_xml(deserializer, response.text()) - except DeserializationError: + except Exception: # pylint: disable=broad-except _LOGGER.warning( "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True ) @@ -1060,6 +1413,7 @@ def __init__( format: typing.Optional[str] = None, is_multipart_file_input: bool = False, xml: typing.Optional[dict[str, typing.Any]] = None, + deserializer: typing.Optional[typing.Callable] = None, original_tsp_name: typing.Optional[str] = None, ): self._type = type @@ -1068,10 +1422,12 @@ def __init__( self._is_discriminator = is_discriminator self._visibility = visibility self._is_model = False + self._is_optional = False self._default = default self._format = format self._is_multipart_file_input = is_multipart_file_input self._xml = xml if xml is not None else {} + self._deserializer = deserializer self._original_tsp_name = original_tsp_name @property @@ -1092,7 +1448,10 @@ def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin # by this point, type and rest_name will have a value bc we default # them in __new__ of the Model class # Use _data.get() directly to avoid triggering __getitem__ which clears the cache - item = obj._data.get(self._rest_name) + item = obj._data.get(self._rest_name, _UNSET) + if item is _UNSET: + # Field not set by user; return the client default if one exists, otherwise None + return self._default if self._default is not _UNSET else None if item is None: return item if self._is_model: @@ -1105,7 +1464,11 @@ def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin # Return the value from _data directly (it's been deserialized in place) return obj._data.get(self._rest_name) - deserialized = _deserialize(self._type, _serialize(item, self._format), rf=self) + # Fast path: use _deserializer directly (avoids _serialize/_deserialize chain) + if self._deserializer: + deserialized = self._deserializer(item) + else: + deserialized = _deserialize(self._type, _serialize(item, self._format), rf=self) # For mutable types, store the deserialized value back in _data # so mutations directly affect _data @@ -1151,6 +1514,7 @@ def rest_field( format: typing.Optional[str] = None, is_multipart_file_input: bool = False, xml: typing.Optional[dict[str, typing.Any]] = None, + deserializer: typing.Optional[typing.Callable] = None, original_tsp_name: typing.Optional[str] = None, ) -> typing.Any: return _RestField( @@ -1161,6 +1525,7 @@ def rest_field( format=format, is_multipart_file_input=is_multipart_file_input, xml=xml, + deserializer=deserializer, original_tsp_name=original_tsp_name, ) @@ -1186,6 +1551,56 @@ def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore +def _get_xml_ns(meta: dict[str, typing.Any]) -> typing.Optional[str]: + """Return the XML namespace from a metadata dict, checking both 'ns' (old-style) and 'namespace' (DPG) keys. + + :param dict meta: The metadata dictionary to extract namespace from. + :returns: The namespace string if 'ns' or 'namespace' key is present, None otherwise. + :rtype: str or None + """ + ns = meta.get("ns") + if ns is None: + ns = meta.get("namespace") + return ns + + +def _resolve_xml_ns( + prop_meta: dict[str, typing.Any], model_meta: typing.Optional[dict[str, typing.Any]] = None +) -> typing.Optional[str]: + """Resolve XML namespace for a property, falling back to model namespace when appropriate. + + Checks the property metadata first; if no namespace is found and the model does not declare + an explicit prefix, falls back to the model-level namespace. + + :param dict prop_meta: The property metadata dictionary. + :param dict model_meta: The model metadata dictionary, used as fallback. + :returns: The resolved namespace string, or None. + :rtype: str or None + """ + ns = _get_xml_ns(prop_meta) + if ns is None and model_meta is not None and not model_meta.get("prefix"): + ns = _get_xml_ns(model_meta) + return ns + + +def _set_xml_attribute(element: ET.Element, name: str, value: typing.Any, prop_meta: dict[str, typing.Any]) -> None: + """Set an XML attribute on an element, handling namespace prefix registration. + + :param ET.Element element: The element to set the attribute on. + :param str name: The default attribute name (wire name). + :param any value: The attribute value. + :param dict prop_meta: The property metadata dictionary. + """ + xml_name = prop_meta.get("name", name) + _attr_ns = _get_xml_ns(prop_meta) + if _attr_ns: + _attr_prefix = prop_meta.get("prefix") + if _attr_prefix: + _safe_register_namespace(_attr_prefix, _attr_ns) + xml_name = "{" + _attr_ns + "}" + xml_name + element.set(xml_name, _get_primitive_type_value(value)) + + def _get_element( o: typing.Any, exclude_readonly: bool = False, @@ -1197,10 +1612,16 @@ def _get_element( # if prop is a model, then use the prop element directly, else generate a wrapper of model if wrapped_element is None: + # When serializing as an array item (parent_meta is set), check if the parent has an + # explicit itemsName. This ensures correct element names for unwrapped arrays (where + # the element tag is the property/items name, not the model type name). + _items_name = parent_meta.get("itemsName") if parent_meta is not None else None + element_name = _items_name if _items_name else (model_meta.get("name") or o.__class__.__name__) + _model_ns = _get_xml_ns(model_meta) wrapped_element = _create_xml_element( - model_meta.get("name", o.__class__.__name__), + element_name, model_meta.get("prefix"), - model_meta.get("ns"), + _model_ns, ) readonly_props = [] @@ -1222,7 +1643,9 @@ def _get_element( # additional properties will not have rest field, use the wire name as xml name prop_meta = {"name": k} - # if no ns for prop, use model's + # Propagate model namespace to properties only for old-style "ns"-keyed models. + # DPG-generated models use the "namespace" key and explicitly declare namespace on + # each property that needs it, so propagation is intentionally skipped for them. if prop_meta.get("ns") is None and model_meta.get("ns"): prop_meta["ns"] = model_meta.get("ns") prop_meta["prefix"] = model_meta.get("prefix") @@ -1234,12 +1657,7 @@ def _get_element( # text could only set on primitive type wrapped_element.text = _get_primitive_type_value(v) elif prop_meta.get("attribute", False): - xml_name = prop_meta.get("name", k) - if prop_meta.get("ns"): - ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore - xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore - # attribute should be primitive type - wrapped_element.set(xml_name, _get_primitive_type_value(v)) + _set_xml_attribute(wrapped_element, k, v, prop_meta) else: # other wrapped prop element wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) @@ -1248,6 +1666,7 @@ def _get_element( return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore if isinstance(o, dict): result = [] + _dict_ns = _get_xml_ns(parent_meta) if parent_meta else None for k, v in o.items(): result.append( _get_wrapped_element( @@ -1255,7 +1674,7 @@ def _get_element( exclude_readonly, { "name": k, - "ns": parent_meta.get("ns") if parent_meta else None, + "ns": _dict_ns, "prefix": parent_meta.get("prefix") if parent_meta else None, }, ) @@ -1264,13 +1683,16 @@ def _get_element( # primitive case need to create element based on parent_meta if parent_meta: + _items_ns = parent_meta.get("itemsNs") + if _items_ns is None: + _items_ns = _get_xml_ns(parent_meta) return _get_wrapped_element( o, exclude_readonly, { "name": parent_meta.get("itemsName", parent_meta.get("name")), "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), - "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), + "ns": _items_ns, }, ) @@ -1282,8 +1704,9 @@ def _get_wrapped_element( exclude_readonly: bool, meta: typing.Optional[dict[str, typing.Any]], ) -> ET.Element: + _meta_ns = _get_xml_ns(meta) if meta else None wrapped_element = _create_xml_element( - meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None + meta.get("name") if meta else None, meta.get("prefix") if meta else None, _meta_ns ) if isinstance(v, (dict, list)): wrapped_element.extend(_get_element(v, exclude_readonly, meta)) @@ -1304,11 +1727,29 @@ def _get_primitive_type_value(v) -> str: return str(v) +def _safe_register_namespace(prefix: str, ns: str) -> None: + """Register an XML namespace prefix, handling reserved prefix patterns. + + Some prefixes (e.g. 'ns2') match Python's reserved 'ns\\d+' pattern used for + auto-generated prefixes, causing register_namespace to raise ValueError. + Falls back to directly registering in the internal namespace map. + + :param str prefix: The namespace prefix to register. + :param str ns: The namespace URI. + """ + try: + ET.register_namespace(prefix, ns) + except ValueError: + _ns_map = getattr(ET, "_namespace_map", None) + if _ns_map is not None: + _ns_map[ns] = prefix + + def _create_xml_element( tag: typing.Any, prefix: typing.Optional[str] = None, ns: typing.Optional[str] = None ) -> ET.Element: if prefix and ns: - ET.register_namespace(prefix, ns) + _safe_register_namespace(prefix, ns) if ns: return ET.Element("{" + ns + "}" + tag) return ET.Element(tag) @@ -1319,6 +1760,8 @@ def _deserialize_xml( value: str, ) -> typing.Any: element = ET.fromstring(value) # nosec + if _is_model(deserializer): + return deserializer._deserialize(element, []) return _deserialize(deserializer, element) diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_utils/serialization.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_utils/serialization.py index 81ec1de5922b..75906e2eb77f 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_utils/serialization.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_utils/serialization.py @@ -39,11 +39,15 @@ import xml.etree.ElementTree as ET import isodate # type: ignore -from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") JSON = MutableMapping[str, Any] @@ -516,6 +520,10 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "rfc-1123": Serializer.serialize_rfc, "unix-time": Serializer.serialize_unix, "duration": Serializer.serialize_duration, + "duration-seconds-int": Serializer.serialize_duration_seconds_int, + "duration-seconds-float": Serializer.serialize_duration_seconds_float, + "duration-milliseconds-int": Serializer.serialize_duration_milliseconds_int, + "duration-milliseconds-float": Serializer.serialize_duration_milliseconds_float, "date": Serializer.serialize_date, "time": Serializer.serialize_time, "decimal": Serializer.serialize_decimal, @@ -1105,6 +1113,61 @@ def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument attr = isodate.parse_duration(attr) return isodate.duration_isoformat(attr) + @staticmethod + def _serialize_duration_numeric(attr, scale, as_int): + """Serialize a TimeDelta into a numeric value scaled to the wire unit. + + :param TimeDelta attr: Object to be serialized. + :param int scale: Multiplier applied to total seconds (1 for seconds, 1000 for milliseconds). + :param bool as_int: Whether to truncate the result to an int. + :rtype: int or float + :return: serialized duration + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + value = attr.total_seconds() * scale if isinstance(attr, datetime.timedelta) else attr + return int(value) if as_int else float(value) + + @staticmethod + def serialize_duration_seconds_int(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into an integer number of seconds. + + :param TimeDelta attr: Object to be serialized. + :rtype: int + :return: serialized duration + """ + return Serializer._serialize_duration_numeric(attr, 1, True) + + @staticmethod + def serialize_duration_seconds_float(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into a floating point number of seconds. + + :param TimeDelta attr: Object to be serialized. + :rtype: float + :return: serialized duration + """ + return Serializer._serialize_duration_numeric(attr, 1, False) + + @staticmethod + def serialize_duration_milliseconds_int(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into an integer number of milliseconds. + + :param TimeDelta attr: Object to be serialized. + :rtype: int + :return: serialized duration + """ + return Serializer._serialize_duration_numeric(attr, 1000, True) + + @staticmethod + def serialize_duration_milliseconds_float(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into a floating point number of milliseconds. + + :param TimeDelta attr: Object to be serialized. + :rtype: float + :return: serialized duration + """ + return Serializer._serialize_duration_numeric(attr, 1000, False) + @staticmethod def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into RFC-1123 formatted string. @@ -1377,6 +1440,10 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "rfc-1123": Deserializer.deserialize_rfc, "unix-time": Deserializer.deserialize_unix, "duration": Deserializer.deserialize_duration, + "duration-seconds-int": Deserializer.deserialize_duration_seconds, + "duration-seconds-float": Deserializer.deserialize_duration_seconds, + "duration-milliseconds-int": Deserializer.deserialize_duration_milliseconds, + "duration-milliseconds-float": Deserializer.deserialize_duration_milliseconds, "date": Deserializer.deserialize_date, "time": Deserializer.deserialize_time, "decimal": Deserializer.deserialize_decimal, @@ -1389,6 +1456,10 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: } self.deserialize_expected_types = { "duration": (isodate.Duration, datetime.timedelta), + "duration-seconds-int": (isodate.Duration, datetime.timedelta), + "duration-seconds-float": (isodate.Duration, datetime.timedelta), + "duration-milliseconds-int": (isodate.Duration, datetime.timedelta), + "duration-milliseconds-float": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } self.dependencies: dict[str, type] = dict(classes) if classes else {} @@ -1401,7 +1472,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: # Otherwise, result are unexpected self.additional_properties_detection = True - def __call__(self, target_obj, response_data, content_type=None): + def __call__(self, target_obj, response_data, content_type=None): # pylint: disable=too-many-return-statements """Call the deserializer to process a REST response. :param str target_obj: Target data type to deserialize to. @@ -1411,6 +1482,27 @@ def __call__(self, target_obj, response_data, content_type=None): :return: Deserialized object. :rtype: object """ + # Fast path for header deserialization: response_data is a plain str or None + # and target_obj is a simple scalar type. This avoids the expensive + # _unpack_content → _deserialize → _classify_target → deserialize_data chain. + if response_data is None: + return None + if target_obj == "str" and isinstance(response_data, str): + return response_data + if isinstance(response_data, str): + if target_obj == "int": + return int(response_data) + if target_obj == "bool": + if response_data in ("true", "1", "True"): + return True + if response_data in ("false", "0", "False"): + return False + return bool(response_data) + if target_obj == "rfc-1123": + return Deserializer.deserialize_rfc(response_data) + if target_obj == "bytearray": + return Deserializer.deserialize_bytearray(response_data) + data = self._unpack_content(response_data, content_type) return self._deserialize(target_obj, data) @@ -1929,6 +2021,48 @@ def deserialize_duration(attr): raise DeserializationError(msg) from err return duration + @staticmethod + def _deserialize_duration_numeric(attr, unit): + """Deserialize a numeric duration value into a TimeDelta object. + + :param float attr: response value to be deserialized. + :param str unit: The wire unit, used as the ``timedelta`` keyword + (``"seconds"`` or ``"milliseconds"``). + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if value is invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = datetime.timedelta(**{unit: float(attr)}) # type: ignore + except (ValueError, OverflowError, TypeError) as err: + msg = "Cannot deserialize duration object." + raise DeserializationError(msg) from err + return duration + + @staticmethod + def deserialize_duration_seconds(attr): + """Deserialize a numeric number of seconds into a TimeDelta object. + + :param float attr: response value to be deserialized. + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if value is invalid. + """ + return Deserializer._deserialize_duration_numeric(attr, "seconds") + + @staticmethod + def deserialize_duration_milliseconds(attr): + """Deserialize a numeric number of milliseconds into a TimeDelta object. + + :param float attr: response value to be deserialized. + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if value is invalid. + """ + return Deserializer._deserialize_duration_numeric(attr, "milliseconds") + @staticmethod def deserialize_date(attr): """Deserialize ISO-8601 formatted string into Date object. diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_version.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_version.py index 8191bc7f4c53..9fff966d2acd 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_version.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0b2" +VERSION = "6.0.0b3" diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_client.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_client.py index cef7840ce180..4c5bae133b09 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_client.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_client.py @@ -8,8 +8,8 @@ # -------------------------------------------------------------------------- from copy import deepcopy +import sys from typing import Any, Awaitable, TYPE_CHECKING, Union -from typing_extensions import Self from azure.core import AsyncPipelineClient from azure.core.credentials import AzureKeyCredential @@ -20,6 +20,11 @@ from ._configuration import TextAnalysisClientConfiguration from ._operations import _TextAnalysisClientOperationsMixin +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential @@ -39,8 +44,9 @@ class TextAnalysisClient(_TextAnalysisClientOperationsMixin): credential type or a token credential type. Required. :type credential: ~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials_async.AsyncTokenCredential - :keyword api_version: The API version to use for this operation. Default value is - "2025-11-15-preview". Note that overriding this default value may result in unsupported + :keyword api_version: The API version to use for this operation. Known values are + "2026-05-15-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_configuration.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_configuration.py index 66b2f906bd09..793c346328c7 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_configuration.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_configuration.py @@ -30,8 +30,9 @@ class TextAnalysisClientConfiguration: # pylint: disable=too-many-instance-attr credential type or a token credential type. Required. :type credential: ~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials_async.AsyncTokenCredential - :keyword api_version: The API version to use for this operation. Default value is - "2025-11-15-preview". Note that overriding this default value may result in unsupported + :keyword api_version: The API version to use for this operation. Known values are + "2026-05-15-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -39,7 +40,7 @@ class TextAnalysisClientConfiguration: # pylint: disable=too-many-instance-attr def __init__( self, endpoint: str, credential: Union[AzureKeyCredential, "AsyncTokenCredential"], **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2025-11-15-preview") + api_version: str = kwargs.pop("api_version", "2026-05-15-preview") if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_operations/_operations.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_operations/_operations.py index 3c3b0d63f346..3b3bfab4de00 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_operations/_operations.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_operations/_operations.py @@ -29,7 +29,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict -from ... import models as _models +from ... import models as _models, types as _types from ..._operations._operations import ( build_text_analysis_analyze_text_job_request, build_text_analysis_analyze_text_request, @@ -76,12 +76,17 @@ async def analyze_text( @overload async def analyze_text( - self, body: JSON, *, show_stats: Optional[bool] = None, content_type: str = "application/json", **kwargs: Any + self, + body: _types.AnalyzeTextInput, + *, + show_stats: Optional[bool] = None, + content_type: str = "application/json", + **kwargs: Any ) -> _models.AnalyzeTextResult: """Request text analysis over a collection of documents. :param body: The input documents to analyze. Required. - :type body: JSON + :type body: ~azure.ai.textanalytics.types.AnalyzeTextInput :keyword show_stats: (Optional) if set to true, response will contain request and document level statistics. Default value is None. :paramtype show_stats: bool @@ -120,16 +125,17 @@ async def analyze_text( @distributed_trace_async async def analyze_text( self, - body: Union[_models.AnalyzeTextInput, JSON, IO[bytes]], + body: Union[_models.AnalyzeTextInput, _types.AnalyzeTextInput, IO[bytes]], *, show_stats: Optional[bool] = None, **kwargs: Any ) -> _models.AnalyzeTextResult: """Request text analysis over a collection of documents. - :param body: The input documents to analyze. Is one of the following types: AnalyzeTextInput, - JSON, IO[bytes] Required. - :type body: ~azure.ai.textanalytics.models.AnalyzeTextInput or JSON or IO[bytes] + :param body: The input documents to analyze. Is either a AnalyzeTextInput type or a IO[bytes] + type. Required. + :type body: ~azure.ai.textanalytics.models.AnalyzeTextInput or + ~azure.ai.textanalytics.types.AnalyzeTextInput or IO[bytes] :keyword show_stats: (Optional) if set to true, response will contain request and document level statistics. Default value is None. :paramtype show_stats: bool @@ -171,6 +177,7 @@ async def analyze_text( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -192,7 +199,7 @@ async def analyze_text( raise HttpResponseError(response=response, model=error) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.AnalyzeTextResult, response.json()) @@ -259,6 +266,7 @@ async def get_job_status( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -280,7 +288,7 @@ async def get_job_status( raise HttpResponseError(response=response, model=error) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.AnalyzeTextOperationState, response.json()) @@ -291,7 +299,7 @@ async def get_job_status( async def _analyze_text_job_initial( self, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.AnalyzeTextSubmitJobRequest, IO[bytes]] = _Unset, *, text_input: _models.MultiLanguageTextInput = _Unset, actions: list[_models.AnalyzeTextOperationAction] = _Unset, @@ -346,6 +354,7 @@ async def _analyze_text_job_initial( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -368,7 +377,7 @@ async def _analyze_text_job_initial( response_headers = {} response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -412,13 +421,13 @@ async def begin_analyze_text_job( @overload async def begin_analyze_text_job( - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any + self, body: _types.AnalyzeTextSubmitJobRequest, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[None]: """Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. :param body: Required. - :type body: JSON + :type body: ~azure.ai.textanalytics.types.AnalyzeTextSubmitJobRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -447,7 +456,7 @@ async def begin_analyze_text_job( @distributed_trace_async async def begin_analyze_text_job( self, - body: Union[JSON, IO[bytes]] = _Unset, + body: Union[JSON, _types.AnalyzeTextSubmitJobRequest, IO[bytes]] = _Unset, *, text_input: _models.MultiLanguageTextInput = _Unset, actions: list[_models.AnalyzeTextOperationAction] = _Unset, @@ -459,8 +468,9 @@ async def begin_analyze_text_job( """Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] + :param body: Is one of the following types: JSON, AnalyzeTextSubmitJobRequest, IO[bytes] + Required. + :type body: JSON or ~azure.ai.textanalytics.types.AnalyzeTextSubmitJobRequest or IO[bytes] :keyword text_input: Contains the input to be analyzed. Required. :paramtype text_input: ~azure.ai.textanalytics.models.MultiLanguageTextInput :keyword actions: List of tasks to be performed as part of the LRO. Required. @@ -553,6 +563,7 @@ async def _cancel_job_initial(self, job_id: str, **kwargs: Any) -> AsyncIterator } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -575,7 +586,7 @@ async def _cancel_job_initial(self, job_id: str, **kwargs: Any) -> AsyncIterator response_headers = {} response_headers["Operation-Location"] = self._deserialize("str", response.headers.get("Operation-Location")) - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_patch.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_patch.py index 4dff8f288feb..87676c65a8f0 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/aio/_patch.py @@ -7,331 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -# coding: utf-8 -import json -from typing import Any, Callable, Dict, IO, Mapping, Optional, TypeVar, Union, cast, overload, Generic, TYPE_CHECKING -from collections.abc import MutableMapping # pylint:disable=import-error -from azure.core.exceptions import HttpResponseError -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncPollingMethod, AsyncNoPolling -from azure.core.polling.async_base_polling import AsyncLROBasePolling -from azure.core.rest import HttpRequest, AsyncHttpResponse -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.core.credentials import AzureKeyCredential -from azure.core.async_paging import AsyncItemPaged -from ._client import TextAnalysisClient as AnalysisTextClientGenerated -from .. import models as _models -from ..models import AnalyzeTextOperationState, TextActions -from .._utils.serialization import Serializer -from .._patch import _parse_operation_id - -if TYPE_CHECKING: - from azure.core.credentials_async import AsyncTokenCredential - -JSON = MutableMapping[str, Any] -_Unset: Any = object() -T = TypeVar("T") -PollingReturnType_co = TypeVar("PollingReturnType_co", covariant=True) -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -class AnalyzeTextAsyncLROPoller(AsyncLROPoller[PollingReturnType_co], Generic[PollingReturnType_co]): - """Custom **async** poller that returns ``PollingReturnType_co`` and exposes operation metadata.""" - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - self._last_state: Optional[AnalyzeTextOperationState] = None # set by deserializer - - # internal: called by the deserializer to update details() - def _record_state_for_details(self, state: AnalyzeTextOperationState) -> None: - self._last_state = state - - @property - def details(self) -> Mapping[str, Any]: - """Metadata associated with the long-running operation. - - :return: A mapping with keys like ``operation_id`` and, when available, - ``status``, ``job_id``, ``display_name``, ``created_at``, - ``last_updated_at``, ``expires_on``, ``statistics``, - ``errors``, and ``next_link``. - :rtype: Mapping[str, Any] - """ - try: - headers = getattr( - self.polling_method(), "_initial_response" - ).http_response.headers # type: ignore[attr-defined] - op_loc = headers.get("Operation-Location") or headers.get("operation-location") - except (AttributeError, TypeError): - op_loc = None - - info: Dict[str, Any] = {"operation_id": _parse_operation_id(op_loc)} - if self._last_state is not None: - s = self._last_state - info.update( - { - "status": s.status, - "job_id": s.job_id, - "display_name": s.display_name, - "created_at": s.created_at, - "last_updated_at": s.last_updated_at, - "expires_on": s.expires_on, - "statistics": s.statistics, - "errors": s.errors, - "next_link": s.next_link, - } - ) - return info - - @classmethod - def from_continuation_token( - cls, - polling_method: AsyncPollingMethod[PollingReturnType_co], - continuation_token: str, - **kwargs: Any, - ) -> "AnalyzeTextAsyncLROPoller[PollingReturnType_co]": - client, initial_response, deserialization_callback = polling_method.from_continuation_token( - continuation_token, **kwargs - ) - return cls(client, initial_response, deserialization_callback, polling_method) - - -class TextAnalysisClient(AnalysisTextClientGenerated): - """**Async** client for Text Analysis APIs.""" - - def __init__( - self, - endpoint: str, - credential: Union[AzureKeyCredential, "AsyncTokenCredential"], - *, - api_version: Optional[str] = None, - **kwargs: Any, - ) -> None: - """Create a TextAnalysisClient. - - :param endpoint: Supported Cognitive Services endpoint. - :type endpoint: str - :param credential: Key or token credential. - :type credential: ~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.AsyncTokenCredential - :keyword api_version: The API version to use for this operation. Default value is - ``"2025-05-15-preview"``. Note that overriding this default value may result in unsupported - behavior. - :paramtype api_version: str - """ - if api_version is not None: - kwargs["api_version"] = api_version - super().__init__(endpoint=endpoint, credential=credential, **kwargs) - - @overload # type: ignore[override] - async def begin_analyze_text_job( - self, - *, - text_input: _models.MultiLanguageTextInput, - actions: list[_models.AnalyzeTextOperationAction], - content_type: str = "application/json", - display_name: Optional[str] = None, - default_language: Optional[str] = None, - cancel_after: Optional[float] = None, - **kwargs: Any, - ) -> AnalyzeTextAsyncLROPoller[AsyncItemPaged["TextActions"]]: - """Submit a collection of text documents for analysis. Specify one or more unique tasks to be - executed as a long-running operation. - - :keyword text_input: Contains the input to be analyzed. Required. - :paramtype text_input: ~azure.ai.textanalytics.models.MultiLanguageTextInput - :keyword actions: List of tasks to be performed as part of the LRO. Required. - :paramtype actions: list[~azure.ai.textanalytics.models.AnalyzeTextOperationAction] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is ``"application/json"``. - :paramtype content_type: str - :keyword display_name: Name for the task. Default value is ``None``. - :paramtype display_name: str - :keyword default_language: Default language to use for records requesting automatic language - detection. Default value is ``None``. - :paramtype default_language: str - :keyword cancel_after: Optional duration in seconds after which the job will be canceled if not - completed. Default value is ``None``. - :paramtype cancel_after: float - :return: A poller whose ``result()`` yields ``AsyncItemPaged[TextActions]`` and exposes metadata via - ``.details``. - :rtype: ~azure.ai.textanalytics.AnalyzeTextAsyncLROPoller[ - ~azure.core.async_paging.AsyncItemPaged[~azure.ai.textanalytics.models.TextActions]] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_analyze_text_job( # type: ignore[override] - self, body: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> AnalyzeTextAsyncLROPoller[AsyncItemPaged["TextActions"]]: - """Submit a collection of text documents for analysis. Specify one or more unique tasks to be - executed as a long-running operation. - - :param body: Required. - :type body: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is ``"application/json"``. - :paramtype content_type: str - :return: A poller whose ``result()`` yields ``AsyncItemPaged[TextActions]`` and exposes metadata via - ``.details``. - :rtype: ~azure.ai.textanalytics.AnalyzeTextAsyncLROPoller[ - ~azure.core.async_paging.AsyncItemPaged[~azure.ai.textanalytics.models.TextActions]] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_analyze_text_job( # type: ignore[override] - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AnalyzeTextAsyncLROPoller[AsyncItemPaged["TextActions"]]: - """Submit a collection of text documents for analysis. Specify one or more unique tasks to be - executed as a long-running operation. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is ``"application/json"``. - :paramtype content_type: str - :return: A poller whose ``result()`` yields ``AsyncItemPaged[TextActions]`` and exposes metadata via - ``.details``. - :rtype: ~azure.ai.textanalytics.AnalyzeTextAsyncLROPoller[ - ~azure.core.async_paging.AsyncItemPaged[~azure.ai.textanalytics.models.TextActions]] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_analyze_text_job( # type: ignore[override] - self, - body: Union[JSON, IO[bytes]] = _Unset, - *, - text_input: _models.MultiLanguageTextInput = _Unset, - actions: list[_models.AnalyzeTextOperationAction] = _Unset, - display_name: Optional[str] = None, - default_language: Optional[str] = None, - cancel_after: Optional[float] = None, - **kwargs: Any, - ) -> AnalyzeTextAsyncLROPoller[AsyncItemPaged["TextActions"]]: - """Submit a collection of text documents for analysis. Specify one or more unique tasks to be - executed as a long-running operation. - - :param body: Is either a JSON type or a IO[bytes] type. Required. - :type body: JSON or IO[bytes] - :keyword text_input: Contains the input to be analyzed. Required. - :paramtype text_input: ~azure.ai.textanalytics.models.MultiLanguageTextInput - :keyword actions: List of tasks to be performed as part of the LRO. Required. - :paramtype actions: list[~azure.ai.textanalytics.models.AnalyzeTextOperationAction] - :keyword display_name: Name for the task. Default value is ``None``. - :paramtype display_name: str - :keyword default_language: Default language to use for records requesting automatic language - detection. Default value is ``None``. - :paramtype default_language: str - :keyword cancel_after: Optional duration in seconds after which the job will be canceled if not - completed. Default value is ``None``. - :paramtype cancel_after: float - :return: A poller whose ``result()`` yields ``AsyncItemPaged[TextActions]`` and exposes metadata via - ``.details``. - :rtype: ~azure.ai.textanalytics.AnalyzeTextAsyncLROPoller[ - ~azure.core.async_paging.AsyncItemPaged[~azure.ai.textanalytics.models.TextActions]] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - polling: Union[bool, AsyncPollingMethod[AsyncItemPaged["TextActions"]]] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - cls: ClsType[AsyncItemPaged["TextActions"]] = kwargs.pop("cls", None) - kwargs.pop("error_map", None) - - path_format_arguments = { - "Endpoint": self._serialize.url( # type: ignore[attr-defined] - "self._config.endpoint", self._config.endpoint, "str", skip_quote=True - ), - } - - async def _fetch_state_by_next_link(next_link: str) -> AnalyzeTextOperationState: - req = HttpRequest("GET", next_link) - resp = await self._client.send_request(req) # type: ignore[attr-defined] - if resp.status_code != 200: - raise HttpResponseError(response=resp) - data = json.loads(await resp.text()) - return AnalyzeTextOperationState(data) - - def _build_pager_from_state( - state: AnalyzeTextOperationState, - ) -> AsyncItemPaged["TextActions"]: - async def extract_data(s: AnalyzeTextOperationState): - next_link = s.next_link - actions_payload: TextActions = s.actions - return next_link, [actions_payload] - - async def get_next(token: Optional[str]) -> Optional[AnalyzeTextOperationState]: - if token is None: - return state - if not token: - return None - return await _fetch_state_by_next_link(token) - - return AsyncItemPaged(get_next, extract_data) - - poller_holder: Dict[str, AnalyzeTextAsyncLROPoller[AsyncItemPaged["TextActions"]]] = {} - - def get_long_running_output(pipeline_response): - final = pipeline_response.http_response - if final.status_code == 200: - data = json.loads(final.text()) - op_state = AnalyzeTextOperationState(data) - - poller_ref = poller_holder["poller"] - poller_ref._record_state_for_details(op_state) # pylint:disable=protected-access - - paged = _build_pager_from_state(op_state) - return cls(pipeline_response, paged, {}) if cls else paged - raise HttpResponseError(response=final) - - if polling is True: - polling_method: AsyncPollingMethod[AsyncItemPaged["TextActions"]] = cast( - AsyncPollingMethod[AsyncItemPaged["TextActions"]], - AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod[AsyncItemPaged["TextActions"]], AsyncNoPolling()) - else: - polling_method = cast(AsyncPollingMethod[AsyncItemPaged["TextActions"]], polling) - - if cont_token: - return AnalyzeTextAsyncLROPoller[AsyncItemPaged["TextActions"]].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - ) - - initial_kwargs = dict( # pylint:disable=use-dict-literal - text_input=text_input, - actions=actions, - display_name=display_name, - default_language=default_language, - cancel_after=cancel_after, - content_type=content_type, - cls=lambda x, y, z: x, # passthrough raw pipeline response - headers=_headers, - params=_params, - **kwargs, - ) - if body is not _Unset and body is not None: - initial_kwargs["body"] = body - - raw_result = await self._analyze_text_job_initial(**initial_kwargs) - await raw_result.http_response.read() # type: ignore[attr-defined] - - lro: AnalyzeTextAsyncLROPoller[AsyncItemPaged["TextActions"]] = AnalyzeTextAsyncLROPoller( - self._client, raw_result, get_long_running_output, polling_method - ) - poller_holder["poller"] = lro - return lro +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): @@ -341,6 +19,3 @@ def patch_sdk(): you can't accomplish using the techniques described in https://aka.ms/azsdk/python/dpcodegen/python/customize """ - - -__all__ = ["TextAnalysisClient", "AnalyzeTextAsyncLROPoller"] diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/models/_enums.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/models/_enums.py index 0ff1a041455e..1fe7b7764b4d 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/models/_enums.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/models/_enums.py @@ -15,188 +15,188 @@ class AgeUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The Age Unit of measurement.""" UNSPECIFIED = "Unspecified" - """Unspecified time period""" + """Unspecified time period.""" YEAR = "Year" - """Time period of a year""" + """Time period of a year.""" MONTH = "Month" - """Time period of a month""" + """Time period of a month.""" WEEK = "Week" - """Time period of a week""" + """Time period of a week.""" DAY = "Day" - """Time period of a day""" + """Time period of a day.""" class AnalyzeTextErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Human-readable error code.""" INVALID_REQUEST = "InvalidRequest" - """Invalid request error""" + """Invalid request error.""" INVALID_ARGUMENT = "InvalidArgument" - """Invalid argument error""" + """Invalid argument error.""" UNAUTHORIZED = "Unauthorized" - """Unauthorized access error""" + """Unauthorized access error.""" FORBIDDEN = "Forbidden" - """Forbidden access error""" + """Forbidden access error.""" NOT_FOUND = "NotFound" - """Not found error""" + """Not found error.""" PROJECT_NOT_FOUND = "ProjectNotFound" - """Project not found error""" + """Project not found error.""" OPERATION_NOT_FOUND = "OperationNotFound" - """Operation not found error""" + """Operation not found error.""" AZURE_COGNITIVE_SEARCH_NOT_FOUND = "AzureCognitiveSearchNotFound" - """Azure Cognitive Search not found error""" + """Azure Cognitive Search not found error.""" AZURE_COGNITIVE_SEARCH_INDEX_NOT_FOUND = "AzureCognitiveSearchIndexNotFound" - """Azure Cognitive Search index not found error""" + """Azure Cognitive Search index not found error.""" TOO_MANY_REQUESTS = "TooManyRequests" - """Too many requests error""" + """Too many requests error.""" AZURE_COGNITIVE_SEARCH_THROTTLING = "AzureCognitiveSearchThrottling" - """Azure Cognitive Search throttling error""" + """Azure Cognitive Search throttling error.""" AZURE_COGNITIVE_SEARCH_INDEX_LIMIT_REACHED = "AzureCognitiveSearchIndexLimitReached" - """Azure Cognitive Search index limit reached error""" + """Azure Cognitive Search index limit reached error.""" INTERNAL_SERVER_ERROR = "InternalServerError" - """Internal server error""" + """Internal server error.""" SERVICE_UNAVAILABLE = "ServiceUnavailable" - """Service unavailable error""" + """Service unavailable error.""" TIMEOUT = "Timeout" - """Timeout error""" + """Timeout error.""" QUOTA_EXCEEDED = "QuotaExceeded" - """Quota exceeded error""" + """Quota exceeded error.""" CONFLICT = "Conflict" - """Conflict error""" + """Conflict error.""" WARNING = "Warning" - """Warning error""" + """Warning error.""" class AnalyzeTextInputKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The kind of the analyze-text tasks supported.""" SENTIMENT_ANALYSIS = "SentimentAnalysis" - """Sentiment analysis task""" + """Sentiment analysis task.""" ENTITY_RECOGNITION = "EntityRecognition" - """Entity recognition task""" + """Entity recognition task.""" PII_ENTITY_RECOGNITION = "PiiEntityRecognition" - """PII entity recognition task""" + """PII entity recognition task.""" KEY_PHRASE_EXTRACTION = "KeyPhraseExtraction" - """Key phrase extraction task""" + """Key phrase extraction task.""" LANGUAGE_DETECTION = "LanguageDetection" - """Language detection task""" + """Language detection task.""" ENTITY_LINKING = "EntityLinking" - """Entity linking task""" + """Entity linking task.""" class AnalyzeTextOperationActionKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The kind of the long running analyze text tasks supported.""" SENTIMENT_ANALYSIS = "SentimentAnalysis" - """Sentiment analysis task""" + """Sentiment analysis task.""" ENTITY_RECOGNITION = "EntityRecognition" - """Entity recognition task""" + """Entity recognition task.""" PII_ENTITY_RECOGNITION = "PiiEntityRecognition" - """PII entity recognition task""" + """PII entity recognition task.""" KEY_PHRASE_EXTRACTION = "KeyPhraseExtraction" - """Key phrase extraction task""" + """Key phrase extraction task.""" ENTITY_LINKING = "EntityLinking" - """Entity linking task""" + """Entity linking task.""" HEALTHCARE = "Healthcare" - """Healthcare task""" + """Healthcare task.""" CUSTOM_ENTITY_RECOGNITION = "CustomEntityRecognition" - """Custom entity recognition task""" + """Custom entity recognition task.""" CUSTOM_SINGLE_LABEL_CLASSIFICATION = "CustomSingleLabelClassification" - """Custom single label classification task""" + """Custom single label classification task.""" CUSTOM_MULTI_LABEL_CLASSIFICATION = "CustomMultiLabelClassification" - """Custom multi label classification task""" + """Custom multi label classification task.""" EXTRACTIVE_SUMMARIZATION = "ExtractiveSummarization" - """Extractive summarization task""" + """Extractive summarization task.""" ABSTRACTIVE_SUMMARIZATION = "AbstractiveSummarization" - """Abstractive summarization task""" + """Abstractive summarization task.""" class AnalyzeTextOperationResultsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The kind of the response object returned by the analyze-text long running task.""" SENTIMENT_ANALYSIS_OPERATION_RESULTS = "SentimentAnalysisLROResults" - """Sentiment analysis LRO results""" + """Sentiment analysis LRO results.""" ENTITY_RECOGNITION_OPERATION_RESULTS = "EntityRecognitionLROResults" - """Entity recognition LRO results""" + """Entity recognition LRO results.""" PII_ENTITY_RECOGNITION_OPERATION_RESULTS = "PiiEntityRecognitionLROResults" - """PII entity recognition LRO results""" + """PII entity recognition LRO results.""" KEY_PHRASE_EXTRACTION_OPERATION_RESULTS = "KeyPhraseExtractionLROResults" - """Key phrase extraction LRO results""" + """Key phrase extraction LRO results.""" ENTITY_LINKING_OPERATION_RESULTS = "EntityLinkingLROResults" - """Entity linking LRO results""" + """Entity linking LRO results.""" HEALTHCARE_OPERATION_RESULTS = "HealthcareLROResults" - """Healthcare LRO results""" + """Healthcare LRO results.""" CUSTOM_ENTITY_RECOGNITION_OPERATION_RESULTS = "CustomEntityRecognitionLROResults" - """Custom entity recognition LRO results""" + """Custom entity recognition LRO results.""" CUSTOM_SINGLE_LABEL_CLASSIFICATION_OPERATION_RESULTS = "CustomSingleLabelClassificationLROResults" - """Custom single label classification LRO results""" + """Custom single label classification LRO results.""" CUSTOM_MULTI_LABEL_CLASSIFICATION_OPERATION_RESULTS = "CustomMultiLabelClassificationLROResults" - """Custom multi label classification LRO results""" + """Custom multi label classification LRO results.""" EXTRACTIVE_SUMMARIZATION_OPERATION_RESULTS = "ExtractiveSummarizationLROResults" - """Extractive summarization LRO results""" + """Extractive summarization LRO results.""" ABSTRACTIVE_SUMMARIZATION_OPERATION_RESULTS = "AbstractiveSummarizationLROResults" - """Abstractive summarization LRO results""" + """Abstractive summarization LRO results.""" class AnalyzeTextResultsKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The kind of the response object returned by the analyze-text task.""" SENTIMENT_ANALYSIS_RESULTS = "SentimentAnalysisResults" - """Sentiment analysis results""" + """Sentiment analysis results.""" ENTITY_RECOGNITION_RESULTS = "EntityRecognitionResults" - """Entity recognition results""" + """Entity recognition results.""" PII_ENTITY_RECOGNITION_RESULTS = "PiiEntityRecognitionResults" - """PII entity recognition results""" + """PII entity recognition results.""" KEY_PHRASE_EXTRACTION_RESULTS = "KeyPhraseExtractionResults" - """Key phrase extraction results""" + """Key phrase extraction results.""" LANGUAGE_DETECTION_RESULTS = "LanguageDetectionResults" - """Language detection results""" + """Language detection results.""" ENTITY_LINKING_RESULTS = "EntityLinkingResults" - """Entity linking results""" + """Entity linking results.""" class AreaUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The area unit of measurement.""" UNSPECIFIED = "Unspecified" - """Unspecified area unit""" + """Unspecified area unit.""" SQUARE_KILOMETER = "SquareKilometer" - """Area unit in square kilometers""" + """Area unit in square kilometers.""" SQUARE_HECTOMETER = "SquareHectometer" - """Area unit in square hectometers""" + """Area unit in square hectometers.""" SQUARE_DECAMETER = "SquareDecameter" - """Area unit in square decameters""" + """Area unit in square decameters.""" SQUARE_DECIMETER = "SquareDecimeter" - """Area unit in square decimeters""" + """Area unit in square decimeters.""" SQUARE_METER = "SquareMeter" - """Area unit in square meters""" + """Area unit in square meters.""" SQUARE_CENTIMETER = "SquareCentimeter" - """Area unit in square centimeters""" + """Area unit in square centimeters.""" SQUARE_MILLIMETER = "SquareMillimeter" - """Area unit in square millimeters""" + """Area unit in square millimeters.""" SQUARE_INCH = "SquareInch" - """Area unit in square inches""" + """Area unit in square inches.""" SQUARE_FOOT = "SquareFoot" - """Area unit in square feet""" + """Area unit in square feet.""" SQUARE_MILE = "SquareMile" - """Area unit in square miles""" + """Area unit in square miles.""" SQUARE_YARD = "SquareYard" - """Area unit in square yards""" + """Area unit in square yards.""" ACRE = "Acre" - """Area unit in acres""" + """Area unit in acres.""" class DocumentSentiment(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).""" POSITIVE = "positive" - """Positive statement""" + """Positive statement.""" NEUTRAL = "neutral" - """Neutral statement""" + """Neutral statement.""" NEGATIVE = "negative" - """Negative statement""" + """Negative statement.""" MIXED = "mixed" - """Mixed statement""" + """Mixed statement.""" class EntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -212,9 +212,9 @@ class EntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): CURRENCY = "Currency" """Currency-related values.""" NUMBER = "Number" - """Numbers without a unit""" + """Numbers without a unit.""" NUMBER_RANGE = "NumberRange" - """Range of Numbers""" + """Range of Numbers.""" PERCENTAGE = "Percentage" """Percentage-related values.""" ORDINAL = "Ordinal" @@ -222,7 +222,7 @@ class EntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): TEMPERATURE = "Temperature" """Temperature-related values.""" DIMENSION = "Dimension" - """Dimension of measurements""" + """Dimension of measurements.""" LENGTH = "Length" """Length of an object.""" WEIGHT = "Weight" @@ -327,216 +327,216 @@ class ExtractiveSummarizationSortingCriteria(str, Enum, metaclass=CaseInsensitiv class FhirVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The FHIR Spec version.""" - ENUM_4_0_1 = "4.0.1" - """Version 4.0.1""" + ENUM4_0_1 = "4.0.1" + """Version 4.0.1.""" class HealthcareAssertionAssociation(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes if the entity is the subject of the text or if it describes someone else.""" SUBJECT = "subject" - """Subject association""" + """Subject association.""" OTHER = "other" - """Other association""" + """Other association.""" class HealthcareAssertionCertainty(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes the entities certainty and polarity.""" POSITIVE = "positive" - """Positive certainty""" + """Positive certainty.""" POSITIVE_POSSIBLE = "positivePossible" - """Possibly positive certainty""" + """Possibly positive certainty.""" NEUTRAL_POSSIBLE = "neutralPossible" - """Possibly neutral certainty""" + """Possibly neutral certainty.""" NEGATIVE_POSSIBLE = "negativePossible" - """Possibly negative certainty""" + """Possibly negative certainty.""" NEGATIVE = "negative" - """Negative certainty""" + """Negative certainty.""" class HealthcareAssertionConditionality(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes any conditionality on the entity.""" HYPOTHETICAL = "hypothetical" - """Hypothetical conditionality""" + """Hypothetical conditionality.""" CONDITIONAL = "conditional" - """Conditional conditionality""" + """Conditional conditionality.""" class HealthcareAssertionTemporality(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes temporal information regarding the entity.""" CURRENT = "current" - """Current temporality""" + """Current temporality.""" PAST = "past" - """Past temporality""" + """Past temporality.""" FUTURE = "future" - """Future temporality""" + """Future temporality.""" class HealthcareDocumentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Document type.""" NONE = "None" - """None document type""" + """None document type.""" CLINICAL_TRIAL = "ClinicalTrial" - """Clinical trial document type""" + """Clinical trial document type.""" DISCHARGE_SUMMARY = "DischargeSummary" - """Discharge summary document type""" + """Discharge summary document type.""" PROGRESS_NOTE = "ProgressNote" - """Progress note document type""" + """Progress note document type.""" HISTORY_AND_PHYSICAL = "HistoryAndPhysical" - """History and physical document type""" + """History and physical document type.""" CONSULT = "Consult" - """Consult document type""" + """Consult document type.""" IMAGING = "Imaging" - """Imaging document type""" + """Imaging document type.""" PATHOLOGY = "Pathology" - """Pathology document type""" + """Pathology document type.""" PROCEDURE_NOTE = "ProcedureNote" - """Procedure note document type""" + """Procedure note document type.""" class HealthcareEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Healthcare Entity Category.""" BODY_STRUCTURE = "BodyStructure" - """Body structure""" + """Body structure.""" AGE = "Age" - """Age""" + """Age.""" GENDER = "Gender" - """Gender""" + """Gender.""" EXAMINATION_NAME = "ExaminationName" - """Examination name""" + """Examination name.""" DATE = "Date" - """Date""" + """Date.""" DIRECTION = "Direction" - """Direction""" + """Direction.""" FREQUENCY = "Frequency" - """Frequency""" + """Frequency.""" MEASUREMENT_VALUE = "MeasurementValue" - """Measurement value""" + """Measurement value.""" MEASUREMENT_UNIT = "MeasurementUnit" - """Measurement unit""" + """Measurement unit.""" RELATIONAL_OPERATOR = "RelationalOperator" - """Relational operator""" + """Relational operator.""" TIME = "Time" - """Time""" + """Time.""" GENE_OR_PROTEIN = "GeneOrProtein" - """Gene or protein""" + """Gene or protein.""" VARIANT = "Variant" - """Variant""" + """Variant.""" ADMINISTRATIVE_EVENT = "AdministrativeEvent" - """Administrative event""" + """Administrative event.""" CARE_ENVIRONMENT = "CareEnvironment" - """Care environment""" + """Care environment.""" HEALTHCARE_PROFESSION = "HealthcareProfession" - """Healthcare profession""" + """Healthcare profession.""" DIAGNOSIS = "Diagnosis" - """Diagnosis""" + """Diagnosis.""" SYMPTOM_OR_SIGN = "SymptomOrSign" - """Symptom or sign""" + """Symptom or sign.""" CONDITION_QUALIFIER = "ConditionQualifier" - """Condition qualifier""" + """Condition qualifier.""" MEDICATION_CLASS = "MedicationClass" - """Medication class""" + """Medication class.""" MEDICATION_NAME = "MedicationName" - """Medication name""" + """Medication name.""" DOSAGE = "Dosage" - """Dosage""" + """Dosage.""" MEDICATION_FORM = "MedicationForm" - """Medication form""" + """Medication form.""" MEDICATION_ROUTE = "MedicationRoute" - """Medication route""" + """Medication route.""" FAMILY_RELATION = "FamilyRelation" - """Family relation""" + """Family relation.""" TREATMENT_NAME = "TreatmentName" - """Treatment name""" + """Treatment name.""" ETHNICITY = "Ethnicity" - """Ethnicity""" + """Ethnicity.""" COURSE = "Course" - """Course""" + """Course.""" EXPRESSION = "Expression" - """Expression""" + """Expression.""" MUTATION_TYPE = "MutationType" - """Mutation type""" + """Mutation type.""" CONDITION_SCALE = "ConditionScale" - """Condition scale""" + """Condition scale.""" ALLERGEN = "Allergen" - """Allergen""" + """Allergen.""" EMPLOYMENT = "Employment" - """Employment""" + """Employment.""" LIVING_STATUS = "LivingStatus" - """Living status""" + """Living status.""" SUBSTANCE_USE = "SubstanceUse" - """Substance use""" + """Substance use.""" SUBSTANCE_USE_AMOUNT = "SubstanceUseAmount" - """Substance use amount""" + """Substance use amount.""" class InformationUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The information (data) Unit of measurement.""" UNSPECIFIED = "Unspecified" - """Unspecified data size unit""" + """Unspecified data size unit.""" BIT = "Bit" - """Data size unit in bits""" + """Data size unit in bits.""" KILOBIT = "Kilobit" - """Data size unit in kilobits""" + """Data size unit in kilobits.""" MEGABIT = "Megabit" - """Data size unit in megabits""" + """Data size unit in megabits.""" GIGABIT = "Gigabit" - """Data size unit in gigabits""" + """Data size unit in gigabits.""" TERABIT = "Terabit" - """Data size unit in terabits""" + """Data size unit in terabits.""" PETABIT = "Petabit" - """Data size unit in petabits""" + """Data size unit in petabits.""" BYTE = "Byte" - """Data size unit in bytes""" + """Data size unit in bytes.""" KILOBYTE = "Kilobyte" - """Data size unit in kilobytes""" + """Data size unit in kilobytes.""" MEGABYTE = "Megabyte" - """Data size unit in megabytes""" + """Data size unit in megabytes.""" GIGABYTE = "Gigabyte" - """Data size unit in gigabytes""" + """Data size unit in gigabytes.""" TERABYTE = "Terabyte" - """Data size unit in terabytes""" + """Data size unit in terabytes.""" PETABYTE = "Petabyte" - """Data size unit in petabytes""" + """Data size unit in petabytes.""" class InnerErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Human-readable error code.""" INVALID_REQUEST = "InvalidRequest" - """Invalid request error""" + """Invalid request error.""" INVALID_PARAMETER_VALUE = "InvalidParameterValue" - """Invalid parameter value error""" + """Invalid parameter value error.""" KNOWLEDGE_BASE_NOT_FOUND = "KnowledgeBaseNotFound" - """Knowledge base not found error""" + """Knowledge base not found error.""" AZURE_COGNITIVE_SEARCH_NOT_FOUND = "AzureCognitiveSearchNotFound" - """Azure Cognitive Search not found error""" + """Azure Cognitive Search not found error.""" AZURE_COGNITIVE_SEARCH_THROTTLING = "AzureCognitiveSearchThrottling" - """Azure Cognitive Search throttling error""" + """Azure Cognitive Search throttling error.""" EXTRACTION_FAILURE = "ExtractionFailure" - """Extraction failure error""" + """Extraction failure error.""" INVALID_REQUEST_BODY_FORMAT = "InvalidRequestBodyFormat" - """Invalid request body format error""" + """Invalid request body format error.""" EMPTY_REQUEST = "EmptyRequest" - """Empty request error""" + """Empty request error.""" MISSING_INPUT_DOCUMENTS = "MissingInputDocuments" - """Missing input documents error""" + """Missing input documents error.""" INVALID_DOCUMENT = "InvalidDocument" - """Invalid document error""" + """Invalid document error.""" MODEL_VERSION_INCORRECT = "ModelVersionIncorrect" - """Model version incorrect error""" + """Model version incorrect error.""" INVALID_DOCUMENT_BATCH = "InvalidDocumentBatch" - """Invalid document batch error""" + """Invalid document batch error.""" UNSUPPORTED_LANGUAGE_CODE = "UnsupportedLanguageCode" - """Unsupported language code error""" + """Unsupported language code error.""" INVALID_COUNTRY_HINT = "InvalidCountryHint" - """Invalid country hint error""" + """Invalid country hint error.""" class LengthUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -623,817 +623,817 @@ class NumberKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the extracted number entity.""" INTEGER = "Integer" - """Integer number""" + """Integer number.""" DECIMAL = "Decimal" - """Decimal number""" + """Decimal number.""" POWER = "Power" - """Power number""" + """Power number.""" FRACTION = "Fraction" - """Fraction number""" + """Fraction number.""" PERCENT = "Percent" - """Percent number""" + """Percent number.""" UNSPECIFIED = "Unspecified" - """Unspecified number kind""" + """Unspecified number kind.""" class PiiCategoriesExclude(str, Enum, metaclass=CaseInsensitiveEnumMeta): """(Optional) describes the PII categories to return.""" ABA_ROUTING_NUMBER = "ABARoutingNumber" - """ABA Routing number""" + """ABA Routing number.""" AR_NATIONAL_IDENTITY_NUMBER = "ARNationalIdentityNumber" - """AR National Identity Number""" + """AR National Identity Number.""" AU_BANK_ACCOUNT_NUMBER = "AUBankAccountNumber" - """AT Bank Account Number""" + """AT Bank Account Number.""" AU_DRIVERS_LICENSE_NUMBER = "AUDriversLicenseNumber" - """AU Driver's License Number""" + """AU Driver's License Number.""" AU_MEDICAL_ACCOUNT_NUMBER = "AUMedicalAccountNumber" - """AU Medical Account Number""" + """AU Medical Account Number.""" AU_PASSPORT_NUMBER = "AUPassportNumber" - """AU Passport Number""" + """AU Passport Number.""" AU_TAX_FILE_NUMBER = "AUTaxFileNumber" - """AU Tax File Number""" + """AU Tax File Number.""" AU_BUSINESS_NUMBER = "AUBusinessNumber" - """AU Business Number""" + """AU Business Number.""" AU_COMPANY_NUMBER = "AUCompanyNumber" - """AU Company Number""" + """AU Company Number.""" AT_IDENTITY_CARD = "ATIdentityCard" - """AT Identity Card""" + """AT Identity Card.""" AT_TAX_IDENTIFICATION_NUMBER = "ATTaxIdentificationNumber" - """AT Tax Identification Number""" + """AT Tax Identification Number.""" AT_VALUE_ADDED_TAX_NUMBER = "ATValueAddedTaxNumber" - """AT Value Added Tax Number""" + """AT Value Added Tax Number.""" AZURE_DOCUMENT_DBAUTH_KEY = "AzureDocumentDBAuthKey" - """Azure Document DB Auth Key""" + """Azure Document DB Auth Key.""" AZURE_IAAS_DATABASE_CONNECTION_AND_SQL_STRING = "AzureIAASDatabaseConnectionAndSQLString" - """Azure IAAS Database Connection And SQL String""" + """Azure IAAS Database Connection And SQL String.""" AZURE_IO_T_CONNECTION_STRING = "AzureIoTConnectionString" - """Azure IoT Connection String""" + """Azure IoT Connection String.""" AZURE_PUBLISH_SETTING_PASSWORD = "AzurePublishSettingPassword" - """Azure Publish Setting Password""" + """Azure Publish Setting Password.""" AZURE_REDIS_CACHE_STRING = "AzureRedisCacheString" - """Azure Redis Cache String""" + """Azure Redis Cache String.""" AZURE_SAS = "AzureSAS" - """Azure SAS""" + """Azure SAS.""" AZURE_SERVICE_BUS_STRING = "AzureServiceBusString" - """Azure Service Bus String""" + """Azure Service Bus String.""" AZURE_STORAGE_ACCOUNT_KEY = "AzureStorageAccountKey" - """Azure Storage Account Key""" + """Azure Storage Account Key.""" AZURE_STORAGE_ACCOUNT_GENERIC = "AzureStorageAccountGeneric" - """Azure Storage Account Generic""" + """Azure Storage Account Generic.""" BE_NATIONAL_NUMBER = "BENationalNumber" - """BE National Number""" + """BE National Number.""" BE_NATIONAL_NUMBER_V2 = "BENationalNumberV2" - """BE National Number V2""" + """BE National Number V2.""" BE_VALUE_ADDED_TAX_NUMBER = "BEValueAddedTaxNumber" - """BE Value Added Tax Number""" + """BE Value Added Tax Number.""" BR_CPF_NUMBER = "BRCPFNumber" - """BR CPF Number""" + """BR CPF Number.""" BR_LEGAL_ENTITY_NUMBER = "BRLegalEntityNumber" - """BR Legal Entity Number""" + """BR Legal Entity Number.""" BR_NATIONAL_ID_RG = "BRNationalIDRG" - """BR National ID RG""" + """BR National ID RG.""" BG_UNIFORM_CIVIL_NUMBER = "BGUniformCivilNumber" - """BG Uniform Civil Number""" + """BG Uniform Civil Number.""" CA_BANK_ACCOUNT_NUMBER = "CABankAccountNumber" - """CA Bank Account Number""" + """CA Bank Account Number.""" CA_DRIVERS_LICENSE_NUMBER = "CADriversLicenseNumber" - """CA Driver's License Number""" + """CA Driver's License Number.""" CA_HEALTH_SERVICE_NUMBER = "CAHealthServiceNumber" - """CA Health Service Number""" + """CA Health Service Number.""" CA_PASSPORT_NUMBER = "CAPassportNumber" - """CA Passport Number""" + """CA Passport Number.""" CA_PERSONAL_HEALTH_IDENTIFICATION = "CAPersonalHealthIdentification" - """CA Personal Health Identification""" + """CA Personal Health Identification.""" CA_SOCIAL_INSURANCE_NUMBER = "CASocialInsuranceNumber" - """CA Social Insurance Number""" + """CA Social Insurance Number.""" CL_IDENTITY_CARD_NUMBER = "CLIdentityCardNumber" - """CL Identity Card Number""" + """CL Identity Card Number.""" CN_RESIDENT_IDENTITY_CARD_NUMBER = "CNResidentIdentityCardNumber" - """CN Resident Identity Card Number""" + """CN Resident Identity Card Number.""" CREDIT_CARD_NUMBER = "CreditCardNumber" - """Credit Card Number""" + """Credit Card Number.""" HR_IDENTITY_CARD_NUMBER = "HRIdentityCardNumber" - """HR Identity Card Number""" + """HR Identity Card Number.""" HR_NATIONAL_ID_NUMBER = "HRNationalIDNumber" - """HR National ID Number""" + """HR National ID Number.""" HR_PERSONAL_IDENTIFICATION_NUMBER = "HRPersonalIdentificationNumber" - """HR Personal Identification Number""" + """HR Personal Identification Number.""" HR_PERSONAL_IDENTIFICATION_OIB_NUMBER_V2 = "HRPersonalIdentificationOIBNumberV2" - """HR Personal Identification OIB Number V2""" + """HR Personal Identification OIB Number V2.""" CY_IDENTITY_CARD = "CYIdentityCard" - """CY Identity Card""" + """CY Identity Card.""" CY_TAX_IDENTIFICATION_NUMBER = "CYTaxIdentificationNumber" - """CY Tax Identification Number""" + """CY Tax Identification Number.""" CZ_PERSONAL_IDENTITY_NUMBER = "CZPersonalIdentityNumber" - """CZ Personal Identity Number""" + """CZ Personal Identity Number.""" CZ_PERSONAL_IDENTITY_V2 = "CZPersonalIdentityV2" - """CZ Personal Identity V2""" + """CZ Personal Identity V2.""" DK_PERSONAL_IDENTIFICATION_NUMBER = "DKPersonalIdentificationNumber" - """DK Personal Identification Number""" + """DK Personal Identification Number.""" DK_PERSONAL_IDENTIFICATION_V2 = "DKPersonalIdentificationV2" - """DK Personal Identification V2""" + """DK Personal Identification V2.""" DRUG_ENFORCEMENT_AGENCY_NUMBER = "DrugEnforcementAgencyNumber" - """Drug Enforcement Agency Number""" + """Drug Enforcement Agency Number.""" EE_PERSONAL_IDENTIFICATION_CODE = "EEPersonalIdentificationCode" - """EE Personal Identification Code""" + """EE Personal Identification Code.""" EU_DEBIT_CARD_NUMBER = "EUDebitCardNumber" - """EU Debit Card Number""" + """EU Debit Card Number.""" EU_DRIVERS_LICENSE_NUMBER = "EUDriversLicenseNumber" - """EU Driver's License Number""" + """EU Driver's License Number.""" EU_GPS_COORDINATES = "EUGPSCoordinates" - """EU GPS Coordinates""" + """EU GPS Coordinates.""" EU_NATIONAL_IDENTIFICATION_NUMBER = "EUNationalIdentificationNumber" - """EU National Identification Number""" + """EU National Identification Number.""" EU_PASSPORT_NUMBER = "EUPassportNumber" - """EU Passport Number""" + """EU Passport Number.""" EU_SOCIAL_SECURITY_NUMBER = "EUSocialSecurityNumber" - """EU Social Security Number""" + """EU Social Security Number.""" EU_TAX_IDENTIFICATION_NUMBER = "EUTaxIdentificationNumber" - """EU Tax Identification Number""" + """EU Tax Identification Number.""" FI_EUROPEAN_HEALTH_NUMBER = "FIEuropeanHealthNumber" - """FI European Health Number""" + """FI European Health Number.""" FI_NATIONAL_ID = "FINationalID" - """FI National ID""" + """FI National ID.""" FI_NATIONAL_ID_V2 = "FINationalIDV2" - """FI National ID V2""" + """FI National ID V2.""" FI_PASSPORT_NUMBER = "FIPassportNumber" - """FI Passport Number""" + """FI Passport Number.""" FR_DRIVERS_LICENSE_NUMBER = "FRDriversLicenseNumber" - """FR Driver's License Number""" + """FR Driver's License Number.""" FR_HEALTH_INSURANCE_NUMBER = "FRHealthInsuranceNumber" - """FR Health Insurance Number""" + """FR Health Insurance Number.""" FR_NATIONAL_ID = "FRNationalID" - """FR National ID""" + """FR National ID.""" FR_PASSPORT_NUMBER = "FRPassportNumber" - """FR Passport Number""" + """FR Passport Number.""" FR_SOCIAL_SECURITY_NUMBER = "FRSocialSecurityNumber" - """FR Social Security Number""" + """FR Social Security Number.""" FR_TAX_IDENTIFICATION_NUMBER = "FRTaxIdentificationNumber" - """FR Tax Identification Number""" + """FR Tax Identification Number.""" FR_VALUE_ADDED_TAX_NUMBER = "FRValueAddedTaxNumber" - """FR Value Added Tax Number""" + """FR Value Added Tax Number.""" DE_DRIVERS_LICENSE_NUMBER = "DEDriversLicenseNumber" - """DE Driver's License Number""" + """DE Driver's License Number.""" DE_PASSPORT_NUMBER = "DEPassportNumber" - """DE Passport Number""" + """DE Passport Number.""" DE_IDENTITY_CARD_NUMBER = "DEIdentityCardNumber" - """DE Identity Card Number""" + """DE Identity Card Number.""" DE_TAX_IDENTIFICATION_NUMBER = "DETaxIdentificationNumber" - """DE Tax Identification Number""" + """DE Tax Identification Number.""" DE_VALUE_ADDED_NUMBER = "DEValueAddedNumber" - """DE Value Added Number""" + """DE Value Added Number.""" GR_NATIONAL_ID_CARD = "GRNationalIDCard" - """GR National ID Card""" + """GR National ID Card.""" GR_NATIONAL_ID_V2 = "GRNationalIDV2" - """GR National ID V2""" + """GR National ID V2.""" GR_TAX_IDENTIFICATION_NUMBER = "GRTaxIdentificationNumber" - """GR Tax Identification Number""" + """GR Tax Identification Number.""" HK_IDENTITY_CARD_NUMBER = "HKIdentityCardNumber" - """HK Identity Card Number""" + """HK Identity Card Number.""" HU_VALUE_ADDED_NUMBER = "HUValueAddedNumber" - """HU Value Added Number""" + """HU Value Added Number.""" HU_PERSONAL_IDENTIFICATION_NUMBER = "HUPersonalIdentificationNumber" - """HU Personal Identification Number""" + """HU Personal Identification Number.""" HU_TAX_IDENTIFICATION_NUMBER = "HUTaxIdentificationNumber" - """HU Tax Identification Number""" + """HU Tax Identification Number.""" IN_PERMANENT_ACCOUNT = "INPermanentAccount" - """IN Permanent Account""" + """IN Permanent Account.""" IN_UNIQUE_IDENTIFICATION_NUMBER = "INUniqueIdentificationNumber" - """IN Unique Identification Number""" + """IN Unique Identification Number.""" ID_IDENTITY_CARD_NUMBER = "IDIdentityCardNumber" - """ID Identity Card Number""" + """ID Identity Card Number.""" INTERNATIONAL_BANKING_ACCOUNT_NUMBER = "InternationalBankingAccountNumber" - """International Banking Account Number""" + """International Banking Account Number.""" IE_PERSONAL_PUBLIC_SERVICE_NUMBER = "IEPersonalPublicServiceNumber" - """IE Personal Public Service Number""" + """IE Personal Public Service Number.""" IE_PERSONAL_PUBLIC_SERVICE_NUMBER_V2 = "IEPersonalPublicServiceNumberV2" - """IE Personal Public Service Number V2""" + """IE Personal Public Service Number V2.""" IL_BANK_ACCOUNT_NUMBER = "ILBankAccountNumber" - """IL Bank Account Number""" + """IL Bank Account Number.""" IL_NATIONAL_ID = "ILNationalID" - """IL National ID""" + """IL National ID.""" IT_DRIVERS_LICENSE_NUMBER = "ITDriversLicenseNumber" - """IT Driver's License Number""" + """IT Driver's License Number.""" IT_FISCAL_CODE = "ITFiscalCode" - """IT Fiscal Code""" + """IT Fiscal Code.""" IT_VALUE_ADDED_TAX_NUMBER = "ITValueAddedTaxNumber" - """IT Value Added Tax Number""" + """IT Value Added Tax Number.""" JP_BANK_ACCOUNT_NUMBER = "JPBankAccountNumber" - """JP Bank Account Number""" + """JP Bank Account Number.""" JP_DRIVERS_LICENSE_NUMBER = "JPDriversLicenseNumber" - """JP Driver's License Number""" + """JP Driver's License Number.""" JP_PASSPORT_NUMBER = "JPPassportNumber" - """JP Passport Number""" + """JP Passport Number.""" JP_RESIDENT_REGISTRATION_NUMBER = "JPResidentRegistrationNumber" - """JP Resident Registration Number""" + """JP Resident Registration Number.""" JP_SOCIAL_INSURANCE_NUMBER = "JPSocialInsuranceNumber" - """JP Social Insurance Number""" + """JP Social Insurance Number.""" JP_MY_NUMBER_CORPORATE = "JPMyNumberCorporate" - """JP My Number Corporate""" + """JP My Number Corporate.""" JP_MY_NUMBER_PERSONAL = "JPMyNumberPersonal" - """JP My Number Personal""" + """JP My Number Personal.""" JP_RESIDENCE_CARD_NUMBER = "JPResidenceCardNumber" - """JP Residence Card Number""" + """JP Residence Card Number.""" LV_PERSONAL_CODE = "LVPersonalCode" - """LV Personal Code""" + """LV Personal Code.""" LT_PERSONAL_CODE = "LTPersonalCode" - """LT Personal Code""" + """LT Personal Code.""" LU_NATIONAL_IDENTIFICATION_NUMBER_NATURAL = "LUNationalIdentificationNumberNatural" - """LU National Identification Number Natural""" + """LU National Identification Number Natural.""" LU_NATIONAL_IDENTIFICATION_NUMBER_NON_NATURAL = "LUNationalIdentificationNumberNonNatural" - """LU National Identification Number Non Natural""" + """LU National Identification Number Non Natural.""" MY_IDENTITY_CARD_NUMBER = "MYIdentityCardNumber" - """MY Identity Card Number""" + """MY Identity Card Number.""" MT_IDENTITY_CARD_NUMBER = "MTIdentityCardNumber" - """MT Identity Card Number""" + """MT Identity Card Number.""" MT_TAX_ID_NUMBER = "MTTaxIDNumber" - """MT Tax ID Number""" + """MT Tax ID Number.""" NL_CITIZENS_SERVICE_NUMBER = "NLCitizensServiceNumber" - """NL Citizens Service Number""" + """NL Citizens Service Number.""" NL_CITIZENS_SERVICE_NUMBER_V2 = "NLCitizensServiceNumberV2" - """NL Citizens Service Number V2""" + """NL Citizens Service Number V2.""" NL_TAX_IDENTIFICATION_NUMBER = "NLTaxIdentificationNumber" - """NL Tax Identification Number""" + """NL Tax Identification Number.""" NL_VALUE_ADDED_TAX_NUMBER = "NLValueAddedTaxNumber" - """NL Value Added Tax Number""" + """NL Value Added Tax Number.""" NZ_BANK_ACCOUNT_NUMBER = "NZBankAccountNumber" - """NZ Bank Account Number""" + """NZ Bank Account Number.""" NZ_DRIVERS_LICENSE_NUMBER = "NZDriversLicenseNumber" - """NZ Driver's License Number""" + """NZ Driver's License Number.""" NZ_INLAND_REVENUE_NUMBER = "NZInlandRevenueNumber" - """NZ Inland Revenue Number""" + """NZ Inland Revenue Number.""" NZ_MINISTRY_OF_HEALTH_NUMBER = "NZMinistryOfHealthNumber" - """NZ Ministry Of Health Number""" + """NZ Ministry Of Health Number.""" NZ_SOCIAL_WELFARE_NUMBER = "NZSocialWelfareNumber" - """NZ Social Welfare Number""" + """NZ Social Welfare Number.""" NO_IDENTITY_NUMBER = "NOIdentityNumber" - """NO Identity Number""" + """NO Identity Number.""" PH_UNIFIED_MULTI_PURPOSE_ID_NUMBER = "PHUnifiedMultiPurposeIDNumber" - """PH Unified Multi Purpose ID Number""" + """PH Unified Multi Purpose ID Number.""" PL_IDENTITY_CARD = "PLIdentityCard" - """PL Identity Card""" + """PL Identity Card.""" PL_NATIONAL_ID = "PLNationalID" - """PL National ID""" + """PL National ID.""" PL_NATIONAL_ID_V2 = "PLNationalIDV2" - """PL National ID V2""" + """PL National ID V2.""" PL_PASSPORT_NUMBER = "PLPassportNumber" - """PL Passport Number""" + """PL Passport Number.""" PL_TAX_IDENTIFICATION_NUMBER = "PLTaxIdentificationNumber" - """PL Tax Identification Number""" + """PL Tax Identification Number.""" PL_REGON_NUMBER = "PLREGONNumber" - """PL REGON Number""" + """PL REGON Number.""" PT_CITIZEN_CARD_NUMBER = "PTCitizenCardNumber" - """PT Citizen Card Number""" + """PT Citizen Card Number.""" PT_CITIZEN_CARD_NUMBER_V2 = "PTCitizenCardNumberV2" - """PT Citizen Card Number V2""" + """PT Citizen Card Number V2.""" PT_TAX_IDENTIFICATION_NUMBER = "PTTaxIdentificationNumber" - """PT Tax Identification Number""" + """PT Tax Identification Number.""" RO_PERSONAL_NUMERICAL_CODE = "ROPersonalNumericalCode" - """RO Personal Numerical Code""" + """RO Personal Numerical Code.""" RU_PASSPORT_NUMBER_DOMESTIC = "RUPassportNumberDomestic" - """RU Passport Number Domestic""" + """RU Passport Number Domestic.""" RU_PASSPORT_NUMBER_INTERNATIONAL = "RUPassportNumberInternational" - """RU Passport Number International""" + """RU Passport Number International.""" SA_NATIONAL_ID = "SANationalID" - """SA National ID""" + """SA National ID.""" SG_NATIONAL_REGISTRATION_IDENTITY_CARD_NUMBER = "SGNationalRegistrationIdentityCardNumber" - """SG National Registration Identity Card Number""" + """SG National Registration Identity Card Number.""" SK_PERSONAL_NUMBER = "SKPersonalNumber" - """SK Personal Number""" + """SK Personal Number.""" SI_TAX_IDENTIFICATION_NUMBER = "SITaxIdentificationNumber" - """SI Tax Identification Number""" + """SI Tax Identification Number.""" SI_UNIQUE_MASTER_CITIZEN_NUMBER = "SIUniqueMasterCitizenNumber" - """SI Unique Master Citizen Number""" + """SI Unique Master Citizen Number.""" ZA_IDENTIFICATION_NUMBER = "ZAIdentificationNumber" - """ZA Identification Number""" + """ZA Identification Number.""" KR_RESIDENT_REGISTRATION_NUMBER = "KRResidentRegistrationNumber" - """KR Resident Registration Number""" + """KR Resident Registration Number.""" ES_DNI = "ESDNI" - """ES DNI""" + """ES DNI.""" ES_SOCIAL_SECURITY_NUMBER = "ESSocialSecurityNumber" - """ES Social Security Number""" + """ES Social Security Number.""" ES_TAX_IDENTIFICATION_NUMBER = "ESTaxIdentificationNumber" - """ES Tax Identification Number""" + """ES Tax Identification Number.""" SQL_SERVER_CONNECTION_STRING = "SQLServerConnectionString" - """SQL Server Connection String""" + """SQL Server Connection String.""" SE_NATIONAL_ID = "SENationalID" - """SE National ID""" + """SE National ID.""" SE_NATIONAL_ID_V2 = "SENationalIDV2" - """SE National ID V2""" + """SE National ID V2.""" SE_PASSPORT_NUMBER = "SEPassportNumber" - """SE Passport Number""" + """SE Passport Number.""" SE_TAX_IDENTIFICATION_NUMBER = "SETaxIdentificationNumber" - """SE Tax Identification Number""" + """SE Tax Identification Number.""" SWIFT_CODE = "SWIFTCode" - """SWIFT Code""" + """SWIFT Code.""" CH_SOCIAL_SECURITY_NUMBER = "CHSocialSecurityNumber" - """CH Social Security Number""" + """CH Social Security Number.""" TW_NATIONAL_ID = "TWNationalID" - """TW National ID""" + """TW National ID.""" TW_PASSPORT_NUMBER = "TWPassportNumber" - """TW Passport Number""" + """TW Passport Number.""" TW_RESIDENT_CERTIFICATE = "TWResidentCertificate" - """TW Resident Certificate""" + """TW Resident Certificate.""" TH_POPULATION_IDENTIFICATION_CODE = "THPopulationIdentificationCode" - """TH Population Identification Code""" + """TH Population Identification Code.""" TR_NATIONAL_IDENTIFICATION_NUMBER = "TRNationalIdentificationNumber" - """TR National Identification Number""" + """TR National Identification Number.""" UK_DRIVERS_LICENSE_NUMBER = "UKDriversLicenseNumber" - """UK Driver's License Number""" + """UK Driver's License Number.""" UK_ELECTORAL_ROLL_NUMBER = "UKElectoralRollNumber" - """UK Electoral Roll Number""" + """UK Electoral Roll Number.""" UK_NATIONAL_HEALTH_NUMBER = "UKNationalHealthNumber" - """UK National Health Number""" + """UK National Health Number.""" UK_NATIONAL_INSURANCE_NUMBER = "UKNationalInsuranceNumber" - """UK National Insurance Number""" + """UK National Insurance Number.""" UK_UNIQUE_TAXPAYER_NUMBER = "UKUniqueTaxpayerNumber" - """UK Unique Taxpayer Number""" + """UK Unique Taxpayer Number.""" US_UK_PASSPORT_NUMBER = "USUKPassportNumber" - """US UK Passport Number""" + """US UK Passport Number.""" US_BANK_ACCOUNT_NUMBER = "USBankAccountNumber" - """US Bank Account Number""" + """US Bank Account Number.""" US_DRIVERS_LICENSE_NUMBER = "USDriversLicenseNumber" - """US Driver's License Number""" + """US Driver's License Number.""" US_INDIVIDUAL_TAXPAYER_IDENTIFICATION = "USIndividualTaxpayerIdentification" - """US Individual Taxpayer Identification""" + """US Individual Taxpayer Identification.""" US_SOCIAL_SECURITY_NUMBER = "USSocialSecurityNumber" - """US Social Security Number""" + """US Social Security Number.""" UA_PASSPORT_NUMBER_DOMESTIC = "UAPassportNumberDomestic" - """UA Passport Number Domestic""" + """UA Passport Number Domestic.""" UA_PASSPORT_NUMBER_INTERNATIONAL = "UAPassportNumberInternational" - """UA Passport Number International""" + """UA Passport Number International.""" ORGANIZATION = "Organization" - """Organization""" + """Organization.""" EMAIL = "Email" - """Email""" + """Email.""" URL = "URL" - """URL""" + """URL.""" AGE = "Age" - """Age""" + """Age.""" PHONE_NUMBER = "PhoneNumber" - """Phone Number""" + """Phone Number.""" IP_ADDRESS = "IPAddress" - """IP Address""" + """IP Address.""" DATE = "Date" - """Date""" + """Date.""" PERSON = "Person" - """Person""" + """Person.""" ADDRESS = "Address" - """Address""" + """Address.""" DATE_OF_BIRTH = "DateOfBirth" - """Date Of Birth""" + """Date Of Birth.""" BANK_ACCOUNT_NUMBER = "BankAccountNumber" - """Bank Account Number""" + """Bank Account Number.""" PASSPORT_NUMBER = "PassportNumber" - """Passport Number""" + """Passport Number.""" DRIVERS_LICENSE_NUMBER = "DriversLicenseNumber" - """Drivers License Number""" + """Drivers License Number.""" NEIGHBORHOOD = "Neighborhood" - """Neighborhood""" + """Neighborhood.""" SORT_CODE = "SortCode" """Sort Code. 6-digit number used in the UK to identify a specific bank and branch where a bank - account is held""" + account is held.""" PIN = "PIN" - """PIN""" + """PIN.""" VIN = "VIN" - """VIN""" + """VIN.""" VEHICLE_IDENTIFICATION_NUMBER = "VehicleIdentificationNumber" - """VIN""" + """VIN.""" LICENSE_PLATE = "LicensePlate" - """License Plate""" + """License Plate.""" KR_PASSPORT_NUMBER = "KRPassportNumber" - """KR Passport Number""" + """KR Passport Number.""" KR_DRIVERS_LICENSE_NUMBER = "KRDriversLicenseNumber" - """KR Driver's License Number""" + """KR Driver's License Number.""" KR_SOCIAL_SECURITY_NUMBER = "KRSocialSecurityNumber" - """KR Social Security Number""" + """KR Social Security Number.""" GOVERNMENT_ISSUED_ID = "GovernmentIssuedId" - """Government Issued ID""" + """Government Issued ID.""" PASSWORD = "Password" - """Password""" + """Password.""" NATIONAL_ID = "NationalId" - """National Identification""" + """National Identification.""" ZIP_CODE = "ZipCode" - """Zip Code""" + """Zip Code.""" CVV = "CVV" - """Card Verification Value""" + """Card Verification Value.""" EXPIRATION_DATE = "ExpirationDate" - """Expiration Date""" + """Expiration Date.""" CA_SOCIAL_IDENTIFICATION_NUMBER = "CASocialIdentificationNumber" - """CA Social Identification Number""" + """CA Social Identification Number.""" MEDICARE_BENEFICIARY_ID = "USMedicareBeneficiaryId" - """Medicare Beneficiary ID""" + """Medicare Beneficiary ID.""" LOCATION = "Location" - """Location""" + """Location.""" CITY = "City" - """City""" + """City.""" STATE = "State" - """State""" + """State.""" AIRPORT = "Airport" - """Airport""" + """Airport.""" GPE = "GPE" - """Geopolitical Entity""" + """Geopolitical Entity.""" class PiiCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): """(Optional) describes the PII categories to return.""" ABA_ROUTING_NUMBER = "ABARoutingNumber" - """ABA Routing number""" + """ABA Routing number.""" AR_NATIONAL_IDENTITY_NUMBER = "ARNationalIdentityNumber" - """AR National Identity Number""" + """AR National Identity Number.""" AU_BANK_ACCOUNT_NUMBER = "AUBankAccountNumber" - """AT Bank Account Number""" + """AT Bank Account Number.""" AU_DRIVERS_LICENSE_NUMBER = "AUDriversLicenseNumber" - """AU Driver's License Number""" + """AU Driver's License Number.""" AU_MEDICAL_ACCOUNT_NUMBER = "AUMedicalAccountNumber" - """AU Medical Account Number""" + """AU Medical Account Number.""" AU_PASSPORT_NUMBER = "AUPassportNumber" - """AU Passport Number""" + """AU Passport Number.""" AU_TAX_FILE_NUMBER = "AUTaxFileNumber" - """AU Tax File Number""" + """AU Tax File Number.""" AU_BUSINESS_NUMBER = "AUBusinessNumber" - """AU Business Number""" + """AU Business Number.""" AU_COMPANY_NUMBER = "AUCompanyNumber" - """AU Company Number""" + """AU Company Number.""" AT_IDENTITY_CARD = "ATIdentityCard" - """AT Identity Card""" + """AT Identity Card.""" AT_TAX_IDENTIFICATION_NUMBER = "ATTaxIdentificationNumber" - """AT Tax Identification Number""" + """AT Tax Identification Number.""" AT_VALUE_ADDED_TAX_NUMBER = "ATValueAddedTaxNumber" - """AT Value Added Tax Number""" + """AT Value Added Tax Number.""" AZURE_DOCUMENT_DBAUTH_KEY = "AzureDocumentDBAuthKey" - """Azure Document DB Auth Key""" + """Azure Document DB Auth Key.""" AZURE_IAAS_DATABASE_CONNECTION_AND_SQL_STRING = "AzureIAASDatabaseConnectionAndSQLString" - """Azure IAAS Database Connection And SQL String""" + """Azure IAAS Database Connection And SQL String.""" AZURE_IO_T_CONNECTION_STRING = "AzureIoTConnectionString" - """Azure IoT Connection String""" + """Azure IoT Connection String.""" AZURE_PUBLISH_SETTING_PASSWORD = "AzurePublishSettingPassword" - """Azure Publish Setting Password""" + """Azure Publish Setting Password.""" AZURE_REDIS_CACHE_STRING = "AzureRedisCacheString" - """Azure Redis Cache String""" + """Azure Redis Cache String.""" AZURE_SAS = "AzureSAS" - """Azure SAS""" + """Azure SAS.""" AZURE_SERVICE_BUS_STRING = "AzureServiceBusString" - """Azure Service Bus String""" + """Azure Service Bus String.""" AZURE_STORAGE_ACCOUNT_KEY = "AzureStorageAccountKey" - """Azure Storage Account Key""" + """Azure Storage Account Key.""" AZURE_STORAGE_ACCOUNT_GENERIC = "AzureStorageAccountGeneric" - """Azure Storage Account Generic""" + """Azure Storage Account Generic.""" BE_NATIONAL_NUMBER = "BENationalNumber" - """BE National Number""" + """BE National Number.""" BE_NATIONAL_NUMBER_V2 = "BENationalNumberV2" - """BE National Number V2""" + """BE National Number V2.""" BE_VALUE_ADDED_TAX_NUMBER = "BEValueAddedTaxNumber" - """BE Value Added Tax Number""" + """BE Value Added Tax Number.""" BR_CPF_NUMBER = "BRCPFNumber" - """BR CPF Number""" + """BR CPF Number.""" BR_LEGAL_ENTITY_NUMBER = "BRLegalEntityNumber" - """BR Legal Entity Number""" + """BR Legal Entity Number.""" BR_NATIONAL_ID_RG = "BRNationalIDRG" - """BR National ID RG""" + """BR National ID RG.""" BG_UNIFORM_CIVIL_NUMBER = "BGUniformCivilNumber" - """BG Uniform Civil Number""" + """BG Uniform Civil Number.""" CA_BANK_ACCOUNT_NUMBER = "CABankAccountNumber" - """CA Bank Account Number""" + """CA Bank Account Number.""" CA_DRIVERS_LICENSE_NUMBER = "CADriversLicenseNumber" - """CA Driver's License Number""" + """CA Driver's License Number.""" CA_HEALTH_SERVICE_NUMBER = "CAHealthServiceNumber" - """CA Health Service Number""" + """CA Health Service Number.""" CA_PASSPORT_NUMBER = "CAPassportNumber" - """CA Passport Number""" + """CA Passport Number.""" CA_PERSONAL_HEALTH_IDENTIFICATION = "CAPersonalHealthIdentification" - """CA Personal Health Identification""" + """CA Personal Health Identification.""" CA_SOCIAL_INSURANCE_NUMBER = "CASocialInsuranceNumber" - """CA Social Insurance Number""" + """CA Social Insurance Number.""" CL_IDENTITY_CARD_NUMBER = "CLIdentityCardNumber" - """CL Identity Card Number""" + """CL Identity Card Number.""" CN_RESIDENT_IDENTITY_CARD_NUMBER = "CNResidentIdentityCardNumber" - """CN Resident Identity Card Number""" + """CN Resident Identity Card Number.""" CREDIT_CARD_NUMBER = "CreditCardNumber" - """Credit Card Number""" + """Credit Card Number.""" HR_IDENTITY_CARD_NUMBER = "HRIdentityCardNumber" - """HR Identity Card Number""" + """HR Identity Card Number.""" HR_NATIONAL_ID_NUMBER = "HRNationalIDNumber" - """HR National ID Number""" + """HR National ID Number.""" HR_PERSONAL_IDENTIFICATION_NUMBER = "HRPersonalIdentificationNumber" - """HR Personal Identification Number""" + """HR Personal Identification Number.""" HR_PERSONAL_IDENTIFICATION_OIB_NUMBER_V2 = "HRPersonalIdentificationOIBNumberV2" - """HR Personal Identification OIB Number V2""" + """HR Personal Identification OIB Number V2.""" CY_IDENTITY_CARD = "CYIdentityCard" - """CY Identity Card""" + """CY Identity Card.""" CY_TAX_IDENTIFICATION_NUMBER = "CYTaxIdentificationNumber" - """CY Tax Identification Number""" + """CY Tax Identification Number.""" CZ_PERSONAL_IDENTITY_NUMBER = "CZPersonalIdentityNumber" - """CZ Personal Identity Number""" + """CZ Personal Identity Number.""" CZ_PERSONAL_IDENTITY_V2 = "CZPersonalIdentityV2" - """CZ Personal Identity V2""" + """CZ Personal Identity V2.""" DK_PERSONAL_IDENTIFICATION_NUMBER = "DKPersonalIdentificationNumber" - """DK Personal Identification Number""" + """DK Personal Identification Number.""" DK_PERSONAL_IDENTIFICATION_V2 = "DKPersonalIdentificationV2" - """DK Personal Identification V2""" + """DK Personal Identification V2.""" DRUG_ENFORCEMENT_AGENCY_NUMBER = "DrugEnforcementAgencyNumber" - """Drug Enforcement Agency Number""" + """Drug Enforcement Agency Number.""" EE_PERSONAL_IDENTIFICATION_CODE = "EEPersonalIdentificationCode" - """EE Personal Identification Code""" + """EE Personal Identification Code.""" EU_DEBIT_CARD_NUMBER = "EUDebitCardNumber" - """EU Debit Card Number""" + """EU Debit Card Number.""" EU_DRIVERS_LICENSE_NUMBER = "EUDriversLicenseNumber" - """EU Driver's License Number""" + """EU Driver's License Number.""" EU_GPS_COORDINATES = "EUGPSCoordinates" - """EU GPS Coordinates""" + """EU GPS Coordinates.""" EU_NATIONAL_IDENTIFICATION_NUMBER = "EUNationalIdentificationNumber" - """EU National Identification Number""" + """EU National Identification Number.""" EU_PASSPORT_NUMBER = "EUPassportNumber" - """EU Passport Number""" + """EU Passport Number.""" EU_SOCIAL_SECURITY_NUMBER = "EUSocialSecurityNumber" - """EU Social Security Number""" + """EU Social Security Number.""" EU_TAX_IDENTIFICATION_NUMBER = "EUTaxIdentificationNumber" - """EU Tax Identification Number""" + """EU Tax Identification Number.""" FI_EUROPEAN_HEALTH_NUMBER = "FIEuropeanHealthNumber" - """FI European Health Number""" + """FI European Health Number.""" FI_NATIONAL_ID = "FINationalID" - """FI National ID""" + """FI National ID.""" FI_NATIONAL_ID_V2 = "FINationalIDV2" - """FI National ID V2""" + """FI National ID V2.""" FI_PASSPORT_NUMBER = "FIPassportNumber" - """FI Passport Number""" + """FI Passport Number.""" FR_DRIVERS_LICENSE_NUMBER = "FRDriversLicenseNumber" - """FR Driver's License Number""" + """FR Driver's License Number.""" FR_HEALTH_INSURANCE_NUMBER = "FRHealthInsuranceNumber" - """FR Health Insurance Number""" + """FR Health Insurance Number.""" FR_NATIONAL_ID = "FRNationalID" - """FR National ID""" + """FR National ID.""" FR_PASSPORT_NUMBER = "FRPassportNumber" - """FR Passport Number""" + """FR Passport Number.""" FR_SOCIAL_SECURITY_NUMBER = "FRSocialSecurityNumber" - """FR Social Security Number""" + """FR Social Security Number.""" FR_TAX_IDENTIFICATION_NUMBER = "FRTaxIdentificationNumber" - """FR Tax Identification Number""" + """FR Tax Identification Number.""" FR_VALUE_ADDED_TAX_NUMBER = "FRValueAddedTaxNumber" - """FR Value Added Tax Number""" + """FR Value Added Tax Number.""" DE_DRIVERS_LICENSE_NUMBER = "DEDriversLicenseNumber" - """DE Driver's License Number""" + """DE Driver's License Number.""" DE_PASSPORT_NUMBER = "DEPassportNumber" - """DE Passport Number""" + """DE Passport Number.""" DE_IDENTITY_CARD_NUMBER = "DEIdentityCardNumber" - """DE Identity Card Number""" + """DE Identity Card Number.""" DE_TAX_IDENTIFICATION_NUMBER = "DETaxIdentificationNumber" - """DE Tax Identification Number""" + """DE Tax Identification Number.""" DE_VALUE_ADDED_NUMBER = "DEValueAddedNumber" - """DE Value Added Number""" + """DE Value Added Number.""" GR_NATIONAL_ID_CARD = "GRNationalIDCard" - """GR National ID Card""" + """GR National ID Card.""" GR_NATIONAL_ID_V2 = "GRNationalIDV2" - """GR National ID V2""" + """GR National ID V2.""" GR_TAX_IDENTIFICATION_NUMBER = "GRTaxIdentificationNumber" - """GR Tax Identification Number""" + """GR Tax Identification Number.""" HK_IDENTITY_CARD_NUMBER = "HKIdentityCardNumber" - """HK Identity Card Number""" + """HK Identity Card Number.""" HU_VALUE_ADDED_NUMBER = "HUValueAddedNumber" - """HU Value Added Number""" + """HU Value Added Number.""" HU_PERSONAL_IDENTIFICATION_NUMBER = "HUPersonalIdentificationNumber" - """HU Personal Identification Number""" + """HU Personal Identification Number.""" HU_TAX_IDENTIFICATION_NUMBER = "HUTaxIdentificationNumber" - """HU Tax Identification Number""" + """HU Tax Identification Number.""" IN_PERMANENT_ACCOUNT = "INPermanentAccount" - """IN Permanent Account""" + """IN Permanent Account.""" IN_UNIQUE_IDENTIFICATION_NUMBER = "INUniqueIdentificationNumber" - """IN Unique Identification Number""" + """IN Unique Identification Number.""" ID_IDENTITY_CARD_NUMBER = "IDIdentityCardNumber" - """ID Identity Card Number""" + """ID Identity Card Number.""" INTERNATIONAL_BANKING_ACCOUNT_NUMBER = "InternationalBankingAccountNumber" - """International Banking Account Number""" + """International Banking Account Number.""" IE_PERSONAL_PUBLIC_SERVICE_NUMBER = "IEPersonalPublicServiceNumber" - """IE Personal Public Service Number""" + """IE Personal Public Service Number.""" IE_PERSONAL_PUBLIC_SERVICE_NUMBER_V2 = "IEPersonalPublicServiceNumberV2" - """IE Personal Public Service Number V2""" + """IE Personal Public Service Number V2.""" IL_BANK_ACCOUNT_NUMBER = "ILBankAccountNumber" - """IL Bank Account Number""" + """IL Bank Account Number.""" IL_NATIONAL_ID = "ILNationalID" - """IL National ID""" + """IL National ID.""" IT_DRIVERS_LICENSE_NUMBER = "ITDriversLicenseNumber" - """IT Driver's License Number""" + """IT Driver's License Number.""" IT_FISCAL_CODE = "ITFiscalCode" - """IT Fiscal Code""" + """IT Fiscal Code.""" IT_VALUE_ADDED_TAX_NUMBER = "ITValueAddedTaxNumber" - """IT Value Added Tax Number""" + """IT Value Added Tax Number.""" JP_BANK_ACCOUNT_NUMBER = "JPBankAccountNumber" - """JP Bank Account Number""" + """JP Bank Account Number.""" JP_DRIVERS_LICENSE_NUMBER = "JPDriversLicenseNumber" - """JP Driver's License Number""" + """JP Driver's License Number.""" JP_PASSPORT_NUMBER = "JPPassportNumber" - """JP Passport Number""" + """JP Passport Number.""" JP_RESIDENT_REGISTRATION_NUMBER = "JPResidentRegistrationNumber" - """JP Resident Registration Number""" + """JP Resident Registration Number.""" JP_SOCIAL_INSURANCE_NUMBER = "JPSocialInsuranceNumber" - """JP Social Insurance Number""" + """JP Social Insurance Number.""" JP_MY_NUMBER_CORPORATE = "JPMyNumberCorporate" - """JP My Number Corporate""" + """JP My Number Corporate.""" JP_MY_NUMBER_PERSONAL = "JPMyNumberPersonal" - """JP My Number Personal""" + """JP My Number Personal.""" JP_RESIDENCE_CARD_NUMBER = "JPResidenceCardNumber" - """JP Residence Card Number""" + """JP Residence Card Number.""" LV_PERSONAL_CODE = "LVPersonalCode" - """LV Personal Code""" + """LV Personal Code.""" LT_PERSONAL_CODE = "LTPersonalCode" - """LT Personal Code""" + """LT Personal Code.""" LU_NATIONAL_IDENTIFICATION_NUMBER_NATURAL = "LUNationalIdentificationNumberNatural" - """LU National Identification Number Natural""" + """LU National Identification Number Natural.""" LU_NATIONAL_IDENTIFICATION_NUMBER_NON_NATURAL = "LUNationalIdentificationNumberNonNatural" - """LU National Identification Number Non Natural""" + """LU National Identification Number Non Natural.""" MY_IDENTITY_CARD_NUMBER = "MYIdentityCardNumber" - """MY Identity Card Number""" + """MY Identity Card Number.""" MT_IDENTITY_CARD_NUMBER = "MTIdentityCardNumber" - """MT Identity Card Number""" + """MT Identity Card Number.""" MT_TAX_ID_NUMBER = "MTTaxIDNumber" - """MT Tax ID Number""" + """MT Tax ID Number.""" NL_CITIZENS_SERVICE_NUMBER = "NLCitizensServiceNumber" - """NL Citizens Service Number""" + """NL Citizens Service Number.""" NL_CITIZENS_SERVICE_NUMBER_V2 = "NLCitizensServiceNumberV2" - """NL Citizens Service Number V2""" + """NL Citizens Service Number V2.""" NL_TAX_IDENTIFICATION_NUMBER = "NLTaxIdentificationNumber" - """NL Tax Identification Number""" + """NL Tax Identification Number.""" NL_VALUE_ADDED_TAX_NUMBER = "NLValueAddedTaxNumber" - """NL Value Added Tax Number""" + """NL Value Added Tax Number.""" NZ_BANK_ACCOUNT_NUMBER = "NZBankAccountNumber" - """NZ Bank Account Number""" + """NZ Bank Account Number.""" NZ_DRIVERS_LICENSE_NUMBER = "NZDriversLicenseNumber" - """NZ Driver's License Number""" + """NZ Driver's License Number.""" NZ_INLAND_REVENUE_NUMBER = "NZInlandRevenueNumber" - """NZ Inland Revenue Number""" + """NZ Inland Revenue Number.""" NZ_MINISTRY_OF_HEALTH_NUMBER = "NZMinistryOfHealthNumber" - """NZ Ministry Of Health Number""" + """NZ Ministry Of Health Number.""" NZ_SOCIAL_WELFARE_NUMBER = "NZSocialWelfareNumber" - """NZ Social Welfare Number""" + """NZ Social Welfare Number.""" NO_IDENTITY_NUMBER = "NOIdentityNumber" - """NO Identity Number""" + """NO Identity Number.""" PH_UNIFIED_MULTI_PURPOSE_ID_NUMBER = "PHUnifiedMultiPurposeIDNumber" - """PH Unified Multi Purpose ID Number""" + """PH Unified Multi Purpose ID Number.""" PL_IDENTITY_CARD = "PLIdentityCard" - """PL Identity Card""" + """PL Identity Card.""" PL_NATIONAL_ID = "PLNationalID" - """PL National ID""" + """PL National ID.""" PL_NATIONAL_ID_V2 = "PLNationalIDV2" - """PL National ID V2""" + """PL National ID V2.""" PL_PASSPORT_NUMBER = "PLPassportNumber" - """PL Passport Number""" + """PL Passport Number.""" PL_TAX_IDENTIFICATION_NUMBER = "PLTaxIdentificationNumber" - """PL Tax Identification Number""" + """PL Tax Identification Number.""" PL_REGON_NUMBER = "PLREGONNumber" - """PL REGON Number""" + """PL REGON Number.""" PT_CITIZEN_CARD_NUMBER = "PTCitizenCardNumber" - """PT Citizen Card Number""" + """PT Citizen Card Number.""" PT_CITIZEN_CARD_NUMBER_V2 = "PTCitizenCardNumberV2" - """PT Citizen Card Number V2""" + """PT Citizen Card Number V2.""" PT_TAX_IDENTIFICATION_NUMBER = "PTTaxIdentificationNumber" - """PT Tax Identification Number""" + """PT Tax Identification Number.""" RO_PERSONAL_NUMERICAL_CODE = "ROPersonalNumericalCode" - """RO Personal Numerical Code""" + """RO Personal Numerical Code.""" RU_PASSPORT_NUMBER_DOMESTIC = "RUPassportNumberDomestic" - """RU Passport Number Domestic""" + """RU Passport Number Domestic.""" RU_PASSPORT_NUMBER_INTERNATIONAL = "RUPassportNumberInternational" - """RU Passport Number International""" + """RU Passport Number International.""" SA_NATIONAL_ID = "SANationalID" - """SA National ID""" + """SA National ID.""" SG_NATIONAL_REGISTRATION_IDENTITY_CARD_NUMBER = "SGNationalRegistrationIdentityCardNumber" - """SG National Registration Identity Card Number""" + """SG National Registration Identity Card Number.""" SK_PERSONAL_NUMBER = "SKPersonalNumber" - """SK Personal Number""" + """SK Personal Number.""" SI_TAX_IDENTIFICATION_NUMBER = "SITaxIdentificationNumber" - """SI Tax Identification Number""" + """SI Tax Identification Number.""" SI_UNIQUE_MASTER_CITIZEN_NUMBER = "SIUniqueMasterCitizenNumber" - """SI Unique Master Citizen Number""" + """SI Unique Master Citizen Number.""" ZA_IDENTIFICATION_NUMBER = "ZAIdentificationNumber" - """ZA Identification Number""" + """ZA Identification Number.""" KR_RESIDENT_REGISTRATION_NUMBER = "KRResidentRegistrationNumber" - """KR Resident Registration Number""" + """KR Resident Registration Number.""" ES_DNI = "ESDNI" - """ES DNI""" + """ES DNI.""" ES_SOCIAL_SECURITY_NUMBER = "ESSocialSecurityNumber" - """ES Social Security Number""" + """ES Social Security Number.""" ES_TAX_IDENTIFICATION_NUMBER = "ESTaxIdentificationNumber" - """ES Tax Identification Number""" + """ES Tax Identification Number.""" SQL_SERVER_CONNECTION_STRING = "SQLServerConnectionString" - """SQL Server Connection String""" + """SQL Server Connection String.""" SE_NATIONAL_ID = "SENationalID" - """SE National ID""" + """SE National ID.""" SE_NATIONAL_ID_V2 = "SENationalIDV2" - """SE National ID V2""" + """SE National ID V2.""" SE_PASSPORT_NUMBER = "SEPassportNumber" - """SE Passport Number""" + """SE Passport Number.""" SE_TAX_IDENTIFICATION_NUMBER = "SETaxIdentificationNumber" - """SE Tax Identification Number""" + """SE Tax Identification Number.""" SWIFT_CODE = "SWIFTCode" - """SWIFT Code""" + """SWIFT Code.""" CH_SOCIAL_SECURITY_NUMBER = "CHSocialSecurityNumber" - """CH Social Security Number""" + """CH Social Security Number.""" TW_NATIONAL_ID = "TWNationalID" - """TW National ID""" + """TW National ID.""" TW_PASSPORT_NUMBER = "TWPassportNumber" - """TW Passport Number""" + """TW Passport Number.""" TW_RESIDENT_CERTIFICATE = "TWResidentCertificate" - """TW Resident Certificate""" + """TW Resident Certificate.""" TH_POPULATION_IDENTIFICATION_CODE = "THPopulationIdentificationCode" - """TH Population Identification Code""" + """TH Population Identification Code.""" TR_NATIONAL_IDENTIFICATION_NUMBER = "TRNationalIdentificationNumber" - """TR National Identification Number""" + """TR National Identification Number.""" UK_DRIVERS_LICENSE_NUMBER = "UKDriversLicenseNumber" - """UK Driver's License Number""" + """UK Driver's License Number.""" UK_ELECTORAL_ROLL_NUMBER = "UKElectoralRollNumber" - """UK Electoral Roll Number""" + """UK Electoral Roll Number.""" UK_NATIONAL_HEALTH_NUMBER = "UKNationalHealthNumber" - """UK National Health Number""" + """UK National Health Number.""" UK_NATIONAL_INSURANCE_NUMBER = "UKNationalInsuranceNumber" - """UK National Insurance Number""" + """UK National Insurance Number.""" UK_UNIQUE_TAXPAYER_NUMBER = "UKUniqueTaxpayerNumber" - """UK Unique Taxpayer Number""" + """UK Unique Taxpayer Number.""" US_UK_PASSPORT_NUMBER = "USUKPassportNumber" - """US UK Passport Number""" + """US UK Passport Number.""" US_BANK_ACCOUNT_NUMBER = "USBankAccountNumber" - """US Bank Account Number""" + """US Bank Account Number.""" US_DRIVERS_LICENSE_NUMBER = "USDriversLicenseNumber" - """US Driver's License Number""" + """US Driver's License Number.""" US_INDIVIDUAL_TAXPAYER_IDENTIFICATION = "USIndividualTaxpayerIdentification" - """US Individual Taxpayer Identification""" + """US Individual Taxpayer Identification.""" US_SOCIAL_SECURITY_NUMBER = "USSocialSecurityNumber" - """US Social Security Number""" + """US Social Security Number.""" UA_PASSPORT_NUMBER_DOMESTIC = "UAPassportNumberDomestic" - """UA Passport Number Domestic""" + """UA Passport Number Domestic.""" UA_PASSPORT_NUMBER_INTERNATIONAL = "UAPassportNumberInternational" - """UA Passport Number International""" + """UA Passport Number International.""" ORGANIZATION = "Organization" - """Organization""" + """Organization.""" EMAIL = "Email" - """Email""" + """Email.""" URL = "URL" - """URL""" + """URL.""" AGE = "Age" - """Age""" + """Age.""" PHONE_NUMBER = "PhoneNumber" - """Phone Number""" + """Phone Number.""" IP_ADDRESS = "IPAddress" - """IP Address""" + """IP Address.""" DATE = "Date" - """Date""" + """Date.""" PERSON = "Person" - """Person""" + """Person.""" ADDRESS = "Address" - """Address""" + """Address.""" DATE_OF_BIRTH = "DateOfBirth" - """Date Of Birth""" + """Date Of Birth.""" BANK_ACCOUNT_NUMBER = "BankAccountNumber" - """Bank Account Number""" + """Bank Account Number.""" PASSPORT_NUMBER = "PassportNumber" - """Passport Number""" + """Passport Number.""" DRIVERS_LICENSE_NUMBER = "DriversLicenseNumber" - """Drivers License Number""" + """Drivers License Number.""" NEIGHBORHOOD = "Neighborhood" - """Neighborhood""" + """Neighborhood.""" SORT_CODE = "SortCode" """Sort Code. 6-digit number used in the UK to identify a specific bank and branch where a bank - account is held""" + account is held.""" PIN = "PIN" - """PIN""" + """PIN.""" VIN = "VIN" - """VIN""" + """VIN.""" VEHICLE_IDENTIFICATION_NUMBER = "VehicleIdentificationNumber" - """VIN""" + """VIN.""" LICENSE_PLATE = "LicensePlate" - """License Plate""" + """License Plate.""" KR_PASSPORT_NUMBER = "KRPassportNumber" - """KR Passport Number""" + """KR Passport Number.""" KR_DRIVERS_LICENSE_NUMBER = "KRDriversLicenseNumber" - """KR Driver's License Number""" + """KR Driver's License Number.""" KR_SOCIAL_SECURITY_NUMBER = "KRSocialSecurityNumber" - """KR Social Security Number""" + """KR Social Security Number.""" GOVERNMENT_ISSUED_ID = "GovernmentIssuedId" - """Government Issued ID""" + """Government Issued ID.""" PASSWORD = "Password" - """Password""" + """Password.""" NATIONAL_ID = "NationalId" - """National Identification""" + """National Identification.""" ZIP_CODE = "ZipCode" - """Zip Code""" + """Zip Code.""" CVV = "CVV" - """Card Verification Value""" + """Card Verification Value.""" EXPIRATION_DATE = "ExpirationDate" - """Expiration Date""" + """Expiration Date.""" CA_SOCIAL_IDENTIFICATION_NUMBER = "CASocialIdentificationNumber" - """CA Social Identification Number""" + """CA Social Identification Number.""" MEDICARE_BENEFICIARY_ID = "USMedicareBeneficiaryId" - """Medicare Beneficiary ID""" + """Medicare Beneficiary ID.""" LOCATION = "Location" - """Location""" + """Location.""" CITY = "City" - """City""" + """City.""" STATE = "State" - """State""" + """State.""" AIRPORT = "Airport" - """Airport""" + """Airport.""" GPE = "GPE" - """Geopolitical Entity""" + """Geopolitical Entity.""" ALL = "All" """All PII categories.""" DEFAULT = "Default" @@ -1453,47 +1453,47 @@ class PolicyKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Kinds of overlap policies supported.""" MATCH_LONGEST = "matchLongest" - """Represents MatchLongestEntityPolicyType""" + """Represents MatchLongestEntityPolicyType.""" ALLOW_OVERLAP = "allowOverlap" - """Represents AllowOverlapEntityPolicyType""" + """Represents AllowOverlapEntityPolicyType.""" class RangeInclusivity(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The range inclusiveness of this property property.""" NONE_INCLUSIVE = "NoneInclusive" - """No inclusivity""" + """No inclusivity.""" LEFT_INCLUSIVE = "LeftInclusive" - """Left side inclusive""" + """Left side inclusive.""" RIGHT_INCLUSIVE = "RightInclusive" - """Right side inclusive""" + """Right side inclusive.""" LEFT_RIGHT_INCLUSIVE = "LeftRightInclusive" - """Both sides inclusive""" + """Both sides inclusive.""" class RangeKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The kind of the number range entity.""" NUMBER = "Number" - """Number range""" + """Number range.""" SPEED = "Speed" - """Speed range""" + """Speed range.""" WEIGHT = "Weight" - """Weight range""" + """Weight range.""" LENGTH = "Length" - """Length range""" + """Length range.""" VOLUME = "Volume" - """Volume range""" + """Volume range.""" AREA = "Area" - """Area range""" + """Area range.""" AGE = "Age" - """Age range""" + """Age range.""" INFORMATION = "Information" - """Information range""" + """Information range.""" TEMPERATURE = "Temperature" - """Temperature range""" + """Temperature range.""" CURRENCY = "Currency" - """Currency range""" + """Currency range.""" class RedactionCharacter(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -1502,33 +1502,33 @@ class RedactionCharacter(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ EXCLAMATION_POINT = "!" - """Exclamation point character""" + """Exclamation point character.""" NUMBER_SIGN = "#" - """Number sign character""" + """Number sign character.""" DOLLAR = "$" - """Dollar sign character""" + """Dollar sign character.""" PER_CENT = "%" - """Percent sign character""" + """Percent sign character.""" AMPERSAND = "&" - """Ampersand character""" + """Ampersand character.""" ASTERISK = "*" - """Asterisk character""" + """Asterisk character.""" PLUS = "+" - """Plus sign character""" + """Plus sign character.""" MINUS = "-" - """Minus sign character""" + """Minus sign character.""" EQUALS = "=" - """Equals sign character""" + """Equals sign character.""" QUESTION_MARK = "?" - """Question mark character""" + """Question mark character.""" AT_SIGN = "@" - """At sign character""" + """At sign character.""" CARET = "^" - """Caret character""" + """Caret character.""" UNDERSCORE = "_" - """Underscore character""" + """Underscore character.""" TILDE = "~" - """Tilde character""" + """Tilde character.""" class RedactionPolicyKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -1548,86 +1548,86 @@ class RelationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of relation. Examples include: ``DosageOfMedication`` or 'FrequencyOfMedication', etc.""" ABBREVIATION = "Abbreviation" - """Abbreviation""" + """Abbreviation.""" DIRECTION_OF_BODY_STRUCTURE = "DirectionOfBodyStructure" - """Direction of body structure""" + """Direction of body structure.""" DIRECTION_OF_CONDITION = "DirectionOfCondition" - """Direction of condition""" + """Direction of condition.""" DIRECTION_OF_EXAMINATION = "DirectionOfExamination" - """Direction of examination""" + """Direction of examination.""" DIRECTION_OF_TREATMENT = "DirectionOfTreatment" - """Direction of treatment""" + """Direction of treatment.""" DOSAGE_OF_MEDICATION = "DosageOfMedication" - """Dosage of medication""" + """Dosage of medication.""" FORM_OF_MEDICATION = "FormOfMedication" - """Form of medication""" + """Form of medication.""" FREQUENCY_OF_MEDICATION = "FrequencyOfMedication" - """Frequency of medication""" + """Frequency of medication.""" FREQUENCY_OF_TREATMENT = "FrequencyOfTreatment" - """Frequency of treatment""" + """Frequency of treatment.""" QUALIFIER_OF_CONDITION = "QualifierOfCondition" - """Qualifier of condition""" + """Qualifier of condition.""" RELATION_OF_EXAMINATION = "RelationOfExamination" - """Relation of examination""" + """Relation of examination.""" ROUTE_OF_MEDICATION = "RouteOfMedication" - """Route of medication""" + """Route of medication.""" TIME_OF_CONDITION = "TimeOfCondition" - """Time of condition""" + """Time of condition.""" TIME_OF_EVENT = "TimeOfEvent" - """Time of event""" + """Time of event.""" TIME_OF_EXAMINATION = "TimeOfExamination" - """Time of examination""" + """Time of examination.""" TIME_OF_MEDICATION = "TimeOfMedication" - """Time of medication""" + """Time of medication.""" TIME_OF_TREATMENT = "TimeOfTreatment" - """Time of treatment""" + """Time of treatment.""" UNIT_OF_CONDITION = "UnitOfCondition" - """Unit of condition""" + """Unit of condition.""" UNIT_OF_EXAMINATION = "UnitOfExamination" - """Unit of examination""" + """Unit of examination.""" VALUE_OF_CONDITION = "ValueOfCondition" - """Value of condition""" + """Value of condition.""" VALUE_OF_EXAMINATION = "ValueOfExamination" - """Value of examination""" + """Value of examination.""" BODY_SITE_OF_CONDITION = "BodySiteOfCondition" - """Body site of condition""" + """Body site of condition.""" BODY_SITE_OF_TREATMENT = "BodySiteOfTreatment" - """Body site of treatment""" + """Body site of treatment.""" COURSE_OF_CONDITION = "CourseOfCondition" - """Course of condition""" + """Course of condition.""" COURSE_OF_EXAMINATION = "CourseOfExamination" - """Course of examination""" + """Course of examination.""" COURSE_OF_MEDICATION = "CourseOfMedication" - """Course of medication""" + """Course of medication.""" COURSE_OF_TREATMENT = "CourseOfTreatment" - """Course of treatment""" + """Course of treatment.""" EXAMINATION_FINDS_CONDITION = "ExaminationFindsCondition" - """Examination finds condition""" + """Examination finds condition.""" EXPRESSION_OF_GENE = "ExpressionOfGene" - """Expression of gene""" + """Expression of gene.""" EXPRESSION_OF_VARIANT = "ExpressionOfVariant" - """Expression of variant""" + """Expression of variant.""" FREQUENCY_OF_CONDITION = "FrequencyOfCondition" - """Frequency of condition""" + """Frequency of condition.""" MUTATION_TYPE_OF_GENE = "MutationTypeOfGene" - """Mutation type of gene""" + """Mutation type of gene.""" MUTATION_TYPE_OF_VARIANT = "MutationTypeOfVariant" - """Mutation type of variant""" + """Mutation type of variant.""" SCALE_OF_CONDITION = "ScaleOfCondition" - """Scale of condition""" + """Scale of condition.""" VARIANT_OF_GENE = "VariantOfGene" - """Variant of gene""" + """Variant of gene.""" class RelativeTo(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The reference point that the ordinal number denotes.""" CURRENT = "Current" - """Current state or position""" + """Current state or position.""" END = "End" - """End state or position""" + """End state or position.""" START = "Start" - """Start state or position""" + """Start state or position.""" class ScriptCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -1780,11 +1780,11 @@ class SentenceSentimentValue(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The predicted Sentiment for the sentence.""" POSITIVE = "positive" - """Positive sentiment""" + """Positive sentiment.""" NEUTRAL = "neutral" - """Neutral sentiment""" + """Neutral sentiment.""" NEGATIVE = "negative" - """Negative sentiment""" + """Negative sentiment.""" class SpeedUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -1862,86 +1862,86 @@ class TemperatureUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The temperature Unit of measurement.""" UNSPECIFIED = "Unspecified" - """Unspecified temperature unit""" + """Unspecified temperature unit.""" FAHRENHEIT = "Fahrenheit" - """Temperature unit in Fahrenheit""" + """Temperature unit in Fahrenheit.""" KELVIN = "Kelvin" - """Temperature unit in Kelvin""" + """Temperature unit in Kelvin.""" RANKINE = "Rankine" - """Temperature unit in Rankine""" + """Temperature unit in Rankine.""" CELSIUS = "Celsius" - """Temperature unit in Celsius""" + """Temperature unit in Celsius.""" class TemporalModifier(str, Enum, metaclass=CaseInsensitiveEnumMeta): """An optional modifier of a date/time instance.""" AFTER_APPROX = "AfterApprox" - """After an approximate time""" + """After an approximate time.""" BEFORE = "Before" - """Before a specific time""" + """Before a specific time.""" BEFORE_START = "BeforeStart" - """Before the start of a time period""" + """Before the start of a time period.""" APPROX = "Approx" - """Approximately at a specific time""" + """Approximately at a specific time.""" REFERENCE_UNDEFINED = "ReferenceUndefined" - """Reference to an undefined time""" + """Reference to an undefined time.""" SINCE_END = "SinceEnd" - """Since the end of a time period""" + """Since the end of a time period.""" AFTER_MID = "AfterMid" - """After the middle of a time period""" + """After the middle of a time period.""" START = "Start" - """At the start of a time period""" + """At the start of a time period.""" AFTER = "After" - """After a specific time""" + """After a specific time.""" BEFORE_END = "BeforeEnd" - """Before the end of a time period""" + """Before the end of a time period.""" UNTIL = "Until" - """Until a specific time""" + """Until a specific time.""" END = "End" - """At the end of a time period""" + """At the end of a time period.""" LESS = "Less" - """Less than a specific time""" + """Less than a specific time.""" SINCE = "Since" - """Since a specific time""" + """Since a specific time.""" AFTER_START = "AfterStart" - """After the start of a time period""" + """After the start of a time period.""" BEFORE_APPROX = "BeforeApprox" - """Before an approximate time""" + """Before an approximate time.""" MID = "Mid" - """In the middle of a time period""" + """In the middle of a time period.""" MORE = "More" - """More than a specific time""" + """More than a specific time.""" class TextActionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The status of the task at the mentioned last update time.""" NOT_STARTED = "notStarted" - """Not started status""" + """Not started status.""" RUNNING = "running" - """Running status""" + """Running status.""" SUCCEEDED = "succeeded" - """Succeeded status""" + """Succeeded status.""" PARTIALLY_COMPLETED = "partiallyCompleted" - """Partially completed status""" + """Partially completed status.""" FAILED = "failed" - """Failed status""" + """Failed status.""" CANCELLED = "cancelled" - """Cancelled status""" + """Cancelled status.""" CANCELLING = "cancelling" - """Cancelling status""" + """Cancelling status.""" class TokenSentiment(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The predicted Sentiment for the sentence.""" POSITIVE = "positive" - """Positive sentiment""" + """Positive sentiment.""" MIXED = "mixed" - """Mixed sentiment""" + """Mixed sentiment.""" NEGATIVE = "negative" - """Negative sentiment""" + """Negative sentiment.""" class VolumeUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -2009,43 +2009,43 @@ class WarningCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Defines the list of the warning codes.""" LONG_WORDS_IN_DOCUMENT = "LongWordsInDocument" - """Long words in document warning""" + """Long words in document warning.""" DOCUMENT_TRUNCATED = "DocumentTruncated" - """Document truncated warning""" + """Document truncated warning.""" class WeightUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The weight Unit of measurement.""" UNSPECIFIED = "Unspecified" - """Unspecified weight unit""" + """Unspecified weight unit.""" KILOGRAM = "Kilogram" - """Weight unit in kilograms""" + """Weight unit in kilograms.""" GRAM = "Gram" - """Weight unit in grams""" + """Weight unit in grams.""" MILLIGRAM = "Milligram" - """Weight unit in milligrams""" + """Weight unit in milligrams.""" GALLON = "Gallon" - """Volume unit in gallons""" + """Volume unit in gallons.""" METRIC_TON = "MetricTon" - """Weight unit in metric tons""" + """Weight unit in metric tons.""" TON = "Ton" - """Weight unit in tons""" + """Weight unit in tons.""" POUND = "Pound" - """Weight unit in pounds""" + """Weight unit in pounds.""" OUNCE = "Ounce" - """Weight unit in ounces""" + """Weight unit in ounces.""" GRAIN = "Grain" - """Weight unit in grains""" + """Weight unit in grains.""" PENNY_WEIGHT = "PennyWeight" - """Weight unit in pennyweights""" + """Weight unit in pennyweights.""" LONG_TON_BRITISH = "LongTonBritish" - """Weight unit in long tons (British)""" + """Weight unit in long tons (British).""" SHORT_TON_US = "ShortTonUS" - """Weight unit in short tons (US)""" + """Weight unit in short tons (US).""" SHORT_HUNDRED_WEIGHT_US = "ShortHundredWeightUS" - """Weight unit in short hundredweights (US)""" + """Weight unit in short hundredweights (US).""" STONE = "Stone" - """Weight unit in stones""" + """Weight unit in stones.""" DRAM = "Dram" - """Weight unit in drams""" + """Weight unit in drams.""" diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/models/_models.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/models/_models.py index 309446e81c02..2e798e152db1 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/models/_models.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/models/_models.py @@ -146,7 +146,7 @@ class AbstractiveSummarizationOperationAction(AnalyzeTextOperationAction, discri :ivar name: task name. :vartype name: str :ivar kind: The Abstractive Summarization kind of the long running task. Required. Abstractive - summarization task + summarization task. :vartype kind: str or ~azure.ai.textanalytics.models.ABSTRACTIVE_SUMMARIZATION :ivar action_content: Parameters for the Abstractive Summarization task. :vartype action_content: ~azure.ai.textanalytics.models.AbstractiveSummarizationActionContent @@ -154,7 +154,7 @@ class AbstractiveSummarizationOperationAction(AnalyzeTextOperationAction, discri kind: Literal[AnalyzeTextOperationActionKind.ABSTRACTIVE_SUMMARIZATION] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore """The Abstractive Summarization kind of the long running task. Required. Abstractive - summarization task""" + summarization task.""" action_content: Optional["_models.AbstractiveSummarizationActionContent"] = rest_field( name="parameters", visibility=["read", "create", "update", "delete", "query"] ) @@ -260,7 +260,7 @@ class AbstractiveSummarizationOperationResult(AnalyzeTextLROResult, discriminato :vartype status: str or ~azure.ai.textanalytics.models.TextActionState :ivar task_name: task name. :vartype task_name: str - :ivar kind: Kind of the task. Required. Abstractive summarization LRO results + :ivar kind: Kind of the task. Required. Abstractive summarization LRO results. :vartype kind: str or ~azure.ai.textanalytics.models.ABSTRACTIVE_SUMMARIZATION_OPERATION_RESULTS :ivar results: Results of the task. Required. @@ -268,7 +268,7 @@ class AbstractiveSummarizationOperationResult(AnalyzeTextLROResult, discriminato """ kind: Literal[AnalyzeTextOperationResultsKind.ABSTRACTIVE_SUMMARIZATION_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Abstractive summarization LRO results""" + """Kind of the task. Required. Abstractive summarization LRO results.""" results: "_models.AbstractiveSummarizationResult" = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -635,12 +635,12 @@ class AllowOverlapEntityPolicyType(EntityOverlapPolicy, discriminator="allowOver selection. :ivar policy_kind: The entity OverlapPolicy object kind. Required. Represents - AllowOverlapEntityPolicyType + AllowOverlapEntityPolicyType. :vartype policy_kind: str or ~azure.ai.textanalytics.models.ALLOW_OVERLAP """ policy_kind: Literal[PolicyKind.ALLOW_OVERLAP] = rest_discriminator(name="policyKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """The entity OverlapPolicy object kind. Required. Represents AllowOverlapEntityPolicyType""" + """The entity OverlapPolicy object kind. Required. Represents AllowOverlapEntityPolicyType.""" @overload def __init__( @@ -699,14 +699,14 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class AnalyzeTextEntitiesResult(AnalyzeTextResult, discriminator="EntityRecognitionResults"): """Contains the entity task. - :ivar kind: kind of the task. Required. Entity recognition results + :ivar kind: kind of the task. Required. Entity recognition results. :vartype kind: str or ~azure.ai.textanalytics.models.ENTITY_RECOGNITION_RESULTS :ivar results: Results for entity recognition. Required. :vartype results: ~azure.ai.textanalytics.models.EntitiesWithMetadataAutoResult """ kind: Literal[AnalyzeTextResultsKind.ENTITY_RECOGNITION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """kind of the task. Required. Entity recognition results""" + """kind of the task. Required. Entity recognition results.""" results: "_models.EntitiesWithMetadataAutoResult" = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -734,14 +734,14 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class AnalyzeTextEntityLinkingResult(AnalyzeTextResult, discriminator="EntityLinkingResults"): """Contains the analyze text Entity linking task result. - :ivar kind: Kind of task result. Required. Entity linking results + :ivar kind: Kind of task result. Required. Entity linking results. :vartype kind: str or ~azure.ai.textanalytics.models.ENTITY_LINKING_RESULTS :ivar results: Entity linking result. Required. :vartype results: ~azure.ai.textanalytics.models.EntityLinkingResult """ kind: Literal[AnalyzeTextResultsKind.ENTITY_LINKING_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of task result. Required. Entity linking results""" + """Kind of task result. Required. Entity linking results.""" results: "_models.EntityLinkingResult" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Entity linking result. Required.""" @@ -870,14 +870,14 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class AnalyzeTextKeyPhraseResult(AnalyzeTextResult, discriminator="KeyPhraseExtractionResults"): """Contains the analyze text KeyPhraseExtraction task result. - :ivar kind: Kind of the task results. Required. Key phrase extraction results + :ivar kind: Kind of the task results. Required. Key phrase extraction results. :vartype kind: str or ~azure.ai.textanalytics.models.KEY_PHRASE_EXTRACTION_RESULTS :ivar results: The list of Key phrase extraction results. Required. :vartype results: ~azure.ai.textanalytics.models.KeyPhraseResult """ kind: Literal[AnalyzeTextResultsKind.KEY_PHRASE_EXTRACTION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task results. Required. Key phrase extraction results""" + """Kind of the task results. Required. Key phrase extraction results.""" results: "_models.KeyPhraseResult" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The list of Key phrase extraction results. Required.""" @@ -903,14 +903,14 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class AnalyzeTextLanguageDetectionResult(AnalyzeTextResult, discriminator="LanguageDetectionResults"): """Contains the language detection task result for the request. - :ivar kind: Kind of the task result. Required. Language detection results + :ivar kind: Kind of the task result. Required. Language detection results. :vartype kind: str or ~azure.ai.textanalytics.models.LANGUAGE_DETECTION_RESULTS :ivar results: Contains the language detection results. Required. :vartype results: ~azure.ai.textanalytics.models.LanguageDetectionResult """ kind: Literal[AnalyzeTextResultsKind.LANGUAGE_DETECTION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task result. Required. Language detection results""" + """Kind of the task result. Required. Language detection results.""" results: "_models.LanguageDetectionResult" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Contains the language detection results. Required.""" @@ -1028,14 +1028,14 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class AnalyzeTextPiiResult(AnalyzeTextResult, discriminator="PiiEntityRecognitionResults"): """Contains the analyze text PIIEntityRecognition LRO task. - :ivar kind: The kind of the task. Required. PII entity recognition results + :ivar kind: The kind of the task. Required. PII entity recognition results. :vartype kind: str or ~azure.ai.textanalytics.models.PII_ENTITY_RECOGNITION_RESULTS :ivar results: The list of pii results. Required. :vartype results: ~azure.ai.textanalytics.models.PiiResult """ kind: Literal[AnalyzeTextResultsKind.PII_ENTITY_RECOGNITION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """The kind of the task. Required. PII entity recognition results""" + """The kind of the task. Required. PII entity recognition results.""" results: "_models.PiiResult" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The list of pii results. Required.""" @@ -1061,14 +1061,14 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class AnalyzeTextSentimentResult(AnalyzeTextResult, discriminator="SentimentAnalysisResults"): """Contains the analyze text SentimentAnalysis LRO task result. - :ivar kind: Kind of the task. Required. Sentiment analysis results + :ivar kind: Kind of the task. Required. Sentiment analysis results. :vartype kind: str or ~azure.ai.textanalytics.models.SENTIMENT_ANALYSIS_RESULTS :ivar results: The sentiment analysis results. Required. :vartype results: ~azure.ai.textanalytics.models.SentimentResult """ kind: Literal[AnalyzeTextResultsKind.SENTIMENT_ANALYSIS_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Sentiment analysis results""" + """Kind of the task. Required. Sentiment analysis results.""" results: "_models.SentimentResult" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The sentiment analysis results. Required.""" @@ -1465,7 +1465,7 @@ class ConfidenceScoreThresholdOverride(_Model): :ivar value: The confidence score threshold for the specified PII category. Required. :vartype value: float :ivar language: The 2 letter ISO 639-1 language for which the override applies. If not - specified, the override applies to all languages. + specified, the override applies to all languages. Required. :vartype language: str """ @@ -1535,9 +1535,9 @@ class ConfidenceScoreThresholdOverride(_Model): \"USMedicareBeneficiaryId\", \"Location\", \"City\", \"State\", \"Airport\", and \"GPE\".""" value: float = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The confidence score threshold for the specified PII category. Required.""" - language: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + language: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The 2 letter ISO 639-1 language for which the override applies. If not specified, the override - applies to all languages.""" + applies to all languages. Required.""" @overload def __init__( @@ -1545,7 +1545,7 @@ def __init__( *, entity: Union[str, "_models.PiiCategoriesExclude"], value: float, - language: Optional[str] = None, + language: str, ) -> None: ... @overload @@ -1664,14 +1664,14 @@ class CustomEntitiesLROTask(AnalyzeTextOperationAction, discriminator="CustomEnt :ivar name: task name. :vartype name: str - :ivar kind: Kind of the task. Required. Custom entity recognition task + :ivar kind: Kind of the task. Required. Custom entity recognition task. :vartype kind: str or ~azure.ai.textanalytics.models.CUSTOM_ENTITY_RECOGNITION :ivar parameters: task parameters. :vartype parameters: ~azure.ai.textanalytics.models.CustomEntitiesActionContent """ kind: Literal[AnalyzeTextOperationActionKind.CUSTOM_ENTITY_RECOGNITION] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Custom entity recognition task""" + """Kind of the task. Required. Custom entity recognition task.""" parameters: Optional["_models.CustomEntitiesActionContent"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -1819,7 +1819,7 @@ class CustomEntityRecognitionOperationResult(AnalyzeTextLROResult, discriminator :vartype status: str or ~azure.ai.textanalytics.models.TextActionState :ivar task_name: task name. :vartype task_name: str - :ivar kind: Kind of the task. Required. Custom entity recognition LRO results + :ivar kind: Kind of the task. Required. Custom entity recognition LRO results. :vartype kind: str or ~azure.ai.textanalytics.models.CUSTOM_ENTITY_RECOGNITION_OPERATION_RESULTS :ivar results: List of results. Required. @@ -1827,7 +1827,7 @@ class CustomEntityRecognitionOperationResult(AnalyzeTextLROResult, discriminator """ kind: Literal[AnalyzeTextOperationResultsKind.CUSTOM_ENTITY_RECOGNITION_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Custom entity recognition LRO results""" + """Kind of the task. Required. Custom entity recognition LRO results.""" results: "_models.CustomEntitiesResult" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """List of results. Required.""" @@ -1954,7 +1954,7 @@ class CustomMultiLabelClassificationOperationAction( :ivar name: task name. :vartype name: str - :ivar kind: Kind of the task. Required. Custom multi label classification task + :ivar kind: Kind of the task. Required. Custom multi label classification task. :vartype kind: str or ~azure.ai.textanalytics.models.CUSTOM_MULTI_LABEL_CLASSIFICATION :ivar action_content: Task parameters. :vartype action_content: @@ -1962,7 +1962,7 @@ class CustomMultiLabelClassificationOperationAction( """ kind: Literal[AnalyzeTextOperationActionKind.CUSTOM_MULTI_LABEL_CLASSIFICATION] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Custom multi label classification task""" + """Kind of the task. Required. Custom multi label classification task.""" action_content: Optional["_models.CustomMultiLabelClassificationActionContent"] = rest_field( name="parameters", visibility=["read", "create", "update", "delete", "query"] ) @@ -2001,7 +2001,7 @@ class CustomMultiLabelClassificationOperationResult( :vartype status: str or ~azure.ai.textanalytics.models.TextActionState :ivar task_name: task name. :vartype task_name: str - :ivar kind: Kind of the task. Required. Custom multi label classification LRO results + :ivar kind: Kind of the task. Required. Custom multi label classification LRO results. :vartype kind: str or ~azure.ai.textanalytics.models.CUSTOM_MULTI_LABEL_CLASSIFICATION_OPERATION_RESULTS :ivar results: List of results. Required. @@ -2009,7 +2009,7 @@ class CustomMultiLabelClassificationOperationResult( """ kind: Literal[AnalyzeTextOperationResultsKind.CUSTOM_MULTI_LABEL_CLASSIFICATION_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Custom multi label classification LRO results""" + """Kind of the task. Required. Custom multi label classification LRO results.""" results: "_models.CustomLabelClassificationResult" = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -2084,7 +2084,7 @@ class CustomSingleLabelClassificationOperationAction( :ivar name: task name. :vartype name: str - :ivar kind: Kind of the task. Required. Custom single label classification task + :ivar kind: Kind of the task. Required. Custom single label classification task. :vartype kind: str or ~azure.ai.textanalytics.models.CUSTOM_SINGLE_LABEL_CLASSIFICATION :ivar action_content: Task parameters. :vartype action_content: @@ -2092,7 +2092,7 @@ class CustomSingleLabelClassificationOperationAction( """ kind: Literal[AnalyzeTextOperationActionKind.CUSTOM_SINGLE_LABEL_CLASSIFICATION] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Custom single label classification task""" + """Kind of the task. Required. Custom single label classification task.""" action_content: Optional["_models.CustomSingleLabelClassificationActionContent"] = rest_field( name="parameters", visibility=["read", "create", "update", "delete", "query"] ) @@ -2131,7 +2131,7 @@ class CustomSingleLabelClassificationOperationResult( :vartype status: str or ~azure.ai.textanalytics.models.TextActionState :ivar task_name: task name. :vartype task_name: str - :ivar kind: Kind of the task. Required. Custom single label classification LRO results + :ivar kind: Kind of the task. Required. Custom single label classification LRO results. :vartype kind: str or ~azure.ai.textanalytics.models.CUSTOM_SINGLE_LABEL_CLASSIFICATION_OPERATION_RESULTS :ivar results: List of results. Required. @@ -2139,7 +2139,7 @@ class CustomSingleLabelClassificationOperationResult( """ kind: Literal[AnalyzeTextOperationResultsKind.CUSTOM_SINGLE_LABEL_CLASSIFICATION_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Custom single label classification LRO results""" + """Kind of the task. Required. Custom single label classification LRO results.""" results: "_models.CustomLabelClassificationResult" = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -2567,14 +2567,14 @@ class EntitiesLROTask(AnalyzeTextOperationAction, discriminator="EntityRecogniti :ivar name: task name. :vartype name: str - :ivar kind: The kind of task. Required. Entity recognition task + :ivar kind: The kind of task. Required. Entity recognition task. :vartype kind: str or ~azure.ai.textanalytics.models.ENTITY_RECOGNITION :ivar parameters: Task parameters. :vartype parameters: ~azure.ai.textanalytics.models.EntitiesActionContent """ kind: Literal[AnalyzeTextOperationActionKind.ENTITY_RECOGNITION] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """The kind of task. Required. Entity recognition task""" + """The kind of task. Required. Entity recognition task.""" parameters: Optional["_models.EntitiesActionContent"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -2950,14 +2950,14 @@ class EntityLinkingLROTask(AnalyzeTextOperationAction, discriminator="EntityLink :ivar name: task name. :vartype name: str - :ivar kind: Kind of task result. Required. Entity linking task + :ivar kind: Kind of task result. Required. Entity linking task. :vartype kind: str or ~azure.ai.textanalytics.models.ENTITY_LINKING :ivar parameters: Task parameters. :vartype parameters: ~azure.ai.textanalytics.models.EntityLinkingActionContent """ kind: Literal[AnalyzeTextOperationActionKind.ENTITY_LINKING] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of task result. Required. Entity linking task""" + """Kind of task result. Required. Entity linking task.""" parameters: Optional["_models.EntityLinkingActionContent"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -3041,14 +3041,14 @@ class EntityLinkingOperationResult(AnalyzeTextLROResult, discriminator="EntityLi :vartype status: str or ~azure.ai.textanalytics.models.TextActionState :ivar task_name: task name. :vartype task_name: str - :ivar kind: Kind of the task. Required. Entity linking LRO results + :ivar kind: Kind of the task. Required. Entity linking LRO results. :vartype kind: str or ~azure.ai.textanalytics.models.ENTITY_LINKING_OPERATION_RESULTS :ivar results: Entity linking result. Required. :vartype results: ~azure.ai.textanalytics.models.EntityLinkingResult """ kind: Literal[AnalyzeTextOperationResultsKind.ENTITY_LINKING_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Entity linking LRO results""" + """Kind of the task. Required. Entity linking LRO results.""" results: "_models.EntityLinkingResult" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Entity linking result. Required.""" @@ -3175,14 +3175,14 @@ class EntityRecognitionOperationResult(AnalyzeTextLROResult, discriminator="Enti :vartype status: str or ~azure.ai.textanalytics.models.TextActionState :ivar task_name: task name. :vartype task_name: str - :ivar kind: Kind of the task. Required. Entity recognition LRO results + :ivar kind: Kind of the task. Required. Entity recognition LRO results. :vartype kind: str or ~azure.ai.textanalytics.models.ENTITY_RECOGNITION_OPERATION_RESULTS :ivar results: Results for the task. Required. :vartype results: ~azure.ai.textanalytics.models.EntitiesResult """ kind: Literal[AnalyzeTextOperationResultsKind.ENTITY_RECOGNITION_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Entity recognition LRO results""" + """Kind of the task. Required. Entity recognition LRO results.""" results: "_models.EntitiesResult" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Results for the task. Required.""" @@ -3245,32 +3245,131 @@ class EntitySynonyms(_Model): """Object that allows the user to provide synonyms for context words that to enhance pii entity detection. - :ivar entity_type: The entity name. Required. Known values are: "Address", "Numeric", "Age", - "Currency", "Number", "NumberRange", "Percentage", "Ordinal", "Temperature", "Dimension", - "Length", "Weight", "Height", "Speed", "Area", "Volume", "Information", "Temporal", "Date", - "Time", "DateTime", "DateRange", "TimeRange", "DateTimeRange", "Duration", "SetTemporal", - "Event", "SportsEvent", "CulturalEvent", "NaturalEvent", "Location", "GPE", "City", "State", - "CountryRegion", "Continent", "Structural", "Airport", "Geological", "Organization", - "OrganizationMedical", "OrganizationStockExchange", "OrganizationSports", "Person", - "PersonType", "Email", "URL", "IP", "PhoneNumber", "Product", "ComputingProduct", and "Skill". - :vartype entity_type: str or ~azure.ai.textanalytics.models.EntityCategory + :ivar entity_type: The entity name. Required. Known values are: "ABARoutingNumber", + "ARNationalIdentityNumber", "AUBankAccountNumber", "AUDriversLicenseNumber", + "AUMedicalAccountNumber", "AUPassportNumber", "AUTaxFileNumber", "AUBusinessNumber", + "AUCompanyNumber", "ATIdentityCard", "ATTaxIdentificationNumber", "ATValueAddedTaxNumber", + "AzureDocumentDBAuthKey", "AzureIAASDatabaseConnectionAndSQLString", + "AzureIoTConnectionString", "AzurePublishSettingPassword", "AzureRedisCacheString", "AzureSAS", + "AzureServiceBusString", "AzureStorageAccountKey", "AzureStorageAccountGeneric", + "BENationalNumber", "BENationalNumberV2", "BEValueAddedTaxNumber", "BRCPFNumber", + "BRLegalEntityNumber", "BRNationalIDRG", "BGUniformCivilNumber", "CABankAccountNumber", + "CADriversLicenseNumber", "CAHealthServiceNumber", "CAPassportNumber", + "CAPersonalHealthIdentification", "CASocialInsuranceNumber", "CLIdentityCardNumber", + "CNResidentIdentityCardNumber", "CreditCardNumber", "HRIdentityCardNumber", + "HRNationalIDNumber", "HRPersonalIdentificationNumber", "HRPersonalIdentificationOIBNumberV2", + "CYIdentityCard", "CYTaxIdentificationNumber", "CZPersonalIdentityNumber", + "CZPersonalIdentityV2", "DKPersonalIdentificationNumber", "DKPersonalIdentificationV2", + "DrugEnforcementAgencyNumber", "EEPersonalIdentificationCode", "EUDebitCardNumber", + "EUDriversLicenseNumber", "EUGPSCoordinates", "EUNationalIdentificationNumber", + "EUPassportNumber", "EUSocialSecurityNumber", "EUTaxIdentificationNumber", + "FIEuropeanHealthNumber", "FINationalID", "FINationalIDV2", "FIPassportNumber", + "FRDriversLicenseNumber", "FRHealthInsuranceNumber", "FRNationalID", "FRPassportNumber", + "FRSocialSecurityNumber", "FRTaxIdentificationNumber", "FRValueAddedTaxNumber", + "DEDriversLicenseNumber", "DEPassportNumber", "DEIdentityCardNumber", + "DETaxIdentificationNumber", "DEValueAddedNumber", "GRNationalIDCard", "GRNationalIDV2", + "GRTaxIdentificationNumber", "HKIdentityCardNumber", "HUValueAddedNumber", + "HUPersonalIdentificationNumber", "HUTaxIdentificationNumber", "INPermanentAccount", + "INUniqueIdentificationNumber", "IDIdentityCardNumber", "InternationalBankingAccountNumber", + "IEPersonalPublicServiceNumber", "IEPersonalPublicServiceNumberV2", "ILBankAccountNumber", + "ILNationalID", "ITDriversLicenseNumber", "ITFiscalCode", "ITValueAddedTaxNumber", + "JPBankAccountNumber", "JPDriversLicenseNumber", "JPPassportNumber", + "JPResidentRegistrationNumber", "JPSocialInsuranceNumber", "JPMyNumberCorporate", + "JPMyNumberPersonal", "JPResidenceCardNumber", "LVPersonalCode", "LTPersonalCode", + "LUNationalIdentificationNumberNatural", "LUNationalIdentificationNumberNonNatural", + "MYIdentityCardNumber", "MTIdentityCardNumber", "MTTaxIDNumber", "NLCitizensServiceNumber", + "NLCitizensServiceNumberV2", "NLTaxIdentificationNumber", "NLValueAddedTaxNumber", + "NZBankAccountNumber", "NZDriversLicenseNumber", "NZInlandRevenueNumber", + "NZMinistryOfHealthNumber", "NZSocialWelfareNumber", "NOIdentityNumber", + "PHUnifiedMultiPurposeIDNumber", "PLIdentityCard", "PLNationalID", "PLNationalIDV2", + "PLPassportNumber", "PLTaxIdentificationNumber", "PLREGONNumber", "PTCitizenCardNumber", + "PTCitizenCardNumberV2", "PTTaxIdentificationNumber", "ROPersonalNumericalCode", + "RUPassportNumberDomestic", "RUPassportNumberInternational", "SANationalID", + "SGNationalRegistrationIdentityCardNumber", "SKPersonalNumber", "SITaxIdentificationNumber", + "SIUniqueMasterCitizenNumber", "ZAIdentificationNumber", "KRResidentRegistrationNumber", + "ESDNI", "ESSocialSecurityNumber", "ESTaxIdentificationNumber", "SQLServerConnectionString", + "SENationalID", "SENationalIDV2", "SEPassportNumber", "SETaxIdentificationNumber", "SWIFTCode", + "CHSocialSecurityNumber", "TWNationalID", "TWPassportNumber", "TWResidentCertificate", + "THPopulationIdentificationCode", "TRNationalIdentificationNumber", "UKDriversLicenseNumber", + "UKElectoralRollNumber", "UKNationalHealthNumber", "UKNationalInsuranceNumber", + "UKUniqueTaxpayerNumber", "USUKPassportNumber", "USBankAccountNumber", + "USDriversLicenseNumber", "USIndividualTaxpayerIdentification", "USSocialSecurityNumber", + "UAPassportNumberDomestic", "UAPassportNumberInternational", "Organization", "Email", "URL", + "Age", "PhoneNumber", "IPAddress", "Date", "Person", "Address", "DateOfBirth", + "BankAccountNumber", "PassportNumber", "DriversLicenseNumber", "Neighborhood", "SortCode", + "PIN", "VIN", "VehicleIdentificationNumber", "LicensePlate", "KRPassportNumber", + "KRDriversLicenseNumber", "KRSocialSecurityNumber", "GovernmentIssuedId", "Password", + "NationalId", "ZipCode", "CVV", "ExpirationDate", "CASocialIdentificationNumber", + "USMedicareBeneficiaryId", "Location", "City", "State", "Airport", and "GPE". + :vartype entity_type: str or ~azure.ai.textanalytics.models.PiiCategoriesExclude :ivar synonyms: The entity synonyms. Required. :vartype synonyms: list[~azure.ai.textanalytics.models.EntitySynonym] """ - entity_type: Union[str, "_models.EntityCategory"] = rest_field( + entity_type: Union[str, "_models.PiiCategoriesExclude"] = rest_field( name="entityType", visibility=["read", "create", "update", "delete", "query"] ) - """The entity name. Required. Known values are: \"Address\", \"Numeric\", \"Age\", \"Currency\", - \"Number\", \"NumberRange\", \"Percentage\", \"Ordinal\", \"Temperature\", \"Dimension\", - \"Length\", \"Weight\", \"Height\", \"Speed\", \"Area\", \"Volume\", \"Information\", - \"Temporal\", \"Date\", \"Time\", \"DateTime\", \"DateRange\", \"TimeRange\", - \"DateTimeRange\", \"Duration\", \"SetTemporal\", \"Event\", \"SportsEvent\", - \"CulturalEvent\", \"NaturalEvent\", \"Location\", \"GPE\", \"City\", \"State\", - \"CountryRegion\", \"Continent\", \"Structural\", \"Airport\", \"Geological\", - \"Organization\", \"OrganizationMedical\", \"OrganizationStockExchange\", - \"OrganizationSports\", \"Person\", \"PersonType\", \"Email\", \"URL\", \"IP\", - \"PhoneNumber\", \"Product\", \"ComputingProduct\", and \"Skill\".""" + """The entity name. Required. Known values are: \"ABARoutingNumber\", + \"ARNationalIdentityNumber\", \"AUBankAccountNumber\", \"AUDriversLicenseNumber\", + \"AUMedicalAccountNumber\", \"AUPassportNumber\", \"AUTaxFileNumber\", \"AUBusinessNumber\", + \"AUCompanyNumber\", \"ATIdentityCard\", \"ATTaxIdentificationNumber\", + \"ATValueAddedTaxNumber\", \"AzureDocumentDBAuthKey\", + \"AzureIAASDatabaseConnectionAndSQLString\", \"AzureIoTConnectionString\", + \"AzurePublishSettingPassword\", \"AzureRedisCacheString\", \"AzureSAS\", + \"AzureServiceBusString\", \"AzureStorageAccountKey\", \"AzureStorageAccountGeneric\", + \"BENationalNumber\", \"BENationalNumberV2\", \"BEValueAddedTaxNumber\", \"BRCPFNumber\", + \"BRLegalEntityNumber\", \"BRNationalIDRG\", \"BGUniformCivilNumber\", \"CABankAccountNumber\", + \"CADriversLicenseNumber\", \"CAHealthServiceNumber\", \"CAPassportNumber\", + \"CAPersonalHealthIdentification\", \"CASocialInsuranceNumber\", \"CLIdentityCardNumber\", + \"CNResidentIdentityCardNumber\", \"CreditCardNumber\", \"HRIdentityCardNumber\", + \"HRNationalIDNumber\", \"HRPersonalIdentificationNumber\", + \"HRPersonalIdentificationOIBNumberV2\", \"CYIdentityCard\", \"CYTaxIdentificationNumber\", + \"CZPersonalIdentityNumber\", \"CZPersonalIdentityV2\", \"DKPersonalIdentificationNumber\", + \"DKPersonalIdentificationV2\", \"DrugEnforcementAgencyNumber\", + \"EEPersonalIdentificationCode\", \"EUDebitCardNumber\", \"EUDriversLicenseNumber\", + \"EUGPSCoordinates\", \"EUNationalIdentificationNumber\", \"EUPassportNumber\", + \"EUSocialSecurityNumber\", \"EUTaxIdentificationNumber\", \"FIEuropeanHealthNumber\", + \"FINationalID\", \"FINationalIDV2\", \"FIPassportNumber\", \"FRDriversLicenseNumber\", + \"FRHealthInsuranceNumber\", \"FRNationalID\", \"FRPassportNumber\", + \"FRSocialSecurityNumber\", \"FRTaxIdentificationNumber\", \"FRValueAddedTaxNumber\", + \"DEDriversLicenseNumber\", \"DEPassportNumber\", \"DEIdentityCardNumber\", + \"DETaxIdentificationNumber\", \"DEValueAddedNumber\", \"GRNationalIDCard\", + \"GRNationalIDV2\", \"GRTaxIdentificationNumber\", \"HKIdentityCardNumber\", + \"HUValueAddedNumber\", \"HUPersonalIdentificationNumber\", \"HUTaxIdentificationNumber\", + \"INPermanentAccount\", \"INUniqueIdentificationNumber\", \"IDIdentityCardNumber\", + \"InternationalBankingAccountNumber\", \"IEPersonalPublicServiceNumber\", + \"IEPersonalPublicServiceNumberV2\", \"ILBankAccountNumber\", \"ILNationalID\", + \"ITDriversLicenseNumber\", \"ITFiscalCode\", \"ITValueAddedTaxNumber\", + \"JPBankAccountNumber\", \"JPDriversLicenseNumber\", \"JPPassportNumber\", + \"JPResidentRegistrationNumber\", \"JPSocialInsuranceNumber\", \"JPMyNumberCorporate\", + \"JPMyNumberPersonal\", \"JPResidenceCardNumber\", \"LVPersonalCode\", \"LTPersonalCode\", + \"LUNationalIdentificationNumberNatural\", \"LUNationalIdentificationNumberNonNatural\", + \"MYIdentityCardNumber\", \"MTIdentityCardNumber\", \"MTTaxIDNumber\", + \"NLCitizensServiceNumber\", \"NLCitizensServiceNumberV2\", \"NLTaxIdentificationNumber\", + \"NLValueAddedTaxNumber\", \"NZBankAccountNumber\", \"NZDriversLicenseNumber\", + \"NZInlandRevenueNumber\", \"NZMinistryOfHealthNumber\", \"NZSocialWelfareNumber\", + \"NOIdentityNumber\", \"PHUnifiedMultiPurposeIDNumber\", \"PLIdentityCard\", \"PLNationalID\", + \"PLNationalIDV2\", \"PLPassportNumber\", \"PLTaxIdentificationNumber\", \"PLREGONNumber\", + \"PTCitizenCardNumber\", \"PTCitizenCardNumberV2\", \"PTTaxIdentificationNumber\", + \"ROPersonalNumericalCode\", \"RUPassportNumberDomestic\", \"RUPassportNumberInternational\", + \"SANationalID\", \"SGNationalRegistrationIdentityCardNumber\", \"SKPersonalNumber\", + \"SITaxIdentificationNumber\", \"SIUniqueMasterCitizenNumber\", \"ZAIdentificationNumber\", + \"KRResidentRegistrationNumber\", \"ESDNI\", \"ESSocialSecurityNumber\", + \"ESTaxIdentificationNumber\", \"SQLServerConnectionString\", \"SENationalID\", + \"SENationalIDV2\", \"SEPassportNumber\", \"SETaxIdentificationNumber\", \"SWIFTCode\", + \"CHSocialSecurityNumber\", \"TWNationalID\", \"TWPassportNumber\", \"TWResidentCertificate\", + \"THPopulationIdentificationCode\", \"TRNationalIdentificationNumber\", + \"UKDriversLicenseNumber\", \"UKElectoralRollNumber\", \"UKNationalHealthNumber\", + \"UKNationalInsuranceNumber\", \"UKUniqueTaxpayerNumber\", \"USUKPassportNumber\", + \"USBankAccountNumber\", \"USDriversLicenseNumber\", \"USIndividualTaxpayerIdentification\", + \"USSocialSecurityNumber\", \"UAPassportNumberDomestic\", \"UAPassportNumberInternational\", + \"Organization\", \"Email\", \"URL\", \"Age\", \"PhoneNumber\", \"IPAddress\", \"Date\", + \"Person\", \"Address\", \"DateOfBirth\", \"BankAccountNumber\", \"PassportNumber\", + \"DriversLicenseNumber\", \"Neighborhood\", \"SortCode\", \"PIN\", \"VIN\", + \"VehicleIdentificationNumber\", \"LicensePlate\", \"KRPassportNumber\", + \"KRDriversLicenseNumber\", \"KRSocialSecurityNumber\", \"GovernmentIssuedId\", \"Password\", + \"NationalId\", \"ZipCode\", \"CVV\", \"ExpirationDate\", \"CASocialIdentificationNumber\", + \"USMedicareBeneficiaryId\", \"Location\", \"City\", \"State\", \"Airport\", and \"GPE\".""" synonyms: list["_models.EntitySynonym"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The entity synonyms. Required.""" @@ -3278,7 +3377,7 @@ class EntitySynonyms(_Model): def __init__( self, *, - entity_type: Union[str, "_models.EntityCategory"], + entity_type: Union[str, "_models.PiiCategoriesExclude"], synonyms: list["_models.EntitySynonym"], ) -> None: ... @@ -3537,7 +3636,7 @@ class ExtractiveSummarizationOperationAction(AnalyzeTextOperationAction, discrim :ivar name: task name. :vartype name: str :ivar kind: The Extractive Summarization kind of the long running task. Required. Extractive - summarization task + summarization task. :vartype kind: str or ~azure.ai.textanalytics.models.EXTRACTIVE_SUMMARIZATION :ivar action_content: Parameters for the Extractive Summarization task. :vartype action_content: ~azure.ai.textanalytics.models.ExtractiveSummarizationActionContent @@ -3545,7 +3644,7 @@ class ExtractiveSummarizationOperationAction(AnalyzeTextOperationAction, discrim kind: Literal[AnalyzeTextOperationActionKind.EXTRACTIVE_SUMMARIZATION] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore """The Extractive Summarization kind of the long running task. Required. Extractive summarization - task""" + task.""" action_content: Optional["_models.ExtractiveSummarizationActionContent"] = rest_field( name="parameters", visibility=["read", "create", "update", "delete", "query"] ) @@ -3582,14 +3681,14 @@ class ExtractiveSummarizationOperationResult(AnalyzeTextLROResult, discriminator :vartype status: str or ~azure.ai.textanalytics.models.TextActionState :ivar task_name: task name. :vartype task_name: str - :ivar kind: Kind of the task. Required. Extractive summarization LRO results + :ivar kind: Kind of the task. Required. Extractive summarization LRO results. :vartype kind: str or ~azure.ai.textanalytics.models.EXTRACTIVE_SUMMARIZATION_OPERATION_RESULTS :ivar results: Results of the task. Required. :vartype results: ~azure.ai.textanalytics.models.ExtractiveSummarizationResult """ kind: Literal[AnalyzeTextOperationResultsKind.EXTRACTIVE_SUMMARIZATION_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Extractive summarization LRO results""" + """Kind of the task. Required. Extractive summarization LRO results.""" results: "_models.ExtractiveSummarizationResult" = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -3948,14 +4047,14 @@ class HealthcareLROResult(AnalyzeTextLROResult, discriminator="HealthcareLROResu :vartype status: str or ~azure.ai.textanalytics.models.TextActionState :ivar task_name: task name. :vartype task_name: str - :ivar kind: Kind of the task. Required. Healthcare LRO results + :ivar kind: Kind of the task. Required. Healthcare LRO results. :vartype kind: str or ~azure.ai.textanalytics.models.HEALTHCARE_OPERATION_RESULTS :ivar results: Results of the task. Required. :vartype results: ~azure.ai.textanalytics.models.HealthcareResult """ kind: Literal[AnalyzeTextOperationResultsKind.HEALTHCARE_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Healthcare LRO results""" + """Kind of the task. Required. Healthcare LRO results.""" results: "_models.HealthcareResult" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Results of the task. Required.""" @@ -3986,14 +4085,14 @@ class HealthcareLROTask(AnalyzeTextOperationAction, discriminator="Healthcare"): :ivar name: task name. :vartype name: str - :ivar kind: Healthcare kind of the long running task. Required. Healthcare task + :ivar kind: Healthcare kind of the long running task. Required. Healthcare task. :vartype kind: str or ~azure.ai.textanalytics.models.HEALTHCARE :ivar parameters: Parameters for the Healthcare task. :vartype parameters: ~azure.ai.textanalytics.models.HealthcareTaskParameters """ kind: Literal[AnalyzeTextOperationActionKind.HEALTHCARE] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Healthcare kind of the long running task. Required. Healthcare task""" + """Healthcare kind of the long running task. Required. Healthcare task.""" parameters: Optional["_models.HealthcareTaskParameters"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -4397,14 +4496,14 @@ class KeyPhraseExtractionOperationResult(AnalyzeTextLROResult, discriminator="Ke :vartype status: str or ~azure.ai.textanalytics.models.TextActionState :ivar task_name: task name. :vartype task_name: str - :ivar kind: Kind of the task. Required. Key phrase extraction LRO results + :ivar kind: Kind of the task. Required. Key phrase extraction LRO results. :vartype kind: str or ~azure.ai.textanalytics.models.KEY_PHRASE_EXTRACTION_OPERATION_RESULTS :ivar results: The list of Key phrase extraction results. Required. :vartype results: ~azure.ai.textanalytics.models.KeyPhraseResult """ kind: Literal[AnalyzeTextOperationResultsKind.KEY_PHRASE_EXTRACTION_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Key phrase extraction LRO results""" + """Kind of the task. Required. Key phrase extraction LRO results.""" results: "_models.KeyPhraseResult" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The list of Key phrase extraction results. Required.""" @@ -4435,14 +4534,14 @@ class KeyPhraseLROTask(AnalyzeTextOperationAction, discriminator="KeyPhraseExtra :ivar name: task name. :vartype name: str - :ivar kind: Kind of the task. Required. Key phrase extraction task + :ivar kind: Kind of the task. Required. Key phrase extraction task. :vartype kind: str or ~azure.ai.textanalytics.models.KEY_PHRASE_EXTRACTION :ivar parameters: Key phrase extraction task parameters. :vartype parameters: ~azure.ai.textanalytics.models.KeyPhraseActionContent """ kind: Literal[AnalyzeTextOperationActionKind.KEY_PHRASE_EXTRACTION] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Key phrase extraction task""" + """Kind of the task. Required. Key phrase extraction task.""" parameters: Optional["_models.KeyPhraseActionContent"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -4891,12 +4990,12 @@ class MatchLongestEntityPolicyType(EntityOverlapPolicy, discriminator="matchLong Text Analytics) follow the above steps starting from 1. :ivar policy_kind: The entity OverlapPolicy object kind. Required. Represents - MatchLongestEntityPolicyType + MatchLongestEntityPolicyType. :vartype policy_kind: str or ~azure.ai.textanalytics.models.MATCH_LONGEST """ policy_kind: Literal[PolicyKind.MATCH_LONGEST] = rest_discriminator(name="policyKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """The entity OverlapPolicy object kind. Required. Represents MatchLongestEntityPolicyType""" + """The entity OverlapPolicy object kind. Required. Represents MatchLongestEntityPolicyType.""" @overload def __init__( @@ -5536,14 +5635,14 @@ class PiiEntityRecognitionOperationResult(AnalyzeTextLROResult, discriminator="P :vartype status: str or ~azure.ai.textanalytics.models.TextActionState :ivar task_name: task name. :vartype task_name: str - :ivar kind: The kind of the task. Required. PII entity recognition LRO results + :ivar kind: The kind of the task. Required. PII entity recognition LRO results. :vartype kind: str or ~azure.ai.textanalytics.models.PII_ENTITY_RECOGNITION_OPERATION_RESULTS :ivar results: The list of pii results. Required. :vartype results: ~azure.ai.textanalytics.models.PiiResult """ kind: Literal[AnalyzeTextOperationResultsKind.PII_ENTITY_RECOGNITION_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """The kind of the task. Required. PII entity recognition LRO results""" + """The kind of the task. Required. PII entity recognition LRO results.""" results: "_models.PiiResult" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The list of pii results. Required.""" @@ -5574,14 +5673,14 @@ class PiiLROTask(AnalyzeTextOperationAction, discriminator="PiiEntityRecognition :ivar name: task name. :vartype name: str - :ivar kind: Kind of the task. Required. PII entity recognition task + :ivar kind: Kind of the task. Required. PII entity recognition task. :vartype kind: str or ~azure.ai.textanalytics.models.PII_ENTITY_RECOGNITION :ivar parameters: Pii task parameters. :vartype parameters: ~azure.ai.textanalytics.models.PiiActionContent """ kind: Literal[AnalyzeTextOperationActionKind.PII_ENTITY_RECOGNITION] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. PII entity recognition task""" + """Kind of the task. Required. PII entity recognition task.""" parameters: Optional["_models.PiiActionContent"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -6097,14 +6196,14 @@ class SentimentAnalysisOperationAction(AnalyzeTextOperationAction, discriminator :ivar name: task name. :vartype name: str :ivar kind: The Sentiment Analysis kind of the long running task. Required. Sentiment analysis - task + task. :vartype kind: str or ~azure.ai.textanalytics.models.SENTIMENT_ANALYSIS :ivar parameters: Parameters for the Sentiment Analysis task. :vartype parameters: ~azure.ai.textanalytics.models.SentimentAnalysisActionContent """ kind: Literal[AnalyzeTextOperationActionKind.SENTIMENT_ANALYSIS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """The Sentiment Analysis kind of the long running task. Required. Sentiment analysis task""" + """The Sentiment Analysis kind of the long running task. Required. Sentiment analysis task.""" parameters: Optional["_models.SentimentAnalysisActionContent"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -6180,14 +6279,14 @@ class SentimentLROResult(AnalyzeTextLROResult, discriminator="SentimentAnalysisL :vartype status: str or ~azure.ai.textanalytics.models.TextActionState :ivar task_name: task name. :vartype task_name: str - :ivar kind: Kind of the task. Required. Sentiment analysis LRO results + :ivar kind: Kind of the task. Required. Sentiment analysis LRO results. :vartype kind: str or ~azure.ai.textanalytics.models.SENTIMENT_ANALYSIS_OPERATION_RESULTS :ivar results: The sentiment analysis results. Required. :vartype results: ~azure.ai.textanalytics.models.SentimentResult """ kind: Literal[AnalyzeTextOperationResultsKind.SENTIMENT_ANALYSIS_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Sentiment analysis LRO results""" + """Kind of the task. Required. Sentiment analysis LRO results.""" results: "_models.SentimentResult" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The sentiment analysis results. Required.""" @@ -6688,7 +6787,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class TextEntityLinkingInput(AnalyzeTextInput, discriminator="EntityLinking"): """Contains the analyze text Entity linking input. - :ivar kind: Kind for Entity linking input. Required. Entity linking task + :ivar kind: Kind for Entity linking input. Required. Entity linking task. :vartype kind: str or ~azure.ai.textanalytics.models.ENTITY_LINKING :ivar text_input: Contains the analysis input to be handled by the service. :vartype text_input: ~azure.ai.textanalytics.models.MultiLanguageTextInput @@ -6697,7 +6796,7 @@ class TextEntityLinkingInput(AnalyzeTextInput, discriminator="EntityLinking"): """ kind: Literal[AnalyzeTextInputKind.ENTITY_LINKING] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind for Entity linking input. Required. Entity linking task""" + """Kind for Entity linking input. Required. Entity linking task.""" text_input: Optional["_models.MultiLanguageTextInput"] = rest_field( name="analysisInput", visibility=["read", "create", "update", "delete", "query"] ) @@ -6730,7 +6829,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class TextEntityRecognitionInput(AnalyzeTextInput, discriminator="EntityRecognition"): """The entity recognition analyze text input task request. - :ivar kind: The kind of task. Required. Entity recognition task + :ivar kind: The kind of task. Required. Entity recognition task. :vartype kind: str or ~azure.ai.textanalytics.models.ENTITY_RECOGNITION :ivar text_input: The input to be analyzed. :vartype text_input: ~azure.ai.textanalytics.models.MultiLanguageTextInput @@ -6739,7 +6838,7 @@ class TextEntityRecognitionInput(AnalyzeTextInput, discriminator="EntityRecognit """ kind: Literal[AnalyzeTextInputKind.ENTITY_RECOGNITION] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """The kind of task. Required. Entity recognition task""" + """The kind of task. Required. Entity recognition task.""" text_input: Optional["_models.MultiLanguageTextInput"] = rest_field( name="analysisInput", visibility=["read", "create", "update", "delete", "query"] ) @@ -6772,7 +6871,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class TextKeyPhraseExtractionInput(AnalyzeTextInput, discriminator="KeyPhraseExtraction"): """Contains the analyze text KeyPhraseExtraction task input. - :ivar kind: Kind of the task. Required. Key phrase extraction task + :ivar kind: Kind of the task. Required. Key phrase extraction task. :vartype kind: str or ~azure.ai.textanalytics.models.KEY_PHRASE_EXTRACTION :ivar text_input: Contains the input documents. :vartype text_input: ~azure.ai.textanalytics.models.MultiLanguageTextInput @@ -6781,7 +6880,7 @@ class TextKeyPhraseExtractionInput(AnalyzeTextInput, discriminator="KeyPhraseExt """ kind: Literal[AnalyzeTextInputKind.KEY_PHRASE_EXTRACTION] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Key phrase extraction task""" + """Kind of the task. Required. Key phrase extraction task.""" text_input: Optional["_models.MultiLanguageTextInput"] = rest_field( name="analysisInput", visibility=["read", "create", "update", "delete", "query"] ) @@ -6814,7 +6913,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class TextLanguageDetectionInput(AnalyzeTextInput, discriminator="LanguageDetection"): """Contains the language detection document analysis task input. - :ivar kind: Kind of the task. Required. Language detection task + :ivar kind: Kind of the task. Required. Language detection task. :vartype kind: str or ~azure.ai.textanalytics.models.LANGUAGE_DETECTION :ivar text_input: Documents to be analyzed. :vartype text_input: ~azure.ai.textanalytics.models.LanguageDetectionTextInput @@ -6823,7 +6922,7 @@ class TextLanguageDetectionInput(AnalyzeTextInput, discriminator="LanguageDetect """ kind: Literal[AnalyzeTextInputKind.LANGUAGE_DETECTION] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Language detection task""" + """Kind of the task. Required. Language detection task.""" text_input: Optional["_models.LanguageDetectionTextInput"] = rest_field( name="analysisInput", visibility=["read", "create", "update", "delete", "query"] ) @@ -6856,7 +6955,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class TextPiiEntitiesRecognitionInput(AnalyzeTextInput, discriminator="PiiEntityRecognition"): """Contains the analyze text PIIEntityRecognition task input. - :ivar kind: Kind of the task. Required. PII entity recognition task + :ivar kind: Kind of the task. Required. PII entity recognition task. :vartype kind: str or ~azure.ai.textanalytics.models.PII_ENTITY_RECOGNITION :ivar text_input: Contains the input documents. :vartype text_input: ~azure.ai.textanalytics.models.MultiLanguageTextInput @@ -6865,7 +6964,7 @@ class TextPiiEntitiesRecognitionInput(AnalyzeTextInput, discriminator="PiiEntity """ kind: Literal[AnalyzeTextInputKind.PII_ENTITY_RECOGNITION] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. PII entity recognition task""" + """Kind of the task. Required. PII entity recognition task.""" text_input: Optional["_models.MultiLanguageTextInput"] = rest_field( name="analysisInput", visibility=["read", "create", "update", "delete", "query"] ) @@ -6898,7 +6997,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class TextSentimentAnalysisInput(AnalyzeTextInput, discriminator="SentimentAnalysis"): """Contains the analyze text SentimentAnalysis task input. - :ivar kind: Kind of the task. Required. Sentiment analysis task + :ivar kind: Kind of the task. Required. Sentiment analysis task. :vartype kind: str or ~azure.ai.textanalytics.models.SENTIMENT_ANALYSIS :ivar text_input: Contains the input documents. :vartype text_input: ~azure.ai.textanalytics.models.MultiLanguageTextInput @@ -6907,7 +7006,7 @@ class TextSentimentAnalysisInput(AnalyzeTextInput, discriminator="SentimentAnaly """ kind: Literal[AnalyzeTextInputKind.SENTIMENT_ANALYSIS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore - """Kind of the task. Required. Sentiment analysis task""" + """Kind of the task. Required. Sentiment analysis task.""" text_input: Optional["_models.MultiLanguageTextInput"] = rest_field( name="analysisInput", visibility=["read", "create", "update", "delete", "query"] ) diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/types.py b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/types.py new file mode 100644 index 000000000000..9bc8b3abeee4 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/azure/ai/textanalytics/types.py @@ -0,0 +1,1352 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Literal, TYPE_CHECKING, Union +from typing_extensions import Required, TypedDict + +from .models._enums import AnalyzeTextInputKind, AnalyzeTextOperationActionKind, PolicyKind, RedactionPolicyKind + +if TYPE_CHECKING: + from .models import ( + EntityCategory, + ExtractiveSummarizationSortingCriteria, + FhirVersion, + HealthcareDocumentType, + PiiCategoriesExclude, + PiiCategory, + PiiDomain, + RedactionCharacter, + StringIndexType, + SummaryLengthBucket, + ) + + +class AbstractiveSummarizationActionContent(TypedDict, total=False): + """Supported parameters for the pre-built Abstractive Summarization task. + + :ivar logging_opt_out: logging opt out. + :vartype logging_opt_out: bool + :ivar model_version: model version. + :vartype model_version: str + :ivar sentence_count: Controls the approximate number of sentences in the output summaries. + :vartype sentence_count: int + :ivar string_index_type: String index type. Known values are: "TextElements_v8", + "UnicodeCodePoint", and "Utf16CodeUnit". + :vartype string_index_type: Union[str, "StringIndexType"] + :ivar summary_length: (NOTE: Recommended to use summaryLength over sentenceCount) Controls the + approximate length of the output summaries. Known values are: "short", "medium", and "long". + :vartype summary_length: Union[str, "SummaryLengthBucket"] + :ivar instruction: (Optional) If provided, the query will be used to generate the summary. + :vartype instruction: str + """ + + loggingOptOut: bool + """logging opt out.""" + modelVersion: str + """model version.""" + sentenceCount: int + """Controls the approximate number of sentences in the output summaries.""" + stringIndexType: Union[str, "StringIndexType"] + """String index type. Known values are: \"TextElements_v8\", \"UnicodeCodePoint\", and + \"Utf16CodeUnit\".""" + summaryLength: Union[str, "SummaryLengthBucket"] + """(NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of + the output summaries. Known values are: \"short\", \"medium\", and \"long\".""" + instruction: str + """(Optional) If provided, the query will be used to generate the summary.""" + + +class AbstractiveSummarizationOperationAction(TypedDict, total=False): + """An object representing the task definition for an Abstractive Summarization task. + + :ivar name: task name. + :vartype name: str + :ivar kind: The Abstractive Summarization kind of the long running task. Required. Abstractive + summarization task. + :vartype kind: Literal[AnalyzeTextOperationActionKind.ABSTRACTIVE_SUMMARIZATION] + :ivar action_content: Parameters for the Abstractive Summarization task. + :vartype action_content: "AbstractiveSummarizationActionContent" + """ + + taskName: str + """task name.""" + kind: Required[Literal[AnalyzeTextOperationActionKind.ABSTRACTIVE_SUMMARIZATION]] + """The Abstractive Summarization kind of the long running task. Required. Abstractive + summarization task.""" + parameters: "AbstractiveSummarizationActionContent" + """Parameters for the Abstractive Summarization task.""" + + +class AllowOverlapEntityPolicyType(TypedDict, total=False): + """Represents the allow overlap policy. Will apply no post processing logic for the entities. + Whatever the model predicts is what will be returned to the user. This allows the user to get a + full view of every single model's possible values and apply their own custom logic on entity + selection. + + :ivar policy_kind: The entity OverlapPolicy object kind. Required. Represents + AllowOverlapEntityPolicyType. + :vartype policy_kind: Literal[PolicyKind.ALLOW_OVERLAP] + """ + + policyKind: Required[Literal[PolicyKind.ALLOW_OVERLAP]] + """The entity OverlapPolicy object kind. Required. Represents AllowOverlapEntityPolicyType.""" + + +class CharacterMaskPolicyType(TypedDict, total=False): + """Represents the policy of redacting with a redaction character. + + :ivar entity_types: (Optional) describes the PII categories to which the redaction policy will + be applied. If not specified, the redaction policy will be applied to all PII categories. + :vartype entity_types: list[Union[str, "PiiCategoriesExclude"]] + :ivar policy_name: (Optional) name of the redaction policy for identification purposes. + :vartype policy_name: str + :ivar is_default: (Optional) flag to indicate whether this redaction policy is the default + policy to be applied when no specific policy is defined for a PII category. Only one policy can + be marked as default. + :vartype is_default: bool + :ivar policy_kind: The entity RedactionPolicy object kind. Required. React detected entities + with redaction character. + :vartype policy_kind: Literal[RedactionPolicyKind.CHARACTER_MASK] + :ivar redaction_character: Optional parameter to use a Custom Character to be used for + redaction in PII responses. Default character will bce * as before. We allow specific ascii + characters for redaction. Known values are: "!", "#", "$", "%", "&", "*", "+", "-", "=", "?", + "@", "^", "_", and "~". + :vartype redaction_character: Union[str, "RedactionCharacter"] + :ivar unmask_length: Optional parameter to indicate the length of unmasked characters at the + end of the redacted PII entity. Default is 0. + :vartype unmask_length: int + :ivar unmask_from_end: Optional parameter to indicate whether to unmask characters from the end + of the redacted PII entity. Default is true. + :vartype unmask_from_end: bool + """ + + entityTypes: list[Union[str, "PiiCategoriesExclude"]] + """(Optional) describes the PII categories to which the redaction policy will be applied. If not + specified, the redaction policy will be applied to all PII categories.""" + policyName: str + """(Optional) name of the redaction policy for identification purposes.""" + isDefault: bool + """(Optional) flag to indicate whether this redaction policy is the default policy to be applied + when no specific policy is defined for a PII category. Only one policy can be marked as + default.""" + policyKind: Required[Literal[RedactionPolicyKind.CHARACTER_MASK]] + """The entity RedactionPolicy object kind. Required. React detected entities with redaction + character.""" + redactionCharacter: Union[str, "RedactionCharacter"] + """Optional parameter to use a Custom Character to be used for redaction in PII responses. Default + character will bce * as before. We allow specific ascii characters for redaction. Known values + are: \"!\", \"#\", \"$\", \"%\", \"&\", \"*\", \"+\", \"-\", \"=\", \"?\", \"@\", \"^\", \"_\", + and \"~\".""" + unmaskLength: int + """Optional parameter to indicate the length of unmasked characters at the end of the redacted PII + entity. Default is 0.""" + unmaskFromEnd: bool + """Optional parameter to indicate whether to unmask characters from the end of the redacted PII + entity. Default is true.""" + + +class ConfidenceScoreThreshold(TypedDict, total=False): + """Configuration for confidence score threshold for PII entity recognition. + + :ivar default: Minimum confidence score threshold for the PII entities to be returned in the + response. Entities with a confidence score below this threshold will be filtered out. Value + should be between 0.0 and 1.0. Required. + :vartype default: float + :ivar overrides: List of confidence score threshold overrides for specific PII categories. + :vartype overrides: list["ConfidenceScoreThresholdOverride"] + """ + + default: Required[float] + """Minimum confidence score threshold for the PII entities to be returned in the response. + Entities with a confidence score below this threshold will be filtered out. Value should be + between 0.0 and 1.0. Required.""" + overrides: list["ConfidenceScoreThresholdOverride"] + """List of confidence score threshold overrides for specific PII categories.""" + + +class ConfidenceScoreThresholdOverride(TypedDict, total=False): + """Confidence score threshold override for a specific PII category. + + :ivar entity: The PII category for which to override the confidence score threshold. Required. + Known values are: "ABARoutingNumber", "ARNationalIdentityNumber", "AUBankAccountNumber", + "AUDriversLicenseNumber", "AUMedicalAccountNumber", "AUPassportNumber", "AUTaxFileNumber", + "AUBusinessNumber", "AUCompanyNumber", "ATIdentityCard", "ATTaxIdentificationNumber", + "ATValueAddedTaxNumber", "AzureDocumentDBAuthKey", "AzureIAASDatabaseConnectionAndSQLString", + "AzureIoTConnectionString", "AzurePublishSettingPassword", "AzureRedisCacheString", "AzureSAS", + "AzureServiceBusString", "AzureStorageAccountKey", "AzureStorageAccountGeneric", + "BENationalNumber", "BENationalNumberV2", "BEValueAddedTaxNumber", "BRCPFNumber", + "BRLegalEntityNumber", "BRNationalIDRG", "BGUniformCivilNumber", "CABankAccountNumber", + "CADriversLicenseNumber", "CAHealthServiceNumber", "CAPassportNumber", + "CAPersonalHealthIdentification", "CASocialInsuranceNumber", "CLIdentityCardNumber", + "CNResidentIdentityCardNumber", "CreditCardNumber", "HRIdentityCardNumber", + "HRNationalIDNumber", "HRPersonalIdentificationNumber", "HRPersonalIdentificationOIBNumberV2", + "CYIdentityCard", "CYTaxIdentificationNumber", "CZPersonalIdentityNumber", + "CZPersonalIdentityV2", "DKPersonalIdentificationNumber", "DKPersonalIdentificationV2", + "DrugEnforcementAgencyNumber", "EEPersonalIdentificationCode", "EUDebitCardNumber", + "EUDriversLicenseNumber", "EUGPSCoordinates", "EUNationalIdentificationNumber", + "EUPassportNumber", "EUSocialSecurityNumber", "EUTaxIdentificationNumber", + "FIEuropeanHealthNumber", "FINationalID", "FINationalIDV2", "FIPassportNumber", + "FRDriversLicenseNumber", "FRHealthInsuranceNumber", "FRNationalID", "FRPassportNumber", + "FRSocialSecurityNumber", "FRTaxIdentificationNumber", "FRValueAddedTaxNumber", + "DEDriversLicenseNumber", "DEPassportNumber", "DEIdentityCardNumber", + "DETaxIdentificationNumber", "DEValueAddedNumber", "GRNationalIDCard", "GRNationalIDV2", + "GRTaxIdentificationNumber", "HKIdentityCardNumber", "HUValueAddedNumber", + "HUPersonalIdentificationNumber", "HUTaxIdentificationNumber", "INPermanentAccount", + "INUniqueIdentificationNumber", "IDIdentityCardNumber", "InternationalBankingAccountNumber", + "IEPersonalPublicServiceNumber", "IEPersonalPublicServiceNumberV2", "ILBankAccountNumber", + "ILNationalID", "ITDriversLicenseNumber", "ITFiscalCode", "ITValueAddedTaxNumber", + "JPBankAccountNumber", "JPDriversLicenseNumber", "JPPassportNumber", + "JPResidentRegistrationNumber", "JPSocialInsuranceNumber", "JPMyNumberCorporate", + "JPMyNumberPersonal", "JPResidenceCardNumber", "LVPersonalCode", "LTPersonalCode", + "LUNationalIdentificationNumberNatural", "LUNationalIdentificationNumberNonNatural", + "MYIdentityCardNumber", "MTIdentityCardNumber", "MTTaxIDNumber", "NLCitizensServiceNumber", + "NLCitizensServiceNumberV2", "NLTaxIdentificationNumber", "NLValueAddedTaxNumber", + "NZBankAccountNumber", "NZDriversLicenseNumber", "NZInlandRevenueNumber", + "NZMinistryOfHealthNumber", "NZSocialWelfareNumber", "NOIdentityNumber", + "PHUnifiedMultiPurposeIDNumber", "PLIdentityCard", "PLNationalID", "PLNationalIDV2", + "PLPassportNumber", "PLTaxIdentificationNumber", "PLREGONNumber", "PTCitizenCardNumber", + "PTCitizenCardNumberV2", "PTTaxIdentificationNumber", "ROPersonalNumericalCode", + "RUPassportNumberDomestic", "RUPassportNumberInternational", "SANationalID", + "SGNationalRegistrationIdentityCardNumber", "SKPersonalNumber", "SITaxIdentificationNumber", + "SIUniqueMasterCitizenNumber", "ZAIdentificationNumber", "KRResidentRegistrationNumber", + "ESDNI", "ESSocialSecurityNumber", "ESTaxIdentificationNumber", "SQLServerConnectionString", + "SENationalID", "SENationalIDV2", "SEPassportNumber", "SETaxIdentificationNumber", "SWIFTCode", + "CHSocialSecurityNumber", "TWNationalID", "TWPassportNumber", "TWResidentCertificate", + "THPopulationIdentificationCode", "TRNationalIdentificationNumber", "UKDriversLicenseNumber", + "UKElectoralRollNumber", "UKNationalHealthNumber", "UKNationalInsuranceNumber", + "UKUniqueTaxpayerNumber", "USUKPassportNumber", "USBankAccountNumber", + "USDriversLicenseNumber", "USIndividualTaxpayerIdentification", "USSocialSecurityNumber", + "UAPassportNumberDomestic", "UAPassportNumberInternational", "Organization", "Email", "URL", + "Age", "PhoneNumber", "IPAddress", "Date", "Person", "Address", "DateOfBirth", + "BankAccountNumber", "PassportNumber", "DriversLicenseNumber", "Neighborhood", "SortCode", + "PIN", "VIN", "VehicleIdentificationNumber", "LicensePlate", "KRPassportNumber", + "KRDriversLicenseNumber", "KRSocialSecurityNumber", "GovernmentIssuedId", "Password", + "NationalId", "ZipCode", "CVV", "ExpirationDate", "CASocialIdentificationNumber", + "USMedicareBeneficiaryId", "Location", "City", "State", "Airport", and "GPE". + :vartype entity: Union[str, "PiiCategoriesExclude"] + :ivar value: The confidence score threshold for the specified PII category. Required. + :vartype value: float + :ivar language: The 2 letter ISO 639-1 language for which the override applies. If not + specified, the override applies to all languages. Required. + :vartype language: str + """ + + entity: Required[Union[str, "PiiCategoriesExclude"]] + """The PII category for which to override the confidence score threshold. Required. Known values + are: \"ABARoutingNumber\", \"ARNationalIdentityNumber\", \"AUBankAccountNumber\", + \"AUDriversLicenseNumber\", \"AUMedicalAccountNumber\", \"AUPassportNumber\", + \"AUTaxFileNumber\", \"AUBusinessNumber\", \"AUCompanyNumber\", \"ATIdentityCard\", + \"ATTaxIdentificationNumber\", \"ATValueAddedTaxNumber\", \"AzureDocumentDBAuthKey\", + \"AzureIAASDatabaseConnectionAndSQLString\", \"AzureIoTConnectionString\", + \"AzurePublishSettingPassword\", \"AzureRedisCacheString\", \"AzureSAS\", + \"AzureServiceBusString\", \"AzureStorageAccountKey\", \"AzureStorageAccountGeneric\", + \"BENationalNumber\", \"BENationalNumberV2\", \"BEValueAddedTaxNumber\", \"BRCPFNumber\", + \"BRLegalEntityNumber\", \"BRNationalIDRG\", \"BGUniformCivilNumber\", \"CABankAccountNumber\", + \"CADriversLicenseNumber\", \"CAHealthServiceNumber\", \"CAPassportNumber\", + \"CAPersonalHealthIdentification\", \"CASocialInsuranceNumber\", \"CLIdentityCardNumber\", + \"CNResidentIdentityCardNumber\", \"CreditCardNumber\", \"HRIdentityCardNumber\", + \"HRNationalIDNumber\", \"HRPersonalIdentificationNumber\", + \"HRPersonalIdentificationOIBNumberV2\", \"CYIdentityCard\", \"CYTaxIdentificationNumber\", + \"CZPersonalIdentityNumber\", \"CZPersonalIdentityV2\", \"DKPersonalIdentificationNumber\", + \"DKPersonalIdentificationV2\", \"DrugEnforcementAgencyNumber\", + \"EEPersonalIdentificationCode\", \"EUDebitCardNumber\", \"EUDriversLicenseNumber\", + \"EUGPSCoordinates\", \"EUNationalIdentificationNumber\", \"EUPassportNumber\", + \"EUSocialSecurityNumber\", \"EUTaxIdentificationNumber\", \"FIEuropeanHealthNumber\", + \"FINationalID\", \"FINationalIDV2\", \"FIPassportNumber\", \"FRDriversLicenseNumber\", + \"FRHealthInsuranceNumber\", \"FRNationalID\", \"FRPassportNumber\", + \"FRSocialSecurityNumber\", \"FRTaxIdentificationNumber\", \"FRValueAddedTaxNumber\", + \"DEDriversLicenseNumber\", \"DEPassportNumber\", \"DEIdentityCardNumber\", + \"DETaxIdentificationNumber\", \"DEValueAddedNumber\", \"GRNationalIDCard\", + \"GRNationalIDV2\", \"GRTaxIdentificationNumber\", \"HKIdentityCardNumber\", + \"HUValueAddedNumber\", \"HUPersonalIdentificationNumber\", \"HUTaxIdentificationNumber\", + \"INPermanentAccount\", \"INUniqueIdentificationNumber\", \"IDIdentityCardNumber\", + \"InternationalBankingAccountNumber\", \"IEPersonalPublicServiceNumber\", + \"IEPersonalPublicServiceNumberV2\", \"ILBankAccountNumber\", \"ILNationalID\", + \"ITDriversLicenseNumber\", \"ITFiscalCode\", \"ITValueAddedTaxNumber\", + \"JPBankAccountNumber\", \"JPDriversLicenseNumber\", \"JPPassportNumber\", + \"JPResidentRegistrationNumber\", \"JPSocialInsuranceNumber\", \"JPMyNumberCorporate\", + \"JPMyNumberPersonal\", \"JPResidenceCardNumber\", \"LVPersonalCode\", \"LTPersonalCode\", + \"LUNationalIdentificationNumberNatural\", \"LUNationalIdentificationNumberNonNatural\", + \"MYIdentityCardNumber\", \"MTIdentityCardNumber\", \"MTTaxIDNumber\", + \"NLCitizensServiceNumber\", \"NLCitizensServiceNumberV2\", \"NLTaxIdentificationNumber\", + \"NLValueAddedTaxNumber\", \"NZBankAccountNumber\", \"NZDriversLicenseNumber\", + \"NZInlandRevenueNumber\", \"NZMinistryOfHealthNumber\", \"NZSocialWelfareNumber\", + \"NOIdentityNumber\", \"PHUnifiedMultiPurposeIDNumber\", \"PLIdentityCard\", \"PLNationalID\", + \"PLNationalIDV2\", \"PLPassportNumber\", \"PLTaxIdentificationNumber\", \"PLREGONNumber\", + \"PTCitizenCardNumber\", \"PTCitizenCardNumberV2\", \"PTTaxIdentificationNumber\", + \"ROPersonalNumericalCode\", \"RUPassportNumberDomestic\", \"RUPassportNumberInternational\", + \"SANationalID\", \"SGNationalRegistrationIdentityCardNumber\", \"SKPersonalNumber\", + \"SITaxIdentificationNumber\", \"SIUniqueMasterCitizenNumber\", \"ZAIdentificationNumber\", + \"KRResidentRegistrationNumber\", \"ESDNI\", \"ESSocialSecurityNumber\", + \"ESTaxIdentificationNumber\", \"SQLServerConnectionString\", \"SENationalID\", + \"SENationalIDV2\", \"SEPassportNumber\", \"SETaxIdentificationNumber\", \"SWIFTCode\", + \"CHSocialSecurityNumber\", \"TWNationalID\", \"TWPassportNumber\", \"TWResidentCertificate\", + \"THPopulationIdentificationCode\", \"TRNationalIdentificationNumber\", + \"UKDriversLicenseNumber\", \"UKElectoralRollNumber\", \"UKNationalHealthNumber\", + \"UKNationalInsuranceNumber\", \"UKUniqueTaxpayerNumber\", \"USUKPassportNumber\", + \"USBankAccountNumber\", \"USDriversLicenseNumber\", \"USIndividualTaxpayerIdentification\", + \"USSocialSecurityNumber\", \"UAPassportNumberDomestic\", \"UAPassportNumberInternational\", + \"Organization\", \"Email\", \"URL\", \"Age\", \"PhoneNumber\", \"IPAddress\", \"Date\", + \"Person\", \"Address\", \"DateOfBirth\", \"BankAccountNumber\", \"PassportNumber\", + \"DriversLicenseNumber\", \"Neighborhood\", \"SortCode\", \"PIN\", \"VIN\", + \"VehicleIdentificationNumber\", \"LicensePlate\", \"KRPassportNumber\", + \"KRDriversLicenseNumber\", \"KRSocialSecurityNumber\", \"GovernmentIssuedId\", \"Password\", + \"NationalId\", \"ZipCode\", \"CVV\", \"ExpirationDate\", \"CASocialIdentificationNumber\", + \"USMedicareBeneficiaryId\", \"Location\", \"City\", \"State\", \"Airport\", and \"GPE\".""" + value: Required[float] + """The confidence score threshold for the specified PII category. Required.""" + language: Required[str] + """The 2 letter ISO 639-1 language for which the override applies. If not specified, the override + applies to all languages. Required.""" + + +class CustomEntitiesActionContent(TypedDict, total=False): + """Supported parameters for a Custom Entities task. + + :ivar logging_opt_out: logging opt out. + :vartype logging_opt_out: bool + :ivar project_name: This field indicates the project name for the model. Required. + :vartype project_name: str + :ivar deployment_name: This field indicates the deployment name for the model. Required. + :vartype deployment_name: str + :ivar string_index_type: Optional parameter to provide the string index type used to interpret + string offsets. Defaults to TextElements (Graphemes). Known values are: "TextElements_v8", + "UnicodeCodePoint", and "Utf16CodeUnit". + :vartype string_index_type: Union[str, "StringIndexType"] + """ + + loggingOptOut: bool + """logging opt out.""" + projectName: Required[str] + """This field indicates the project name for the model. Required.""" + deploymentName: Required[str] + """This field indicates the deployment name for the model. Required.""" + stringIndexType: Union[str, "StringIndexType"] + """Optional parameter to provide the string index type used to interpret string offsets. Defaults + to TextElements (Graphemes). Known values are: \"TextElements_v8\", \"UnicodeCodePoint\", and + \"Utf16CodeUnit\".""" + + +class CustomEntitiesLROTask(TypedDict, total=False): + """Contains the custom text LRO task. + + :ivar name: task name. + :vartype name: str + :ivar kind: Kind of the task. Required. Custom entity recognition task. + :vartype kind: Literal[AnalyzeTextOperationActionKind.CUSTOM_ENTITY_RECOGNITION] + :ivar parameters: task parameters. + :vartype parameters: "CustomEntitiesActionContent" + """ + + taskName: str + """task name.""" + kind: Required[Literal[AnalyzeTextOperationActionKind.CUSTOM_ENTITY_RECOGNITION]] + """Kind of the task. Required. Custom entity recognition task.""" + parameters: "CustomEntitiesActionContent" + """task parameters.""" + + +class CustomMultiLabelClassificationActionContent(TypedDict, total=False): # pylint: disable=name-too-long + """Supported parameters for a Custom Multi Classification task. + + :ivar logging_opt_out: logging opt out. + :vartype logging_opt_out: bool + :ivar project_name: This field indicates the project name for the model. Required. + :vartype project_name: str + :ivar deployment_name: This field indicates the deployment name for the model. Required. + :vartype deployment_name: str + """ + + loggingOptOut: bool + """logging opt out.""" + projectName: Required[str] + """This field indicates the project name for the model. Required.""" + deploymentName: Required[str] + """This field indicates the deployment name for the model. Required.""" + + +class CustomMultiLabelClassificationOperationAction(TypedDict, total=False): # pylint: disable=name-too-long + """Use custom models to classify text into multi label taxonomy. + + :ivar name: task name. + :vartype name: str + :ivar kind: Kind of the task. Required. Custom multi label classification task. + :vartype kind: Literal[AnalyzeTextOperationActionKind.CUSTOM_MULTI_LABEL_CLASSIFICATION] + :ivar action_content: Task parameters. + :vartype action_content: "CustomMultiLabelClassificationActionContent" + """ + + taskName: str + """task name.""" + kind: Required[Literal[AnalyzeTextOperationActionKind.CUSTOM_MULTI_LABEL_CLASSIFICATION]] + """Kind of the task. Required. Custom multi label classification task.""" + parameters: "CustomMultiLabelClassificationActionContent" + """Task parameters.""" + + +class CustomSingleLabelClassificationActionContent(TypedDict, total=False): # pylint: disable=name-too-long + """Supported parameters for a Custom Single Classification task. + + :ivar logging_opt_out: logging opt out. + :vartype logging_opt_out: bool + :ivar project_name: This field indicates the project name for the model. Required. + :vartype project_name: str + :ivar deployment_name: This field indicates the deployment name for the model. Required. + :vartype deployment_name: str + """ + + loggingOptOut: bool + """logging opt out.""" + projectName: Required[str] + """This field indicates the project name for the model. Required.""" + deploymentName: Required[str] + """This field indicates the deployment name for the model. Required.""" + + +class CustomSingleLabelClassificationOperationAction(TypedDict, total=False): # pylint: disable=name-too-long + """Use custom models to classify text into single label taxonomy. + + :ivar name: task name. + :vartype name: str + :ivar kind: Kind of the task. Required. Custom single label classification task. + :vartype kind: Literal[AnalyzeTextOperationActionKind.CUSTOM_SINGLE_LABEL_CLASSIFICATION] + :ivar action_content: Task parameters. + :vartype action_content: "CustomSingleLabelClassificationActionContent" + """ + + taskName: str + """task name.""" + kind: Required[Literal[AnalyzeTextOperationActionKind.CUSTOM_SINGLE_LABEL_CLASSIFICATION]] + """Kind of the task. Required. Custom single label classification task.""" + parameters: "CustomSingleLabelClassificationActionContent" + """Task parameters.""" + + +class EntitiesActionContent(TypedDict, total=False): + """Supported parameters for an Entity Recognition task. + + :ivar logging_opt_out: logging opt out. + :vartype logging_opt_out: bool + :ivar model_version: model version. + :vartype model_version: str + :ivar string_index_type: (Optional) parameter to provide the string index type used to + interpret string offsets. Defaults to TextElements (Graphemes). Known values are: + "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit". + :vartype string_index_type: Union[str, "StringIndexType"] + :ivar inclusions: (Optional) request parameter that limits the output to the requested entity + types included in this list. We will apply inclusionList before exclusionList. + :vartype inclusions: list[Union[str, "EntityCategory"]] + :ivar exclusions: (Optional) request parameter that filters out any entities that are included + the excludeList. When a user specifies an excludeList, they cannot get a prediction returned + with an entity in that list. We will apply inclusionList before exclusionList. + :vartype exclusions: list[Union[str, "EntityCategory"]] + :ivar overlap_policy: (Optional) describes the type of overlap policy to apply to the ner + output. + :vartype overlap_policy: "EntityOverlapPolicy" + :ivar inference_options: (Optional) request parameter that allows the user to provide settings + for running the inference. + :vartype inference_options: "EntityInferenceConfig" + """ + + loggingOptOut: bool + """logging opt out.""" + modelVersion: str + """model version.""" + stringIndexType: Union[str, "StringIndexType"] + """(Optional) parameter to provide the string index type used to interpret string offsets. + Defaults to TextElements (Graphemes). Known values are: \"TextElements_v8\", + \"UnicodeCodePoint\", and \"Utf16CodeUnit\".""" + inclusionList: list[Union[str, "EntityCategory"]] + """(Optional) request parameter that limits the output to the requested entity types included in + this list. We will apply inclusionList before exclusionList.""" + exclusionList: list[Union[str, "EntityCategory"]] + """(Optional) request parameter that filters out any entities that are included the excludeList. + When a user specifies an excludeList, they cannot get a prediction returned with an entity in + that list. We will apply inclusionList before exclusionList.""" + overlapPolicy: "EntityOverlapPolicy" + """(Optional) describes the type of overlap policy to apply to the ner output.""" + inferenceOptions: "EntityInferenceConfig" + """(Optional) request parameter that allows the user to provide settings for running the + inference.""" + + +class EntitiesLROTask(TypedDict, total=False): + """An object representing the task definition for an Entities Recognition task. + + :ivar name: task name. + :vartype name: str + :ivar kind: The kind of task. Required. Entity recognition task. + :vartype kind: Literal[AnalyzeTextOperationActionKind.ENTITY_RECOGNITION] + :ivar parameters: Task parameters. + :vartype parameters: "EntitiesActionContent" + """ + + taskName: str + """task name.""" + kind: Required[Literal[AnalyzeTextOperationActionKind.ENTITY_RECOGNITION]] + """The kind of task. Required. Entity recognition task.""" + parameters: "EntitiesActionContent" + """Task parameters.""" + + +class EntityInferenceConfig(TypedDict, total=False): + """The class that houses the inference options allowed for named entity recognition. + + :ivar exclude_normalized_values: Option to include/exclude the detected entity values to be + normalized and included in the metadata. The numeric and temporal entity types support value + normalization. + :vartype exclude_normalized_values: bool + """ + + excludeNormalizedValues: bool + """Option to include/exclude the detected entity values to be normalized and included in the + metadata. The numeric and temporal entity types support value normalization.""" + + +class EntityLinkingActionContent(TypedDict, total=False): + """Supported parameters for an Entity Linking task. + + :ivar logging_opt_out: logging opt out. + :vartype logging_opt_out: bool + :ivar model_version: model version. + :vartype model_version: str + :ivar string_index_type: Optional parameter to provide the string index type used to interpret + string offsets. Defaults to TextElements (Graphemes). Known values are: "TextElements_v8", + "UnicodeCodePoint", and "Utf16CodeUnit". + :vartype string_index_type: Union[str, "StringIndexType"] + """ + + loggingOptOut: bool + """logging opt out.""" + modelVersion: str + """model version.""" + stringIndexType: Union[str, "StringIndexType"] + """Optional parameter to provide the string index type used to interpret string offsets. Defaults + to TextElements (Graphemes). Known values are: \"TextElements_v8\", \"UnicodeCodePoint\", and + \"Utf16CodeUnit\".""" + + +class EntityLinkingLROTask(TypedDict, total=False): + """Contains the analyze text Entity linking LRO task. + + :ivar name: task name. + :vartype name: str + :ivar kind: Kind of task result. Required. Entity linking task. + :vartype kind: Literal[AnalyzeTextOperationActionKind.ENTITY_LINKING] + :ivar parameters: Task parameters. + :vartype parameters: "EntityLinkingActionContent" + """ + + taskName: str + """task name.""" + kind: Required[Literal[AnalyzeTextOperationActionKind.ENTITY_LINKING]] + """Kind of task result. Required. Entity linking task.""" + parameters: "EntityLinkingActionContent" + """Task parameters.""" + + +class EntityMaskPolicyType(TypedDict, total=False): + """Represents the policy of redacting PII with the entity type. + + :ivar entity_types: (Optional) describes the PII categories to which the redaction policy will + be applied. If not specified, the redaction policy will be applied to all PII categories. + :vartype entity_types: list[Union[str, "PiiCategoriesExclude"]] + :ivar policy_name: (Optional) name of the redaction policy for identification purposes. + :vartype policy_name: str + :ivar is_default: (Optional) flag to indicate whether this redaction policy is the default + policy to be applied when no specific policy is defined for a PII category. Only one policy can + be marked as default. + :vartype is_default: bool + :ivar policy_kind: The entity OverlapPolicy object kind. Required. Redact detected entities + with entity type. + :vartype policy_kind: Literal[RedactionPolicyKind.ENTITY_MASK] + """ + + entityTypes: list[Union[str, "PiiCategoriesExclude"]] + """(Optional) describes the PII categories to which the redaction policy will be applied. If not + specified, the redaction policy will be applied to all PII categories.""" + policyName: str + """(Optional) name of the redaction policy for identification purposes.""" + isDefault: bool + """(Optional) flag to indicate whether this redaction policy is the default policy to be applied + when no specific policy is defined for a PII category. Only one policy can be marked as + default.""" + policyKind: Required[Literal[RedactionPolicyKind.ENTITY_MASK]] + """The entity OverlapPolicy object kind. Required. Redact detected entities with entity type.""" + + +class EntitySynonym(TypedDict, total=False): + """The entity synonyms used to enhance pii entity detection. + + :ivar synonym: The synonym to be used for context. Required. + :vartype synonym: str + :ivar language: The 2 letter ISO 639-1 language the synonym. + :vartype language: str + """ + + synonym: Required[str] + """The synonym to be used for context. Required.""" + language: str + """The 2 letter ISO 639-1 language the synonym.""" + + +class EntitySynonyms(TypedDict, total=False): + """Object that allows the user to provide synonyms for context words that to enhance pii entity + detection. + + :ivar entity_type: The entity name. Required. Known values are: "ABARoutingNumber", + "ARNationalIdentityNumber", "AUBankAccountNumber", "AUDriversLicenseNumber", + "AUMedicalAccountNumber", "AUPassportNumber", "AUTaxFileNumber", "AUBusinessNumber", + "AUCompanyNumber", "ATIdentityCard", "ATTaxIdentificationNumber", "ATValueAddedTaxNumber", + "AzureDocumentDBAuthKey", "AzureIAASDatabaseConnectionAndSQLString", + "AzureIoTConnectionString", "AzurePublishSettingPassword", "AzureRedisCacheString", "AzureSAS", + "AzureServiceBusString", "AzureStorageAccountKey", "AzureStorageAccountGeneric", + "BENationalNumber", "BENationalNumberV2", "BEValueAddedTaxNumber", "BRCPFNumber", + "BRLegalEntityNumber", "BRNationalIDRG", "BGUniformCivilNumber", "CABankAccountNumber", + "CADriversLicenseNumber", "CAHealthServiceNumber", "CAPassportNumber", + "CAPersonalHealthIdentification", "CASocialInsuranceNumber", "CLIdentityCardNumber", + "CNResidentIdentityCardNumber", "CreditCardNumber", "HRIdentityCardNumber", + "HRNationalIDNumber", "HRPersonalIdentificationNumber", "HRPersonalIdentificationOIBNumberV2", + "CYIdentityCard", "CYTaxIdentificationNumber", "CZPersonalIdentityNumber", + "CZPersonalIdentityV2", "DKPersonalIdentificationNumber", "DKPersonalIdentificationV2", + "DrugEnforcementAgencyNumber", "EEPersonalIdentificationCode", "EUDebitCardNumber", + "EUDriversLicenseNumber", "EUGPSCoordinates", "EUNationalIdentificationNumber", + "EUPassportNumber", "EUSocialSecurityNumber", "EUTaxIdentificationNumber", + "FIEuropeanHealthNumber", "FINationalID", "FINationalIDV2", "FIPassportNumber", + "FRDriversLicenseNumber", "FRHealthInsuranceNumber", "FRNationalID", "FRPassportNumber", + "FRSocialSecurityNumber", "FRTaxIdentificationNumber", "FRValueAddedTaxNumber", + "DEDriversLicenseNumber", "DEPassportNumber", "DEIdentityCardNumber", + "DETaxIdentificationNumber", "DEValueAddedNumber", "GRNationalIDCard", "GRNationalIDV2", + "GRTaxIdentificationNumber", "HKIdentityCardNumber", "HUValueAddedNumber", + "HUPersonalIdentificationNumber", "HUTaxIdentificationNumber", "INPermanentAccount", + "INUniqueIdentificationNumber", "IDIdentityCardNumber", "InternationalBankingAccountNumber", + "IEPersonalPublicServiceNumber", "IEPersonalPublicServiceNumberV2", "ILBankAccountNumber", + "ILNationalID", "ITDriversLicenseNumber", "ITFiscalCode", "ITValueAddedTaxNumber", + "JPBankAccountNumber", "JPDriversLicenseNumber", "JPPassportNumber", + "JPResidentRegistrationNumber", "JPSocialInsuranceNumber", "JPMyNumberCorporate", + "JPMyNumberPersonal", "JPResidenceCardNumber", "LVPersonalCode", "LTPersonalCode", + "LUNationalIdentificationNumberNatural", "LUNationalIdentificationNumberNonNatural", + "MYIdentityCardNumber", "MTIdentityCardNumber", "MTTaxIDNumber", "NLCitizensServiceNumber", + "NLCitizensServiceNumberV2", "NLTaxIdentificationNumber", "NLValueAddedTaxNumber", + "NZBankAccountNumber", "NZDriversLicenseNumber", "NZInlandRevenueNumber", + "NZMinistryOfHealthNumber", "NZSocialWelfareNumber", "NOIdentityNumber", + "PHUnifiedMultiPurposeIDNumber", "PLIdentityCard", "PLNationalID", "PLNationalIDV2", + "PLPassportNumber", "PLTaxIdentificationNumber", "PLREGONNumber", "PTCitizenCardNumber", + "PTCitizenCardNumberV2", "PTTaxIdentificationNumber", "ROPersonalNumericalCode", + "RUPassportNumberDomestic", "RUPassportNumberInternational", "SANationalID", + "SGNationalRegistrationIdentityCardNumber", "SKPersonalNumber", "SITaxIdentificationNumber", + "SIUniqueMasterCitizenNumber", "ZAIdentificationNumber", "KRResidentRegistrationNumber", + "ESDNI", "ESSocialSecurityNumber", "ESTaxIdentificationNumber", "SQLServerConnectionString", + "SENationalID", "SENationalIDV2", "SEPassportNumber", "SETaxIdentificationNumber", "SWIFTCode", + "CHSocialSecurityNumber", "TWNationalID", "TWPassportNumber", "TWResidentCertificate", + "THPopulationIdentificationCode", "TRNationalIdentificationNumber", "UKDriversLicenseNumber", + "UKElectoralRollNumber", "UKNationalHealthNumber", "UKNationalInsuranceNumber", + "UKUniqueTaxpayerNumber", "USUKPassportNumber", "USBankAccountNumber", + "USDriversLicenseNumber", "USIndividualTaxpayerIdentification", "USSocialSecurityNumber", + "UAPassportNumberDomestic", "UAPassportNumberInternational", "Organization", "Email", "URL", + "Age", "PhoneNumber", "IPAddress", "Date", "Person", "Address", "DateOfBirth", + "BankAccountNumber", "PassportNumber", "DriversLicenseNumber", "Neighborhood", "SortCode", + "PIN", "VIN", "VehicleIdentificationNumber", "LicensePlate", "KRPassportNumber", + "KRDriversLicenseNumber", "KRSocialSecurityNumber", "GovernmentIssuedId", "Password", + "NationalId", "ZipCode", "CVV", "ExpirationDate", "CASocialIdentificationNumber", + "USMedicareBeneficiaryId", "Location", "City", "State", "Airport", and "GPE". + :vartype entity_type: Union[str, "PiiCategoriesExclude"] + :ivar synonyms: The entity synonyms. Required. + :vartype synonyms: list["EntitySynonym"] + """ + + entityType: Required[Union[str, "PiiCategoriesExclude"]] + """The entity name. Required. Known values are: \"ABARoutingNumber\", + \"ARNationalIdentityNumber\", \"AUBankAccountNumber\", \"AUDriversLicenseNumber\", + \"AUMedicalAccountNumber\", \"AUPassportNumber\", \"AUTaxFileNumber\", \"AUBusinessNumber\", + \"AUCompanyNumber\", \"ATIdentityCard\", \"ATTaxIdentificationNumber\", + \"ATValueAddedTaxNumber\", \"AzureDocumentDBAuthKey\", + \"AzureIAASDatabaseConnectionAndSQLString\", \"AzureIoTConnectionString\", + \"AzurePublishSettingPassword\", \"AzureRedisCacheString\", \"AzureSAS\", + \"AzureServiceBusString\", \"AzureStorageAccountKey\", \"AzureStorageAccountGeneric\", + \"BENationalNumber\", \"BENationalNumberV2\", \"BEValueAddedTaxNumber\", \"BRCPFNumber\", + \"BRLegalEntityNumber\", \"BRNationalIDRG\", \"BGUniformCivilNumber\", \"CABankAccountNumber\", + \"CADriversLicenseNumber\", \"CAHealthServiceNumber\", \"CAPassportNumber\", + \"CAPersonalHealthIdentification\", \"CASocialInsuranceNumber\", \"CLIdentityCardNumber\", + \"CNResidentIdentityCardNumber\", \"CreditCardNumber\", \"HRIdentityCardNumber\", + \"HRNationalIDNumber\", \"HRPersonalIdentificationNumber\", + \"HRPersonalIdentificationOIBNumberV2\", \"CYIdentityCard\", \"CYTaxIdentificationNumber\", + \"CZPersonalIdentityNumber\", \"CZPersonalIdentityV2\", \"DKPersonalIdentificationNumber\", + \"DKPersonalIdentificationV2\", \"DrugEnforcementAgencyNumber\", + \"EEPersonalIdentificationCode\", \"EUDebitCardNumber\", \"EUDriversLicenseNumber\", + \"EUGPSCoordinates\", \"EUNationalIdentificationNumber\", \"EUPassportNumber\", + \"EUSocialSecurityNumber\", \"EUTaxIdentificationNumber\", \"FIEuropeanHealthNumber\", + \"FINationalID\", \"FINationalIDV2\", \"FIPassportNumber\", \"FRDriversLicenseNumber\", + \"FRHealthInsuranceNumber\", \"FRNationalID\", \"FRPassportNumber\", + \"FRSocialSecurityNumber\", \"FRTaxIdentificationNumber\", \"FRValueAddedTaxNumber\", + \"DEDriversLicenseNumber\", \"DEPassportNumber\", \"DEIdentityCardNumber\", + \"DETaxIdentificationNumber\", \"DEValueAddedNumber\", \"GRNationalIDCard\", + \"GRNationalIDV2\", \"GRTaxIdentificationNumber\", \"HKIdentityCardNumber\", + \"HUValueAddedNumber\", \"HUPersonalIdentificationNumber\", \"HUTaxIdentificationNumber\", + \"INPermanentAccount\", \"INUniqueIdentificationNumber\", \"IDIdentityCardNumber\", + \"InternationalBankingAccountNumber\", \"IEPersonalPublicServiceNumber\", + \"IEPersonalPublicServiceNumberV2\", \"ILBankAccountNumber\", \"ILNationalID\", + \"ITDriversLicenseNumber\", \"ITFiscalCode\", \"ITValueAddedTaxNumber\", + \"JPBankAccountNumber\", \"JPDriversLicenseNumber\", \"JPPassportNumber\", + \"JPResidentRegistrationNumber\", \"JPSocialInsuranceNumber\", \"JPMyNumberCorporate\", + \"JPMyNumberPersonal\", \"JPResidenceCardNumber\", \"LVPersonalCode\", \"LTPersonalCode\", + \"LUNationalIdentificationNumberNatural\", \"LUNationalIdentificationNumberNonNatural\", + \"MYIdentityCardNumber\", \"MTIdentityCardNumber\", \"MTTaxIDNumber\", + \"NLCitizensServiceNumber\", \"NLCitizensServiceNumberV2\", \"NLTaxIdentificationNumber\", + \"NLValueAddedTaxNumber\", \"NZBankAccountNumber\", \"NZDriversLicenseNumber\", + \"NZInlandRevenueNumber\", \"NZMinistryOfHealthNumber\", \"NZSocialWelfareNumber\", + \"NOIdentityNumber\", \"PHUnifiedMultiPurposeIDNumber\", \"PLIdentityCard\", \"PLNationalID\", + \"PLNationalIDV2\", \"PLPassportNumber\", \"PLTaxIdentificationNumber\", \"PLREGONNumber\", + \"PTCitizenCardNumber\", \"PTCitizenCardNumberV2\", \"PTTaxIdentificationNumber\", + \"ROPersonalNumericalCode\", \"RUPassportNumberDomestic\", \"RUPassportNumberInternational\", + \"SANationalID\", \"SGNationalRegistrationIdentityCardNumber\", \"SKPersonalNumber\", + \"SITaxIdentificationNumber\", \"SIUniqueMasterCitizenNumber\", \"ZAIdentificationNumber\", + \"KRResidentRegistrationNumber\", \"ESDNI\", \"ESSocialSecurityNumber\", + \"ESTaxIdentificationNumber\", \"SQLServerConnectionString\", \"SENationalID\", + \"SENationalIDV2\", \"SEPassportNumber\", \"SETaxIdentificationNumber\", \"SWIFTCode\", + \"CHSocialSecurityNumber\", \"TWNationalID\", \"TWPassportNumber\", \"TWResidentCertificate\", + \"THPopulationIdentificationCode\", \"TRNationalIdentificationNumber\", + \"UKDriversLicenseNumber\", \"UKElectoralRollNumber\", \"UKNationalHealthNumber\", + \"UKNationalInsuranceNumber\", \"UKUniqueTaxpayerNumber\", \"USUKPassportNumber\", + \"USBankAccountNumber\", \"USDriversLicenseNumber\", \"USIndividualTaxpayerIdentification\", + \"USSocialSecurityNumber\", \"UAPassportNumberDomestic\", \"UAPassportNumberInternational\", + \"Organization\", \"Email\", \"URL\", \"Age\", \"PhoneNumber\", \"IPAddress\", \"Date\", + \"Person\", \"Address\", \"DateOfBirth\", \"BankAccountNumber\", \"PassportNumber\", + \"DriversLicenseNumber\", \"Neighborhood\", \"SortCode\", \"PIN\", \"VIN\", + \"VehicleIdentificationNumber\", \"LicensePlate\", \"KRPassportNumber\", + \"KRDriversLicenseNumber\", \"KRSocialSecurityNumber\", \"GovernmentIssuedId\", \"Password\", + \"NationalId\", \"ZipCode\", \"CVV\", \"ExpirationDate\", \"CASocialIdentificationNumber\", + \"USMedicareBeneficiaryId\", \"Location\", \"City\", \"State\", \"Airport\", and \"GPE\".""" + synonyms: Required[list["EntitySynonym"]] + """The entity synonyms. Required.""" + + +class ExtractiveSummarizationActionContent(TypedDict, total=False): + """Supported parameters for an Extractive Summarization task. + + :ivar logging_opt_out: logging opt out. + :vartype logging_opt_out: bool + :ivar model_version: model version. + :vartype model_version: str + :ivar sentence_count: Specifies the number of sentences in the extracted summary. + :vartype sentence_count: int + :ivar sort_by: Specifies how to sort the extracted summaries. Known values are: "Offset" and + "Rank". + :vartype sort_by: Union[str, "ExtractiveSummarizationSortingCriteria"] + :ivar string_index_type: Specifies the method used to interpret string offsets. Known values + are: "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit". + :vartype string_index_type: Union[str, "StringIndexType"] + :ivar query: (Optional) If provided, the query will be used to extract most relevant sentences + from the document. + :vartype query: str + """ + + loggingOptOut: bool + """logging opt out.""" + modelVersion: str + """model version.""" + sentenceCount: int + """Specifies the number of sentences in the extracted summary.""" + sortBy: Union[str, "ExtractiveSummarizationSortingCriteria"] + """Specifies how to sort the extracted summaries. Known values are: \"Offset\" and \"Rank\".""" + stringIndexType: Union[str, "StringIndexType"] + """Specifies the method used to interpret string offsets. Known values are: \"TextElements_v8\", + \"UnicodeCodePoint\", and \"Utf16CodeUnit\".""" + query: str + """(Optional) If provided, the query will be used to extract most relevant sentences from the + document.""" + + +class ExtractiveSummarizationOperationAction(TypedDict, total=False): + """An object representing the task definition for an Extractive Summarization task. + + :ivar name: task name. + :vartype name: str + :ivar kind: The Extractive Summarization kind of the long running task. Required. Extractive + summarization task. + :vartype kind: Literal[AnalyzeTextOperationActionKind.EXTRACTIVE_SUMMARIZATION] + :ivar action_content: Parameters for the Extractive Summarization task. + :vartype action_content: "ExtractiveSummarizationActionContent" + """ + + taskName: str + """task name.""" + kind: Required[Literal[AnalyzeTextOperationActionKind.EXTRACTIVE_SUMMARIZATION]] + """The Extractive Summarization kind of the long running task. Required. Extractive summarization + task.""" + parameters: "ExtractiveSummarizationActionContent" + """Parameters for the Extractive Summarization task.""" + + +class HealthcareLROTask(TypedDict, total=False): + """The long running task to be performed by the service on the Healthcare input documents. + + :ivar name: task name. + :vartype name: str + :ivar kind: Healthcare kind of the long running task. Required. Healthcare task. + :vartype kind: Literal[AnalyzeTextOperationActionKind.HEALTHCARE] + :ivar parameters: Parameters for the Healthcare task. + :vartype parameters: "HealthcareTaskParameters" + """ + + taskName: str + """task name.""" + kind: Required[Literal[AnalyzeTextOperationActionKind.HEALTHCARE]] + """Healthcare kind of the long running task. Required. Healthcare task.""" + parameters: "HealthcareTaskParameters" + """Parameters for the Healthcare task.""" + + +class HealthcareTaskParameters(TypedDict, total=False): + """Supported parameters for a Healthcare task. + + :ivar logging_opt_out: logging opt out. + :vartype logging_opt_out: bool + :ivar model_version: model version. + :vartype model_version: str + :ivar string_index_type: Specifies the method used to interpret string offsets. Known values + are: "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit". + :vartype string_index_type: Union[str, "StringIndexType"] + :ivar fhir_version: The FHIR Spec version that the result will use to format the fhirBundle. + For additional information see `https://www.hl7.org/fhir/overview.html + `_. "4.0.1" + :vartype fhir_version: Union[str, "FhirVersion"] + :ivar document_type: Document type that can be provided as input for Fhir Documents. Expect to + have fhirVersion provided when used. Behavior of using None enum is the same as not using the + documentType parameter. Known values are: "None", "ClinicalTrial", "DischargeSummary", + "ProgressNote", "HistoryAndPhysical", "Consult", "Imaging", "Pathology", and "ProcedureNote". + :vartype document_type: Union[str, "HealthcareDocumentType"] + """ + + loggingOptOut: bool + """logging opt out.""" + modelVersion: str + """model version.""" + stringIndexType: Union[str, "StringIndexType"] + """Specifies the method used to interpret string offsets. Known values are: \"TextElements_v8\", + \"UnicodeCodePoint\", and \"Utf16CodeUnit\".""" + fhirVersion: Union[str, "FhirVersion"] + """The FHIR Spec version that the result will use to format the fhirBundle. For additional + information see `https://www.hl7.org/fhir/overview.html + `_. \"4.0.1\"""" + documentType: Union[str, "HealthcareDocumentType"] + """Document type that can be provided as input for Fhir Documents. Expect to have fhirVersion + provided when used. Behavior of using None enum is the same as not using the documentType + parameter. Known values are: \"None\", \"ClinicalTrial\", \"DischargeSummary\", + \"ProgressNote\", \"HistoryAndPhysical\", \"Consult\", \"Imaging\", \"Pathology\", and + \"ProcedureNote\".""" + + +class KeyPhraseActionContent(TypedDict, total=False): + """Supported parameters for a Key Phrase Extraction task. + + :ivar logging_opt_out: logging opt out. + :vartype logging_opt_out: bool + :ivar model_version: model version. + :vartype model_version: str + """ + + loggingOptOut: bool + """logging opt out.""" + modelVersion: str + """model version.""" + + +class KeyPhraseLROTask(TypedDict, total=False): + """An object representing the task definition for a Key Phrase Extraction task. + + :ivar name: task name. + :vartype name: str + :ivar kind: Kind of the task. Required. Key phrase extraction task. + :vartype kind: Literal[AnalyzeTextOperationActionKind.KEY_PHRASE_EXTRACTION] + :ivar parameters: Key phrase extraction task parameters. + :vartype parameters: "KeyPhraseActionContent" + """ + + taskName: str + """task name.""" + kind: Required[Literal[AnalyzeTextOperationActionKind.KEY_PHRASE_EXTRACTION]] + """Kind of the task. Required. Key phrase extraction task.""" + parameters: "KeyPhraseActionContent" + """Key phrase extraction task parameters.""" + + +class LanguageDetectionActionContent(TypedDict, total=False): + """Supported parameters for a Language Detection task. + + :ivar logging_opt_out: logging opt out. + :vartype logging_opt_out: bool + :ivar model_version: model version. + :vartype model_version: str + """ + + loggingOptOut: bool + """logging opt out.""" + modelVersion: str + """model version.""" + + +class LanguageDetectionTextInput(TypedDict, total=False): + """Contains the language detection document analysis input. + + :ivar language_inputs: List of documents to be analyzed. + :vartype language_inputs: list["LanguageInput"] + """ + + documents: list["LanguageInput"] + """List of documents to be analyzed.""" + + +class LanguageInput(TypedDict, total=False): + """Contains the language detection input. + + :ivar id: A unique, non-empty document identifier. Required. + :vartype id: str + :ivar text: The input text to process. Required. + :vartype text: str + :ivar country_hint: The country hint to help with language detection of the text. + :vartype country_hint: str + """ + + id: Required[str] + """A unique, non-empty document identifier. Required.""" + text: Required[str] + """The input text to process. Required.""" + countryHint: str + """The country hint to help with language detection of the text.""" + + +class MatchLongestEntityPolicyType(TypedDict, total=False): + """Represents the Match longest overlap policy. No overlapping entities as far as it is possible. + 1. If there are overlapping entities, the longest one will be returned. 2. If the set of + characters predicted for 2 or more entities are exactly the same, select the entity that has + the higher confidence score.3. If the entity scores are identical, return all entities that are + still present after applying the previous rules. 3. If there is partial overlap (as in Hello + Text Analytics) follow the above steps starting from 1. + + :ivar policy_kind: The entity OverlapPolicy object kind. Required. Represents + MatchLongestEntityPolicyType. + :vartype policy_kind: Literal[PolicyKind.MATCH_LONGEST] + """ + + policyKind: Required[Literal[PolicyKind.MATCH_LONGEST]] + """The entity OverlapPolicy object kind. Required. Represents MatchLongestEntityPolicyType.""" + + +class MultiLanguageInput(TypedDict, total=False): + """Contains an input document to be analyzed by the service. + + :ivar id: A unique, non-empty document identifier. Required. + :vartype id: str + :ivar text: The input text to process. Required. + :vartype text: str + :ivar language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + example, use \\"en\\" for English; \\"es\\" for Spanish etc. If not set, use \\"en\\" for + English as default. (Following only applies to 2023-04-15-preview and above) For Auto Language + Detection, use \\"auto\\". If not set, use \\"en\\" for English as default. + :vartype language: str + """ + + id: Required[str] + """A unique, non-empty document identifier. Required.""" + text: Required[str] + """The input text to process. Required.""" + language: str + """(Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use + \\"en\\" for English; \\"es\\" for Spanish etc. If not set, use \\"en\\" for English as + default. (Following only applies to 2023-04-15-preview and above) For Auto Language Detection, + use \\"auto\\". If not set, use \\"en\\" for English as default.""" + + +class MultiLanguageTextInput(TypedDict, total=False): + """Collection of input documents to be analyzed by the service. + + :ivar multi_language_inputs: The input documents to be analyzed. + :vartype multi_language_inputs: list["MultiLanguageInput"] + """ + + documents: list["MultiLanguageInput"] + """The input documents to be analyzed.""" + + +class NoMaskPolicyType(TypedDict, total=False): + """Represents the policy of not redacting found PII. + + :ivar entity_types: (Optional) describes the PII categories to which the redaction policy will + be applied. If not specified, the redaction policy will be applied to all PII categories. + :vartype entity_types: list[Union[str, "PiiCategoriesExclude"]] + :ivar policy_name: (Optional) name of the redaction policy for identification purposes. + :vartype policy_name: str + :ivar is_default: (Optional) flag to indicate whether this redaction policy is the default + policy to be applied when no specific policy is defined for a PII category. Only one policy can + be marked as default. + :vartype is_default: bool + :ivar policy_kind: The entity RedactionPolicy object kind. Required. Do not redact detected + entities. + :vartype policy_kind: Literal[RedactionPolicyKind.NO_MASK] + """ + + entityTypes: list[Union[str, "PiiCategoriesExclude"]] + """(Optional) describes the PII categories to which the redaction policy will be applied. If not + specified, the redaction policy will be applied to all PII categories.""" + policyName: str + """(Optional) name of the redaction policy for identification purposes.""" + isDefault: bool + """(Optional) flag to indicate whether this redaction policy is the default policy to be applied + when no specific policy is defined for a PII category. Only one policy can be marked as + default.""" + policyKind: Required[Literal[RedactionPolicyKind.NO_MASK]] + """The entity RedactionPolicy object kind. Required. Do not redact detected entities.""" + + +class PiiActionContent(TypedDict, total=False): + """Supported parameters for a PII Entities Recognition task. + + :ivar logging_opt_out: logging opt out. + :vartype logging_opt_out: bool + :ivar model_version: model version. + :vartype model_version: str + :ivar domain: Domain for PII task. Known values are: "phi" and "none". + :vartype domain: Union[str, "PiiDomain"] + :ivar pii_categories: Enumeration of PII categories to be returned in the response. + :vartype pii_categories: list[Union[str, "PiiCategory"]] + :ivar string_index_type: StringIndexType to be used for analysis. Known values are: + "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit". + :vartype string_index_type: Union[str, "StringIndexType"] + :ivar exclude_pii_categories: Enumeration of PII categories to be excluded in the response. + :vartype exclude_pii_categories: list[Union[str, "PiiCategoriesExclude"]] + :ivar value_exclusion_policy: Policy for specific words and terms that should be excluded from + detection by the PII detection service. + :vartype value_exclusion_policy: "ValueExclusionPolicy" + :ivar entity_synonyms: (Optional) request parameter that allows the user to provide synonyms + for context words that to enhance pii entity detection. + :vartype entity_synonyms: list["EntitySynonyms"] + :ivar redaction_policies: List of RedactionPolicies to be used on the input. + :vartype redaction_policies: list["BaseRedactionPolicy"] + :ivar confidence_score_threshold: Confidence score threshold configuration for PII entity + recognition. + :vartype confidence_score_threshold: "ConfidenceScoreThreshold" + :ivar disable_entity_validation: Disable entity validation for PII entity recognition. + :vartype disable_entity_validation: bool + """ + + loggingOptOut: bool + """logging opt out.""" + modelVersion: str + """model version.""" + domain: Union[str, "PiiDomain"] + """Domain for PII task. Known values are: \"phi\" and \"none\".""" + piiCategories: list[Union[str, "PiiCategory"]] + """Enumeration of PII categories to be returned in the response.""" + stringIndexType: Union[str, "StringIndexType"] + """StringIndexType to be used for analysis. Known values are: \"TextElements_v8\", + \"UnicodeCodePoint\", and \"Utf16CodeUnit\".""" + excludePiiCategories: list[Union[str, "PiiCategoriesExclude"]] + """Enumeration of PII categories to be excluded in the response.""" + valueExclusionPolicy: "ValueExclusionPolicy" + """Policy for specific words and terms that should be excluded from detection by the PII detection + service.""" + entitySynonyms: list["EntitySynonyms"] + """(Optional) request parameter that allows the user to provide synonyms for context words that to + enhance pii entity detection.""" + redactionPolicies: list["BaseRedactionPolicy"] + """List of RedactionPolicies to be used on the input.""" + confidenceScoreThreshold: "ConfidenceScoreThreshold" + """Confidence score threshold configuration for PII entity recognition.""" + disableEntityValidation: bool + """Disable entity validation for PII entity recognition.""" + + +class PiiLROTask(TypedDict, total=False): + """Contains the analyze text PIIEntityRecognition LRO task. + + :ivar name: task name. + :vartype name: str + :ivar kind: Kind of the task. Required. PII entity recognition task. + :vartype kind: Literal[AnalyzeTextOperationActionKind.PII_ENTITY_RECOGNITION] + :ivar parameters: Pii task parameters. + :vartype parameters: "PiiActionContent" + """ + + taskName: str + """task name.""" + kind: Required[Literal[AnalyzeTextOperationActionKind.PII_ENTITY_RECOGNITION]] + """Kind of the task. Required. PII entity recognition task.""" + parameters: "PiiActionContent" + """Pii task parameters.""" + + +class SentimentAnalysisActionContent(TypedDict, total=False): + """Supported parameters for a Sentiment Analysis task. + + :ivar logging_opt_out: logging opt out. + :vartype logging_opt_out: bool + :ivar model_version: model version. + :vartype model_version: str + :ivar opinion_mining: Whether to use opinion mining in the request or not. + :vartype opinion_mining: bool + :ivar string_index_type: Specifies the method used to interpret string offsets. Known values + are: "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit". + :vartype string_index_type: Union[str, "StringIndexType"] + """ + + loggingOptOut: bool + """logging opt out.""" + modelVersion: str + """model version.""" + opinionMining: bool + """Whether to use opinion mining in the request or not.""" + stringIndexType: Union[str, "StringIndexType"] + """Specifies the method used to interpret string offsets. Known values are: \"TextElements_v8\", + \"UnicodeCodePoint\", and \"Utf16CodeUnit\".""" + + +class SentimentAnalysisOperationAction(TypedDict, total=False): + """An object representing the task definition for a Sentiment Analysis task. + + :ivar name: task name. + :vartype name: str + :ivar kind: The Sentiment Analysis kind of the long running task. Required. Sentiment analysis + task. + :vartype kind: Literal[AnalyzeTextOperationActionKind.SENTIMENT_ANALYSIS] + :ivar parameters: Parameters for the Sentiment Analysis task. + :vartype parameters: "SentimentAnalysisActionContent" + """ + + taskName: str + """task name.""" + kind: Required[Literal[AnalyzeTextOperationActionKind.SENTIMENT_ANALYSIS]] + """The Sentiment Analysis kind of the long running task. Required. Sentiment analysis task.""" + parameters: "SentimentAnalysisActionContent" + """Parameters for the Sentiment Analysis task.""" + + +class SyntheticReplacementPolicyType(TypedDict, total=False): + """Represents the policy of replacing detected PII with synthetic values. + + :ivar entity_types: (Optional) describes the PII categories to which the redaction policy will + be applied. If not specified, the redaction policy will be applied to all PII categories. + :vartype entity_types: list[Union[str, "PiiCategoriesExclude"]] + :ivar policy_name: (Optional) name of the redaction policy for identification purposes. + :vartype policy_name: str + :ivar is_default: (Optional) flag to indicate whether this redaction policy is the default + policy to be applied when no specific policy is defined for a PII category. Only one policy can + be marked as default. + :vartype is_default: bool + :ivar policy_kind: The entity RedactionPolicy object kind. Required. Replace detected entities + with synthetic values. + :vartype policy_kind: Literal[RedactionPolicyKind.SYNTHETIC_REPLACEMENT] + :ivar preserve_data_format: Optional flag to indicate whether to preserve the original data + format in the synthetic replacement. Default is false. + :vartype preserve_data_format: bool + """ + + entityTypes: list[Union[str, "PiiCategoriesExclude"]] + """(Optional) describes the PII categories to which the redaction policy will be applied. If not + specified, the redaction policy will be applied to all PII categories.""" + policyName: str + """(Optional) name of the redaction policy for identification purposes.""" + isDefault: bool + """(Optional) flag to indicate whether this redaction policy is the default policy to be applied + when no specific policy is defined for a PII category. Only one policy can be marked as + default.""" + policyKind: Required[Literal[RedactionPolicyKind.SYNTHETIC_REPLACEMENT]] + """The entity RedactionPolicy object kind. Required. Replace detected entities with synthetic + values.""" + preserveDataFormat: bool + """Optional flag to indicate whether to preserve the original data format in the synthetic + replacement. Default is false.""" + + +class TextEntityLinkingInput(TypedDict, total=False): + """Contains the analyze text Entity linking input. + + :ivar kind: Kind for Entity linking input. Required. Entity linking task. + :vartype kind: Literal[AnalyzeTextInputKind.ENTITY_LINKING] + :ivar text_input: Contains the analysis input to be handled by the service. + :vartype text_input: "MultiLanguageTextInput" + :ivar action_content: Task parameters. + :vartype action_content: "EntityLinkingActionContent" + """ + + kind: Required[Literal[AnalyzeTextInputKind.ENTITY_LINKING]] + """Kind for Entity linking input. Required. Entity linking task.""" + analysisInput: "MultiLanguageTextInput" + """Contains the analysis input to be handled by the service.""" + parameters: "EntityLinkingActionContent" + """Task parameters.""" + + +class TextEntityRecognitionInput(TypedDict, total=False): + """The entity recognition analyze text input task request. + + :ivar kind: The kind of task. Required. Entity recognition task. + :vartype kind: Literal[AnalyzeTextInputKind.ENTITY_RECOGNITION] + :ivar text_input: The input to be analyzed. + :vartype text_input: "MultiLanguageTextInput" + :ivar action_content: Task parameters. + :vartype action_content: "EntitiesActionContent" + """ + + kind: Required[Literal[AnalyzeTextInputKind.ENTITY_RECOGNITION]] + """The kind of task. Required. Entity recognition task.""" + analysisInput: "MultiLanguageTextInput" + """The input to be analyzed.""" + parameters: "EntitiesActionContent" + """Task parameters.""" + + +class TextKeyPhraseExtractionInput(TypedDict, total=False): + """Contains the analyze text KeyPhraseExtraction task input. + + :ivar kind: Kind of the task. Required. Key phrase extraction task. + :vartype kind: Literal[AnalyzeTextInputKind.KEY_PHRASE_EXTRACTION] + :ivar text_input: Contains the input documents. + :vartype text_input: "MultiLanguageTextInput" + :ivar action_content: Key phrase extraction task parameters. + :vartype action_content: "KeyPhraseActionContent" + """ + + kind: Required[Literal[AnalyzeTextInputKind.KEY_PHRASE_EXTRACTION]] + """Kind of the task. Required. Key phrase extraction task.""" + analysisInput: "MultiLanguageTextInput" + """Contains the input documents.""" + parameters: "KeyPhraseActionContent" + """Key phrase extraction task parameters.""" + + +class TextLanguageDetectionInput(TypedDict, total=False): + """Contains the language detection document analysis task input. + + :ivar kind: Kind of the task. Required. Language detection task. + :vartype kind: Literal[AnalyzeTextInputKind.LANGUAGE_DETECTION] + :ivar text_input: Documents to be analyzed. + :vartype text_input: "LanguageDetectionTextInput" + :ivar action_content: task parameters. + :vartype action_content: "LanguageDetectionActionContent" + """ + + kind: Required[Literal[AnalyzeTextInputKind.LANGUAGE_DETECTION]] + """Kind of the task. Required. Language detection task.""" + analysisInput: "LanguageDetectionTextInput" + """Documents to be analyzed.""" + parameters: "LanguageDetectionActionContent" + """task parameters.""" + + +class TextPiiEntitiesRecognitionInput(TypedDict, total=False): + """Contains the analyze text PIIEntityRecognition task input. + + :ivar kind: Kind of the task. Required. PII entity recognition task. + :vartype kind: Literal[AnalyzeTextInputKind.PII_ENTITY_RECOGNITION] + :ivar text_input: Contains the input documents. + :vartype text_input: "MultiLanguageTextInput" + :ivar action_content: Pii task parameters. + :vartype action_content: "PiiActionContent" + """ + + kind: Required[Literal[AnalyzeTextInputKind.PII_ENTITY_RECOGNITION]] + """Kind of the task. Required. PII entity recognition task.""" + analysisInput: "MultiLanguageTextInput" + """Contains the input documents.""" + parameters: "PiiActionContent" + """Pii task parameters.""" + + +class TextSentimentAnalysisInput(TypedDict, total=False): + """Contains the analyze text SentimentAnalysis task input. + + :ivar kind: Kind of the task. Required. Sentiment analysis task. + :vartype kind: Literal[AnalyzeTextInputKind.SENTIMENT_ANALYSIS] + :ivar text_input: Contains the input documents. + :vartype text_input: "MultiLanguageTextInput" + :ivar action_content: Sentiment Analysis task parameters. + :vartype action_content: "SentimentAnalysisActionContent" + """ + + kind: Required[Literal[AnalyzeTextInputKind.SENTIMENT_ANALYSIS]] + """Kind of the task. Required. Sentiment analysis task.""" + analysisInput: "MultiLanguageTextInput" + """Contains the input documents.""" + parameters: "SentimentAnalysisActionContent" + """Sentiment Analysis task parameters.""" + + +class ValueExclusionPolicy(TypedDict, total=False): + """Policy for specific words and terms that should be excluded from detection by the PII detection + service. + + :ivar case_sensitive: Option to make the values excluded values case sensitive. Required. + :vartype case_sensitive: bool + :ivar excluded_values: List of words and terms that should be excluded from detection by the + PII detection service. Required. + :vartype excluded_values: list[str] + """ + + caseSensitive: Required[bool] + """Option to make the values excluded values case sensitive. Required.""" + excludedValues: Required[list[str]] + """List of words and terms that should be excluded from detection by the PII detection service. + Required.""" + + +class AnalyzeTextSubmitJobRequest(TypedDict, total=False): + """AnalyzeTextSubmitJobRequest. + + :ivar display_name: Name for the task. + :vartype display_name: str + :ivar text_input: Contains the input to be analyzed. Required. + :vartype text_input: "MultiLanguageTextInput" + :ivar actions: List of tasks to be performed as part of the LRO. Required. + :vartype actions: list["AnalyzeTextOperationAction"] + :ivar default_language: Default language to use for records requesting automatic language + detection. + :vartype default_language: str + :ivar cancel_after: Optional duration in seconds after which the job will be canceled if not + completed. + :vartype cancel_after: float + """ + + displayName: str + """Name for the task.""" + analysisInput: Required["MultiLanguageTextInput"] + """Contains the input to be analyzed. Required.""" + tasks: Required[list["AnalyzeTextOperationAction"]] + """List of tasks to be performed as part of the LRO. Required.""" + defaultLanguage: str + """Default language to use for records requesting automatic language detection.""" + cancelAfter: float + """Optional duration in seconds after which the job will be canceled if not completed.""" + + +AnalyzeTextOperationAction = Union[ + AbstractiveSummarizationOperationAction, + CustomEntitiesLROTask, + CustomMultiLabelClassificationOperationAction, + CustomSingleLabelClassificationOperationAction, + EntityLinkingLROTask, + EntitiesLROTask, + ExtractiveSummarizationOperationAction, + HealthcareLROTask, + KeyPhraseLROTask, + PiiLROTask, + SentimentAnalysisOperationAction, +] +EntityOverlapPolicy = Union[AllowOverlapEntityPolicyType, MatchLongestEntityPolicyType] +AnalyzeTextInput = Union[ + TextEntityLinkingInput, + TextEntityRecognitionInput, + TextKeyPhraseExtractionInput, + TextLanguageDetectionInput, + TextPiiEntitiesRecognitionInput, + TextSentimentAnalysisInput, +] +BaseRedactionPolicy = Union[ + CharacterMaskPolicyType, EntityMaskPolicyType, NoMaskPolicyType, SyntheticReplacementPolicyType +] diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_summary_length_prompt_task_result.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_summary_length_prompt_task_result.py new file mode 100644 index 000000000000..7db642c66a8a --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_summary_length_prompt_task_result.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_abstractive_summarization_summary_length_prompt_task_result.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.get_job_status( + job_id="c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskResult.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_summary_length_prompt_task_submit.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_summary_length_prompt_task_submit.py new file mode 100644 index 000000000000..79098b6e0a92 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_summary_length_prompt_task_submit.py @@ -0,0 +1,53 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_abstractive_summarization_summary_length_prompt_task_submit.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + client.begin_analyze_text_job( + body={ + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", + } + ] + }, + "displayName": "Document Abstractive Summarization Task Example", + "tasks": [ + { + "kind": "AbstractiveSummarization", + "parameters": {"summaryLength": "medium"}, + "taskName": "Document Abstractive Summarization Task 1", + } + ], + }, + text_input={"documents": [{"id": "str", "text": "str", "language": "str"}]}, + actions=[analyze_text_operation_action], + ).result() + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskSubmit.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_task_result.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_task_result.py new file mode 100644 index 000000000000..562009a07046 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_task_result.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_abstractive_summarization_task_result.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.get_job_status( + job_id="c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulAbstractiveSummarizationTaskResult.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_task_submit.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_task_submit.py new file mode 100644 index 000000000000..8d690767a074 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_abstractive_summarization_task_submit.py @@ -0,0 +1,53 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_abstractive_summarization_task_submit.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + client.begin_analyze_text_job( + body={ + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", + } + ] + }, + "displayName": "Document Abstractive Summarization Task Example", + "tasks": [ + { + "kind": "AbstractiveSummarization", + "parameters": {"sentenceCount": 1}, + "taskName": "Document Abstractive Summarization Task 1", + } + ], + }, + text_input={"documents": [{"id": "str", "text": "str", "language": "str"}]}, + actions=[analyze_text_operation_action], + ).result() + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulAbstractiveSummarizationTaskSubmit.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_analyze_text_jobs_cancel_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_analyze_text_jobs_cancel_request.py new file mode 100644 index 000000000000..331e3bb0b6ef --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_analyze_text_jobs_cancel_request.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_analyze_text_jobs_cancel_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + client.begin_cancel_job( + job_id="c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + ).result() + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulAnalyzeTextJobsCancelRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_analyze_text_jobs_multiple_task_status_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_analyze_text_jobs_multiple_task_status_request.py new file mode 100644 index 000000000000..0710ffd0b8a1 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_analyze_text_jobs_multiple_task_status_request.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_analyze_text_jobs_multiple_task_status_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.get_job_status( + job_id="c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_analyze_text_jobs_multiple_task_submit_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_analyze_text_jobs_multiple_task_submit_request.py new file mode 100644 index 000000000000..55b8e8c1808b --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_analyze_text_jobs_multiple_task_submit_request.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_analyze_text_jobs_multiple_task_submit_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + client.begin_analyze_text_job( + body={ + "analysisInput": { + "documents": [ + {"id": "1", "language": "en", "text": "I had a wonderful trip to Seattle last week."}, + {"id": "2", "language": "en", "text": "I'm flying to NYC tomorrow. See you there."}, + ] + }, + "displayName": "Extracting Location & US Region", + "tasks": [ + { + "kind": "EntityRecognition", + "parameters": {"modelVersion": "latest"}, + "taskName": "Recognize Entities", + }, + { + "kind": "CustomEntityRecognition", + "parameters": {"deploymentName": "MyDeployment", "projectName": "MyProject"}, + "taskName": "Recognize US Regions", + }, + ], + }, + text_input={"documents": [{"id": "str", "text": "str", "language": "str"}]}, + actions=[analyze_text_operation_action], + ).result() + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_linking_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_linking_request.py new file mode 100644 index 000000000000..20d85bff1a35 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_linking_request.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_entity_linking_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.analyze_text( + body={ + "analysisInput": { + "documents": [ + {"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, + {"id": "2", "language": "en", "text": "Pike place market is my favorite Seattle attraction."}, + ] + }, + "kind": "EntityLinking", + "parameters": {"modelVersion": "latest"}, + }, + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulEntityLinkingRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_exclusion_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_exclusion_request.py new file mode 100644 index 000000000000..606ad2106fd2 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_exclusion_request.py @@ -0,0 +1,51 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_entity_recognition_exclusion_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.analyze_text( + body={ + "analysisInput": { + "documents": [ + {"id": "2", "language": "en", "text": "When I was 5 years old I had $90.00 dollars to my name."}, + { + "id": "3", + "language": "en", + "text": "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", + }, + ] + }, + "kind": "EntityRecognition", + "parameters": { + "exclusionList": ["Numeric"], + "modelVersion": "latest", + "overlapPolicy": {"policyKind": "allowOverlap"}, + }, + }, + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulEntityRecognitionExclusionRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_inclusion_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_inclusion_request.py new file mode 100644 index 000000000000..4eed4bae5fbb --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_inclusion_request.py @@ -0,0 +1,47 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_entity_recognition_inclusion_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.analyze_text( + body={ + "analysisInput": { + "documents": [ + {"id": "2", "language": "en", "text": "When I was 5 years old I had $90.00 dollars to my name."}, + { + "id": "3", + "language": "en", + "text": "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", + }, + ] + }, + "kind": "EntityRecognition", + "parameters": {"inclusionList": ["Location"], "modelVersion": "latest"}, + }, + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulEntityRecognitionInclusionRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_inference_options_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_inference_options_request.py new file mode 100644 index 000000000000..ee779bcd9ab6 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_inference_options_request.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_entity_recognition_inference_options_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.analyze_text( + body={ + "analysisInput": { + "documents": [ + {"id": "1", "language": "en", "text": "When I was 5 years old I had $90.00 dollars to my name."} + ] + }, + "kind": "EntityRecognition", + "parameters": {"inferenceOptions": {"excludeNormalizedValues": True}, "modelVersion": "latest"}, + }, + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulEntityRecognitionInferenceOptionsRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_overlap_policy.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_overlap_policy.py new file mode 100644 index 000000000000..2281bb7b2199 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_overlap_policy.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_entity_recognition_overlap_policy.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.analyze_text( + body={ + "analysisInput": { + "documents": [ + { + "id": "4", + "language": "en", + "text": "25th April Meeting was an intresting one. At least we gont to experience the WorldCup", + } + ] + }, + "kind": "EntityRecognition", + "parameters": {"modelVersion": "latest", "overlapPolicy": {"policyKind": "matchLongest"}}, + }, + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulEntityRecognitionOverlapPolicy.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_request.py new file mode 100644 index 000000000000..d64b359867de --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_entity_recognition_request.py @@ -0,0 +1,53 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_entity_recognition_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.analyze_text( + body={ + "analysisInput": { + "documents": [ + {"id": "2", "language": "en", "text": "When I was 5 years old I had $90.00 dollars to my name."}, + { + "id": "3", + "language": "en", + "text": "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile.", + }, + { + "id": "4", + "language": "en", + "text": "25th April Meeting was an intresting one. At least we gont to experience the WorldCup", + }, + {"id": "5", "language": "en", "text": "My IP is 127.12.1.1 and my phone number is 5555555555"}, + ] + }, + "kind": "EntityRecognition", + "parameters": {"modelVersion": "latest", "overlapPolicy": {"policyKind": "allowOverlap"}}, + }, + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulEntityRecognitionRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_document_type_post_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_document_type_post_request.py new file mode 100644 index 000000000000..8be63f7e2d29 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_document_type_post_request.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_healthcare_document_type_post_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + client.begin_analyze_text_job( + body={ + "analysisInput": { + "documents": [{"id": "1", "language": "en", "text": "Prescribed 100mg ibuprofen, taken twice daily."}] + }, + "tasks": [ + { + "kind": "Healthcare", + "parameters": { + "documentType": "DischargeSummary", + "fhirVersion": "4.0.1", + "modelVersion": "latest", + }, + } + ], + }, + text_input={"documents": [{"id": "str", "text": "str", "language": "str"}]}, + actions=[analyze_text_operation_action], + ).result() + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulHealthcareDocumentTypePostRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_document_type_task_status_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_document_type_task_status_request.py new file mode 100644 index 000000000000..e8035c6274c8 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_document_type_task_status_request.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_healthcare_document_type_task_status_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.get_job_status( + job_id="15e4a46b-62e2-4386-8d36-9c2a92bb45dd", + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulHealthcareDocumentTypeTaskStatusRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_post_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_post_request.py new file mode 100644 index 000000000000..90ad99f15bb6 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_post_request.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_healthcare_post_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + client.begin_analyze_text_job( + body={ + "analysisInput": { + "documents": [{"id": "1", "language": "en", "text": "Prescribed 100mg ibuprofen, taken twice daily."}] + }, + "tasks": [{"kind": "Healthcare", "parameters": {"modelVersion": "latest"}}], + }, + text_input={"documents": [{"id": "str", "text": "str", "language": "str"}]}, + actions=[analyze_text_operation_action], + ).result() + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulHealthcarePostRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_task_status_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_task_status_request.py new file mode 100644 index 000000000000..e1684baabb56 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_healthcare_task_status_request.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_healthcare_task_status_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.get_job_status( + job_id="1780194a-e9c1-4298-b0d4-fdc59ba818a0", + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulHealthcareTaskStatusRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_key_phrase_extraction_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_key_phrase_extraction_request.py new file mode 100644 index 000000000000..f828cd625468 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_key_phrase_extraction_request.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_key_phrase_extraction_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.analyze_text( + body={ + "analysisInput": { + "documents": [ + {"id": "1", "language": "en", "text": "Microsoft was founded by Bill Gates and Paul Allen."}, + {"id": "2", "language": "en", "text": "Text Analytics is one of the Azure Cognitive Services."}, + {"id": "3", "language": "en", "text": "My cat might need to see a veterinarian."}, + ] + }, + "kind": "KeyPhraseExtraction", + "parameters": {"modelVersion": "latest"}, + }, + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulKeyPhraseExtractionRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_language_detection_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_language_detection_request.py new file mode 100644 index 000000000000..463ae26051cf --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_language_detection_request.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_language_detection_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.analyze_text( + body={ + "analysisInput": { + "documents": [ + {"id": "1", "text": "Hello world"}, + {"id": "2", "text": "Bonjour tout le monde"}, + {"id": "3", "text": "Hola mundo"}, + {"id": "4", "text": "Tumhara naam kya hai?"}, + ] + }, + "kind": "LanguageDetection", + "parameters": {"modelVersion": "latest"}, + }, + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulLanguageDetectionRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_exclusion_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_exclusion_request.py new file mode 100644 index 000000000000..6300afe35b84 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_exclusion_request.py @@ -0,0 +1,48 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_pii_entity_recognition_exclusion_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.analyze_text( + body={ + "analysisInput": { + "documents": [ + {"id": "1", "language": "en", "text": "My SSN is 859-98-0987"}, + { + "id": "2", + "language": "en", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + {"id": "3", "language": "en", "text": "Is 998.214.865-68 your Brazilian CPF number?"}, + ] + }, + "kind": "PiiEntityRecognition", + "parameters": {"excludePiiCategories": ["USSocialSecurityNumber"], "modelVersion": "latest"}, + }, + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulPiiEntityRecognitionExclusionRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_masked_entities.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_masked_entities.py new file mode 100644 index 000000000000..b730432e4abf --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_masked_entities.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_pii_entity_recognition_masked_entities.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.analyze_text( + body={ + "analysisInput": { + "documents": [ + {"id": "1", "language": "en", "text": "My name is John Doe My phone number is 424 878 9192"} + ] + }, + "kind": "PiiEntityRecognition", + "parameters": {"modelVersion": "latest", "redactionPolicies": [{"policyKind": "entityMask"}]}, + }, + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulPiiEntityRecognitionMaskedEntities.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_redaction_policy_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_redaction_policy_request.py new file mode 100644 index 000000000000..e0ace3aa53e0 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_redaction_policy_request.py @@ -0,0 +1,51 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_pii_entity_recognition_redaction_policy_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.analyze_text( + body={ + "analysisInput": { + "documents": [ + {"id": "1", "language": "en", "text": "My SSN is 859-98-0987"}, + { + "id": "2", + "language": "en", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + {"id": "3", "language": "en", "text": "Is 998.214.865-68 your Brazilian CPF number?"}, + ] + }, + "kind": "PiiEntityRecognition", + "parameters": { + "modelVersion": "latest", + "redactionPolicies": [{"policyKind": "characterMask", "redactionCharacter": "-"}], + }, + }, + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulPiiEntityRecognitionRedactionPolicyRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_request.py new file mode 100644 index 000000000000..0a1631c9c809 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_pii_entity_recognition_request.py @@ -0,0 +1,48 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_pii_entity_recognition_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.analyze_text( + body={ + "analysisInput": { + "documents": [ + {"id": "1", "language": "en", "text": "My SSN is 859-98-0987"}, + { + "id": "2", + "language": "en", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + {"id": "3", "language": "en", "text": "Is 998.214.865-68 your Brazilian CPF number?"}, + ] + }, + "kind": "PiiEntityRecognition", + "parameters": {"modelVersion": "latest"}, + }, + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulPiiEntityRecognitionRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_sentiment_analysis_request.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_sentiment_analysis_request.py new file mode 100644 index 000000000000..aa61b5283ce3 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_samples/successful_sentiment_analysis_request.py @@ -0,0 +1,46 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.ai.textanalytics import TextAnalysisClient + +""" +# PREREQUISITES + pip install azure-ai-textanalytics +# USAGE + python successful_sentiment_analysis_request.py +""" + + +def main(): + client = TextAnalysisClient( + endpoint="{Endpoint}", + credential="CREDENTIAL", + ) + + response = client.analyze_text( + body={ + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.", + } + ] + }, + "kind": "SentimentAnalysis", + "parameters": {"modelVersion": "latest"}, + }, + ) + print(response) + + +# x-ms-original-file: 2026-05-15-preview/SuccessfulSentimentAnalysisRequest.json +if __name__ == "__main__": + main() diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/conftest.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/conftest.py new file mode 100644 index 000000000000..ccd8191281d6 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/conftest.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import os +import pytest +from dotenv import load_dotenv +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) + +load_dotenv() + + +# For security, please avoid record sensitive identity information in recordings +@pytest.fixture(scope="session", autouse=True) +def add_sanitizers(test_proxy): + textanalysis_subscription_id = os.environ.get( + "TEXTANALYSIS_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000" + ) + textanalysis_tenant_id = os.environ.get("TEXTANALYSIS_TENANT_ID", "00000000-0000-0000-0000-000000000000") + textanalysis_client_id = os.environ.get("TEXTANALYSIS_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + textanalysis_client_secret = os.environ.get("TEXTANALYSIS_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=textanalysis_subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=textanalysis_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=textanalysis_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=textanalysis_client_secret, value="00000000-0000-0000-0000-000000000000") + + add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") + add_header_regex_sanitizer(key="Cookie", value="cookie;") + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/test_text_analysis.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/test_text_analysis.py new file mode 100644 index 000000000000..630d309a5db9 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/test_text_analysis.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import TextAnalysisClientTestBase, TextAnalysisPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestTextAnalysis(TextAnalysisClientTestBase): + @TextAnalysisPreparer() + @recorded_by_proxy + def test_analyze_text(self, textanalysis_endpoint): + client = self.create_client(endpoint=textanalysis_endpoint) + response = client.analyze_text( + body={ + "kind": "EntityLinking", + "analysisInput": {"documents": [{"id": "str", "text": "str", "language": "str"}]}, + "parameters": {"loggingOptOut": bool, "modelVersion": "str", "stringIndexType": "str"}, + }, + ) + + # please add some check logic here by yourself + # ... + + @TextAnalysisPreparer() + @recorded_by_proxy + def test_get_job_status(self, textanalysis_endpoint): + client = self.create_client(endpoint=textanalysis_endpoint) + response = client.get_job_status( + job_id="str", + ) + + # please add some check logic here by yourself + # ... + + @TextAnalysisPreparer() + @recorded_by_proxy + def test_begin_analyze_text_job(self, textanalysis_endpoint): + client = self.create_client(endpoint=textanalysis_endpoint) + response = client.begin_analyze_text_job( + body={ + "analysisInput": {"documents": [{"id": "str", "text": "str", "language": "str"}]}, + "tasks": ["analyze_text_operation_action"], + "cancelAfter": 0.0, + "defaultLanguage": "str", + "displayName": "str", + }, + text_input={"documents": [{"id": "str", "text": "str", "language": "str"}]}, + actions=["analyze_text_operation_action"], + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @TextAnalysisPreparer() + @recorded_by_proxy + def test_begin_cancel_job(self, textanalysis_endpoint): + client = self.create_client(endpoint=textanalysis_endpoint) + response = client.begin_cancel_job( + job_id="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/test_text_analysis_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/test_text_analysis_async.py new file mode 100644 index 000000000000..8e958080d835 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/test_text_analysis_async.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import TextAnalysisPreparer +from testpreparer_async import TextAnalysisClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestTextAnalysisAsync(TextAnalysisClientTestBaseAsync): + @TextAnalysisPreparer() + @recorded_by_proxy_async + async def test_analyze_text(self, textanalysis_endpoint): + client = self.create_async_client(endpoint=textanalysis_endpoint) + response = await client.analyze_text( + body={ + "kind": "EntityLinking", + "analysisInput": {"documents": [{"id": "str", "text": "str", "language": "str"}]}, + "parameters": {"loggingOptOut": bool, "modelVersion": "str", "stringIndexType": "str"}, + }, + ) + + # please add some check logic here by yourself + # ... + + @TextAnalysisPreparer() + @recorded_by_proxy_async + async def test_get_job_status(self, textanalysis_endpoint): + client = self.create_async_client(endpoint=textanalysis_endpoint) + response = await client.get_job_status( + job_id="str", + ) + + # please add some check logic here by yourself + # ... + + @TextAnalysisPreparer() + @recorded_by_proxy_async + async def test_begin_analyze_text_job(self, textanalysis_endpoint): + client = self.create_async_client(endpoint=textanalysis_endpoint) + response = await ( + await client.begin_analyze_text_job( + body={ + "analysisInput": {"documents": [{"id": "str", "text": "str", "language": "str"}]}, + "tasks": ["analyze_text_operation_action"], + "cancelAfter": 0.0, + "defaultLanguage": "str", + "displayName": "str", + }, + text_input={"documents": [{"id": "str", "text": "str", "language": "str"}]}, + actions=["analyze_text_operation_action"], + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @TextAnalysisPreparer() + @recorded_by_proxy_async + async def test_begin_cancel_job(self, textanalysis_endpoint): + client = self.create_async_client(endpoint=textanalysis_endpoint) + response = await ( + await client.begin_cancel_job( + job_id="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/testpreparer.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/testpreparer.py new file mode 100644 index 000000000000..7f2384bf46a8 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/testpreparer.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from azure.ai.textanalytics import TextAnalysisClient +from devtools_testutils import AzureRecordedTestCase, PowerShellPreparer +import functools + + +class TextAnalysisClientTestBase(AzureRecordedTestCase): + + def create_client(self, endpoint): + credential = self.get_credential(TextAnalysisClient) + return self.create_client_from_credential( + TextAnalysisClient, + credential=credential, + endpoint=endpoint, + ) + + +TextAnalysisPreparer = functools.partial( + PowerShellPreparer, "textanalysis", textanalysis_endpoint="https://fake_textanalysis_endpoint.com" +) diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/testpreparer_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/testpreparer_async.py new file mode 100644 index 000000000000..daa67de13e8c --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/generated_tests/testpreparer_async.py @@ -0,0 +1,20 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from azure.ai.textanalytics.aio import TextAnalysisClient +from devtools_testutils import AzureRecordedTestCase + + +class TextAnalysisClientTestBaseAsync(AzureRecordedTestCase): + + def create_async_client(self, endpoint): + credential = self.get_credential(TextAnalysisClient, is_async=True) + return self.create_client_from_credential( + TextAnalysisClient, + credential=credential, + endpoint=endpoint, + ) diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/pyproject.toml b/sdk/cognitivelanguage/azure-ai-textanalytics/pyproject.toml index e37e0b87d524..b4ddc48666b1 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/pyproject.toml +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/pyproject.toml @@ -21,13 +21,13 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] -requires-python = ">=3.9" +requires-python = ">=3.10" keywords = ["azure", "azure sdk"] dependencies = [ diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/samples/async_samples/sample_authentication_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/samples/async_samples/sample_authentication_async.py index a2bdfba0ff80..5f8c837a8185 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/samples/async_samples/sample_authentication_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/samples/async_samples/sample_authentication_async.py @@ -39,7 +39,7 @@ async def sample_authentication_api_key_async(): endpoint = os.environ["AZURE_TEXT_ENDPOINT"] key = os.environ["AZURE_TEXT_KEY"] - text_client = TextAnalysisClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable + text_client = TextAnalysisClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable # [END create_ta_client_with_key_async] @@ -56,7 +56,7 @@ async def sample_authentication_with_aad(): endpoint = os.environ["AZURE_TEXT_ENDPOINT"] credential = DefaultAzureCredential() - text_client = TextAnalysisClient(endpoint, credential=credential) # pylint:disable=unused-variable + text_client = TextAnalysisClient(endpoint, credential=credential) # pylint:disable=unused-variable # [END create_ta_client_with_aad_async] diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/samples/sample_authentication.py b/sdk/cognitivelanguage/azure-ai-textanalytics/samples/sample_authentication.py index 780f1988ff0a..6b692a2de691 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/samples/sample_authentication.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/samples/sample_authentication.py @@ -38,7 +38,7 @@ def sample_authentication_api_key(): endpoint = os.environ["AZURE_TEXT_ENDPOINT"] key = os.environ["AZURE_TEXT_KEY"] - text_client = TextAnalysisClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable + text_client = TextAnalysisClient(endpoint, AzureKeyCredential(key)) # pylint:disable=unused-variable # [END create_ta_client_with_key] @@ -55,7 +55,7 @@ def sample_authentication_with_aad(): endpoint = os.environ["AZURE_TEXT_ENDPOINT"] credential = DefaultAzureCredential() - text_client = TextAnalysisClient(endpoint, credential=credential) # pylint:disable=unused-variable + text_client = TextAnalysisClient(endpoint, credential=credential) # pylint:disable=unused-variable # [END create_ta_client_with_aad] diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_abstract_summary_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_abstract_summary_async.py index c1abc6af1d27..b088aa088ea5 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_abstract_summary_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_abstract_summary_async.py @@ -44,9 +44,7 @@ class TestTextAnalysisCaseAsync(TestTextAnalysisAsync): @TextAnalysisPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_abstract_summary_async( - self, text_analysis_endpoint, text_analysis_key - ): + async def test_abstract_summary_async(self, text_analysis_endpoint, text_analysis_key): async with self.create_client(text_analysis_endpoint, text_analysis_key) as client: text_a = ( "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure " diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_extract_summary_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_extract_summary_async.py index 2815c3f92c96..9b9ae42605f3 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_extract_summary_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_extract_summary_async.py @@ -42,9 +42,7 @@ class TestTextAnalysisCaseAsync(TestTextAnalysisAsync): @TextAnalysisPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_extract_summary_async( - self, text_analysis_endpoint, text_analysis_key - ): + async def test_extract_summary_async(self, text_analysis_endpoint, text_analysis_key): async with self.create_client(text_analysis_endpoint, text_analysis_key) as client: text_a = ( "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure " diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_multi_label_classify_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_multi_label_classify_async.py index a1b1f1ad3d60..c8e1f4c3cd85 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_multi_label_classify_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_multi_label_classify_async.py @@ -44,9 +44,7 @@ class TestTextAnalysisCaseAsync(TestTextAnalysisAsync): @TextAnalysisPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_multi_label_classify_async( - self, text_analysis_endpoint, text_analysis_key - ): + async def test_multi_label_classify_async(self, text_analysis_endpoint, text_analysis_key): async with self.create_client(text_analysis_endpoint, text_analysis_key) as client: project_name = "multi-class-project" deployment_name = "multiclassdeployment" diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score.py index 4d7e0e7dcf31..3b1d164816a1 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score.py @@ -54,9 +54,7 @@ def test_recognize_pii_confidence_score(self, text_analysis_endpoint, text_analy email_override = ConfidenceScoreThresholdOverride(value=0.9, entity="Email") confidence_threshold = ConfidenceScoreThreshold(default=0.3, overrides=[ssn_override, email_override]) # Parameters - parameters = PiiActionContent( - pii_categories=["All"], confidence_score_threshold=confidence_threshold - ) + parameters = PiiActionContent(pii_categories=["All"], confidence_score_threshold=confidence_threshold) body = TextPiiEntitiesRecognitionInput(text_input=text_input, action_content=parameters) diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score_async.py index 4e40209054fd..59183735f2ae 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_confidence_score_async.py @@ -43,7 +43,7 @@ class TestTextAnalysisCase_NewPIIThresholds(TestTextAnalysis): @TextAnalysisPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_recognize_pii_confidence_score_async( # pylint: disable=name-too-long + async def test_recognize_pii_confidence_score_async( # pylint: disable=name-too-long self, text_analysis_endpoint, text_analysis_key ): async with self.create_client(text_analysis_endpoint, text_analysis_key) as client: @@ -64,9 +64,7 @@ async def test_recognize_pii_confidence_score_async( # pylint: disable=name-too- confidence_threshold = ConfidenceScoreThreshold(default=0.3, overrides=[ssn_override, email_override]) # Parameters - parameters = PiiActionContent( - pii_categories=["All"], confidence_score_threshold=confidence_threshold - ) + parameters = PiiActionContent(pii_categories=["All"], confidence_score_threshold=confidence_threshold) body = TextPiiEntitiesRecognitionInput(text_input=text_input, action_content=parameters) diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_redaction_policies_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_redaction_policies_async.py index b87de711542f..8a367ace568f 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_redaction_policies_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_recognize_pii_redaction_policies_async.py @@ -43,7 +43,9 @@ class TestTextAnalysisCase(TestTextAnalysis): @TextAnalysisPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_recognize_pii_redaction_policies_async(self, text_analysis_endpoint, text_analysis_key): # pylint: disable=name-too-long + async def test_recognize_pii_redaction_policies_async( + self, text_analysis_endpoint, text_analysis_key + ): # pylint: disable=name-too-long async with self.create_client(text_analysis_endpoint, text_analysis_key) as client: # Documents diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_single_label_classify_async.py b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_single_label_classify_async.py index 886e7d50fea6..f4a7ea156492 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_single_label_classify_async.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tests/test_single_label_classify_async.py @@ -44,9 +44,7 @@ class TestTextAnalysisCaseAsync(TestTextAnalysisAsync): @TextAnalysisPreparer() @recorded_by_proxy_async @pytest.mark.asyncio - async def test_single_label_classify_async( - self, text_analysis_endpoint, text_analysis_key - ): + async def test_single_label_classify_async(self, text_analysis_endpoint, text_analysis_key): async with self.create_client(text_analysis_endpoint, text_analysis_key) as client: project_name = "single-class-project" deployment_name = "deployment1" diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics/tsp-location.yaml b/sdk/cognitivelanguage/azure-ai-textanalytics/tsp-location.yaml index 57f76ef2f135..e675d94769ae 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics/tsp-location.yaml +++ b/sdk/cognitivelanguage/azure-ai-textanalytics/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/cognitiveservices/data-plane/LanguageAnalyzeText -commit: 8986f6564d8771fa1628a342a705991fe50ddcb4 +commit: 9ce7cb16c5e1827222bd52d1c1b476f294ab0316 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/textanalytics/azure-ai-textanalytics/api.md b/sdk/textanalytics/azure-ai-textanalytics/api.md new file mode 100644 index 000000000000..4af75b403f9f --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/api.md @@ -0,0 +1,3468 @@ +```py +namespace azure.ai.textanalytics + + class azure.ai.textanalytics.AbstractiveSummary(DictMixin): + contexts: List[SummaryContext] + text: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.AbstractiveSummaryAction(DictMixin): + disable_service_logs: Optional[bool] + model_version: Optional[str] + sentence_count: Optional[int] + string_index_type: Optional[str] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__( + self, + *, + disable_service_logs: Optional[bool] = ..., + model_version: Optional[str] = ..., + sentence_count: Optional[int] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.AbstractiveSummaryResult(DictMixin): + id: str + is_error: Literal[False] = False + kind: Literal["AbstractiveSummarization"] = AbstractiveSummarization + statistics: Optional[TextDocumentStatistics] + summaries: List[AbstractiveSummary] + warnings: List[TextAnalyticsWarning] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.AnalyzeActionsLROPoller(LROPoller[PollingReturnType_co]): + property details: Mapping[str, Any] # Read-only + + def __getattr__(self, item: str) -> Any: ... + + @classmethod + def from_continuation_token( + cls, + polling_method: AnalyzeActionsLROPollingMethod, + continuation_token: str, + **kwargs: Any + ) -> AnalyzeActionsLROPoller: ... + + @distributed_trace + def cancel(self) -> None: ... + + def polling_method(self) -> AnalyzeActionsLROPollingMethod: ... + + + class azure.ai.textanalytics.AnalyzeHealthcareEntitiesAction(DictMixin): + disable_service_logs: Optional[bool] + model_version: Optional[str] + string_index_type: Optional[str] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__( + self, + *, + disable_service_logs: Optional[bool] = ..., + model_version: Optional[str] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.AnalyzeHealthcareEntitiesLROPoller(LROPoller[PollingReturnType_co]): + property details: Mapping[str, Any] # Read-only + + def __getattr__(self, item: str) -> Any: ... + + @classmethod + def from_continuation_token( + cls, + polling_method: AnalyzeHealthcareEntitiesLROPollingMethod, + continuation_token: str, + **kwargs: Any + ) -> AnalyzeHealthcareEntitiesLROPoller: ... + + @distributed_trace + def cancel( + self, + *, + polling_interval: Optional[int] = ..., + **kwargs: Any + ) -> LROPoller[None]: ... + + def polling_method(self) -> AnalyzeHealthcareEntitiesLROPollingMethod: ... + + + class azure.ai.textanalytics.AnalyzeHealthcareEntitiesResult(DictMixin): + entities: List[HealthcareEntity] + entity_relations: List[HealthcareRelation] + id: str + is_error: Literal[False] = False + kind: Literal["Healthcare"] = Healthcare + statistics: Optional[TextDocumentStatistics] + warnings: List[TextAnalyticsWarning] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.AnalyzeSentimentAction(DictMixin): + disable_service_logs: Optional[bool] + model_version: Optional[str] + show_opinion_mining: Optional[bool] + string_index_type: Optional[str] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__( + self, + *, + disable_service_logs: Optional[bool] = ..., + model_version: Optional[str] = ..., + show_opinion_mining: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.AnalyzeSentimentResult(DictMixin): + confidence_scores: SentimentConfidenceScores + id: str + is_error: Literal[False] = False + kind: Literal["SentimentAnalysis"] = SentimentAnalysis + sentences: List[SentenceSentiment] + sentiment: str + statistics: Optional[TextDocumentStatistics] + warnings: List[TextAnalyticsWarning] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.AssessmentSentiment(DictMixin): + confidence_scores: SentimentConfidenceScores + is_negated: bool + length: int + offset: int + sentiment: str + text: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.CategorizedEntity(DictMixin): + category: str + confidence_score: float + length: int + offset: int + subcategory: Optional[str] + text: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.ClassificationCategory(DictMixin): + category: str + confidence_score: float + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.ClassifyDocumentResult(DictMixin): + classifications: List[ClassificationCategory] + id: str + is_error: Literal[False] = False + kind: Literal["CustomDocumentClassification"] = CustomDocumentClassification + statistics: Optional[TextDocumentStatistics] + warnings: List[TextAnalyticsWarning] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.DetectLanguageInput(LanguageInput): + country_hint: Optional[str] + id: str + text: str + + def __eq__(self, other): ... + + def __init__( + self, + *, + country_hint: Optional[str] = ..., + id: str, + text: str, + **kwargs: Any + ) -> None: ... + + def __ne__(self, other): ... + + def __repr__(self) -> str: ... + + def __str__(self): ... + + @classmethod + def deserialize( + cls, + data: str, + content_type: str = None + ): ... + + @classmethod + def enable_additional_properties_sending(cls): ... + + @classmethod + def from_dict( + cls, + data: dict, + key_extractors = None, + content_type: str = None + ): ... + + @classmethod + def is_xml_model(cls): ... + + def as_dict( + self, + keep_readonly = True, + key_transformer: function = attribute_transformer, + **kwargs + ) -> dict: ... + + def serialize( + self, + keep_readonly: bool = False, + **kwargs + ) -> dict: ... + + + class azure.ai.textanalytics.DetectLanguageResult(DictMixin): + id: str + is_error: Literal[False] = False + kind: Literal["LanguageDetection"] = LanguageDetection + primary_language: DetectedLanguage + statistics: Optional[TextDocumentStatistics] + warnings: List[TextAnalyticsWarning] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.DetectedLanguage(DictMixin): + confidence_score: float + iso6391_name: str + name: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.DocumentError(DictMixin): + error: TextAnalyticsError + id: str + is_error: Literal[True] = True + kind: Literal["DocumentError"] = DocumentError + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getattr__(self, attr: str) -> Any: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.EntityAssociation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + OTHER = "other" + SUBJECT = "subject" + + + class azure.ai.textanalytics.EntityCertainty(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NEGATIVE = "negative" + NEGATIVE_POSSIBLE = "negativePossible" + NEUTRAL_POSSIBLE = "neutralPossible" + POSITIVE = "positive" + POSITIVE_POSSIBLE = "positivePossible" + + + class azure.ai.textanalytics.EntityConditionality(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CONDITIONAL = "conditional" + HYPOTHETICAL = "hypothetical" + + + class azure.ai.textanalytics.ExtractKeyPhrasesAction(DictMixin): + disable_service_logs: Optional[bool] + model_version: Optional[str] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__( + self, + *, + disable_service_logs: Optional[bool] = ..., + model_version: Optional[str] = ..., + **kwargs: Any + ) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.ExtractKeyPhrasesResult(DictMixin): + id: str + is_error: Literal[False] = False + key_phrases: List[str] + kind: Literal["KeyPhraseExtraction"] = KeyPhraseExtraction + statistics: Optional[TextDocumentStatistics] + warnings: List[TextAnalyticsWarning] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.ExtractiveSummaryAction(DictMixin): + disable_service_logs: Optional[bool] + max_sentence_count: Optional[int] + model_version: Optional[str] + order_by: Optional[Literal["Rank", "Offset"]] + string_index_type: Optional[str] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__( + self, + *, + disable_service_logs: Optional[bool] = ..., + max_sentence_count: Optional[int] = ..., + model_version: Optional[str] = ..., + order_by: Optional[Literal[Rank, Offset]] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.ExtractiveSummaryResult(DictMixin): + id: str + is_error: Literal[False] = False + kind: Literal["ExtractiveSummarization"] = ExtractiveSummarization + sentences: List[SummarySentence] + statistics: Optional[TextDocumentStatistics] + warnings: List[TextAnalyticsWarning] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.HealthcareEntity(DictMixin): + assertion: Optional[HealthcareEntityAssertion] + category: str + confidence_score: float + data_sources: Optional[List[HealthcareEntityDataSource]] + length: int + normalized_text: Optional[str] + offset: int + subcategory: Optional[str] + text: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __hash__(self) -> int: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.HealthcareEntityAssertion(DictMixin): + association: Optional[str] + certainty: Optional[str] + conditionality: Optional[str] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.HealthcareEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ADMINISTRATIVE_EVENT = "AdministrativeEvent" + AGE = "Age" + ALLERGEN = "Allergen" + BODY_STRUCTURE = "BodyStructure" + CARE_ENVIRONMENT = "CareEnvironment" + CONDITION_QUALIFIER = "ConditionQualifier" + CONDITION_SCALE = "ConditionScale" + COURSE = "Course" + DATE = "Date" + DIAGNOSIS = "Diagnosis" + DIRECTION = "Direction" + DOSAGE = "Dosage" + EMPLOYMENT = "Employment" + ETHNICITY = "Ethnicity" + EXAMINATION_NAME = "ExaminationName" + EXPRESSION = "Expression" + FAMILY_RELATION = "FamilyRelation" + FREQUENCY = "Frequency" + GENDER = "Gender" + GENE_OR_PROTEIN = "GeneOrProtein" + HEALTHCARE_PROFESSION = "HealthcareProfession" + LIVING_STATUS = "LivingStatus" + MEASUREMENT_UNIT = "MeasurementUnit" + MEASUREMENT_VALUE = "MeasurementValue" + MEDICATION_CLASS = "MedicationClass" + MEDICATION_FORM = "MedicationForm" + MEDICATION_NAME = "MedicationName" + MEDICATION_ROUTE = "MedicationRoute" + MUTATION_TYPE = "MutationType" + RELATIONAL_OPERATOR = "RelationalOperator" + SUBSTANCE_USE = "SubstanceUse" + SUBSTANCE_USE_AMOUNT = "SubstanceUseAmount" + SYMPTOM_OR_SIGN = "SymptomOrSign" + TIME = "Time" + TREATMENT_NAME = "TreatmentName" + VARIANT = "Variant" + + + class azure.ai.textanalytics.HealthcareEntityDataSource(DictMixin): + entity_id: str + name: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.HealthcareEntityRelation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ABBREVIATION = "Abbreviation" + BODY_SITE_OF_CONDITION = "BodySiteOfCondition" + BODY_SITE_OF_TREATMENT = "BodySiteOfTreatment" + COURSE_OF_CONDITION = "CourseOfCondition" + COURSE_OF_EXAMINATION = "CourseOfExamination" + COURSE_OF_MEDICATION = "CourseOfMedication" + COURSE_OF_TREATMENT = "CourseOfTreatment" + DIRECTION_OF_BODY_STRUCTURE = "DirectionOfBodyStructure" + DIRECTION_OF_CONDITION = "DirectionOfCondition" + DIRECTION_OF_EXAMINATION = "DirectionOfExamination" + DIRECTION_OF_TREATMENT = "DirectionOfTreatment" + DOSAGE_OF_MEDICATION = "DosageOfMedication" + EXAMINATION_FINDS_CONDITION = "ExaminationFindsCondition" + EXPRESSION_OF_GENE = "ExpressionOfGene" + EXPRESSION_OF_VARIANT = "ExpressionOfVariant" + FORM_OF_MEDICATION = "FormOfMedication" + FREQUENCY_OF_CONDITION = "FrequencyOfCondition" + FREQUENCY_OF_MEDICATION = "FrequencyOfMedication" + FREQUENCY_OF_TREATMENT = "FrequencyOfTreatment" + MUTATION_TYPE_OF_GENE = "MutationTypeOfGene" + MUTATION_TYPE_OF_VARIANT = "MutationTypeOfVariant" + QUALIFIER_OF_CONDITION = "QualifierOfCondition" + RELATION_OF_EXAMINATION = "RelationOfExamination" + ROUTE_OF_MEDICATION = "RouteOfMedication" + SCALE_OF_CONDITION = "ScaleOfCondition" + TIME_OF_CONDITION = "TimeOfCondition" + TIME_OF_EVENT = "TimeOfEvent" + TIME_OF_EXAMINATION = "TimeOfExamination" + TIME_OF_MEDICATION = "TimeOfMedication" + TIME_OF_TREATMENT = "TimeOfTreatment" + UNIT_OF_CONDITION = "UnitOfCondition" + UNIT_OF_EXAMINATION = "UnitOfExamination" + VALUE_OF_CONDITION = "ValueOfCondition" + VALUE_OF_EXAMINATION = "ValueOfExamination" + VARIANT_OF_GENE = "VariantOfGene" + + + class azure.ai.textanalytics.HealthcareRelation(DictMixin): + confidence_score: Optional[float] + relation_type: str + roles: List[HealthcareRelationRole] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.HealthcareRelationRole(DictMixin): + entity: HealthcareEntity + name: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.LinkedEntity(DictMixin): + bing_entity_search_api_id: Optional[str] + data_source: str + data_source_entity_id: Optional[str] + language: str + matches: List[LinkedEntityMatch] + name: str + url: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.LinkedEntityMatch(DictMixin): + confidence_score: float + length: int + offset: int + text: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.MinedOpinion(DictMixin): + assessments: List[AssessmentSentiment] + target: TargetSentiment + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.MultiLabelClassifyAction(DictMixin): + deployment_name: str + disable_service_logs: Optional[bool] + project_name: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__( + self, + project_name: str, + deployment_name: str, + *, + disable_service_logs: Optional[bool] = ..., + **kwargs: Any + ) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.PiiEntity(DictMixin): + category: str + confidence_score: float + length: int + offset: int + subcategory: Optional[str] + text: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.PiiEntityCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ABA_ROUTING_NUMBER = "ABARoutingNumber" + ADDRESS = "Address" + AGE = "Age" + ALL = "All" + AR_NATIONAL_IDENTITY_NUMBER = "ARNationalIdentityNumber" + AT_IDENTITY_CARD = "ATIdentityCard" + AT_TAX_IDENTIFICATION_NUMBER = "ATTaxIdentificationNumber" + AT_VALUE_ADDED_TAX_NUMBER = "ATValueAddedTaxNumber" + AU_BANK_ACCOUNT_NUMBER = "AUBankAccountNumber" + AU_BUSINESS_NUMBER = "AUBusinessNumber" + AU_COMPANY_NUMBER = "AUCompanyNumber" + AU_DRIVERS_LICENSE_NUMBER = "AUDriversLicenseNumber" + AU_MEDICAL_ACCOUNT_NUMBER = "AUMedicalAccountNumber" + AU_PASSPORT_NUMBER = "AUPassportNumber" + AU_TAX_FILE_NUMBER = "AUTaxFileNumber" + AZURE_DOCUMENT_DB_AUTH_KEY = "AzureDocumentDBAuthKey" + AZURE_IAAS_DATABASE_CONNECTION_AND_SQL_STRING = "AzureIAASDatabaseConnectionAndSQLString" + AZURE_IO_T_CONNECTION_STRING = "AzureIoTConnectionString" + AZURE_PUBLISH_SETTING_PASSWORD = "AzurePublishSettingPassword" + AZURE_REDIS_CACHE_STRING = "AzureRedisCacheString" + AZURE_SAS = "AzureSAS" + AZURE_SERVICE_BUS_STRING = "AzureServiceBusString" + AZURE_STORAGE_ACCOUNT_GENERIC = "AzureStorageAccountGeneric" + AZURE_STORAGE_ACCOUNT_KEY = "AzureStorageAccountKey" + BE_NATIONAL_NUMBER = "BENationalNumber" + BE_NATIONAL_NUMBER_V2 = "BENationalNumberV2" + BE_VALUE_ADDED_TAX_NUMBER = "BEValueAddedTaxNumber" + BG_UNIFORM_CIVIL_NUMBER = "BGUniformCivilNumber" + BRCPF_NUMBER = "BRCPFNumber" + BR_LEGAL_ENTITY_NUMBER = "BRLegalEntityNumber" + BR_NATIONAL_IDRG = "BRNationalIDRG" + CA_BANK_ACCOUNT_NUMBER = "CABankAccountNumber" + CA_DRIVERS_LICENSE_NUMBER = "CADriversLicenseNumber" + CA_HEALTH_SERVICE_NUMBER = "CAHealthServiceNumber" + CA_PASSPORT_NUMBER = "CAPassportNumber" + CA_PERSONAL_HEALTH_IDENTIFICATION = "CAPersonalHealthIdentification" + CA_SOCIAL_INSURANCE_NUMBER = "CASocialInsuranceNumber" + CH_SOCIAL_SECURITY_NUMBER = "CHSocialSecurityNumber" + CL_IDENTITY_CARD_NUMBER = "CLIdentityCardNumber" + CN_RESIDENT_IDENTITY_CARD_NUMBER = "CNResidentIdentityCardNumber" + CREDIT_CARD_NUMBER = "CreditCardNumber" + CY_IDENTITY_CARD = "CYIdentityCard" + CY_TAX_IDENTIFICATION_NUMBER = "CYTaxIdentificationNumber" + CZ_PERSONAL_IDENTITY_NUMBER = "CZPersonalIdentityNumber" + CZ_PERSONAL_IDENTITY_V2 = "CZPersonalIdentityV2" + DATE = "Date" + DEFAULT = "Default" + DE_DRIVERS_LICENSE_NUMBER = "DEDriversLicenseNumber" + DE_IDENTITY_CARD_NUMBER = "DEIdentityCardNumber" + DE_PASSPORT_NUMBER = "DEPassportNumber" + DE_TAX_IDENTIFICATION_NUMBER = "DETaxIdentificationNumber" + DE_VALUE_ADDED_NUMBER = "DEValueAddedNumber" + DK_PERSONAL_IDENTIFICATION_NUMBER = "DKPersonalIdentificationNumber" + DK_PERSONAL_IDENTIFICATION_V2 = "DKPersonalIdentificationV2" + DRUG_ENFORCEMENT_AGENCY_NUMBER = "DrugEnforcementAgencyNumber" + EE_PERSONAL_IDENTIFICATION_CODE = "EEPersonalIdentificationCode" + EMAIL = "Email" + ESDNI = "ESDNI" + ES_SOCIAL_SECURITY_NUMBER = "ESSocialSecurityNumber" + ES_TAX_IDENTIFICATION_NUMBER = "ESTaxIdentificationNumber" + EUGPS_COORDINATES = "EUGPSCoordinates" + EU_DEBIT_CARD_NUMBER = "EUDebitCardNumber" + EU_DRIVERS_LICENSE_NUMBER = "EUDriversLicenseNumber" + EU_NATIONAL_IDENTIFICATION_NUMBER = "EUNationalIdentificationNumber" + EU_PASSPORT_NUMBER = "EUPassportNumber" + EU_SOCIAL_SECURITY_NUMBER = "EUSocialSecurityNumber" + EU_TAX_IDENTIFICATION_NUMBER = "EUTaxIdentificationNumber" + FI_EUROPEAN_HEALTH_NUMBER = "FIEuropeanHealthNumber" + FI_NATIONAL_ID = "FINationalID" + FI_NATIONAL_IDV2 = "FINationalIDV2" + FI_PASSPORT_NUMBER = "FIPassportNumber" + FR_DRIVERS_LICENSE_NUMBER = "FRDriversLicenseNumber" + FR_HEALTH_INSURANCE_NUMBER = "FRHealthInsuranceNumber" + FR_NATIONAL_ID = "FRNationalID" + FR_PASSPORT_NUMBER = "FRPassportNumber" + FR_SOCIAL_SECURITY_NUMBER = "FRSocialSecurityNumber" + FR_TAX_IDENTIFICATION_NUMBER = "FRTaxIdentificationNumber" + FR_VALUE_ADDED_TAX_NUMBER = "FRValueAddedTaxNumber" + GR_NATIONAL_IDV2 = "GRNationalIDV2" + GR_NATIONAL_ID_CARD = "GRNationalIDCard" + GR_TAX_IDENTIFICATION_NUMBER = "GRTaxIdentificationNumber" + HK_IDENTITY_CARD_NUMBER = "HKIdentityCardNumber" + HR_IDENTITY_CARD_NUMBER = "HRIdentityCardNumber" + HR_NATIONAL_ID_NUMBER = "HRNationalIDNumber" + HR_PERSONAL_IDENTIFICATION_NUMBER = "HRPersonalIdentificationNumber" + HR_PERSONAL_IDENTIFICATION_OIB_NUMBER_V2 = "HRPersonalIdentificationOIBNumberV2" + HU_PERSONAL_IDENTIFICATION_NUMBER = "HUPersonalIdentificationNumber" + HU_TAX_IDENTIFICATION_NUMBER = "HUTaxIdentificationNumber" + HU_VALUE_ADDED_NUMBER = "HUValueAddedNumber" + ID_IDENTITY_CARD_NUMBER = "IDIdentityCardNumber" + IE_PERSONAL_PUBLIC_SERVICE_NUMBER = "IEPersonalPublicServiceNumber" + IE_PERSONAL_PUBLIC_SERVICE_NUMBER_V2 = "IEPersonalPublicServiceNumberV2" + IL_BANK_ACCOUNT_NUMBER = "ILBankAccountNumber" + IL_NATIONAL_ID = "ILNationalID" + INTERNATIONAL_BANKING_ACCOUNT_NUMBER = "InternationalBankingAccountNumber" + IN_PERMANENT_ACCOUNT = "INPermanentAccount" + IN_UNIQUE_IDENTIFICATION_NUMBER = "INUniqueIdentificationNumber" + IP_ADDRESS = "IPAddress" + IT_DRIVERS_LICENSE_NUMBER = "ITDriversLicenseNumber" + IT_FISCAL_CODE = "ITFiscalCode" + IT_VALUE_ADDED_TAX_NUMBER = "ITValueAddedTaxNumber" + JP_BANK_ACCOUNT_NUMBER = "JPBankAccountNumber" + JP_DRIVERS_LICENSE_NUMBER = "JPDriversLicenseNumber" + JP_MY_NUMBER_CORPORATE = "JPMyNumberCorporate" + JP_MY_NUMBER_PERSONAL = "JPMyNumberPersonal" + JP_PASSPORT_NUMBER = "JPPassportNumber" + JP_RESIDENCE_CARD_NUMBER = "JPResidenceCardNumber" + JP_RESIDENT_REGISTRATION_NUMBER = "JPResidentRegistrationNumber" + JP_SOCIAL_INSURANCE_NUMBER = "JPSocialInsuranceNumber" + KR_RESIDENT_REGISTRATION_NUMBER = "KRResidentRegistrationNumber" + LT_PERSONAL_CODE = "LTPersonalCode" + LU_NATIONAL_IDENTIFICATION_NUMBER_NATURAL = "LUNationalIdentificationNumberNatural" + LU_NATIONAL_IDENTIFICATION_NUMBER_NON_NATURAL = "LUNationalIdentificationNumberNonNatural" + LV_PERSONAL_CODE = "LVPersonalCode" + MT_IDENTITY_CARD_NUMBER = "MTIdentityCardNumber" + MT_TAX_ID_NUMBER = "MTTaxIDNumber" + MY_IDENTITY_CARD_NUMBER = "MYIdentityCardNumber" + NL_CITIZENS_SERVICE_NUMBER = "NLCitizensServiceNumber" + NL_CITIZENS_SERVICE_NUMBER_V2 = "NLCitizensServiceNumberV2" + NL_TAX_IDENTIFICATION_NUMBER = "NLTaxIdentificationNumber" + NL_VALUE_ADDED_TAX_NUMBER = "NLValueAddedTaxNumber" + NO_IDENTITY_NUMBER = "NOIdentityNumber" + NZ_BANK_ACCOUNT_NUMBER = "NZBankAccountNumber" + NZ_DRIVERS_LICENSE_NUMBER = "NZDriversLicenseNumber" + NZ_INLAND_REVENUE_NUMBER = "NZInlandRevenueNumber" + NZ_MINISTRY_OF_HEALTH_NUMBER = "NZMinistryOfHealthNumber" + NZ_SOCIAL_WELFARE_NUMBER = "NZSocialWelfareNumber" + ORGANIZATION = "Organization" + PERSON = "Person" + PHONE_NUMBER = "PhoneNumber" + PH_UNIFIED_MULTI_PURPOSE_ID_NUMBER = "PHUnifiedMultiPurposeIDNumber" + PLREGON_NUMBER = "PLREGONNumber" + PL_IDENTITY_CARD = "PLIdentityCard" + PL_NATIONAL_ID = "PLNationalID" + PL_NATIONAL_IDV2 = "PLNationalIDV2" + PL_PASSPORT_NUMBER = "PLPassportNumber" + PL_TAX_IDENTIFICATION_NUMBER = "PLTaxIdentificationNumber" + PT_CITIZEN_CARD_NUMBER = "PTCitizenCardNumber" + PT_CITIZEN_CARD_NUMBER_V2 = "PTCitizenCardNumberV2" + PT_TAX_IDENTIFICATION_NUMBER = "PTTaxIdentificationNumber" + RO_PERSONAL_NUMERICAL_CODE = "ROPersonalNumericalCode" + RU_PASSPORT_NUMBER_DOMESTIC = "RUPassportNumberDomestic" + RU_PASSPORT_NUMBER_INTERNATIONAL = "RUPassportNumberInternational" + SA_NATIONAL_ID = "SANationalID" + SE_NATIONAL_ID = "SENationalID" + SE_NATIONAL_IDV2 = "SENationalIDV2" + SE_PASSPORT_NUMBER = "SEPassportNumber" + SE_TAX_IDENTIFICATION_NUMBER = "SETaxIdentificationNumber" + SG_NATIONAL_REGISTRATION_IDENTITY_CARD_NUMBER = "SGNationalRegistrationIdentityCardNumber" + SI_TAX_IDENTIFICATION_NUMBER = "SITaxIdentificationNumber" + SI_UNIQUE_MASTER_CITIZEN_NUMBER = "SIUniqueMasterCitizenNumber" + SK_PERSONAL_NUMBER = "SKPersonalNumber" + SQL_SERVER_CONNECTION_STRING = "SQLServerConnectionString" + SWIFT_CODE = "SWIFTCode" + TH_POPULATION_IDENTIFICATION_CODE = "THPopulationIdentificationCode" + TR_NATIONAL_IDENTIFICATION_NUMBER = "TRNationalIdentificationNumber" + TW_NATIONAL_ID = "TWNationalID" + TW_PASSPORT_NUMBER = "TWPassportNumber" + TW_RESIDENT_CERTIFICATE = "TWResidentCertificate" + UA_PASSPORT_NUMBER_DOMESTIC = "UAPassportNumberDomestic" + UA_PASSPORT_NUMBER_INTERNATIONAL = "UAPassportNumberInternational" + UK_DRIVERS_LICENSE_NUMBER = "UKDriversLicenseNumber" + UK_ELECTORAL_ROLL_NUMBER = "UKElectoralRollNumber" + UK_NATIONAL_HEALTH_NUMBER = "UKNationalHealthNumber" + UK_NATIONAL_INSURANCE_NUMBER = "UKNationalInsuranceNumber" + UK_UNIQUE_TAXPAYER_NUMBER = "UKUniqueTaxpayerNumber" + URL = "URL" + USUK_PASSPORT_NUMBER = "USUKPassportNumber" + US_BANK_ACCOUNT_NUMBER = "USBankAccountNumber" + US_DRIVERS_LICENSE_NUMBER = "USDriversLicenseNumber" + US_INDIVIDUAL_TAXPAYER_IDENTIFICATION = "USIndividualTaxpayerIdentification" + US_SOCIAL_SECURITY_NUMBER = "USSocialSecurityNumber" + ZA_IDENTIFICATION_NUMBER = "ZAIdentificationNumber" + + + class azure.ai.textanalytics.PiiEntityDomain(str, Enum, metaclass=CaseInsensitiveEnumMeta): + PROTECTED_HEALTH_INFORMATION = "phi" + + + class azure.ai.textanalytics.RecognizeCustomEntitiesAction(DictMixin): + deployment_name: str + disable_service_logs: Optional[bool] + project_name: str + string_index_type: Optional[str] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__( + self, + project_name: str, + deployment_name: str, + *, + disable_service_logs: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.RecognizeCustomEntitiesResult(DictMixin): + entities: List[CategorizedEntity] + id: str + is_error: Literal[False] = False + kind: Literal["CustomEntityRecognition"] = CustomEntityRecognition + statistics: Optional[TextDocumentStatistics] + warnings: List[TextAnalyticsWarning] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.RecognizeEntitiesAction(DictMixin): + disable_service_logs: Optional[bool] + model_version: Optional[str] + string_index_type: Optional[str] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__( + self, + *, + disable_service_logs: Optional[bool] = ..., + model_version: Optional[str] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.RecognizeEntitiesResult(DictMixin): + entities: List[CategorizedEntity] + id: str + is_error: Literal[False] = False + kind: Literal["EntityRecognition"] = EntityRecognition + statistics: Optional[TextDocumentStatistics] + warnings: List[TextAnalyticsWarning] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.RecognizeLinkedEntitiesAction(DictMixin): + disable_service_logs: Optional[bool] + model_version: Optional[str] + string_index_type: Optional[str] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__( + self, + *, + disable_service_logs: Optional[bool] = ..., + model_version: Optional[str] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.RecognizeLinkedEntitiesResult(DictMixin): + entities: List[LinkedEntity] + id: str + is_error: Literal[False] = False + kind: Literal["EntityLinking"] = EntityLinking + statistics: Optional[TextDocumentStatistics] + warnings: List[TextAnalyticsWarning] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.RecognizePiiEntitiesAction(DictMixin): + categories_filter: Optional[List[Union[str, PiiEntityCategory]]] + disable_service_logs: Optional[bool] + domain_filter: Optional[str] + model_version: Optional[str] + string_index_type: Optional[str] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__( + self, + *, + categories_filter: Optional[List[Union[str, PiiEntityCategory]]] = ..., + disable_service_logs: Optional[bool] = ..., + domain_filter: Optional[str] = ..., + model_version: Optional[str] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.RecognizePiiEntitiesResult(DictMixin): + entities: List[PiiEntity] + id: str + is_error: Literal[False] = False + kind: Literal["PiiEntityRecognition"] = PiiEntityRecognition + redacted_text: str + statistics: Optional[TextDocumentStatistics] + warnings: List[TextAnalyticsWarning] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.SentenceSentiment(DictMixin): + confidence_scores: SentimentConfidenceScores + length: int + mined_opinions: Optional[List[MinedOpinion]] + offset: int + sentiment: str + text: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.SentimentConfidenceScores(DictMixin): + negative: float + neutral: float + positive: float + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.SingleLabelClassifyAction(DictMixin): + deployment_name: str + disable_service_logs: Optional[bool] + project_name: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__( + self, + project_name: str, + deployment_name: str, + *, + disable_service_logs: Optional[bool] = ..., + **kwargs: Any + ) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.SummaryContext(DictMixin): + length: int + offset: int + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.SummarySentence(DictMixin): + length: int + offset: int + rank_score: float + text: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.TargetSentiment(DictMixin): + confidence_scores: SentimentConfidenceScores + length: int + offset: int + sentiment: str + text: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.TextAnalysisKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ABSTRACTIVE_SUMMARIZATION = "AbstractiveSummarization" + CUSTOM_DOCUMENT_CLASSIFICATION = "CustomDocumentClassification" + CUSTOM_ENTITY_RECOGNITION = "CustomEntityRecognition" + ENTITY_LINKING = "EntityLinking" + ENTITY_RECOGNITION = "EntityRecognition" + EXTRACTIVE_SUMMARIZATION = "ExtractiveSummarization" + HEALTHCARE = "Healthcare" + KEY_PHRASE_EXTRACTION = "KeyPhraseExtraction" + LANGUAGE_DETECTION = "LanguageDetection" + PII_ENTITY_RECOGNITION = "PiiEntityRecognition" + SENTIMENT_ANALYSIS = "SentimentAnalysis" + + + @runtime_checkable + class azure.ai.textanalytics.TextAnalysisLROPoller(Protocol[PollingReturnType_co]): + property details: Mapping[str, Any] # Read-only + + def add_done_callback(self, func: Callable) -> None: ... + + def cancel(self) -> None: ... + + def continuation_token(self) -> str: ... + + def done(self) -> bool: ... + + def remove_done_callback(self, func: Callable) -> None: ... + + def result(self, timeout: Optional[float] = None) -> PollingReturnType_co: ... + + def status(self) -> str: ... + + def wait(self, timeout: Optional[float] = None) -> None: ... + + + class azure.ai.textanalytics.TextAnalyticsApiVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): + V2022_05_01 = "2022-05-01" + V2023_04_01 = "2023-04-01" + V3_0 = "v3.0" + V3_1 = "v3.1" + + + class azure.ai.textanalytics.TextAnalyticsClient(TextAnalyticsClientBase): implements ContextManager + + def __init__( + self, + endpoint: str, + credential: Union[AzureKeyCredential, TokenCredential], + *, + api_version: Optional[Union[str, TextAnalyticsApiVersion]] = ..., + default_country_hint: Optional[str] = ..., + default_language: Optional[str] = ..., + **kwargs: Any + ) -> None: ... + + @distributed_trace + @validate_multiapi_args(version_method_added='v3.0', args_mapping={'v3.1': ['show_opinion_mining', 'disable_service_logs', 'string_index_type']}) + def analyze_sentiment( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + disable_service_logs: Optional[bool] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + show_opinion_mining: Optional[bool] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> List[Union[AnalyzeSentimentResult, DocumentError]]: ... + + @distributed_trace + @validate_multiapi_args(version_method_added='2023-04-01') + def begin_abstract_summary( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + continuation_token: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + polling_interval: Optional[int] = ..., + sentence_count: Optional[int] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> TextAnalysisLROPoller[ItemPaged[Union[AbstractiveSummaryResult, DocumentError]]]: ... + + @distributed_trace + @validate_multiapi_args(version_method_added='v3.1', custom_wrapper=check_for_unsupported_actions_types) + def begin_analyze_actions( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + actions: List[Union[RecognizeEntitiesAction, RecognizeLinkedEntitiesAction, RecognizePiiEntitiesAction, ExtractKeyPhrasesAction, AnalyzeSentimentAction, RecognizeCustomEntitiesAction, SingleLabelClassifyAction, MultiLabelClassifyAction, AnalyzeHealthcareEntitiesAction, ExtractiveSummaryAction, AbstractiveSummaryAction]], + *, + continuation_token: Optional[str] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + polling_interval: Optional[int] = ..., + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> TextAnalysisLROPoller[ItemPaged[List[Union[RecognizeEntitiesResult, RecognizeLinkedEntitiesResult, RecognizePiiEntitiesResult, ExtractKeyPhrasesResult, AnalyzeSentimentResult, RecognizeCustomEntitiesResult, ClassifyDocumentResult, AnalyzeHealthcareEntitiesResult, ExtractiveSummaryResult, AbstractiveSummaryResult, DocumentError]]]]: ... + + @distributed_trace + @validate_multiapi_args(version_method_added='v3.1', args_mapping={'2022-05-01': ['display_name']}) + def begin_analyze_healthcare_entities( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + continuation_token: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + polling_interval: Optional[int] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> AnalyzeHealthcareEntitiesLROPoller[ItemPaged[Union[AnalyzeHealthcareEntitiesResult, DocumentError]]]: ... + + @distributed_trace + @validate_multiapi_args(version_method_added='2023-04-01') + def begin_extract_summary( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + continuation_token: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + max_sentence_count: Optional[int] = ..., + model_version: Optional[str] = ..., + order_by: Optional[Literal[Rank, Offset]] = ..., + polling_interval: Optional[int] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> TextAnalysisLROPoller[ItemPaged[Union[ExtractiveSummaryResult, DocumentError]]]: ... + + @distributed_trace + @validate_multiapi_args(version_method_added='2022-05-01') + def begin_multi_label_classify( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + project_name: str, + deployment_name: str, + *, + continuation_token: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + polling_interval: Optional[int] = ..., + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> TextAnalysisLROPoller[ItemPaged[Union[ClassifyDocumentResult, DocumentError]]]: ... + + @distributed_trace + @validate_multiapi_args(version_method_added='2022-05-01') + def begin_recognize_custom_entities( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + project_name: str, + deployment_name: str, + *, + continuation_token: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + polling_interval: Optional[int] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> TextAnalysisLROPoller[ItemPaged[Union[RecognizeCustomEntitiesResult, DocumentError]]]: ... + + @distributed_trace + @validate_multiapi_args(version_method_added='2022-05-01') + def begin_single_label_classify( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + project_name: str, + deployment_name: str, + *, + continuation_token: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + polling_interval: Optional[int] = ..., + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> TextAnalysisLROPoller[ItemPaged[Union[ClassifyDocumentResult, DocumentError]]]: ... + + def close(self) -> None: ... + + @distributed_trace + @validate_multiapi_args(version_method_added='v3.0', args_mapping={'v3.1': ['disable_service_logs']}) + def detect_language( + self, + documents: Union[List[str], List[DetectLanguageInput], List[Dict[str, str]]], + *, + country_hint: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + model_version: Optional[str] = ..., + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> List[Union[DetectLanguageResult, DocumentError]]: ... + + @distributed_trace + @validate_multiapi_args(version_method_added='v3.0', args_mapping={'v3.1': ['disable_service_logs']}) + def extract_key_phrases( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + disable_service_logs: Optional[bool] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> List[Union[ExtractKeyPhrasesResult, DocumentError]]: ... + + @distributed_trace + @validate_multiapi_args(version_method_added='v3.0', args_mapping={'v3.1': ['string_index_type', 'disable_service_logs']}) + def recognize_entities( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + disable_service_logs: Optional[bool] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> List[Union[RecognizeEntitiesResult, DocumentError]]: ... + + @distributed_trace + @validate_multiapi_args(version_method_added='v3.0', args_mapping={'v3.1': ['string_index_type', 'disable_service_logs']}) + def recognize_linked_entities( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + disable_service_logs: Optional[bool] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> List[Union[RecognizeLinkedEntitiesResult, DocumentError]]: ... + + @distributed_trace + @validate_multiapi_args(version_method_added='v3.1') + def recognize_pii_entities( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + categories_filter: Optional[List[Union[str, PiiEntityCategory]]] = ..., + disable_service_logs: Optional[bool] = ..., + domain_filter: Optional[Union[str, PiiEntityDomain]] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> List[Union[RecognizePiiEntitiesResult, DocumentError]]: ... + + + class azure.ai.textanalytics.TextAnalyticsError(DictMixin): + code: str + message: str + target: Optional[str] + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.TextAnalyticsWarning(DictMixin): + code: str + message: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.TextDocumentBatchStatistics(DictMixin): + document_count: int + erroneous_document_count: int + transaction_count: int + valid_document_count: int + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.TextDocumentInput(DictMixin, MultiLanguageInput): + id: str + language: Optional[str] + text: str + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__( + self, + *, + id: str, + language: Optional[str] = ..., + text: str, + **kwargs: Any + ) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + @classmethod + def deserialize( + cls, + data: str, + content_type: str = None + ): ... + + @classmethod + def enable_additional_properties_sending(cls): ... + + @classmethod + def from_dict( + cls, + data: dict, + key_extractors = None, + content_type: str = None + ): ... + + @classmethod + def is_xml_model(cls): ... + + def as_dict( + self, + keep_readonly = True, + key_transformer: function = attribute_transformer, + **kwargs + ) -> dict: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def serialize( + self, + keep_readonly: bool = False, + **kwargs + ) -> dict: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + + class azure.ai.textanalytics.TextDocumentStatistics(DictMixin): + character_count: int + transaction_count: int + + def __contains__(self, key: str) -> bool: ... + + def __delitem__(self, key: str) -> None: ... + + def __eq__(self, other: Any) -> bool: ... + + def __getitem__(self, key: str) -> Any: ... + + def __init__(self, **kwargs: Any) -> None: ... + + def __len__(self) -> int: ... + + def __ne__(self, other: Any) -> bool: ... + + def __repr__(self) -> str: ... + + def __setitem__( + self, + key: str, + item: Any + ) -> None: ... + + def __str__(self) -> str: ... + + def get( + self, + key: str, + default: Optional[Any] = None + ) -> Any: ... + + def has_key(self, k: str) -> bool: ... + + def items(self) -> Iterable[Tuple[str, Any]]: ... + + def keys(self) -> Iterable[str]: ... + + def update( + self, + *args: Any, + **kwargs: Any + ) -> None: ... + + def values(self) -> Iterable[Any]: ... + + +namespace azure.ai.textanalytics.aio + + class azure.ai.textanalytics.aio.AsyncAnalyzeActionsLROPoller(AsyncLROPoller[PollingReturnType_co]): + property details: Mapping[str, Any] # Read-only + + def __getattr__(self, item: str) -> Any: ... + + @classmethod + def from_continuation_token( + cls, + polling_method: AsyncAnalyzeActionsLROPollingMethod, + continuation_token: str, + **kwargs: Any + ) -> AsyncAnalyzeActionsLROPoller: ... + + @distributed_trace_async + async def cancel(self) -> None: ... + + def polling_method(self) -> AsyncAnalyzeActionsLROPollingMethod: ... + + + class azure.ai.textanalytics.aio.AsyncAnalyzeHealthcareEntitiesLROPoller(AsyncLROPoller[PollingReturnType_co]): + property details: Mapping[str, Any] # Read-only + + def __getattr__(self, item: str) -> Any: ... + + @classmethod + def from_continuation_token( + cls, + polling_method: AsyncAnalyzeHealthcareEntitiesLROPollingMethod, + continuation_token: str, + **kwargs: Any + ) -> AsyncAnalyzeHealthcareEntitiesLROPoller: ... + + @distributed_trace_async + async def cancel( + self, + *, + polling_interval: Optional[int] = ..., + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + def polling_method(self) -> AsyncAnalyzeHealthcareEntitiesLROPollingMethod: ... + + + @runtime_checkable + class azure.ai.textanalytics.aio.AsyncTextAnalysisLROPoller(Protocol[PollingReturnType_co], Awaitable[PollingReturnType_co]): implements Awaitable + property details: Mapping[str, Any] # Read-only + + async def cancel(self) -> None: ... + + def continuation_token(self) -> str: ... + + def done(self) -> bool: ... + + async def result(self) -> PollingReturnType_co: ... + + def status(self) -> str: ... + + async def wait(self) -> None: ... + + + class azure.ai.textanalytics.aio.TextAnalyticsClient(AsyncTextAnalyticsClientBase): implements AsyncContextManager + + def __init__( + self, + endpoint: str, + credential: Union[AzureKeyCredential, AsyncTokenCredential], + *, + api_version: Optional[Union[str, TextAnalyticsApiVersion]] = ..., + default_country_hint: Optional[str] = ..., + default_language: Optional[str] = ..., + **kwargs: Any + ) -> None: ... + + @distributed_trace_async + @validate_multiapi_args(version_method_added='v3.0', args_mapping={'v3.1': ['show_opinion_mining', 'disable_service_logs', 'string_index_type']}) + async def analyze_sentiment( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + disable_service_logs: Optional[bool] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + show_opinion_mining: Optional[bool] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> List[Union[AnalyzeSentimentResult, DocumentError]]: ... + + @distributed_trace_async + @validate_multiapi_args(version_method_added='2023-04-01') + async def begin_abstract_summary( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + continuation_token: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + polling_interval: Optional[int] = ..., + sentence_count: Optional[int] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> AsyncTextAnalysisLROPoller[AsyncItemPaged[Union[AbstractiveSummaryResult, DocumentError]]]: ... + + @distributed_trace_async + @validate_multiapi_args(version_method_added='v3.1', custom_wrapper=check_for_unsupported_actions_types) + async def begin_analyze_actions( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + actions: List[Union[RecognizeEntitiesAction, RecognizeLinkedEntitiesAction, RecognizePiiEntitiesAction, ExtractKeyPhrasesAction, AnalyzeSentimentAction, RecognizeCustomEntitiesAction, SingleLabelClassifyAction, MultiLabelClassifyAction, AnalyzeHealthcareEntitiesAction, ExtractiveSummaryAction, AbstractiveSummaryAction]], + *, + continuation_token: Optional[str] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + polling_interval: Optional[int] = ..., + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> AsyncTextAnalysisLROPoller[AsyncItemPaged[List[Union[RecognizeEntitiesResult, RecognizeLinkedEntitiesResult, RecognizePiiEntitiesResult, ExtractKeyPhrasesResult, AnalyzeSentimentResult, RecognizeCustomEntitiesResult, ClassifyDocumentResult, AnalyzeHealthcareEntitiesResult, ExtractiveSummaryResult, AbstractiveSummaryResult, DocumentError]]]]: ... + + @distributed_trace_async + @validate_multiapi_args(version_method_added='v3.1', args_mapping={'2022-05-01': ['display_name']}) + async def begin_analyze_healthcare_entities( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + continuation_token: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + polling_interval: Optional[int] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> AsyncAnalyzeHealthcareEntitiesLROPoller[AsyncItemPaged[Union[AnalyzeHealthcareEntitiesResult, DocumentError]]]: ... + + @distributed_trace_async + @validate_multiapi_args(version_method_added='2023-04-01') + async def begin_extract_summary( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + continuation_token: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + max_sentence_count: Optional[int] = ..., + model_version: Optional[str] = ..., + order_by: Optional[Literal[Rank, Offset]] = ..., + polling_interval: Optional[int] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> AsyncTextAnalysisLROPoller[AsyncItemPaged[Union[ExtractiveSummaryResult, DocumentError]]]: ... + + @distributed_trace_async + @validate_multiapi_args(version_method_added='2022-05-01') + async def begin_multi_label_classify( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + project_name: str, + deployment_name: str, + *, + continuation_token: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + polling_interval: Optional[int] = ..., + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> AsyncTextAnalysisLROPoller[AsyncItemPaged[Union[ClassifyDocumentResult, DocumentError]]]: ... + + @distributed_trace_async + @validate_multiapi_args(version_method_added='2022-05-01') + async def begin_recognize_custom_entities( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + project_name: str, + deployment_name: str, + *, + continuation_token: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + polling_interval: Optional[int] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> AsyncTextAnalysisLROPoller[AsyncItemPaged[Union[RecognizeCustomEntitiesResult, DocumentError]]]: ... + + @distributed_trace_async + @validate_multiapi_args(version_method_added='2022-05-01') + async def begin_single_label_classify( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + project_name: str, + deployment_name: str, + *, + continuation_token: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + display_name: Optional[str] = ..., + language: Optional[str] = ..., + polling_interval: Optional[int] = ..., + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> AsyncTextAnalysisLROPoller[AsyncItemPaged[Union[ClassifyDocumentResult, DocumentError]]]: ... + + async def close(self) -> None: ... + + @distributed_trace_async + @validate_multiapi_args(version_method_added='v3.0', args_mapping={'v3.1': ['disable_service_logs']}) + async def detect_language( + self, + documents: Union[List[str], List[DetectLanguageInput], List[Dict[str, str]]], + *, + country_hint: Optional[str] = ..., + disable_service_logs: Optional[bool] = ..., + model_version: Optional[str] = ..., + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> List[Union[DetectLanguageResult, DocumentError]]: ... + + @distributed_trace_async + @validate_multiapi_args(version_method_added='v3.0', args_mapping={'v3.1': ['disable_service_logs']}) + async def extract_key_phrases( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + disable_service_logs: Optional[bool] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + show_stats: Optional[bool] = ..., + **kwargs: Any + ) -> List[Union[ExtractKeyPhrasesResult, DocumentError]]: ... + + @distributed_trace_async + @validate_multiapi_args(version_method_added='v3.0', args_mapping={'v3.1': ['string_index_type', 'disable_service_logs']}) + async def recognize_entities( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + disable_service_logs: Optional[bool] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> List[Union[RecognizeEntitiesResult, DocumentError]]: ... + + @distributed_trace_async + @validate_multiapi_args(version_method_added='v3.0', args_mapping={'v3.1': ['string_index_type', 'disable_service_logs']}) + async def recognize_linked_entities( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + disable_service_logs: Optional[bool] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> List[Union[RecognizeLinkedEntitiesResult, DocumentError]]: ... + + @distributed_trace_async + @validate_multiapi_args(version_method_added='v3.1') + async def recognize_pii_entities( + self, + documents: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]], + *, + categories_filter: Optional[List[Union[str, PiiEntityCategory]]] = ..., + disable_service_logs: Optional[bool] = ..., + domain_filter: Optional[Union[str, PiiEntityDomain]] = ..., + language: Optional[str] = ..., + model_version: Optional[str] = ..., + show_stats: Optional[bool] = ..., + string_index_type: Optional[str] = ..., + **kwargs: Any + ) -> List[Union[RecognizePiiEntitiesResult, DocumentError]]: ... + + +``` \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/api.metadata.yml b/sdk/textanalytics/azure-ai-textanalytics/api.metadata.yml new file mode 100644 index 000000000000..0aba7d310b08 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/api.metadata.yml @@ -0,0 +1,3 @@ +apiMdSha256: 70e69e2e70143dc5809487a2c464fce705c3305225f26418e082152ca9c3b660 +parserVersion: 0.3.30 +pythonVersion: 3.13.14