aws-sdk-costoptimizationhub 1.72.0

AWS SDK for Cost Optimization Hub
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 ListRecommendationsInput {
    /// <p>The constraints that you want all returned recommendations to match.</p>
    pub filter: ::std::option::Option<crate::types::Filter>,
    /// <p>The ordering of recommendations by a dimension.</p>
    pub order_by: ::std::option::Option<crate::types::OrderBy>,
    /// <p>List of all recommendations for a resource, or a single recommendation if de-duped by <code>resourceId</code>.</p>
    pub include_all_recommendations: ::std::option::Option<bool>,
    /// <p>The maximum number of recommendations that are returned for the request.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>The token to retrieve the next set of results.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl ListRecommendationsInput {
    /// <p>The constraints that you want all returned recommendations to match.</p>
    pub fn filter(&self) -> ::std::option::Option<&crate::types::Filter> {
        self.filter.as_ref()
    }
    /// <p>The ordering of recommendations by a dimension.</p>
    pub fn order_by(&self) -> ::std::option::Option<&crate::types::OrderBy> {
        self.order_by.as_ref()
    }
    /// <p>List of all recommendations for a resource, or a single recommendation if de-duped by <code>resourceId</code>.</p>
    pub fn include_all_recommendations(&self) -> ::std::option::Option<bool> {
        self.include_all_recommendations
    }
    /// <p>The maximum number of recommendations that are returned for the request.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>The token to retrieve the next set of results.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ListRecommendationsInput {
    /// Creates a new builder-style object to manufacture [`ListRecommendationsInput`](crate::operation::list_recommendations::ListRecommendationsInput).
    pub fn builder() -> crate::operation::list_recommendations::builders::ListRecommendationsInputBuilder {
        crate::operation::list_recommendations::builders::ListRecommendationsInputBuilder::default()
    }
}

/// A builder for [`ListRecommendationsInput`](crate::operation::list_recommendations::ListRecommendationsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListRecommendationsInputBuilder {
    pub(crate) filter: ::std::option::Option<crate::types::Filter>,
    pub(crate) order_by: ::std::option::Option<crate::types::OrderBy>,
    pub(crate) include_all_recommendations: ::std::option::Option<bool>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl ListRecommendationsInputBuilder {
    /// <p>The constraints that you want all returned recommendations to match.</p>
    pub fn filter(mut self, input: crate::types::Filter) -> Self {
        self.filter = ::std::option::Option::Some(input);
        self
    }
    /// <p>The constraints that you want all returned recommendations to match.</p>
    pub fn set_filter(mut self, input: ::std::option::Option<crate::types::Filter>) -> Self {
        self.filter = input;
        self
    }
    /// <p>The constraints that you want all returned recommendations to match.</p>
    pub fn get_filter(&self) -> &::std::option::Option<crate::types::Filter> {
        &self.filter
    }
    /// <p>The ordering of recommendations by a dimension.</p>
    pub fn order_by(mut self, input: crate::types::OrderBy) -> Self {
        self.order_by = ::std::option::Option::Some(input);
        self
    }
    /// <p>The ordering of recommendations by a dimension.</p>
    pub fn set_order_by(mut self, input: ::std::option::Option<crate::types::OrderBy>) -> Self {
        self.order_by = input;
        self
    }
    /// <p>The ordering of recommendations by a dimension.</p>
    pub fn get_order_by(&self) -> &::std::option::Option<crate::types::OrderBy> {
        &self.order_by
    }
    /// <p>List of all recommendations for a resource, or a single recommendation if de-duped by <code>resourceId</code>.</p>
    pub fn include_all_recommendations(mut self, input: bool) -> Self {
        self.include_all_recommendations = ::std::option::Option::Some(input);
        self
    }
    /// <p>List of all recommendations for a resource, or a single recommendation if de-duped by <code>resourceId</code>.</p>
    pub fn set_include_all_recommendations(mut self, input: ::std::option::Option<bool>) -> Self {
        self.include_all_recommendations = input;
        self
    }
    /// <p>List of all recommendations for a resource, or a single recommendation if de-duped by <code>resourceId</code>.</p>
    pub fn get_include_all_recommendations(&self) -> &::std::option::Option<bool> {
        &self.include_all_recommendations
    }
    /// <p>The maximum number of recommendations that are returned for the request.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of recommendations that are returned for the request.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of recommendations that are returned for the request.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>The token to retrieve the next set of results.</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>The token to retrieve the next set of results.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The token to retrieve the next set of results.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`ListRecommendationsInput`](crate::operation::list_recommendations::ListRecommendationsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_recommendations::ListRecommendationsInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::list_recommendations::ListRecommendationsInput {
            filter: self.filter,
            order_by: self.order_by,
            include_all_recommendations: self.include_all_recommendations,
            max_results: self.max_results,
            next_token: self.next_token,
        })
    }
}