@azure-rest/ai-translation-document package
Rozhraní
Aliasy typu
| CancelTranslationParameters | |
| DocumentTranslateContent |
Obsah žádosti o překlad dokumentu |
| DocumentTranslateParameters | |
| DocumentTranslationClient | |
| FileFormatType |
Alias pro FileFormatType |
| GetArrayType |
Pomocný typ pro extrahování typu pole |
| GetDocumentStatusParameters | |
| GetDocumentsStatusParameters | |
| GetPage |
Typ vlastní funkce, která definuje, jak získat stránku, a odkaz na další, pokud existuje. |
| GetSupportedFormatsParameters | |
| GetTranslationStatusParameters | |
| GetTranslationsStatusParameters | |
| PaginateReturn |
Pomocný typ pro odvození typu stránkovaných prvků z typu odpovědi Tento typ je generován na základě informací swagger pro x-ms-pageable konkrétně na itemName vlastnost, která označuje vlastnost odpovědi, kde jsou nalezeny položky stránky. Výchozí hodnota je |
| StartTranslationParameters | |
| StatusOutput |
Alias pro StatusOutput |
| StorageInputType |
Alias pro StorageInputType |
| StorageSource |
Alias pro StorageSource |
| TranslationErrorCodeOutput |
Alias pro TranslationErrorCodeOutput |
Funkce
Podrobnosti funkce
default(string, TokenCredential | KeyCredential, DocumentTranslationClientOptions)
Inicializace nové instance DocumentTranslationClient
function default(endpointParam: string, credentials: TokenCredential | KeyCredential, options?: DocumentTranslationClientOptions): DocumentTranslationClient
Parametry
- endpointParam
-
string
Podporovaný koncový bod překladu dokumentu, protokol a název hostitele, například: https://{TranslatorResourceName}.cognitiveservices.azure.com/translator.
- credentials
jedinečně identifikovat přihlašovací údaje klienta
- options
- DocumentTranslationClientOptions
parametr pro všechny volitelné parametry
Návraty
getLongRunningPoller<TResult>(Client, StartTranslationDefaultResponse | StartTranslation202Response, CreateHttpPollerOptions<TResult, OperationState<TResult>>)
Pomocná funkce, která vytvoří objekt Poller, který pomáhá dotazovat dlouho běžící operaci.
function getLongRunningPoller<TResult>(client: Client, initialResponse: StartTranslationDefaultResponse | StartTranslation202Response, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>
Parametry
- client
- Client
Klient, který se má použít k odeslání požadavku, aby získal další stránky.
- initialResponse
-
StartTranslationDefaultResponse | StartTranslation202Response
Počáteční odpověď.
- options
-
CreateHttpPollerOptions<TResult, OperationState<TResult>>
Možnosti nastavení stavu obnovení nebo vlastního intervalu dotazování
Návraty
Promise<SimplePollerLike<OperationState<TResult>, TResult>>
- Objekt poller, který se má dotazovat na aktualizace stavu operace, a nakonec získat konečnou odpověď.
isUnexpected(DocumentTranslate200Response | DocumentTranslateDefaultResponse)
function isUnexpected(response: DocumentTranslate200Response | DocumentTranslateDefaultResponse): response
Parametry
Návraty
response
isUnexpected(StartTranslationLogicalResponse | StartTranslationDefaultResponse | StartTranslation202Response)
function isUnexpected(response: StartTranslationLogicalResponse | StartTranslationDefaultResponse | StartTranslation202Response): response
Parametry
Návraty
response
isUnexpected(GetTranslationsStatus200Response | GetTranslationsStatusDefaultResponse)
function isUnexpected(response: GetTranslationsStatus200Response | GetTranslationsStatusDefaultResponse): response
Parametry
Návraty
response
isUnexpected(GetDocumentStatus200Response | GetDocumentStatusDefaultResponse)
function isUnexpected(response: GetDocumentStatus200Response | GetDocumentStatusDefaultResponse): response
Parametry
Návraty
response
isUnexpected(GetTranslationStatus200Response | GetTranslationStatusDefaultResponse)
function isUnexpected(response: GetTranslationStatus200Response | GetTranslationStatusDefaultResponse): response
Parametry
Návraty
response
isUnexpected(CancelTranslation200Response | CancelTranslationDefaultResponse)
function isUnexpected(response: CancelTranslation200Response | CancelTranslationDefaultResponse): response
Parametry
Návraty
response
isUnexpected(GetDocumentsStatus200Response | GetDocumentsStatusDefaultResponse)
function isUnexpected(response: GetDocumentsStatus200Response | GetDocumentsStatusDefaultResponse): response
Parametry
Návraty
response
isUnexpected(GetSupportedFormats200Response | GetSupportedFormatsDefaultResponse)
function isUnexpected(response: GetSupportedFormats200Response | GetSupportedFormatsDefaultResponse): response
Parametry
Návraty
response
paginate<TResponse>(Client, TResponse, PagingOptions<TResponse>)
Pomocná rutina stránkovat výsledky z počáteční odpovědi, která odpovídá specifikaci rozšíření Automatické x-ms-pageable
function paginate<TResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>
Parametry
- client
- Client
Klient, který se má použít k odesílání žádostí na další stránku
- initialResponse
-
TResponse
Počáteční odpověď obsahující nextLink a aktuální stránku prvků
- options
-
PagingOptions<TResponse>
Návraty
PagedAsyncIterableIterator<PaginateReturn<TResponse>>
- PagedAsyncIterableIterator pro iteraci prvků