@azure-rest/ai-translation-document package
Interfaces
Type Aliases
| CancelTranslationParameters | |
| DocumentTranslateContent |
Document Translate Request Content |
| DocumentTranslateParameters | |
| DocumentTranslationClient | |
| FileFormatType |
Alias for FileFormatType |
| GetArrayType |
Helper type to extract the type of an array |
| GetDocumentStatusParameters | |
| GetDocumentsStatusParameters | |
| GetPage |
The type of a custom function that defines how to get a page and a link to the next one if any. |
| GetSupportedFormatsParameters | |
| GetTranslationStatusParameters | |
| GetTranslationsStatusParameters | |
| PaginateReturn |
Helper type to infer the Type of the paged elements from the response type
This type is generated based on the swagger information for x-ms-pageable
specifically on the itemName property which indicates the property of the response
where the page items are found. The default value is |
| StartTranslationParameters | |
| StatusOutput |
Alias for StatusOutput |
| StorageInputType |
Alias for StorageInputType |
| StorageSource |
Alias for StorageSource |
| TranslationErrorCodeOutput |
Alias for TranslationErrorCodeOutput |
Functions
Function Details
default(string, TokenCredential | KeyCredential, DocumentTranslationClientOptions)
Initialize a new instance of DocumentTranslationClient
function default(endpointParam: string, credentials: TokenCredential | KeyCredential, options?: DocumentTranslationClientOptions): DocumentTranslationClient
Parameters
- endpointParam
-
string
Supported document Translation endpoint, protocol and hostname, for example: https://{TranslatorResourceName}.cognitiveservices.azure.com/translator.
- credentials
uniquely identify client credential
- options
- DocumentTranslationClientOptions
the parameter for all optional parameters
Returns
getLongRunningPoller<TResult>(Client, StartTranslationDefaultResponse | StartTranslation202Response, CreateHttpPollerOptions<TResult, OperationState<TResult>>)
Helper function that builds a Poller object to help polling a long running operation.
function getLongRunningPoller<TResult>(client: Client, initialResponse: StartTranslationDefaultResponse | StartTranslation202Response, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>
Parameters
- client
- Client
Client to use for sending the request to get additional pages.
- initialResponse
-
StartTranslationDefaultResponse | StartTranslation202Response
The initial response.
- options
-
CreateHttpPollerOptions<TResult, OperationState<TResult>>
Options to set a resume state or custom polling interval.
Returns
Promise<SimplePollerLike<OperationState<TResult>, TResult>>
- A poller object to poll for operation state updates and eventually get the final response.
isUnexpected(DocumentTranslate200Response | DocumentTranslateDefaultResponse)
function isUnexpected(response: DocumentTranslate200Response | DocumentTranslateDefaultResponse): response
Parameters
Returns
response
isUnexpected(StartTranslationLogicalResponse | StartTranslationDefaultResponse | StartTranslation202Response)
function isUnexpected(response: StartTranslationLogicalResponse | StartTranslationDefaultResponse | StartTranslation202Response): response
Parameters
Returns
response
isUnexpected(GetTranslationsStatus200Response | GetTranslationsStatusDefaultResponse)
function isUnexpected(response: GetTranslationsStatus200Response | GetTranslationsStatusDefaultResponse): response
Parameters
Returns
response
isUnexpected(GetDocumentStatus200Response | GetDocumentStatusDefaultResponse)
function isUnexpected(response: GetDocumentStatus200Response | GetDocumentStatusDefaultResponse): response
Parameters
Returns
response
isUnexpected(GetTranslationStatus200Response | GetTranslationStatusDefaultResponse)
function isUnexpected(response: GetTranslationStatus200Response | GetTranslationStatusDefaultResponse): response
Parameters
Returns
response
isUnexpected(CancelTranslation200Response | CancelTranslationDefaultResponse)
function isUnexpected(response: CancelTranslation200Response | CancelTranslationDefaultResponse): response
Parameters
Returns
response
isUnexpected(GetDocumentsStatus200Response | GetDocumentsStatusDefaultResponse)
function isUnexpected(response: GetDocumentsStatus200Response | GetDocumentsStatusDefaultResponse): response
Parameters
Returns
response
isUnexpected(GetSupportedFormats200Response | GetSupportedFormatsDefaultResponse)
function isUnexpected(response: GetSupportedFormats200Response | GetSupportedFormatsDefaultResponse): response
Parameters
Returns
response
paginate<TResponse>(Client, TResponse, PagingOptions<TResponse>)
Helper to paginate results from an initial response that follows the specification of Autorest x-ms-pageable extension
function paginate<TResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>
Parameters
- client
- Client
Client to use for sending the next page requests
- initialResponse
-
TResponse
Initial response containing the nextLink and current page of elements
- options
-
PagingOptions<TResponse>
Returns
PagedAsyncIterableIterator<PaginateReturn<TResponse>>
- PagedAsyncIterableIterator to iterate the elements