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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartImportOutput {
/// <p>The ID of the import.</p>
pub import_id: ::std::option::Option<::std::string::String>,
/// <p>The ARN of the destination event data store.</p>
pub destinations: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The source S3 bucket for the import.</p>
pub import_source: ::std::option::Option<crate::types::ImportSource>,
/// <p>Used with <code>EndEventTime</code> to bound a <code>StartImport</code> request, and limit imported trail events to only those events logged within a specified time period.</p>
pub start_event_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Used with <code>StartEventTime</code> to bound a <code>StartImport</code> request, and limit imported trail events to only those events logged within a specified time period.</p>
pub end_event_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Shows the status of the import after a <code>StartImport</code> request. An import finishes with a status of <code>COMPLETED</code> if there were no failures, or <code>FAILED</code> if there were failures.</p>
pub import_status: ::std::option::Option<crate::types::ImportStatus>,
/// <p>The timestamp for the import's creation.</p>
pub created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The timestamp of the import's last update, if applicable.</p>
pub updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl StartImportOutput {
/// <p>The ID of the import.</p>
pub fn import_id(&self) -> ::std::option::Option<&str> {
self.import_id.as_deref()
}
/// <p>The ARN of the destination event data store.</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 `.destinations.is_none()`.
pub fn destinations(&self) -> &[::std::string::String] {
self.destinations.as_deref().unwrap_or_default()
}
/// <p>The source S3 bucket for the import.</p>
pub fn import_source(&self) -> ::std::option::Option<&crate::types::ImportSource> {
self.import_source.as_ref()
}
/// <p>Used with <code>EndEventTime</code> to bound a <code>StartImport</code> request, and limit imported trail events to only those events logged within a specified time period.</p>
pub fn start_event_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.start_event_time.as_ref()
}
/// <p>Used with <code>StartEventTime</code> to bound a <code>StartImport</code> request, and limit imported trail events to only those events logged within a specified time period.</p>
pub fn end_event_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.end_event_time.as_ref()
}
/// <p>Shows the status of the import after a <code>StartImport</code> request. An import finishes with a status of <code>COMPLETED</code> if there were no failures, or <code>FAILED</code> if there were failures.</p>
pub fn import_status(&self) -> ::std::option::Option<&crate::types::ImportStatus> {
self.import_status.as_ref()
}
/// <p>The timestamp for the import's creation.</p>
pub fn created_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_timestamp.as_ref()
}
/// <p>The timestamp of the import's last update, if applicable.</p>
pub fn updated_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.updated_timestamp.as_ref()
}
}
impl ::aws_types::request_id::RequestId for StartImportOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl StartImportOutput {
/// Creates a new builder-style object to manufacture [`StartImportOutput`](crate::operation::start_import::StartImportOutput).
pub fn builder() -> crate::operation::start_import::builders::StartImportOutputBuilder {
crate::operation::start_import::builders::StartImportOutputBuilder::default()
}
}
/// A builder for [`StartImportOutput`](crate::operation::start_import::StartImportOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartImportOutputBuilder {
pub(crate) import_id: ::std::option::Option<::std::string::String>,
pub(crate) destinations: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) import_source: ::std::option::Option<crate::types::ImportSource>,
pub(crate) start_event_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) end_event_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) import_status: ::std::option::Option<crate::types::ImportStatus>,
pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl StartImportOutputBuilder {
/// <p>The ID of the import.</p>
pub fn import_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.import_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the import.</p>
pub fn set_import_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.import_id = input;
self
}
/// <p>The ID of the import.</p>
pub fn get_import_id(&self) -> &::std::option::Option<::std::string::String> {
&self.import_id
}
/// Appends an item to `destinations`.
///
/// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
///
/// <p>The ARN of the destination event data store.</p>
pub fn destinations(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.destinations.unwrap_or_default();
v.push(input.into());
self.destinations = ::std::option::Option::Some(v);
self
}
/// <p>The ARN of the destination event data store.</p>
pub fn set_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.destinations = input;
self
}
/// <p>The ARN of the destination event data store.</p>
pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.destinations
}
/// <p>The source S3 bucket for the import.</p>
pub fn import_source(mut self, input: crate::types::ImportSource) -> Self {
self.import_source = ::std::option::Option::Some(input);
self
}
/// <p>The source S3 bucket for the import.</p>
pub fn set_import_source(mut self, input: ::std::option::Option<crate::types::ImportSource>) -> Self {
self.import_source = input;
self
}
/// <p>The source S3 bucket for the import.</p>
pub fn get_import_source(&self) -> &::std::option::Option<crate::types::ImportSource> {
&self.import_source
}
/// <p>Used with <code>EndEventTime</code> to bound a <code>StartImport</code> request, and limit imported trail events to only those events logged within a specified time period.</p>
pub fn start_event_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.start_event_time = ::std::option::Option::Some(input);
self
}
/// <p>Used with <code>EndEventTime</code> to bound a <code>StartImport</code> request, and limit imported trail events to only those events logged within a specified time period.</p>
pub fn set_start_event_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.start_event_time = input;
self
}
/// <p>Used with <code>EndEventTime</code> to bound a <code>StartImport</code> request, and limit imported trail events to only those events logged within a specified time period.</p>
pub fn get_start_event_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.start_event_time
}
/// <p>Used with <code>StartEventTime</code> to bound a <code>StartImport</code> request, and limit imported trail events to only those events logged within a specified time period.</p>
pub fn end_event_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.end_event_time = ::std::option::Option::Some(input);
self
}
/// <p>Used with <code>StartEventTime</code> to bound a <code>StartImport</code> request, and limit imported trail events to only those events logged within a specified time period.</p>
pub fn set_end_event_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.end_event_time = input;
self
}
/// <p>Used with <code>StartEventTime</code> to bound a <code>StartImport</code> request, and limit imported trail events to only those events logged within a specified time period.</p>
pub fn get_end_event_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.end_event_time
}
/// <p>Shows the status of the import after a <code>StartImport</code> request. An import finishes with a status of <code>COMPLETED</code> if there were no failures, or <code>FAILED</code> if there were failures.</p>
pub fn import_status(mut self, input: crate::types::ImportStatus) -> Self {
self.import_status = ::std::option::Option::Some(input);
self
}
/// <p>Shows the status of the import after a <code>StartImport</code> request. An import finishes with a status of <code>COMPLETED</code> if there were no failures, or <code>FAILED</code> if there were failures.</p>
pub fn set_import_status(mut self, input: ::std::option::Option<crate::types::ImportStatus>) -> Self {
self.import_status = input;
self
}
/// <p>Shows the status of the import after a <code>StartImport</code> request. An import finishes with a status of <code>COMPLETED</code> if there were no failures, or <code>FAILED</code> if there were failures.</p>
pub fn get_import_status(&self) -> &::std::option::Option<crate::types::ImportStatus> {
&self.import_status
}
/// <p>The timestamp for the import's creation.</p>
pub fn created_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_timestamp = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp for the import's creation.</p>
pub fn set_created_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_timestamp = input;
self
}
/// <p>The timestamp for the import's creation.</p>
pub fn get_created_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_timestamp
}
/// <p>The timestamp of the import's last update, if applicable.</p>
pub fn updated_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_timestamp = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp of the import's last update, if applicable.</p>
pub fn set_updated_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_timestamp = input;
self
}
/// <p>The timestamp of the import's last update, if applicable.</p>
pub fn get_updated_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_timestamp
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`StartImportOutput`](crate::operation::start_import::StartImportOutput).
pub fn build(self) -> crate::operation::start_import::StartImportOutput {
crate::operation::start_import::StartImportOutput {
import_id: self.import_id,
destinations: self.destinations,
import_source: self.import_source,
start_event_time: self.start_event_time,
end_event_time: self.end_event_time,
import_status: self.import_status,
created_timestamp: self.created_timestamp,
updated_timestamp: self.updated_timestamp,
_request_id: self._request_id,
}
}
}