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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A summary of information about a dataset.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DatasetSummary {
    /// <p>The name of the dataset.</p>
    pub dataset_name: ::std::option::Option<::std::string::String>,
    /// <p>The status of the dataset.</p>
    pub status: ::std::option::Option<crate::types::DatasetStatus>,
    /// <p>The time the dataset was created.</p>
    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The last time the dataset was updated.</p>
    pub last_update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A list of triggers. A trigger causes dataset content to be populated at a specified time interval or when another dataset is populated. The list of triggers can be empty or contain up to five <code>DataSetTrigger</code> objects</p>
    pub triggers: ::std::option::Option<::std::vec::Vec<crate::types::DatasetTrigger>>,
    /// <p>A list of <code>DataActionSummary</code> objects.</p>
    pub actions: ::std::option::Option<::std::vec::Vec<crate::types::DatasetActionSummary>>,
}
impl DatasetSummary {
    /// <p>The name of the dataset.</p>
    pub fn dataset_name(&self) -> ::std::option::Option<&str> {
        self.dataset_name.as_deref()
    }
    /// <p>The status of the dataset.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::DatasetStatus> {
        self.status.as_ref()
    }
    /// <p>The time the dataset was created.</p>
    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The last time the dataset was updated.</p>
    pub fn last_update_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_update_time.as_ref()
    }
    /// <p>A list of triggers. A trigger causes dataset content to be populated at a specified time interval or when another dataset is populated. The list of triggers can be empty or contain up to five <code>DataSetTrigger</code> objects</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.triggers.is_none()`.
    pub fn triggers(&self) -> &[crate::types::DatasetTrigger] {
        self.triggers.as_deref().unwrap_or_default()
    }
    /// <p>A list of <code>DataActionSummary</code> objects.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.actions.is_none()`.
    pub fn actions(&self) -> &[crate::types::DatasetActionSummary] {
        self.actions.as_deref().unwrap_or_default()
    }
}
impl DatasetSummary {
    /// Creates a new builder-style object to manufacture [`DatasetSummary`](crate::types::DatasetSummary).
    pub fn builder() -> crate::types::builders::DatasetSummaryBuilder {
        crate::types::builders::DatasetSummaryBuilder::default()
    }
}

/// A builder for [`DatasetSummary`](crate::types::DatasetSummary).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DatasetSummaryBuilder {
    pub(crate) dataset_name: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::DatasetStatus>,
    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) triggers: ::std::option::Option<::std::vec::Vec<crate::types::DatasetTrigger>>,
    pub(crate) actions: ::std::option::Option<::std::vec::Vec<crate::types::DatasetActionSummary>>,
}
impl DatasetSummaryBuilder {
    /// <p>The name of the dataset.</p>
    pub fn dataset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dataset_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the dataset.</p>
    pub fn set_dataset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dataset_name = input;
        self
    }
    /// <p>The name of the dataset.</p>
    pub fn get_dataset_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.dataset_name
    }
    /// <p>The status of the dataset.</p>
    pub fn status(mut self, input: crate::types::DatasetStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the dataset.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::DatasetStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the dataset.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::DatasetStatus> {
        &self.status
    }
    /// <p>The time the dataset was created.</p>
    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time the dataset was created.</p>
    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_time = input;
        self
    }
    /// <p>The time the dataset was created.</p>
    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_time
    }
    /// <p>The last time the dataset was updated.</p>
    pub fn last_update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_update_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The last time the dataset was updated.</p>
    pub fn set_last_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_update_time = input;
        self
    }
    /// <p>The last time the dataset was updated.</p>
    pub fn get_last_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_update_time
    }
    /// Appends an item to `triggers`.
    ///
    /// To override the contents of this collection use [`set_triggers`](Self::set_triggers).
    ///
    /// <p>A list of triggers. A trigger causes dataset content to be populated at a specified time interval or when another dataset is populated. The list of triggers can be empty or contain up to five <code>DataSetTrigger</code> objects</p>
    pub fn triggers(mut self, input: crate::types::DatasetTrigger) -> Self {
        let mut v = self.triggers.unwrap_or_default();
        v.push(input);
        self.triggers = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of triggers. A trigger causes dataset content to be populated at a specified time interval or when another dataset is populated. The list of triggers can be empty or contain up to five <code>DataSetTrigger</code> objects</p>
    pub fn set_triggers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DatasetTrigger>>) -> Self {
        self.triggers = input;
        self
    }
    /// <p>A list of triggers. A trigger causes dataset content to be populated at a specified time interval or when another dataset is populated. The list of triggers can be empty or contain up to five <code>DataSetTrigger</code> objects</p>
    pub fn get_triggers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DatasetTrigger>> {
        &self.triggers
    }
    /// Appends an item to `actions`.
    ///
    /// To override the contents of this collection use [`set_actions`](Self::set_actions).
    ///
    /// <p>A list of <code>DataActionSummary</code> objects.</p>
    pub fn actions(mut self, input: crate::types::DatasetActionSummary) -> Self {
        let mut v = self.actions.unwrap_or_default();
        v.push(input);
        self.actions = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of <code>DataActionSummary</code> objects.</p>
    pub fn set_actions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DatasetActionSummary>>) -> Self {
        self.actions = input;
        self
    }
    /// <p>A list of <code>DataActionSummary</code> objects.</p>
    pub fn get_actions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DatasetActionSummary>> {
        &self.actions
    }
    /// Consumes the builder and constructs a [`DatasetSummary`](crate::types::DatasetSummary).
    pub fn build(self) -> crate::types::DatasetSummary {
        crate::types::DatasetSummary {
            dataset_name: self.dataset_name,
            status: self.status,
            creation_time: self.creation_time,
            last_update_time: self.last_update_time,
            triggers: self.triggers,
            actions: self.actions,
        }
    }
}