#[non_exhaustive]pub struct Engine {
pub name: String,
pub display_name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub data_store_ids: Vec<String>,
pub solution_type: SolutionType,
pub industry_vertical: IndustryVertical,
pub common_config: Option<CommonConfig>,
pub disable_analytics: bool,
pub engine_config: Option<EngineConfig>,
pub engine_metadata: Option<EngineMetadata>,
/* private fields */
}engine-service only.Expand description
Metadata that describes the training and serving parameters of an Engine.
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: StringImmutable. Identifier. The fully qualified resource name of the engine.
This field must be a UTF-8 encoded string with a length limit of 1024 characters.
Format:
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}
engine should be 1-63 characters, and valid characters are
/[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
display_name: StringRequired. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.
create_time: Option<Timestamp>Output only. Timestamp the Recommendation Engine was created at.
update_time: Option<Timestamp>Output only. Timestamp the Recommendation Engine was last updated.
data_store_ids: Vec<String>Optional. The data stores associated with this engine.
For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store.
If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same [Collection][google.cloud.discoveryengine.v1.Collection] can be associated here.
Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.
solution_type: SolutionTypeRequired. The solutions of the engine.
industry_vertical: IndustryVerticalOptional. The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: Vertical on Engine has to match vertical of the DataStore linked to the engine.
common_config: Option<CommonConfig>Common config spec that specifies the metadata of the engine.
disable_analytics: boolOptional. Whether to disable analytics for searches performed on this engine.
engine_config: Option<EngineConfig>Additional config specs that defines the behavior of the engine.
engine_metadata: Option<EngineMetadata>Engine metadata to monitor the status of the engine.
Implementations§
Source§impl Engine
impl Engine
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_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 = Engine::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 = Engine::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Engine::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 = Engine::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 = Engine::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Engine::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_data_store_ids<T, V>(self, v: T) -> Self
pub fn set_data_store_ids<T, V>(self, v: T) -> Self
Sets the value of data_store_ids.
§Example
let x = Engine::new().set_data_store_ids(["a", "b", "c"]);Sourcepub fn set_solution_type<T: Into<SolutionType>>(self, v: T) -> Self
pub fn set_solution_type<T: Into<SolutionType>>(self, v: T) -> Self
Sets the value of solution_type.
§Example
use google_cloud_discoveryengine_v1::model::SolutionType;
let x0 = Engine::new().set_solution_type(SolutionType::Recommendation);
let x1 = Engine::new().set_solution_type(SolutionType::Search);
let x2 = Engine::new().set_solution_type(SolutionType::Chat);Sourcepub fn set_industry_vertical<T: Into<IndustryVertical>>(self, v: T) -> Self
pub fn set_industry_vertical<T: Into<IndustryVertical>>(self, v: T) -> Self
Sets the value of industry_vertical.
§Example
use google_cloud_discoveryengine_v1::model::IndustryVertical;
let x0 = Engine::new().set_industry_vertical(IndustryVertical::Generic);
let x1 = Engine::new().set_industry_vertical(IndustryVertical::Media);
let x2 = Engine::new().set_industry_vertical(IndustryVertical::HealthcareFhir);Sourcepub fn set_common_config<T>(self, v: T) -> Selfwhere
T: Into<CommonConfig>,
pub fn set_common_config<T>(self, v: T) -> Selfwhere
T: Into<CommonConfig>,
Sets the value of common_config.
§Example
use google_cloud_discoveryengine_v1::model::engine::CommonConfig;
let x = Engine::new().set_common_config(CommonConfig::default()/* use setters */);Sourcepub fn set_or_clear_common_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<CommonConfig>,
pub fn set_or_clear_common_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<CommonConfig>,
Sets or clears the value of common_config.
§Example
use google_cloud_discoveryengine_v1::model::engine::CommonConfig;
let x = Engine::new().set_or_clear_common_config(Some(CommonConfig::default()/* use setters */));
let x = Engine::new().set_or_clear_common_config(None::<CommonConfig>);Sourcepub fn set_disable_analytics<T: Into<bool>>(self, v: T) -> Self
pub fn set_disable_analytics<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_engine_config<T: Into<Option<EngineConfig>>>(self, v: T) -> Self
pub fn set_engine_config<T: Into<Option<EngineConfig>>>(self, v: T) -> Self
Sets the value of engine_config.
Note that all the setters affecting engine_config are mutually
exclusive.
§Example
use google_cloud_discoveryengine_v1::model::engine::ChatEngineConfig;
let x = Engine::new().set_engine_config(Some(
google_cloud_discoveryengine_v1::model::engine::EngineConfig::ChatEngineConfig(ChatEngineConfig::default().into())));Sourcepub fn chat_engine_config(&self) -> Option<&Box<ChatEngineConfig>>
pub fn chat_engine_config(&self) -> Option<&Box<ChatEngineConfig>>
The value of engine_config
if it holds a ChatEngineConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_chat_engine_config<T: Into<Box<ChatEngineConfig>>>(
self,
v: T,
) -> Self
pub fn set_chat_engine_config<T: Into<Box<ChatEngineConfig>>>( self, v: T, ) -> Self
Sets the value of engine_config
to hold a ChatEngineConfig.
Note that all the setters affecting engine_config are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::engine::ChatEngineConfig;
let x = Engine::new().set_chat_engine_config(ChatEngineConfig::default()/* use setters */);
assert!(x.chat_engine_config().is_some());
assert!(x.search_engine_config().is_none());
assert!(x.media_recommendation_engine_config().is_none());Sourcepub fn search_engine_config(&self) -> Option<&Box<SearchEngineConfig>>
pub fn search_engine_config(&self) -> Option<&Box<SearchEngineConfig>>
The value of engine_config
if it holds a SearchEngineConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_search_engine_config<T: Into<Box<SearchEngineConfig>>>(
self,
v: T,
) -> Self
pub fn set_search_engine_config<T: Into<Box<SearchEngineConfig>>>( self, v: T, ) -> Self
Sets the value of engine_config
to hold a SearchEngineConfig.
Note that all the setters affecting engine_config are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::engine::SearchEngineConfig;
let x = Engine::new().set_search_engine_config(SearchEngineConfig::default()/* use setters */);
assert!(x.search_engine_config().is_some());
assert!(x.chat_engine_config().is_none());
assert!(x.media_recommendation_engine_config().is_none());Sourcepub fn media_recommendation_engine_config(
&self,
) -> Option<&Box<MediaRecommendationEngineConfig>>
pub fn media_recommendation_engine_config( &self, ) -> Option<&Box<MediaRecommendationEngineConfig>>
The value of engine_config
if it holds a MediaRecommendationEngineConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_media_recommendation_engine_config<T: Into<Box<MediaRecommendationEngineConfig>>>(
self,
v: T,
) -> Self
pub fn set_media_recommendation_engine_config<T: Into<Box<MediaRecommendationEngineConfig>>>( self, v: T, ) -> Self
Sets the value of engine_config
to hold a MediaRecommendationEngineConfig.
Note that all the setters affecting engine_config are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::engine::MediaRecommendationEngineConfig;
let x = Engine::new().set_media_recommendation_engine_config(MediaRecommendationEngineConfig::default()/* use setters */);
assert!(x.media_recommendation_engine_config().is_some());
assert!(x.chat_engine_config().is_none());
assert!(x.search_engine_config().is_none());Sourcepub fn set_engine_metadata<T: Into<Option<EngineMetadata>>>(self, v: T) -> Self
pub fn set_engine_metadata<T: Into<Option<EngineMetadata>>>(self, v: T) -> Self
Sets the value of engine_metadata.
Note that all the setters affecting engine_metadata are mutually
exclusive.
§Example
use google_cloud_discoveryengine_v1::model::engine::ChatEngineMetadata;
let x = Engine::new().set_engine_metadata(Some(
google_cloud_discoveryengine_v1::model::engine::EngineMetadata::ChatEngineMetadata(ChatEngineMetadata::default().into())));Sourcepub fn chat_engine_metadata(&self) -> Option<&Box<ChatEngineMetadata>>
pub fn chat_engine_metadata(&self) -> Option<&Box<ChatEngineMetadata>>
The value of engine_metadata
if it holds a ChatEngineMetadata, None if the field is not set or
holds a different branch.
Sourcepub fn set_chat_engine_metadata<T: Into<Box<ChatEngineMetadata>>>(
self,
v: T,
) -> Self
pub fn set_chat_engine_metadata<T: Into<Box<ChatEngineMetadata>>>( self, v: T, ) -> Self
Sets the value of engine_metadata
to hold a ChatEngineMetadata.
Note that all the setters affecting engine_metadata are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::engine::ChatEngineMetadata;
let x = Engine::new().set_chat_engine_metadata(ChatEngineMetadata::default()/* use setters */);
assert!(x.chat_engine_metadata().is_some());