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.

/// Request structure for retrieving a specific recommendation
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetRecommendationInput {
    /// The unique identifier for the agent space containing the recommendation
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// The unique identifier for the recommendation to retrieve
    pub recommendation_id: ::std::option::Option<::std::string::String>,
    /// Specific version of the recommendation to retrieve. If not specified, returns the latest version.
    pub recommendation_version: ::std::option::Option<i64>,
}
impl GetRecommendationInput {
    /// The unique identifier for the agent space containing the recommendation
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// The unique identifier for the recommendation to retrieve
    pub fn recommendation_id(&self) -> ::std::option::Option<&str> {
        self.recommendation_id.as_deref()
    }
    /// Specific version of the recommendation to retrieve. If not specified, returns the latest version.
    pub fn recommendation_version(&self) -> ::std::option::Option<i64> {
        self.recommendation_version
    }
}
impl GetRecommendationInput {
    /// Creates a new builder-style object to manufacture [`GetRecommendationInput`](crate::operation::get_recommendation::GetRecommendationInput).
    pub fn builder() -> crate::operation::get_recommendation::builders::GetRecommendationInputBuilder {
        crate::operation::get_recommendation::builders::GetRecommendationInputBuilder::default()
    }
}

/// A builder for [`GetRecommendationInput`](crate::operation::get_recommendation::GetRecommendationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetRecommendationInputBuilder {
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) recommendation_id: ::std::option::Option<::std::string::String>,
    pub(crate) recommendation_version: ::std::option::Option<i64>,
}
impl GetRecommendationInputBuilder {
    /// The unique identifier for the agent space containing the recommendation
    /// This field is required.
    pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique identifier for the agent space containing the recommendation
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// The unique identifier for the agent space containing the recommendation
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// The unique identifier for the recommendation to retrieve
    /// This field is required.
    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
    }
    /// The unique identifier for the recommendation to retrieve
    pub fn set_recommendation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.recommendation_id = input;
        self
    }
    /// The unique identifier for the recommendation to retrieve
    pub fn get_recommendation_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.recommendation_id
    }
    /// Specific version of the recommendation to retrieve. If not specified, returns the latest version.
    pub fn recommendation_version(mut self, input: i64) -> Self {
        self.recommendation_version = ::std::option::Option::Some(input);
        self
    }
    /// Specific version of the recommendation to retrieve. If not specified, returns the latest version.
    pub fn set_recommendation_version(mut self, input: ::std::option::Option<i64>) -> Self {
        self.recommendation_version = input;
        self
    }
    /// Specific version of the recommendation to retrieve. If not specified, returns the latest version.
    pub fn get_recommendation_version(&self) -> &::std::option::Option<i64> {
        &self.recommendation_version
    }
    /// Consumes the builder and constructs a [`GetRecommendationInput`](crate::operation::get_recommendation::GetRecommendationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_recommendation::GetRecommendationInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_recommendation::GetRecommendationInput {
            agent_space_id: self.agent_space_id,
            recommendation_id: self.recommendation_id,
            recommendation_version: self.recommendation_version,
        })
    }
}