aws_sdk_ses/operation/update_custom_verification_email_template/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_custom_verification_email_template::_update_custom_verification_email_template_output::UpdateCustomVerificationEmailTemplateOutputBuilder;
3
4pub use crate::operation::update_custom_verification_email_template::_update_custom_verification_email_template_input::UpdateCustomVerificationEmailTemplateInputBuilder;
5
6impl crate::operation::update_custom_verification_email_template::builders::UpdateCustomVerificationEmailTemplateInputBuilder {
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_custom_verification_email_template::UpdateCustomVerificationEmailTemplateOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_custom_verification_email_template::UpdateCustomVerificationEmailTemplateError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_custom_verification_email_template();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateCustomVerificationEmailTemplate`.
24///
25/// <p>Updates 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 UpdateCustomVerificationEmailTemplateFluentBuilder {
30    handle: ::std::sync::Arc<crate::client::Handle>,
31    inner: crate::operation::update_custom_verification_email_template::builders::UpdateCustomVerificationEmailTemplateInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35    crate::client::customize::internal::CustomizableSend<
36        crate::operation::update_custom_verification_email_template::UpdateCustomVerificationEmailTemplateOutput,
37        crate::operation::update_custom_verification_email_template::UpdateCustomVerificationEmailTemplateError,
38    > for UpdateCustomVerificationEmailTemplateFluentBuilder
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::update_custom_verification_email_template::UpdateCustomVerificationEmailTemplateOutput,
46            crate::operation::update_custom_verification_email_template::UpdateCustomVerificationEmailTemplateError,
47        >,
48    > {
49        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50    }
51}
52impl UpdateCustomVerificationEmailTemplateFluentBuilder {
53    /// Creates a new `UpdateCustomVerificationEmailTemplateFluentBuilder`.
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 UpdateCustomVerificationEmailTemplate as a reference.
62    pub fn as_input(
63        &self,
64    ) -> &crate::operation::update_custom_verification_email_template::builders::UpdateCustomVerificationEmailTemplateInputBuilder {
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::update_custom_verification_email_template::UpdateCustomVerificationEmailTemplateOutput,
79        ::aws_smithy_runtime_api::client::result::SdkError<
80            crate::operation::update_custom_verification_email_template::UpdateCustomVerificationEmailTemplateError,
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::update_custom_verification_email_template::UpdateCustomVerificationEmailTemplate::operation_runtime_plugins(
90                self.handle.runtime_plugins.clone(),
91                &self.handle.conf,
92                self.config_override,
93            );
94        crate::operation::update_custom_verification_email_template::UpdateCustomVerificationEmailTemplate::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::update_custom_verification_email_template::UpdateCustomVerificationEmailTemplateOutput,
102        crate::operation::update_custom_verification_email_template::UpdateCustomVerificationEmailTemplateError,
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 update.</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 update.</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 update.</p>
127    pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
128        self.inner.get_template_name()
129    }
130    /// <p>The email address that the custom verification email is sent from.</p>
131    pub fn from_email_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132        self.inner = self.inner.from_email_address(input.into());
133        self
134    }
135    /// <p>The email address that the custom verification email is sent from.</p>
136    pub fn set_from_email_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.inner = self.inner.set_from_email_address(input);
138        self
139    }
140    /// <p>The email address that the custom verification email is sent from.</p>
141    pub fn get_from_email_address(&self) -> &::std::option::Option<::std::string::String> {
142        self.inner.get_from_email_address()
143    }
144    /// <p>The subject line of the custom verification email.</p>
145    pub fn template_subject(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.inner = self.inner.template_subject(input.into());
147        self
148    }
149    /// <p>The subject line of the custom verification email.</p>
150    pub fn set_template_subject(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.inner = self.inner.set_template_subject(input);
152        self
153    }
154    /// <p>The subject line of the custom verification email.</p>
155    pub fn get_template_subject(&self) -> &::std::option::Option<::std::string::String> {
156        self.inner.get_template_subject()
157    }
158    /// <p>The content of the custom verification email. The total size of the email must be less than 10 MB. The message body may contain HTML, with some limitations. For more information, see <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom">Custom Verification Email Frequently Asked Questions</a> in the <i>Amazon SES Developer Guide</i>.</p>
159    pub fn template_content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.inner = self.inner.template_content(input.into());
161        self
162    }
163    /// <p>The content of the custom verification email. The total size of the email must be less than 10 MB. The message body may contain HTML, with some limitations. For more information, see <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom">Custom Verification Email Frequently Asked Questions</a> in the <i>Amazon SES Developer Guide</i>.</p>
164    pub fn set_template_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.inner = self.inner.set_template_content(input);
166        self
167    }
168    /// <p>The content of the custom verification email. The total size of the email must be less than 10 MB. The message body may contain HTML, with some limitations. For more information, see <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom">Custom Verification Email Frequently Asked Questions</a> in the <i>Amazon SES Developer Guide</i>.</p>
169    pub fn get_template_content(&self) -> &::std::option::Option<::std::string::String> {
170        self.inner.get_template_content()
171    }
172    /// <p>The URL that the recipient of the verification email is sent to if his or her address is successfully verified.</p>
173    pub fn success_redirection_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174        self.inner = self.inner.success_redirection_url(input.into());
175        self
176    }
177    /// <p>The URL that the recipient of the verification email is sent to if his or her address is successfully verified.</p>
178    pub fn set_success_redirection_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
179        self.inner = self.inner.set_success_redirection_url(input);
180        self
181    }
182    /// <p>The URL that the recipient of the verification email is sent to if his or her address is successfully verified.</p>
183    pub fn get_success_redirection_url(&self) -> &::std::option::Option<::std::string::String> {
184        self.inner.get_success_redirection_url()
185    }
186    /// <p>The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.</p>
187    pub fn failure_redirection_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188        self.inner = self.inner.failure_redirection_url(input.into());
189        self
190    }
191    /// <p>The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.</p>
192    pub fn set_failure_redirection_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193        self.inner = self.inner.set_failure_redirection_url(input);
194        self
195    }
196    /// <p>The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.</p>
197    pub fn get_failure_redirection_url(&self) -> &::std::option::Option<::std::string::String> {
198        self.inner.get_failure_redirection_url()
199    }
200}