aws_sdk_databasemigration/operation/describe_events/_describe_events_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p></p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeEventsInput {
7 /// <p>The identifier of an event source.</p>
8 pub source_identifier: ::std::option::Option<::std::string::String>,
9 /// <p>The type of DMS resource that generates events.</p>
10 /// <p>Valid values: replication-instance | replication-task</p>
11 pub source_type: ::std::option::Option<crate::types::SourceType>,
12 /// <p>The start time for the events to be listed.</p>
13 pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
14 /// <p>The end time for the events to be listed.</p>
15 pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
16 /// <p>The duration of the events to be listed.</p>
17 pub duration: ::std::option::Option<i32>,
18 /// <p>A list of event categories for the source type that you've chosen.</p>
19 pub event_categories: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
20 /// <p>Filters applied to events. The only valid filter is <code>replication-instance-id</code>.</p>
21 pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
22 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
23 /// <p>Default: 100</p>
24 /// <p>Constraints: Minimum 20, maximum 100.</p>
25 pub max_records: ::std::option::Option<i32>,
26 /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
27 pub marker: ::std::option::Option<::std::string::String>,
28}
29impl DescribeEventsInput {
30 /// <p>The identifier of an event source.</p>
31 pub fn source_identifier(&self) -> ::std::option::Option<&str> {
32 self.source_identifier.as_deref()
33 }
34 /// <p>The type of DMS resource that generates events.</p>
35 /// <p>Valid values: replication-instance | replication-task</p>
36 pub fn source_type(&self) -> ::std::option::Option<&crate::types::SourceType> {
37 self.source_type.as_ref()
38 }
39 /// <p>The start time for the events to be listed.</p>
40 pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
41 self.start_time.as_ref()
42 }
43 /// <p>The end time for the events to be listed.</p>
44 pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
45 self.end_time.as_ref()
46 }
47 /// <p>The duration of the events to be listed.</p>
48 pub fn duration(&self) -> ::std::option::Option<i32> {
49 self.duration
50 }
51 /// <p>A list of event categories for the source type that you've chosen.</p>
52 ///
53 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.event_categories.is_none()`.
54 pub fn event_categories(&self) -> &[::std::string::String] {
55 self.event_categories.as_deref().unwrap_or_default()
56 }
57 /// <p>Filters applied to events. The only valid filter is <code>replication-instance-id</code>.</p>
58 ///
59 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
60 pub fn filters(&self) -> &[crate::types::Filter] {
61 self.filters.as_deref().unwrap_or_default()
62 }
63 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
64 /// <p>Default: 100</p>
65 /// <p>Constraints: Minimum 20, maximum 100.</p>
66 pub fn max_records(&self) -> ::std::option::Option<i32> {
67 self.max_records
68 }
69 /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
70 pub fn marker(&self) -> ::std::option::Option<&str> {
71 self.marker.as_deref()
72 }
73}
74impl DescribeEventsInput {
75 /// Creates a new builder-style object to manufacture [`DescribeEventsInput`](crate::operation::describe_events::DescribeEventsInput).
76 pub fn builder() -> crate::operation::describe_events::builders::DescribeEventsInputBuilder {
77 crate::operation::describe_events::builders::DescribeEventsInputBuilder::default()
78 }
79}
80
81/// A builder for [`DescribeEventsInput`](crate::operation::describe_events::DescribeEventsInput).
82#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
83#[non_exhaustive]
84pub struct DescribeEventsInputBuilder {
85 pub(crate) source_identifier: ::std::option::Option<::std::string::String>,
86 pub(crate) source_type: ::std::option::Option<crate::types::SourceType>,
87 pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
88 pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
89 pub(crate) duration: ::std::option::Option<i32>,
90 pub(crate) event_categories: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
91 pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
92 pub(crate) max_records: ::std::option::Option<i32>,
93 pub(crate) marker: ::std::option::Option<::std::string::String>,
94}
95impl DescribeEventsInputBuilder {
96 /// <p>The identifier of an event source.</p>
97 pub fn source_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98 self.source_identifier = ::std::option::Option::Some(input.into());
99 self
100 }
101 /// <p>The identifier of an event source.</p>
102 pub fn set_source_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103 self.source_identifier = input;
104 self
105 }
106 /// <p>The identifier of an event source.</p>
107 pub fn get_source_identifier(&self) -> &::std::option::Option<::std::string::String> {
108 &self.source_identifier
109 }
110 /// <p>The type of DMS resource that generates events.</p>
111 /// <p>Valid values: replication-instance | replication-task</p>
112 pub fn source_type(mut self, input: crate::types::SourceType) -> Self {
113 self.source_type = ::std::option::Option::Some(input);
114 self
115 }
116 /// <p>The type of DMS resource that generates events.</p>
117 /// <p>Valid values: replication-instance | replication-task</p>
118 pub fn set_source_type(mut self, input: ::std::option::Option<crate::types::SourceType>) -> Self {
119 self.source_type = input;
120 self
121 }
122 /// <p>The type of DMS resource that generates events.</p>
123 /// <p>Valid values: replication-instance | replication-task</p>
124 pub fn get_source_type(&self) -> &::std::option::Option<crate::types::SourceType> {
125 &self.source_type
126 }
127 /// <p>The start time for the events to be listed.</p>
128 pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
129 self.start_time = ::std::option::Option::Some(input);
130 self
131 }
132 /// <p>The start time for the events to be listed.</p>
133 pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
134 self.start_time = input;
135 self
136 }
137 /// <p>The start time for the events to be listed.</p>
138 pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
139 &self.start_time
140 }
141 /// <p>The end time for the events to be listed.</p>
142 pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
143 self.end_time = ::std::option::Option::Some(input);
144 self
145 }
146 /// <p>The end time for the events to be listed.</p>
147 pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
148 self.end_time = input;
149 self
150 }
151 /// <p>The end time for the events to be listed.</p>
152 pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
153 &self.end_time
154 }
155 /// <p>The duration of the events to be listed.</p>
156 pub fn duration(mut self, input: i32) -> Self {
157 self.duration = ::std::option::Option::Some(input);
158 self
159 }
160 /// <p>The duration of the events to be listed.</p>
161 pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
162 self.duration = input;
163 self
164 }
165 /// <p>The duration of the events to be listed.</p>
166 pub fn get_duration(&self) -> &::std::option::Option<i32> {
167 &self.duration
168 }
169 /// Appends an item to `event_categories`.
170 ///
171 /// To override the contents of this collection use [`set_event_categories`](Self::set_event_categories).
172 ///
173 /// <p>A list of event categories for the source type that you've chosen.</p>
174 pub fn event_categories(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175 let mut v = self.event_categories.unwrap_or_default();
176 v.push(input.into());
177 self.event_categories = ::std::option::Option::Some(v);
178 self
179 }
180 /// <p>A list of event categories for the source type that you've chosen.</p>
181 pub fn set_event_categories(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
182 self.event_categories = input;
183 self
184 }
185 /// <p>A list of event categories for the source type that you've chosen.</p>
186 pub fn get_event_categories(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
187 &self.event_categories
188 }
189 /// Appends an item to `filters`.
190 ///
191 /// To override the contents of this collection use [`set_filters`](Self::set_filters).
192 ///
193 /// <p>Filters applied to events. The only valid filter is <code>replication-instance-id</code>.</p>
194 pub fn filters(mut self, input: crate::types::Filter) -> Self {
195 let mut v = self.filters.unwrap_or_default();
196 v.push(input);
197 self.filters = ::std::option::Option::Some(v);
198 self
199 }
200 /// <p>Filters applied to events. The only valid filter is <code>replication-instance-id</code>.</p>
201 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
202 self.filters = input;
203 self
204 }
205 /// <p>Filters applied to events. The only valid filter is <code>replication-instance-id</code>.</p>
206 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
207 &self.filters
208 }
209 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
210 /// <p>Default: 100</p>
211 /// <p>Constraints: Minimum 20, maximum 100.</p>
212 pub fn max_records(mut self, input: i32) -> Self {
213 self.max_records = ::std::option::Option::Some(input);
214 self
215 }
216 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
217 /// <p>Default: 100</p>
218 /// <p>Constraints: Minimum 20, maximum 100.</p>
219 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
220 self.max_records = input;
221 self
222 }
223 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
224 /// <p>Default: 100</p>
225 /// <p>Constraints: Minimum 20, maximum 100.</p>
226 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
227 &self.max_records
228 }
229 /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
230 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231 self.marker = ::std::option::Option::Some(input.into());
232 self
233 }
234 /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
235 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
236 self.marker = input;
237 self
238 }
239 /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
240 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
241 &self.marker
242 }
243 /// Consumes the builder and constructs a [`DescribeEventsInput`](crate::operation::describe_events::DescribeEventsInput).
244 pub fn build(
245 self,
246 ) -> ::std::result::Result<crate::operation::describe_events::DescribeEventsInput, ::aws_smithy_types::error::operation::BuildError> {
247 ::std::result::Result::Ok(crate::operation::describe_events::DescribeEventsInput {
248 source_identifier: self.source_identifier,
249 source_type: self.source_type,
250 start_time: self.start_time,
251 end_time: self.end_time,
252 duration: self.duration,
253 event_categories: self.event_categories,
254 filters: self.filters,
255 max_records: self.max_records,
256 marker: self.marker,
257 })
258 }
259}