aws_sdk_datasync/operation/delete_task/
_delete_task_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>DeleteTask</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteTaskInput {
7    /// <p>Specifies the Amazon Resource Name (ARN) of the task that you want to delete.</p>
8    pub task_arn: ::std::option::Option<::std::string::String>,
9}
10impl DeleteTaskInput {
11    /// <p>Specifies the Amazon Resource Name (ARN) of the task that you want to delete.</p>
12    pub fn task_arn(&self) -> ::std::option::Option<&str> {
13        self.task_arn.as_deref()
14    }
15}
16impl DeleteTaskInput {
17    /// Creates a new builder-style object to manufacture [`DeleteTaskInput`](crate::operation::delete_task::DeleteTaskInput).
18    pub fn builder() -> crate::operation::delete_task::builders::DeleteTaskInputBuilder {
19        crate::operation::delete_task::builders::DeleteTaskInputBuilder::default()
20    }
21}
22
23/// A builder for [`DeleteTaskInput`](crate::operation::delete_task::DeleteTaskInput).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct DeleteTaskInputBuilder {
27    pub(crate) task_arn: ::std::option::Option<::std::string::String>,
28}
29impl DeleteTaskInputBuilder {
30    /// <p>Specifies the Amazon Resource Name (ARN) of the task that you want to delete.</p>
31    /// This field is required.
32    pub fn task_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
33        self.task_arn = ::std::option::Option::Some(input.into());
34        self
35    }
36    /// <p>Specifies the Amazon Resource Name (ARN) of the task that you want to delete.</p>
37    pub fn set_task_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
38        self.task_arn = input;
39        self
40    }
41    /// <p>Specifies the Amazon Resource Name (ARN) of the task that you want to delete.</p>
42    pub fn get_task_arn(&self) -> &::std::option::Option<::std::string::String> {
43        &self.task_arn
44    }
45    /// Consumes the builder and constructs a [`DeleteTaskInput`](crate::operation::delete_task::DeleteTaskInput).
46    pub fn build(self) -> ::std::result::Result<crate::operation::delete_task::DeleteTaskInput, ::aws_smithy_types::error::operation::BuildError> {
47        ::std::result::Result::Ok(crate::operation::delete_task::DeleteTaskInput { task_arn: self.task_arn })
48    }
49}