#[non_exhaustive]pub struct RomanizeTextRequest {
pub parent: String,
pub contents: Vec<String>,
pub source_language_code: String,
/* private fields */
}Expand description
The request message for synchronous romanization.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. Project or location to make a call. Must refer to a caller’s project.
Format: projects/{project-number-or-id}/locations/{location-id} or
projects/{project-number-or-id}.
For global calls, use projects/{project-number-or-id}/locations/global or
projects/{project-number-or-id}.
contents: Vec<String>Required. The content of the input in string format.
source_language_code: StringOptional. The ISO-639 language code of the input text if known, for example, “hi” or “zh”. Supported language codes are listed in Language Support. If the source language isn’t specified, the API attempts to identify the source language automatically and returns the source language for each content in the response.
Implementations§
Source§impl RomanizeTextRequest
impl RomanizeTextRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_contents<T, V>(self, v: T) -> Self
pub fn set_contents<T, V>(self, v: T) -> Self
Sourcepub fn set_source_language_code<T: Into<String>>(self, v: T) -> Self
pub fn set_source_language_code<T: Into<String>>(self, v: T) -> Self
Sets the value of source_language_code.
§Example
ⓘ
let x = RomanizeTextRequest::new().set_source_language_code("example");Trait Implementations§
Source§impl Clone for RomanizeTextRequest
impl Clone for RomanizeTextRequest
Source§fn clone(&self) -> RomanizeTextRequest
fn clone(&self) -> RomanizeTextRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RomanizeTextRequest
impl Debug for RomanizeTextRequest
Source§impl Default for RomanizeTextRequest
impl Default for RomanizeTextRequest
Source§fn default() -> RomanizeTextRequest
fn default() -> RomanizeTextRequest
Returns the “default value” for a type. Read more
Source§impl Message for RomanizeTextRequest
impl Message for RomanizeTextRequest
Source§impl PartialEq for RomanizeTextRequest
impl PartialEq for RomanizeTextRequest
impl StructuralPartialEq for RomanizeTextRequest
Auto Trait Implementations§
impl Freeze for RomanizeTextRequest
impl RefUnwindSafe for RomanizeTextRequest
impl Send for RomanizeTextRequest
impl Sync for RomanizeTextRequest
impl Unpin for RomanizeTextRequest
impl UnsafeUnpin for RomanizeTextRequest
impl UnwindSafe for RomanizeTextRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more