[][src]Struct google_translate3::InputConfig

pub struct InputConfig {
    pub mime_type: Option<String>,
    pub gcs_source: Option<GcsSource>,
}

Input configuration for BatchTranslateText request.

This type is not used in any activity, and only used as part of another schema.

Fields

mime_type: Option<String>

Optional. Can be "text/plain" or "text/html". For .tsv, "text/html" is used if mime_type is missing. For .html, this field must be "text/html" or empty. For .txt, this field must be "text/plain" or empty.

gcs_source: Option<GcsSource>

Required. Google Cloud Storage location for the source input. This can be a single file (for example, gs://translation-test/input.tsv) or a wildcard (for example, gs://translation-test/*). If a file extension is .tsv, it can contain either one or two columns. The first column (optional) is the id of the text request. If the first column is missing, we use the row number (0-based) from the input file as the ID in the output file. The second column is the actual text to be translated. We recommend each row be <= 10K Unicode codepoints, otherwise an error might be returned. Note that the input tsv must be RFC 4180 compliant.

You could use https://github.com/Clever/csvlint to check potential formatting errors in your tsv file. csvlint --delimiter='\t' your_input_file.tsv

The other supported file extensions are .txt or .html, which is treated as a single large chunk of text.

Trait Implementations

impl Clone for InputConfig[src]

impl Debug for InputConfig[src]

impl Default for InputConfig[src]

impl<'de> Deserialize<'de> for InputConfig[src]

impl Part for InputConfig[src]

impl Serialize for InputConfig[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T, U> Into<U> for T where
    U: From<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<T> Typeable for T where
    T: Any