#[non_exhaustive]pub struct RecommendationTriggerBuilder { /* private fields */ }Expand description
A builder for RecommendationTrigger.
Implementations§
source§impl RecommendationTriggerBuilder
impl RecommendationTriggerBuilder
sourcepub fn id(self, input: impl Into<String>) -> Self
pub fn id(self, input: impl Into<String>) -> Self
The identifier of the recommendation trigger.
This field is required.sourcepub fn set_id(self, input: Option<String>) -> Self
pub fn set_id(self, input: Option<String>) -> Self
The identifier of the recommendation trigger.
sourcepub fn type(self, input: RecommendationTriggerType) -> Self
pub fn type(self, input: RecommendationTriggerType) -> Self
The type of recommendation trigger.
This field is required.sourcepub fn set_type(self, input: Option<RecommendationTriggerType>) -> Self
pub fn set_type(self, input: Option<RecommendationTriggerType>) -> Self
The type of recommendation trigger.
sourcepub fn get_type(&self) -> &Option<RecommendationTriggerType>
pub fn get_type(&self) -> &Option<RecommendationTriggerType>
The type of recommendation trigger.
sourcepub fn source(self, input: RecommendationSourceType) -> Self
pub fn source(self, input: RecommendationSourceType) -> Self
The source of the recommendation trigger.
-
ISSUE_DETECTION: The corresponding recommendations were triggered by a Contact Lens issue.
-
RULE_EVALUATION: The corresponding recommendations were triggered by a Contact Lens rule.
sourcepub fn set_source(self, input: Option<RecommendationSourceType>) -> Self
pub fn set_source(self, input: Option<RecommendationSourceType>) -> Self
The source of the recommendation trigger.
-
ISSUE_DETECTION: The corresponding recommendations were triggered by a Contact Lens issue.
-
RULE_EVALUATION: The corresponding recommendations were triggered by a Contact Lens rule.
sourcepub fn get_source(&self) -> &Option<RecommendationSourceType>
pub fn get_source(&self) -> &Option<RecommendationSourceType>
The source of the recommendation trigger.
-
ISSUE_DETECTION: The corresponding recommendations were triggered by a Contact Lens issue.
-
RULE_EVALUATION: The corresponding recommendations were triggered by a Contact Lens rule.
sourcepub fn data(self, input: RecommendationTriggerData) -> Self
pub fn data(self, input: RecommendationTriggerData) -> Self
A union type containing information related to the trigger.
This field is required.sourcepub fn set_data(self, input: Option<RecommendationTriggerData>) -> Self
pub fn set_data(self, input: Option<RecommendationTriggerData>) -> Self
A union type containing information related to the trigger.
sourcepub fn get_data(&self) -> &Option<RecommendationTriggerData>
pub fn get_data(&self) -> &Option<RecommendationTriggerData>
A union type containing information related to the trigger.
sourcepub fn recommendation_ids(self, input: impl Into<String>) -> Self
pub fn recommendation_ids(self, input: impl Into<String>) -> Self
Appends an item to recommendation_ids.
To override the contents of this collection use set_recommendation_ids.
The identifiers of the recommendations.
sourcepub fn set_recommendation_ids(self, input: Option<Vec<String>>) -> Self
pub fn set_recommendation_ids(self, input: Option<Vec<String>>) -> Self
The identifiers of the recommendations.
sourcepub fn get_recommendation_ids(&self) -> &Option<Vec<String>>
pub fn get_recommendation_ids(&self) -> &Option<Vec<String>>
The identifiers of the recommendations.
sourcepub fn build(self) -> Result<RecommendationTrigger, BuildError>
pub fn build(self) -> Result<RecommendationTrigger, BuildError>
Consumes the builder and constructs a RecommendationTrigger.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for RecommendationTriggerBuilder
impl Clone for RecommendationTriggerBuilder
source§fn clone(&self) -> RecommendationTriggerBuilder
fn clone(&self) -> RecommendationTriggerBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for RecommendationTriggerBuilder
impl Debug for RecommendationTriggerBuilder
source§impl Default for RecommendationTriggerBuilder
impl Default for RecommendationTriggerBuilder
source§fn default() -> RecommendationTriggerBuilder
fn default() -> RecommendationTriggerBuilder
source§impl PartialEq for RecommendationTriggerBuilder
impl PartialEq for RecommendationTriggerBuilder
source§fn eq(&self, other: &RecommendationTriggerBuilder) -> bool
fn eq(&self, other: &RecommendationTriggerBuilder) -> bool
self and other values to be equal, and is used
by ==.