aws-sdk-devopsagent 1.4.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 updating an existing recommendation
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateRecommendationInput {
    /// 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 update
    pub recommendation_id: ::std::option::Option<::std::string::String>,
    /// Current status of the recommendation
    pub status: ::std::option::Option<crate::types::RecommendationStatus>,
    /// Additional context for recommendation
    pub additional_context: ::std::option::Option<::std::string::String>,
    /// A unique token that ensures idempotency of the request
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateRecommendationInput {
    /// 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 update
    pub fn recommendation_id(&self) -> ::std::option::Option<&str> {
        self.recommendation_id.as_deref()
    }
    /// Current status of the recommendation
    pub fn status(&self) -> ::std::option::Option<&crate::types::RecommendationStatus> {
        self.status.as_ref()
    }
    /// Additional context for recommendation
    pub fn additional_context(&self) -> ::std::option::Option<&str> {
        self.additional_context.as_deref()
    }
    /// A unique token that ensures idempotency of the request
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl UpdateRecommendationInput {
    /// Creates a new builder-style object to manufacture [`UpdateRecommendationInput`](crate::operation::update_recommendation::UpdateRecommendationInput).
    pub fn builder() -> crate::operation::update_recommendation::builders::UpdateRecommendationInputBuilder {
        crate::operation::update_recommendation::builders::UpdateRecommendationInputBuilder::default()
    }
}

/// A builder for [`UpdateRecommendationInput`](crate::operation::update_recommendation::UpdateRecommendationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateRecommendationInputBuilder {
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) recommendation_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::RecommendationStatus>,
    pub(crate) additional_context: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateRecommendationInputBuilder {
    /// 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 update
    /// 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 update
    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 update
    pub fn get_recommendation_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.recommendation_id
    }
    /// Current status of the recommendation
    pub fn status(mut self, input: crate::types::RecommendationStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// Current status of the recommendation
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::RecommendationStatus>) -> Self {
        self.status = input;
        self
    }
    /// Current status of the recommendation
    pub fn get_status(&self) -> &::std::option::Option<crate::types::RecommendationStatus> {
        &self.status
    }
    /// Additional context for recommendation
    pub fn additional_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.additional_context = ::std::option::Option::Some(input.into());
        self
    }
    /// Additional context for recommendation
    pub fn set_additional_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.additional_context = input;
        self
    }
    /// Additional context for recommendation
    pub fn get_additional_context(&self) -> &::std::option::Option<::std::string::String> {
        &self.additional_context
    }
    /// A unique token that ensures idempotency of the request
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// A unique token that ensures idempotency of the request
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// A unique token that ensures idempotency of the request
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`UpdateRecommendationInput`](crate::operation::update_recommendation::UpdateRecommendationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_recommendation::UpdateRecommendationInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_recommendation::UpdateRecommendationInput {
            agent_space_id: self.agent_space_id,
            recommendation_id: self.recommendation_id,
            status: self.status,
            additional_context: self.additional_context,
            client_token: self.client_token,
        })
    }
}