1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents a single entry in a list of tasks. <code>TaskListEntry</code> returns an array that contains a list of tasks when the <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_ListTasks.html">ListTasks</a> operation is called. A task includes the source and destination file systems to sync and the options to use for the tasks.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TaskListEntry {
    /// <p>The Amazon Resource Name (ARN) of the task.</p>
    pub task_arn: ::std::option::Option<::std::string::String>,
    /// <p>The status of the task.</p>
    pub status: ::std::option::Option<crate::types::TaskStatus>,
    /// <p>The name of the task.</p>
    pub name: ::std::option::Option<::std::string::String>,
}
impl TaskListEntry {
    /// <p>The Amazon Resource Name (ARN) of the task.</p>
    pub fn task_arn(&self) -> ::std::option::Option<&str> {
        self.task_arn.as_deref()
    }
    /// <p>The status of the task.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::TaskStatus> {
        self.status.as_ref()
    }
    /// <p>The name of the task.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
}
impl TaskListEntry {
    /// Creates a new builder-style object to manufacture [`TaskListEntry`](crate::types::TaskListEntry).
    pub fn builder() -> crate::types::builders::TaskListEntryBuilder {
        crate::types::builders::TaskListEntryBuilder::default()
    }
}

/// A builder for [`TaskListEntry`](crate::types::TaskListEntry).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TaskListEntryBuilder {
    pub(crate) task_arn: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::TaskStatus>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
}
impl TaskListEntryBuilder {
    /// <p>The Amazon Resource Name (ARN) of the task.</p>
    pub fn task_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the task.</p>
    pub fn set_task_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the task.</p>
    pub fn get_task_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_arn
    }
    /// <p>The status of the task.</p>
    pub fn status(mut self, input: crate::types::TaskStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the task.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::TaskStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the task.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::TaskStatus> {
        &self.status
    }
    /// <p>The name of the task.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the task.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the task.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Consumes the builder and constructs a [`TaskListEntry`](crate::types::TaskListEntry).
    pub fn build(self) -> crate::types::TaskListEntry {
        crate::types::TaskListEntry {
            task_arn: self.task_arn,
            status: self.status,
            name: self.name,
        }
    }
}