#[non_exhaustive]pub struct DocumentOutputConfig {
pub mime_type: String,
pub destination: Option<Destination>,
/* private fields */
}Expand description
A document translation request output config.
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.mime_type: StringOptional. Specifies the translated document’s mime_type. If not specified, the translated file’s mime type will be the same as the input file’s mime type. Currently only support the output mime type to be the same as input mime type.
- application/pdf
- application/vnd.openxmlformats-officedocument.wordprocessingml.document
- application/vnd.openxmlformats-officedocument.presentationml.presentation
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
destination: Option<Destination>A URI destination for the translated document. It is optional to provide a destination. If provided the results from TranslateDocument will be stored in the destination. Whether a destination is provided or not, the translated documents will be returned within TranslateDocumentResponse.document_translation and TranslateDocumentResponse.glossary_document_translation.
Implementations§
Source§impl DocumentOutputConfig
impl DocumentOutputConfig
pub fn new() -> Self
Sourcepub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
pub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_destination<T: Into<Option<Destination>>>(self, v: T) -> Self
pub fn set_destination<T: Into<Option<Destination>>>(self, v: T) -> Self
Sets the value of destination.
Note that all the setters affecting destination are mutually
exclusive.
§Example
use google_cloud_translation_v3::model::GcsDestination;
let x = DocumentOutputConfig::new().set_destination(Some(
google_cloud_translation_v3::model::document_output_config::Destination::GcsDestination(GcsDestination::default().into())));Sourcepub fn gcs_destination(&self) -> Option<&Box<GcsDestination>>
pub fn gcs_destination(&self) -> Option<&Box<GcsDestination>>
The value of destination
if it holds a GcsDestination, None if the field is not set or
holds a different branch.
Sourcepub fn set_gcs_destination<T: Into<Box<GcsDestination>>>(self, v: T) -> Self
pub fn set_gcs_destination<T: Into<Box<GcsDestination>>>(self, v: T) -> Self
Sets the value of destination
to hold a GcsDestination.
Note that all the setters affecting destination are
mutually exclusive.
§Example
use google_cloud_translation_v3::model::GcsDestination;
let x = DocumentOutputConfig::new().set_gcs_destination(GcsDestination::default()/* use setters */);
assert!(x.gcs_destination().is_some());Trait Implementations§
Source§impl Clone for DocumentOutputConfig
impl Clone for DocumentOutputConfig
Source§fn clone(&self) -> DocumentOutputConfig
fn clone(&self) -> DocumentOutputConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more