aws-sdk-customerprofiles 1.119.0

AWS SDK for Amazon Connect Customer Profiles
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents a single recommendation generated by the recommender system.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Recommendation {
    /// <p>The catalog item being recommended, including its complete details and attributes.</p>
    pub catalog_item: ::std::option::Option<crate::types::CatalogItem>,
    /// <p>Recommendation Score between 0 and 1.</p>
    pub score: ::std::option::Option<f64>,
}
impl Recommendation {
    /// <p>The catalog item being recommended, including its complete details and attributes.</p>
    pub fn catalog_item(&self) -> ::std::option::Option<&crate::types::CatalogItem> {
        self.catalog_item.as_ref()
    }
    /// <p>Recommendation Score between 0 and 1.</p>
    pub fn score(&self) -> ::std::option::Option<f64> {
        self.score
    }
}
impl Recommendation {
    /// Creates a new builder-style object to manufacture [`Recommendation`](crate::types::Recommendation).
    pub fn builder() -> crate::types::builders::RecommendationBuilder {
        crate::types::builders::RecommendationBuilder::default()
    }
}

/// A builder for [`Recommendation`](crate::types::Recommendation).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RecommendationBuilder {
    pub(crate) catalog_item: ::std::option::Option<crate::types::CatalogItem>,
    pub(crate) score: ::std::option::Option<f64>,
}
impl RecommendationBuilder {
    /// <p>The catalog item being recommended, including its complete details and attributes.</p>
    pub fn catalog_item(mut self, input: crate::types::CatalogItem) -> Self {
        self.catalog_item = ::std::option::Option::Some(input);
        self
    }
    /// <p>The catalog item being recommended, including its complete details and attributes.</p>
    pub fn set_catalog_item(mut self, input: ::std::option::Option<crate::types::CatalogItem>) -> Self {
        self.catalog_item = input;
        self
    }
    /// <p>The catalog item being recommended, including its complete details and attributes.</p>
    pub fn get_catalog_item(&self) -> &::std::option::Option<crate::types::CatalogItem> {
        &self.catalog_item
    }
    /// <p>Recommendation Score between 0 and 1.</p>
    pub fn score(mut self, input: f64) -> Self {
        self.score = ::std::option::Option::Some(input);
        self
    }
    /// <p>Recommendation Score between 0 and 1.</p>
    pub fn set_score(mut self, input: ::std::option::Option<f64>) -> Self {
        self.score = input;
        self
    }
    /// <p>Recommendation Score between 0 and 1.</p>
    pub fn get_score(&self) -> &::std::option::Option<f64> {
        &self.score
    }
    /// Consumes the builder and constructs a [`Recommendation`](crate::types::Recommendation).
    pub fn build(self) -> crate::types::Recommendation {
        crate::types::Recommendation {
            catalog_item: self.catalog_item,
            score: self.score,
        }
    }
}