aws-sdk-eventbridge 1.105.0

AWS SDK for Amazon EventBridge
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A <code>Replay</code> object that contains details about a replay.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Replay {
    /// <p>The name of the replay.</p>
    pub replay_name: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the archive to replay event from.</p>
    pub event_source_arn: ::std::option::Option<::std::string::String>,
    /// <p>The current state of the replay.</p>
    pub state: ::std::option::Option<crate::types::ReplayState>,
    /// <p>A description of why the replay is in the current state.</p>
    pub state_reason: ::std::option::Option<::std::string::String>,
    /// <p>A time stamp for the time to start replaying events. This is determined by the time in the event as described in <a href="https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html#eventbridge-Type-PutEventsRequestEntry-Time">Time</a>.</p>
    pub event_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A time stamp for the time to start replaying events. Any event with a creation time prior to the <code>EventEndTime</code> specified is replayed.</p>
    pub event_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A time stamp for the time that the last event was replayed.</p>
    pub event_last_replayed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A time stamp for the time that the replay started.</p>
    pub replay_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A time stamp for the time that the replay completed.</p>
    pub replay_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Replay {
    /// <p>The name of the replay.</p>
    pub fn replay_name(&self) -> ::std::option::Option<&str> {
        self.replay_name.as_deref()
    }
    /// <p>The ARN of the archive to replay event from.</p>
    pub fn event_source_arn(&self) -> ::std::option::Option<&str> {
        self.event_source_arn.as_deref()
    }
    /// <p>The current state of the replay.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::ReplayState> {
        self.state.as_ref()
    }
    /// <p>A description of why the replay is in the current state.</p>
    pub fn state_reason(&self) -> ::std::option::Option<&str> {
        self.state_reason.as_deref()
    }
    /// <p>A time stamp for the time to start replaying events. This is determined by the time in the event as described in <a href="https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html#eventbridge-Type-PutEventsRequestEntry-Time">Time</a>.</p>
    pub fn event_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.event_start_time.as_ref()
    }
    /// <p>A time stamp for the time to start replaying events. Any event with a creation time prior to the <code>EventEndTime</code> specified is replayed.</p>
    pub fn event_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.event_end_time.as_ref()
    }
    /// <p>A time stamp for the time that the last event was replayed.</p>
    pub fn event_last_replayed_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.event_last_replayed_time.as_ref()
    }
    /// <p>A time stamp for the time that the replay started.</p>
    pub fn replay_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.replay_start_time.as_ref()
    }
    /// <p>A time stamp for the time that the replay completed.</p>
    pub fn replay_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.replay_end_time.as_ref()
    }
}
impl Replay {
    /// Creates a new builder-style object to manufacture [`Replay`](crate::types::Replay).
    pub fn builder() -> crate::types::builders::ReplayBuilder {
        crate::types::builders::ReplayBuilder::default()
    }
}

/// A builder for [`Replay`](crate::types::Replay).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ReplayBuilder {
    pub(crate) replay_name: ::std::option::Option<::std::string::String>,
    pub(crate) event_source_arn: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<crate::types::ReplayState>,
    pub(crate) state_reason: ::std::option::Option<::std::string::String>,
    pub(crate) event_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) event_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) event_last_replayed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) replay_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) replay_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ReplayBuilder {
    /// <p>The name of the replay.</p>
    pub fn replay_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.replay_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the replay.</p>
    pub fn set_replay_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.replay_name = input;
        self
    }
    /// <p>The name of the replay.</p>
    pub fn get_replay_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.replay_name
    }
    /// <p>The ARN of the archive to replay event from.</p>
    pub fn event_source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.event_source_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the archive to replay event from.</p>
    pub fn set_event_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.event_source_arn = input;
        self
    }
    /// <p>The ARN of the archive to replay event from.</p>
    pub fn get_event_source_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_source_arn
    }
    /// <p>The current state of the replay.</p>
    pub fn state(mut self, input: crate::types::ReplayState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current state of the replay.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::ReplayState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The current state of the replay.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::ReplayState> {
        &self.state
    }
    /// <p>A description of why the replay is in the current state.</p>
    pub fn state_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.state_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of why the replay is in the current state.</p>
    pub fn set_state_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.state_reason = input;
        self
    }
    /// <p>A description of why the replay is in the current state.</p>
    pub fn get_state_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.state_reason
    }
    /// <p>A time stamp for the time to start replaying events. This is determined by the time in the event as described in <a href="https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html#eventbridge-Type-PutEventsRequestEntry-Time">Time</a>.</p>
    pub fn event_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.event_start_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>A time stamp for the time to start replaying events. This is determined by the time in the event as described in <a href="https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html#eventbridge-Type-PutEventsRequestEntry-Time">Time</a>.</p>
    pub fn set_event_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.event_start_time = input;
        self
    }
    /// <p>A time stamp for the time to start replaying events. This is determined by the time in the event as described in <a href="https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html#eventbridge-Type-PutEventsRequestEntry-Time">Time</a>.</p>
    pub fn get_event_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.event_start_time
    }
    /// <p>A time stamp for the time to start replaying events. Any event with a creation time prior to the <code>EventEndTime</code> specified is replayed.</p>
    pub fn event_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.event_end_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>A time stamp for the time to start replaying events. Any event with a creation time prior to the <code>EventEndTime</code> specified is replayed.</p>
    pub fn set_event_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.event_end_time = input;
        self
    }
    /// <p>A time stamp for the time to start replaying events. Any event with a creation time prior to the <code>EventEndTime</code> specified is replayed.</p>
    pub fn get_event_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.event_end_time
    }
    /// <p>A time stamp for the time that the last event was replayed.</p>
    pub fn event_last_replayed_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.event_last_replayed_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>A time stamp for the time that the last event was replayed.</p>
    pub fn set_event_last_replayed_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.event_last_replayed_time = input;
        self
    }
    /// <p>A time stamp for the time that the last event was replayed.</p>
    pub fn get_event_last_replayed_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.event_last_replayed_time
    }
    /// <p>A time stamp for the time that the replay started.</p>
    pub fn replay_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.replay_start_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>A time stamp for the time that the replay started.</p>
    pub fn set_replay_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.replay_start_time = input;
        self
    }
    /// <p>A time stamp for the time that the replay started.</p>
    pub fn get_replay_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.replay_start_time
    }
    /// <p>A time stamp for the time that the replay completed.</p>
    pub fn replay_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.replay_end_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>A time stamp for the time that the replay completed.</p>
    pub fn set_replay_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.replay_end_time = input;
        self
    }
    /// <p>A time stamp for the time that the replay completed.</p>
    pub fn get_replay_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.replay_end_time
    }
    /// Consumes the builder and constructs a [`Replay`](crate::types::Replay).
    pub fn build(self) -> crate::types::Replay {
        crate::types::Replay {
            replay_name: self.replay_name,
            event_source_arn: self.event_source_arn,
            state: self.state,
            state_reason: self.state_reason,
            event_start_time: self.event_start_time,
            event_end_time: self.event_end_time,
            event_last_replayed_time: self.event_last_replayed_time,
            replay_start_time: self.replay_start_time,
            replay_end_time: self.replay_end_time,
        }
    }
}