aws-sdk-computeoptimizer 1.102.0

AWS SDK for AWS Compute Optimizer
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 GetRecommendationSummariesOutput {
    /// <p>The token to use to advance to the next page of recommendation summaries.</p>
    /// <p>This value is null when there are no more pages of recommendation summaries to return.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>An array of objects that summarize a recommendation.</p>
    pub recommendation_summaries: ::std::option::Option<::std::vec::Vec<crate::types::RecommendationSummary>>,
    _request_id: Option<String>,
}
impl GetRecommendationSummariesOutput {
    /// <p>The token to use to advance to the next page of recommendation summaries.</p>
    /// <p>This value is null when there are no more pages of recommendation summaries to return.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>An array of objects that summarize a recommendation.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.recommendation_summaries.is_none()`.
    pub fn recommendation_summaries(&self) -> &[crate::types::RecommendationSummary] {
        self.recommendation_summaries.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for GetRecommendationSummariesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetRecommendationSummariesOutput {
    /// Creates a new builder-style object to manufacture [`GetRecommendationSummariesOutput`](crate::operation::get_recommendation_summaries::GetRecommendationSummariesOutput).
    pub fn builder() -> crate::operation::get_recommendation_summaries::builders::GetRecommendationSummariesOutputBuilder {
        crate::operation::get_recommendation_summaries::builders::GetRecommendationSummariesOutputBuilder::default()
    }
}

/// A builder for [`GetRecommendationSummariesOutput`](crate::operation::get_recommendation_summaries::GetRecommendationSummariesOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetRecommendationSummariesOutputBuilder {
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) recommendation_summaries: ::std::option::Option<::std::vec::Vec<crate::types::RecommendationSummary>>,
    _request_id: Option<String>,
}
impl GetRecommendationSummariesOutputBuilder {
    /// <p>The token to use to advance to the next page of recommendation summaries.</p>
    /// <p>This value is null when there are no more pages of recommendation summaries to return.</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 use to advance to the next page of recommendation summaries.</p>
    /// <p>This value is null when there are no more pages of recommendation summaries to return.</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 use to advance to the next page of recommendation summaries.</p>
    /// <p>This value is null when there are no more pages of recommendation summaries to return.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Appends an item to `recommendation_summaries`.
    ///
    /// To override the contents of this collection use [`set_recommendation_summaries`](Self::set_recommendation_summaries).
    ///
    /// <p>An array of objects that summarize a recommendation.</p>
    pub fn recommendation_summaries(mut self, input: crate::types::RecommendationSummary) -> Self {
        let mut v = self.recommendation_summaries.unwrap_or_default();
        v.push(input);
        self.recommendation_summaries = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of objects that summarize a recommendation.</p>
    pub fn set_recommendation_summaries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RecommendationSummary>>) -> Self {
        self.recommendation_summaries = input;
        self
    }
    /// <p>An array of objects that summarize a recommendation.</p>
    pub fn get_recommendation_summaries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RecommendationSummary>> {
        &self.recommendation_summaries
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetRecommendationSummariesOutput`](crate::operation::get_recommendation_summaries::GetRecommendationSummariesOutput).
    pub fn build(self) -> crate::operation::get_recommendation_summaries::GetRecommendationSummariesOutput {
        crate::operation::get_recommendation_summaries::GetRecommendationSummariesOutput {
            next_token: self.next_token,
            recommendation_summaries: self.recommendation_summaries,
            _request_id: self._request_id,
        }
    }
}