Skip to main content

aws_sdk_ses/operation/create_configuration_set_tracking_options/
_create_configuration_set_tracking_options_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents a request to create an open and click tracking option object in a configuration set.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateConfigurationSetTrackingOptionsInput {
7    /// <p>The name of the configuration set that the tracking options should be associated with.</p>
8    pub configuration_set_name: ::std::option::Option<::std::string::String>,
9    /// <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>
10    /// <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>
11    pub tracking_options: ::std::option::Option<crate::types::TrackingOptions>,
12}
13impl CreateConfigurationSetTrackingOptionsInput {
14    /// <p>The name of the configuration set that the tracking options should be associated with.</p>
15    pub fn configuration_set_name(&self) -> ::std::option::Option<&str> {
16        self.configuration_set_name.as_deref()
17    }
18    /// <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>
19    /// <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>
20    pub fn tracking_options(&self) -> ::std::option::Option<&crate::types::TrackingOptions> {
21        self.tracking_options.as_ref()
22    }
23}
24impl CreateConfigurationSetTrackingOptionsInput {
25    /// Creates a new builder-style object to manufacture [`CreateConfigurationSetTrackingOptionsInput`](crate::operation::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsInput).
26    pub fn builder() -> crate::operation::create_configuration_set_tracking_options::builders::CreateConfigurationSetTrackingOptionsInputBuilder {
27        crate::operation::create_configuration_set_tracking_options::builders::CreateConfigurationSetTrackingOptionsInputBuilder::default()
28    }
29}
30
31/// A builder for [`CreateConfigurationSetTrackingOptionsInput`](crate::operation::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsInput).
32#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct CreateConfigurationSetTrackingOptionsInputBuilder {
35    pub(crate) configuration_set_name: ::std::option::Option<::std::string::String>,
36    pub(crate) tracking_options: ::std::option::Option<crate::types::TrackingOptions>,
37}
38impl CreateConfigurationSetTrackingOptionsInputBuilder {
39    /// <p>The name of the configuration set that the tracking options should be associated with.</p>
40    /// This field is required.
41    pub fn configuration_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
42        self.configuration_set_name = ::std::option::Option::Some(input.into());
43        self
44    }
45    /// <p>The name of the configuration set that the tracking options should be associated with.</p>
46    pub fn set_configuration_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
47        self.configuration_set_name = input;
48        self
49    }
50    /// <p>The name of the configuration set that the tracking options should be associated with.</p>
51    pub fn get_configuration_set_name(&self) -> &::std::option::Option<::std::string::String> {
52        &self.configuration_set_name
53    }
54    /// <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>
55    /// <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>
56    /// This field is required.
57    pub fn tracking_options(mut self, input: crate::types::TrackingOptions) -> Self {
58        self.tracking_options = ::std::option::Option::Some(input);
59        self
60    }
61    /// <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>
62    /// <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>
63    pub fn set_tracking_options(mut self, input: ::std::option::Option<crate::types::TrackingOptions>) -> Self {
64        self.tracking_options = input;
65        self
66    }
67    /// <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>
68    /// <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>
69    pub fn get_tracking_options(&self) -> &::std::option::Option<crate::types::TrackingOptions> {
70        &self.tracking_options
71    }
72    /// Consumes the builder and constructs a [`CreateConfigurationSetTrackingOptionsInput`](crate::operation::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsInput).
73    pub fn build(
74        self,
75    ) -> ::std::result::Result<
76        crate::operation::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsInput,
77        ::aws_smithy_types::error::operation::BuildError,
78    > {
79        ::std::result::Result::Ok(
80            crate::operation::create_configuration_set_tracking_options::CreateConfigurationSetTrackingOptionsInput {
81                configuration_set_name: self.configuration_set_name,
82                tracking_options: self.tracking_options,
83            },
84        )
85    }
86}