aws_sdk_ses/operation/create_configuration_set_tracking_options/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_configuration_set_tracking_options::_create_configuration_set_tracking_options_output::CreateConfigurationSetTrackingOptionsOutputBuilder;
3
4pub use crate::operation::create_configuration_set_tracking_options::_create_configuration_set_tracking_options_input::CreateConfigurationSetTrackingOptionsInputBuilder;
5
6impl crate::operation::create_configuration_set_tracking_options::builders::CreateConfigurationSetTrackingOptionsInputBuilder {
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::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_configuration_set_tracking_options();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateConfigurationSetTrackingOptions`.
24///
25/// <p>Creates an association between a configuration set and a custom domain for open and click event tracking.</p>
26/// <p>By default, images and links used for tracking open and click events are hosted on domains operated by Amazon SES. You can configure a subdomain of your own to handle these events. For information about using custom domains, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/configure-custom-open-click-domains.html">Amazon SES Developer Guide</a>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct CreateConfigurationSetTrackingOptionsFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::create_configuration_set_tracking_options::builders::CreateConfigurationSetTrackingOptionsInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsOutput,
36        crate::operation::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsError,
37    > for CreateConfigurationSetTrackingOptionsFluentBuilder
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::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsOutput,
45            crate::operation::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl CreateConfigurationSetTrackingOptionsFluentBuilder {
52    /// Creates a new `CreateConfigurationSetTrackingOptionsFluentBuilder`.
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 CreateConfigurationSetTrackingOptions as a reference.
61    pub fn as_input(
62        &self,
63    ) -> &crate::operation::create_configuration_set_tracking_options::builders::CreateConfigurationSetTrackingOptionsInputBuilder {
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::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsOutput,
78        ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsError,
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::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptions::operation_runtime_plugins(
89                self.handle.runtime_plugins.clone(),
90                &self.handle.conf,
91                self.config_override,
92            );
93        crate::operation::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptions::orchestrate(&runtime_plugins, input).await
94    }
95
96    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
97    pub fn customize(
98        self,
99    ) -> crate::client::customize::CustomizableOperation<
100        crate::operation::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsOutput,
101        crate::operation::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsError,
102        Self,
103    > {
104        crate::client::customize::CustomizableOperation::new(self)
105    }
106    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107        self.set_config_override(::std::option::Option::Some(config_override.into()));
108        self
109    }
110
111    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112        self.config_override = config_override;
113        self
114    }
115    /// <p>The name of the configuration set that the tracking options should be associated with.</p>
116    pub fn configuration_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.inner = self.inner.configuration_set_name(input.into());
118        self
119    }
120    /// <p>The name of the configuration set that the tracking options should be associated with.</p>
121    pub fn set_configuration_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.inner = self.inner.set_configuration_set_name(input);
123        self
124    }
125    /// <p>The name of the configuration set that the tracking options should be associated with.</p>
126    pub fn get_configuration_set_name(&self) -> &::std::option::Option<::std::string::String> {
127        self.inner.get_configuration_set_name()
128    }
129    /// <p>A domain that is used to redirect email recipients to an Amazon SES-operated domain. This domain captures open and click events generated by Amazon SES emails.</p>
130    /// <p>For more information, see <a href="https://docs.aws.amazon.com/ses/latest/dg/configure-custom-open-click-domains.html">Configuring Custom Domains to Handle Open and Click Tracking</a> in the <i>Amazon SES Developer Guide</i>.</p>
131    pub fn tracking_options(mut self, input: crate::types::TrackingOptions) -> Self {
132        self.inner = self.inner.tracking_options(input);
133        self
134    }
135    /// <p>A domain that is used to redirect email recipients to an Amazon SES-operated domain. This domain captures open and click events generated by Amazon SES emails.</p>
136    /// <p>For more information, see <a href="https://docs.aws.amazon.com/ses/latest/dg/configure-custom-open-click-domains.html">Configuring Custom Domains to Handle Open and Click Tracking</a> in the <i>Amazon SES Developer Guide</i>.</p>
137    pub fn set_tracking_options(mut self, input: ::std::option::Option<crate::types::TrackingOptions>) -> Self {
138        self.inner = self.inner.set_tracking_options(input);
139        self
140    }
141    /// <p>A domain that is used to redirect email recipients to an Amazon SES-operated domain. This domain captures open and click events generated by Amazon SES emails.</p>
142    /// <p>For more information, see <a href="https://docs.aws.amazon.com/ses/latest/dg/configure-custom-open-click-domains.html">Configuring Custom Domains to Handle Open and Click Tracking</a> in the <i>Amazon SES Developer Guide</i>.</p>
143    pub fn get_tracking_options(&self) -> &::std::option::Option<crate::types::TrackingOptions> {
144        self.inner.get_tracking_options()
145    }
146}