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 a goal
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateGoalInput {
    /// The unique identifier for the agent space containing the goal
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// The unique identifier of the goal to update
    pub goal_id: ::std::option::Option<::std::string::String>,
    /// Update goal schedule state
    pub evaluation_schedule: ::std::option::Option<crate::types::GoalScheduleInput>,
    /// Client-provided token for idempotent operations
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateGoalInput {
    /// The unique identifier for the agent space containing the goal
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// The unique identifier of the goal to update
    pub fn goal_id(&self) -> ::std::option::Option<&str> {
        self.goal_id.as_deref()
    }
    /// Update goal schedule state
    pub fn evaluation_schedule(&self) -> ::std::option::Option<&crate::types::GoalScheduleInput> {
        self.evaluation_schedule.as_ref()
    }
    /// Client-provided token for idempotent operations
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl UpdateGoalInput {
    /// Creates a new builder-style object to manufacture [`UpdateGoalInput`](crate::operation::update_goal::UpdateGoalInput).
    pub fn builder() -> crate::operation::update_goal::builders::UpdateGoalInputBuilder {
        crate::operation::update_goal::builders::UpdateGoalInputBuilder::default()
    }
}

/// A builder for [`UpdateGoalInput`](crate::operation::update_goal::UpdateGoalInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateGoalInputBuilder {
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) goal_id: ::std::option::Option<::std::string::String>,
    pub(crate) evaluation_schedule: ::std::option::Option<crate::types::GoalScheduleInput>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateGoalInputBuilder {
    /// The unique identifier for the agent space containing the goal
    /// 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 goal
    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 goal
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// The unique identifier of the goal to update
    /// This field is required.
    pub fn goal_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.goal_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique identifier of the goal to update
    pub fn set_goal_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.goal_id = input;
        self
    }
    /// The unique identifier of the goal to update
    pub fn get_goal_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.goal_id
    }
    /// Update goal schedule state
    pub fn evaluation_schedule(mut self, input: crate::types::GoalScheduleInput) -> Self {
        self.evaluation_schedule = ::std::option::Option::Some(input);
        self
    }
    /// Update goal schedule state
    pub fn set_evaluation_schedule(mut self, input: ::std::option::Option<crate::types::GoalScheduleInput>) -> Self {
        self.evaluation_schedule = input;
        self
    }
    /// Update goal schedule state
    pub fn get_evaluation_schedule(&self) -> &::std::option::Option<crate::types::GoalScheduleInput> {
        &self.evaluation_schedule
    }
    /// Client-provided token for idempotent operations
    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
    }
    /// Client-provided token for idempotent operations
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// Client-provided token for idempotent operations
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`UpdateGoalInput`](crate::operation::update_goal::UpdateGoalInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_goal::UpdateGoalInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_goal::UpdateGoalInput {
            agent_space_id: self.agent_space_id,
            goal_id: self.goal_id,
            evaluation_schedule: self.evaluation_schedule,
            client_token: self.client_token,
        })
    }
}