aws_sdk_eventbridge/operation/describe_replay/
_describe_replay_output.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 DescribeReplayOutput {
6    /// <p>The name of the replay.</p>
7    pub replay_name: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the replay.</p>
9    pub replay_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the replay.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The current state of the replay.</p>
13    pub state: ::std::option::Option<crate::types::ReplayState>,
14    /// <p>The reason that the replay is in the current state.</p>
15    pub state_reason: ::std::option::Option<::std::string::String>,
16    /// <p>The ARN of the archive events were replayed from.</p>
17    pub event_source_arn: ::std::option::Option<::std::string::String>,
18    /// <p>A <code>ReplayDestination</code> object that contains details about the replay.</p>
19    pub destination: ::std::option::Option<crate::types::ReplayDestination>,
20    /// <p>The time stamp of the first event that was last replayed from the archive.</p>
21    pub event_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
22    /// <p>The time stamp for the last event that was replayed from the archive.</p>
23    pub event_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
24    /// <p>The time that the event was last replayed.</p>
25    pub event_last_replayed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
26    /// <p>A time stamp for the time that the replay started.</p>
27    pub replay_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
28    /// <p>A time stamp for the time that the replay stopped.</p>
29    pub replay_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
30    _request_id: Option<String>,
31}
32impl DescribeReplayOutput {
33    /// <p>The name of the replay.</p>
34    pub fn replay_name(&self) -> ::std::option::Option<&str> {
35        self.replay_name.as_deref()
36    }
37    /// <p>The ARN of the replay.</p>
38    pub fn replay_arn(&self) -> ::std::option::Option<&str> {
39        self.replay_arn.as_deref()
40    }
41    /// <p>The description of the replay.</p>
42    pub fn description(&self) -> ::std::option::Option<&str> {
43        self.description.as_deref()
44    }
45    /// <p>The current state of the replay.</p>
46    pub fn state(&self) -> ::std::option::Option<&crate::types::ReplayState> {
47        self.state.as_ref()
48    }
49    /// <p>The reason that the replay is in the current state.</p>
50    pub fn state_reason(&self) -> ::std::option::Option<&str> {
51        self.state_reason.as_deref()
52    }
53    /// <p>The ARN of the archive events were replayed from.</p>
54    pub fn event_source_arn(&self) -> ::std::option::Option<&str> {
55        self.event_source_arn.as_deref()
56    }
57    /// <p>A <code>ReplayDestination</code> object that contains details about the replay.</p>
58    pub fn destination(&self) -> ::std::option::Option<&crate::types::ReplayDestination> {
59        self.destination.as_ref()
60    }
61    /// <p>The time stamp of the first event that was last replayed from the archive.</p>
62    pub fn event_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
63        self.event_start_time.as_ref()
64    }
65    /// <p>The time stamp for the last event that was replayed from the archive.</p>
66    pub fn event_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
67        self.event_end_time.as_ref()
68    }
69    /// <p>The time that the event was last replayed.</p>
70    pub fn event_last_replayed_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
71        self.event_last_replayed_time.as_ref()
72    }
73    /// <p>A time stamp for the time that the replay started.</p>
74    pub fn replay_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
75        self.replay_start_time.as_ref()
76    }
77    /// <p>A time stamp for the time that the replay stopped.</p>
78    pub fn replay_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
79        self.replay_end_time.as_ref()
80    }
81}
82impl ::aws_types::request_id::RequestId for DescribeReplayOutput {
83    fn request_id(&self) -> Option<&str> {
84        self._request_id.as_deref()
85    }
86}
87impl DescribeReplayOutput {
88    /// Creates a new builder-style object to manufacture [`DescribeReplayOutput`](crate::operation::describe_replay::DescribeReplayOutput).
89    pub fn builder() -> crate::operation::describe_replay::builders::DescribeReplayOutputBuilder {
90        crate::operation::describe_replay::builders::DescribeReplayOutputBuilder::default()
91    }
92}
93
94/// A builder for [`DescribeReplayOutput`](crate::operation::describe_replay::DescribeReplayOutput).
95#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
96#[non_exhaustive]
97pub struct DescribeReplayOutputBuilder {
98    pub(crate) replay_name: ::std::option::Option<::std::string::String>,
99    pub(crate) replay_arn: ::std::option::Option<::std::string::String>,
100    pub(crate) description: ::std::option::Option<::std::string::String>,
101    pub(crate) state: ::std::option::Option<crate::types::ReplayState>,
102    pub(crate) state_reason: ::std::option::Option<::std::string::String>,
103    pub(crate) event_source_arn: ::std::option::Option<::std::string::String>,
104    pub(crate) destination: ::std::option::Option<crate::types::ReplayDestination>,
105    pub(crate) event_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
106    pub(crate) event_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
107    pub(crate) event_last_replayed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
108    pub(crate) replay_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
109    pub(crate) replay_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
110    _request_id: Option<String>,
111}
112impl DescribeReplayOutputBuilder {
113    /// <p>The name of the replay.</p>
114    pub fn replay_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.replay_name = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The name of the replay.</p>
119    pub fn set_replay_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.replay_name = input;
121        self
122    }
123    /// <p>The name of the replay.</p>
124    pub fn get_replay_name(&self) -> &::std::option::Option<::std::string::String> {
125        &self.replay_name
126    }
127    /// <p>The ARN of the replay.</p>
128    pub fn replay_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.replay_arn = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The ARN of the replay.</p>
133    pub fn set_replay_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.replay_arn = input;
135        self
136    }
137    /// <p>The ARN of the replay.</p>
138    pub fn get_replay_arn(&self) -> &::std::option::Option<::std::string::String> {
139        &self.replay_arn
140    }
141    /// <p>The description of the replay.</p>
142    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.description = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The description of the replay.</p>
147    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.description = input;
149        self
150    }
151    /// <p>The description of the replay.</p>
152    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
153        &self.description
154    }
155    /// <p>The current state of the replay.</p>
156    pub fn state(mut self, input: crate::types::ReplayState) -> Self {
157        self.state = ::std::option::Option::Some(input);
158        self
159    }
160    /// <p>The current state of the replay.</p>
161    pub fn set_state(mut self, input: ::std::option::Option<crate::types::ReplayState>) -> Self {
162        self.state = input;
163        self
164    }
165    /// <p>The current state of the replay.</p>
166    pub fn get_state(&self) -> &::std::option::Option<crate::types::ReplayState> {
167        &self.state
168    }
169    /// <p>The reason that the replay is in the current state.</p>
170    pub fn state_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171        self.state_reason = ::std::option::Option::Some(input.into());
172        self
173    }
174    /// <p>The reason that the replay is in the current state.</p>
175    pub fn set_state_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.state_reason = input;
177        self
178    }
179    /// <p>The reason that the replay is in the current state.</p>
180    pub fn get_state_reason(&self) -> &::std::option::Option<::std::string::String> {
181        &self.state_reason
182    }
183    /// <p>The ARN of the archive events were replayed from.</p>
184    pub fn event_source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.event_source_arn = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <p>The ARN of the archive events were replayed from.</p>
189    pub fn set_event_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.event_source_arn = input;
191        self
192    }
193    /// <p>The ARN of the archive events were replayed from.</p>
194    pub fn get_event_source_arn(&self) -> &::std::option::Option<::std::string::String> {
195        &self.event_source_arn
196    }
197    /// <p>A <code>ReplayDestination</code> object that contains details about the replay.</p>
198    pub fn destination(mut self, input: crate::types::ReplayDestination) -> Self {
199        self.destination = ::std::option::Option::Some(input);
200        self
201    }
202    /// <p>A <code>ReplayDestination</code> object that contains details about the replay.</p>
203    pub fn set_destination(mut self, input: ::std::option::Option<crate::types::ReplayDestination>) -> Self {
204        self.destination = input;
205        self
206    }
207    /// <p>A <code>ReplayDestination</code> object that contains details about the replay.</p>
208    pub fn get_destination(&self) -> &::std::option::Option<crate::types::ReplayDestination> {
209        &self.destination
210    }
211    /// <p>The time stamp of the first event that was last replayed from the archive.</p>
212    pub fn event_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
213        self.event_start_time = ::std::option::Option::Some(input);
214        self
215    }
216    /// <p>The time stamp of the first event that was last replayed from the archive.</p>
217    pub fn set_event_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
218        self.event_start_time = input;
219        self
220    }
221    /// <p>The time stamp of the first event that was last replayed from the archive.</p>
222    pub fn get_event_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
223        &self.event_start_time
224    }
225    /// <p>The time stamp for the last event that was replayed from the archive.</p>
226    pub fn event_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
227        self.event_end_time = ::std::option::Option::Some(input);
228        self
229    }
230    /// <p>The time stamp for the last event that was replayed from the archive.</p>
231    pub fn set_event_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
232        self.event_end_time = input;
233        self
234    }
235    /// <p>The time stamp for the last event that was replayed from the archive.</p>
236    pub fn get_event_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
237        &self.event_end_time
238    }
239    /// <p>The time that the event was last replayed.</p>
240    pub fn event_last_replayed_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
241        self.event_last_replayed_time = ::std::option::Option::Some(input);
242        self
243    }
244    /// <p>The time that the event was last replayed.</p>
245    pub fn set_event_last_replayed_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
246        self.event_last_replayed_time = input;
247        self
248    }
249    /// <p>The time that the event was last replayed.</p>
250    pub fn get_event_last_replayed_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
251        &self.event_last_replayed_time
252    }
253    /// <p>A time stamp for the time that the replay started.</p>
254    pub fn replay_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
255        self.replay_start_time = ::std::option::Option::Some(input);
256        self
257    }
258    /// <p>A time stamp for the time that the replay started.</p>
259    pub fn set_replay_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
260        self.replay_start_time = input;
261        self
262    }
263    /// <p>A time stamp for the time that the replay started.</p>
264    pub fn get_replay_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
265        &self.replay_start_time
266    }
267    /// <p>A time stamp for the time that the replay stopped.</p>
268    pub fn replay_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
269        self.replay_end_time = ::std::option::Option::Some(input);
270        self
271    }
272    /// <p>A time stamp for the time that the replay stopped.</p>
273    pub fn set_replay_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
274        self.replay_end_time = input;
275        self
276    }
277    /// <p>A time stamp for the time that the replay stopped.</p>
278    pub fn get_replay_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
279        &self.replay_end_time
280    }
281    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
282        self._request_id = Some(request_id.into());
283        self
284    }
285
286    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
287        self._request_id = request_id;
288        self
289    }
290    /// Consumes the builder and constructs a [`DescribeReplayOutput`](crate::operation::describe_replay::DescribeReplayOutput).
291    pub fn build(self) -> crate::operation::describe_replay::DescribeReplayOutput {
292        crate::operation::describe_replay::DescribeReplayOutput {
293            replay_name: self.replay_name,
294            replay_arn: self.replay_arn,
295            description: self.description,
296            state: self.state,
297            state_reason: self.state_reason,
298            event_source_arn: self.event_source_arn,
299            destination: self.destination,
300            event_start_time: self.event_start_time,
301            event_end_time: self.event_end_time,
302            event_last_replayed_time: self.event_last_replayed_time,
303            replay_start_time: self.replay_start_time,
304            replay_end_time: self.replay_end_time,
305            _request_id: self._request_id,
306        }
307    }
308}