aws_sdk_eventbridge/operation/start_replay/
_start_replay_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 StartReplayInput {
6    /// <p>The name of the replay to start.</p>
7    pub replay_name: ::std::option::Option<::std::string::String>,
8    /// <p>A description for the replay to start.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The ARN of the archive to replay events from.</p>
11    pub event_source_arn: ::std::option::Option<::std::string::String>,
12    /// <p>A time stamp for the time to start replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</p>
13    pub event_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
14    /// <p>A time stamp for the time to stop replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</p>
15    pub event_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
16    /// <p>A <code>ReplayDestination</code> object that includes details about the destination for the replay.</p>
17    pub destination: ::std::option::Option<crate::types::ReplayDestination>,
18}
19impl StartReplayInput {
20    /// <p>The name of the replay to start.</p>
21    pub fn replay_name(&self) -> ::std::option::Option<&str> {
22        self.replay_name.as_deref()
23    }
24    /// <p>A description for the replay to start.</p>
25    pub fn description(&self) -> ::std::option::Option<&str> {
26        self.description.as_deref()
27    }
28    /// <p>The ARN of the archive to replay events from.</p>
29    pub fn event_source_arn(&self) -> ::std::option::Option<&str> {
30        self.event_source_arn.as_deref()
31    }
32    /// <p>A time stamp for the time to start replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</p>
33    pub fn event_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
34        self.event_start_time.as_ref()
35    }
36    /// <p>A time stamp for the time to stop replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</p>
37    pub fn event_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
38        self.event_end_time.as_ref()
39    }
40    /// <p>A <code>ReplayDestination</code> object that includes details about the destination for the replay.</p>
41    pub fn destination(&self) -> ::std::option::Option<&crate::types::ReplayDestination> {
42        self.destination.as_ref()
43    }
44}
45impl StartReplayInput {
46    /// Creates a new builder-style object to manufacture [`StartReplayInput`](crate::operation::start_replay::StartReplayInput).
47    pub fn builder() -> crate::operation::start_replay::builders::StartReplayInputBuilder {
48        crate::operation::start_replay::builders::StartReplayInputBuilder::default()
49    }
50}
51
52/// A builder for [`StartReplayInput`](crate::operation::start_replay::StartReplayInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct StartReplayInputBuilder {
56    pub(crate) replay_name: ::std::option::Option<::std::string::String>,
57    pub(crate) description: ::std::option::Option<::std::string::String>,
58    pub(crate) event_source_arn: ::std::option::Option<::std::string::String>,
59    pub(crate) event_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
60    pub(crate) event_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
61    pub(crate) destination: ::std::option::Option<crate::types::ReplayDestination>,
62}
63impl StartReplayInputBuilder {
64    /// <p>The name of the replay to start.</p>
65    /// This field is required.
66    pub fn replay_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.replay_name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the replay to start.</p>
71    pub fn set_replay_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.replay_name = input;
73        self
74    }
75    /// <p>The name of the replay to start.</p>
76    pub fn get_replay_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.replay_name
78    }
79    /// <p>A description for the replay to start.</p>
80    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.description = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>A description for the replay to start.</p>
85    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.description = input;
87        self
88    }
89    /// <p>A description for the replay to start.</p>
90    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
91        &self.description
92    }
93    /// <p>The ARN of the archive to replay events from.</p>
94    /// This field is required.
95    pub fn event_source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.event_source_arn = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The ARN of the archive to replay events from.</p>
100    pub fn set_event_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.event_source_arn = input;
102        self
103    }
104    /// <p>The ARN of the archive to replay events from.</p>
105    pub fn get_event_source_arn(&self) -> &::std::option::Option<::std::string::String> {
106        &self.event_source_arn
107    }
108    /// <p>A time stamp for the time to start replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</p>
109    /// This field is required.
110    pub fn event_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
111        self.event_start_time = ::std::option::Option::Some(input);
112        self
113    }
114    /// <p>A time stamp for the time to start replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</p>
115    pub fn set_event_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
116        self.event_start_time = input;
117        self
118    }
119    /// <p>A time stamp for the time to start replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</p>
120    pub fn get_event_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
121        &self.event_start_time
122    }
123    /// <p>A time stamp for the time to stop replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</p>
124    /// This field is required.
125    pub fn event_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
126        self.event_end_time = ::std::option::Option::Some(input);
127        self
128    }
129    /// <p>A time stamp for the time to stop replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</p>
130    pub fn set_event_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
131        self.event_end_time = input;
132        self
133    }
134    /// <p>A time stamp for the time to stop replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</p>
135    pub fn get_event_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
136        &self.event_end_time
137    }
138    /// <p>A <code>ReplayDestination</code> object that includes details about the destination for the replay.</p>
139    /// This field is required.
140    pub fn destination(mut self, input: crate::types::ReplayDestination) -> Self {
141        self.destination = ::std::option::Option::Some(input);
142        self
143    }
144    /// <p>A <code>ReplayDestination</code> object that includes details about the destination for the replay.</p>
145    pub fn set_destination(mut self, input: ::std::option::Option<crate::types::ReplayDestination>) -> Self {
146        self.destination = input;
147        self
148    }
149    /// <p>A <code>ReplayDestination</code> object that includes details about the destination for the replay.</p>
150    pub fn get_destination(&self) -> &::std::option::Option<crate::types::ReplayDestination> {
151        &self.destination
152    }
153    /// Consumes the builder and constructs a [`StartReplayInput`](crate::operation::start_replay::StartReplayInput).
154    pub fn build(self) -> ::std::result::Result<crate::operation::start_replay::StartReplayInput, ::aws_smithy_types::error::operation::BuildError> {
155        ::std::result::Result::Ok(crate::operation::start_replay::StartReplayInput {
156            replay_name: self.replay_name,
157            description: self.description,
158            event_source_arn: self.event_source_arn,
159            event_start_time: self.event_start_time,
160            event_end_time: self.event_end_time,
161            destination: self.destination,
162        })
163    }
164}