#[non_exhaustive]pub struct Dataset {
pub name: String,
pub display_name: String,
pub source_language_code: String,
pub target_language_code: String,
pub example_count: i32,
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 dataset that hosts the examples (sentence pairs) used for translation models.
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 dataset, in form of
projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}
display_name: StringThe name of the dataset 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.
source_language_code: StringThe BCP-47 language code of the source language.
target_language_code: StringThe BCP-47 language code of the target language.
example_count: i32Output only. The number of examples in the dataset.
train_example_count: i32Output only. Number of training examples (sentence pairs).
validate_example_count: i32Output only. Number of validation examples (sentence pairs).
test_example_count: i32Output only. Number of test examples (sentence pairs).
create_time: Option<Timestamp>Output only. Timestamp when this dataset was created.
update_time: Option<Timestamp>Output only. Timestamp when this dataset was last updated.
Implementations§
Source§impl Dataset
impl Dataset
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_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 = Dataset::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 = Dataset::new().set_target_language_code("example");Sourcepub fn set_example_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_example_count<T: Into<i32>>(self, v: T) -> Self
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
Sets the value of train_example_count.
§Example
let x = Dataset::new().set_train_example_count(42);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 = Dataset::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 = Dataset::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 = Dataset::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Dataset::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 = Dataset::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 = Dataset::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Dataset::new().set_or_clear_update_time(None::<Timestamp>);