diff --git a/sdk/documenttranslation/azure-ai-documenttranslation/azure/ai/documenttranslation/_client.py b/sdk/documenttranslation/azure-ai-documenttranslation/azure/ai/documenttranslation/_client.py index 93bdd6adbabb..a84a3e1e55f5 100644 --- a/sdk/documenttranslation/azure-ai-documenttranslation/azure/ai/documenttranslation/_client.py +++ b/sdk/documenttranslation/azure-ai-documenttranslation/azure/ai/documenttranslation/_client.py @@ -214,13 +214,6 @@ def list_submitted_jobs(self, **kwargs): # type: (**Any) -> ItemPaged[JobStatusResult] """List all the submitted translation jobs under the Document Translation resource. - :keyword int top: Use top to indicate the total number of results you want - to be returned across all pages. - :keyword int skip: Use skip to indicate the number of results to skip from the list - of jobs held by the server based on the sorting method specified. By default, - this is sorted by descending start time. - :keyword int results_per_page: Use results_per_page to indicate the maximum number - of results returned in a page. :return: ~azure.core.paging.ItemPaged[:class:`~azure.ai.documenttranslation.JobStatusResult`] :rtype: ~azure.core.paging.ItemPaged :raises ~azure.core.exceptions.HttpResponseError: @@ -235,9 +228,6 @@ def list_submitted_jobs(self, **kwargs): :caption: List all submitted jobs under the resource. """ - skip = kwargs.pop('skip', None) - results_per_page = kwargs.pop('results_per_page', None) - def _convert_from_generated_model(generated_model): # pylint: disable=protected-access return JobStatusResult._from_generated(generated_model) # pylint: disable=protected-access @@ -248,8 +238,6 @@ def _convert_from_generated_model(generated_model): # pylint: disable=protected ]) return self._client.document_translation.get_operations( - top=results_per_page, - skip=skip, cls=model_conversion_function, **kwargs ) @@ -260,13 +248,6 @@ def list_all_document_statuses(self, job_id, **kwargs): """List all the document statuses under a translation job. :param str job_id: The translation job ID. - :keyword int top: Use top to indicate the total number of results you want - to be returned across all pages. - :keyword int skip: Use skip to indicate the number of results to skip from the list - of document statuses held by the server based on the sorting method specified. By default, - this is sorted by descending start time. - :keyword int results_per_page: Use results_per_page to indicate the maximum number - of results returned in a page. :return: ~azure.core.paging.ItemPaged[:class:`~azure.ai.documenttranslation.DocumentStatusResult`] :rtype: ~azure.core.paging.ItemPaged :raises ~azure.core.exceptions.HttpResponseError: @@ -281,9 +262,6 @@ def list_all_document_statuses(self, job_id, **kwargs): :caption: List all the document statuses under the translation job. """ - skip = kwargs.pop('skip', None) - results_per_page = kwargs.pop('results_per_page', None) - def _convert_from_generated_model(generated_model): return DocumentStatusResult._from_generated(generated_model) # pylint: disable=protected-access @@ -295,13 +273,10 @@ def _convert_from_generated_model(generated_model): return self._client.document_translation.get_operation_documents_status( id=job_id, - top=results_per_page, - skip=skip, cls=model_conversion_function, **kwargs ) - @distributed_trace def get_document_status(self, job_id, document_id, **kwargs): # type: (str, str, **Any) -> DocumentStatusResult diff --git a/sdk/documenttranslation/azure-ai-documenttranslation/azure/ai/documenttranslation/_models.py b/sdk/documenttranslation/azure-ai-documenttranslation/azure/ai/documenttranslation/_models.py index 661924541dcd..4e1f8646bd33 100644 --- a/sdk/documenttranslation/azure-ai-documenttranslation/azure/ai/documenttranslation/_models.py +++ b/sdk/documenttranslation/azure-ai-documenttranslation/azure/ai/documenttranslation/_models.py @@ -379,6 +379,8 @@ class FileFormat(object): # pylint: disable=useless-object-inheritance, R0903 :vartype content_types: list[str] :ivar format_versions: Supported Version. :vartype format_versions: list[str] + :ivar default_format_version: Default format version if none is specified. + :vartype default_format_version: str """ def __init__( @@ -390,6 +392,7 @@ def __init__( self.file_extensions = kwargs.get('file_extensions', None) self.content_types = kwargs.get('content_types', None) self.format_versions = kwargs.get('format_versions', None) + self.default_format_version = kwargs.get('default_format_version', None) @classmethod def _from_generated(cls, file_format): @@ -397,7 +400,8 @@ def _from_generated(cls, file_format): file_format=file_format.format, file_extensions=file_format.file_extensions, content_types=file_format.content_types, - format_versions=file_format.versions + format_versions=file_format.versions, + default_format_version=file_format.default_version ) @staticmethod diff --git a/sdk/documenttranslation/azure-ai-documenttranslation/azure/ai/documenttranslation/aio/_client_async.py b/sdk/documenttranslation/azure-ai-documenttranslation/azure/ai/documenttranslation/aio/_client_async.py index c18a7b736947..94f8c48c42e2 100644 --- a/sdk/documenttranslation/azure-ai-documenttranslation/azure/ai/documenttranslation/aio/_client_async.py +++ b/sdk/documenttranslation/azure-ai-documenttranslation/azure/ai/documenttranslation/aio/_client_async.py @@ -215,13 +215,6 @@ def list_submitted_jobs(self, **kwargs): # type: (**Any) -> AsyncItemPaged[JobStatusResult] """List all the submitted translation jobs under the Document Translation resource. - :keyword int top: Use top to indicate the total number of results you want - to be returned across all pages. - :keyword int skip: Use skip to indicate the number of results to skip from the list - of jobs held by the server based on the sorting method specified. By default, - this is sorted by descending start time. - :keyword int results_per_page: Use results_per_page to indicate the maximum number - of results returned in a page. :return: ~azure.core.paging.AsyncItemPaged[:class:`~azure.ai.documenttranslation.JobStatusResult`] :rtype: ~azure.core.paging.AsyncItemPaged :raises ~azure.core.exceptions.HttpResponseError: @@ -235,8 +228,6 @@ def list_submitted_jobs(self, **kwargs): :dedent: 4 :caption: List all submitted jobs under the resource. """ - skip = kwargs.pop('skip', None) - results_per_page = kwargs.pop('results_per_page', None) def _convert_from_generated_model(generated_model): # pylint: disable=protected-access @@ -248,8 +239,6 @@ def _convert_from_generated_model(generated_model): ) return self._client.document_translation.get_operations( - top=results_per_page, - skip=skip, cls=model_conversion_function, **kwargs ) @@ -260,13 +249,6 @@ def list_all_document_statuses(self, job_id, **kwargs): """List all the document statuses under a translation job. :param str job_id: The translation job ID. - :keyword int top: Use top to indicate the total number of results you want - to be returned across all pages. - :keyword int skip: Use skip to indicate the number of results to skip from the list - of document statuses held by the server based on the sorting method specified. By default, - this is sorted by descending start time. - :keyword int results_per_page: Use results_per_page to indicate the maximum number - of results returned in a page. :return: ~azure.core.paging.AsyncItemPaged[:class:`~azure.ai.documenttranslation.DocumentStatusResult`] :rtype: ~azure.core.paging.AsyncItemPaged :raises ~azure.core.exceptions.HttpResponseError: @@ -280,8 +262,6 @@ def list_all_document_statuses(self, job_id, **kwargs): :dedent: 8 :caption: List all the document statuses under the translation job. """ - skip = kwargs.pop('skip', None) - results_per_page = kwargs.pop('results_per_page', None) def _convert_from_generated_model(generated_model): # pylint: disable=protected-access @@ -294,13 +274,10 @@ def _convert_from_generated_model(generated_model): return self._client.document_translation.get_operation_documents_status( id=job_id, - top=results_per_page, - skip=skip, cls=model_conversion_function, **kwargs ) - @distributed_trace_async async def get_document_status(self, job_id, document_id, **kwargs): # type: (str, str, **Any) -> DocumentStatusResult