aws_sdk_dax/operation/describe_events/_describe_events_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeEventsInput {
6 /// <p>The identifier of the event source for which events will be returned. If not specified, then all sources are included in the response.</p>
7 pub source_name: ::std::option::Option<::std::string::String>,
8 /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
9 pub source_type: ::std::option::Option<crate::types::SourceType>,
10 /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format.</p>
11 pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
12 /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format.</p>
13 pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
14 /// <p>The number of minutes' worth of events to retrieve.</p>
15 pub duration: ::std::option::Option<i32>,
16 /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
17 /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
18 pub max_results: ::std::option::Option<i32>,
19 /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>
20 pub next_token: ::std::option::Option<::std::string::String>,
21}
22impl DescribeEventsInput {
23 /// <p>The identifier of the event source for which events will be returned. If not specified, then all sources are included in the response.</p>
24 pub fn source_name(&self) -> ::std::option::Option<&str> {
25 self.source_name.as_deref()
26 }
27 /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
28 pub fn source_type(&self) -> ::std::option::Option<&crate::types::SourceType> {
29 self.source_type.as_ref()
30 }
31 /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format.</p>
32 pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
33 self.start_time.as_ref()
34 }
35 /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format.</p>
36 pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
37 self.end_time.as_ref()
38 }
39 /// <p>The number of minutes' worth of events to retrieve.</p>
40 pub fn duration(&self) -> ::std::option::Option<i32> {
41 self.duration
42 }
43 /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
44 /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
45 pub fn max_results(&self) -> ::std::option::Option<i32> {
46 self.max_results
47 }
48 /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>
49 pub fn next_token(&self) -> ::std::option::Option<&str> {
50 self.next_token.as_deref()
51 }
52}
53impl DescribeEventsInput {
54 /// Creates a new builder-style object to manufacture [`DescribeEventsInput`](crate::operation::describe_events::DescribeEventsInput).
55 pub fn builder() -> crate::operation::describe_events::builders::DescribeEventsInputBuilder {
56 crate::operation::describe_events::builders::DescribeEventsInputBuilder::default()
57 }
58}
59
60/// A builder for [`DescribeEventsInput`](crate::operation::describe_events::DescribeEventsInput).
61#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct DescribeEventsInputBuilder {
64 pub(crate) source_name: ::std::option::Option<::std::string::String>,
65 pub(crate) source_type: ::std::option::Option<crate::types::SourceType>,
66 pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
67 pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
68 pub(crate) duration: ::std::option::Option<i32>,
69 pub(crate) max_results: ::std::option::Option<i32>,
70 pub(crate) next_token: ::std::option::Option<::std::string::String>,
71}
72impl DescribeEventsInputBuilder {
73 /// <p>The identifier of the event source for which events will be returned. If not specified, then all sources are included in the response.</p>
74 pub fn source_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75 self.source_name = ::std::option::Option::Some(input.into());
76 self
77 }
78 /// <p>The identifier of the event source for which events will be returned. If not specified, then all sources are included in the response.</p>
79 pub fn set_source_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.source_name = input;
81 self
82 }
83 /// <p>The identifier of the event source for which events will be returned. If not specified, then all sources are included in the response.</p>
84 pub fn get_source_name(&self) -> &::std::option::Option<::std::string::String> {
85 &self.source_name
86 }
87 /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
88 pub fn source_type(mut self, input: crate::types::SourceType) -> Self {
89 self.source_type = ::std::option::Option::Some(input);
90 self
91 }
92 /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
93 pub fn set_source_type(mut self, input: ::std::option::Option<crate::types::SourceType>) -> Self {
94 self.source_type = input;
95 self
96 }
97 /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
98 pub fn get_source_type(&self) -> &::std::option::Option<crate::types::SourceType> {
99 &self.source_type
100 }
101 /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format.</p>
102 pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
103 self.start_time = ::std::option::Option::Some(input);
104 self
105 }
106 /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format.</p>
107 pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
108 self.start_time = input;
109 self
110 }
111 /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format.</p>
112 pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
113 &self.start_time
114 }
115 /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format.</p>
116 pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
117 self.end_time = ::std::option::Option::Some(input);
118 self
119 }
120 /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format.</p>
121 pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
122 self.end_time = input;
123 self
124 }
125 /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format.</p>
126 pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
127 &self.end_time
128 }
129 /// <p>The number of minutes' worth of events to retrieve.</p>
130 pub fn duration(mut self, input: i32) -> Self {
131 self.duration = ::std::option::Option::Some(input);
132 self
133 }
134 /// <p>The number of minutes' worth of events to retrieve.</p>
135 pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
136 self.duration = input;
137 self
138 }
139 /// <p>The number of minutes' worth of events to retrieve.</p>
140 pub fn get_duration(&self) -> &::std::option::Option<i32> {
141 &self.duration
142 }
143 /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
144 /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
145 pub fn max_results(mut self, input: i32) -> Self {
146 self.max_results = ::std::option::Option::Some(input);
147 self
148 }
149 /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
150 /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
151 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
152 self.max_results = input;
153 self
154 }
155 /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
156 /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
157 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
158 &self.max_results
159 }
160 /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>
161 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162 self.next_token = ::std::option::Option::Some(input.into());
163 self
164 }
165 /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>
166 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167 self.next_token = input;
168 self
169 }
170 /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>
171 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
172 &self.next_token
173 }
174 /// Consumes the builder and constructs a [`DescribeEventsInput`](crate::operation::describe_events::DescribeEventsInput).
175 pub fn build(
176 self,
177 ) -> ::std::result::Result<crate::operation::describe_events::DescribeEventsInput, ::aws_smithy_types::error::operation::BuildError> {
178 ::std::result::Result::Ok(crate::operation::describe_events::DescribeEventsInput {
179 source_name: self.source_name,
180 source_type: self.source_type,
181 start_time: self.start_time,
182 end_time: self.end_time,
183 duration: self.duration,
184 max_results: self.max_results,
185 next_token: self.next_token,
186 })
187 }
188}