aws-sdk-devopsagent 1.3.0

AWS SDK for AWS DevOps Agent Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Response structure containing the requested recommendation
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetRecommendationOutput {
    /// The requested recommendation
    pub recommendation: ::std::option::Option<crate::types::Recommendation>,
    _request_id: Option<String>,
}
impl GetRecommendationOutput {
    /// The requested recommendation
    pub fn recommendation(&self) -> ::std::option::Option<&crate::types::Recommendation> {
        self.recommendation.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetRecommendationOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetRecommendationOutput {
    /// Creates a new builder-style object to manufacture [`GetRecommendationOutput`](crate::operation::get_recommendation::GetRecommendationOutput).
    pub fn builder() -> crate::operation::get_recommendation::builders::GetRecommendationOutputBuilder {
        crate::operation::get_recommendation::builders::GetRecommendationOutputBuilder::default()
    }
}

/// A builder for [`GetRecommendationOutput`](crate::operation::get_recommendation::GetRecommendationOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetRecommendationOutputBuilder {
    pub(crate) recommendation: ::std::option::Option<crate::types::Recommendation>,
    _request_id: Option<String>,
}
impl GetRecommendationOutputBuilder {
    /// The requested recommendation
    /// This field is required.
    pub fn recommendation(mut self, input: crate::types::Recommendation) -> Self {
        self.recommendation = ::std::option::Option::Some(input);
        self
    }
    /// The requested recommendation
    pub fn set_recommendation(mut self, input: ::std::option::Option<crate::types::Recommendation>) -> Self {
        self.recommendation = input;
        self
    }
    /// The requested recommendation
    pub fn get_recommendation(&self) -> &::std::option::Option<crate::types::Recommendation> {
        &self.recommendation
    }
    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 [`GetRecommendationOutput`](crate::operation::get_recommendation::GetRecommendationOutput).
    pub fn build(self) -> crate::operation::get_recommendation::GetRecommendationOutput {
        crate::operation::get_recommendation::GetRecommendationOutput {
            recommendation: self.recommendation,
            _request_id: self._request_id,
        }
    }
}