#[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
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(format!("projects/{project_id}/locations/{location_id}/dataStores/{data_store_id}"));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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TrainCustomModelRequest
impl Debug for TrainCustomModelRequest
Source§impl Default for TrainCustomModelRequest
impl Default for TrainCustomModelRequest
Source§fn default() -> TrainCustomModelRequest
fn default() -> TrainCustomModelRequest
Source§impl Message for TrainCustomModelRequest
impl Message for TrainCustomModelRequest
Source§impl PartialEq for TrainCustomModelRequest
impl PartialEq for TrainCustomModelRequest
impl StructuralPartialEq for TrainCustomModelRequest
Auto Trait Implementations§
impl Freeze for TrainCustomModelRequest
impl RefUnwindSafe for TrainCustomModelRequest
impl Send for TrainCustomModelRequest
impl Sync for TrainCustomModelRequest
impl Unpin for TrainCustomModelRequest
impl UnsafeUnpin for TrainCustomModelRequest
impl UnwindSafe for TrainCustomModelRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request