@azure-rest/ai-translation-document package
Интерфейсы
Псевдонимы типа
| CancelTranslationParameters | |
| DocumentTranslateContent |
Содержимое запроса перевода документов |
| DocumentTranslateParameters | |
| DocumentTranslationClient | |
| FileFormatType |
Псевдоним для FileFormatType |
| GetArrayType |
Вспомогательный тип для извлечения типа массива |
| GetDocumentStatusParameters | |
| GetDocumentsStatusParameters | |
| GetPage |
Тип настраиваемой функции, которая определяет, как получить страницу и ссылку на следующую. |
| GetSupportedFormatsParameters | |
| GetTranslationStatusParameters | |
| GetTranslationsStatusParameters | |
| PaginateReturn |
Вспомогательный тип для вывода типа страничных элементов из типа ответа этот тип создается на основе сведений swagger для x-ms-pageable специально в свойстве itemName, которое указывает свойство ответа, в котором находятся элементы страницы. Значение по умолчанию — |
| StartTranslationParameters | |
| StatusOutput |
Псевдоним для StatusOutput |
| StorageInputType |
Псевдоним для StorageInputType |
| StorageSource |
Псевдоним для StorageSource |
| TranslationErrorCodeOutput |
Псевдоним для translationErrorCodeOutput |
Функции
Сведения о функции
default(string, TokenCredential | KeyCredential, DocumentTranslationClientOptions)
Инициализация нового экземпляра DocumentTranslationClient
function default(endpointParam: string, credentials: TokenCredential | KeyCredential, options?: DocumentTranslationClientOptions): DocumentTranslationClient
Параметры
- endpointParam
-
string
Поддерживаемая конечная точка перевода документов, протокол и имя узла, например https://{TranslatorResourceName}.cognitiveservices.azure.com/translator.
- credentials
уникально идентификация учетных данных клиента
- options
- DocumentTranslationClientOptions
параметр для всех необязательных параметров
Возвращаемое значение
getLongRunningPoller<TResult>(Client, StartTranslationDefaultResponse | StartTranslation202Response, CreateHttpPollerOptions<TResult, OperationState<TResult>>)
Вспомогающая функция, которая создает объект Poller, чтобы помочь провести опрос длительной операции.
function getLongRunningPoller<TResult>(client: Client, initialResponse: StartTranslationDefaultResponse | StartTranslation202Response, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>
Параметры
- client
- Client
Клиент, используемый для отправки запроса, чтобы получить дополнительные страницы.
- initialResponse
-
StartTranslationDefaultResponse | StartTranslation202Response
Начальный ответ.
- options
-
CreateHttpPollerOptions<TResult, OperationState<TResult>>
Параметры для задания состояния возобновления или настраиваемого интервала опроса.
Возвращаемое значение
Promise<SimplePollerLike<OperationState<TResult>, TResult>>
- Объект опроса для проверки обновлений состояния операции и в конечном итоге получает окончательный ответ.
isUnexpected(DocumentTranslate200Response | DocumentTranslateDefaultResponse)
function isUnexpected(response: DocumentTranslate200Response | DocumentTranslateDefaultResponse): response
Параметры
Возвращаемое значение
response
isUnexpected(StartTranslationLogicalResponse | StartTranslationDefaultResponse | StartTranslation202Response)
function isUnexpected(response: StartTranslationLogicalResponse | StartTranslationDefaultResponse | StartTranslation202Response): response
Параметры
Возвращаемое значение
response
isUnexpected(GetTranslationsStatus200Response | GetTranslationsStatusDefaultResponse)
function isUnexpected(response: GetTranslationsStatus200Response | GetTranslationsStatusDefaultResponse): response
Параметры
Возвращаемое значение
response
isUnexpected(GetDocumentStatus200Response | GetDocumentStatusDefaultResponse)
function isUnexpected(response: GetDocumentStatus200Response | GetDocumentStatusDefaultResponse): response
Параметры
Возвращаемое значение
response
isUnexpected(GetTranslationStatus200Response | GetTranslationStatusDefaultResponse)
function isUnexpected(response: GetTranslationStatus200Response | GetTranslationStatusDefaultResponse): response
Параметры
Возвращаемое значение
response
isUnexpected(CancelTranslation200Response | CancelTranslationDefaultResponse)
function isUnexpected(response: CancelTranslation200Response | CancelTranslationDefaultResponse): response
Параметры
Возвращаемое значение
response
isUnexpected(GetDocumentsStatus200Response | GetDocumentsStatusDefaultResponse)
function isUnexpected(response: GetDocumentsStatus200Response | GetDocumentsStatusDefaultResponse): response
Параметры
Возвращаемое значение
response
isUnexpected(GetSupportedFormats200Response | GetSupportedFormatsDefaultResponse)
function isUnexpected(response: GetSupportedFormats200Response | GetSupportedFormatsDefaultResponse): response
Параметры
Возвращаемое значение
response
paginate<TResponse>(Client, TResponse, PagingOptions<TResponse>)
Вспомогательный элемент для разбивки результатов из первоначального ответа, который соответствует спецификации расширения autorest x-ms-pageable
function paginate<TResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>
Параметры
- client
- Client
Клиент, используемый для отправки запросов на следующую страницу
- initialResponse
-
TResponse
Начальный ответ, содержащий следующую ссылку и текущую страницу элементов
- options
-
PagingOptions<TResponse>
Возвращаемое значение
PagedAsyncIterableIterator<PaginateReturn<TResponse>>
- PagedAsyncIterableIterator для итерации элементов