#[non_exhaustive]pub struct BatchTranslateDocumentMetadata {
pub state: State,
pub total_pages: i64,
pub translated_pages: i64,
pub failed_pages: i64,
pub total_billable_pages: i64,
pub total_characters: i64,
pub translated_characters: i64,
pub failed_characters: i64,
pub total_billable_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
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.state: StateThe state of the operation.
total_pages: i64Total number of pages to translate in all documents so far. Documents without clear page definition (such as XLSX) are not counted.
translated_pages: i64Number of successfully translated pages in all documents so far. Documents without clear page definition (such as XLSX) are not counted.
failed_pages: i64Number of pages that failed to process in all documents so far. Documents without clear page definition (such as XLSX) are not counted.
total_billable_pages: i64Number of billable pages in documents with clear page definition (such as PDF, DOCX, PPTX) so far.
total_characters: i64Total number of characters (Unicode codepoints) in all documents so far.
translated_characters: i64Number of successfully translated characters (Unicode codepoints) in all documents so far.
failed_characters: i64Number of characters that have failed to process (Unicode codepoints) in all documents so far.
total_billable_characters: i64Number of billable characters (Unicode codepoints) in documents without clear page definition (such as XLSX) so far.
submit_time: Option<Timestamp>Time when the operation was submitted.
Implementations§
Source§impl BatchTranslateDocumentMetadata
impl BatchTranslateDocumentMetadata
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_document_metadata::State;
let x0 = BatchTranslateDocumentMetadata::new().set_state(State::Running);
let x1 = BatchTranslateDocumentMetadata::new().set_state(State::Succeeded);
let x2 = BatchTranslateDocumentMetadata::new().set_state(State::Failed);Sourcepub fn set_total_pages<T: Into<i64>>(self, v: T) -> Self
pub fn set_total_pages<T: Into<i64>>(self, v: T) -> Self
Sets the value of total_pages.
§Example
let x = BatchTranslateDocumentMetadata::new().set_total_pages(42);Sourcepub fn set_translated_pages<T: Into<i64>>(self, v: T) -> Self
pub fn set_translated_pages<T: Into<i64>>(self, v: T) -> Self
Sets the value of translated_pages.
§Example
let x = BatchTranslateDocumentMetadata::new().set_translated_pages(42);Sourcepub fn set_failed_pages<T: Into<i64>>(self, v: T) -> Self
pub fn set_failed_pages<T: Into<i64>>(self, v: T) -> Self
Sets the value of failed_pages.
§Example
let x = BatchTranslateDocumentMetadata::new().set_failed_pages(42);Sourcepub fn set_total_billable_pages<T: Into<i64>>(self, v: T) -> Self
pub fn set_total_billable_pages<T: Into<i64>>(self, v: T) -> Self
Sets the value of total_billable_pages.
§Example
let x = BatchTranslateDocumentMetadata::new().set_total_billable_pages(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 = BatchTranslateDocumentMetadata::new().set_total_characters(42);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 = BatchTranslateDocumentMetadata::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 = BatchTranslateDocumentMetadata::new().set_failed_characters(42);Sourcepub fn set_total_billable_characters<T: Into<i64>>(self, v: T) -> Self
pub fn set_total_billable_characters<T: Into<i64>>(self, v: T) -> Self
Sets the value of total_billable_characters.
§Example
let x = BatchTranslateDocumentMetadata::new().set_total_billable_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 = BatchTranslateDocumentMetadata::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 = BatchTranslateDocumentMetadata::new().set_or_clear_submit_time(Some(Timestamp::default()/* use setters */));
let x = BatchTranslateDocumentMetadata::new().set_or_clear_submit_time(None::<Timestamp>);Trait Implementations§
Source§impl Clone for BatchTranslateDocumentMetadata
impl Clone for BatchTranslateDocumentMetadata
Source§fn clone(&self) -> BatchTranslateDocumentMetadata
fn clone(&self) -> BatchTranslateDocumentMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for BatchTranslateDocumentMetadata
impl Default for BatchTranslateDocumentMetadata
Source§fn default() -> BatchTranslateDocumentMetadata
fn default() -> BatchTranslateDocumentMetadata
Source§impl PartialEq for BatchTranslateDocumentMetadata
impl PartialEq for BatchTranslateDocumentMetadata
Source§fn eq(&self, other: &BatchTranslateDocumentMetadata) -> bool
fn eq(&self, other: &BatchTranslateDocumentMetadata) -> bool
self and other values to be equal, and is used by ==.