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