aws_sdk_docdb/operation/describe_events/_describe_events_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input to <code>DescribeEvents</code>.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeEventsInput {
7 /// <p>The identifier of the event source for which events are returned. If not specified, then all sources are included in the response.</p>
8 /// <p>Constraints:</p>
9 /// <ul>
10 /// <li>
11 /// <p>If <code>SourceIdentifier</code> is provided, <code>SourceType</code> must also be provided.</p></li>
12 /// <li>
13 /// <p>If the source type is <code>DBInstance</code>, a <code>DBInstanceIdentifier</code> must be provided.</p></li>
14 /// <li>
15 /// <p>If the source type is <code>DBSecurityGroup</code>, a <code>DBSecurityGroupName</code> must be provided.</p></li>
16 /// <li>
17 /// <p>If the source type is <code>DBParameterGroup</code>, a <code>DBParameterGroupName</code> must be provided.</p></li>
18 /// <li>
19 /// <p>If the source type is <code>DBSnapshot</code>, a <code>DBSnapshotIdentifier</code> must be provided.</p></li>
20 /// <li>
21 /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
22 /// </ul>
23 pub source_identifier: ::std::option::Option<::std::string::String>,
24 /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
25 pub source_type: ::std::option::Option<crate::types::SourceType>,
26 /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format.</p>
27 /// <p>Example: 2009-07-08T18:00Z</p>
28 pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
29 /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format.</p>
30 /// <p>Example: 2009-07-08T18:00Z</p>
31 pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
32 /// <p>The number of minutes to retrieve events for.</p>
33 /// <p>Default: 60</p>
34 pub duration: ::std::option::Option<i32>,
35 /// <p>A list of event categories that trigger notifications for an event notification subscription.</p>
36 pub event_categories: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
37 /// <p>This parameter is not currently supported.</p>
38 pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
39 /// <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 (marker) is included in the response so that the remaining results can be retrieved.</p>
40 /// <p>Default: 100</p>
41 /// <p>Constraints: Minimum 20, maximum 100.</p>
42 pub max_records: ::std::option::Option<i32>,
43 /// <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>
44 pub marker: ::std::option::Option<::std::string::String>,
45}
46impl DescribeEventsInput {
47 /// <p>The identifier of the event source for which events are returned. If not specified, then all sources are included in the response.</p>
48 /// <p>Constraints:</p>
49 /// <ul>
50 /// <li>
51 /// <p>If <code>SourceIdentifier</code> is provided, <code>SourceType</code> must also be provided.</p></li>
52 /// <li>
53 /// <p>If the source type is <code>DBInstance</code>, a <code>DBInstanceIdentifier</code> must be provided.</p></li>
54 /// <li>
55 /// <p>If the source type is <code>DBSecurityGroup</code>, a <code>DBSecurityGroupName</code> must be provided.</p></li>
56 /// <li>
57 /// <p>If the source type is <code>DBParameterGroup</code>, a <code>DBParameterGroupName</code> must be provided.</p></li>
58 /// <li>
59 /// <p>If the source type is <code>DBSnapshot</code>, a <code>DBSnapshotIdentifier</code> must be provided.</p></li>
60 /// <li>
61 /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
62 /// </ul>
63 pub fn source_identifier(&self) -> ::std::option::Option<&str> {
64 self.source_identifier.as_deref()
65 }
66 /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
67 pub fn source_type(&self) -> ::std::option::Option<&crate::types::SourceType> {
68 self.source_type.as_ref()
69 }
70 /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format.</p>
71 /// <p>Example: 2009-07-08T18:00Z</p>
72 pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
73 self.start_time.as_ref()
74 }
75 /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format.</p>
76 /// <p>Example: 2009-07-08T18:00Z</p>
77 pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
78 self.end_time.as_ref()
79 }
80 /// <p>The number of minutes to retrieve events for.</p>
81 /// <p>Default: 60</p>
82 pub fn duration(&self) -> ::std::option::Option<i32> {
83 self.duration
84 }
85 /// <p>A list of event categories that trigger notifications for an event notification subscription.</p>
86 ///
87 /// 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()`.
88 pub fn event_categories(&self) -> &[::std::string::String] {
89 self.event_categories.as_deref().unwrap_or_default()
90 }
91 /// <p>This parameter is not currently supported.</p>
92 ///
93 /// 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()`.
94 pub fn filters(&self) -> &[crate::types::Filter] {
95 self.filters.as_deref().unwrap_or_default()
96 }
97 /// <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 (marker) is included in the response so that the remaining results can be retrieved.</p>
98 /// <p>Default: 100</p>
99 /// <p>Constraints: Minimum 20, maximum 100.</p>
100 pub fn max_records(&self) -> ::std::option::Option<i32> {
101 self.max_records
102 }
103 /// <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>
104 pub fn marker(&self) -> ::std::option::Option<&str> {
105 self.marker.as_deref()
106 }
107}
108impl DescribeEventsInput {
109 /// Creates a new builder-style object to manufacture [`DescribeEventsInput`](crate::operation::describe_events::DescribeEventsInput).
110 pub fn builder() -> crate::operation::describe_events::builders::DescribeEventsInputBuilder {
111 crate::operation::describe_events::builders::DescribeEventsInputBuilder::default()
112 }
113}
114
115/// A builder for [`DescribeEventsInput`](crate::operation::describe_events::DescribeEventsInput).
116#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
117#[non_exhaustive]
118pub struct DescribeEventsInputBuilder {
119 pub(crate) source_identifier: ::std::option::Option<::std::string::String>,
120 pub(crate) source_type: ::std::option::Option<crate::types::SourceType>,
121 pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
122 pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
123 pub(crate) duration: ::std::option::Option<i32>,
124 pub(crate) event_categories: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
125 pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
126 pub(crate) max_records: ::std::option::Option<i32>,
127 pub(crate) marker: ::std::option::Option<::std::string::String>,
128}
129impl DescribeEventsInputBuilder {
130 /// <p>The identifier of the event source for which events are returned. If not specified, then all sources are included in the response.</p>
131 /// <p>Constraints:</p>
132 /// <ul>
133 /// <li>
134 /// <p>If <code>SourceIdentifier</code> is provided, <code>SourceType</code> must also be provided.</p></li>
135 /// <li>
136 /// <p>If the source type is <code>DBInstance</code>, a <code>DBInstanceIdentifier</code> must be provided.</p></li>
137 /// <li>
138 /// <p>If the source type is <code>DBSecurityGroup</code>, a <code>DBSecurityGroupName</code> must be provided.</p></li>
139 /// <li>
140 /// <p>If the source type is <code>DBParameterGroup</code>, a <code>DBParameterGroupName</code> must be provided.</p></li>
141 /// <li>
142 /// <p>If the source type is <code>DBSnapshot</code>, a <code>DBSnapshotIdentifier</code> must be provided.</p></li>
143 /// <li>
144 /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
145 /// </ul>
146 pub fn source_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147 self.source_identifier = ::std::option::Option::Some(input.into());
148 self
149 }
150 /// <p>The identifier of the event source for which events are returned. If not specified, then all sources are included in the response.</p>
151 /// <p>Constraints:</p>
152 /// <ul>
153 /// <li>
154 /// <p>If <code>SourceIdentifier</code> is provided, <code>SourceType</code> must also be provided.</p></li>
155 /// <li>
156 /// <p>If the source type is <code>DBInstance</code>, a <code>DBInstanceIdentifier</code> must be provided.</p></li>
157 /// <li>
158 /// <p>If the source type is <code>DBSecurityGroup</code>, a <code>DBSecurityGroupName</code> must be provided.</p></li>
159 /// <li>
160 /// <p>If the source type is <code>DBParameterGroup</code>, a <code>DBParameterGroupName</code> must be provided.</p></li>
161 /// <li>
162 /// <p>If the source type is <code>DBSnapshot</code>, a <code>DBSnapshotIdentifier</code> must be provided.</p></li>
163 /// <li>
164 /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
165 /// </ul>
166 pub fn set_source_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167 self.source_identifier = input;
168 self
169 }
170 /// <p>The identifier of the event source for which events are returned. If not specified, then all sources are included in the response.</p>
171 /// <p>Constraints:</p>
172 /// <ul>
173 /// <li>
174 /// <p>If <code>SourceIdentifier</code> is provided, <code>SourceType</code> must also be provided.</p></li>
175 /// <li>
176 /// <p>If the source type is <code>DBInstance</code>, a <code>DBInstanceIdentifier</code> must be provided.</p></li>
177 /// <li>
178 /// <p>If the source type is <code>DBSecurityGroup</code>, a <code>DBSecurityGroupName</code> must be provided.</p></li>
179 /// <li>
180 /// <p>If the source type is <code>DBParameterGroup</code>, a <code>DBParameterGroupName</code> must be provided.</p></li>
181 /// <li>
182 /// <p>If the source type is <code>DBSnapshot</code>, a <code>DBSnapshotIdentifier</code> must be provided.</p></li>
183 /// <li>
184 /// <p>Cannot end with a hyphen or contain two consecutive hyphens.</p></li>
185 /// </ul>
186 pub fn get_source_identifier(&self) -> &::std::option::Option<::std::string::String> {
187 &self.source_identifier
188 }
189 /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
190 pub fn source_type(mut self, input: crate::types::SourceType) -> Self {
191 self.source_type = ::std::option::Option::Some(input);
192 self
193 }
194 /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
195 pub fn set_source_type(mut self, input: ::std::option::Option<crate::types::SourceType>) -> Self {
196 self.source_type = input;
197 self
198 }
199 /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
200 pub fn get_source_type(&self) -> &::std::option::Option<crate::types::SourceType> {
201 &self.source_type
202 }
203 /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format.</p>
204 /// <p>Example: 2009-07-08T18:00Z</p>
205 pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
206 self.start_time = ::std::option::Option::Some(input);
207 self
208 }
209 /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format.</p>
210 /// <p>Example: 2009-07-08T18:00Z</p>
211 pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
212 self.start_time = input;
213 self
214 }
215 /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format.</p>
216 /// <p>Example: 2009-07-08T18:00Z</p>
217 pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
218 &self.start_time
219 }
220 /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format.</p>
221 /// <p>Example: 2009-07-08T18:00Z</p>
222 pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
223 self.end_time = ::std::option::Option::Some(input);
224 self
225 }
226 /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format.</p>
227 /// <p>Example: 2009-07-08T18:00Z</p>
228 pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
229 self.end_time = input;
230 self
231 }
232 /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format.</p>
233 /// <p>Example: 2009-07-08T18:00Z</p>
234 pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
235 &self.end_time
236 }
237 /// <p>The number of minutes to retrieve events for.</p>
238 /// <p>Default: 60</p>
239 pub fn duration(mut self, input: i32) -> Self {
240 self.duration = ::std::option::Option::Some(input);
241 self
242 }
243 /// <p>The number of minutes to retrieve events for.</p>
244 /// <p>Default: 60</p>
245 pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
246 self.duration = input;
247 self
248 }
249 /// <p>The number of minutes to retrieve events for.</p>
250 /// <p>Default: 60</p>
251 pub fn get_duration(&self) -> &::std::option::Option<i32> {
252 &self.duration
253 }
254 /// Appends an item to `event_categories`.
255 ///
256 /// To override the contents of this collection use [`set_event_categories`](Self::set_event_categories).
257 ///
258 /// <p>A list of event categories that trigger notifications for an event notification subscription.</p>
259 pub fn event_categories(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
260 let mut v = self.event_categories.unwrap_or_default();
261 v.push(input.into());
262 self.event_categories = ::std::option::Option::Some(v);
263 self
264 }
265 /// <p>A list of event categories that trigger notifications for an event notification subscription.</p>
266 pub fn set_event_categories(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
267 self.event_categories = input;
268 self
269 }
270 /// <p>A list of event categories that trigger notifications for an event notification subscription.</p>
271 pub fn get_event_categories(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
272 &self.event_categories
273 }
274 /// Appends an item to `filters`.
275 ///
276 /// To override the contents of this collection use [`set_filters`](Self::set_filters).
277 ///
278 /// <p>This parameter is not currently supported.</p>
279 pub fn filters(mut self, input: crate::types::Filter) -> Self {
280 let mut v = self.filters.unwrap_or_default();
281 v.push(input);
282 self.filters = ::std::option::Option::Some(v);
283 self
284 }
285 /// <p>This parameter is not currently supported.</p>
286 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
287 self.filters = input;
288 self
289 }
290 /// <p>This parameter is not currently supported.</p>
291 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
292 &self.filters
293 }
294 /// <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 (marker) is included in the response so that the remaining results can be retrieved.</p>
295 /// <p>Default: 100</p>
296 /// <p>Constraints: Minimum 20, maximum 100.</p>
297 pub fn max_records(mut self, input: i32) -> Self {
298 self.max_records = ::std::option::Option::Some(input);
299 self
300 }
301 /// <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 (marker) is included in the response so that the remaining results can be retrieved.</p>
302 /// <p>Default: 100</p>
303 /// <p>Constraints: Minimum 20, maximum 100.</p>
304 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
305 self.max_records = input;
306 self
307 }
308 /// <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 (marker) is included in the response so that the remaining results can be retrieved.</p>
309 /// <p>Default: 100</p>
310 /// <p>Constraints: Minimum 20, maximum 100.</p>
311 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
312 &self.max_records
313 }
314 /// <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>
315 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
316 self.marker = ::std::option::Option::Some(input.into());
317 self
318 }
319 /// <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>
320 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
321 self.marker = input;
322 self
323 }
324 /// <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>
325 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
326 &self.marker
327 }
328 /// Consumes the builder and constructs a [`DescribeEventsInput`](crate::operation::describe_events::DescribeEventsInput).
329 pub fn build(
330 self,
331 ) -> ::std::result::Result<crate::operation::describe_events::DescribeEventsInput, ::aws_smithy_types::error::operation::BuildError> {
332 ::std::result::Result::Ok(crate::operation::describe_events::DescribeEventsInput {
333 source_identifier: self.source_identifier,
334 source_type: self.source_type,
335 start_time: self.start_time,
336 end_time: self.end_time,
337 duration: self.duration,
338 event_categories: self.event_categories,
339 filters: self.filters,
340 max_records: self.max_records,
341 marker: self.marker,
342 })
343 }
344}