aws-sdk-personalize 1.104.0

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

/// <p>Provides information about a recipe. Each recipe provides an algorithm that Amazon Personalize uses in model training when you use the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateSolution.html">CreateSolution</a> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Recipe {
    /// <p>The name of the recipe.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the recipe.</p>
    pub recipe_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the algorithm that Amazon Personalize uses to train the model.</p>
    pub algorithm_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the FeatureTransformation object.</p>
    pub feature_transformation_arn: ::std::option::Option<::std::string::String>,
    /// <p>The status of the recipe.</p>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>The description of the recipe.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The date and time (in Unix format) that the recipe was created.</p>
    pub creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>One of the following values:</p>
    /// <ul>
    /// <li>
    /// <p>PERSONALIZED_RANKING</p></li>
    /// <li>
    /// <p>RELATED_ITEMS</p></li>
    /// <li>
    /// <p>USER_PERSONALIZATION</p></li>
    /// </ul>
    pub recipe_type: ::std::option::Option<::std::string::String>,
    /// <p>The date and time (in Unix format) that the recipe was last updated.</p>
    pub last_updated_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Recipe {
    /// <p>The name of the recipe.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the recipe.</p>
    pub fn recipe_arn(&self) -> ::std::option::Option<&str> {
        self.recipe_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the algorithm that Amazon Personalize uses to train the model.</p>
    pub fn algorithm_arn(&self) -> ::std::option::Option<&str> {
        self.algorithm_arn.as_deref()
    }
    /// <p>The ARN of the FeatureTransformation object.</p>
    pub fn feature_transformation_arn(&self) -> ::std::option::Option<&str> {
        self.feature_transformation_arn.as_deref()
    }
    /// <p>The status of the recipe.</p>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>The description of the recipe.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The date and time (in Unix format) that the recipe was created.</p>
    pub fn creation_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.creation_date_time.as_ref()
    }
    /// <p>One of the following values:</p>
    /// <ul>
    /// <li>
    /// <p>PERSONALIZED_RANKING</p></li>
    /// <li>
    /// <p>RELATED_ITEMS</p></li>
    /// <li>
    /// <p>USER_PERSONALIZATION</p></li>
    /// </ul>
    pub fn recipe_type(&self) -> ::std::option::Option<&str> {
        self.recipe_type.as_deref()
    }
    /// <p>The date and time (in Unix format) that the recipe was last updated.</p>
    pub fn last_updated_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_date_time.as_ref()
    }
}
impl Recipe {
    /// Creates a new builder-style object to manufacture [`Recipe`](crate::types::Recipe).
    pub fn builder() -> crate::types::builders::RecipeBuilder {
        crate::types::builders::RecipeBuilder::default()
    }
}

/// A builder for [`Recipe`](crate::types::Recipe).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RecipeBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) recipe_arn: ::std::option::Option<::std::string::String>,
    pub(crate) algorithm_arn: ::std::option::Option<::std::string::String>,
    pub(crate) feature_transformation_arn: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) recipe_type: ::std::option::Option<::std::string::String>,
    pub(crate) last_updated_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl RecipeBuilder {
    /// <p>The name of the recipe.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the recipe.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the recipe.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The Amazon Resource Name (ARN) of the recipe.</p>
    pub fn recipe_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.recipe_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the recipe.</p>
    pub fn set_recipe_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.recipe_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the recipe.</p>
    pub fn get_recipe_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.recipe_arn
    }
    /// <p>The Amazon Resource Name (ARN) of the algorithm that Amazon Personalize uses to train the model.</p>
    pub fn algorithm_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.algorithm_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the algorithm that Amazon Personalize uses to train the model.</p>
    pub fn set_algorithm_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.algorithm_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the algorithm that Amazon Personalize uses to train the model.</p>
    pub fn get_algorithm_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.algorithm_arn
    }
    /// <p>The ARN of the FeatureTransformation object.</p>
    pub fn feature_transformation_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.feature_transformation_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the FeatureTransformation object.</p>
    pub fn set_feature_transformation_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.feature_transformation_arn = input;
        self
    }
    /// <p>The ARN of the FeatureTransformation object.</p>
    pub fn get_feature_transformation_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.feature_transformation_arn
    }
    /// <p>The status of the recipe.</p>
    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The status of the recipe.</p>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the recipe.</p>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>The description of the recipe.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the recipe.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the recipe.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The date and time (in Unix format) that the recipe was created.</p>
    pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_date_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time (in Unix format) that the recipe was created.</p>
    pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_date_time = input;
        self
    }
    /// <p>The date and time (in Unix format) that the recipe was created.</p>
    pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_date_time
    }
    /// <p>One of the following values:</p>
    /// <ul>
    /// <li>
    /// <p>PERSONALIZED_RANKING</p></li>
    /// <li>
    /// <p>RELATED_ITEMS</p></li>
    /// <li>
    /// <p>USER_PERSONALIZATION</p></li>
    /// </ul>
    pub fn recipe_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.recipe_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>One of the following values:</p>
    /// <ul>
    /// <li>
    /// <p>PERSONALIZED_RANKING</p></li>
    /// <li>
    /// <p>RELATED_ITEMS</p></li>
    /// <li>
    /// <p>USER_PERSONALIZATION</p></li>
    /// </ul>
    pub fn set_recipe_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.recipe_type = input;
        self
    }
    /// <p>One of the following values:</p>
    /// <ul>
    /// <li>
    /// <p>PERSONALIZED_RANKING</p></li>
    /// <li>
    /// <p>RELATED_ITEMS</p></li>
    /// <li>
    /// <p>USER_PERSONALIZATION</p></li>
    /// </ul>
    pub fn get_recipe_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.recipe_type
    }
    /// <p>The date and time (in Unix format) that the recipe was last updated.</p>
    pub fn last_updated_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated_date_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time (in Unix format) that the recipe was last updated.</p>
    pub fn set_last_updated_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated_date_time = input;
        self
    }
    /// <p>The date and time (in Unix format) that the recipe was last updated.</p>
    pub fn get_last_updated_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_date_time
    }
    /// Consumes the builder and constructs a [`Recipe`](crate::types::Recipe).
    pub fn build(self) -> crate::types::Recipe {
        crate::types::Recipe {
            name: self.name,
            recipe_arn: self.recipe_arn,
            algorithm_arn: self.algorithm_arn,
            feature_transformation_arn: self.feature_transformation_arn,
            status: self.status,
            description: self.description,
            creation_date_time: self.creation_date_time,
            recipe_type: self.recipe_type,
            last_updated_date_time: self.last_updated_date_time,
        }
    }
}