aws_sdk_pinpointemail/types/
_dkim_attributes.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>An object that contains information about the DKIM configuration for an email identity.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DkimAttributes {
7    /// <p>If the value is <code>true</code>, then the messages that Amazon Pinpoint sends from the identity are DKIM-signed. If the value is <code>false</code>, then the messages that Amazon Pinpoint sends from the identity aren't DKIM-signed.</p>
8    pub signing_enabled: bool,
9    /// <p>Describes whether or not Amazon Pinpoint has successfully located the DKIM records in the DNS records for the domain. The status can be one of the following:</p>
10    /// <ul>
11    /// <li>
12    /// <p><code>PENDING</code> – Amazon Pinpoint hasn't yet located the DKIM records in the DNS configuration for the domain, but will continue to attempt to locate them.</p></li>
13    /// <li>
14    /// <p><code>SUCCESS</code> – Amazon Pinpoint located the DKIM records in the DNS configuration for the domain and determined that they're correct. Amazon Pinpoint can now send DKIM-signed email from the identity.</p></li>
15    /// <li>
16    /// <p><code>FAILED</code> – Amazon Pinpoint was unable to locate the DKIM records in the DNS settings for the domain, and won't continue to search for them.</p></li>
17    /// <li>
18    /// <p><code>TEMPORARY_FAILURE</code> – A temporary issue occurred, which prevented Amazon Pinpoint from determining the DKIM status for the domain.</p></li>
19    /// <li>
20    /// <p><code>NOT_STARTED</code> – Amazon Pinpoint hasn't yet started searching for the DKIM records in the DKIM records for the domain.</p></li>
21    /// </ul>
22    pub status: ::std::option::Option<crate::types::DkimStatus>,
23    /// <p>A set of unique strings that you use to create a set of CNAME records that you add to the DNS configuration for your domain. When Amazon Pinpoint detects these records in the DNS configuration for your domain, the DKIM authentication process is complete. Amazon Pinpoint usually detects these records within about 72 hours of adding them to the DNS configuration for your domain.</p>
24    pub tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
25}
26impl DkimAttributes {
27    /// <p>If the value is <code>true</code>, then the messages that Amazon Pinpoint sends from the identity are DKIM-signed. If the value is <code>false</code>, then the messages that Amazon Pinpoint sends from the identity aren't DKIM-signed.</p>
28    pub fn signing_enabled(&self) -> bool {
29        self.signing_enabled
30    }
31    /// <p>Describes whether or not Amazon Pinpoint has successfully located the DKIM records in the DNS records for the domain. The status can be one of the following:</p>
32    /// <ul>
33    /// <li>
34    /// <p><code>PENDING</code> – Amazon Pinpoint hasn't yet located the DKIM records in the DNS configuration for the domain, but will continue to attempt to locate them.</p></li>
35    /// <li>
36    /// <p><code>SUCCESS</code> – Amazon Pinpoint located the DKIM records in the DNS configuration for the domain and determined that they're correct. Amazon Pinpoint can now send DKIM-signed email from the identity.</p></li>
37    /// <li>
38    /// <p><code>FAILED</code> – Amazon Pinpoint was unable to locate the DKIM records in the DNS settings for the domain, and won't continue to search for them.</p></li>
39    /// <li>
40    /// <p><code>TEMPORARY_FAILURE</code> – A temporary issue occurred, which prevented Amazon Pinpoint from determining the DKIM status for the domain.</p></li>
41    /// <li>
42    /// <p><code>NOT_STARTED</code> – Amazon Pinpoint hasn't yet started searching for the DKIM records in the DKIM records for the domain.</p></li>
43    /// </ul>
44    pub fn status(&self) -> ::std::option::Option<&crate::types::DkimStatus> {
45        self.status.as_ref()
46    }
47    /// <p>A set of unique strings that you use to create a set of CNAME records that you add to the DNS configuration for your domain. When Amazon Pinpoint detects these records in the DNS configuration for your domain, the DKIM authentication process is complete. Amazon Pinpoint usually detects these records within about 72 hours of adding them to the DNS configuration for your domain.</p>
48    ///
49    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tokens.is_none()`.
50    pub fn tokens(&self) -> &[::std::string::String] {
51        self.tokens.as_deref().unwrap_or_default()
52    }
53}
54impl DkimAttributes {
55    /// Creates a new builder-style object to manufacture [`DkimAttributes`](crate::types::DkimAttributes).
56    pub fn builder() -> crate::types::builders::DkimAttributesBuilder {
57        crate::types::builders::DkimAttributesBuilder::default()
58    }
59}
60
61/// A builder for [`DkimAttributes`](crate::types::DkimAttributes).
62#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
63#[non_exhaustive]
64pub struct DkimAttributesBuilder {
65    pub(crate) signing_enabled: ::std::option::Option<bool>,
66    pub(crate) status: ::std::option::Option<crate::types::DkimStatus>,
67    pub(crate) tokens: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
68}
69impl DkimAttributesBuilder {
70    /// <p>If the value is <code>true</code>, then the messages that Amazon Pinpoint sends from the identity are DKIM-signed. If the value is <code>false</code>, then the messages that Amazon Pinpoint sends from the identity aren't DKIM-signed.</p>
71    pub fn signing_enabled(mut self, input: bool) -> Self {
72        self.signing_enabled = ::std::option::Option::Some(input);
73        self
74    }
75    /// <p>If the value is <code>true</code>, then the messages that Amazon Pinpoint sends from the identity are DKIM-signed. If the value is <code>false</code>, then the messages that Amazon Pinpoint sends from the identity aren't DKIM-signed.</p>
76    pub fn set_signing_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
77        self.signing_enabled = input;
78        self
79    }
80    /// <p>If the value is <code>true</code>, then the messages that Amazon Pinpoint sends from the identity are DKIM-signed. If the value is <code>false</code>, then the messages that Amazon Pinpoint sends from the identity aren't DKIM-signed.</p>
81    pub fn get_signing_enabled(&self) -> &::std::option::Option<bool> {
82        &self.signing_enabled
83    }
84    /// <p>Describes whether or not Amazon Pinpoint has successfully located the DKIM records in the DNS records for the domain. The status can be one of the following:</p>
85    /// <ul>
86    /// <li>
87    /// <p><code>PENDING</code> – Amazon Pinpoint hasn't yet located the DKIM records in the DNS configuration for the domain, but will continue to attempt to locate them.</p></li>
88    /// <li>
89    /// <p><code>SUCCESS</code> – Amazon Pinpoint located the DKIM records in the DNS configuration for the domain and determined that they're correct. Amazon Pinpoint can now send DKIM-signed email from the identity.</p></li>
90    /// <li>
91    /// <p><code>FAILED</code> – Amazon Pinpoint was unable to locate the DKIM records in the DNS settings for the domain, and won't continue to search for them.</p></li>
92    /// <li>
93    /// <p><code>TEMPORARY_FAILURE</code> – A temporary issue occurred, which prevented Amazon Pinpoint from determining the DKIM status for the domain.</p></li>
94    /// <li>
95    /// <p><code>NOT_STARTED</code> – Amazon Pinpoint hasn't yet started searching for the DKIM records in the DKIM records for the domain.</p></li>
96    /// </ul>
97    pub fn status(mut self, input: crate::types::DkimStatus) -> Self {
98        self.status = ::std::option::Option::Some(input);
99        self
100    }
101    /// <p>Describes whether or not Amazon Pinpoint has successfully located the DKIM records in the DNS records for the domain. The status can be one of the following:</p>
102    /// <ul>
103    /// <li>
104    /// <p><code>PENDING</code> – Amazon Pinpoint hasn't yet located the DKIM records in the DNS configuration for the domain, but will continue to attempt to locate them.</p></li>
105    /// <li>
106    /// <p><code>SUCCESS</code> – Amazon Pinpoint located the DKIM records in the DNS configuration for the domain and determined that they're correct. Amazon Pinpoint can now send DKIM-signed email from the identity.</p></li>
107    /// <li>
108    /// <p><code>FAILED</code> – Amazon Pinpoint was unable to locate the DKIM records in the DNS settings for the domain, and won't continue to search for them.</p></li>
109    /// <li>
110    /// <p><code>TEMPORARY_FAILURE</code> – A temporary issue occurred, which prevented Amazon Pinpoint from determining the DKIM status for the domain.</p></li>
111    /// <li>
112    /// <p><code>NOT_STARTED</code> – Amazon Pinpoint hasn't yet started searching for the DKIM records in the DKIM records for the domain.</p></li>
113    /// </ul>
114    pub fn set_status(mut self, input: ::std::option::Option<crate::types::DkimStatus>) -> Self {
115        self.status = input;
116        self
117    }
118    /// <p>Describes whether or not Amazon Pinpoint has successfully located the DKIM records in the DNS records for the domain. The status can be one of the following:</p>
119    /// <ul>
120    /// <li>
121    /// <p><code>PENDING</code> – Amazon Pinpoint hasn't yet located the DKIM records in the DNS configuration for the domain, but will continue to attempt to locate them.</p></li>
122    /// <li>
123    /// <p><code>SUCCESS</code> – Amazon Pinpoint located the DKIM records in the DNS configuration for the domain and determined that they're correct. Amazon Pinpoint can now send DKIM-signed email from the identity.</p></li>
124    /// <li>
125    /// <p><code>FAILED</code> – Amazon Pinpoint was unable to locate the DKIM records in the DNS settings for the domain, and won't continue to search for them.</p></li>
126    /// <li>
127    /// <p><code>TEMPORARY_FAILURE</code> – A temporary issue occurred, which prevented Amazon Pinpoint from determining the DKIM status for the domain.</p></li>
128    /// <li>
129    /// <p><code>NOT_STARTED</code> – Amazon Pinpoint hasn't yet started searching for the DKIM records in the DKIM records for the domain.</p></li>
130    /// </ul>
131    pub fn get_status(&self) -> &::std::option::Option<crate::types::DkimStatus> {
132        &self.status
133    }
134    /// Appends an item to `tokens`.
135    ///
136    /// To override the contents of this collection use [`set_tokens`](Self::set_tokens).
137    ///
138    /// <p>A set of unique strings that you use to create a set of CNAME records that you add to the DNS configuration for your domain. When Amazon Pinpoint detects these records in the DNS configuration for your domain, the DKIM authentication process is complete. Amazon Pinpoint usually detects these records within about 72 hours of adding them to the DNS configuration for your domain.</p>
139    pub fn tokens(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        let mut v = self.tokens.unwrap_or_default();
141        v.push(input.into());
142        self.tokens = ::std::option::Option::Some(v);
143        self
144    }
145    /// <p>A set of unique strings that you use to create a set of CNAME records that you add to the DNS configuration for your domain. When Amazon Pinpoint detects these records in the DNS configuration for your domain, the DKIM authentication process is complete. Amazon Pinpoint usually detects these records within about 72 hours of adding them to the DNS configuration for your domain.</p>
146    pub fn set_tokens(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
147        self.tokens = input;
148        self
149    }
150    /// <p>A set of unique strings that you use to create a set of CNAME records that you add to the DNS configuration for your domain. When Amazon Pinpoint detects these records in the DNS configuration for your domain, the DKIM authentication process is complete. Amazon Pinpoint usually detects these records within about 72 hours of adding them to the DNS configuration for your domain.</p>
151    pub fn get_tokens(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
152        &self.tokens
153    }
154    /// Consumes the builder and constructs a [`DkimAttributes`](crate::types::DkimAttributes).
155    pub fn build(self) -> crate::types::DkimAttributes {
156        crate::types::DkimAttributes {
157            signing_enabled: self.signing_enabled.unwrap_or_default(),
158            status: self.status,
159            tokens: self.tokens,
160        }
161    }
162}