Struct google_translate2::api::TranslateTextRequest
source · pub struct TranslateTextRequest {
pub format: Option<String>,
pub model: Option<String>,
pub q: Option<Vec<String>>,
pub source: Option<String>,
pub target: Option<String>,
}
Expand description
The main translation request message for the Cloud Translation API.
§Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- translate translations (request)
Fields§
§format: Option<String>
The format of the source text, in either HTML (default) or plain-text. A value of “html” indicates HTML and a value of “text” indicates plain-text.
model: Option<String>
The model
type requested for this translation. Valid values are
listed in public documentation.
q: Option<Vec<String>>
The input text to translate. Repeat this parameter to perform translation operations on multiple text inputs.
source: Option<String>
The language of the source text, set to one of the language codes listed in Language Support. If the source language is not specified, the API will attempt to identify the source language automatically and return it within the response.
target: Option<String>
The language to use for translation of the input text, set to one of the language codes listed in Language Support.
Trait Implementations§
source§impl Clone for TranslateTextRequest
impl Clone for TranslateTextRequest
source§fn clone(&self) -> TranslateTextRequest
fn clone(&self) -> TranslateTextRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more