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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartReplayInput {
    /// <p>The name of the replay to start.</p>
    pub replay_name: ::std::option::Option<::std::string::String>,
    /// <p>A description for the replay to start.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the archive to replay events from.</p>
    pub event_source_arn: ::std::option::Option<::std::string::String>,
    /// <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>
    pub event_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <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>
    pub event_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A <code>ReplayDestination</code> object that includes details about the destination for the replay.</p>
    pub destination: ::std::option::Option<crate::types::ReplayDestination>,
}
impl StartReplayInput {
    /// <p>The name of the replay to start.</p>
    pub fn replay_name(&self) -> ::std::option::Option<&str> {
        self.replay_name.as_deref()
    }
    /// <p>A description for the replay to start.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ARN of the archive to replay events from.</p>
    pub fn event_source_arn(&self) -> ::std::option::Option<&str> {
        self.event_source_arn.as_deref()
    }
    /// <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>
    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 stop replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</p>
    pub fn event_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.event_end_time.as_ref()
    }
    /// <p>A <code>ReplayDestination</code> object that includes details about the destination for the replay.</p>
    pub fn destination(&self) -> ::std::option::Option<&crate::types::ReplayDestination> {
        self.destination.as_ref()
    }
}
impl StartReplayInput {
    /// Creates a new builder-style object to manufacture [`StartReplayInput`](crate::operation::start_replay::StartReplayInput).
    pub fn builder() -> crate::operation::start_replay::builders::StartReplayInputBuilder {
        crate::operation::start_replay::builders::StartReplayInputBuilder::default()
    }
}

/// A builder for [`StartReplayInput`](crate::operation::start_replay::StartReplayInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartReplayInputBuilder {
    pub(crate) replay_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) event_source_arn: ::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) destination: ::std::option::Option<crate::types::ReplayDestination>,
}
impl StartReplayInputBuilder {
    /// <p>The name of the replay to start.</p>
    /// This field is required.
    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 to start.</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 to start.</p>
    pub fn get_replay_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.replay_name
    }
    /// <p>A description for the replay to start.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description for the replay to start.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description for the replay to start.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The ARN of the archive to replay events from.</p>
    /// This field is required.
    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 events 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 events from.</p>
    pub fn get_event_source_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_source_arn
    }
    /// <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>
    /// This field is required.
    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. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</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. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</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 stop replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</p>
    /// This field is required.
    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 stop replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are 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 stop replaying events. Only events that occurred between the <code>EventStartTime</code> and <code>EventEndTime</code> are replayed.</p>
    pub fn get_event_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.event_end_time
    }
    /// <p>A <code>ReplayDestination</code> object that includes details about the destination for the replay.</p>
    /// This field is required.
    pub fn destination(mut self, input: crate::types::ReplayDestination) -> Self {
        self.destination = ::std::option::Option::Some(input);
        self
    }
    /// <p>A <code>ReplayDestination</code> object that includes details about the destination for the replay.</p>
    pub fn set_destination(mut self, input: ::std::option::Option<crate::types::ReplayDestination>) -> Self {
        self.destination = input;
        self
    }
    /// <p>A <code>ReplayDestination</code> object that includes details about the destination for the replay.</p>
    pub fn get_destination(&self) -> &::std::option::Option<crate::types::ReplayDestination> {
        &self.destination
    }
    /// Consumes the builder and constructs a [`StartReplayInput`](crate::operation::start_replay::StartReplayInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::start_replay::StartReplayInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::start_replay::StartReplayInput {
            replay_name: self.replay_name,
            description: self.description,
            event_source_arn: self.event_source_arn,
            event_start_time: self.event_start_time,
            event_end_time: self.event_end_time,
            destination: self.destination,
        })
    }
}