From 831d3c61166d424467505651927c5d03acf10d69 Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Tue, 28 Sep 2021 11:23:26 -0700 Subject: [PATCH] [formrecognizer] regenerate on latest (#20867) * regenerate with latest * update convenience layer --- .../_document_analysis_client.py | 8 +- .../formrecognizer/_form_training_client.py | 8 +- .../_generated/_configuration.py | 3 +- .../_generated/_form_recognizer_client.py | 35 +--- .../_generated/_operations_mixin.py | 60 +++--- .../_generated/aio/_configuration.py | 3 +- .../_generated/aio/_form_recognizer_client.py | 35 +--- .../_generated/aio/_operations_mixin.py | 60 +++--- .../ai/formrecognizer/_generated/models.py | 4 +- .../__init__.py | 0 .../_configuration.py | 3 +- .../_form_recognizer_client.py | 3 +- .../_metadata.json | 76 +++---- .../aio/__init__.py | 0 .../aio/_configuration.py | 3 +- .../aio/_form_recognizer_client.py | 3 +- .../aio/operations/__init__.py | 0 .../_form_recognizer_client_operations.py | 56 +++--- .../models/__init__.py | 0 .../models/_form_recognizer_client_enums.py | 1 - .../models/_models.py | 187 +++++++++-------- .../models/_models_py3.py | 190 ++++++++++-------- .../operations/__init__.py | 0 .../_form_recognizer_client_operations.py | 56 +++--- .../py.typed | 0 .../azure/ai/formrecognizer/_helpers.py | 2 +- .../azure/ai/formrecognizer/_models.py | 2 +- .../aio/_document_analysis_client_async.py | 8 +- .../aio/_form_training_client_async.py | 8 +- .../azure-ai-formrecognizer/swagger/README.md | 14 +- ...stom_forms.test_pages_kwarg_specified.yaml | 156 +++++++------- ...orms_async.test_pages_kwarg_specified.yaml | 166 +++++++-------- ...test_layout.test_layout_specify_pages.yaml | 98 ++++----- ...ayout_async.test_layout_specify_pages.yaml | 112 +++++------ ...st_receipt.test_pages_kwarg_specified.yaml | 24 +-- ...eipt_async.test_pages_kwarg_specified.yaml | 26 +-- ...t_from_url.test_pages_kwarg_specified.yaml | 20 +- ..._url_async.test_pages_kwarg_specified.yaml | 22 +- .../tests/test_compose_model.py | 2 +- .../tests/test_compose_model_async.py | 2 +- .../tests/test_content.py | 2 +- .../tests/test_content_async.py | 2 +- .../tests/test_content_from_url.py | 2 +- .../tests/test_content_from_url_async.py | 2 +- .../tests/test_copy_model.py | 2 +- .../tests/test_copy_model_async.py | 2 +- .../tests/test_custom_forms.py | 5 +- .../tests/test_custom_forms_async.py | 5 +- .../tests/test_custom_forms_from_url.py | 3 +- .../tests/test_custom_forms_from_url_async.py | 3 +- .../tests/test_identity_documents.py | 2 +- .../tests/test_identity_documents_async.py | 2 +- .../tests/test_identity_documents_from_url.py | 2 +- .../test_identity_documents_from_url_async.py | 2 +- .../tests/test_invoice.py | 3 +- .../tests/test_invoice_async.py | 3 +- .../tests/test_invoice_from_url.py | 2 +- .../tests/test_invoice_from_url_async.py | 2 +- .../tests/test_layout.py | 10 +- .../tests/test_layout_async.py | 10 +- .../tests/test_receipt.py | 5 +- .../tests/test_receipt_async.py | 5 +- .../tests/test_receipt_from_url.py | 5 +- .../tests/test_receipt_from_url_async.py | 5 +- .../tests/test_resolve_elements.py | 1 - .../tests/test_training.py | 2 +- .../tests/test_training_async.py | 2 +- 67 files changed, 769 insertions(+), 778 deletions(-) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/__init__.py (100%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/_configuration.py (97%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/_form_recognizer_client.py (97%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/_metadata.json (58%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/aio/__init__.py (100%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/aio/_configuration.py (97%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/aio/_form_recognizer_client.py (97%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/aio/operations/__init__.py (100%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/aio/operations/_form_recognizer_client_operations.py (96%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/models/__init__.py (100%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/models/_form_recognizer_client_enums.py (99%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/models/_models.py (87%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/models/_models_py3.py (88%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/operations/__init__.py (100%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/operations/_form_recognizer_client_operations.py (96%) rename sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/{v3_0_preview_1 => v2021_09_30_preview}/py.typed (100%) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_analysis_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_analysis_client.py index a53e61f3b987..4423767f03bc 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_analysis_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_analysis_client.py @@ -83,9 +83,9 @@ def begin_analyze_document(self, model, document, **kwargs): "prebuilt-document", "prebuilt-layout". :param document: JPEG, PNG, PDF, TIFF, or BMP type file stream or bytes. :type document: bytes or IO[bytes] - :keyword list[str] pages: Custom page numbers for multi-page documents(PDF/TIFF). Input the page numbers + :keyword str pages: Custom page numbers for multi-page documents(PDF/TIFF). Input the page numbers and/or ranges of pages you want to get in the result. For a range of pages, use a hyphen, like - `pages=["1-3", "5-6"]`. Separate each page number or range with a comma. + `pages="1-3, 5-6"`. Separate each page number or range with a comma. :keyword str locale: Locale of the document. Supported locales include: en-US, en-AU, en-CA, en-GB, and en-IN. :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -139,9 +139,9 @@ def begin_analyze_document_from_url(self, model, document_url, **kwargs): "prebuilt-document", "prebuilt-layout". :param str document_url: The URL of the document to analyze. The input must be a valid, encoded URL of one of the supported formats: JPEG, PNG, PDF, TIFF, or BMP. - :keyword list[str] pages: Custom page numbers for multi-page documents(PDF/TIFF). Input the page numbers + :keyword str pages: Custom page numbers for multi-page documents(PDF/TIFF). Input the page numbers and/or ranges of pages you want to get in the result. For a range of pages, use a hyphen, like - `pages=["1-3", "5-6"]`. Separate each page number or range with a comma. + `pages="1-3, 5-6"`. Separate each page number or range with a comma. :keyword str locale: Locale of the document. Supported locales include: en-US, en-AU, en-CA, en-GB, and en-IN. :keyword str continuation_token: A continuation token to restart a poller from a saved state. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py index 6d742a07d5ea..2d2895cd0570 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py @@ -18,10 +18,6 @@ from azure.core.polling import LROPoller from azure.core.polling.base_polling import LROBasePolling from azure.core.pipeline import Pipeline -from ._generated.models import ( - CopyRequest, - CopyAuthorizationResult, -) from ._helpers import TransportWrapper from ._api_versions import FormRecognizerApiVersion from ._models import ( @@ -423,10 +419,10 @@ def _copy_callback(raw_response, _, headers): # pylint: disable=unused-argument return self._client.begin_copy_custom_model( # type: ignore model_id=model_id, - copy_request=CopyRequest( + copy_request=self._generated_models.CopyRequest( target_resource_id=target["resourceId"], target_resource_region=target["resourceRegion"], - copy_authorization=CopyAuthorizationResult( + copy_authorization=self._generated_models.CopyAuthorizationResult( access_token=target["accessToken"], model_id=target["modelId"], expiration_date_time_ticks=target["expirationDateTimeTicks"], diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_configuration.py index 6b2e3ca94ca5..67a9f5e11e10 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_configuration.py @@ -29,7 +29,8 @@ class FormRecognizerClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for +example: https://westus2.api.cognitive.microsoft.com). :type endpoint: str """ diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_form_recognizer_client.py index 67c575be9cf5..356082f3b26b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_form_recognizer_client.py @@ -46,7 +46,8 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin, MultiApiClientMi :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for +example: https://westus2.api.cognitive.microsoft.com). :type endpoint: str :param api_version: API version to use if no profile is provided, or if missing in profile. :type api_version: str @@ -60,28 +61,6 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin, MultiApiClientMi LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, - 'begin_analyze_business_card_async': '2.1', - 'begin_analyze_id_document_async': '2.1', - 'begin_analyze_invoice_async': '2.1', - 'begin_analyze_layout_async': '2.1', - 'begin_analyze_receipt_async': '2.1', - 'begin_analyze_with_custom_model': '2.1', - 'begin_compose_custom_models_async': '2.1', - 'begin_copy_custom_model': '2.1', - 'begin_train_custom_model_async': '2.1', - 'delete_custom_model': '2.1', - 'generate_model_copy_authorization': '2.1', - 'get_analyze_business_card_result': '2.1', - 'get_analyze_form_result': '2.1', - 'get_analyze_id_document_result': '2.1', - 'get_analyze_invoice_result': '2.1', - 'get_analyze_layout_result': '2.1', - 'get_analyze_receipt_result': '2.1', - 'get_custom_model': '2.1', - 'get_custom_model_copy_result': '2.1', - 'get_custom_models': '2.1', - 'list_custom_models': '2.1', - 'train_custom_model_async': '2.0', }}, _PROFILE_TAG + " latest" ) @@ -117,19 +96,19 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: + * 2021-09-30-preview: :mod:`v2021_09_30_preview.models` * 2.0: :mod:`v2_0.models` * 2.1: :mod:`v2_1.models` - * 2021-09-30-preview: :mod:`v3_0_preview_1.models` """ - if api_version == '2.0': + if api_version == '2021-09-30-preview': + from .v2021_09_30_preview import models + return models + elif api_version == '2.0': from .v2_0 import models return models elif api_version == '2.1': from .v2_1 import models return models - elif api_version == '2021-09-30-preview': - from .v3_0_preview_1 import models - return models raise ValueError("API version {} is not available".format(api_version)) def close(self): diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_operations_mixin.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_operations_mixin.py index a4701095b817..93855b42d0a5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_operations_mixin.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_operations_mixin.py @@ -38,16 +38,16 @@ def authorize_copy_document_model( Generates authorization to copy a model to this location with specified modelId and optional description. - :param authorize_copy_request: - :type authorize_copy_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.AuthorizeCopyRequest + :param authorize_copy_request: Authorize copy request parameters. + :type authorize_copy_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AuthorizeCopyRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: CopyAuthorization, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('authorize_copy_document_model') if api_version == '2021-09-30-preview': - from .v3_0_preview_1.operations import FormRecognizerClientOperationsMixin as OperationClass + from .v2021_09_30_preview.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'authorize_copy_document_model'".format(api_version)) mixin_instance = OperationClass() @@ -112,7 +112,7 @@ def begin_analyze_business_card_async( def begin_analyze_document( self, model_id, # type: str - pages=None, # type: Optional[List[str]] + pages=None, # type: Optional[str] locale=None, # type: Optional[str] string_index_type=None, # type: Optional[Union[str, "_models.StringIndexType"]] analyze_request=None, # type: Optional[Union[IO, "_models.AnalyzeDocumentRequest"]] @@ -125,14 +125,14 @@ def begin_analyze_document( :param model_id: Unique model name. :type model_id: str :param pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". - :type pages: list[str] + :type pages: str :param locale: Locale hint for text recognition and document analysis. Value may contain only the language code (ex. "en", "fr") or BCP 47 language tag (ex. "en-US"). :type locale: str :param string_index_type: Method used to compute string offset and length. - :type string_index_type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.StringIndexType :param analyze_request: Analyze request parameters. - :type analyze_request: IO or ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeDocumentRequest + :type analyze_request: IO or ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeDocumentRequest :keyword str content_type: Media type of the body sent to the API. Default value is "application/json". Allowed values are: "application/octet-stream", "application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff", "application/json". :keyword callable cls: A custom type or function that will be passed the direct response @@ -147,7 +147,7 @@ def begin_analyze_document( """ api_version = self._get_api_version('begin_analyze_document') if api_version == '2021-09-30-preview': - from .v3_0_preview_1.operations import FormRecognizerClientOperationsMixin as OperationClass + from .v2021_09_30_preview.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze_document'".format(api_version)) mixin_instance = OperationClass() @@ -453,7 +453,7 @@ def begin_build_document_model( Builds a custom document analysis model. :param build_request: Building request parameters. - :type build_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.BuildDocumentModelRequest + :type build_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.BuildDocumentModelRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be LROBasePolling. @@ -466,7 +466,7 @@ def begin_build_document_model( """ api_version = self._get_api_version('begin_build_document_model') if api_version == '2021-09-30-preview': - from .v3_0_preview_1.operations import FormRecognizerClientOperationsMixin as OperationClass + from .v2021_09_30_preview.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_build_document_model'".format(api_version)) mixin_instance = OperationClass() @@ -522,8 +522,8 @@ def begin_compose_document_model( Creates a new model from document types of existing models. - :param compose_request: - :type compose_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.ComposeDocumentModelRequest + :param compose_request: Compose request parameters. + :type compose_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ComposeDocumentModelRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be LROBasePolling. @@ -536,7 +536,7 @@ def begin_compose_document_model( """ api_version = self._get_api_version('begin_compose_document_model') if api_version == '2021-09-30-preview': - from .v3_0_preview_1.operations import FormRecognizerClientOperationsMixin as OperationClass + from .v2021_09_30_preview.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_compose_document_model'".format(api_version)) mixin_instance = OperationClass() @@ -599,8 +599,8 @@ def begin_copy_document_model_to( :param model_id: Unique model name. :type model_id: str - :param copy_to_request: - :type copy_to_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization + :param copy_to_request: Copy to request parameters. + :type copy_to_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be LROBasePolling. @@ -613,7 +613,7 @@ def begin_copy_document_model_to( """ api_version = self._get_api_version('begin_copy_document_model_to') if api_version == '2021-09-30-preview': - from .v3_0_preview_1.operations import FormRecognizerClientOperationsMixin as OperationClass + from .v2021_09_30_preview.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_copy_document_model_to'".format(api_version)) mixin_instance = OperationClass() @@ -716,7 +716,7 @@ def delete_model( """ api_version = self._get_api_version('delete_model') if api_version == '2021-09-30-preview': - from .v3_0_preview_1.operations import FormRecognizerClientOperationsMixin as OperationClass + from .v2021_09_30_preview.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'delete_model'".format(api_version)) mixin_instance = OperationClass() @@ -800,12 +800,12 @@ def get_analyze_document_result( :type result_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AnalyzeResultOperation, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeResultOperation + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeResultOperation :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_analyze_document_result') if api_version == '2021-09-30-preview': - from .v3_0_preview_1.operations import FormRecognizerClientOperationsMixin as OperationClass + from .v2021_09_30_preview.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_analyze_document_result'".format(api_version)) mixin_instance = OperationClass() @@ -1076,12 +1076,12 @@ def get_info( :keyword callable cls: A custom type or function that will be passed the direct response :return: GetInfoResponse, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.GetInfoResponse + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.GetInfoResponse :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_info') if api_version == '2021-09-30-preview': - from .v3_0_preview_1.operations import FormRecognizerClientOperationsMixin as OperationClass + from .v2021_09_30_preview.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_info'".format(api_version)) mixin_instance = OperationClass() @@ -1105,12 +1105,12 @@ def get_model( :type model_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ModelInfo, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.ModelInfo + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ModelInfo :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_model') if api_version == '2021-09-30-preview': - from .v3_0_preview_1.operations import FormRecognizerClientOperationsMixin as OperationClass + from .v2021_09_30_preview.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_model'".format(api_version)) mixin_instance = OperationClass() @@ -1131,12 +1131,12 @@ def get_models( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GetModelsResponse or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v3_0_preview_1.models.GetModelsResponse] + :rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v2021_09_30_preview.models.GetModelsResponse] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_models') if api_version == '2021-09-30-preview': - from .v3_0_preview_1.operations import FormRecognizerClientOperationsMixin as OperationClass + from .v2021_09_30_preview.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_models'".format(api_version)) mixin_instance = OperationClass() @@ -1160,12 +1160,12 @@ def get_operation( :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GetOperationResponse, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.GetOperationResponse + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.GetOperationResponse :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_operation') if api_version == '2021-09-30-preview': - from .v3_0_preview_1.operations import FormRecognizerClientOperationsMixin as OperationClass + from .v2021_09_30_preview.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_operation'".format(api_version)) mixin_instance = OperationClass() @@ -1186,12 +1186,12 @@ def get_operations( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GetOperationsResponse or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v3_0_preview_1.models.GetOperationsResponse] + :rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v2021_09_30_preview.models.GetOperationsResponse] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_operations') if api_version == '2021-09-30-preview': - from .v3_0_preview_1.operations import FormRecognizerClientOperationsMixin as OperationClass + from .v2021_09_30_preview.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_operations'".format(api_version)) mixin_instance = OperationClass() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_configuration.py index eb07352dd604..d6a658bed935 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_configuration.py @@ -27,7 +27,8 @@ class FormRecognizerClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for +example: https://westus2.api.cognitive.microsoft.com). :type endpoint: str """ diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_form_recognizer_client.py index 1a80293e1cf0..8af1d3b0d126 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_form_recognizer_client.py @@ -44,7 +44,8 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin, MultiApiClientMi :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for +example: https://westus2.api.cognitive.microsoft.com). :type endpoint: str :param api_version: API version to use if no profile is provided, or if missing in profile. :type api_version: str @@ -58,28 +59,6 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin, MultiApiClientMi LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, - 'begin_analyze_business_card_async': '2.1', - 'begin_analyze_id_document_async': '2.1', - 'begin_analyze_invoice_async': '2.1', - 'begin_analyze_layout_async': '2.1', - 'begin_analyze_receipt_async': '2.1', - 'begin_analyze_with_custom_model': '2.1', - 'begin_compose_custom_models_async': '2.1', - 'begin_copy_custom_model': '2.1', - 'begin_train_custom_model_async': '2.1', - 'delete_custom_model': '2.1', - 'generate_model_copy_authorization': '2.1', - 'get_analyze_business_card_result': '2.1', - 'get_analyze_form_result': '2.1', - 'get_analyze_id_document_result': '2.1', - 'get_analyze_invoice_result': '2.1', - 'get_analyze_layout_result': '2.1', - 'get_analyze_receipt_result': '2.1', - 'get_custom_model': '2.1', - 'get_custom_model_copy_result': '2.1', - 'get_custom_models': '2.1', - 'list_custom_models': '2.1', - 'train_custom_model_async': '2.0', }}, _PROFILE_TAG + " latest" ) @@ -115,19 +94,19 @@ def _models_dict(cls, api_version): def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: + * 2021-09-30-preview: :mod:`v2021_09_30_preview.models` * 2.0: :mod:`v2_0.models` * 2.1: :mod:`v2_1.models` - * 2021-09-30-preview: :mod:`v3_0_preview_1.models` """ - if api_version == '2.0': + if api_version == '2021-09-30-preview': + from ..v2021_09_30_preview import models + return models + elif api_version == '2.0': from ..v2_0 import models return models elif api_version == '2.1': from ..v2_1 import models return models - elif api_version == '2021-09-30-preview': - from ..v3_0_preview_1 import models - return models raise ValueError("API version {} is not available".format(api_version)) async def close(self): diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_operations_mixin.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_operations_mixin.py index cc95e8659528..4ac008f6f166 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_operations_mixin.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_operations_mixin.py @@ -34,16 +34,16 @@ async def authorize_copy_document_model( Generates authorization to copy a model to this location with specified modelId and optional description. - :param authorize_copy_request: - :type authorize_copy_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.AuthorizeCopyRequest + :param authorize_copy_request: Authorize copy request parameters. + :type authorize_copy_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AuthorizeCopyRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: CopyAuthorization, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('authorize_copy_document_model') if api_version == '2021-09-30-preview': - from ..v3_0_preview_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass + from ..v2021_09_30_preview.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'authorize_copy_document_model'".format(api_version)) mixin_instance = OperationClass() @@ -108,7 +108,7 @@ async def begin_analyze_business_card_async( async def begin_analyze_document( self, model_id: str, - pages: Optional[List[str]] = None, + pages: Optional[str] = None, locale: Optional[str] = None, string_index_type: Optional[Union[str, "_models.StringIndexType"]] = None, analyze_request: Optional[Union[IO, "_models.AnalyzeDocumentRequest"]] = None, @@ -121,14 +121,14 @@ async def begin_analyze_document( :param model_id: Unique model name. :type model_id: str :param pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". - :type pages: list[str] + :type pages: str :param locale: Locale hint for text recognition and document analysis. Value may contain only the language code (ex. "en", "fr") or BCP 47 language tag (ex. "en-US"). :type locale: str :param string_index_type: Method used to compute string offset and length. - :type string_index_type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.StringIndexType :param analyze_request: Analyze request parameters. - :type analyze_request: IO or ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeDocumentRequest + :type analyze_request: IO or ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeDocumentRequest :keyword str content_type: Media type of the body sent to the API. Default value is "application/json". Allowed values are: "application/octet-stream", "application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff", "application/json". :keyword callable cls: A custom type or function that will be passed the direct response @@ -143,7 +143,7 @@ async def begin_analyze_document( """ api_version = self._get_api_version('begin_analyze_document') if api_version == '2021-09-30-preview': - from ..v3_0_preview_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass + from ..v2021_09_30_preview.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze_document'".format(api_version)) mixin_instance = OperationClass() @@ -449,7 +449,7 @@ async def begin_build_document_model( Builds a custom document analysis model. :param build_request: Building request parameters. - :type build_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.BuildDocumentModelRequest + :type build_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.BuildDocumentModelRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncLROBasePolling. @@ -462,7 +462,7 @@ async def begin_build_document_model( """ api_version = self._get_api_version('begin_build_document_model') if api_version == '2021-09-30-preview': - from ..v3_0_preview_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass + from ..v2021_09_30_preview.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_build_document_model'".format(api_version)) mixin_instance = OperationClass() @@ -518,8 +518,8 @@ async def begin_compose_document_model( Creates a new model from document types of existing models. - :param compose_request: - :type compose_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.ComposeDocumentModelRequest + :param compose_request: Compose request parameters. + :type compose_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ComposeDocumentModelRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncLROBasePolling. @@ -532,7 +532,7 @@ async def begin_compose_document_model( """ api_version = self._get_api_version('begin_compose_document_model') if api_version == '2021-09-30-preview': - from ..v3_0_preview_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass + from ..v2021_09_30_preview.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_compose_document_model'".format(api_version)) mixin_instance = OperationClass() @@ -595,8 +595,8 @@ async def begin_copy_document_model_to( :param model_id: Unique model name. :type model_id: str - :param copy_to_request: - :type copy_to_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization + :param copy_to_request: Copy to request parameters. + :type copy_to_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncLROBasePolling. @@ -609,7 +609,7 @@ async def begin_copy_document_model_to( """ api_version = self._get_api_version('begin_copy_document_model_to') if api_version == '2021-09-30-preview': - from ..v3_0_preview_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass + from ..v2021_09_30_preview.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_copy_document_model_to'".format(api_version)) mixin_instance = OperationClass() @@ -712,7 +712,7 @@ async def delete_model( """ api_version = self._get_api_version('delete_model') if api_version == '2021-09-30-preview': - from ..v3_0_preview_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass + from ..v2021_09_30_preview.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'delete_model'".format(api_version)) mixin_instance = OperationClass() @@ -796,12 +796,12 @@ async def get_analyze_document_result( :type result_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AnalyzeResultOperation, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeResultOperation + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeResultOperation :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_analyze_document_result') if api_version == '2021-09-30-preview': - from ..v3_0_preview_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass + from ..v2021_09_30_preview.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_analyze_document_result'".format(api_version)) mixin_instance = OperationClass() @@ -1072,12 +1072,12 @@ async def get_info( :keyword callable cls: A custom type or function that will be passed the direct response :return: GetInfoResponse, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.GetInfoResponse + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.GetInfoResponse :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_info') if api_version == '2021-09-30-preview': - from ..v3_0_preview_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass + from ..v2021_09_30_preview.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_info'".format(api_version)) mixin_instance = OperationClass() @@ -1101,12 +1101,12 @@ async def get_model( :type model_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ModelInfo, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.ModelInfo + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ModelInfo :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_model') if api_version == '2021-09-30-preview': - from ..v3_0_preview_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass + from ..v2021_09_30_preview.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_model'".format(api_version)) mixin_instance = OperationClass() @@ -1127,12 +1127,12 @@ def get_models( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GetModelsResponse or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v3_0_preview_1.models.GetModelsResponse] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v2021_09_30_preview.models.GetModelsResponse] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_models') if api_version == '2021-09-30-preview': - from ..v3_0_preview_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass + from ..v2021_09_30_preview.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_models'".format(api_version)) mixin_instance = OperationClass() @@ -1156,12 +1156,12 @@ async def get_operation( :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GetOperationResponse, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.GetOperationResponse + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.GetOperationResponse :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_operation') if api_version == '2021-09-30-preview': - from ..v3_0_preview_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass + from ..v2021_09_30_preview.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_operation'".format(api_version)) mixin_instance = OperationClass() @@ -1182,12 +1182,12 @@ def get_operations( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GetOperationsResponse or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v3_0_preview_1.models.GetOperationsResponse] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v2021_09_30_preview.models.GetOperationsResponse] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_operations') if api_version == '2021-09-30-preview': - from ..v3_0_preview_1.aio.operations import FormRecognizerClientOperationsMixin as OperationClass + from ..v2021_09_30_preview.aio.operations import FormRecognizerClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_operations'".format(api_version)) mixin_instance = OperationClass() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/models.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/models.py index 70b6b84ac0a4..8a0c371c13fa 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/models.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/models.py @@ -4,6 +4,4 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from .v2_0.models import * -from .v2_1.models import * -from .v3_0_preview_1.models import * +from .v2021_09_30_preview.models import * diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/__init__.py similarity index 100% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/__init__.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/__init__.py diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/_configuration.py similarity index 97% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/_configuration.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/_configuration.py index a8e345f24d9c..6c09f9b36dc7 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/_configuration.py @@ -27,7 +27,8 @@ class FormRecognizerClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for +example: https://westus2.api.cognitive.microsoft.com). :type endpoint: str """ diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/_form_recognizer_client.py similarity index 97% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/_form_recognizer_client.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/_form_recognizer_client.py index 16ffcd292de7..d23f7d24c5ef 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/_form_recognizer_client.py @@ -28,7 +28,8 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for +example: https://westus2.api.cognitive.microsoft.com). :type endpoint: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/_metadata.json b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/_metadata.json similarity index 58% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/_metadata.json rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/_metadata.json index 7d82a2e4115b..b99a1e183195 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/_metadata.json +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/_metadata.json @@ -23,7 +23,7 @@ }, "endpoint": { "signature": "endpoint, # type: str", - "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for\nexample: https://westus2.api.cognitive.microsoft.com).", "docstring_type": "str", "required": true } @@ -37,7 +37,7 @@ }, "endpoint": { "signature": "endpoint: str,", - "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for\nexample: https://westus2.api.cognitive.microsoft.com).", "docstring_type": "str", "required": true } @@ -88,174 +88,174 @@ "operation_groups": { }, "operation_mixins": { - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.polling\": [\"LROPoller\", \"NoPolling\", \"PollingMethod\"], \"azure.core.polling.base_polling\": [\"LROBasePolling\"], \"...._polling\": [\"DocumentModelAdministrationLROPoller\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"IO\", \"Iterable\", \"List\", \"Optional\", \"TypeVar\", \"Union\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.polling\": [\"AsyncLROPoller\", \"AsyncNoPolling\", \"AsyncPollingMethod\"], \"azure.core.polling.async_base_polling\": [\"AsyncLROBasePolling\"], \".....aio._async_polling\": [\"AsyncDocumentModelAdministrationLROPoller\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"IO\", \"List\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.polling\": [\"LROPoller\", \"NoPolling\", \"PollingMethod\"], \"azure.core.polling.base_polling\": [\"LROBasePolling\"], \"...._polling\": [\"DocumentModelAdministrationLROPoller\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"IO\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.polling\": [\"AsyncLROPoller\", \"AsyncNoPolling\", \"AsyncPollingMethod\"], \"azure.core.polling.async_base_polling\": [\"AsyncLROBasePolling\"], \".....aio._async_polling\": [\"AsyncDocumentModelAdministrationLROPoller\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"IO\", \"Optional\", \"TypeVar\", \"Union\"]}}}", "operations": { "_analyze_document_initial" : { "sync": { - "signature": "def _analyze_document_initial(\n self,\n model_id, # type: str\n pages=None, # type: Optional[List[str]]\n locale=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n analyze_request=None, # type: Optional[Union[IO, \"_models.AnalyzeDocumentRequest\"]]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param model_id: Unique model name.\n:type model_id: str\n:param pages: List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\".\n:type pages: list[str]\n:param locale: Locale hint for text recognition and document analysis. Value may contain only\n the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n:type locale: str\n:param string_index_type: Method used to compute string offset and length.\n:type string_index_type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.StringIndexType\n:param analyze_request: Analyze request parameters.\n:type analyze_request: IO or ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeDocumentRequest\n:keyword str content_type: Media type of the body sent to the API. Default value is \"application/json\".\n Allowed values are: \"application/octet-stream\", \"application/pdf\", \"image/bmp\", \"image/jpeg\", \"image/png\", \"image/tiff\", \"application/json\".\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _analyze_document_initial(\n self,\n model_id, # type: str\n pages=None, # type: Optional[str]\n locale=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n analyze_request=None, # type: Optional[Union[IO, \"_models.AnalyzeDocumentRequest\"]]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param model_id: Unique model name.\n:type model_id: str\n:param pages: List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\".\n:type pages: str\n:param locale: Locale hint for text recognition and document analysis. Value may contain only\n the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n:type locale: str\n:param string_index_type: Method used to compute string offset and length.\n:type string_index_type: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.StringIndexType\n:param analyze_request: Analyze request parameters.\n:type analyze_request: IO or ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeDocumentRequest\n:keyword str content_type: Media type of the body sent to the API. Default value is \"application/json\".\n Allowed values are: \"application/octet-stream\", \"application/pdf\", \"image/bmp\", \"image/jpeg\", \"image/png\", \"image/tiff\", \"application/json\".\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def _analyze_document_initial(\n self,\n model_id: str,\n pages: Optional[List[str]] = None,\n locale: Optional[str] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n analyze_request: Optional[Union[IO, \"_models.AnalyzeDocumentRequest\"]] = None,\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param model_id: Unique model name.\n:type model_id: str\n:param pages: List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\".\n:type pages: list[str]\n:param locale: Locale hint for text recognition and document analysis. Value may contain only\n the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n:type locale: str\n:param string_index_type: Method used to compute string offset and length.\n:type string_index_type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.StringIndexType\n:param analyze_request: Analyze request parameters.\n:type analyze_request: IO or ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeDocumentRequest\n:keyword str content_type: Media type of the body sent to the API. Default value is \"application/json\".\n Allowed values are: \"application/octet-stream\", \"application/pdf\", \"image/bmp\", \"image/jpeg\", \"image/png\", \"image/tiff\", \"application/json\".\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def _analyze_document_initial(\n self,\n model_id: str,\n pages: Optional[str] = None,\n locale: Optional[str] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n analyze_request: Optional[Union[IO, \"_models.AnalyzeDocumentRequest\"]] = None,\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"\n\n:param model_id: Unique model name.\n:type model_id: str\n:param pages: List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\".\n:type pages: str\n:param locale: Locale hint for text recognition and document analysis. Value may contain only\n the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n:type locale: str\n:param string_index_type: Method used to compute string offset and length.\n:type string_index_type: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.StringIndexType\n:param analyze_request: Analyze request parameters.\n:type analyze_request: IO or ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeDocumentRequest\n:keyword str content_type: Media type of the body sent to the API. Default value is \"application/json\".\n Allowed values are: \"application/octet-stream\", \"application/pdf\", \"image/bmp\", \"image/jpeg\", \"image/png\", \"image/tiff\", \"application/json\".\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "model_id, pages, locale, string_index_type, analyze_request" }, "begin_analyze_document" : { "sync": { - "signature": "def begin_analyze_document(\n self,\n model_id, # type: str\n pages=None, # type: Optional[List[str]]\n locale=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n analyze_request=None, # type: Optional[Union[IO, \"_models.AnalyzeDocumentRequest\"]]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Analyze document.\n\nAnalyzes document with model.\n\n:param model_id: Unique model name.\n:type model_id: str\n:param pages: List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\".\n:type pages: list[str]\n:param locale: Locale hint for text recognition and document analysis. Value may contain only\n the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n:type locale: str\n:param string_index_type: Method used to compute string offset and length.\n:type string_index_type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.StringIndexType\n:param analyze_request: Analyze request parameters.\n:type analyze_request: IO or ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeDocumentRequest\n:keyword str content_type: Media type of the body sent to the API. Default value is \"application/json\".\n Allowed values are: \"application/octet-stream\", \"application/pdf\", \"image/bmp\", \"image/jpeg\", \"image/png\", \"image/tiff\", \"application/json\".\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_analyze_document(\n self,\n model_id, # type: str\n pages=None, # type: Optional[str]\n locale=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n analyze_request=None, # type: Optional[Union[IO, \"_models.AnalyzeDocumentRequest\"]]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Analyze document.\n\nAnalyzes document with model.\n\n:param model_id: Unique model name.\n:type model_id: str\n:param pages: List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\".\n:type pages: str\n:param locale: Locale hint for text recognition and document analysis. Value may contain only\n the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n:type locale: str\n:param string_index_type: Method used to compute string offset and length.\n:type string_index_type: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.StringIndexType\n:param analyze_request: Analyze request parameters.\n:type analyze_request: IO or ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeDocumentRequest\n:keyword str content_type: Media type of the body sent to the API. Default value is \"application/json\".\n Allowed values are: \"application/octet-stream\", \"application/pdf\", \"image/bmp\", \"image/jpeg\", \"image/png\", \"image/tiff\", \"application/json\".\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def begin_analyze_document(\n self,\n model_id: str,\n pages: Optional[List[str]] = None,\n locale: Optional[str] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n analyze_request: Optional[Union[IO, \"_models.AnalyzeDocumentRequest\"]] = None,\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", - "doc": "\"\"\"Analyze document.\n\nAnalyzes document with model.\n\n:param model_id: Unique model name.\n:type model_id: str\n:param pages: List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\".\n:type pages: list[str]\n:param locale: Locale hint for text recognition and document analysis. Value may contain only\n the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n:type locale: str\n:param string_index_type: Method used to compute string offset and length.\n:type string_index_type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.StringIndexType\n:param analyze_request: Analyze request parameters.\n:type analyze_request: IO or ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeDocumentRequest\n:keyword str content_type: Media type of the body sent to the API. Default value is \"application/json\".\n Allowed values are: \"application/octet-stream\", \"application/pdf\", \"image/bmp\", \"image/jpeg\", \"image/png\", \"image/tiff\", \"application/json\".\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "async def begin_analyze_document(\n self,\n model_id: str,\n pages: Optional[str] = None,\n locale: Optional[str] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n analyze_request: Optional[Union[IO, \"_models.AnalyzeDocumentRequest\"]] = None,\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", + "doc": "\"\"\"Analyze document.\n\nAnalyzes document with model.\n\n:param model_id: Unique model name.\n:type model_id: str\n:param pages: List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\".\n:type pages: str\n:param locale: Locale hint for text recognition and document analysis. Value may contain only\n the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n:type locale: str\n:param string_index_type: Method used to compute string offset and length.\n:type string_index_type: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.StringIndexType\n:param analyze_request: Analyze request parameters.\n:type analyze_request: IO or ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeDocumentRequest\n:keyword str content_type: Media type of the body sent to the API. Default value is \"application/json\".\n Allowed values are: \"application/octet-stream\", \"application/pdf\", \"image/bmp\", \"image/jpeg\", \"image/png\", \"image/tiff\", \"application/json\".\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "call": "model_id, pages, locale, string_index_type, analyze_request" }, "get_analyze_document_result" : { "sync": { "signature": "def get_analyze_document_result(\n self,\n model_id, # type: str\n result_id, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get analyze result.\n\nGets the result of document analysis.\n\n:param model_id: Unique model name.\n:type model_id: str\n:param result_id: Analyze operation result ID.\n:type result_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeResultOperation, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeResultOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get analyze result.\n\nGets the result of document analysis.\n\n:param model_id: Unique model name.\n:type model_id: str\n:param result_id: Analyze operation result ID.\n:type result_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeResultOperation, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeResultOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_analyze_document_result(\n self,\n model_id: str,\n result_id: str,\n **kwargs: Any\n) -\u003e \"_models.AnalyzeResultOperation\":\n", - "doc": "\"\"\"Get analyze result.\n\nGets the result of document analysis.\n\n:param model_id: Unique model name.\n:type model_id: str\n:param result_id: Analyze operation result ID.\n:type result_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeResultOperation, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeResultOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get analyze result.\n\nGets the result of document analysis.\n\n:param model_id: Unique model name.\n:type model_id: str\n:param result_id: Analyze operation result ID.\n:type result_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeResultOperation, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeResultOperation\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "model_id, result_id" }, "_build_document_model_initial" : { "sync": { "signature": "def _build_document_model_initial(\n self,\n build_request, # type: \"_models.BuildDocumentModelRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param build_request: Building request parameters.\n:type build_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.BuildDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"\n\n:param build_request: Building request parameters.\n:type build_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.BuildDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _build_document_model_initial(\n self,\n build_request: \"_models.BuildDocumentModelRequest\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param build_request: Building request parameters.\n:type build_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.BuildDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"\n\n:param build_request: Building request parameters.\n:type build_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.BuildDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "build_request" }, "begin_build_document_model" : { "sync": { "signature": "def begin_build_document_model(\n self,\n build_request, # type: \"_models.BuildDocumentModelRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Build model.\n\nBuilds a custom document analysis model.\n\n:param build_request: Building request parameters.\n:type build_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.BuildDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of DocumentModelAdministrationLROPoller that returns either None or the result of cls(response)\n:rtype: ~...._polling.DocumentModelAdministrationLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Build model.\n\nBuilds a custom document analysis model.\n\n:param build_request: Building request parameters.\n:type build_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.BuildDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of DocumentModelAdministrationLROPoller that returns either None or the result of cls(response)\n:rtype: ~...._polling.DocumentModelAdministrationLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_build_document_model(\n self,\n build_request: \"_models.BuildDocumentModelRequest\",\n **kwargs: Any\n) -\u003e AsyncDocumentModelAdministrationLROPoller[None]:\n", - "doc": "\"\"\"Build model.\n\nBuilds a custom document analysis model.\n\n:param build_request: Building request parameters.\n:type build_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.BuildDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncDocumentModelAdministrationLROPoller that returns either None or the result of cls(response)\n:rtype: ~.....aio._async_polling.AsyncDocumentModelAdministrationLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Build model.\n\nBuilds a custom document analysis model.\n\n:param build_request: Building request parameters.\n:type build_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.BuildDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncDocumentModelAdministrationLROPoller that returns either None or the result of cls(response)\n:rtype: ~.....aio._async_polling.AsyncDocumentModelAdministrationLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "call": "build_request" }, "_compose_document_model_initial" : { "sync": { "signature": "def _compose_document_model_initial(\n self,\n compose_request, # type: \"_models.ComposeDocumentModelRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param compose_request:\n:type compose_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.ComposeDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"\n\n:param compose_request: Compose request parameters.\n:type compose_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ComposeDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _compose_document_model_initial(\n self,\n compose_request: \"_models.ComposeDocumentModelRequest\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param compose_request:\n:type compose_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.ComposeDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"\n\n:param compose_request: Compose request parameters.\n:type compose_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ComposeDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "compose_request" }, "begin_compose_document_model" : { "sync": { "signature": "def begin_compose_document_model(\n self,\n compose_request, # type: \"_models.ComposeDocumentModelRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Compose model.\n\nCreates a new model from document types of existing models.\n\n:param compose_request:\n:type compose_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.ComposeDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of DocumentModelAdministrationLROPoller that returns either None or the result of cls(response)\n:rtype: ~...._polling.DocumentModelAdministrationLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Compose model.\n\nCreates a new model from document types of existing models.\n\n:param compose_request: Compose request parameters.\n:type compose_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ComposeDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of DocumentModelAdministrationLROPoller that returns either None or the result of cls(response)\n:rtype: ~...._polling.DocumentModelAdministrationLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_compose_document_model(\n self,\n compose_request: \"_models.ComposeDocumentModelRequest\",\n **kwargs: Any\n) -\u003e AsyncDocumentModelAdministrationLROPoller[None]:\n", - "doc": "\"\"\"Compose model.\n\nCreates a new model from document types of existing models.\n\n:param compose_request:\n:type compose_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.ComposeDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncDocumentModelAdministrationLROPoller that returns either None or the result of cls(response)\n:rtype: ~.....aio._async_polling.AsyncDocumentModelAdministrationLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Compose model.\n\nCreates a new model from document types of existing models.\n\n:param compose_request: Compose request parameters.\n:type compose_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ComposeDocumentModelRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncDocumentModelAdministrationLROPoller that returns either None or the result of cls(response)\n:rtype: ~.....aio._async_polling.AsyncDocumentModelAdministrationLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "call": "compose_request" }, "authorize_copy_document_model" : { "sync": { "signature": "def authorize_copy_document_model(\n self,\n authorize_copy_request, # type: \"_models.AuthorizeCopyRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Generate copy authorization.\n\nGenerates authorization to copy a model to this location with specified modelId and optional\ndescription.\n\n:param authorize_copy_request:\n:type authorize_copy_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.AuthorizeCopyRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CopyAuthorization, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Generate copy authorization.\n\nGenerates authorization to copy a model to this location with specified modelId and optional\ndescription.\n\n:param authorize_copy_request: Authorize copy request parameters.\n:type authorize_copy_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AuthorizeCopyRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CopyAuthorization, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def authorize_copy_document_model(\n self,\n authorize_copy_request: \"_models.AuthorizeCopyRequest\",\n **kwargs: Any\n) -\u003e \"_models.CopyAuthorization\":\n", - "doc": "\"\"\"Generate copy authorization.\n\nGenerates authorization to copy a model to this location with specified modelId and optional\ndescription.\n\n:param authorize_copy_request:\n:type authorize_copy_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.AuthorizeCopyRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CopyAuthorization, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Generate copy authorization.\n\nGenerates authorization to copy a model to this location with specified modelId and optional\ndescription.\n\n:param authorize_copy_request: Authorize copy request parameters.\n:type authorize_copy_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AuthorizeCopyRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CopyAuthorization, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "authorize_copy_request" }, "_copy_document_model_to_initial" : { "sync": { "signature": "def _copy_document_model_to_initial(\n self,\n model_id, # type: str\n copy_to_request, # type: \"_models.CopyAuthorization\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param model_id: Unique model name.\n:type model_id: str\n:param copy_to_request:\n:type copy_to_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"\n\n:param model_id: Unique model name.\n:type model_id: str\n:param copy_to_request: Copy to request parameters.\n:type copy_to_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _copy_document_model_to_initial(\n self,\n model_id: str,\n copy_to_request: \"_models.CopyAuthorization\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param model_id: Unique model name.\n:type model_id: str\n:param copy_to_request:\n:type copy_to_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"\n\n:param model_id: Unique model name.\n:type model_id: str\n:param copy_to_request: Copy to request parameters.\n:type copy_to_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "model_id, copy_to_request" }, "begin_copy_document_model_to" : { "sync": { "signature": "def begin_copy_document_model_to(\n self,\n model_id, # type: str\n copy_to_request, # type: \"_models.CopyAuthorization\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Copy model.\n\nCopies model to the target resource, region, and modelId.\n\n:param model_id: Unique model name.\n:type model_id: str\n:param copy_to_request:\n:type copy_to_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of DocumentModelAdministrationLROPoller that returns either None or the result of cls(response)\n:rtype: ~...._polling.DocumentModelAdministrationLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Copy model.\n\nCopies model to the target resource, region, and modelId.\n\n:param model_id: Unique model name.\n:type model_id: str\n:param copy_to_request: Copy to request parameters.\n:type copy_to_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of DocumentModelAdministrationLROPoller that returns either None or the result of cls(response)\n:rtype: ~...._polling.DocumentModelAdministrationLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_copy_document_model_to(\n self,\n model_id: str,\n copy_to_request: \"_models.CopyAuthorization\",\n **kwargs: Any\n) -\u003e AsyncDocumentModelAdministrationLROPoller[None]:\n", - "doc": "\"\"\"Copy model.\n\nCopies model to the target resource, region, and modelId.\n\n:param model_id: Unique model name.\n:type model_id: str\n:param copy_to_request:\n:type copy_to_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncFormTrainingLROPoller that returns either None or the result of cls(response)\n:rtype: ~.....aio._async_polling.AsyncFormTrainingLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Copy model.\n\nCopies model to the target resource, region, and modelId.\n\n:param model_id: Unique model name.\n:type model_id: str\n:param copy_to_request: Copy to request parameters.\n:type copy_to_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncDocumentModelAdministrationLROPoller that returns either None or the result of cls(response)\n:rtype: ~.....aio._async_polling.AsyncDocumentModelAdministrationLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" }, "call": "model_id, copy_to_request" }, "get_operations" : { "sync": { "signature": "def get_operations(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List operations.\n\nLists all operations.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GetOperationsResponse or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v3_0_preview_1.models.GetOperationsResponse]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List operations.\n\nLists all operations.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GetOperationsResponse or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v2021_09_30_preview.models.GetOperationsResponse]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def get_operations(\n self,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.GetOperationsResponse\"]:\n", - "doc": "\"\"\"List operations.\n\nLists all operations.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GetOperationsResponse or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v3_0_preview_1.models.GetOperationsResponse]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List operations.\n\nLists all operations.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GetOperationsResponse or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v2021_09_30_preview.models.GetOperationsResponse]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "get_operation" : { "sync": { "signature": "def get_operation(\n self,\n operation_id, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get operation.\n\nGets operation info.\n\n:param operation_id: Unique operation ID.\n:type operation_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: GetOperationResponse, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.GetOperationResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get operation.\n\nGets operation info.\n\n:param operation_id: Unique operation ID.\n:type operation_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: GetOperationResponse, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.GetOperationResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_operation(\n self,\n operation_id: str,\n **kwargs: Any\n) -\u003e \"_models.GetOperationResponse\":\n", - "doc": "\"\"\"Get operation.\n\nGets operation info.\n\n:param operation_id: Unique operation ID.\n:type operation_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: GetOperationResponse, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.GetOperationResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get operation.\n\nGets operation info.\n\n:param operation_id: Unique operation ID.\n:type operation_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: GetOperationResponse, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.GetOperationResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "operation_id" }, "get_models" : { "sync": { "signature": "def get_models(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List models.\n\nList all models.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GetModelsResponse or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v3_0_preview_1.models.GetModelsResponse]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List models.\n\nList all models.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GetModelsResponse or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v2021_09_30_preview.models.GetModelsResponse]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def get_models(\n self,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.GetModelsResponse\"]:\n", - "doc": "\"\"\"List models.\n\nList all models.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GetModelsResponse or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v3_0_preview_1.models.GetModelsResponse]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List models.\n\nList all models.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GetModelsResponse or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v2021_09_30_preview.models.GetModelsResponse]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "get_model" : { "sync": { "signature": "def get_model(\n self,\n model_id, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get model.\n\nGets detailed model information.\n\n:param model_id: Unique model name.\n:type model_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ModelInfo, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.ModelInfo\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get model.\n\nGets detailed model information.\n\n:param model_id: Unique model name.\n:type model_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ModelInfo, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ModelInfo\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_model(\n self,\n model_id: str,\n **kwargs: Any\n) -\u003e \"_models.ModelInfo\":\n", - "doc": "\"\"\"Get model.\n\nGets detailed model information.\n\n:param model_id: Unique model name.\n:type model_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ModelInfo, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.ModelInfo\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get model.\n\nGets detailed model information.\n\n:param model_id: Unique model name.\n:type model_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ModelInfo, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ModelInfo\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "model_id" }, @@ -274,12 +274,12 @@ "get_info" : { "sync": { "signature": "def get_info(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get info.\n\nReturn basic info about the current resource.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: GetInfoResponse, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.GetInfoResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get info.\n\nReturn basic info about the current resource.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: GetInfoResponse, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.GetInfoResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_info(\n self,\n **kwargs: Any\n) -\u003e \"_models.GetInfoResponse\":\n", - "doc": "\"\"\"Get info.\n\nReturn basic info about the current resource.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: GetInfoResponse, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.GetInfoResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get info.\n\nReturn basic info about the current resource.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: GetInfoResponse, or the result of cls(response)\n:rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.GetInfoResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/aio/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/aio/__init__.py similarity index 100% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/aio/__init__.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/aio/__init__.py diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/aio/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/aio/_configuration.py similarity index 97% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/aio/_configuration.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/aio/_configuration.py index c1e30d6d780c..0ade93826378 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/aio/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/aio/_configuration.py @@ -25,7 +25,8 @@ class FormRecognizerClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for +example: https://westus2.api.cognitive.microsoft.com). :type endpoint: str """ diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/aio/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/aio/_form_recognizer_client.py similarity index 97% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/aio/_form_recognizer_client.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/aio/_form_recognizer_client.py index e9cf76953fca..92d68ab34d5d 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/aio/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/aio/_form_recognizer_client.py @@ -26,7 +26,8 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for +example: https://westus2.api.cognitive.microsoft.com). :type endpoint: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/aio/operations/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/aio/operations/__init__.py similarity index 100% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/aio/operations/__init__.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/aio/operations/__init__.py diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/aio/operations/_form_recognizer_client_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/aio/operations/_form_recognizer_client_operations.py similarity index 96% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/aio/operations/_form_recognizer_client_operations.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/aio/operations/_form_recognizer_client_operations.py index 3532d4004c2b..1f7668abc98f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/aio/operations/_form_recognizer_client_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/aio/operations/_form_recognizer_client_operations.py @@ -5,7 +5,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, IO, List, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, IO, Optional, TypeVar, Union import warnings from .....aio._async_polling import AsyncDocumentModelAdministrationLROPoller @@ -26,7 +26,7 @@ class FormRecognizerClientOperationsMixin: async def _analyze_document_initial( self, model_id: str, - pages: Optional[List[str]] = None, + pages: Optional[str] = None, locale: Optional[str] = None, string_index_type: Optional[Union[str, "_models.StringIndexType"]] = None, analyze_request: Optional[Union[IO, "_models.AnalyzeDocumentRequest"]] = None, @@ -45,14 +45,14 @@ async def _analyze_document_initial( url = self._analyze_document_initial.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if pages is not None: - query_parameters['pages'] = self._serialize.query("pages", pages, '[str]', div=',') + query_parameters['pages'] = self._serialize.query("pages", pages, 'str', pattern=r'^(\d+(-\d+)?)(,\s*(\d+(-\d+)?))*$') if locale is not None: query_parameters['locale'] = self._serialize.query("locale", locale, 'str') if string_index_type is not None: @@ -98,7 +98,7 @@ async def _analyze_document_initial( async def begin_analyze_document( self, model_id: str, - pages: Optional[List[str]] = None, + pages: Optional[str] = None, locale: Optional[str] = None, string_index_type: Optional[Union[str, "_models.StringIndexType"]] = None, analyze_request: Optional[Union[IO, "_models.AnalyzeDocumentRequest"]] = None, @@ -111,14 +111,14 @@ async def begin_analyze_document( :param model_id: Unique model name. :type model_id: str :param pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". - :type pages: list[str] + :type pages: str :param locale: Locale hint for text recognition and document analysis. Value may contain only the language code (ex. "en", "fr") or BCP 47 language tag (ex. "en-US"). :type locale: str :param string_index_type: Method used to compute string offset and length. - :type string_index_type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.StringIndexType :param analyze_request: Analyze request parameters. - :type analyze_request: IO or ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeDocumentRequest + :type analyze_request: IO or ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeDocumentRequest :keyword str content_type: Media type of the body sent to the API. Default value is "application/json". Allowed values are: "application/octet-stream", "application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff", "application/json". :keyword callable cls: A custom type or function that will be passed the direct response @@ -158,7 +158,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), } if polling is True: polling_method = AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -191,7 +191,7 @@ async def get_analyze_document_result( :type result_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AnalyzeResultOperation, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeResultOperation + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeResultOperation :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalyzeResultOperation"] @@ -206,7 +206,7 @@ async def get_analyze_document_result( url = self.get_analyze_document_result.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), 'resultId': self._serialize.url("result_id", result_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -296,7 +296,7 @@ async def begin_build_document_model( Builds a custom document analysis model. :param build_request: Building request parameters. - :type build_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.BuildDocumentModelRequest + :type build_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.BuildDocumentModelRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncLROBasePolling. @@ -405,8 +405,8 @@ async def begin_compose_document_model( Creates a new model from document types of existing models. - :param compose_request: - :type compose_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.ComposeDocumentModelRequest + :param compose_request: Compose request parameters. + :type compose_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ComposeDocumentModelRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncLROBasePolling. @@ -466,11 +466,11 @@ async def authorize_copy_document_model( Generates authorization to copy a model to this location with specified modelId and optional description. - :param authorize_copy_request: - :type authorize_copy_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.AuthorizeCopyRequest + :param authorize_copy_request: Authorize copy request parameters. + :type authorize_copy_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AuthorizeCopyRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: CopyAuthorization, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CopyAuthorization"] @@ -537,7 +537,7 @@ async def _copy_document_model_to_initial( url = self._copy_document_model_to_initial.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), } url = self._client.format_url(url, **path_format_arguments) @@ -582,8 +582,8 @@ async def begin_copy_document_model_to( :param model_id: Unique model name. :type model_id: str - :param copy_to_request: - :type copy_to_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization + :param copy_to_request: Copy to request parameters. + :type copy_to_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncLROBasePolling. @@ -618,7 +618,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), } if polling is True: polling_method = AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -645,7 +645,7 @@ def get_operations( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GetOperationsResponse or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v3_0_preview_1.models.GetOperationsResponse] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v2021_09_30_preview.models.GetOperationsResponse] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GetOperationsResponse"] @@ -721,7 +721,7 @@ async def get_operation( :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GetOperationResponse, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.GetOperationResponse + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.GetOperationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GetOperationResponse"] @@ -775,7 +775,7 @@ def get_models( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GetModelsResponse or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v3_0_preview_1.models.GetModelsResponse] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.v2021_09_30_preview.models.GetModelsResponse] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GetModelsResponse"] @@ -851,7 +851,7 @@ async def get_model( :type model_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ModelInfo, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.ModelInfo + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ModelInfo :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelInfo"] @@ -866,7 +866,7 @@ async def get_model( url = self.get_model.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), } url = self._client.format_url(url, **path_format_arguments) @@ -923,7 +923,7 @@ async def delete_model( url = self.delete_model.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), } url = self._client.format_url(url, **path_format_arguments) @@ -959,7 +959,7 @@ async def get_info( :keyword callable cls: A custom type or function that will be passed the direct response :return: GetInfoResponse, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.GetInfoResponse + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.GetInfoResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GetInfoResponse"] diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/models/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/models/__init__.py similarity index 100% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/models/__init__.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/models/__init__.py diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/models/_form_recognizer_client_enums.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/models/_form_recognizer_client_enums.py similarity index 99% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/models/_form_recognizer_client_enums.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/models/_form_recognizer_client_enums.py index 31998f7e8bda..17109409facd 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/models/_form_recognizer_client_enums.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/models/_form_recognizer_client_enums.py @@ -70,7 +70,6 @@ class DocumentFieldType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): INTEGER = "integer" SELECTION_MARK = "selectionMark" COUNTRY_REGION = "countryRegion" - CURRENCY = "currency" SIGNATURE = "signature" ARRAY = "array" OBJECT = "object" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/models/_models.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/models/_models.py similarity index 87% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/models/_models.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/models/_models.py index 407e4d3a232b..f9d8e5c648b1 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/models/_models.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/models/_models.py @@ -40,33 +40,34 @@ class AnalyzeResult(msrest.serialization.Model): :param api_version: Required. API version used to produce this result. Possible values include: "2021-09-30-preview". - :type api_version: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.ApiVersion + :type api_version: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.ApiVersion :param model_id: Required. Model ID used to produce this result. :type model_id: str :param string_index_type: Required. Method used to compute string offset and length. Possible values include: "textElements", "unicodeCodePoint", "utf16CodeUnit". - :type string_index_type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.StringIndexType + :type string_index_type: str or + ~azure.ai.formrecognizer.v2021_09_30_preview.models.StringIndexType :param content: Required. Concatenate string representation of all textual and visual elements in reading order. :type content: str :param pages: Required. Analyzed pages. - :type pages: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentPage] + :type pages: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentPage] :param tables: Extracted tables. - :type tables: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentTable] + :type tables: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentTable] :param key_value_pairs: Extracted key-value pairs. :type key_value_pairs: - list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentKeyValuePair] + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentKeyValuePair] :param entities: Extracted entities. - :type entities: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentEntity] + :type entities: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentEntity] :param styles: Extracted font styles. - :type styles: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentStyle] + :type styles: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentStyle] :param documents: Extracted documents. - :type documents: list[~azure.ai.formrecognizer.v3_0_preview_1.models.Document] + :type documents: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.Document] """ _validation = { 'api_version': {'required': True}, - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'string_index_type': {'required': True}, 'content': {'required': True}, 'pages': {'required': True}, @@ -110,16 +111,16 @@ class AnalyzeResultOperation(msrest.serialization.Model): :param status: Required. Operation status. Possible values include: "notStarted", "running", "failed", "succeeded". :type status: str or - ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeResultOperationStatus + ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeResultOperationStatus :param created_date_time: Required. Date and time (UTC) when the analyze operation was submitted. :type created_date_time: ~datetime.datetime :param last_updated_date_time: Required. Date and time (UTC) when the status was last updated. :type last_updated_date_time: ~datetime.datetime :param error: Encountered error during document analysis. - :type error: ~azure.ai.formrecognizer.v3_0_preview_1.models.Error + :type error: ~azure.ai.formrecognizer.v2021_09_30_preview.models.Error :param analyze_result: Document analysis result. - :type analyze_result: ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeResult + :type analyze_result: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeResult """ _validation = { @@ -160,7 +161,7 @@ class AuthorizeCopyRequest(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'description': {'max_length': 4096, 'min_length': 0}, } @@ -247,11 +248,12 @@ class BuildDocumentModelRequest(msrest.serialization.Model): :param description: Model description. :type description: str :param azure_blob_source: Azure Blob Storage location containing the training data. - :type azure_blob_source: ~azure.ai.formrecognizer.v3_0_preview_1.models.AzureBlobContentSource + :type azure_blob_source: + ~azure.ai.formrecognizer.v2021_09_30_preview.models.AzureBlobContentSource """ _validation = { - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'description': {'max_length': 4096, 'min_length': 0}, } @@ -281,7 +283,7 @@ class ComponentModelInfo(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, } _attribute_map = { @@ -306,11 +308,12 @@ class ComposeDocumentModelRequest(msrest.serialization.Model): :param description: Model description. :type description: str :param component_models: Required. List of component models to compose. - :type component_models: list[~azure.ai.formrecognizer.v3_0_preview_1.models.ComponentModelInfo] + :type component_models: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.ComponentModelInfo] """ _validation = { - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'description': {'max_length': 4096, 'min_length': 0}, 'component_models': {'required': True, 'unique': True}, } @@ -355,7 +358,7 @@ class CopyAuthorization(msrest.serialization.Model): _validation = { 'target_resource_id': {'required': True}, 'target_resource_region': {'required': True}, - 'target_model_id': {'required': True}, + 'target_model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'target_model_location': {'required': True}, 'access_token': {'required': True}, 'expiration_date_time': {'required': True}, @@ -414,7 +417,7 @@ def __init__( class DocTypeInfo(msrest.serialization.Model): - """DocTypeInfo. + """Document type info. All required parameters must be populated in order to send to Azure. @@ -423,7 +426,7 @@ class DocTypeInfo(msrest.serialization.Model): :param field_schema: Required. Description of the document semantic schema using a JSON Schema style syntax. :type field_schema: dict[str, - ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldSchema] + ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentFieldSchema] :param field_confidence: Estimated confidence for each field. :type field_confidence: dict[str, float] """ @@ -457,11 +460,12 @@ class Document(msrest.serialization.Model): :param doc_type: Required. Document type. :type doc_type: str :param bounding_regions: Bounding regions covering the document. - :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion] + :type bounding_regions: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.BoundingRegion] :param spans: Required. Location of the document in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] :param fields: Required. Dictionary of named field values. - :type fields: dict[str, ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentField] + :type fields: dict[str, ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentField] :param confidence: Required. Confidence of correctly extracting the document. :type confidence: float """ @@ -505,9 +509,10 @@ class DocumentEntity(msrest.serialization.Model): :param content: Required. Entity content. :type content: str :param bounding_regions: Bounding regions covering the entity. - :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion] + :type bounding_regions: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.BoundingRegion] :param spans: Required. Location of the entity in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] :param confidence: Required. Confidence of correctly extracting the entity. :type confidence: float """ @@ -547,9 +552,9 @@ class DocumentField(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param type: Required. Data type of the field value. Possible values include: "string", "date", - "time", "phoneNumber", "number", "integer", "selectionMark", "countryRegion", "currency", - "signature", "array", "object". - :type type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldType + "time", "phoneNumber", "number", "integer", "selectionMark", "countryRegion", "signature", + "array", "object". + :type type: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentFieldType :param value_string: String value. :type value_string: str :param value_date: Date value in YYYY-MM-DD format (ISO 8601). @@ -561,28 +566,28 @@ class DocumentField(msrest.serialization.Model): :param value_number: Floating point value. :type value_number: float :param value_integer: Integer value. - :type value_integer: int + :type value_integer: long :param value_selection_mark: Selection mark value. Possible values include: "selected", "unselected". :type value_selection_mark: str or - ~azure.ai.formrecognizer.v3_0_preview_1.models.SelectionMarkState + ~azure.ai.formrecognizer.v2021_09_30_preview.models.SelectionMarkState :param value_signature: Presence of signature. Possible values include: "signed", "unsigned". :type value_signature: str or - ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSignatureType + ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSignatureType :param value_country_region: 3-letter country code value (ISO 3166-1 alpha-3). :type value_country_region: str - :param value_currency: 3-letter currency code value (ISO 4217). - :type value_currency: str :param value_array: Array of field values. - :type value_array: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentField] + :type value_array: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentField] :param value_object: Dictionary of named field values. - :type value_object: dict[str, ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentField] + :type value_object: dict[str, + ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentField] :param content: Field content. :type content: str :param bounding_regions: Bounding regions covering the field. - :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion] + :type bounding_regions: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.BoundingRegion] :param spans: Location of the field in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] :param confidence: Confidence of correctly extracting the field. :type confidence: float """ @@ -599,11 +604,10 @@ class DocumentField(msrest.serialization.Model): 'value_time': {'key': 'valueTime', 'type': 'time'}, 'value_phone_number': {'key': 'valuePhoneNumber', 'type': 'str'}, 'value_number': {'key': 'valueNumber', 'type': 'float'}, - 'value_integer': {'key': 'valueInteger', 'type': 'int'}, + 'value_integer': {'key': 'valueInteger', 'type': 'long'}, 'value_selection_mark': {'key': 'valueSelectionMark', 'type': 'str'}, 'value_signature': {'key': 'valueSignature', 'type': 'str'}, 'value_country_region': {'key': 'valueCountryRegion', 'type': 'str'}, - 'value_currency': {'key': 'valueCurrency', 'type': 'str'}, 'value_array': {'key': 'valueArray', 'type': '[DocumentField]'}, 'value_object': {'key': 'valueObject', 'type': '{DocumentField}'}, 'content': {'key': 'content', 'type': 'str'}, @@ -627,7 +631,6 @@ def __init__( self.value_selection_mark = kwargs.get('value_selection_mark', None) self.value_signature = kwargs.get('value_signature', None) self.value_country_region = kwargs.get('value_country_region', None) - self.value_currency = kwargs.get('value_currency', None) self.value_array = kwargs.get('value_array', None) self.value_object = kwargs.get('value_object', None) self.content = kwargs.get('content', None) @@ -639,20 +642,27 @@ def __init__( class DocumentFieldSchema(msrest.serialization.Model): """Description of the field semantic schema using a JSON Schema style syntax. - :param type: Semantic data type of the field value. Possible values include: "string", "date", - "time", "phoneNumber", "number", "integer", "selectionMark", "countryRegion", "currency", + All required parameters must be populated in order to send to Azure. + + :param type: Required. Semantic data type of the field value. Possible values include: + "string", "date", "time", "phoneNumber", "number", "integer", "selectionMark", "countryRegion", "signature", "array", "object". - :type type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldType + :type type: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentFieldType :param description: Field description. :type description: str :param example: Example field content. :type example: str :param items: Field type schema of each array element. - :type items: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldSchema + :type items: ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentFieldSchema :param properties: Named sub-fields of the object field. - :type properties: dict[str, ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldSchema] + :type properties: dict[str, + ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentFieldSchema] """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, @@ -666,7 +676,7 @@ def __init__( **kwargs ): super(DocumentFieldSchema, self).__init__(**kwargs) - self.type = kwargs.get('type', None) + self.type = kwargs['type'] self.description = kwargs.get('description', None) self.example = kwargs.get('example', None) self.items = kwargs.get('items', None) @@ -681,10 +691,11 @@ class DocumentKeyValueElement(msrest.serialization.Model): :param content: Required. Concatenated content of the key-value element in reading order. :type content: str :param bounding_regions: Bounding regions covering the key-value element. - :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion] + :type bounding_regions: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.BoundingRegion] :param spans: Required. Location of the key-value element in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] """ _validation = { @@ -714,9 +725,9 @@ class DocumentKeyValuePair(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param key: Required. Field label of the key-value pair. - :type key: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentKeyValueElement + :type key: ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentKeyValueElement :param value: Field value of the key-value pair. - :type value: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentKeyValueElement + :type value: ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentKeyValueElement :param confidence: Required. Confidence of correctly extracting the key-value pair. :type confidence: float """ @@ -752,7 +763,7 @@ class DocumentLine(msrest.serialization.Model): :param bounding_box: Bounding box of the line. :type bounding_box: list[float] :param spans: Required. Location of the line in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] """ _validation = { @@ -794,17 +805,17 @@ class DocumentPage(msrest.serialization.Model): :param unit: Required. The unit used by the width, height, and boundingBox properties. For images, the unit is "pixel". For PDF, the unit is "inch". Possible values include: "pixel", "inch". - :type unit: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.LengthUnit + :type unit: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.LengthUnit :param spans: Required. Location of the page in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] :param words: Required. Extracted words from the page. - :type words: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentWord] + :type words: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentWord] :param selection_marks: Extracted selection marks from the page. :type selection_marks: - list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSelectionMark] + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSelectionMark] :param lines: Required. Extracted lines from the page, potentially containing both textual and visual elements. - :type lines: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentLine] + :type lines: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentLine] """ _validation = { @@ -853,12 +864,12 @@ class DocumentSelectionMark(msrest.serialization.Model): :param state: Required. State of the selection mark. Possible values include: "selected", "unselected". - :type state: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.SelectionMarkState + :type state: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.SelectionMarkState :param bounding_box: Bounding box of the selection mark. :type bounding_box: list[float] :param span: Required. Location of the selection mark in the reading order concatenated content. - :type span: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan + :type span: ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan :param confidence: Required. Confidence of correctly extracting the selection mark. :type confidence: float """ @@ -927,7 +938,7 @@ class DocumentStyle(msrest.serialization.Model): :type is_handwritten: bool :param spans: Required. Location of the text elements in the concatenated content the style applies to. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] :param confidence: Required. Confidence of correctly identifying the style. :type confidence: float """ @@ -963,11 +974,12 @@ class DocumentTable(msrest.serialization.Model): :param column_count: Required. Number of columns in the table. :type column_count: int :param cells: Required. Cells contained within the table. - :type cells: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentTableCell] + :type cells: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentTableCell] :param bounding_regions: Bounding regions covering the table. - :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion] + :type bounding_regions: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.BoundingRegion] :param spans: Required. Location of the table in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] """ _validation = { @@ -1004,7 +1016,7 @@ class DocumentTableCell(msrest.serialization.Model): :param kind: Table cell kind. Possible values include: "content", "rowHeader", "columnHeader", "stubHead", "description". Default value: "content". - :type kind: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentTableCellKind + :type kind: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentTableCellKind :param row_index: Required. Row index of the cell. :type row_index: int :param column_index: Required. Column index of the cell. @@ -1016,9 +1028,10 @@ class DocumentTableCell(msrest.serialization.Model): :param content: Required. Concatenated content of the table cell in reading order. :type content: str :param bounding_regions: Bounding regions covering the table cell. - :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion] + :type bounding_regions: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.BoundingRegion] :param spans: Required. Location of the table cell in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] """ _validation = { @@ -1066,7 +1079,7 @@ class DocumentWord(msrest.serialization.Model): :param bounding_box: Bounding box of the word. :type bounding_box: list[float] :param span: Required. Location of the word in the reading order concatenated content. - :type span: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan + :type span: ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan :param confidence: Required. Confidence of correctly extracting the word. :type confidence: float """ @@ -1108,9 +1121,9 @@ class Error(msrest.serialization.Model): :param target: Target of the error. :type target: str :param details: List of detailed errors. - :type details: list[~azure.ai.formrecognizer.v3_0_preview_1.models.Error] + :type details: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.Error] :param innererror: Detailed error. - :type innererror: ~azure.ai.formrecognizer.v3_0_preview_1.models.InnerError + :type innererror: ~azure.ai.formrecognizer.v2021_09_30_preview.models.InnerError """ _validation = { @@ -1144,7 +1157,7 @@ class ErrorResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param error: Required. Error info. - :type error: ~azure.ai.formrecognizer.v3_0_preview_1.models.Error + :type error: ~azure.ai.formrecognizer.v2021_09_30_preview.models.Error """ _validation = { @@ -1170,7 +1183,7 @@ class GetInfoResponse(msrest.serialization.Model): :param custom_document_models: Required. Info regarding custom document models. :type custom_document_models: - ~azure.ai.formrecognizer.v3_0_preview_1.models.CustomDocumentModelsInfo + ~azure.ai.formrecognizer.v2021_09_30_preview.models.CustomDocumentModelsInfo """ _validation = { @@ -1190,12 +1203,12 @@ def __init__( class GetModelsResponse(msrest.serialization.Model): - """GetModelsResponse. + """List Models response object. All required parameters must be populated in order to send to Azure. :param value: Required. List of models. - :type value: list[~azure.ai.formrecognizer.v3_0_preview_1.models.ModelSummary] + :type value: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.ModelSummary] :param next_link: Link to the next page of models. :type next_link: str """ @@ -1227,16 +1240,16 @@ class OperationInfo(msrest.serialization.Model): :type operation_id: str :param status: Required. Operation status. Possible values include: "notStarted", "running", "failed", "succeeded", "canceled". - :type status: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.OperationStatus + :type status: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.OperationStatus :param percent_completed: Operation progress (0-100). :type percent_completed: int :param created_date_time: Required. Date and time (UTC) when the operation was created. :type created_date_time: ~datetime.datetime :param last_updated_date_time: Required. Date and time (UTC) when the status was last updated. :type last_updated_date_time: ~datetime.datetime - :param kind: Type of operation. Possible values include: "documentModelBuild", + :param kind: Required. Type of operation. Possible values include: "documentModelBuild", "documentModelCompose", "documentModelCopyTo". - :type kind: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.OperationKind + :type kind: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.OperationKind :param resource_location: Required. URL of the resource targeted by this operation. :type resource_location: str """ @@ -1247,6 +1260,7 @@ class OperationInfo(msrest.serialization.Model): 'percent_completed': {'maximum': 100, 'minimum': 0}, 'created_date_time': {'required': True}, 'last_updated_date_time': {'required': True}, + 'kind': {'required': True}, 'resource_location': {'required': True}, } @@ -1270,7 +1284,7 @@ def __init__( self.percent_completed = kwargs.get('percent_completed', None) self.created_date_time = kwargs['created_date_time'] self.last_updated_date_time = kwargs['last_updated_date_time'] - self.kind = kwargs.get('kind', None) + self.kind = kwargs['kind'] self.resource_location = kwargs['resource_location'] @@ -1283,20 +1297,20 @@ class GetOperationResponse(OperationInfo): :type operation_id: str :param status: Required. Operation status. Possible values include: "notStarted", "running", "failed", "succeeded", "canceled". - :type status: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.OperationStatus + :type status: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.OperationStatus :param percent_completed: Operation progress (0-100). :type percent_completed: int :param created_date_time: Required. Date and time (UTC) when the operation was created. :type created_date_time: ~datetime.datetime :param last_updated_date_time: Required. Date and time (UTC) when the status was last updated. :type last_updated_date_time: ~datetime.datetime - :param kind: Type of operation. Possible values include: "documentModelBuild", + :param kind: Required. Type of operation. Possible values include: "documentModelBuild", "documentModelCompose", "documentModelCopyTo". - :type kind: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.OperationKind + :type kind: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.OperationKind :param resource_location: Required. URL of the resource targeted by this operation. :type resource_location: str :param error: Encountered error. - :type error: ~azure.ai.formrecognizer.v3_0_preview_1.models.Error + :type error: ~azure.ai.formrecognizer.v2021_09_30_preview.models.Error :param result: Operation result upon success. :type result: any """ @@ -1307,6 +1321,7 @@ class GetOperationResponse(OperationInfo): 'percent_completed': {'maximum': 100, 'minimum': 0}, 'created_date_time': {'required': True}, 'last_updated_date_time': {'required': True}, + 'kind': {'required': True}, 'resource_location': {'required': True}, } @@ -1337,7 +1352,7 @@ class GetOperationsResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param value: Required. List of operations. - :type value: list[~azure.ai.formrecognizer.v3_0_preview_1.models.OperationInfo] + :type value: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.OperationInfo] :param next_link: Link to the next page of operations. :type next_link: str """ @@ -1370,7 +1385,7 @@ class InnerError(msrest.serialization.Model): :param message: Error message. :type message: str :param innererror: Detailed error. - :type innererror: ~azure.ai.formrecognizer.v3_0_preview_1.models.InnerError + :type innererror: ~azure.ai.formrecognizer.v2021_09_30_preview.models.InnerError """ _validation = { @@ -1407,7 +1422,7 @@ class ModelSummary(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'description': {'max_length': 4096, 'min_length': 0}, 'created_date_time': {'required': True}, } @@ -1440,11 +1455,11 @@ class ModelInfo(ModelSummary): :param created_date_time: Required. Date and time (UTC) when the model was created. :type created_date_time: ~datetime.datetime :param doc_types: Supported document types. - :type doc_types: dict[str, ~azure.ai.formrecognizer.v3_0_preview_1.models.DocTypeInfo] + :type doc_types: dict[str, ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocTypeInfo] """ _validation = { - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'description': {'max_length': 4096, 'min_length': 0}, 'created_date_time': {'required': True}, } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/models/_models_py3.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/models/_models_py3.py similarity index 88% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/models/_models_py3.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/models/_models_py3.py index 7dbbe0b024a5..3461798895a1 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/models/_models_py3.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/models/_models_py3.py @@ -48,33 +48,34 @@ class AnalyzeResult(msrest.serialization.Model): :param api_version: Required. API version used to produce this result. Possible values include: "2021-09-30-preview". - :type api_version: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.ApiVersion + :type api_version: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.ApiVersion :param model_id: Required. Model ID used to produce this result. :type model_id: str :param string_index_type: Required. Method used to compute string offset and length. Possible values include: "textElements", "unicodeCodePoint", "utf16CodeUnit". - :type string_index_type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.StringIndexType + :type string_index_type: str or + ~azure.ai.formrecognizer.v2021_09_30_preview.models.StringIndexType :param content: Required. Concatenate string representation of all textual and visual elements in reading order. :type content: str :param pages: Required. Analyzed pages. - :type pages: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentPage] + :type pages: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentPage] :param tables: Extracted tables. - :type tables: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentTable] + :type tables: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentTable] :param key_value_pairs: Extracted key-value pairs. :type key_value_pairs: - list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentKeyValuePair] + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentKeyValuePair] :param entities: Extracted entities. - :type entities: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentEntity] + :type entities: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentEntity] :param styles: Extracted font styles. - :type styles: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentStyle] + :type styles: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentStyle] :param documents: Extracted documents. - :type documents: list[~azure.ai.formrecognizer.v3_0_preview_1.models.Document] + :type documents: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.Document] """ _validation = { 'api_version': {'required': True}, - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'string_index_type': {'required': True}, 'content': {'required': True}, 'pages': {'required': True}, @@ -129,16 +130,16 @@ class AnalyzeResultOperation(msrest.serialization.Model): :param status: Required. Operation status. Possible values include: "notStarted", "running", "failed", "succeeded". :type status: str or - ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeResultOperationStatus + ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeResultOperationStatus :param created_date_time: Required. Date and time (UTC) when the analyze operation was submitted. :type created_date_time: ~datetime.datetime :param last_updated_date_time: Required. Date and time (UTC) when the status was last updated. :type last_updated_date_time: ~datetime.datetime :param error: Encountered error during document analysis. - :type error: ~azure.ai.formrecognizer.v3_0_preview_1.models.Error + :type error: ~azure.ai.formrecognizer.v2021_09_30_preview.models.Error :param analyze_result: Document analysis result. - :type analyze_result: ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeResult + :type analyze_result: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeResult """ _validation = { @@ -185,7 +186,7 @@ class AuthorizeCopyRequest(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'description': {'max_length': 4096, 'min_length': 0}, } @@ -281,11 +282,12 @@ class BuildDocumentModelRequest(msrest.serialization.Model): :param description: Model description. :type description: str :param azure_blob_source: Azure Blob Storage location containing the training data. - :type azure_blob_source: ~azure.ai.formrecognizer.v3_0_preview_1.models.AzureBlobContentSource + :type azure_blob_source: + ~azure.ai.formrecognizer.v2021_09_30_preview.models.AzureBlobContentSource """ _validation = { - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'description': {'max_length': 4096, 'min_length': 0}, } @@ -319,7 +321,7 @@ class ComponentModelInfo(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, } _attribute_map = { @@ -346,11 +348,12 @@ class ComposeDocumentModelRequest(msrest.serialization.Model): :param description: Model description. :type description: str :param component_models: Required. List of component models to compose. - :type component_models: list[~azure.ai.formrecognizer.v3_0_preview_1.models.ComponentModelInfo] + :type component_models: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.ComponentModelInfo] """ _validation = { - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'description': {'max_length': 4096, 'min_length': 0}, 'component_models': {'required': True, 'unique': True}, } @@ -399,7 +402,7 @@ class CopyAuthorization(msrest.serialization.Model): _validation = { 'target_resource_id': {'required': True}, 'target_resource_region': {'required': True}, - 'target_model_id': {'required': True}, + 'target_model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'target_model_location': {'required': True}, 'access_token': {'required': True}, 'expiration_date_time': {'required': True}, @@ -468,7 +471,7 @@ def __init__( class DocTypeInfo(msrest.serialization.Model): - """DocTypeInfo. + """Document type info. All required parameters must be populated in order to send to Azure. @@ -477,7 +480,7 @@ class DocTypeInfo(msrest.serialization.Model): :param field_schema: Required. Description of the document semantic schema using a JSON Schema style syntax. :type field_schema: dict[str, - ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldSchema] + ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentFieldSchema] :param field_confidence: Estimated confidence for each field. :type field_confidence: dict[str, float] """ @@ -515,11 +518,12 @@ class Document(msrest.serialization.Model): :param doc_type: Required. Document type. :type doc_type: str :param bounding_regions: Bounding regions covering the document. - :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion] + :type bounding_regions: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.BoundingRegion] :param spans: Required. Location of the document in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] :param fields: Required. Dictionary of named field values. - :type fields: dict[str, ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentField] + :type fields: dict[str, ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentField] :param confidence: Required. Confidence of correctly extracting the document. :type confidence: float """ @@ -569,9 +573,10 @@ class DocumentEntity(msrest.serialization.Model): :param content: Required. Entity content. :type content: str :param bounding_regions: Bounding regions covering the entity. - :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion] + :type bounding_regions: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.BoundingRegion] :param spans: Required. Location of the entity in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] :param confidence: Required. Confidence of correctly extracting the entity. :type confidence: float """ @@ -618,9 +623,9 @@ class DocumentField(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param type: Required. Data type of the field value. Possible values include: "string", "date", - "time", "phoneNumber", "number", "integer", "selectionMark", "countryRegion", "currency", - "signature", "array", "object". - :type type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldType + "time", "phoneNumber", "number", "integer", "selectionMark", "countryRegion", "signature", + "array", "object". + :type type: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentFieldType :param value_string: String value. :type value_string: str :param value_date: Date value in YYYY-MM-DD format (ISO 8601). @@ -632,28 +637,28 @@ class DocumentField(msrest.serialization.Model): :param value_number: Floating point value. :type value_number: float :param value_integer: Integer value. - :type value_integer: int + :type value_integer: long :param value_selection_mark: Selection mark value. Possible values include: "selected", "unselected". :type value_selection_mark: str or - ~azure.ai.formrecognizer.v3_0_preview_1.models.SelectionMarkState + ~azure.ai.formrecognizer.v2021_09_30_preview.models.SelectionMarkState :param value_signature: Presence of signature. Possible values include: "signed", "unsigned". :type value_signature: str or - ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSignatureType + ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSignatureType :param value_country_region: 3-letter country code value (ISO 3166-1 alpha-3). :type value_country_region: str - :param value_currency: 3-letter currency code value (ISO 4217). - :type value_currency: str :param value_array: Array of field values. - :type value_array: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentField] + :type value_array: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentField] :param value_object: Dictionary of named field values. - :type value_object: dict[str, ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentField] + :type value_object: dict[str, + ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentField] :param content: Field content. :type content: str :param bounding_regions: Bounding regions covering the field. - :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion] + :type bounding_regions: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.BoundingRegion] :param spans: Location of the field in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] :param confidence: Confidence of correctly extracting the field. :type confidence: float """ @@ -670,11 +675,10 @@ class DocumentField(msrest.serialization.Model): 'value_time': {'key': 'valueTime', 'type': 'time'}, 'value_phone_number': {'key': 'valuePhoneNumber', 'type': 'str'}, 'value_number': {'key': 'valueNumber', 'type': 'float'}, - 'value_integer': {'key': 'valueInteger', 'type': 'int'}, + 'value_integer': {'key': 'valueInteger', 'type': 'long'}, 'value_selection_mark': {'key': 'valueSelectionMark', 'type': 'str'}, 'value_signature': {'key': 'valueSignature', 'type': 'str'}, 'value_country_region': {'key': 'valueCountryRegion', 'type': 'str'}, - 'value_currency': {'key': 'valueCurrency', 'type': 'str'}, 'value_array': {'key': 'valueArray', 'type': '[DocumentField]'}, 'value_object': {'key': 'valueObject', 'type': '{DocumentField}'}, 'content': {'key': 'content', 'type': 'str'}, @@ -696,7 +700,6 @@ def __init__( value_selection_mark: Optional[Union[str, "SelectionMarkState"]] = None, value_signature: Optional[Union[str, "DocumentSignatureType"]] = None, value_country_region: Optional[str] = None, - value_currency: Optional[str] = None, value_array: Optional[List["DocumentField"]] = None, value_object: Optional[Dict[str, "DocumentField"]] = None, content: Optional[str] = None, @@ -716,7 +719,6 @@ def __init__( self.value_selection_mark = value_selection_mark self.value_signature = value_signature self.value_country_region = value_country_region - self.value_currency = value_currency self.value_array = value_array self.value_object = value_object self.content = content @@ -728,20 +730,27 @@ def __init__( class DocumentFieldSchema(msrest.serialization.Model): """Description of the field semantic schema using a JSON Schema style syntax. - :param type: Semantic data type of the field value. Possible values include: "string", "date", - "time", "phoneNumber", "number", "integer", "selectionMark", "countryRegion", "currency", + All required parameters must be populated in order to send to Azure. + + :param type: Required. Semantic data type of the field value. Possible values include: + "string", "date", "time", "phoneNumber", "number", "integer", "selectionMark", "countryRegion", "signature", "array", "object". - :type type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldType + :type type: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentFieldType :param description: Field description. :type description: str :param example: Example field content. :type example: str :param items: Field type schema of each array element. - :type items: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldSchema + :type items: ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentFieldSchema :param properties: Named sub-fields of the object field. - :type properties: dict[str, ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentFieldSchema] + :type properties: dict[str, + ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentFieldSchema] """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, @@ -753,7 +762,7 @@ class DocumentFieldSchema(msrest.serialization.Model): def __init__( self, *, - type: Optional[Union[str, "DocumentFieldType"]] = None, + type: Union[str, "DocumentFieldType"], description: Optional[str] = None, example: Optional[str] = None, items: Optional["DocumentFieldSchema"] = None, @@ -776,10 +785,11 @@ class DocumentKeyValueElement(msrest.serialization.Model): :param content: Required. Concatenated content of the key-value element in reading order. :type content: str :param bounding_regions: Bounding regions covering the key-value element. - :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion] + :type bounding_regions: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.BoundingRegion] :param spans: Required. Location of the key-value element in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] """ _validation = { @@ -813,9 +823,9 @@ class DocumentKeyValuePair(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param key: Required. Field label of the key-value pair. - :type key: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentKeyValueElement + :type key: ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentKeyValueElement :param value: Field value of the key-value pair. - :type value: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentKeyValueElement + :type value: ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentKeyValueElement :param confidence: Required. Confidence of correctly extracting the key-value pair. :type confidence: float """ @@ -855,7 +865,7 @@ class DocumentLine(msrest.serialization.Model): :param bounding_box: Bounding box of the line. :type bounding_box: list[float] :param spans: Required. Location of the line in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] """ _validation = { @@ -901,17 +911,17 @@ class DocumentPage(msrest.serialization.Model): :param unit: Required. The unit used by the width, height, and boundingBox properties. For images, the unit is "pixel". For PDF, the unit is "inch". Possible values include: "pixel", "inch". - :type unit: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.LengthUnit + :type unit: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.LengthUnit :param spans: Required. Location of the page in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] :param words: Required. Extracted words from the page. - :type words: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentWord] + :type words: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentWord] :param selection_marks: Extracted selection marks from the page. :type selection_marks: - list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSelectionMark] + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSelectionMark] :param lines: Required. Extracted lines from the page, potentially containing both textual and visual elements. - :type lines: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentLine] + :type lines: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentLine] """ _validation = { @@ -970,12 +980,12 @@ class DocumentSelectionMark(msrest.serialization.Model): :param state: Required. State of the selection mark. Possible values include: "selected", "unselected". - :type state: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.SelectionMarkState + :type state: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.SelectionMarkState :param bounding_box: Bounding box of the selection mark. :type bounding_box: list[float] :param span: Required. Location of the selection mark in the reading order concatenated content. - :type span: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan + :type span: ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan :param confidence: Required. Confidence of correctly extracting the selection mark. :type confidence: float """ @@ -1052,7 +1062,7 @@ class DocumentStyle(msrest.serialization.Model): :type is_handwritten: bool :param spans: Required. Location of the text elements in the concatenated content the style applies to. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] :param confidence: Required. Confidence of correctly identifying the style. :type confidence: float """ @@ -1092,11 +1102,12 @@ class DocumentTable(msrest.serialization.Model): :param column_count: Required. Number of columns in the table. :type column_count: int :param cells: Required. Cells contained within the table. - :type cells: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentTableCell] + :type cells: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentTableCell] :param bounding_regions: Bounding regions covering the table. - :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion] + :type bounding_regions: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.BoundingRegion] :param spans: Required. Location of the table in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] """ _validation = { @@ -1139,7 +1150,7 @@ class DocumentTableCell(msrest.serialization.Model): :param kind: Table cell kind. Possible values include: "content", "rowHeader", "columnHeader", "stubHead", "description". Default value: "content". - :type kind: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentTableCellKind + :type kind: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentTableCellKind :param row_index: Required. Row index of the cell. :type row_index: int :param column_index: Required. Column index of the cell. @@ -1151,9 +1162,10 @@ class DocumentTableCell(msrest.serialization.Model): :param content: Required. Concatenated content of the table cell in reading order. :type content: str :param bounding_regions: Bounding regions covering the table cell. - :type bounding_regions: list[~azure.ai.formrecognizer.v3_0_preview_1.models.BoundingRegion] + :type bounding_regions: + list[~azure.ai.formrecognizer.v2021_09_30_preview.models.BoundingRegion] :param spans: Required. Location of the table cell in the reading order concatenated content. - :type spans: list[~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan] + :type spans: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan] """ _validation = { @@ -1210,7 +1222,7 @@ class DocumentWord(msrest.serialization.Model): :param bounding_box: Bounding box of the word. :type bounding_box: list[float] :param span: Required. Location of the word in the reading order concatenated content. - :type span: ~azure.ai.formrecognizer.v3_0_preview_1.models.DocumentSpan + :type span: ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocumentSpan :param confidence: Required. Confidence of correctly extracting the word. :type confidence: float """ @@ -1257,9 +1269,9 @@ class Error(msrest.serialization.Model): :param target: Target of the error. :type target: str :param details: List of detailed errors. - :type details: list[~azure.ai.formrecognizer.v3_0_preview_1.models.Error] + :type details: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.Error] :param innererror: Detailed error. - :type innererror: ~azure.ai.formrecognizer.v3_0_preview_1.models.InnerError + :type innererror: ~azure.ai.formrecognizer.v2021_09_30_preview.models.InnerError """ _validation = { @@ -1299,7 +1311,7 @@ class ErrorResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param error: Required. Error info. - :type error: ~azure.ai.formrecognizer.v3_0_preview_1.models.Error + :type error: ~azure.ai.formrecognizer.v2021_09_30_preview.models.Error """ _validation = { @@ -1327,7 +1339,7 @@ class GetInfoResponse(msrest.serialization.Model): :param custom_document_models: Required. Info regarding custom document models. :type custom_document_models: - ~azure.ai.formrecognizer.v3_0_preview_1.models.CustomDocumentModelsInfo + ~azure.ai.formrecognizer.v2021_09_30_preview.models.CustomDocumentModelsInfo """ _validation = { @@ -1349,12 +1361,12 @@ def __init__( class GetModelsResponse(msrest.serialization.Model): - """GetModelsResponse. + """List Models response object. All required parameters must be populated in order to send to Azure. :param value: Required. List of models. - :type value: list[~azure.ai.formrecognizer.v3_0_preview_1.models.ModelSummary] + :type value: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.ModelSummary] :param next_link: Link to the next page of models. :type next_link: str """ @@ -1389,16 +1401,16 @@ class OperationInfo(msrest.serialization.Model): :type operation_id: str :param status: Required. Operation status. Possible values include: "notStarted", "running", "failed", "succeeded", "canceled". - :type status: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.OperationStatus + :type status: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.OperationStatus :param percent_completed: Operation progress (0-100). :type percent_completed: int :param created_date_time: Required. Date and time (UTC) when the operation was created. :type created_date_time: ~datetime.datetime :param last_updated_date_time: Required. Date and time (UTC) when the status was last updated. :type last_updated_date_time: ~datetime.datetime - :param kind: Type of operation. Possible values include: "documentModelBuild", + :param kind: Required. Type of operation. Possible values include: "documentModelBuild", "documentModelCompose", "documentModelCopyTo". - :type kind: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.OperationKind + :type kind: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.OperationKind :param resource_location: Required. URL of the resource targeted by this operation. :type resource_location: str """ @@ -1409,6 +1421,7 @@ class OperationInfo(msrest.serialization.Model): 'percent_completed': {'maximum': 100, 'minimum': 0}, 'created_date_time': {'required': True}, 'last_updated_date_time': {'required': True}, + 'kind': {'required': True}, 'resource_location': {'required': True}, } @@ -1429,9 +1442,9 @@ def __init__( status: Union[str, "OperationStatus"], created_date_time: datetime.datetime, last_updated_date_time: datetime.datetime, + kind: Union[str, "OperationKind"], resource_location: str, percent_completed: Optional[int] = None, - kind: Optional[Union[str, "OperationKind"]] = None, **kwargs ): super(OperationInfo, self).__init__(**kwargs) @@ -1453,20 +1466,20 @@ class GetOperationResponse(OperationInfo): :type operation_id: str :param status: Required. Operation status. Possible values include: "notStarted", "running", "failed", "succeeded", "canceled". - :type status: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.OperationStatus + :type status: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.OperationStatus :param percent_completed: Operation progress (0-100). :type percent_completed: int :param created_date_time: Required. Date and time (UTC) when the operation was created. :type created_date_time: ~datetime.datetime :param last_updated_date_time: Required. Date and time (UTC) when the status was last updated. :type last_updated_date_time: ~datetime.datetime - :param kind: Type of operation. Possible values include: "documentModelBuild", + :param kind: Required. Type of operation. Possible values include: "documentModelBuild", "documentModelCompose", "documentModelCopyTo". - :type kind: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.OperationKind + :type kind: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.OperationKind :param resource_location: Required. URL of the resource targeted by this operation. :type resource_location: str :param error: Encountered error. - :type error: ~azure.ai.formrecognizer.v3_0_preview_1.models.Error + :type error: ~azure.ai.formrecognizer.v2021_09_30_preview.models.Error :param result: Operation result upon success. :type result: any """ @@ -1477,6 +1490,7 @@ class GetOperationResponse(OperationInfo): 'percent_completed': {'maximum': 100, 'minimum': 0}, 'created_date_time': {'required': True}, 'last_updated_date_time': {'required': True}, + 'kind': {'required': True}, 'resource_location': {'required': True}, } @@ -1499,9 +1513,9 @@ def __init__( status: Union[str, "OperationStatus"], created_date_time: datetime.datetime, last_updated_date_time: datetime.datetime, + kind: Union[str, "OperationKind"], resource_location: str, percent_completed: Optional[int] = None, - kind: Optional[Union[str, "OperationKind"]] = None, error: Optional["Error"] = None, result: Optional[Any] = None, **kwargs @@ -1517,7 +1531,7 @@ class GetOperationsResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param value: Required. List of operations. - :type value: list[~azure.ai.formrecognizer.v3_0_preview_1.models.OperationInfo] + :type value: list[~azure.ai.formrecognizer.v2021_09_30_preview.models.OperationInfo] :param next_link: Link to the next page of operations. :type next_link: str """ @@ -1553,7 +1567,7 @@ class InnerError(msrest.serialization.Model): :param message: Error message. :type message: str :param innererror: Detailed error. - :type innererror: ~azure.ai.formrecognizer.v3_0_preview_1.models.InnerError + :type innererror: ~azure.ai.formrecognizer.v2021_09_30_preview.models.InnerError """ _validation = { @@ -1594,7 +1608,7 @@ class ModelSummary(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'description': {'max_length': 4096, 'min_length': 0}, 'created_date_time': {'required': True}, } @@ -1631,11 +1645,11 @@ class ModelInfo(ModelSummary): :param created_date_time: Required. Date and time (UTC) when the model was created. :type created_date_time: ~datetime.datetime :param doc_types: Supported document types. - :type doc_types: dict[str, ~azure.ai.formrecognizer.v3_0_preview_1.models.DocTypeInfo] + :type doc_types: dict[str, ~azure.ai.formrecognizer.v2021_09_30_preview.models.DocTypeInfo] """ _validation = { - 'model_id': {'required': True}, + 'model_id': {'required': True, 'pattern': r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'}, 'description': {'max_length': 4096, 'min_length': 0}, 'created_date_time': {'required': True}, } diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/operations/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/operations/__init__.py similarity index 100% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/operations/__init__.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/operations/__init__.py diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/operations/_form_recognizer_client_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/operations/_form_recognizer_client_operations.py similarity index 96% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/operations/_form_recognizer_client_operations.py rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/operations/_form_recognizer_client_operations.py index 39752f891b1a..2784aab71fae 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/operations/_form_recognizer_client_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/operations/_form_recognizer_client_operations.py @@ -20,7 +20,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, IO, Iterable, List, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, IO, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -30,7 +30,7 @@ class FormRecognizerClientOperationsMixin(object): def _analyze_document_initial( self, model_id, # type: str - pages=None, # type: Optional[List[str]] + pages=None, # type: Optional[str] locale=None, # type: Optional[str] string_index_type=None, # type: Optional[Union[str, "_models.StringIndexType"]] analyze_request=None, # type: Optional[Union[IO, "_models.AnalyzeDocumentRequest"]] @@ -50,14 +50,14 @@ def _analyze_document_initial( url = self._analyze_document_initial.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] if pages is not None: - query_parameters['pages'] = self._serialize.query("pages", pages, '[str]', div=',') + query_parameters['pages'] = self._serialize.query("pages", pages, 'str', pattern=r'^(\d+(-\d+)?)(,\s*(\d+(-\d+)?))*$') if locale is not None: query_parameters['locale'] = self._serialize.query("locale", locale, 'str') if string_index_type is not None: @@ -103,7 +103,7 @@ def _analyze_document_initial( def begin_analyze_document( self, model_id, # type: str - pages=None, # type: Optional[List[str]] + pages=None, # type: Optional[str] locale=None, # type: Optional[str] string_index_type=None, # type: Optional[Union[str, "_models.StringIndexType"]] analyze_request=None, # type: Optional[Union[IO, "_models.AnalyzeDocumentRequest"]] @@ -117,14 +117,14 @@ def begin_analyze_document( :param model_id: Unique model name. :type model_id: str :param pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". - :type pages: list[str] + :type pages: str :param locale: Locale hint for text recognition and document analysis. Value may contain only the language code (ex. "en", "fr") or BCP 47 language tag (ex. "en-US"). :type locale: str :param string_index_type: Method used to compute string offset and length. - :type string_index_type: str or ~azure.ai.formrecognizer.v3_0_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.formrecognizer.v2021_09_30_preview.models.StringIndexType :param analyze_request: Analyze request parameters. - :type analyze_request: IO or ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeDocumentRequest + :type analyze_request: IO or ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeDocumentRequest :keyword str content_type: Media type of the body sent to the API. Default value is "application/json". Allowed values are: "application/octet-stream", "application/pdf", "image/bmp", "image/jpeg", "image/png", "image/tiff", "application/json". :keyword callable cls: A custom type or function that will be passed the direct response @@ -164,7 +164,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), } if polling is True: polling_method = LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -198,7 +198,7 @@ def get_analyze_document_result( :type result_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AnalyzeResultOperation, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.AnalyzeResultOperation + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AnalyzeResultOperation :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalyzeResultOperation"] @@ -213,7 +213,7 @@ def get_analyze_document_result( url = self.get_analyze_document_result.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), 'resultId': self._serialize.url("result_id", result_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -305,7 +305,7 @@ def begin_build_document_model( Builds a custom document analysis model. :param build_request: Building request parameters. - :type build_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.BuildDocumentModelRequest + :type build_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.BuildDocumentModelRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be LROBasePolling. @@ -416,8 +416,8 @@ def begin_compose_document_model( Creates a new model from document types of existing models. - :param compose_request: - :type compose_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.ComposeDocumentModelRequest + :param compose_request: Compose request parameters. + :type compose_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ComposeDocumentModelRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be LROBasePolling. @@ -478,11 +478,11 @@ def authorize_copy_document_model( Generates authorization to copy a model to this location with specified modelId and optional description. - :param authorize_copy_request: - :type authorize_copy_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.AuthorizeCopyRequest + :param authorize_copy_request: Authorize copy request parameters. + :type authorize_copy_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.AuthorizeCopyRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: CopyAuthorization, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CopyAuthorization"] @@ -550,7 +550,7 @@ def _copy_document_model_to_initial( url = self._copy_document_model_to_initial.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), } url = self._client.format_url(url, **path_format_arguments) @@ -596,8 +596,8 @@ def begin_copy_document_model_to( :param model_id: Unique model name. :type model_id: str - :param copy_to_request: - :type copy_to_request: ~azure.ai.formrecognizer.v3_0_preview_1.models.CopyAuthorization + :param copy_to_request: Copy to request parameters. + :type copy_to_request: ~azure.ai.formrecognizer.v2021_09_30_preview.models.CopyAuthorization :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be LROBasePolling. @@ -632,7 +632,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), } if polling is True: polling_method = LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -660,7 +660,7 @@ def get_operations( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GetOperationsResponse or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v3_0_preview_1.models.GetOperationsResponse] + :rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v2021_09_30_preview.models.GetOperationsResponse] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GetOperationsResponse"] @@ -737,7 +737,7 @@ def get_operation( :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GetOperationResponse, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.GetOperationResponse + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.GetOperationResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GetOperationResponse"] @@ -792,7 +792,7 @@ def get_models( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GetModelsResponse or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v3_0_preview_1.models.GetModelsResponse] + :rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.v2021_09_30_preview.models.GetModelsResponse] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GetModelsResponse"] @@ -869,7 +869,7 @@ def get_model( :type model_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ModelInfo, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.ModelInfo + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.ModelInfo :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelInfo"] @@ -884,7 +884,7 @@ def get_model( url = self.get_model.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), } url = self._client.format_url(url, **path_format_arguments) @@ -942,7 +942,7 @@ def delete_model( url = self.delete_model.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'modelId': self._serialize.url("model_id", model_id, 'str'), + 'modelId': self._serialize.url("model_id", model_id, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}'), } url = self._client.format_url(url, **path_format_arguments) @@ -979,7 +979,7 @@ def get_info( :keyword callable cls: A custom type or function that will be passed the direct response :return: GetInfoResponse, or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.v3_0_preview_1.models.GetInfoResponse + :rtype: ~azure.ai.formrecognizer.v2021_09_30_preview.models.GetInfoResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.GetInfoResponse"] diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/py.typed b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/py.typed similarity index 100% rename from sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1/py.typed rename to sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview/py.typed diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_helpers.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_helpers.py index 93020e19ea05..e2d0bd4cde99 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_helpers.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_helpers.py @@ -22,7 +22,7 @@ def _get_deserialize(api_version): elif api_version == "2.1": from ._generated.v2_1 import FormRecognizerClient elif api_version == "2021-09-30-preview": - from ._generated.v3_0_preview_1 import FormRecognizerClient + from ._generated.v2021_09_30_preview import FormRecognizerClient return FormRecognizerClient( # pylint: disable=protected-access "dummy", "dummy" )._deserialize diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py index 09fa04fbd951..7b90ccd21f8d 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py @@ -8,7 +8,7 @@ from enum import Enum from collections import namedtuple -from ._generated.models import ModelInfo, Error +from ._generated.v2021_09_30_preview.models import ModelInfo, Error from ._helpers import ( adjust_value_type, adjust_confidence, diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_analysis_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_analysis_client_async.py index c2ed8a682240..dae6a5436841 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_analysis_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_analysis_client_async.py @@ -89,9 +89,9 @@ async def begin_analyze_document( "prebuilt-document", "prebuilt-layout". :param document: JPEG, PNG, PDF, TIFF, or BMP type file stream or bytes. :type document: bytes or IO[bytes] - :keyword list[str] pages: Custom page numbers for multi-page documents(PDF/TIFF). Input the page numbers + :keyword str pages: Custom page numbers for multi-page documents(PDF/TIFF). Input the page numbers and/or ranges of pages you want to get in the result. For a range of pages, use a hyphen, like - `pages=["1-3", "5-6"]`. Separate each page number or range with a comma. + `pages="1-3, 5-6"`. Separate each page number or range with a comma. :keyword str locale: Locale of the document. Supported locales include: en-US, en-AU, en-CA, en-GB, and en-IN. :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -146,9 +146,9 @@ async def begin_analyze_document_from_url( "prebuilt-document", "prebuilt-layout". :param str document_url: The URL of the document to analyze. The input must be a valid, encoded URL of one of the supported formats: JPEG, PNG, PDF, TIFF, or BMP. - :keyword list[str] pages: Custom page numbers for multi-page documents(PDF/TIFF). Input the page numbers + :keyword str pages: Custom page numbers for multi-page documents(PDF/TIFF). Input the page numbers and/or ranges of pages you want to get in the result. For a range of pages, use a hyphen, like - `pages=["1-3", "5-6"]`. Separate each page number or range with a comma. + `pages="1-3, 5-6"`. Separate each page number or range with a comma. :keyword str locale: Locale of the document. Supported locales include: en-US, en-AU, en-CA, en-GB, and en-IN. :keyword str continuation_token: A continuation token to restart a poller from a saved state. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py index 90a898b31caf..7b5b9b13749b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py @@ -22,10 +22,6 @@ from azure.core.async_paging import AsyncItemPaged from ._form_recognizer_client_async import FormRecognizerClient from ._helpers_async import AsyncTransportWrapper -from .._generated.models import ( - CopyRequest, - CopyAuthorizationResult, -) from .._api_versions import FormRecognizerApiVersion from .._models import CustomFormModelInfo, AccountProperties, CustomFormModel from ._form_base_client_async import FormRecognizerClientBaseAsync @@ -419,10 +415,10 @@ def _copy_callback(raw_response, _, headers): # pylint: disable=unused-argument return await self._client.begin_copy_custom_model( # type: ignore model_id=model_id, - copy_request=CopyRequest( + copy_request=self._generated_models.CopyRequest( target_resource_id=target["resourceId"], target_resource_region=target["resourceRegion"], - copy_authorization=CopyAuthorizationResult( + copy_authorization=self._generated_models.CopyAuthorizationResult( access_token=target["accessToken"], model_id=target["modelId"], expiration_date_time_ticks=target["expirationDateTimeTicks"], diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/swagger/README.md b/sdk/formrecognizer/azure-ai-formrecognizer/swagger/README.md index c21b2c5c2316..142a710b0fda 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/swagger/README.md +++ b/sdk/formrecognizer/azure-ai-formrecognizer/swagger/README.md @@ -28,7 +28,7 @@ multiapi: true batch: - tag: release_2_0 - tag: release_2_1 - - tag: release_3_0_preview.1 + - tag: release_2021_09_30_preview - multiapiscript: true ``` @@ -36,7 +36,7 @@ batch: ```yaml $(multiapiscript) output-folder: $(python-sdks-folder)/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/ -default-api: v3_0_preview_1 +default-api: 2021-09-30-preview clear-output-folder: true perform-load: false ``` @@ -64,12 +64,12 @@ output-folder: $(python-sdks-folder)/formrecognizer/azure-ai-formrecognizer/azur ## Release 3.1-preview -These settings apply only when `--tag=release_3_0_preview.1` is specified on the command line. +These settings apply only when `--tag=release_2021_09_30_preview` is specified on the command line. -``` yaml $(tag) == 'release_3_0_preview.1' -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs-pr/5fcc40f8557307a77303e906982651c925f7ff8e/specification/cognitiveservices/data-plane/FormRecognizer/preview/v3.0-preview.1/FormRecognizer.yml?token=AHUEAM3KLUFHDWCGEOUXLXLBITWCC -namespace: azure.ai.formrecognizer.v3_0_preview_1 -output-folder: $(python-sdks-folder)/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v3_0_preview_1 +``` yaml $(tag) == 'release_2021_09_30_preview' +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs-pr/8881ef0f39b9c002c9fd84fa355421e3e3cc385d/specification/cognitiveservices/data-plane/FormRecognizer/preview/2021-09-30-preview/FormRecognizer.json?token=AHUEAM5YOKH3SWW7BUF7EUDBK6KHS +namespace: azure.ai.formrecognizer.v2021_09_30_preview +output-folder: $(python-sdks-folder)/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2021_09_30_preview ``` diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_pages_kwarg_specified.yaml index 965935719ddc..e154aa245ba0 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_pages_kwarg_specified.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_pages_kwarg_specified.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: 'b''{"modelId": "08a846cc-051c-453c-a72f-a000a01b8ece", "azureBlobSource": + body: 'b''{"modelId": "2312f540-050f-4794-bec0-ccf02e3fe415", "azureBlobSource": {"containerUrl": "container_sas_url"}}''' headers: Accept: @@ -10,11 +10,11 @@ interactions: Connection: - keep-alive Content-Length: - - '291' + - '284' Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels:build?api-version=2021-09-30-preview response: @@ -22,19 +22,19 @@ interactions: string: '' headers: apim-request-id: - - 23cca153-9b98-4440-962e-dbddbdbd7fa3 + - 0a1dd424-9d2f-486b-8c8d-c944577384f1 content-length: - '0' date: - - Fri, 24 Sep 2021 06:48:13 GMT + - Sat, 25 Sep 2021 02:30:38 GMT operation-location: - - https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533901909_23cca153-9b98-4440-962e-dbddbdbd7fa3?api-version=2021-09-30-preview + - https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533830966_0a1dd424-9d2f-486b-8c8d-c944577384f1?api-version=2021-09-30-preview strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2810' + - '4363' status: code: 202 message: Accepted @@ -48,15 +48,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533901909_23cca153-9b98-4440-962e-dbddbdbd7fa3?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533830966_0a1dd424-9d2f-486b-8c8d-c944577384f1?api-version=2021-09-30-preview response: body: - string: '{"operationId": "31533901909_23cca153-9b98-4440-962e-dbddbdbd7fa3", - "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-09-24T06:48:10Z", - "lastUpdatedDateTime": "2021-09-24T06:48:15Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/08a846cc-051c-453c-a72f-a000a01b8ece?api-version=2021-09-30-preview", - "percentCompleted": 100, "result": {"docTypes": {"08a846cc-051c-453c-a72f-a000a01b8ece": + string: '{"operationId": "31533830966_0a1dd424-9d2f-486b-8c8d-c944577384f1", + "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-09-25T02:30:34Z", + "lastUpdatedDateTime": "2021-09-25T02:30:40Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/2312f540-050f-4794-bec0-ccf02e3fe415?api-version=2021-09-30-preview", + "percentCompleted": 100, "result": {"docTypes": {"2312f540-050f-4794-bec0-ccf02e3fe415": {"fieldSchema": {"Merchant": {"type": "string"}, "PhoneNumber": {"type": "string"}, "Website": {"type": "string"}, "Email": {"type": "string"}, "PurchaseOrderNumber": {"type": "string"}, "DatedAs": {"type": "string"}, "VendorName": {"type": @@ -66,16 +66,16 @@ interactions: "string"}, "Quantity": {"type": "number"}}, "fieldConfidence": {"CompanyAddress": 0.8, "CompanyName": 0.95, "CompanyPhoneNumber": 0.95, "DatedAs": 0.95, "Email": 0.8, "Merchant": 0.95, "PhoneNumber": 0.95, "PurchaseOrderNumber": 0.95, "Quantity": - 0.95, "Signature": 0.8, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": - 0.95, "Website": 0.95}}}, "modelId": "08a846cc-051c-453c-a72f-a000a01b8ece", - "createdDateTime": "2021-09-24T06:48:15Z"}}' + 0.95, "Signature": 0.6, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": + 0.95, "Website": 0.95}}}, "modelId": "2312f540-050f-4794-bec0-ccf02e3fe415", + "createdDateTime": "2021-09-25T02:30:40Z"}}' headers: apim-request-id: - - e10d1211-5207-4f7a-9767-dab024e1eca7 + - 46a2e749-023a-451b-a8d9-391b8ee797a3 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Sep 2021 06:48:17 GMT + - Sat, 25 Sep 2021 02:30:43 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -83,7 +83,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '44' + - '41' status: code: 200 message: OK @@ -102,27 +102,27 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/08a846cc-051c-453c-a72f-a000a01b8ece:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/2312f540-050f-4794-bec0-ccf02e3fe415:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: body: string: '' headers: apim-request-id: - - 12f78113-a3f6-475e-a85b-e869a656061e + - 1bbf6e68-5384-4630-b89a-0b4546ee8f8d content-length: - '0' date: - - Fri, 24 Sep 2021 06:48:19 GMT + - Sat, 25 Sep 2021 02:30:44 GMT operation-location: - - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/08a846cc-051c-453c-a72f-a000a01b8ece/analyzeResults/12f78113-a3f6-475e-a85b-e869a656061e?api-version=2021-09-30-preview + - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/2312f540-050f-4794-bec0-ccf02e3fe415/analyzeResults/1bbf6e68-5384-4630-b89a-0b4546ee8f8d?api-version=2021-09-30-preview strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '616' + - '869' status: code: 202 message: Accepted @@ -136,14 +136,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/08a846cc-051c-453c-a72f-a000a01b8ece/analyzeResults/12f78113-a3f6-475e-a85b-e869a656061e?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/2312f540-050f-4794-bec0-ccf02e3fe415/analyzeResults/1bbf6e68-5384-4630-b89a-0b4546ee8f8d?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-24T06:48:19Z", - "lastUpdatedDateTime": "2021-09-24T06:48:23Z", "analyzeResult": {"apiVersion": - "2021-09-30-preview", "modelId": "08a846cc-051c-453c-a72f-a000a01b8ece", "stringIndexType": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:30:44Z", + "lastUpdatedDateTime": "2021-09-25T02:30:47Z", "analyzeResult": {"apiVersion": + "2021-09-30-preview", "modelId": "2312f540-050f-4794-bec0-ccf02e3fe415", "stringIndexType": "unicodeCodePoint", "content": "Purchase Order\nHero Limited\nCompany Phone: 555-348-6512\nWebsite: www.herolimited.com\nEmail:\nPurchase Order\nDated As: 12/20/2020\nPurchase Order #: 948284\naccounts@herolimited.com\nShipped @@ -580,65 +580,65 @@ interactions: "length": 7}]}], "boundingRegions": [{"pageNumber": 1, "boundingBox": [1062, 1563, 1560, 1563, 1560, 1709, 1062, 1709]}], "spans": [{"offset": 706, "length": 40}]}], "styles": [{"isHandwritten": true, "confidence": 0.9, "spans": [{"offset": - 606, "length": 14}]}], "documents": [{"docType": "08a846cc-051c-453c-a72f-a000a01b8ece:08a846cc-051c-453c-a72f-a000a01b8ece", + 606, "length": 14}]}], "documents": [{"docType": "2312f540-050f-4794-bec0-ccf02e3fe415:2312f540-050f-4794-bec0-ccf02e3fe415", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0, 0, 1700, 0, 1700, - 2200, 0, 2200]}], "fields": {"CompanyAddress": {"type": "string", "valueString": - "938 NE Burner Road Boulder City, CO 92848", "content": "938 NE Burner Road - Boulder City, CO 92848", "boundingRegions": [{"pageNumber": 1, "boundingBox": - [271, 685, 559, 685, 559, 751, 271, 751]}], "confidence": 0.621, "spans": - [{"offset": 259, "length": 41}]}, "Quantity": {"type": "number", "valueNumber": - 20, "content": "20", "boundingRegions": [{"pageNumber": 1, "boundingBox": - [859, 1094, 887, 1094, 887, 1119, 859, 1119]}], "confidence": 0.95, "spans": - [{"offset": 498, "length": 2}]}, "Website": {"type": "string", "valueString": - "www.herolimited.com", "content": "www.herolimited.com", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [270, 393, 522, 393, 522, 418, 270, 418]}], - "confidence": 0.95, "spans": [{"offset": 65, "length": 19}]}, "Email": {"type": - "string", "valueString": "accounts@herolimited.com", "content": "accounts@herolimited.com", - "boundingRegions": [{"pageNumber": 1, "boundingBox": [164, 479, 471, 479, - 471, 503, 164, 503]}], "confidence": 0.95, "spans": [{"offset": 153, "length": - 24}]}, "PurchaseOrderNumber": {"type": "string", "valueString": "948284", - "content": "948284", "boundingRegions": [{"pageNumber": 1, "boundingBox": - [1275, 461, 1373, 461, 1373, 489, 1275, 489]}], "confidence": 0.95, "spans": - [{"offset": 146, "length": 6}]}, "CompanyName": {"type": "string", "valueString": + 2200, 0, 2200]}], "fields": {"CompanyName": {"type": "string", "valueString": "Higgly Wiggly Books", "content": "Higgly Wiggly Books", "boundingRegions": [{"pageNumber": 1, "boundingBox": [372, 646, 628, 646, 628, 679, 372, 679]}], - "confidence": 0.95, "spans": [{"offset": 230, "length": 19}]}, "PhoneNumber": - {"type": "string", "valueString": "555-348-6512", "content": "555-348-6512", - "boundingRegions": [{"pageNumber": 1, "boundingBox": [363, 351, 524, 351, - 524, 378, 363, 378]}], "confidence": 0.95, "spans": [{"offset": 43, "length": - 12}]}, "VendorName": {"type": "string", "valueString": "Hillary Swank", "content": - "Hillary Swank", "boundingRegions": [{"pageNumber": 1, "boundingBox": [346, - 609, 518, 609, 518, 639, 346, 639]}], "confidence": 0.95, "spans": [{"offset": - 202, "length": 13}]}, "CompanyPhoneNumber": {"type": "string", "valueString": + "confidence": 0.95, "spans": [{"offset": 230, "length": 19}]}, "Subtotal": + {"type": "string", "valueString": "$140.00", "content": "$140.00", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1426, 1572, 1526, 1572, 1526, 1599, 1426, + 1599]}], "confidence": 0.95, "spans": [{"offset": 715, "length": 7}]}, "Email": + {"type": "string", "valueString": "accounts@herolimited.com", "content": "accounts@herolimited.com", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [164, 479, 471, 479, + 471, 503, 164, 503]}], "confidence": 0.95, "spans": [{"offset": 153, "length": + 24}]}, "Quantity": {"type": "number", "valueNumber": 20, "content": "20", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [859, 1094, 887, 1094, + 887, 1119, 859, 1119]}], "confidence": 0.95, "spans": [{"offset": 498, "length": + 2}]}, "Signature": {"type": "string", "valueString": "Bernie Sanders", "content": + "Bernie Sanders", "boundingRegions": [{"pageNumber": 1, "boundingBox": [484, + 1670, 763, 1670, 763, 1708, 484, 1708]}], "confidence": 0.241, "spans": [{"offset": + 606, "length": 14}]}, "CompanyPhoneNumber": {"type": "string", "valueString": "938-294-2949", "content": "938-294-2949", "boundingRegions": [{"pageNumber": 1, "boundingBox": [706, 722, 882, 722, 882, 749, 706, 749]}], "confidence": - 0.95, "spans": [{"offset": 308, "length": 12}]}, "DatedAs": {"type": "string", - "valueString": "12/20/2020", "content": "12/20/2020", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [1162, 420, 1312, 420, 1312, 449, 1162, 449]}], "confidence": - 0.95, "spans": [{"offset": 117, "length": 10}]}, "Subtotal": {"type": "string", - "valueString": "$140.00", "content": "$140.00", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [1426, 1572, 1526, 1572, 1526, 1599, 1426, 1599]}], "confidence": - 0.95, "spans": [{"offset": 715, "length": 7}]}, "Merchant": {"type": "string", - "valueString": "Hero Limited", "content": "Hero Limited", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [620, 204, 1058, 204, 1058, 266, 620, 266]}], - "confidence": 0.95, "spans": [{"offset": 15, "length": 12}]}, "Tax": {"type": - "string", "valueString": "$4.00", "content": "$4.00", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [1458, 1615, 1529, 1615, 1529, 1643, 1458, 1643]}], "confidence": - 0.95, "spans": [{"offset": 727, "length": 5}]}, "Total": {"type": "string", + 0.95, "spans": [{"offset": 308, "length": 12}]}, "CompanyAddress": {"type": + "string", "valueString": "938 NE Burner Road Boulder City, CO 92848", "content": + "938 NE Burner Road Boulder City, CO 92848", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [271, 685, 559, 685, 559, 751, 271, 751]}], "confidence": + 0.762, "spans": [{"offset": 259, "length": 41}]}, "Website": {"type": "string", + "valueString": "www.herolimited.com", "content": "www.herolimited.com", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [270, 393, 522, 393, 522, 418, 270, 418]}], + "confidence": 0.95, "spans": [{"offset": 65, "length": 19}]}, "VendorName": + {"type": "string", "valueString": "Hillary Swank", "content": "Hillary Swank", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [346, 609, 518, 609, + 518, 639, 346, 639]}], "confidence": 0.95, "spans": [{"offset": 202, "length": + 13}]}, "DatedAs": {"type": "string", "valueString": "12/20/2020", "content": + "12/20/2020", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1162, + 420, 1312, 420, 1312, 449, 1162, 449]}], "confidence": 0.95, "spans": [{"offset": + 117, "length": 10}]}, "Tax": {"type": "string", "valueString": "$4.00", "content": + "$4.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1458, 1615, + 1529, 1615, 1529, 1643, 1458, 1643]}], "confidence": 0.95, "spans": [{"offset": + 727, "length": 5}]}, "PurchaseOrderNumber": {"type": "string", "valueString": + "948284", "content": "948284", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1275, 461, 1373, 461, 1373, 489, 1275, 489]}], "confidence": 0.95, "spans": + [{"offset": 146, "length": 6}]}, "Merchant": {"type": "string", "valueString": + "Hero Limited", "content": "Hero Limited", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [620, 204, 1058, 204, 1058, 266, 620, 266]}], "confidence": + 0.95, "spans": [{"offset": 15, "length": 12}]}, "Total": {"type": "string", "valueString": "$144.00", "content": "$144.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1427, 1669, 1527, 1669, 1527, 1698, 1427, 1698]}], "confidence": - 0.95, "spans": [{"offset": 739, "length": 7}]}, "Signature": {"type": "string", - "valueString": "Bernie Sanders", "content": "Bernie Sanders", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [484, 1670, 763, 1670, 763, 1708, 484, 1708]}], - "confidence": 0.433, "spans": [{"offset": 606, "length": 14}]}}, "confidence": - 0.924, "spans": [{"offset": 0, "length": 880}]}]}}' + 0.95, "spans": [{"offset": 739, "length": 7}]}, "PhoneNumber": {"type": "string", + "valueString": "555-348-6512", "content": "555-348-6512", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [363, 351, 524, 351, 524, 378, 363, 378]}], + "confidence": 0.95, "spans": [{"offset": 43, "length": 12}]}}, "confidence": + 0.92, "spans": [{"offset": 0, "length": 880}]}]}}' headers: apim-request-id: - - 47160685-5142-44db-83d4-509260dd2f16 + - d9549955-15cd-4119-9b73-e9bf70513637 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Sep 2021 06:48:25 GMT + - Sat, 25 Sep 2021 02:30:49 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -646,7 +646,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '440' + - '191' status: code: 200 message: OK diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_pages_kwarg_specified.yaml index e8b5ad880a13..fcde50d58403 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_pages_kwarg_specified.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_pages_kwarg_specified.yaml @@ -1,29 +1,29 @@ interactions: - request: - body: 'b''{"modelId": "96262f9c-60bf-49b5-b9f7-7e3034810ba5", "azureBlobSource": + body: 'b''{"modelId": "b6d14f57-68c6-4862-bfdf-cd07cc2ac422", "azureBlobSource": {"containerUrl": "container_sas_url"}}''' headers: Accept: - application/json Content-Length: - - '291' + - '284' Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels:build?api-version=2021-09-30-preview response: body: string: '' headers: - apim-request-id: ffa972a9-035a-409e-b53f-2efcd67bf0f9 + apim-request-id: 232c5ad2-7f1d-4477-8539-e4569fc2b13c content-length: '0' - date: Fri, 24 Sep 2021 06:52:52 GMT - operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533901631_ffa972a9-035a-409e-b53f-2efcd67bf0f9?api-version=2021-09-30-preview + date: Sat, 25 Sep 2021 02:31:03 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533830939_232c5ad2-7f1d-4477-8539-e4569fc2b13c?api-version=2021-09-30-preview strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '3124' + x-envoy-upstream-service-time: '3957' status: code: 202 message: Accepted @@ -32,15 +32,15 @@ interactions: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533901631_ffa972a9-035a-409e-b53f-2efcd67bf0f9?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533830939_232c5ad2-7f1d-4477-8539-e4569fc2b13c?api-version=2021-09-30-preview response: body: - string: '{"operationId": "31533901631_ffa972a9-035a-409e-b53f-2efcd67bf0f9", - "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-09-24T06:52:49Z", - "lastUpdatedDateTime": "2021-09-24T06:52:54Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/96262f9c-60bf-49b5-b9f7-7e3034810ba5?api-version=2021-09-30-preview", - "percentCompleted": 100, "result": {"docTypes": {"96262f9c-60bf-49b5-b9f7-7e3034810ba5": + string: '{"operationId": "31533830939_232c5ad2-7f1d-4477-8539-e4569fc2b13c", + "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-09-25T02:31:00Z", + "lastUpdatedDateTime": "2021-09-25T02:31:05Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/b6d14f57-68c6-4862-bfdf-cd07cc2ac422?api-version=2021-09-30-preview", + "percentCompleted": 100, "result": {"docTypes": {"b6d14f57-68c6-4862-bfdf-cd07cc2ac422": {"fieldSchema": {"Merchant": {"type": "string"}, "PhoneNumber": {"type": "string"}, "Website": {"type": "string"}, "Email": {"type": "string"}, "PurchaseOrderNumber": {"type": "string"}, "DatedAs": {"type": "string"}, "VendorName": {"type": @@ -50,21 +50,21 @@ interactions: "string"}, "Quantity": {"type": "number"}}, "fieldConfidence": {"CompanyAddress": 0.8, "CompanyName": 0.95, "CompanyPhoneNumber": 0.95, "DatedAs": 0.95, "Email": 0.8, "Merchant": 0.95, "PhoneNumber": 0.95, "PurchaseOrderNumber": 0.95, "Quantity": - 0.95, "Signature": 0.8, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": - 0.95, "Website": 0.95}}}, "modelId": "96262f9c-60bf-49b5-b9f7-7e3034810ba5", - "createdDateTime": "2021-09-24T06:52:54Z"}}' + 0.95, "Signature": 0.6, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": + 0.95, "Website": 0.95}}}, "modelId": "b6d14f57-68c6-4862-bfdf-cd07cc2ac422", + "createdDateTime": "2021-09-25T02:31:05Z"}}' headers: - apim-request-id: c0d0e40c-c8f5-43cc-8672-abee1c2b17b4 + apim-request-id: b9078bc1-72c1-4d43-9017-c256b59ab1db content-type: application/json; charset=utf-8 - date: Fri, 24 Sep 2021 06:52:56 GMT + date: Sat, 25 Sep 2021 02:31:09 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '39' + x-envoy-upstream-service-time: '51' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533901631_ffa972a9-035a-409e-b53f-2efcd67bf0f9?api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533830939_232c5ad2-7f1d-4477-8539-e4569fc2b13c?api-version=2021-09-30-preview - request: body: '!!! The request body has been omitted from the recording because its size 479269 is larger than 128KB. !!!' @@ -74,36 +74,36 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/96262f9c-60bf-49b5-b9f7-7e3034810ba5:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/b6d14f57-68c6-4862-bfdf-cd07cc2ac422:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: body: string: '' headers: - apim-request-id: e97d9d90-768a-42d7-8c0b-1bbd1021ec84 + apim-request-id: 800ebd89-ad27-4edd-bbbc-c27008f8225a content-length: '0' - date: Fri, 24 Sep 2021 06:52:58 GMT - operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/96262f9c-60bf-49b5-b9f7-7e3034810ba5/analyzeResults/e97d9d90-768a-42d7-8c0b-1bbd1021ec84?api-version=2021-09-30-preview + date: Sat, 25 Sep 2021 02:31:11 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/b6d14f57-68c6-4862-bfdf-cd07cc2ac422/analyzeResults/800ebd89-ad27-4edd-bbbc-c27008f8225a?api-version=2021-09-30-preview strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '560' + x-envoy-upstream-service-time: '1010' status: code: 202 message: Accepted - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/96262f9c-60bf-49b5-b9f7-7e3034810ba5:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/b6d14f57-68c6-4862-bfdf-cd07cc2ac422:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview - request: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/96262f9c-60bf-49b5-b9f7-7e3034810ba5/analyzeResults/e97d9d90-768a-42d7-8c0b-1bbd1021ec84?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/b6d14f57-68c6-4862-bfdf-cd07cc2ac422/analyzeResults/800ebd89-ad27-4edd-bbbc-c27008f8225a?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-24T06:52:57Z", - "lastUpdatedDateTime": "2021-09-24T06:53:00Z", "analyzeResult": {"apiVersion": - "2021-09-30-preview", "modelId": "96262f9c-60bf-49b5-b9f7-7e3034810ba5", "stringIndexType": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:31:10Z", + "lastUpdatedDateTime": "2021-09-25T02:31:13Z", "analyzeResult": {"apiVersion": + "2021-09-30-preview", "modelId": "b6d14f57-68c6-4862-bfdf-cd07cc2ac422", "stringIndexType": "unicodeCodePoint", "content": "Purchase Order\nHero Limited\nCompany Phone: 555-348-6512\nWebsite: www.herolimited.com\nEmail:\nPurchase Order\nDated As: 12/20/2020\nPurchase Order #: 948284\naccounts@herolimited.com\nShipped @@ -540,68 +540,68 @@ interactions: "length": 7}]}], "boundingRegions": [{"pageNumber": 1, "boundingBox": [1062, 1563, 1560, 1563, 1560, 1709, 1062, 1709]}], "spans": [{"offset": 706, "length": 40}]}], "styles": [{"isHandwritten": true, "confidence": 0.9, "spans": [{"offset": - 606, "length": 14}]}], "documents": [{"docType": "96262f9c-60bf-49b5-b9f7-7e3034810ba5:96262f9c-60bf-49b5-b9f7-7e3034810ba5", + 606, "length": 14}]}], "documents": [{"docType": "b6d14f57-68c6-4862-bfdf-cd07cc2ac422:b6d14f57-68c6-4862-bfdf-cd07cc2ac422", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0, 0, 1700, 0, 1700, - 2200, 0, 2200]}], "fields": {"Subtotal": {"type": "string", "valueString": + 2200, 0, 2200]}], "fields": {"CompanyPhoneNumber": {"type": "string", "valueString": + "938-294-2949", "content": "938-294-2949", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [706, 722, 882, 722, 882, 749, 706, 749]}], "confidence": + 0.95, "spans": [{"offset": 308, "length": 12}]}, "Total": {"type": "string", + "valueString": "$144.00", "content": "$144.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1427, 1669, 1527, 1669, 1527, 1698, 1427, 1698]}], "confidence": + 0.95, "spans": [{"offset": 739, "length": 7}]}, "Email": {"type": "string", + "valueString": "accounts@herolimited.com", "content": "accounts@herolimited.com", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [164, 479, 471, 479, + 471, 503, 164, 503]}], "confidence": 0.95, "spans": [{"offset": 153, "length": + 24}]}, "Merchant": {"type": "string", "valueString": "Hero Limited", "content": + "Hero Limited", "boundingRegions": [{"pageNumber": 1, "boundingBox": [620, + 204, 1058, 204, 1058, 266, 620, 266]}], "confidence": 0.95, "spans": [{"offset": + 15, "length": 12}]}, "Tax": {"type": "string", "valueString": "$4.00", "content": + "$4.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1458, 1615, + 1529, 1615, 1529, 1643, 1458, 1643]}], "confidence": 0.95, "spans": [{"offset": + 727, "length": 5}]}, "Signature": {"type": "string", "valueString": "Bernie + Sanders", "content": "Bernie Sanders", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [484, 1670, 763, 1670, 763, 1708, 484, 1708]}], "confidence": + 0.241, "spans": [{"offset": 606, "length": 14}]}, "Quantity": {"type": "number", + "valueNumber": 20, "content": "20", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [859, 1094, 887, 1094, 887, 1119, 859, 1119]}], "confidence": + 0.95, "spans": [{"offset": 498, "length": 2}]}, "VendorName": {"type": "string", + "valueString": "Hillary Swank", "content": "Hillary Swank", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [346, 609, 518, 609, 518, 639, 346, 639]}], + "confidence": 0.95, "spans": [{"offset": 202, "length": 13}]}, "CompanyName": + {"type": "string", "valueString": "Higgly Wiggly Books", "content": "Higgly + Wiggly Books", "boundingRegions": [{"pageNumber": 1, "boundingBox": [372, + 646, 628, 646, 628, 679, 372, 679]}], "confidence": 0.95, "spans": [{"offset": + 230, "length": 19}]}, "PurchaseOrderNumber": {"type": "string", "valueString": + "948284", "content": "948284", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1275, 461, 1373, 461, 1373, 489, 1275, 489]}], "confidence": 0.95, "spans": + [{"offset": 146, "length": 6}]}, "Subtotal": {"type": "string", "valueString": "$140.00", "content": "$140.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1426, 1572, 1526, 1572, 1526, 1599, 1426, 1599]}], "confidence": 0.95, "spans": - [{"offset": 715, "length": 7}]}, "Tax": {"type": "string", "valueString": - "$4.00", "content": "$4.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": - [1458, 1615, 1529, 1615, 1529, 1643, 1458, 1643]}], "confidence": 0.95, "spans": - [{"offset": 727, "length": 5}]}, "Merchant": {"type": "string", "valueString": - "Hero Limited", "content": "Hero Limited", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [620, 204, 1058, 204, 1058, 266, 620, 266]}], "confidence": - 0.95, "spans": [{"offset": 15, "length": 12}]}, "Website": {"type": "string", + [{"offset": 715, "length": 7}]}, "DatedAs": {"type": "string", "valueString": + "12/20/2020", "content": "12/20/2020", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1162, 420, 1312, 420, 1312, 449, 1162, 449]}], "confidence": + 0.95, "spans": [{"offset": 117, "length": 10}]}, "Website": {"type": "string", "valueString": "www.herolimited.com", "content": "www.herolimited.com", "boundingRegions": [{"pageNumber": 1, "boundingBox": [270, 393, 522, 393, 522, 418, 270, 418]}], - "confidence": 0.95, "spans": [{"offset": 65, "length": 19}]}, "DatedAs": {"type": - "string", "valueString": "12/20/2020", "content": "12/20/2020", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [1162, 420, 1312, 420, 1312, 449, 1162, - 449]}], "confidence": 0.95, "spans": [{"offset": 117, "length": 10}]}, "PurchaseOrderNumber": - {"type": "string", "valueString": "948284", "content": "948284", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [1275, 461, 1373, 461, 1373, 489, 1275, - 489]}], "confidence": 0.95, "spans": [{"offset": 146, "length": 6}]}, "CompanyPhoneNumber": - {"type": "string", "valueString": "938-294-2949", "content": "938-294-2949", - "boundingRegions": [{"pageNumber": 1, "boundingBox": [706, 722, 882, 722, - 882, 749, 706, 749]}], "confidence": 0.95, "spans": [{"offset": 308, "length": - 12}]}, "VendorName": {"type": "string", "valueString": "Hillary Swank", "content": - "Hillary Swank", "boundingRegions": [{"pageNumber": 1, "boundingBox": [346, - 609, 518, 609, 518, 639, 346, 639]}], "confidence": 0.95, "spans": [{"offset": - 202, "length": 13}]}, "CompanyAddress": {"type": "string", "valueString": - "938 NE Burner Road Boulder City, CO 92848", "content": "938 NE Burner Road - Boulder City, CO 92848", "boundingRegions": [{"pageNumber": 1, "boundingBox": - [271, 685, 559, 685, 559, 751, 271, 751]}], "confidence": 0.621, "spans": - [{"offset": 259, "length": 41}]}, "Quantity": {"type": "number", "valueNumber": - 20, "content": "20", "boundingRegions": [{"pageNumber": 1, "boundingBox": - [859, 1094, 887, 1094, 887, 1119, 859, 1119]}], "confidence": 0.95, "spans": - [{"offset": 498, "length": 2}]}, "CompanyName": {"type": "string", "valueString": - "Higgly Wiggly Books", "content": "Higgly Wiggly Books", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [372, 646, 628, 646, 628, 679, 372, 679]}], - "confidence": 0.95, "spans": [{"offset": 230, "length": 19}]}, "Signature": - {"type": "string", "valueString": "Bernie Sanders", "content": "Bernie Sanders", - "boundingRegions": [{"pageNumber": 1, "boundingBox": [484, 1670, 763, 1670, - 763, 1708, 484, 1708]}], "confidence": 0.433, "spans": [{"offset": 606, "length": - 14}]}, "Email": {"type": "string", "valueString": "accounts@herolimited.com", - "content": "accounts@herolimited.com", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [164, 479, 471, 479, 471, 503, 164, 503]}], "confidence": - 0.95, "spans": [{"offset": 153, "length": 24}]}, "PhoneNumber": {"type": "string", - "valueString": "555-348-6512", "content": "555-348-6512", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [363, 351, 524, 351, 524, 378, 363, 378]}], - "confidence": 0.95, "spans": [{"offset": 43, "length": 12}]}, "Total": {"type": - "string", "valueString": "$144.00", "content": "$144.00", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [1427, 1669, 1527, 1669, 1527, 1698, 1427, - 1698]}], "confidence": 0.95, "spans": [{"offset": 739, "length": 7}]}}, "confidence": - 0.924, "spans": [{"offset": 0, "length": 880}]}]}}' + "confidence": 0.95, "spans": [{"offset": 65, "length": 19}]}, "CompanyAddress": + {"type": "string", "valueString": "938 NE Burner Road Boulder City, CO 92848", + "content": "938 NE Burner Road Boulder City, CO 92848", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [271, 685, 559, 685, 559, 751, 271, 751]}], + "confidence": 0.762, "spans": [{"offset": 259, "length": 41}]}, "PhoneNumber": + {"type": "string", "valueString": "555-348-6512", "content": "555-348-6512", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [363, 351, 524, 351, + 524, 378, 363, 378]}], "confidence": 0.95, "spans": [{"offset": 43, "length": + 12}]}}, "confidence": 0.92, "spans": [{"offset": 0, "length": 880}]}]}}' headers: - apim-request-id: cb7cbe3b-ebdb-4165-9324-42c202e04fa6 + apim-request-id: c1e23f97-4446-4f21-ad48-f592ead53cc8 content-type: application/json; charset=utf-8 - date: Fri, 24 Sep 2021 06:53:03 GMT + date: Sat, 25 Sep 2021 02:31:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '439' + x-envoy-upstream-service-time: '428' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/96262f9c-60bf-49b5-b9f7-7e3034810ba5/analyzeResults/e97d9d90-768a-42d7-8c0b-1bbd1021ec84?api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/b6d14f57-68c6-4862-bfdf-cd07cc2ac422/analyzeResults/800ebd89-ad27-4edd-bbbc-c27008f8225a?api-version=2021-09-30-preview version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_layout.test_layout_specify_pages.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_layout.test_layout_specify_pages.yaml index 38cbf899e5c1..8daaa4137ae2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_layout.test_layout_specify_pages.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_layout.test_layout_specify_pages.yaml @@ -1925,7 +1925,7 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: @@ -1933,19 +1933,19 @@ interactions: string: '' headers: apim-request-id: - - 4a52cec5-d5fb-4235-9593-99b84c7dafae + - e36265cb-b553-4448-acea-12c78117caaf content-length: - '0' date: - - Fri, 17 Sep 2021 22:48:10 GMT + - Sat, 25 Sep 2021 02:29:26 GMT operation-location: - - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/4a52cec5-d5fb-4235-9593-99b84c7dafae?api-version=2021-09-30-preview + - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/e36265cb-b553-4448-acea-12c78117caaf?api-version=2021-09-30-preview strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '315' + - '310' status: code: 202 message: Accepted @@ -1959,13 +1959,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/4a52cec5-d5fb-4235-9593-99b84c7dafae?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/e36265cb-b553-4448-acea-12c78117caaf?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-17T22:48:09Z", - "lastUpdatedDateTime": "2021-09-17T22:48:13Z", "analyzeResult": {"apiVersion": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:29:25Z", + "lastUpdatedDateTime": "2021-09-25T02:29:28Z", "analyzeResult": {"apiVersion": "2021-09-30-preview", "modelId": "prebuilt-layout", "stringIndexType": "unicodeCodePoint", "content": "Company A Invoice\nInvoice For:\nAddress:\n567 Main St.\nRedmond, WA\n555-555-5555\nBilbo Baggins\n123 Hobbit Lane\nRedmond, WA\n555-555-5555\nItem\nQuantity\nPrice\nA\n1\n10.99\nB\n2\n14.67\nC\n4\n15.66\nD\n1\n12.00\nE\n4\n10.00\nF\n6\n12.00\nG\n8\n22.00\nSubtotal: @@ -2236,11 +2236,11 @@ interactions: 4.6276]}], "spans": [{"offset": 133, "length": 89}]}]}}' headers: apim-request-id: - - ab1bfb24-4966-4ef0-9295-cf876d8fe500 + - 197dc9b5-f3eb-4218-894b-b88ff7923f73 content-type: - application/json; charset=utf-8 date: - - Fri, 17 Sep 2021 22:48:15 GMT + - Sat, 25 Sep 2021 02:29:31 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -4178,27 +4178,27 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1,3&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1%2C%203&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: body: string: '' headers: apim-request-id: - - a86250d7-ea8a-427a-800a-8faa9a7d5aaf + - 475145e6-9dea-4491-9332-40c9748a6bd7 content-length: - '0' date: - - Fri, 17 Sep 2021 22:48:16 GMT + - Sat, 25 Sep 2021 02:29:34 GMT operation-location: - - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/a86250d7-ea8a-427a-800a-8faa9a7d5aaf?api-version=2021-09-30-preview + - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/475145e6-9dea-4491-9332-40c9748a6bd7?api-version=2021-09-30-preview strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1132' + - '2711' status: code: 202 message: Accepted @@ -4212,13 +4212,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/a86250d7-ea8a-427a-800a-8faa9a7d5aaf?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/475145e6-9dea-4491-9332-40c9748a6bd7?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-17T22:48:16Z", - "lastUpdatedDateTime": "2021-09-17T22:48:21Z", "analyzeResult": {"apiVersion": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:29:32Z", + "lastUpdatedDateTime": "2021-09-25T02:29:37Z", "analyzeResult": {"apiVersion": "2021-09-30-preview", "modelId": "prebuilt-layout", "stringIndexType": "unicodeCodePoint", "content": "Company A Invoice\nInvoice For:\nAddress:\n567 Main St.\nRedmond, WA\n555-555-5555\nBilbo Baggins\n123 Hobbit Lane\nRedmond, WA\n555-555-5555\nItem\nQuantity\nPrice\nA\n1\n10.99\nB\n2\n14.67\nC\n4\n15.66\nD\n1\n12.00\nE\n4\n10.00\nF\n6\n12.00\nG\n8\n22.00\nSubtotal: @@ -4755,11 +4755,11 @@ interactions: 4.6271, 0.9938, 4.6273]}], "spans": [{"offset": 462, "length": 103}]}]}}' headers: apim-request-id: - - 035454ca-5b99-4a50-875d-86c27ff26c44 + - f4e7a6f1-ec61-4f5e-9de4-ed0073fccaae content-type: - application/json; charset=utf-8 date: - - Fri, 17 Sep 2021 22:48:22 GMT + - Sat, 25 Sep 2021 02:29:39 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -4767,7 +4767,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '337' + - '304' status: code: 200 message: OK @@ -6697,7 +6697,7 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: @@ -6705,19 +6705,19 @@ interactions: string: '' headers: apim-request-id: - - c6b7a0f6-0798-4460-9cc5-19e4450b7f27 + - f4224d89-5a15-414c-a5a8-db9ac49e139d content-length: - '0' date: - - Fri, 17 Sep 2021 22:48:22 GMT + - Sat, 25 Sep 2021 02:29:39 GMT operation-location: - - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/c6b7a0f6-0798-4460-9cc5-19e4450b7f27?api-version=2021-09-30-preview + - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/f4224d89-5a15-414c-a5a8-db9ac49e139d?api-version=2021-09-30-preview strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '260' + - '296' status: code: 202 message: Accepted @@ -6731,13 +6731,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/c6b7a0f6-0798-4460-9cc5-19e4450b7f27?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/f4224d89-5a15-414c-a5a8-db9ac49e139d?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-17T22:48:23Z", - "lastUpdatedDateTime": "2021-09-17T22:48:26Z", "analyzeResult": {"apiVersion": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:29:40Z", + "lastUpdatedDateTime": "2021-09-25T02:29:42Z", "analyzeResult": {"apiVersion": "2021-09-30-preview", "modelId": "prebuilt-layout", "stringIndexType": "unicodeCodePoint", "content": "Company A Invoice\nInvoice For:\nAddress:\n567 Main St.\nRedmond, WA\n555-555-5555\nBilbo Baggins\n123 Hobbit Lane\nRedmond, WA\n555-555-5555\nItem\nQuantity\nPrice\nA\n1\n10.99\nB\n2\n14.67\nC\n4\n15.66\nD\n1\n12.00\nE\n4\n10.00\nF\n6\n12.00\nG\n8\n22.00\nSubtotal: @@ -7010,11 +7010,11 @@ interactions: 4.6276]}], "spans": [{"offset": 133, "length": 89}]}]}}' headers: apim-request-id: - - e2c7b9e1-910d-4278-9932-621ffe3ff7f8 + - f75671bc-a5cb-48fc-995d-3ce0cc4ba95c content-type: - application/json; charset=utf-8 date: - - Fri, 17 Sep 2021 22:48:27 GMT + - Sat, 25 Sep 2021 02:29:45 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -7022,7 +7022,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '174' + - '344' status: code: 200 message: OK @@ -8952,27 +8952,27 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2,3&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2%2C%203&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: body: string: '' headers: apim-request-id: - - aa2254d9-80fe-48d1-9658-31b0d90f4a9b + - 0652970a-04b3-4246-82dc-511850f6b1cf content-length: - '0' date: - - Fri, 17 Sep 2021 22:48:29 GMT + - Sat, 25 Sep 2021 02:29:48 GMT operation-location: - - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/aa2254d9-80fe-48d1-9658-31b0d90f4a9b?api-version=2021-09-30-preview + - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/0652970a-04b3-4246-82dc-511850f6b1cf?api-version=2021-09-30-preview strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1119' + - '2957' status: code: 202 message: Accepted @@ -8986,13 +8986,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/aa2254d9-80fe-48d1-9658-31b0d90f4a9b?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/0652970a-04b3-4246-82dc-511850f6b1cf?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-17T22:48:29Z", - "lastUpdatedDateTime": "2021-09-17T22:48:33Z", "analyzeResult": {"apiVersion": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:29:47Z", + "lastUpdatedDateTime": "2021-09-25T02:29:51Z", "analyzeResult": {"apiVersion": "2021-09-30-preview", "modelId": "prebuilt-layout", "stringIndexType": "unicodeCodePoint", "content": "Company A Invoice\nInvoice For:\nAddress:\n567 Main St.\nRedmond, WA\n555-555-5555\nBilbo Baggins\n123 Hobbit Lane\nRedmond, WA\n555-555-5555\nItem\nQuantity\nPrice\nA\n1\n10.99\nB\n2\n14.67\nC\n4\n15.66\nD\n1\n12.00\nE\n4\n10.00\nF\n6\n12.00\nG\n8\n22.00\nSubtotal: @@ -9531,11 +9531,11 @@ interactions: 4.6271, 0.9938, 4.6273]}], "spans": [{"offset": 462, "length": 103}]}]}}' headers: apim-request-id: - - e45eeb30-23ac-4435-93bb-8bce4c694b63 + - 2130f01c-8ca5-4fad-bd58-1e71733061a2 content-type: - application/json; charset=utf-8 date: - - Fri, 17 Sep 2021 22:48:34 GMT + - Sat, 25 Sep 2021 02:29:54 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -9543,7 +9543,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '344' + - '378' status: code: 200 message: OK diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_layout_async.test_layout_specify_pages.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_layout_async.test_layout_specify_pages.yaml index 268f78fc943a..956996d7e2a7 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_layout_async.test_layout_specify_pages.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_layout_async.test_layout_specify_pages.yaml @@ -1919,20 +1919,20 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: body: string: '' headers: - apim-request-id: 6d9a7253-d5d5-4593-8fe0-321f6a031764 + apim-request-id: 170b9983-a5b7-4418-8d67-6238af870512 content-length: '0' - date: Wed, 15 Sep 2021 21:31:43 GMT - operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/6d9a7253-d5d5-4593-8fe0-321f6a031764?api-version=2021-09-30-preview + date: Sat, 25 Sep 2021 02:30:01 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/170b9983-a5b7-4418-8d67-6238af870512?api-version=2021-09-30-preview strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '270' + x-envoy-upstream-service-time: '246' status: code: 202 message: Accepted @@ -1941,13 +1941,13 @@ interactions: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/6d9a7253-d5d5-4593-8fe0-321f6a031764?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/170b9983-a5b7-4418-8d67-6238af870512?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-15T21:31:43Z", - "lastUpdatedDateTime": "2021-09-15T21:31:46Z", "analyzeResult": {"apiVersion": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:30:02Z", + "lastUpdatedDateTime": "2021-09-25T02:30:06Z", "analyzeResult": {"apiVersion": "2021-09-30-preview", "modelId": "prebuilt-layout", "stringIndexType": "unicodeCodePoint", "content": "Company A Invoice\nInvoice For:\nAddress:\n567 Main St.\nRedmond, WA\n555-555-5555\nBilbo Baggins\n123 Hobbit Lane\nRedmond, WA\n555-555-5555\nItem\nQuantity\nPrice\nA\n1\n10.99\nB\n2\n14.67\nC\n4\n15.66\nD\n1\n12.00\nE\n4\n10.00\nF\n6\n12.00\nG\n8\n22.00\nSubtotal: @@ -2217,17 +2217,17 @@ interactions: 1, "boundingBox": [0.983, 2.9323, 7.5022, 2.9324, 7.5016, 4.6275, 0.9822, 4.6276]}], "spans": [{"offset": 133, "length": 89}]}]}}' headers: - apim-request-id: b7c1cafd-7a27-402e-a946-cbd0b0dffb0d + apim-request-id: 40852410-fd97-4f63-88a5-4b218a1cdbbe content-type: application/json; charset=utf-8 - date: Wed, 15 Sep 2021 21:31:48 GMT + date: Sat, 25 Sep 2021 02:30:08 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '201' + x-envoy-upstream-service-time: '623' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/6d9a7253-d5d5-4593-8fe0-321f6a031764?api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/170b9983-a5b7-4418-8d67-6238af870512?api-version=2021-09-30-preview - request: body: !!binary | JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFu @@ -4148,35 +4148,35 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1,3&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1,%203&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: body: string: '' headers: - apim-request-id: 893acea7-a7b9-472d-b86d-64b380bf8050 + apim-request-id: a6eb4e7f-8617-41e7-b7d7-5ce90e2ebf20 content-length: '0' - date: Wed, 15 Sep 2021 21:31:48 GMT - operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/893acea7-a7b9-472d-b86d-64b380bf8050?api-version=2021-09-30-preview + date: Sat, 25 Sep 2021 02:30:08 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/a6eb4e7f-8617-41e7-b7d7-5ce90e2ebf20?api-version=2021-09-30-preview strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '307' + x-envoy-upstream-service-time: '294' status: code: 202 message: Accepted - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1,3&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1,%203&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview - request: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/893acea7-a7b9-472d-b86d-64b380bf8050?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/a6eb4e7f-8617-41e7-b7d7-5ce90e2ebf20?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-15T21:31:49Z", - "lastUpdatedDateTime": "2021-09-15T21:31:52Z", "analyzeResult": {"apiVersion": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:30:08Z", + "lastUpdatedDateTime": "2021-09-25T02:30:11Z", "analyzeResult": {"apiVersion": "2021-09-30-preview", "modelId": "prebuilt-layout", "stringIndexType": "unicodeCodePoint", "content": "Company A Invoice\nInvoice For:\nAddress:\n567 Main St.\nRedmond, WA\n555-555-5555\nBilbo Baggins\n123 Hobbit Lane\nRedmond, WA\n555-555-5555\nItem\nQuantity\nPrice\nA\n1\n10.99\nB\n2\n14.67\nC\n4\n15.66\nD\n1\n12.00\nE\n4\n10.00\nF\n6\n12.00\nG\n8\n22.00\nSubtotal: @@ -4712,17 +4712,17 @@ interactions: [{"pageNumber": 3, "boundingBox": [0.9942, 2.9332, 7.5018, 2.9333, 7.5015, 4.6271, 0.9938, 4.6273]}], "spans": [{"offset": 462, "length": 103}]}]}}' headers: - apim-request-id: 8fcf504a-a49b-43de-998e-a3f64abdff7f + apim-request-id: adeb037a-9dfa-430a-9512-7e8f9efa2d48 content-type: application/json; charset=utf-8 - date: Wed, 15 Sep 2021 21:31:54 GMT + date: Sat, 25 Sep 2021 02:30:14 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '348' + x-envoy-upstream-service-time: '375' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/893acea7-a7b9-472d-b86d-64b380bf8050?api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/a6eb4e7f-8617-41e7-b7d7-5ce90e2ebf20?api-version=2021-09-30-preview - request: body: !!binary | JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFu @@ -6643,20 +6643,20 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: body: string: '' headers: - apim-request-id: 333ef939-7986-4add-957b-a5637259a98c + apim-request-id: 22139d23-1d60-4027-9e6a-81e98aaba85d content-length: '0' - date: Wed, 15 Sep 2021 21:31:56 GMT - operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/333ef939-7986-4add-957b-a5637259a98c?api-version=2021-09-30-preview + date: Sat, 25 Sep 2021 02:30:14 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/22139d23-1d60-4027-9e6a-81e98aaba85d?api-version=2021-09-30-preview strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '2002' + x-envoy-upstream-service-time: '315' status: code: 202 message: Accepted @@ -6665,13 +6665,13 @@ interactions: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/333ef939-7986-4add-957b-a5637259a98c?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/22139d23-1d60-4027-9e6a-81e98aaba85d?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-15T21:31:55Z", - "lastUpdatedDateTime": "2021-09-15T21:32:00Z", "analyzeResult": {"apiVersion": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:30:14Z", + "lastUpdatedDateTime": "2021-09-25T02:30:16Z", "analyzeResult": {"apiVersion": "2021-09-30-preview", "modelId": "prebuilt-layout", "stringIndexType": "unicodeCodePoint", "content": "Company A Invoice\nInvoice For:\nAddress:\n567 Main St.\nRedmond, WA\n555-555-5555\nBilbo Baggins\n123 Hobbit Lane\nRedmond, WA\n555-555-5555\nItem\nQuantity\nPrice\nA\n1\n10.99\nB\n2\n14.67\nC\n4\n15.66\nD\n1\n12.00\nE\n4\n10.00\nF\n6\n12.00\nG\n8\n22.00\nSubtotal: @@ -6943,17 +6943,17 @@ interactions: 1, "boundingBox": [0.983, 2.9323, 7.5022, 2.9324, 7.5016, 4.6275, 0.9822, 4.6276]}], "spans": [{"offset": 133, "length": 89}]}]}}' headers: - apim-request-id: eaa41431-17e9-4940-92c0-5f5cde61de56 + apim-request-id: 8e14ba10-6511-48c2-9645-4506baa0c70c content-type: application/json; charset=utf-8 - date: Wed, 15 Sep 2021 21:32:01 GMT + date: Sat, 25 Sep 2021 02:30:20 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '348' + x-envoy-upstream-service-time: '500' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/333ef939-7986-4add-957b-a5637259a98c?api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/22139d23-1d60-4027-9e6a-81e98aaba85d?api-version=2021-09-30-preview - request: body: !!binary | JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFu @@ -8874,35 +8874,35 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2,3&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2,%203&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: body: string: '' headers: - apim-request-id: b92b8341-62f5-4bbf-8557-1043791ab5ae + apim-request-id: 78807494-d0ad-4f4c-abeb-1c86bca31340 content-length: '0' - date: Wed, 15 Sep 2021 21:32:02 GMT - operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/b92b8341-62f5-4bbf-8557-1043791ab5ae?api-version=2021-09-30-preview + date: Sat, 25 Sep 2021 02:30:20 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/78807494-d0ad-4f4c-abeb-1c86bca31340?api-version=2021-09-30-preview strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '463' + x-envoy-upstream-service-time: '388' status: code: 202 message: Accepted - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2,3&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout:analyze?pages=1-2,%203&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview - request: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/b92b8341-62f5-4bbf-8557-1043791ab5ae?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/78807494-d0ad-4f4c-abeb-1c86bca31340?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-15T21:32:02Z", - "lastUpdatedDateTime": "2021-09-15T21:32:06Z", "analyzeResult": {"apiVersion": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:30:20Z", + "lastUpdatedDateTime": "2021-09-25T02:30:24Z", "analyzeResult": {"apiVersion": "2021-09-30-preview", "modelId": "prebuilt-layout", "stringIndexType": "unicodeCodePoint", "content": "Company A Invoice\nInvoice For:\nAddress:\n567 Main St.\nRedmond, WA\n555-555-5555\nBilbo Baggins\n123 Hobbit Lane\nRedmond, WA\n555-555-5555\nItem\nQuantity\nPrice\nA\n1\n10.99\nB\n2\n14.67\nC\n4\n15.66\nD\n1\n12.00\nE\n4\n10.00\nF\n6\n12.00\nG\n8\n22.00\nSubtotal: @@ -9440,15 +9440,15 @@ interactions: [{"pageNumber": 3, "boundingBox": [0.9942, 2.9332, 7.5018, 2.9333, 7.5015, 4.6271, 0.9938, 4.6273]}], "spans": [{"offset": 462, "length": 103}]}]}}' headers: - apim-request-id: 75738128-0304-46cc-8482-5180feb60f97 + apim-request-id: 792aabf5-40ef-47a6-89cb-eacc24c752a5 content-type: application/json; charset=utf-8 - date: Wed, 15 Sep 2021 21:32:08 GMT + date: Sat, 25 Sep 2021 02:30:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '369' + x-envoy-upstream-service-time: '562' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/b92b8341-62f5-4bbf-8557-1043791ab5ae?api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-layout/analyzeResults/78807494-d0ad-4f4c-abeb-1c86bca31340?api-version=2021-09-30-preview version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt.test_pages_kwarg_specified.yaml index ef75ab85ab63..595f12c2717c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt.test_pages_kwarg_specified.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt.test_pages_kwarg_specified.yaml @@ -14,7 +14,7 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: @@ -22,19 +22,19 @@ interactions: string: '' headers: apim-request-id: - - bed76bb0-10f0-42cd-9593-7885a522ccca + - 2cb56139-658d-465e-bcfb-a1a06d60c646 content-length: - '0' date: - - Tue, 14 Sep 2021 22:16:26 GMT + - Sat, 25 Sep 2021 02:32:06 GMT operation-location: - - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/bed76bb0-10f0-42cd-9593-7885a522ccca?api-version=2021-09-30-preview + - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/2cb56139-658d-465e-bcfb-a1a06d60c646?api-version=2021-09-30-preview strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '344' + - '356' status: code: 202 message: Accepted @@ -48,13 +48,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/bed76bb0-10f0-42cd-9593-7885a522ccca?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/2cb56139-658d-465e-bcfb-a1a06d60c646?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-14T22:16:26Z", - "lastUpdatedDateTime": "2021-09-14T22:16:30Z", "analyzeResult": {"apiVersion": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:32:07Z", + "lastUpdatedDateTime": "2021-09-25T02:32:10Z", "analyzeResult": {"apiVersion": "2021-09-30-preview", "modelId": "prebuilt-receipt", "stringIndexType": "unicodeCodePoint", "content": "Contoso\nContoso\n123 Main Street\nRedmond, WA 98052\n987-654-3210\n6/10/2019 13:59\nSales Associate: Paul\n-\n1 Cappuccino\n1 BACON & EGGS\n$2.20\nSunny-side-up\n$9.5\n-\nSub-Total\n$ @@ -218,11 +218,11 @@ interactions: "length": 208}]}]}}' headers: apim-request-id: - - 0226fdee-8dd1-4626-8bd9-d5a1222bb35e + - 0b989b6a-5227-4386-b01b-520e8743a4ba content-type: - application/json; charset=utf-8 date: - - Tue, 14 Sep 2021 22:16:31 GMT + - Sat, 25 Sep 2021 02:32:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -230,7 +230,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '161' + - '149' status: code: 200 message: OK diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_async.test_pages_kwarg_specified.yaml index ce975ce42633..65de44f3f9b2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_async.test_pages_kwarg_specified.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_async.test_pages_kwarg_specified.yaml @@ -8,20 +8,20 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: body: string: '' headers: - apim-request-id: dd0992fe-c32e-4d17-955f-94e9fed49f38 + apim-request-id: 97e37d9f-d516-4caf-ac4c-b7f72a1af9be content-length: '0' - date: Tue, 14 Sep 2021 22:17:55 GMT - operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/dd0992fe-c32e-4d17-955f-94e9fed49f38?api-version=2021-09-30-preview + date: Sat, 25 Sep 2021 02:32:20 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/97e37d9f-d516-4caf-ac4c-b7f72a1af9be?api-version=2021-09-30-preview strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '325' + x-envoy-upstream-service-time: '412' status: code: 202 message: Accepted @@ -30,13 +30,13 @@ interactions: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/dd0992fe-c32e-4d17-955f-94e9fed49f38?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/97e37d9f-d516-4caf-ac4c-b7f72a1af9be?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-14T22:17:56Z", - "lastUpdatedDateTime": "2021-09-14T22:17:59Z", "analyzeResult": {"apiVersion": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:32:20Z", + "lastUpdatedDateTime": "2021-09-25T02:32:23Z", "analyzeResult": {"apiVersion": "2021-09-30-preview", "modelId": "prebuilt-receipt", "stringIndexType": "unicodeCodePoint", "content": "Contoso\nContoso\n123 Main Street\nRedmond, WA 98052\n987-654-3210\n6/10/2019 13:59\nSales Associate: Paul\n-\n1 Cappuccino\n1 BACON & EGGS\n$2.20\nSunny-side-up\n$9.5\n-\nSub-Total\n$ @@ -199,15 +199,15 @@ interactions: [{"offset": 73, "length": 5}]}}, "confidence": 1, "spans": [{"offset": 0, "length": 208}]}]}}' headers: - apim-request-id: a607f8e5-1bce-4290-b593-16d8ed80636a + apim-request-id: 5988ce10-6b27-48a1-a724-9b956bab4c32 content-type: application/json; charset=utf-8 - date: Tue, 14 Sep 2021 22:18:00 GMT + date: Sat, 25 Sep 2021 02:32:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '157' + x-envoy-upstream-service-time: '223' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/dd0992fe-c32e-4d17-955f-94e9fed49f38?api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/97e37d9f-d516-4caf-ac4c-b7f72a1af9be?api-version=2021-09-30-preview version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url.test_pages_kwarg_specified.yaml index b42bf6149191..7635c0bbad42 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url.test_pages_kwarg_specified.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url.test_pages_kwarg_specified.yaml @@ -21,19 +21,19 @@ interactions: string: '' headers: apim-request-id: - - 8579bca1-723f-48bb-8ccc-07c8dd92b56c + - 20128ffe-58b7-444d-b9ad-f9d83bc33c56 content-length: - '0' date: - - Tue, 14 Sep 2021 00:24:51 GMT + - Sat, 25 Sep 2021 02:32:34 GMT operation-location: - - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/8579bca1-723f-48bb-8ccc-07c8dd92b56c?api-version=2021-09-30-preview + - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/20128ffe-58b7-444d-b9ad-f9d83bc33c56?api-version=2021-09-30-preview strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '922' + - '852' status: code: 202 message: Accepted @@ -49,11 +49,11 @@ interactions: User-Agent: - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/8579bca1-723f-48bb-8ccc-07c8dd92b56c?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/20128ffe-58b7-444d-b9ad-f9d83bc33c56?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-14T00:24:51Z", - "lastUpdatedDateTime": "2021-09-14T00:24:54Z", "analyzeResult": {"apiVersion": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:32:34Z", + "lastUpdatedDateTime": "2021-09-25T02:32:38Z", "analyzeResult": {"apiVersion": "2021-09-30-preview", "modelId": "prebuilt-receipt", "stringIndexType": "unicodeCodePoint", "content": "Contoso\nContoso\n123 Main Street\nRedmond, WA 98052\n987-654-3210\n6/10/2019 13:59\nSales Associate: Paul\n-\n1 Cappuccino\n1 BACON & EGGS\n$2.20\nSunny-side-up\n$9.5\n-\nSub-Total\n$ @@ -217,11 +217,11 @@ interactions: "length": 208}]}]}}' headers: apim-request-id: - - 74ea5aa6-0ecd-487b-b365-abe9e6c52344 + - 4f8a3642-f530-40d8-97d3-2d7f8bfae2cd content-type: - application/json; charset=utf-8 date: - - Tue, 14 Sep 2021 00:24:56 GMT + - Sat, 25 Sep 2021 02:32:39 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -229,7 +229,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '161' + - '157' status: code: 200 message: OK diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url_async.test_pages_kwarg_specified.yaml index 25acaaaf7369..ef1c4d4b06d6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url_async.test_pages_kwarg_specified.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url_async.test_pages_kwarg_specified.yaml @@ -16,13 +16,13 @@ interactions: body: string: '' headers: - apim-request-id: 99326ed3-bcc8-45e4-bd76-66c4a4843f88 + apim-request-id: c3210ccc-1197-497a-8928-191b9504f242 content-length: '0' - date: Tue, 14 Sep 2021 00:27:57 GMT - operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/99326ed3-bcc8-45e4-bd76-66c4a4843f88?api-version=2021-09-30-preview + date: Sat, 25 Sep 2021 02:32:46 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/c3210ccc-1197-497a-8928-191b9504f242?api-version=2021-09-30-preview strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '736' + x-envoy-upstream-service-time: '758' status: code: 202 message: Accepted @@ -33,11 +33,11 @@ interactions: User-Agent: - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/99326ed3-bcc8-45e4-bd76-66c4a4843f88?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/c3210ccc-1197-497a-8928-191b9504f242?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-14T00:27:58Z", - "lastUpdatedDateTime": "2021-09-14T00:28:01Z", "analyzeResult": {"apiVersion": + string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:32:46Z", + "lastUpdatedDateTime": "2021-09-25T02:32:51Z", "analyzeResult": {"apiVersion": "2021-09-30-preview", "modelId": "prebuilt-receipt", "stringIndexType": "unicodeCodePoint", "content": "Contoso\nContoso\n123 Main Street\nRedmond, WA 98052\n987-654-3210\n6/10/2019 13:59\nSales Associate: Paul\n-\n1 Cappuccino\n1 BACON & EGGS\n$2.20\nSunny-side-up\n$9.5\n-\nSub-Total\n$ @@ -200,15 +200,15 @@ interactions: [{"offset": 73, "length": 5}]}}, "confidence": 1, "spans": [{"offset": 0, "length": 208}]}]}}' headers: - apim-request-id: a9dc93d8-7532-4330-b786-020796375b4f + apim-request-id: 8bb082f6-dbac-4886-a148-3c9dbcdbb1bb content-type: application/json; charset=utf-8 - date: Tue, 14 Sep 2021 00:28:03 GMT + date: Sat, 25 Sep 2021 02:32:51 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '188' + x-envoy-upstream-service-time: '237' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/99326ed3-bcc8-45e4-bd76-66c4a4843f88?api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-receipt/analyzeResults/c3210ccc-1197-497a-8928-191b9504f242?api-version=2021-09-30-preview version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_compose_model.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_compose_model.py index 6cd5cf63a976..28a0c54a8a9e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_compose_model.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_compose_model.py @@ -10,7 +10,7 @@ import time from azure.core.exceptions import ClientAuthenticationError, HttpResponseError from azure.ai.formrecognizer import FormTrainingClient, DocumentModelAdministrationClient, CustomFormModel, DocumentModel -from azure.ai.formrecognizer._generated.models import GetOperationResponse, ModelInfo +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import GetOperationResponse, ModelInfo from testcase import FormRecognizerTest from preparers import GlobalClientPreparer as _GlobalClientPreparer from preparers import FormRecognizerPreparer diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_compose_model_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_compose_model_async.py index 9cf8df8aabda..6e0e047ab253 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_compose_model_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_compose_model_async.py @@ -11,7 +11,7 @@ from azure.core.exceptions import ClientAuthenticationError, HttpResponseError from azure.ai.formrecognizer.aio import FormTrainingClient, DocumentModelAdministrationClient from azure.ai.formrecognizer import CustomFormModel, DocumentModel -from azure.ai.formrecognizer._generated.models import GetOperationResponse, ModelInfo +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import GetOperationResponse, ModelInfo from preparers import FormRecognizerPreparer from preparers import GlobalClientPreparer as _GlobalClientPreparer from asynctestcase import AsyncFormRecognizerTest diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content.py index a0ed18eee872..dabb4cd32b81 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content.py @@ -9,7 +9,7 @@ from io import BytesIO from azure.core.exceptions import ServiceRequestError, ClientAuthenticationError, HttpResponseError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult from azure.ai.formrecognizer._response_handlers import prepare_content_result from azure.ai.formrecognizer import FormRecognizerClient, FormContentType, FormRecognizerApiVersion from testcase import FormRecognizerTest diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_async.py index e00a98718426..aa8c64218256 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_async.py @@ -9,7 +9,7 @@ from io import BytesIO from azure.core.exceptions import ServiceRequestError, ClientAuthenticationError, HttpResponseError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult from azure.ai.formrecognizer._response_handlers import prepare_content_result from azure.ai.formrecognizer.aio import FormRecognizerClient from azure.ai.formrecognizer import FormContentType, FormRecognizerApiVersion diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url.py index 26ffd00b9a96..3286ba4ed050 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url.py @@ -8,7 +8,7 @@ import functools from azure.core.exceptions import HttpResponseError, ServiceRequestError, ClientAuthenticationError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult from azure.ai.formrecognizer._response_handlers import prepare_content_result from azure.ai.formrecognizer import FormRecognizerClient, FormRecognizerApiVersion from testcase import FormRecognizerTest diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url_async.py index 45921afa721c..d5ce37f82430 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url_async.py @@ -8,7 +8,7 @@ import functools from azure.core.exceptions import HttpResponseError, ServiceRequestError, ClientAuthenticationError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult from azure.ai.formrecognizer._response_handlers import prepare_content_result from azure.ai.formrecognizer.aio import FormRecognizerClient from azure.ai.formrecognizer import FormRecognizerApiVersion diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model.py index 00306b664f9f..17f4ca24f3b8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model.py @@ -8,7 +8,7 @@ import uuid import functools from azure.core.exceptions import HttpResponseError -from azure.ai.formrecognizer._generated.models import GetOperationResponse, ModelInfo +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import GetOperationResponse, ModelInfo from azure.ai.formrecognizer import CustomFormModel, DocumentModel from azure.ai.formrecognizer import FormTrainingClient, DocumentModelAdministrationClient from testcase import FormRecognizerTest diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model_async.py index 51f2d2aaaed1..89bb2ed71507 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_copy_model_async.py @@ -8,7 +8,7 @@ import functools import uuid from azure.core.exceptions import HttpResponseError -from azure.ai.formrecognizer._generated.models import GetOperationResponse, ModelInfo +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import GetOperationResponse, ModelInfo from azure.ai.formrecognizer import CustomFormModel, DocumentModel from azure.ai.formrecognizer.aio import FormTrainingClient, DocumentModelAdministrationClient from preparers import FormRecognizerPreparer diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py index ea82ce24f266..16da9ce71f5f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py @@ -8,7 +8,8 @@ import functools from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import FormRecognizerClient, FormContentType, FormTrainingClient, _models, DocumentAnalysisClient, DocumentModelAdministrationClient, AnalyzeResult -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult, AnalyzeResultOperation +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import AnalyzeResultOperation from azure.ai.formrecognizer._response_handlers import prepare_form_result from testcase import FormRecognizerTest from preparers import GlobalClientPreparer as _GlobalClientPreparer @@ -460,7 +461,7 @@ def test_pages_kwarg_specified(self, client, formrecognizer_storage_container_sa build_poller = client.begin_build_model(formrecognizer_storage_container_sas_url) model = build_poller.result() - poller = fr_client.begin_analyze_document(model.model_id, myfile, pages=["1"]) + poller = fr_client.begin_analyze_document(model.model_id, myfile, pages="1") assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] result = poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py index 0b83d9d03cd8..a9713e32c8f3 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py @@ -9,7 +9,8 @@ from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import FormContentType, _models from azure.ai.formrecognizer.aio import FormRecognizerClient, FormTrainingClient, DocumentAnalysisClient, DocumentModelAdministrationClient -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult, AnalyzeResultOperation +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import AnalyzeResultOperation from azure.ai.formrecognizer import AnalyzeResult from azure.ai.formrecognizer._response_handlers import prepare_form_result from preparers import FormRecognizerPreparer @@ -409,7 +410,7 @@ async def test_pages_kwarg_specified(self, client, formrecognizer_storage_contai model = await build_poller.result() async with fr_client: - poller = await fr_client.begin_analyze_document(model.model_id, myfile, pages=["1"]) + poller = await fr_client.begin_analyze_document(model.model_id, myfile, pages="1") assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] result = await poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py index 79c5905475e5..82cc7a821725 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py @@ -9,7 +9,8 @@ from azure.core.credentials import AzureKeyCredential from azure.core.exceptions import HttpResponseError, ServiceRequestError, ClientAuthenticationError from azure.ai.formrecognizer import FormRecognizerClient, FormTrainingClient, DocumentAnalysisClient, DocumentModelAdministrationClient, AnalyzeResult -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult, AnalyzeResultOperation +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import AnalyzeResultOperation from azure.ai.formrecognizer._response_handlers import prepare_form_result from testcase import FormRecognizerTest from preparers import GlobalClientPreparer as _GlobalClientPreparer diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py index a50615a8fabe..bb6fedb2e960 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py @@ -8,7 +8,8 @@ import functools from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer.aio import FormRecognizerClient, FormTrainingClient, DocumentAnalysisClient, DocumentModelAdministrationClient -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult, AnalyzeResultOperation +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import AnalyzeResultOperation from azure.ai.formrecognizer._response_handlers import prepare_form_result from azure.ai.formrecognizer import AnalyzeResult from preparers import FormRecognizerPreparer diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents.py index 8ccb5e9e2413..eec7e0516860 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents.py @@ -10,7 +10,7 @@ from datetime import date, time from azure.core.exceptions import ServiceRequestError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult from azure.ai.formrecognizer._response_handlers import prepare_prebuilt_models from azure.ai.formrecognizer import FormRecognizerClient, FormRecognizerApiVersion, DocumentAnalysisClient from testcase import FormRecognizerTest diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents_async.py index 23fd2a2dd995..371bcaaa6be7 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents_async.py @@ -10,7 +10,7 @@ from datetime import date, time from azure.core.exceptions import ServiceRequestError, HttpResponseError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult from azure.ai.formrecognizer._response_handlers import prepare_prebuilt_models from azure.ai.formrecognizer.aio import FormRecognizerClient, DocumentAnalysisClient from azure.ai.formrecognizer import FormContentType, FormRecognizerApiVersion diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents_from_url.py index fc5c8841ad3f..48ae162b1ff2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents_from_url.py @@ -8,7 +8,7 @@ import functools from datetime import date from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult from azure.ai.formrecognizer._response_handlers import prepare_prebuilt_models from azure.ai.formrecognizer import FormRecognizerClient, FormRecognizerApiVersion, DocumentAnalysisClient from testcase import FormRecognizerTest diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents_from_url_async.py index e7b60d16f33c..b3d0aa8fce55 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_identity_documents_from_url_async.py @@ -8,7 +8,7 @@ import functools from datetime import date from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult from azure.ai.formrecognizer._response_handlers import prepare_prebuilt_models from azure.ai.formrecognizer import FormRecognizerApiVersion from azure.ai.formrecognizer.aio import FormRecognizerClient, DocumentAnalysisClient diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice.py index 7a0227d4d0ed..acd0b7e34438 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice.py @@ -10,7 +10,8 @@ from datetime import date from azure.core.exceptions import ServiceRequestError, HttpResponseError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult, AnalyzeResultOperation +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import AnalyzeResultOperation from azure.ai.formrecognizer._response_handlers import prepare_prebuilt_models from azure.ai.formrecognizer import FormRecognizerClient, FormContentType, FormRecognizerApiVersion, DocumentAnalysisClient, AnalyzeResult from testcase import FormRecognizerTest diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_async.py index 8744dea15340..3797161d107e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_async.py @@ -10,7 +10,8 @@ from datetime import date from azure.core.exceptions import ServiceRequestError, HttpResponseError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult, AnalyzeResultOperation +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import AnalyzeResultOperation from azure.ai.formrecognizer._response_handlers import prepare_prebuilt_models from azure.ai.formrecognizer.aio import FormRecognizerClient, DocumentAnalysisClient from azure.ai.formrecognizer import FormContentType, FormRecognizerApiVersion, AnalyzeResult diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url.py index 4a4f8d6bc67f..ea89d998fd5d 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url.py @@ -9,7 +9,7 @@ from datetime import date from azure.core.exceptions import HttpResponseError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult from azure.ai.formrecognizer._response_handlers import prepare_prebuilt_models from azure.ai.formrecognizer import FormRecognizerClient, FormRecognizerApiVersion, DocumentAnalysisClient from testcase import FormRecognizerTest diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url_async.py index 63d7a53b810a..8a9dda6aa288 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url_async.py @@ -9,7 +9,7 @@ from datetime import date from azure.core.exceptions import HttpResponseError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult from azure.ai.formrecognizer._response_handlers import prepare_prebuilt_models from azure.ai.formrecognizer import FormRecognizerApiVersion from azure.ai.formrecognizer.aio import FormRecognizerClient, DocumentAnalysisClient diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_layout.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_layout.py index 03455aa22654..70d2f789315b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_layout.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_layout.py @@ -5,7 +5,7 @@ # ------------------------------------ import functools -from azure.ai.formrecognizer._generated.models import AnalyzeResultOperation +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import AnalyzeResultOperation from azure.ai.formrecognizer import DocumentAnalysisClient from azure.ai.formrecognizer import AnalyzeResult from preparers import FormRecognizerPreparer @@ -141,18 +141,18 @@ def test_layout_specify_pages(self, client): with open(self.multipage_invoice_pdf, "rb") as fd: document = fd.read() - poller = client.begin_analyze_document("prebuilt-layout", document, pages=["1"]) + poller = client.begin_analyze_document("prebuilt-layout", document, pages="1") result = poller.result() assert len(result.pages) == 1 - poller = client.begin_analyze_document("prebuilt-layout", document, pages=["1", "3"]) + poller = client.begin_analyze_document("prebuilt-layout", document, pages="1, 3") result = poller.result() assert len(result.pages) == 2 - poller = client.begin_analyze_document("prebuilt-layout", document, pages=["1-2"]) + poller = client.begin_analyze_document("prebuilt-layout", document, pages="1-2") result = poller.result() assert len(result.pages) == 2 - poller = client.begin_analyze_document("prebuilt-layout", document, pages=["1-2", "3"]) + poller = client.begin_analyze_document("prebuilt-layout", document, pages="1-2, 3") result = poller.result() assert len(result.pages) == 3 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_layout_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_layout_async.py index 377364b80c5b..7adf3c417316 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_layout_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_layout_async.py @@ -5,7 +5,7 @@ # ------------------------------------ import functools -from azure.ai.formrecognizer._generated.models import AnalyzeResultOperation +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import AnalyzeResultOperation from azure.ai.formrecognizer.aio import FormRecognizerClient, DocumentAnalysisClient from azure.ai.formrecognizer import AnalyzeResult from preparers import FormRecognizerPreparer @@ -147,18 +147,18 @@ async def test_layout_specify_pages(self, client): document = fd.read() async with client: - poller = await client.begin_analyze_document("prebuilt-layout", document, pages=["1"]) + poller = await client.begin_analyze_document("prebuilt-layout", document, pages="1") result = await poller.result() assert len(result.pages) == 1 - poller = await client.begin_analyze_document("prebuilt-layout", document, pages=["1", "3"]) + poller = await client.begin_analyze_document("prebuilt-layout", document, pages="1, 3") result = await poller.result() assert len(result.pages) == 2 - poller = await client.begin_analyze_document("prebuilt-layout", document, pages=["1-2"]) + poller = await client.begin_analyze_document("prebuilt-layout", document, pages="1-2") result = await poller.result() assert len(result.pages) == 2 - poller = await client.begin_analyze_document("prebuilt-layout", document, pages=["1-2", "3"]) + poller = await client.begin_analyze_document("prebuilt-layout", document, pages="1-2, 3") result = await poller.result() assert len(result.pages) == 3 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt.py index 3eb31b5aa00e..68e399005f9b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt.py @@ -10,7 +10,8 @@ from datetime import date, time from azure.core.exceptions import ClientAuthenticationError, ServiceRequestError, HttpResponseError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult, AnalyzeResultOperation +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import AnalyzeResultOperation from azure.ai.formrecognizer._response_handlers import prepare_prebuilt_models from azure.ai.formrecognizer import DocumentAnalysisClient, FormRecognizerClient, FormContentType, FormRecognizerApiVersion, AnalyzeResult from testcase import FormRecognizerTest @@ -410,7 +411,7 @@ def test_pages_kwarg_specified(self, client): with open(self.receipt_jpg, "rb") as fd: receipt = fd.read() - poller = client.begin_analyze_document("prebuilt-receipt", receipt, pages=["1"]) + poller = client.begin_analyze_document("prebuilt-receipt", receipt, pages="1") assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] result = poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_async.py index becd1cd9ecd3..538432c44bcf 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_async.py @@ -10,7 +10,8 @@ from datetime import date, time from azure.core.exceptions import ServiceRequestError, ClientAuthenticationError, HttpResponseError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult, AnalyzeResultOperation +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import AnalyzeResultOperation from azure.ai.formrecognizer._response_handlers import prepare_prebuilt_models from azure.ai.formrecognizer.aio import FormRecognizerClient, DocumentAnalysisClient from azure.ai.formrecognizer import FormContentType, FormRecognizerApiVersion, AnalyzeResult @@ -424,7 +425,7 @@ async def test_pages_kwarg_specified(self, client): with open(self.receipt_jpg, "rb") as fd: receipt = fd.read() async with client: - poller = await client.begin_analyze_document("prebuilt-receipt", receipt, pages=["1"]) + poller = await client.begin_analyze_document("prebuilt-receipt", receipt, pages="1") assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] result = await poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url.py index ebb48e976b54..da50faad515b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url.py @@ -9,7 +9,8 @@ from datetime import date, time from azure.core.exceptions import HttpResponseError, ServiceRequestError, ClientAuthenticationError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult, AnalyzeResultOperation +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import AnalyzeResultOperation from azure.ai.formrecognizer._response_handlers import prepare_prebuilt_models from azure.ai.formrecognizer import FormRecognizerClient, FormRecognizerApiVersion, DocumentAnalysisClient, AnalyzeResult from testcase import FormRecognizerTest @@ -315,7 +316,7 @@ def test_receipt_locale_v2(self, client): @FormRecognizerPreparer() @GlobalClientPreparer() def test_pages_kwarg_specified(self, client): - poller = client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg, pages=["1"]) + poller = client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg, pages="1") assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] result = poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url_async.py index 0748c57c7bfa..14737014a0f0 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url_async.py @@ -9,7 +9,8 @@ from datetime import date, time from azure.core.exceptions import HttpResponseError, ServiceRequestError, ClientAuthenticationError from azure.core.credentials import AzureKeyCredential -from azure.ai.formrecognizer._generated.models import AnalyzeOperationResult, AnalyzeResultOperation +from azure.ai.formrecognizer._generated.v2_1.models import AnalyzeOperationResult +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import AnalyzeResultOperation from azure.ai.formrecognizer._response_handlers import prepare_prebuilt_models from azure.ai.formrecognizer import FormRecognizerApiVersion, AnalyzeResult from azure.ai.formrecognizer.aio import FormRecognizerClient, DocumentAnalysisClient @@ -351,7 +352,7 @@ async def test_receipt_locale_v2(self, client): @GlobalClientPreparer() async def test_pages_kwarg_specified(self, client): async with client: - poller = await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg, pages=["1"]) + poller = await client.begin_analyze_document_from_url("prebuilt-receipt", self.receipt_url_jpg, pages="1") assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] result = await poller.result() assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_resolve_elements.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_resolve_elements.py index 9f75ce6292c0..3a8f5a2d7b66 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_resolve_elements.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_resolve_elements.py @@ -11,7 +11,6 @@ from testcase import FormRecognizerTest -@pytest.mark.skip class TestResolveElements(FormRecognizerTest): def test_word_reference(self): diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training.py index e9111a756da4..7a3e8e632dac 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training.py @@ -12,7 +12,7 @@ import functools from azure.core.credentials import AzureKeyCredential from azure.core.exceptions import ClientAuthenticationError, HttpResponseError -from azure.ai.formrecognizer._generated.models import GetOperationResponse, ModelInfo +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import GetOperationResponse, ModelInfo from azure.ai.formrecognizer._models import CustomFormModel, DocumentModel from azure.ai.formrecognizer import FormTrainingClient, DocumentModelAdministrationClient, _models from testcase import FormRecognizerTest diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training_async.py index 0d89b743e22e..1685b68379f9 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training_async.py @@ -12,7 +12,7 @@ import functools from azure.core.credentials import AzureKeyCredential from azure.core.exceptions import ClientAuthenticationError, HttpResponseError -from azure.ai.formrecognizer._generated.models import GetOperationResponse, ModelInfo +from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import GetOperationResponse, ModelInfo from azure.ai.formrecognizer._models import CustomFormModel, DocumentModel from azure.ai.formrecognizer.aio import FormTrainingClient, DocumentModelAdministrationClient from azure.ai.formrecognizer import _models