#[non_exhaustive]pub struct TrainCustomModelRequest {
pub data_store: String,
pub model_type: String,
pub error_config: Option<ImportErrorConfig>,
pub model_id: String,
pub training_input: Option<TrainingInput>,
/* private fields */
}search-tuning-service only.Expand description
Request message for SearchTuningService.TrainCustomModel method.
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.data_store: StringRequired. The resource name of the Data Store, such as
projects/*/locations/global/collections/default_collection/dataStores/default_data_store.
This field is used to identify the data store where to train the models.
model_type: StringModel to be trained. Supported values are:
- search-tuning: Fine tuning the search system based on data provided.
error_config: Option<ImportErrorConfig>The desired location of errors incurred during the data ingestion and training.
model_id: StringIf not provided, a UUID will be generated.
training_input: Option<TrainingInput>Model training input.
Implementations§
Source§impl TrainCustomModelRequest
impl TrainCustomModelRequest
pub fn new() -> Self
Sourcepub fn set_data_store<T: Into<String>>(self, v: T) -> Self
pub fn set_data_store<T: Into<String>>(self, v: T) -> Self
Sets the value of data_store.
§Example
let x = TrainCustomModelRequest::new().set_data_store("example");Sourcepub fn set_model_type<T: Into<String>>(self, v: T) -> Self
pub fn set_model_type<T: Into<String>>(self, v: T) -> Self
Sets the value of model_type.
§Example
let x = TrainCustomModelRequest::new().set_model_type("example");Sourcepub fn set_error_config<T>(self, v: T) -> Selfwhere
T: Into<ImportErrorConfig>,
pub fn set_error_config<T>(self, v: T) -> Selfwhere
T: Into<ImportErrorConfig>,
Sets the value of error_config.
§Example
use google_cloud_discoveryengine_v1::model::ImportErrorConfig;
let x = TrainCustomModelRequest::new().set_error_config(ImportErrorConfig::default()/* use setters */);Sourcepub fn set_or_clear_error_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ImportErrorConfig>,
pub fn set_or_clear_error_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ImportErrorConfig>,
Sets or clears the value of error_config.
§Example
use google_cloud_discoveryengine_v1::model::ImportErrorConfig;
let x = TrainCustomModelRequest::new().set_or_clear_error_config(Some(ImportErrorConfig::default()/* use setters */));
let x = TrainCustomModelRequest::new().set_or_clear_error_config(None::<ImportErrorConfig>);Sourcepub fn set_model_id<T: Into<String>>(self, v: T) -> Self
pub fn set_model_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_training_input<T: Into<Option<TrainingInput>>>(self, v: T) -> Self
pub fn set_training_input<T: Into<Option<TrainingInput>>>(self, v: T) -> Self
Sets the value of training_input.
Note that all the setters affecting training_input are mutually
exclusive.
§Example
use google_cloud_discoveryengine_v1::model::train_custom_model_request::GcsTrainingInput;
let x = TrainCustomModelRequest::new().set_training_input(Some(
google_cloud_discoveryengine_v1::model::train_custom_model_request::TrainingInput::GcsTrainingInput(GcsTrainingInput::default().into())));Sourcepub fn gcs_training_input(&self) -> Option<&Box<GcsTrainingInput>>
pub fn gcs_training_input(&self) -> Option<&Box<GcsTrainingInput>>
The value of training_input
if it holds a GcsTrainingInput, None if the field is not set or
holds a different branch.
Sourcepub fn set_gcs_training_input<T: Into<Box<GcsTrainingInput>>>(
self,
v: T,
) -> Self
pub fn set_gcs_training_input<T: Into<Box<GcsTrainingInput>>>( self, v: T, ) -> Self
Sets the value of training_input
to hold a GcsTrainingInput.
Note that all the setters affecting training_input are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::train_custom_model_request::GcsTrainingInput;
let x = TrainCustomModelRequest::new().set_gcs_training_input(GcsTrainingInput::default()/* use setters */);
assert!(x.gcs_training_input().is_some());Trait Implementations§
Source§impl Clone for TrainCustomModelRequest
impl Clone for TrainCustomModelRequest
Source§fn clone(&self) -> TrainCustomModelRequest
fn clone(&self) -> TrainCustomModelRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more