aws_sdk_pinpointemail/operation/delete_configuration_set_event_destination/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::delete_configuration_set_event_destination::_delete_configuration_set_event_destination_output::DeleteConfigurationSetEventDestinationOutputBuilder;
3
4pub use crate::operation::delete_configuration_set_event_destination::_delete_configuration_set_event_destination_input::DeleteConfigurationSetEventDestinationInputBuilder;
5
6impl crate::operation::delete_configuration_set_event_destination::builders::DeleteConfigurationSetEventDestinationInputBuilder {
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::delete_configuration_set_event_destination::DeleteConfigurationSetEventDestinationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::delete_configuration_set_event_destination::DeleteConfigurationSetEventDestinationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.delete_configuration_set_event_destination();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DeleteConfigurationSetEventDestination`.
24///
25/// <p>Delete an event destination.</p>
26/// <p>In Amazon Pinpoint, <i>events</i> include message sends, deliveries, opens, clicks, bounces, and complaints. <i>Event destinations</i> are places that you can send information about these events to. For example, you can send event data to Amazon SNS to receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct DeleteConfigurationSetEventDestinationFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::delete_configuration_set_event_destination::builders::DeleteConfigurationSetEventDestinationInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::delete_configuration_set_event_destination::DeleteConfigurationSetEventDestinationOutput,
36        crate::operation::delete_configuration_set_event_destination::DeleteConfigurationSetEventDestinationError,
37    > for DeleteConfigurationSetEventDestinationFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::delete_configuration_set_event_destination::DeleteConfigurationSetEventDestinationOutput,
45            crate::operation::delete_configuration_set_event_destination::DeleteConfigurationSetEventDestinationError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl DeleteConfigurationSetEventDestinationFluentBuilder {
52    /// Creates a new `DeleteConfigurationSetEventDestinationFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the DeleteConfigurationSetEventDestination as a reference.
61    pub fn as_input(
62        &self,
63    ) -> &crate::operation::delete_configuration_set_event_destination::builders::DeleteConfigurationSetEventDestinationInputBuilder {
64        &self.inner
65    }
66    /// Sends the request and returns the response.
67    ///
68    /// If an error occurs, an `SdkError` will be returned with additional details that
69    /// can be matched against.
70    ///
71    /// By default, any retryable failures will be retried twice. Retry behavior
72    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73    /// set when configuring the client.
74    pub async fn send(
75        self,
76    ) -> ::std::result::Result<
77        crate::operation::delete_configuration_set_event_destination::DeleteConfigurationSetEventDestinationOutput,
78        ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::delete_configuration_set_event_destination::DeleteConfigurationSetEventDestinationError,
80            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81        >,
82    > {
83        let input = self
84            .inner
85            .build()
86            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87        let runtime_plugins =
88            crate::operation::delete_configuration_set_event_destination::DeleteConfigurationSetEventDestination::operation_runtime_plugins(
89                self.handle.runtime_plugins.clone(),
90                &self.handle.conf,
91                self.config_override,
92            );
93        crate::operation::delete_configuration_set_event_destination::DeleteConfigurationSetEventDestination::orchestrate(&runtime_plugins, input)
94            .await
95    }
96
97    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
98    pub fn customize(
99        self,
100    ) -> crate::client::customize::CustomizableOperation<
101        crate::operation::delete_configuration_set_event_destination::DeleteConfigurationSetEventDestinationOutput,
102        crate::operation::delete_configuration_set_event_destination::DeleteConfigurationSetEventDestinationError,
103        Self,
104    > {
105        crate::client::customize::CustomizableOperation::new(self)
106    }
107    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
108        self.set_config_override(::std::option::Option::Some(config_override.into()));
109        self
110    }
111
112    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
113        self.config_override = config_override;
114        self
115    }
116    /// <p>The name of the configuration set that contains the event destination that you want to delete.</p>
117    pub fn configuration_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.inner = self.inner.configuration_set_name(input.into());
119        self
120    }
121    /// <p>The name of the configuration set that contains the event destination that you want to delete.</p>
122    pub fn set_configuration_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.inner = self.inner.set_configuration_set_name(input);
124        self
125    }
126    /// <p>The name of the configuration set that contains the event destination that you want to delete.</p>
127    pub fn get_configuration_set_name(&self) -> &::std::option::Option<::std::string::String> {
128        self.inner.get_configuration_set_name()
129    }
130    /// <p>The name of the event destination that you want to delete.</p>
131    pub fn event_destination_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132        self.inner = self.inner.event_destination_name(input.into());
133        self
134    }
135    /// <p>The name of the event destination that you want to delete.</p>
136    pub fn set_event_destination_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.inner = self.inner.set_event_destination_name(input);
138        self
139    }
140    /// <p>The name of the event destination that you want to delete.</p>
141    pub fn get_event_destination_name(&self) -> &::std::option::Option<::std::string::String> {
142        self.inner.get_event_destination_name()
143    }
144}