aws-sdk-pi 1.101.0

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

/// <p>The list of recommendations for the insight.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Recommendation {
    /// <p>The unique identifier for the recommendation.</p>
    pub recommendation_id: ::std::option::Option<::std::string::String>,
    /// <p>The recommendation details to help resolve the performance issue. For example, <code>Investigate the following SQLs that contributed to 100% of the total DBLoad during that time period: sql-id</code></p>
    pub recommendation_description: ::std::option::Option<::std::string::String>,
}
impl Recommendation {
    /// <p>The unique identifier for the recommendation.</p>
    pub fn recommendation_id(&self) -> ::std::option::Option<&str> {
        self.recommendation_id.as_deref()
    }
    /// <p>The recommendation details to help resolve the performance issue. For example, <code>Investigate the following SQLs that contributed to 100% of the total DBLoad during that time period: sql-id</code></p>
    pub fn recommendation_description(&self) -> ::std::option::Option<&str> {
        self.recommendation_description.as_deref()
    }
}
impl ::std::fmt::Debug for Recommendation {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Recommendation");
        formatter.field("recommendation_id", &self.recommendation_id);
        formatter.field("recommendation_description", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
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)]
#[non_exhaustive]
pub struct RecommendationBuilder {
    pub(crate) recommendation_id: ::std::option::Option<::std::string::String>,
    pub(crate) recommendation_description: ::std::option::Option<::std::string::String>,
}
impl RecommendationBuilder {
    /// <p>The unique identifier for the recommendation.</p>
    pub fn recommendation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.recommendation_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the recommendation.</p>
    pub fn set_recommendation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.recommendation_id = input;
        self
    }
    /// <p>The unique identifier for the recommendation.</p>
    pub fn get_recommendation_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.recommendation_id
    }
    /// <p>The recommendation details to help resolve the performance issue. For example, <code>Investigate the following SQLs that contributed to 100% of the total DBLoad during that time period: sql-id</code></p>
    pub fn recommendation_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.recommendation_description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The recommendation details to help resolve the performance issue. For example, <code>Investigate the following SQLs that contributed to 100% of the total DBLoad during that time period: sql-id</code></p>
    pub fn set_recommendation_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.recommendation_description = input;
        self
    }
    /// <p>The recommendation details to help resolve the performance issue. For example, <code>Investigate the following SQLs that contributed to 100% of the total DBLoad during that time period: sql-id</code></p>
    pub fn get_recommendation_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.recommendation_description
    }
    /// Consumes the builder and constructs a [`Recommendation`](crate::types::Recommendation).
    pub fn build(self) -> crate::types::Recommendation {
        crate::types::Recommendation {
            recommendation_id: self.recommendation_id,
            recommendation_description: self.recommendation_description,
        }
    }
}
impl ::std::fmt::Debug for RecommendationBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("RecommendationBuilder");
        formatter.field("recommendation_id", &self.recommendation_id);
        formatter.field("recommendation_description", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}