aws_sdk_ses/operation/delete_custom_verification_email_template/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::delete_custom_verification_email_template::_delete_custom_verification_email_template_output::DeleteCustomVerificationEmailTemplateOutputBuilder;
3
4pub use crate::operation::delete_custom_verification_email_template::_delete_custom_verification_email_template_input::DeleteCustomVerificationEmailTemplateInputBuilder;
5
6impl crate::operation::delete_custom_verification_email_template::builders::DeleteCustomVerificationEmailTemplateInputBuilder {
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_custom_verification_email_template::DeleteCustomVerificationEmailTemplateOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::delete_custom_verification_email_template::DeleteCustomVerificationEmailTemplateError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.delete_custom_verification_email_template();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DeleteCustomVerificationEmailTemplate`.
24///
25/// <p>Deletes an existing custom verification email template.</p>
26/// <p>For more information about custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom">Using Custom Verification Email Templates</a> in the <i>Amazon SES Developer Guide</i>.</p>
27/// <p>You can execute this operation no more than once per second.</p>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct DeleteCustomVerificationEmailTemplateFluentBuilder {
30    handle: ::std::sync::Arc<crate::client::Handle>,
31    inner: crate::operation::delete_custom_verification_email_template::builders::DeleteCustomVerificationEmailTemplateInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35    crate::client::customize::internal::CustomizableSend<
36        crate::operation::delete_custom_verification_email_template::DeleteCustomVerificationEmailTemplateOutput,
37        crate::operation::delete_custom_verification_email_template::DeleteCustomVerificationEmailTemplateError,
38    > for DeleteCustomVerificationEmailTemplateFluentBuilder
39{
40    fn send(
41        self,
42        config_override: crate::config::Builder,
43    ) -> crate::client::customize::internal::BoxFuture<
44        crate::client::customize::internal::SendResult<
45            crate::operation::delete_custom_verification_email_template::DeleteCustomVerificationEmailTemplateOutput,
46            crate::operation::delete_custom_verification_email_template::DeleteCustomVerificationEmailTemplateError,
47        >,
48    > {
49        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50    }
51}
52impl DeleteCustomVerificationEmailTemplateFluentBuilder {
53    /// Creates a new `DeleteCustomVerificationEmailTemplateFluentBuilder`.
54    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55        Self {
56            handle,
57            inner: ::std::default::Default::default(),
58            config_override: ::std::option::Option::None,
59        }
60    }
61    /// Access the DeleteCustomVerificationEmailTemplate as a reference.
62    pub fn as_input(
63        &self,
64    ) -> &crate::operation::delete_custom_verification_email_template::builders::DeleteCustomVerificationEmailTemplateInputBuilder {
65        &self.inner
66    }
67    /// Sends the request and returns the response.
68    ///
69    /// If an error occurs, an `SdkError` will be returned with additional details that
70    /// can be matched against.
71    ///
72    /// By default, any retryable failures will be retried twice. Retry behavior
73    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
74    /// set when configuring the client.
75    pub async fn send(
76        self,
77    ) -> ::std::result::Result<
78        crate::operation::delete_custom_verification_email_template::DeleteCustomVerificationEmailTemplateOutput,
79        ::aws_smithy_runtime_api::client::result::SdkError<
80            crate::operation::delete_custom_verification_email_template::DeleteCustomVerificationEmailTemplateError,
81            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
82        >,
83    > {
84        let input = self
85            .inner
86            .build()
87            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
88        let runtime_plugins =
89            crate::operation::delete_custom_verification_email_template::DeleteCustomVerificationEmailTemplate::operation_runtime_plugins(
90                self.handle.runtime_plugins.clone(),
91                &self.handle.conf,
92                self.config_override,
93            );
94        crate::operation::delete_custom_verification_email_template::DeleteCustomVerificationEmailTemplate::orchestrate(&runtime_plugins, input).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_custom_verification_email_template::DeleteCustomVerificationEmailTemplateOutput,
102        crate::operation::delete_custom_verification_email_template::DeleteCustomVerificationEmailTemplateError,
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 custom verification email template to delete.</p>
117    pub fn template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.inner = self.inner.template_name(input.into());
119        self
120    }
121    /// <p>The name of the custom verification email template to delete.</p>
122    pub fn set_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.inner = self.inner.set_template_name(input);
124        self
125    }
126    /// <p>The name of the custom verification email template to delete.</p>
127    pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
128        self.inner.get_template_name()
129    }
130}