#[non_exhaustive]pub struct RecommenderConfig {
pub name: String,
pub recommender_generation_config: Option<RecommenderGenerationConfig>,
pub etag: String,
pub update_time: Option<Timestamp>,
pub revision_id: String,
pub annotations: HashMap<String, String>,
pub display_name: String,
/* private fields */
}Expand description
Configuration for a Recommender.
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: StringName of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config
recommender_generation_config: Option<RecommenderGenerationConfig>RecommenderGenerationConfig which configures the Generation of recommendations for this recommender.
etag: StringFingerprint of the RecommenderConfig. Provides optimistic locking when updating.
update_time: Option<Timestamp>Last time when the config was updated.
revision_id: StringOutput only. Immutable. The revision ID of the config. A new revision is committed whenever the config is changed in any way. The format is an 8-character hexadecimal string.
annotations: HashMap<String, String>Allows clients to store small amounts of arbitrary data. Annotations must follow the Kubernetes syntax. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.
display_name: StringA user-settable field to provide a human-readable name to be used in user interfaces.
Implementations§
Source§impl RecommenderConfig
impl RecommenderConfig
pub fn new() -> Self
Sourcepub fn set_recommender_generation_config<T>(self, v: T) -> Selfwhere
T: Into<RecommenderGenerationConfig>,
pub fn set_recommender_generation_config<T>(self, v: T) -> Selfwhere
T: Into<RecommenderGenerationConfig>,
Sets the value of recommender_generation_config.
§Example
use google_cloud_recommender_v1::model::RecommenderGenerationConfig;
let x = RecommenderConfig::new().set_recommender_generation_config(RecommenderGenerationConfig::default()/* use setters */);Sourcepub fn set_or_clear_recommender_generation_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RecommenderGenerationConfig>,
pub fn set_or_clear_recommender_generation_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RecommenderGenerationConfig>,
Sets or clears the value of recommender_generation_config.
§Example
use google_cloud_recommender_v1::model::RecommenderGenerationConfig;
let x = RecommenderConfig::new().set_or_clear_recommender_generation_config(Some(RecommenderGenerationConfig::default()/* use setters */));
let x = RecommenderConfig::new().set_or_clear_recommender_generation_config(None::<RecommenderGenerationConfig>);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 = RecommenderConfig::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 = RecommenderConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = RecommenderConfig::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_revision_id<T: Into<String>>(self, v: T) -> Self
pub fn set_revision_id<T: Into<String>>(self, v: T) -> Self
Sets the value of revision_id.
§Example
let x = RecommenderConfig::new().set_revision_id("example");Sourcepub fn set_annotations<T, K, V>(self, v: T) -> Self
pub fn set_annotations<T, K, V>(self, v: T) -> Self
Sets the value of annotations.
§Example
let x = RecommenderConfig::new().set_annotations([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
§Example
let x = RecommenderConfig::new().set_display_name("example");Trait Implementations§
Source§impl Clone for RecommenderConfig
impl Clone for RecommenderConfig
Source§fn clone(&self) -> RecommenderConfig
fn clone(&self) -> RecommenderConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more