Struct gapi_grpc::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>,
}

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.

Trait Implementations

impl Clone for BatchTranslateDocumentRequest[src]

impl Debug for BatchTranslateDocumentRequest[src]

impl Default for BatchTranslateDocumentRequest[src]

impl Message for BatchTranslateDocumentRequest[src]

impl PartialEq<BatchTranslateDocumentRequest> for BatchTranslateDocumentRequest[src]

impl StructuralPartialEq for BatchTranslateDocumentRequest[src]

Auto Trait Implementations

impl RefUnwindSafe for BatchTranslateDocumentRequest

impl Send for BatchTranslateDocumentRequest

impl Sync for BatchTranslateDocumentRequest

impl Unpin for BatchTranslateDocumentRequest

impl UnwindSafe for BatchTranslateDocumentRequest

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]