import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { TranslateTextRequest, TranslateTextResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link TranslateTextCommand}. */ export interface TranslateTextCommandInput extends TranslateTextRequest { } /** * @public * * The output of {@link TranslateTextCommand}. */ export interface TranslateTextCommandOutput extends TranslateTextResponse, __MetadataBearer { } declare const TranslateTextCommand_base: { new (input: TranslateTextCommandInput): import("@smithy/core/client").CommandImpl; new (input: TranslateTextCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Translates input text from the source language to the target language. For a list of * available languages and language codes, see Supported languages.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { TranslateClient, TranslateTextCommand } from "@aws-sdk/client-translate"; // ES Modules import * // const { TranslateClient, TranslateTextCommand } = require("@aws-sdk/client-translate"); // CommonJS import * // import type { TranslateClientConfig } from "@aws-sdk/client-translate"; * const config = {}; // type is TranslateClientConfig * const client = new TranslateClient(config); * const input = { // TranslateTextRequest * Text: "STRING_VALUE", // required * TerminologyNames: [ // ResourceNameList * "STRING_VALUE", * ], * SourceLanguageCode: "STRING_VALUE", // required * TargetLanguageCode: "STRING_VALUE", // required * Settings: { // TranslationSettings * Formality: "FORMAL" || "INFORMAL", * Profanity: "MASK", * Brevity: "ON", * }, * }; * const command = new TranslateTextCommand(input); * const response = await client.send(command); * // { // TranslateTextResponse * // TranslatedText: "STRING_VALUE", // required * // SourceLanguageCode: "STRING_VALUE", // required * // TargetLanguageCode: "STRING_VALUE", // required * // AppliedTerminologies: [ // AppliedTerminologyList * // { // AppliedTerminology * // Name: "STRING_VALUE", * // Terms: [ // TermList * // { // Term * // SourceText: "STRING_VALUE", * // TargetText: "STRING_VALUE", * // }, * // ], * // }, * // ], * // AppliedSettings: { // TranslationSettings * // Formality: "FORMAL" || "INFORMAL", * // Profanity: "MASK", * // Brevity: "ON", * // }, * // }; * * ``` * * @param TranslateTextCommandInput - {@link TranslateTextCommandInput} * @returns {@link TranslateTextCommandOutput} * @see {@link TranslateTextCommandInput} for command's `input` shape. * @see {@link TranslateTextCommandOutput} for command's `response` shape. * @see {@link TranslateClientResolvedConfig | config} for TranslateClient's `config` shape. * * @throws {@link DetectedLanguageLowConfidenceException} (client fault) *

The confidence that Amazon Comprehend accurately detected the source language is low. If a * low confidence level is acceptable for your application, you can use the language in the * exception to call Amazon Translate again. For more information, see the DetectDominantLanguage operation in the Amazon Comprehend Developer * Guide.

* * @throws {@link InternalServerException} (server fault) *

An internal server error occurred. Retry your request.

* * @throws {@link InvalidRequestException} (client fault) *

The request that you made is not valid. Check your request to determine why it's not * valid and then retry the request.

* * @throws {@link ResourceNotFoundException} (client fault) *

The resource you are looking for has not been found. Review the resource you're looking * for and see if a different resource will accomplish your needs before retrying the revised * request.

* * @throws {@link ServiceUnavailableException} (server fault) *

The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your * request.

* * @throws {@link TextSizeLimitExceededException} (client fault) *

The size of the text you submitted exceeds the size limit. Reduce the size of the text or * use a smaller document and then retry your request.

* * @throws {@link TooManyRequestsException} (client fault) *

You have made too many requests within a short period of time. Wait for a short time and * then try your request again.

* * @throws {@link UnsupportedLanguagePairException} (client fault) *

Amazon Translate does not support translation from the language of the source text into the requested * target language. For more information, see Supported languages.

* * @throws {@link TranslateServiceException} *

Base exception class for all service exceptions from Translate service.

* * * @public */ export declare class TranslateTextCommand extends TranslateTextCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: TranslateTextRequest; output: TranslateTextResponse; }; sdk: { input: TranslateTextCommandInput; output: TranslateTextCommandOutput; }; }; }