aws-sdk-opensearchmemory 1.2.0

AWS SDK for Amazon OpenSearch Memory
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::batch_get_event::_batch_get_event_input::BatchGetEventInputBuilder;

pub use crate::operation::batch_get_event::_batch_get_event_output::BatchGetEventOutputBuilder;

impl crate::operation::batch_get_event::builders::BatchGetEventInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::batch_get_event::BatchGetEventOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::batch_get_event::BatchGetEventError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.batch_get_event();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `BatchGetEvent`.
///
/// <p>Gets up to 10 events by ID, each as <code>GetEvent</code> returns it, including its payload.</p>
/// <p>If you supply <code>actorId</code> or <code>sessionId</code>, every requested event must match it. Each event has its own outcome. The operation reports an event that it can't return in <code>errors</code> instead of failing, with an error code named for the exception that <code>GetEvent</code> would return for it. The operation reports both an event that doesn't exist and an event outside the supplied scope as <code>RESOURCE_NOT_FOUND</code>.</p>
/// <p>The exception is the space's customer managed AWS KMS key: if it is disabled, pending deletion, can't be used for decryption, or was deleted, the whole call fails with <code>ValidationException</code>, as <code>GetEvent</code> does.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct BatchGetEventFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::batch_get_event::builders::BatchGetEventInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::batch_get_event::BatchGetEventOutput,
        crate::operation::batch_get_event::BatchGetEventError,
    > for BatchGetEventFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::batch_get_event::BatchGetEventOutput,
            crate::operation::batch_get_event::BatchGetEventError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl BatchGetEventFluentBuilder {
    /// Creates a new `BatchGetEventFluentBuilder`.
    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 BatchGetEvent as a reference.
    pub fn as_input(&self) -> &crate::operation::batch_get_event::builders::BatchGetEventInputBuilder {
        &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::batch_get_event::BatchGetEventOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::batch_get_event::BatchGetEventError,
            ::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::batch_get_event::BatchGetEvent::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::batch_get_event::BatchGetEvent::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::batch_get_event::BatchGetEventOutput,
        crate::operation::batch_get_event::BatchGetEventError,
        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 ID of the space.</p>
    pub fn space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.space_id(input.into());
        self
    }
    /// <p>The ID of the space.</p>
    pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_space_id(input);
        self
    }
    /// <p>The ID of the space.</p>
    pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_space_id()
    }
    /// <p>The actor that every requested event must belong to. Omit it to skip this check. The operation reports an event that doesn't match in <code>errors</code> as <code>RESOURCE_NOT_FOUND</code>.</p>
    pub fn actor_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.actor_id(input.into());
        self
    }
    /// <p>The actor that every requested event must belong to. Omit it to skip this check. The operation reports an event that doesn't match in <code>errors</code> as <code>RESOURCE_NOT_FOUND</code>.</p>
    pub fn set_actor_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_actor_id(input);
        self
    }
    /// <p>The actor that every requested event must belong to. Omit it to skip this check. The operation reports an event that doesn't match in <code>errors</code> as <code>RESOURCE_NOT_FOUND</code>.</p>
    pub fn get_actor_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_actor_id()
    }
    /// <p>The session that every requested event must belong to. Omit it to skip this check. The operation reports an event that doesn't match in <code>errors</code> as <code>RESOURCE_NOT_FOUND</code>.</p>
    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.session_id(input.into());
        self
    }
    /// <p>The session that every requested event must belong to. Omit it to skip this check. The operation reports an event that doesn't match in <code>errors</code> as <code>RESOURCE_NOT_FOUND</code>.</p>
    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_session_id(input);
        self
    }
    /// <p>The session that every requested event must belong to. Omit it to skip this check. The operation reports an event that doesn't match in <code>errors</code> as <code>RESOURCE_NOT_FOUND</code>.</p>
    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_session_id()
    }
    ///
    /// Appends an item to `eventIds`.
    ///
    /// To override the contents of this collection use [`set_event_ids`](Self::set_event_ids).
    ///
    /// <p>The IDs of the events to get: 1 to 10, without duplicates.</p>
    pub fn event_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.event_ids(input.into());
        self
    }
    /// <p>The IDs of the events to get: 1 to 10, without duplicates.</p>
    pub fn set_event_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_event_ids(input);
        self
    }
    /// <p>The IDs of the events to get: 1 to 10, without duplicates.</p>
    pub fn get_event_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_event_ids()
    }
}