#[non_exhaustive]pub struct Model {
pub name: String,
pub display_name: String,
pub dataset: String,
pub source_language_code: String,
pub target_language_code: String,
pub train_example_count: i32,
pub validate_example_count: i32,
pub test_example_count: i32,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
/* private fields */
}Expand description
A trained translation model.
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.name: StringThe resource name of the model, in form of
projects/{project-number-or-id}/locations/{location_id}/models/{model_id}
display_name: StringThe name of the model to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.
dataset: StringThe dataset from which the model is trained, in form of
projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}
source_language_code: StringOutput only. The BCP-47 language code of the source language.
target_language_code: StringOutput only. The BCP-47 language code of the target language.
train_example_count: i32Output only. Number of examples (sentence pairs) used to train the model.
validate_example_count: i32Output only. Number of examples (sentence pairs) used to validate the model.
test_example_count: i32Output only. Number of examples (sentence pairs) used to test the model.
create_time: Option<Timestamp>Output only. Timestamp when the model resource was created, which is also when the training started.
update_time: Option<Timestamp>Output only. Timestamp when this model was last updated.
Implementations§
Source§impl Model
impl Model
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_dataset<T: Into<String>>(self, v: T) -> Self
pub fn set_dataset<T: Into<String>>(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 = Model::new().set_source_language_code("example");Sourcepub fn set_target_language_code<T: Into<String>>(self, v: T) -> Self
pub fn set_target_language_code<T: Into<String>>(self, v: T) -> Self
Sets the value of target_language_code.
§Example
let x = Model::new().set_target_language_code("example");Sourcepub fn set_train_example_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_train_example_count<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_validate_example_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_validate_example_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of validate_example_count.
§Example
let x = Model::new().set_validate_example_count(42);Sourcepub fn set_test_example_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_test_example_count<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Model::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Model::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Model::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Model::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Model::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Model::new().set_or_clear_update_time(None::<Timestamp>);