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 creating a new backlog task
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateBacklogTaskInput {
    /// The unique identifier for the agent space where the task will be created
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// Optional reference information for the task
    pub reference: ::std::option::Option<crate::types::ReferenceInput>,
    /// The type of task being created
    pub task_type: ::std::option::Option<crate::types::TaskType>,
    /// The title of the backlog task
    pub title: ::std::option::Option<::std::string::String>,
    /// Optional detailed description of the task
    pub description: ::std::option::Option<::std::string::String>,
    /// The priority level of the task
    pub priority: ::std::option::Option<crate::types::Priority>,
    /// Client-provided token for idempotent operations
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl CreateBacklogTaskInput {
    /// The unique identifier for the agent space where the task will be created
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// Optional reference information for the task
    pub fn reference(&self) -> ::std::option::Option<&crate::types::ReferenceInput> {
        self.reference.as_ref()
    }
    /// The type of task being created
    pub fn task_type(&self) -> ::std::option::Option<&crate::types::TaskType> {
        self.task_type.as_ref()
    }
    /// The title of the backlog task
    pub fn title(&self) -> ::std::option::Option<&str> {
        self.title.as_deref()
    }
    /// Optional detailed description of the task
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// The priority level of the task
    pub fn priority(&self) -> ::std::option::Option<&crate::types::Priority> {
        self.priority.as_ref()
    }
    /// Client-provided token for idempotent operations
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl CreateBacklogTaskInput {
    /// Creates a new builder-style object to manufacture [`CreateBacklogTaskInput`](crate::operation::create_backlog_task::CreateBacklogTaskInput).
    pub fn builder() -> crate::operation::create_backlog_task::builders::CreateBacklogTaskInputBuilder {
        crate::operation::create_backlog_task::builders::CreateBacklogTaskInputBuilder::default()
    }
}

/// A builder for [`CreateBacklogTaskInput`](crate::operation::create_backlog_task::CreateBacklogTaskInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateBacklogTaskInputBuilder {
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) reference: ::std::option::Option<crate::types::ReferenceInput>,
    pub(crate) task_type: ::std::option::Option<crate::types::TaskType>,
    pub(crate) title: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) priority: ::std::option::Option<crate::types::Priority>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl CreateBacklogTaskInputBuilder {
    /// The unique identifier for the agent space where the task will be created
    /// 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 where the task will be created
    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 where the task will be created
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// Optional reference information for the task
    pub fn reference(mut self, input: crate::types::ReferenceInput) -> Self {
        self.reference = ::std::option::Option::Some(input);
        self
    }
    /// Optional reference information for the task
    pub fn set_reference(mut self, input: ::std::option::Option<crate::types::ReferenceInput>) -> Self {
        self.reference = input;
        self
    }
    /// Optional reference information for the task
    pub fn get_reference(&self) -> &::std::option::Option<crate::types::ReferenceInput> {
        &self.reference
    }
    /// The type of task being created
    /// This field is required.
    pub fn task_type(mut self, input: crate::types::TaskType) -> Self {
        self.task_type = ::std::option::Option::Some(input);
        self
    }
    /// The type of task being created
    pub fn set_task_type(mut self, input: ::std::option::Option<crate::types::TaskType>) -> Self {
        self.task_type = input;
        self
    }
    /// The type of task being created
    pub fn get_task_type(&self) -> &::std::option::Option<crate::types::TaskType> {
        &self.task_type
    }
    /// The title of the backlog task
    /// This field is required.
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.title = ::std::option::Option::Some(input.into());
        self
    }
    /// The title of the backlog task
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.title = input;
        self
    }
    /// The title of the backlog task
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
        &self.title
    }
    /// Optional detailed description of the task
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// Optional detailed description of the task
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// Optional detailed description of the task
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// The priority level of the task
    /// This field is required.
    pub fn priority(mut self, input: crate::types::Priority) -> Self {
        self.priority = ::std::option::Option::Some(input);
        self
    }
    /// The priority level of the task
    pub fn set_priority(mut self, input: ::std::option::Option<crate::types::Priority>) -> Self {
        self.priority = input;
        self
    }
    /// The priority level of the task
    pub fn get_priority(&self) -> &::std::option::Option<crate::types::Priority> {
        &self.priority
    }
    /// 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 [`CreateBacklogTaskInput`](crate::operation::create_backlog_task::CreateBacklogTaskInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_backlog_task::CreateBacklogTaskInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_backlog_task::CreateBacklogTaskInput {
            agent_space_id: self.agent_space_id,
            reference: self.reference,
            task_type: self.task_type,
            title: self.title,
            description: self.description,
            priority: self.priority,
            client_token: self.client_token,
        })
    }
}