aws_sdk_ses/operation/update_configuration_set_event_destination/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_configuration_set_event_destination::_update_configuration_set_event_destination_output::UpdateConfigurationSetEventDestinationOutputBuilder;
3
4pub use crate::operation::update_configuration_set_event_destination::_update_configuration_set_event_destination_input::UpdateConfigurationSetEventDestinationInputBuilder;
5
6impl crate::operation::update_configuration_set_event_destination::builders::UpdateConfigurationSetEventDestinationInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::update_configuration_set_event_destination::UpdateConfigurationSetEventDestinationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_configuration_set_event_destination::UpdateConfigurationSetEventDestinationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_configuration_set_event_destination();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateConfigurationSetEventDestination`.
24///
25/// <p>Updates the event destination of a configuration set. Event destinations are associated with configuration sets, which enable you to publish email sending events to Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple Notification Service (Amazon SNS). For information about using configuration sets, see <a href="https://docs.aws.amazon.com/ses/latest/dg/monitor-sending-activity.html">Monitoring Your Amazon SES Sending Activity</a> in the <i>Amazon SES Developer Guide.</i></p><note>
26/// <p>When you create or update an event destination, you must provide one, and only one, destination. The destination can be Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple Notification Service (Amazon SNS).</p>
27/// </note>
28/// <p>You can execute this operation no more than once per second.</p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct UpdateConfigurationSetEventDestinationFluentBuilder {
31    handle: ::std::sync::Arc<crate::client::Handle>,
32    inner: crate::operation::update_configuration_set_event_destination::builders::UpdateConfigurationSetEventDestinationInputBuilder,
33    config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36    crate::client::customize::internal::CustomizableSend<
37        crate::operation::update_configuration_set_event_destination::UpdateConfigurationSetEventDestinationOutput,
38        crate::operation::update_configuration_set_event_destination::UpdateConfigurationSetEventDestinationError,
39    > for UpdateConfigurationSetEventDestinationFluentBuilder
40{
41    fn send(
42        self,
43        config_override: crate::config::Builder,
44    ) -> crate::client::customize::internal::BoxFuture<
45        crate::client::customize::internal::SendResult<
46            crate::operation::update_configuration_set_event_destination::UpdateConfigurationSetEventDestinationOutput,
47            crate::operation::update_configuration_set_event_destination::UpdateConfigurationSetEventDestinationError,
48        >,
49    > {
50        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51    }
52}
53impl UpdateConfigurationSetEventDestinationFluentBuilder {
54    /// Creates a new `UpdateConfigurationSetEventDestinationFluentBuilder`.
55    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56        Self {
57            handle,
58            inner: ::std::default::Default::default(),
59            config_override: ::std::option::Option::None,
60        }
61    }
62    /// Access the UpdateConfigurationSetEventDestination as a reference.
63    pub fn as_input(
64        &self,
65    ) -> &crate::operation::update_configuration_set_event_destination::builders::UpdateConfigurationSetEventDestinationInputBuilder {
66        &self.inner
67    }
68    /// Sends the request and returns the response.
69    ///
70    /// If an error occurs, an `SdkError` will be returned with additional details that
71    /// can be matched against.
72    ///
73    /// By default, any retryable failures will be retried twice. Retry behavior
74    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
75    /// set when configuring the client.
76    pub async fn send(
77        self,
78    ) -> ::std::result::Result<
79        crate::operation::update_configuration_set_event_destination::UpdateConfigurationSetEventDestinationOutput,
80        ::aws_smithy_runtime_api::client::result::SdkError<
81            crate::operation::update_configuration_set_event_destination::UpdateConfigurationSetEventDestinationError,
82            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
83        >,
84    > {
85        let input = self
86            .inner
87            .build()
88            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
89        let runtime_plugins =
90            crate::operation::update_configuration_set_event_destination::UpdateConfigurationSetEventDestination::operation_runtime_plugins(
91                self.handle.runtime_plugins.clone(),
92                &self.handle.conf,
93                self.config_override,
94            );
95        crate::operation::update_configuration_set_event_destination::UpdateConfigurationSetEventDestination::orchestrate(&runtime_plugins, input)
96            .await
97    }
98
99    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
100    pub fn customize(
101        self,
102    ) -> crate::client::customize::CustomizableOperation<
103        crate::operation::update_configuration_set_event_destination::UpdateConfigurationSetEventDestinationOutput,
104        crate::operation::update_configuration_set_event_destination::UpdateConfigurationSetEventDestinationError,
105        Self,
106    > {
107        crate::client::customize::CustomizableOperation::new(self)
108    }
109    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
110        self.set_config_override(::std::option::Option::Some(config_override.into()));
111        self
112    }
113
114    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
115        self.config_override = config_override;
116        self
117    }
118    /// <p>The name of the configuration set that contains the event destination.</p>
119    pub fn configuration_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120        self.inner = self.inner.configuration_set_name(input.into());
121        self
122    }
123    /// <p>The name of the configuration set that contains the event destination.</p>
124    pub fn set_configuration_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125        self.inner = self.inner.set_configuration_set_name(input);
126        self
127    }
128    /// <p>The name of the configuration set that contains the event destination.</p>
129    pub fn get_configuration_set_name(&self) -> &::std::option::Option<::std::string::String> {
130        self.inner.get_configuration_set_name()
131    }
132    /// <p>The event destination object.</p>
133    pub fn event_destination(mut self, input: crate::types::EventDestination) -> Self {
134        self.inner = self.inner.event_destination(input);
135        self
136    }
137    /// <p>The event destination object.</p>
138    pub fn set_event_destination(mut self, input: ::std::option::Option<crate::types::EventDestination>) -> Self {
139        self.inner = self.inner.set_event_destination(input);
140        self
141    }
142    /// <p>The event destination object.</p>
143    pub fn get_event_destination(&self) -> &::std::option::Option<crate::types::EventDestination> {
144        self.inner.get_event_destination()
145    }
146}