aws-sdk-datasync 1.109.0

AWS SDK for AWS DataSync
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>CancelTaskExecutionRequest</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CancelTaskExecutionInput {
    /// <p>The Amazon Resource Name (ARN) of the task execution to stop.</p>
    pub task_execution_arn: ::std::option::Option<::std::string::String>,
}
impl CancelTaskExecutionInput {
    /// <p>The Amazon Resource Name (ARN) of the task execution to stop.</p>
    pub fn task_execution_arn(&self) -> ::std::option::Option<&str> {
        self.task_execution_arn.as_deref()
    }
}
impl CancelTaskExecutionInput {
    /// Creates a new builder-style object to manufacture [`CancelTaskExecutionInput`](crate::operation::cancel_task_execution::CancelTaskExecutionInput).
    pub fn builder() -> crate::operation::cancel_task_execution::builders::CancelTaskExecutionInputBuilder {
        crate::operation::cancel_task_execution::builders::CancelTaskExecutionInputBuilder::default()
    }
}

/// A builder for [`CancelTaskExecutionInput`](crate::operation::cancel_task_execution::CancelTaskExecutionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CancelTaskExecutionInputBuilder {
    pub(crate) task_execution_arn: ::std::option::Option<::std::string::String>,
}
impl CancelTaskExecutionInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the task execution to stop.</p>
    /// This field is required.
    pub fn task_execution_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task_execution_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the task execution to stop.</p>
    pub fn set_task_execution_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_execution_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the task execution to stop.</p>
    pub fn get_task_execution_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_execution_arn
    }
    /// Consumes the builder and constructs a [`CancelTaskExecutionInput`](crate::operation::cancel_task_execution::CancelTaskExecutionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::cancel_task_execution::CancelTaskExecutionInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::cancel_task_execution::CancelTaskExecutionInput {
            task_execution_arn: self.task_execution_arn,
        })
    }
}