aws-sdk-redshift 1.106.0

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

/// <p>An Amazon Redshift Advisor recommended action on the Amazon Redshift cluster.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Recommendation {
    /// <p>A unique identifier of the Advisor recommendation.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the cluster for which the recommendation is returned.</p>
    pub cluster_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Redshift cluster namespace ARN for which the recommendations is returned.</p>
    pub namespace_arn: ::std::option::Option<::std::string::String>,
    /// <p>The date and time (UTC) that the recommendation was created.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The type of Advisor recommendation.</p>
    pub recommendation_type: ::std::option::Option<::std::string::String>,
    /// <p>The title of the recommendation.</p>
    pub title: ::std::option::Option<::std::string::String>,
    /// <p>The description of the recommendation.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The description of what was observed about your cluster.</p>
    pub observation: ::std::option::Option<::std::string::String>,
    /// <p>The scale of the impact that the Advisor recommendation has to the performance and cost of the cluster.</p>
    pub impact_ranking: ::std::option::Option<crate::types::ImpactRankingType>,
    /// <p>The description of the recommendation.</p>
    pub recommendation_text: ::std::option::Option<::std::string::String>,
    /// <p>List of Amazon Redshift recommended actions.</p>
    pub recommended_actions: ::std::option::Option<::std::vec::Vec<crate::types::RecommendedAction>>,
    /// <p>List of helpful links for more information about the Advisor recommendation.</p>
    pub reference_links: ::std::option::Option<::std::vec::Vec<crate::types::ReferenceLink>>,
}
impl Recommendation {
    /// <p>A unique identifier of the Advisor recommendation.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The unique identifier of the cluster for which the recommendation is returned.</p>
    pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
        self.cluster_identifier.as_deref()
    }
    /// <p>The Amazon Redshift cluster namespace ARN for which the recommendations is returned.</p>
    pub fn namespace_arn(&self) -> ::std::option::Option<&str> {
        self.namespace_arn.as_deref()
    }
    /// <p>The date and time (UTC) that the recommendation was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The type of Advisor recommendation.</p>
    pub fn recommendation_type(&self) -> ::std::option::Option<&str> {
        self.recommendation_type.as_deref()
    }
    /// <p>The title of the recommendation.</p>
    pub fn title(&self) -> ::std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The description of the recommendation.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The description of what was observed about your cluster.</p>
    pub fn observation(&self) -> ::std::option::Option<&str> {
        self.observation.as_deref()
    }
    /// <p>The scale of the impact that the Advisor recommendation has to the performance and cost of the cluster.</p>
    pub fn impact_ranking(&self) -> ::std::option::Option<&crate::types::ImpactRankingType> {
        self.impact_ranking.as_ref()
    }
    /// <p>The description of the recommendation.</p>
    pub fn recommendation_text(&self) -> ::std::option::Option<&str> {
        self.recommendation_text.as_deref()
    }
    /// <p>List of Amazon Redshift recommended actions.</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 `.recommended_actions.is_none()`.
    pub fn recommended_actions(&self) -> &[crate::types::RecommendedAction] {
        self.recommended_actions.as_deref().unwrap_or_default()
    }
    /// <p>List of helpful links for more information about the Advisor 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 `.reference_links.is_none()`.
    pub fn reference_links(&self) -> &[crate::types::ReferenceLink] {
        self.reference_links.as_deref().unwrap_or_default()
    }
}
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, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RecommendationBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) namespace_arn: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) recommendation_type: ::std::option::Option<::std::string::String>,
    pub(crate) title: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) observation: ::std::option::Option<::std::string::String>,
    pub(crate) impact_ranking: ::std::option::Option<crate::types::ImpactRankingType>,
    pub(crate) recommendation_text: ::std::option::Option<::std::string::String>,
    pub(crate) recommended_actions: ::std::option::Option<::std::vec::Vec<crate::types::RecommendedAction>>,
    pub(crate) reference_links: ::std::option::Option<::std::vec::Vec<crate::types::ReferenceLink>>,
}
impl RecommendationBuilder {
    /// <p>A unique identifier of the Advisor recommendation.</p>
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier of the Advisor recommendation.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>A unique identifier of the Advisor recommendation.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The unique identifier of the cluster for which the recommendation is returned.</p>
    pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the cluster for which the recommendation is returned.</p>
    pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_identifier = input;
        self
    }
    /// <p>The unique identifier of the cluster for which the recommendation is returned.</p>
    pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_identifier
    }
    /// <p>The Amazon Redshift cluster namespace ARN for which the recommendations is returned.</p>
    pub fn namespace_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.namespace_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Redshift cluster namespace ARN for which the recommendations is returned.</p>
    pub fn set_namespace_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.namespace_arn = input;
        self
    }
    /// <p>The Amazon Redshift cluster namespace ARN for which the recommendations is returned.</p>
    pub fn get_namespace_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.namespace_arn
    }
    /// <p>The date and time (UTC) that the recommendation was created.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time (UTC) that the recommendation was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The date and time (UTC) that the recommendation was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The type of Advisor recommendation.</p>
    pub fn recommendation_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.recommendation_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of Advisor recommendation.</p>
    pub fn set_recommendation_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.recommendation_type = input;
        self
    }
    /// <p>The type of Advisor recommendation.</p>
    pub fn get_recommendation_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.recommendation_type
    }
    /// <p>The title of the recommendation.</p>
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.title = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The title of the recommendation.</p>
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.title = input;
        self
    }
    /// <p>The title of the recommendation.</p>
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
        &self.title
    }
    /// <p>The description of the recommendation.</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 recommendation.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the recommendation.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The description of what was observed about your cluster.</p>
    pub fn observation(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.observation = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of what was observed about your cluster.</p>
    pub fn set_observation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.observation = input;
        self
    }
    /// <p>The description of what was observed about your cluster.</p>
    pub fn get_observation(&self) -> &::std::option::Option<::std::string::String> {
        &self.observation
    }
    /// <p>The scale of the impact that the Advisor recommendation has to the performance and cost of the cluster.</p>
    pub fn impact_ranking(mut self, input: crate::types::ImpactRankingType) -> Self {
        self.impact_ranking = ::std::option::Option::Some(input);
        self
    }
    /// <p>The scale of the impact that the Advisor recommendation has to the performance and cost of the cluster.</p>
    pub fn set_impact_ranking(mut self, input: ::std::option::Option<crate::types::ImpactRankingType>) -> Self {
        self.impact_ranking = input;
        self
    }
    /// <p>The scale of the impact that the Advisor recommendation has to the performance and cost of the cluster.</p>
    pub fn get_impact_ranking(&self) -> &::std::option::Option<crate::types::ImpactRankingType> {
        &self.impact_ranking
    }
    /// <p>The description of the recommendation.</p>
    pub fn recommendation_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.recommendation_text = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the recommendation.</p>
    pub fn set_recommendation_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.recommendation_text = input;
        self
    }
    /// <p>The description of the recommendation.</p>
    pub fn get_recommendation_text(&self) -> &::std::option::Option<::std::string::String> {
        &self.recommendation_text
    }
    /// Appends an item to `recommended_actions`.
    ///
    /// To override the contents of this collection use [`set_recommended_actions`](Self::set_recommended_actions).
    ///
    /// <p>List of Amazon Redshift recommended actions.</p>
    pub fn recommended_actions(mut self, input: crate::types::RecommendedAction) -> Self {
        let mut v = self.recommended_actions.unwrap_or_default();
        v.push(input);
        self.recommended_actions = ::std::option::Option::Some(v);
        self
    }
    /// <p>List of Amazon Redshift recommended actions.</p>
    pub fn set_recommended_actions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RecommendedAction>>) -> Self {
        self.recommended_actions = input;
        self
    }
    /// <p>List of Amazon Redshift recommended actions.</p>
    pub fn get_recommended_actions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RecommendedAction>> {
        &self.recommended_actions
    }
    /// Appends an item to `reference_links`.
    ///
    /// To override the contents of this collection use [`set_reference_links`](Self::set_reference_links).
    ///
    /// <p>List of helpful links for more information about the Advisor recommendation.</p>
    pub fn reference_links(mut self, input: crate::types::ReferenceLink) -> Self {
        let mut v = self.reference_links.unwrap_or_default();
        v.push(input);
        self.reference_links = ::std::option::Option::Some(v);
        self
    }
    /// <p>List of helpful links for more information about the Advisor recommendation.</p>
    pub fn set_reference_links(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ReferenceLink>>) -> Self {
        self.reference_links = input;
        self
    }
    /// <p>List of helpful links for more information about the Advisor recommendation.</p>
    pub fn get_reference_links(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReferenceLink>> {
        &self.reference_links
    }
    /// Consumes the builder and constructs a [`Recommendation`](crate::types::Recommendation).
    pub fn build(self) -> crate::types::Recommendation {
        crate::types::Recommendation {
            id: self.id,
            cluster_identifier: self.cluster_identifier,
            namespace_arn: self.namespace_arn,
            created_at: self.created_at,
            recommendation_type: self.recommendation_type,
            title: self.title,
            description: self.description,
            observation: self.observation,
            impact_ranking: self.impact_ranking,
            recommendation_text: self.recommendation_text,
            recommended_actions: self.recommended_actions,
            reference_links: self.reference_links,
        }
    }
}