aws-sdk-pinpointsmsvoicev2 1.124.0

AWS SDK for Amazon Pinpoint SMS Voice V2
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_event_destination::_update_event_destination_input::UpdateEventDestinationInputBuilder;

pub use crate::operation::update_event_destination::_update_event_destination_output::UpdateEventDestinationOutputBuilder;

impl crate::operation::update_event_destination::builders::UpdateEventDestinationInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_event_destination::UpdateEventDestinationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_event_destination::UpdateEventDestinationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_event_destination();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateEventDestination`.
///
/// <p>Updates an existing event destination in a configuration set. You can update the IAM role ARN for CloudWatch Logs and Firehose. You can also enable or disable the event destination.</p>
/// <p>You may want to update an event destination to change its matching event types or updating the destination resource ARN. You can't change an event destination's type between CloudWatch Logs, Firehose, and Amazon SNS.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateEventDestinationFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_event_destination::builders::UpdateEventDestinationInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_event_destination::UpdateEventDestinationOutput,
        crate::operation::update_event_destination::UpdateEventDestinationError,
    > for UpdateEventDestinationFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_event_destination::UpdateEventDestinationOutput,
            crate::operation::update_event_destination::UpdateEventDestinationError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateEventDestinationFluentBuilder {
    /// Creates a new `UpdateEventDestinationFluentBuilder`.
    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 UpdateEventDestination as a reference.
    pub fn as_input(&self) -> &crate::operation::update_event_destination::builders::UpdateEventDestinationInputBuilder {
        &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::update_event_destination::UpdateEventDestinationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_event_destination::UpdateEventDestinationError,
            ::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::update_event_destination::UpdateEventDestination::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_event_destination::UpdateEventDestination::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::update_event_destination::UpdateEventDestinationOutput,
        crate::operation::update_event_destination::UpdateEventDestinationError,
        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 configuration set to update with the new event destination. Valid values for this can be the ConfigurationSetName or ConfigurationSetArn.</p>
    pub fn configuration_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.configuration_set_name(input.into());
        self
    }
    /// <p>The configuration set to update with the new event destination. Valid values for this can be the ConfigurationSetName or ConfigurationSetArn.</p>
    pub fn set_configuration_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_configuration_set_name(input);
        self
    }
    /// <p>The configuration set to update with the new event destination. Valid values for this can be the ConfigurationSetName or ConfigurationSetArn.</p>
    pub fn get_configuration_set_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_configuration_set_name()
    }
    /// <p>The name to use for the event destination.</p>
    pub fn event_destination_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.event_destination_name(input.into());
        self
    }
    /// <p>The name to use for the event destination.</p>
    pub fn set_event_destination_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_event_destination_name(input);
        self
    }
    /// <p>The name to use for the event destination.</p>
    pub fn get_event_destination_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_event_destination_name()
    }
    /// <p>When set to true logging is enabled.</p>
    pub fn enabled(mut self, input: bool) -> Self {
        self.inner = self.inner.enabled(input);
        self
    }
    /// <p>When set to true logging is enabled.</p>
    pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_enabled(input);
        self
    }
    /// <p>When set to true logging is enabled.</p>
    pub fn get_enabled(&self) -> &::std::option::Option<bool> {
        self.inner.get_enabled()
    }
    ///
    /// Appends an item to `MatchingEventTypes`.
    ///
    /// To override the contents of this collection use [`set_matching_event_types`](Self::set_matching_event_types).
    ///
    /// <p>An array of event types that determine which events to log.</p><note>
    /// <p>The <code>TEXT_SENT</code> event type is not supported.</p>
    /// </note>
    pub fn matching_event_types(mut self, input: crate::types::EventType) -> Self {
        self.inner = self.inner.matching_event_types(input);
        self
    }
    /// <p>An array of event types that determine which events to log.</p><note>
    /// <p>The <code>TEXT_SENT</code> event type is not supported.</p>
    /// </note>
    pub fn set_matching_event_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EventType>>) -> Self {
        self.inner = self.inner.set_matching_event_types(input);
        self
    }
    /// <p>An array of event types that determine which events to log.</p><note>
    /// <p>The <code>TEXT_SENT</code> event type is not supported.</p>
    /// </note>
    pub fn get_matching_event_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EventType>> {
        self.inner.get_matching_event_types()
    }
    /// <p>An object that contains information about an event destination that sends data to CloudWatch Logs.</p>
    pub fn cloud_watch_logs_destination(mut self, input: crate::types::CloudWatchLogsDestination) -> Self {
        self.inner = self.inner.cloud_watch_logs_destination(input);
        self
    }
    /// <p>An object that contains information about an event destination that sends data to CloudWatch Logs.</p>
    pub fn set_cloud_watch_logs_destination(mut self, input: ::std::option::Option<crate::types::CloudWatchLogsDestination>) -> Self {
        self.inner = self.inner.set_cloud_watch_logs_destination(input);
        self
    }
    /// <p>An object that contains information about an event destination that sends data to CloudWatch Logs.</p>
    pub fn get_cloud_watch_logs_destination(&self) -> &::std::option::Option<crate::types::CloudWatchLogsDestination> {
        self.inner.get_cloud_watch_logs_destination()
    }
    /// <p>An object that contains information about an event destination for logging to Firehose.</p>
    pub fn kinesis_firehose_destination(mut self, input: crate::types::KinesisFirehoseDestination) -> Self {
        self.inner = self.inner.kinesis_firehose_destination(input);
        self
    }
    /// <p>An object that contains information about an event destination for logging to Firehose.</p>
    pub fn set_kinesis_firehose_destination(mut self, input: ::std::option::Option<crate::types::KinesisFirehoseDestination>) -> Self {
        self.inner = self.inner.set_kinesis_firehose_destination(input);
        self
    }
    /// <p>An object that contains information about an event destination for logging to Firehose.</p>
    pub fn get_kinesis_firehose_destination(&self) -> &::std::option::Option<crate::types::KinesisFirehoseDestination> {
        self.inner.get_kinesis_firehose_destination()
    }
    /// <p>An object that contains information about an event destination that sends data to Amazon SNS.</p>
    pub fn sns_destination(mut self, input: crate::types::SnsDestination) -> Self {
        self.inner = self.inner.sns_destination(input);
        self
    }
    /// <p>An object that contains information about an event destination that sends data to Amazon SNS.</p>
    pub fn set_sns_destination(mut self, input: ::std::option::Option<crate::types::SnsDestination>) -> Self {
        self.inner = self.inner.set_sns_destination(input);
        self
    }
    /// <p>An object that contains information about an event destination that sends data to Amazon SNS.</p>
    pub fn get_sns_destination(&self) -> &::std::option::Option<crate::types::SnsDestination> {
        self.inner.get_sns_destination()
    }
}