#[non_exhaustive]pub struct BatchTranslateMetadata {
pub state: State,
pub translated_characters: i64,
pub failed_characters: i64,
pub total_characters: i64,
pub submit_time: Option<Timestamp>,
/* private fields */
}Expand description
State metadata for the batch translation operation.
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.state: StateThe state of the operation.
translated_characters: i64Number of successfully translated characters so far (Unicode codepoints).
failed_characters: i64Number of characters that have failed to process so far (Unicode codepoints).
total_characters: i64Total number of characters (Unicode codepoints). This is the total number of codepoints from input files times the number of target languages and appears here shortly after the call is submitted.
submit_time: Option<Timestamp>Time when the operation was submitted.
Implementations§
Source§impl BatchTranslateMetadata
impl BatchTranslateMetadata
pub fn new() -> Self
Sourcepub fn set_state<T: Into<State>>(self, v: T) -> Self
pub fn set_state<T: Into<State>>(self, v: T) -> Self
Sets the value of state.
§Example
ⓘ
use google_cloud_translation_v3::model::batch_translate_metadata::State;
let x0 = BatchTranslateMetadata::new().set_state(State::Running);
let x1 = BatchTranslateMetadata::new().set_state(State::Succeeded);
let x2 = BatchTranslateMetadata::new().set_state(State::Failed);Sourcepub fn set_translated_characters<T: Into<i64>>(self, v: T) -> Self
pub fn set_translated_characters<T: Into<i64>>(self, v: T) -> Self
Sets the value of translated_characters.
§Example
ⓘ
let x = BatchTranslateMetadata::new().set_translated_characters(42);Sourcepub fn set_failed_characters<T: Into<i64>>(self, v: T) -> Self
pub fn set_failed_characters<T: Into<i64>>(self, v: T) -> Self
Sets the value of failed_characters.
§Example
ⓘ
let x = BatchTranslateMetadata::new().set_failed_characters(42);Sourcepub fn set_total_characters<T: Into<i64>>(self, v: T) -> Self
pub fn set_total_characters<T: Into<i64>>(self, v: T) -> Self
Sets the value of total_characters.
§Example
ⓘ
let x = BatchTranslateMetadata::new().set_total_characters(42);Sourcepub fn set_submit_time<T>(self, v: T) -> Self
pub fn set_submit_time<T>(self, v: T) -> Self
Sets the value of submit_time.
§Example
ⓘ
use wkt::Timestamp;
let x = BatchTranslateMetadata::new().set_submit_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_submit_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_submit_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of submit_time.
§Example
ⓘ
use wkt::Timestamp;
let x = BatchTranslateMetadata::new().set_or_clear_submit_time(Some(Timestamp::default()/* use setters */));
let x = BatchTranslateMetadata::new().set_or_clear_submit_time(None::<Timestamp>);Trait Implementations§
Source§impl Clone for BatchTranslateMetadata
impl Clone for BatchTranslateMetadata
Source§fn clone(&self) -> BatchTranslateMetadata
fn clone(&self) -> BatchTranslateMetadata
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 BatchTranslateMetadata
impl Debug for BatchTranslateMetadata
Source§impl Default for BatchTranslateMetadata
impl Default for BatchTranslateMetadata
Source§fn default() -> BatchTranslateMetadata
fn default() -> BatchTranslateMetadata
Returns the “default value” for a type. Read more
Source§impl Message for BatchTranslateMetadata
impl Message for BatchTranslateMetadata
Source§impl PartialEq for BatchTranslateMetadata
impl PartialEq for BatchTranslateMetadata
impl StructuralPartialEq for BatchTranslateMetadata
Auto Trait Implementations§
impl Freeze for BatchTranslateMetadata
impl RefUnwindSafe for BatchTranslateMetadata
impl Send for BatchTranslateMetadata
impl Sync for BatchTranslateMetadata
impl Unpin for BatchTranslateMetadata
impl UnsafeUnpin for BatchTranslateMetadata
impl UnwindSafe for BatchTranslateMetadata
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