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 task
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateBacklogTaskInput {
    /// The unique identifier for the agent space containing the task
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// The unique identifier of the task to update
    pub task_id: ::std::option::Option<::std::string::String>,
    /// Updated task status
    pub task_status: ::std::option::Option<crate::types::TaskStatus>,
    /// Client-provided token for idempotent operations
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateBacklogTaskInput {
    /// The unique identifier for the agent space containing the task
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// The unique identifier of the task to update
    pub fn task_id(&self) -> ::std::option::Option<&str> {
        self.task_id.as_deref()
    }
    /// Updated task status
    pub fn task_status(&self) -> ::std::option::Option<&crate::types::TaskStatus> {
        self.task_status.as_ref()
    }
    /// Client-provided token for idempotent operations
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl UpdateBacklogTaskInput {
    /// Creates a new builder-style object to manufacture [`UpdateBacklogTaskInput`](crate::operation::update_backlog_task::UpdateBacklogTaskInput).
    pub fn builder() -> crate::operation::update_backlog_task::builders::UpdateBacklogTaskInputBuilder {
        crate::operation::update_backlog_task::builders::UpdateBacklogTaskInputBuilder::default()
    }
}

/// A builder for [`UpdateBacklogTaskInput`](crate::operation::update_backlog_task::UpdateBacklogTaskInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateBacklogTaskInputBuilder {
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) task_id: ::std::option::Option<::std::string::String>,
    pub(crate) task_status: ::std::option::Option<crate::types::TaskStatus>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateBacklogTaskInputBuilder {
    /// The unique identifier for the agent space containing the task
    /// 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 task
    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 task
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// The unique identifier of the task to update
    /// This field is required.
    pub fn task_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique identifier of the task to update
    pub fn set_task_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_id = input;
        self
    }
    /// The unique identifier of the task to update
    pub fn get_task_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_id
    }
    /// Updated task status
    pub fn task_status(mut self, input: crate::types::TaskStatus) -> Self {
        self.task_status = ::std::option::Option::Some(input);
        self
    }
    /// Updated task status
    pub fn set_task_status(mut self, input: ::std::option::Option<crate::types::TaskStatus>) -> Self {
        self.task_status = input;
        self
    }
    /// Updated task status
    pub fn get_task_status(&self) -> &::std::option::Option<crate::types::TaskStatus> {
        &self.task_status
    }
    /// 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 [`UpdateBacklogTaskInput`](crate::operation::update_backlog_task::UpdateBacklogTaskInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_backlog_task::UpdateBacklogTaskInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_backlog_task::UpdateBacklogTaskInput {
            agent_space_id: self.agent_space_id,
            task_id: self.task_id,
            task_status: self.task_status,
            client_token: self.client_token,
        })
    }
}