Struct googapis::google::cloud::translation::v3beta1::BatchTranslateDocumentRequest[][src]

pub struct BatchTranslateDocumentRequest {
    pub parent: String,
    pub source_language_code: String,
    pub target_language_codes: Vec<String>,
    pub input_configs: Vec<BatchDocumentInputConfig>,
    pub output_config: Option<BatchDocumentOutputConfig>,
    pub models: HashMap<String, String>,
    pub glossaries: HashMap<String, TranslateTextGlossaryConfig>,
    pub format_conversions: HashMap<String, String>,
}
Expand description

The BatchTranslateDocument request.

Fields

parent: String

Required. Location to make a regional call.

Format: projects/{project-number-or-id}/locations/{location-id}.

The global location is not supported for batch translation.

Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.

source_language_code: String

Required. The BCP-47 language code of the input document if known, for example, “en-US” or “sr-Latn”. Supported language codes are listed in Language Support (https://cloud.google.com/translate/docs/languages).

target_language_codes: Vec<String>

Required. The BCP-47 language code to use for translation of the input document. Specify up to 10 language codes here.

input_configs: Vec<BatchDocumentInputConfig>

Required. Input configurations. The total number of files matched should be <= 100. The total content size to translate should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.

output_config: Option<BatchDocumentOutputConfig>

Required. Output configuration. If 2 input configs match to the same file (that is, same input path), we don’t generate output for duplicate inputs.

models: HashMap<String, String>

Optional. The models to use for translation. Map’s key is target language code. Map’s value is the model name. Value can be a built-in general model, or an AutoML Translation model.

The value format depends on model type:

If the map is empty or a specific model is not requested for a language pair, then default google model (nmt) is used.

glossaries: HashMap<String, TranslateTextGlossaryConfig>

Optional. Glossaries to be applied. It’s keyed by target language code.

format_conversions: HashMap<String, String>

Optional. File format conversion map to be applied to all input files. Map’s key is the original mime_type. Map’s value is the target mime_type of translated documents.

Supported file format conversion includes:

If nothing specified, output files will be in the same format as the original file.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Returns the encoded length of the message without a length delimiter.

Clears the message, resetting all fields to their default.

Encodes the message to a buffer. Read more

Encodes the message to a newly allocated buffer.

Encodes the message with a length-delimiter to a buffer. Read more

Encodes the message with a length-delimiter to a newly allocated buffer.

Decodes an instance of the message from a buffer. Read more

Decodes a length-delimited instance of the message from the buffer.

Decodes an instance of the message from a buffer, and merges it into self. Read more

Decodes a length-delimited instance of the message from buffer, and merges it into self. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more