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.
pub use crate::operation::start_replay::_start_replay_input::StartReplayInputBuilder;

pub use crate::operation::start_replay::_start_replay_output::StartReplayOutputBuilder;

impl crate::operation::start_replay::builders::StartReplayInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::start_replay::StartReplayOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_replay::StartReplayError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.start_replay();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `StartReplay`.
///
/// <p>Starts the specified replay. Events are not necessarily replayed in the exact same order that they were added to the archive. A replay processes events to replay based on the time in the event, and replays them using 1 minute intervals. If you specify an <code>EventStartTime</code> and an <code>EventEndTime</code> that covers a 20 minute time range, the events are replayed from the first minute of that 20 minute range first. Then the events from the second minute are replayed. You can use <code>DescribeReplay</code> to determine the progress of a replay. The value returned for <code>EventLastReplayedTime</code> indicates the time within the specified time range associated with the last event replayed.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct StartReplayFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::start_replay::builders::StartReplayInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::start_replay::StartReplayOutput,
        crate::operation::start_replay::StartReplayError,
    > for StartReplayFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::start_replay::StartReplayOutput,
            crate::operation::start_replay::StartReplayError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl StartReplayFluentBuilder {
    /// Creates a new `StartReplayFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the StartReplay as a reference.
    pub fn as_input(&self) -> &crate::operation::start_replay::builders::StartReplayInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::start_replay::StartReplayOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_replay::StartReplayError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::start_replay::StartReplay::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::start_replay::StartReplay::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::start_replay::StartReplayOutput,
        crate::operation::start_replay::StartReplayError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The name of the replay to start.</p>
    pub fn replay_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.replay_name(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.inner = self.inner.set_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.inner.get_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.inner = self.inner.description(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.inner = self.inner.set_description(input);
        self
    }
    /// <p>A description for the replay to start.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_description()
    }
    /// <p>The ARN of the archive to replay events from.</p>
    pub fn event_source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.event_source_arn(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.inner = self.inner.set_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.inner.get_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>
    pub fn event_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.inner = self.inner.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 set_event_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.inner = self.inner.set_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.inner.get_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>
    pub fn event_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.inner = self.inner.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 set_event_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.inner = self.inner.set_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.inner.get_event_end_time()
    }
    /// <p>A <code>ReplayDestination</code> object that includes details about the destination for the replay.</p>
    pub fn destination(mut self, input: crate::types::ReplayDestination) -> Self {
        self.inner = self.inner.destination(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.inner = self.inner.set_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.inner.get_destination()
    }
}