#[non_exhaustive]pub struct ImportAdaptiveMtFileRequest {
pub parent: String,
pub source: Option<Source>,
/* private fields */
}Expand description
The request for importing an AdaptiveMt file along with its sentences.
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.parent: StringRequired. The resource name of the file, in form of
projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}
source: Option<Source>The source for the document.
Implementations§
Source§impl ImportAdaptiveMtFileRequest
impl ImportAdaptiveMtFileRequest
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_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source.
Note that all the setters affecting source are mutually
exclusive.
§Example
use google_cloud_translation_v3::model::FileInputSource;
let x = ImportAdaptiveMtFileRequest::new().set_source(Some(
google_cloud_translation_v3::model::import_adaptive_mt_file_request::Source::FileInputSource(FileInputSource::default().into())));Sourcepub fn file_input_source(&self) -> Option<&Box<FileInputSource>>
pub fn file_input_source(&self) -> Option<&Box<FileInputSource>>
The value of source
if it holds a FileInputSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_file_input_source<T: Into<Box<FileInputSource>>>(self, v: T) -> Self
pub fn set_file_input_source<T: Into<Box<FileInputSource>>>(self, v: T) -> Self
Sets the value of source
to hold a FileInputSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_translation_v3::model::FileInputSource;
let x = ImportAdaptiveMtFileRequest::new().set_file_input_source(FileInputSource::default()/* use setters */);
assert!(x.file_input_source().is_some());
assert!(x.gcs_input_source().is_none());Sourcepub fn gcs_input_source(&self) -> Option<&Box<GcsInputSource>>
pub fn gcs_input_source(&self) -> Option<&Box<GcsInputSource>>
The value of source
if it holds a GcsInputSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_gcs_input_source<T: Into<Box<GcsInputSource>>>(self, v: T) -> Self
pub fn set_gcs_input_source<T: Into<Box<GcsInputSource>>>(self, v: T) -> Self
Sets the value of source
to hold a GcsInputSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_translation_v3::model::GcsInputSource;
let x = ImportAdaptiveMtFileRequest::new().set_gcs_input_source(GcsInputSource::default()/* use setters */);
assert!(x.gcs_input_source().is_some());
assert!(x.file_input_source().is_none());Trait Implementations§
Source§impl Clone for ImportAdaptiveMtFileRequest
impl Clone for ImportAdaptiveMtFileRequest
Source§fn clone(&self) -> ImportAdaptiveMtFileRequest
fn clone(&self) -> ImportAdaptiveMtFileRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more