aws-sdk-personalize 1.102.0

AWS SDK for Amazon Personalize
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListRecipesInput {
    /// <p>The default is <code>SERVICE</code>.</p>
    pub recipe_provider: ::std::option::Option<crate::types::RecipeProvider>,
    /// <p>A token returned from the previous call to <code>ListRecipes</code> for getting the next set of recipes (if they exist).</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of recipes to return.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>Filters returned recipes by domain for a Domain dataset group. Only recipes (Domain dataset group use cases) for this domain are included in the response. If you don't specify a domain, all recipes are returned.</p>
    pub domain: ::std::option::Option<crate::types::Domain>,
}
impl ListRecipesInput {
    /// <p>The default is <code>SERVICE</code>.</p>
    pub fn recipe_provider(&self) -> ::std::option::Option<&crate::types::RecipeProvider> {
        self.recipe_provider.as_ref()
    }
    /// <p>A token returned from the previous call to <code>ListRecipes</code> for getting the next set of recipes (if they exist).</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The maximum number of recipes to return.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>Filters returned recipes by domain for a Domain dataset group. Only recipes (Domain dataset group use cases) for this domain are included in the response. If you don't specify a domain, all recipes are returned.</p>
    pub fn domain(&self) -> ::std::option::Option<&crate::types::Domain> {
        self.domain.as_ref()
    }
}
impl ListRecipesInput {
    /// Creates a new builder-style object to manufacture [`ListRecipesInput`](crate::operation::list_recipes::ListRecipesInput).
    pub fn builder() -> crate::operation::list_recipes::builders::ListRecipesInputBuilder {
        crate::operation::list_recipes::builders::ListRecipesInputBuilder::default()
    }
}

/// A builder for [`ListRecipesInput`](crate::operation::list_recipes::ListRecipesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListRecipesInputBuilder {
    pub(crate) recipe_provider: ::std::option::Option<crate::types::RecipeProvider>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) domain: ::std::option::Option<crate::types::Domain>,
}
impl ListRecipesInputBuilder {
    /// <p>The default is <code>SERVICE</code>.</p>
    pub fn recipe_provider(mut self, input: crate::types::RecipeProvider) -> Self {
        self.recipe_provider = ::std::option::Option::Some(input);
        self
    }
    /// <p>The default is <code>SERVICE</code>.</p>
    pub fn set_recipe_provider(mut self, input: ::std::option::Option<crate::types::RecipeProvider>) -> Self {
        self.recipe_provider = input;
        self
    }
    /// <p>The default is <code>SERVICE</code>.</p>
    pub fn get_recipe_provider(&self) -> &::std::option::Option<crate::types::RecipeProvider> {
        &self.recipe_provider
    }
    /// <p>A token returned from the previous call to <code>ListRecipes</code> for getting the next set of recipes (if they exist).</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A token returned from the previous call to <code>ListRecipes</code> for getting the next set of recipes (if they exist).</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>A token returned from the previous call to <code>ListRecipes</code> for getting the next set of recipes (if they exist).</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The maximum number of recipes to return.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of recipes to return.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of recipes to return.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>Filters returned recipes by domain for a Domain dataset group. Only recipes (Domain dataset group use cases) for this domain are included in the response. If you don't specify a domain, all recipes are returned.</p>
    pub fn domain(mut self, input: crate::types::Domain) -> Self {
        self.domain = ::std::option::Option::Some(input);
        self
    }
    /// <p>Filters returned recipes by domain for a Domain dataset group. Only recipes (Domain dataset group use cases) for this domain are included in the response. If you don't specify a domain, all recipes are returned.</p>
    pub fn set_domain(mut self, input: ::std::option::Option<crate::types::Domain>) -> Self {
        self.domain = input;
        self
    }
    /// <p>Filters returned recipes by domain for a Domain dataset group. Only recipes (Domain dataset group use cases) for this domain are included in the response. If you don't specify a domain, all recipes are returned.</p>
    pub fn get_domain(&self) -> &::std::option::Option<crate::types::Domain> {
        &self.domain
    }
    /// Consumes the builder and constructs a [`ListRecipesInput`](crate::operation::list_recipes::ListRecipesInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::list_recipes::ListRecipesInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_recipes::ListRecipesInput {
            recipe_provider: self.recipe_provider,
            next_token: self.next_token,
            max_results: self.max_results,
            domain: self.domain,
        })
    }
}