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
// 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 StartImportInput {
/// <p>The ARN of the destination event data store. Use this parameter for a new import.</p>
pub destinations: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The source S3 bucket for the import. Use this parameter for a new import.</p>
pub import_source: ::std::option::Option<crate::types::ImportSource>,
/// <p>Use 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. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specified <code>StartEventTime</code> and <code>EndEventTime</code> before attempting to import events.</p>
pub start_event_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Use 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. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specified <code>StartEventTime</code> and <code>EndEventTime</code> before attempting to import events.</p>
pub end_event_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The ID of the import. Use this parameter when you are retrying an import.</p>
pub import_id: ::std::option::Option<::std::string::String>,
}
impl StartImportInput {
/// <p>The ARN of the destination event data store. Use this parameter for a new import.</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. Use this parameter for a new import.</p>
pub fn import_source(&self) -> ::std::option::Option<&crate::types::ImportSource> {
self.import_source.as_ref()
}
/// <p>Use 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. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specified <code>StartEventTime</code> and <code>EndEventTime</code> before attempting to import events.</p>
pub fn start_event_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.start_event_time.as_ref()
}
/// <p>Use 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. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specified <code>StartEventTime</code> and <code>EndEventTime</code> before attempting to import events.</p>
pub fn end_event_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.end_event_time.as_ref()
}
/// <p>The ID of the import. Use this parameter when you are retrying an import.</p>
pub fn import_id(&self) -> ::std::option::Option<&str> {
self.import_id.as_deref()
}
}
impl StartImportInput {
/// Creates a new builder-style object to manufacture [`StartImportInput`](crate::operation::start_import::StartImportInput).
pub fn builder() -> crate::operation::start_import::builders::StartImportInputBuilder {
crate::operation::start_import::builders::StartImportInputBuilder::default()
}
}
/// A builder for [`StartImportInput`](crate::operation::start_import::StartImportInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartImportInputBuilder {
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_id: ::std::option::Option<::std::string::String>,
}
impl StartImportInputBuilder {
/// 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. Use this parameter for a new import.</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. Use this parameter for a new import.</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. Use this parameter for a new import.</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. Use this parameter for a new 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. Use this parameter for a new 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. Use this parameter for a new import.</p>
pub fn get_import_source(&self) -> &::std::option::Option<crate::types::ImportSource> {
&self.import_source
}
/// <p>Use 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. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specified <code>StartEventTime</code> and <code>EndEventTime</code> before attempting to import events.</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>Use 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. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specified <code>StartEventTime</code> and <code>EndEventTime</code> before attempting to import events.</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>Use 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. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specified <code>StartEventTime</code> and <code>EndEventTime</code> before attempting to import events.</p>
pub fn get_start_event_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.start_event_time
}
/// <p>Use 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. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specified <code>StartEventTime</code> and <code>EndEventTime</code> before attempting to import events.</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>Use 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. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specified <code>StartEventTime</code> and <code>EndEventTime</code> before attempting to import events.</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>Use 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. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specified <code>StartEventTime</code> and <code>EndEventTime</code> before attempting to import events.</p>
pub fn get_end_event_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.end_event_time
}
/// <p>The ID of the import. Use this parameter when you are retrying an 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. Use this parameter when you are retrying an 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. Use this parameter when you are retrying an import.</p>
pub fn get_import_id(&self) -> &::std::option::Option<::std::string::String> {
&self.import_id
}
/// Consumes the builder and constructs a [`StartImportInput`](crate::operation::start_import::StartImportInput).
pub fn build(self) -> ::std::result::Result<crate::operation::start_import::StartImportInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::start_import::StartImportInput {
destinations: self.destinations,
import_source: self.import_source,
start_event_time: self.start_event_time,
end_event_time: self.end_event_time,
import_id: self.import_id,
})
}
}