1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An object that contains the deliverability data for a specific campaign. This data is available for a campaign only if the campaign sent email by using a domain that the Deliverability dashboard is enabled for (<code>PutDeliverabilityDashboardOption</code> operation).</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DomainDeliverabilityCampaign {
    /// <p>The unique identifier for the campaign. The Deliverability dashboard automatically generates and assigns this identifier to a campaign.</p>
    pub campaign_id: ::std::option::Option<::std::string::String>,
    /// <p>The URL of an image that contains a snapshot of the email message that was sent.</p>
    pub image_url: ::std::option::Option<::std::string::String>,
    /// <p>The subject line, or title, of the email message.</p>
    pub subject: ::std::option::Option<::std::string::String>,
    /// <p>The verified email address that the email message was sent from.</p>
    pub from_address: ::std::option::Option<::std::string::String>,
    /// <p>The IP addresses that were used to send the email message.</p>
    pub sending_ips: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The first time when the email message was delivered to any recipient's inbox. This value can help you determine how long it took for a campaign to deliver an email message.</p>
    pub first_seen_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The last time when the email message was delivered to any recipient's inbox. This value can help you determine how long it took for a campaign to deliver an email message.</p>
    pub last_seen_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The number of email messages that were delivered to recipients’ inboxes.</p>
    pub inbox_count: ::std::option::Option<i64>,
    /// <p>The number of email messages that were delivered to recipients' spam or junk mail folders.</p>
    pub spam_count: ::std::option::Option<i64>,
    /// <p>The percentage of email messages that were opened by recipients. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub read_rate: ::std::option::Option<f64>,
    /// <p>The percentage of email messages that were deleted by recipients, without being opened first. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub delete_rate: ::std::option::Option<f64>,
    /// <p>The percentage of email messages that were opened and then deleted by recipients. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub read_delete_rate: ::std::option::Option<f64>,
    /// <p>The projected number of recipients that the email message was sent to.</p>
    pub projected_volume: ::std::option::Option<i64>,
    /// <p>The major email providers who handled the email message.</p>
    pub esps: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DomainDeliverabilityCampaign {
    /// <p>The unique identifier for the campaign. The Deliverability dashboard automatically generates and assigns this identifier to a campaign.</p>
    pub fn campaign_id(&self) -> ::std::option::Option<&str> {
        self.campaign_id.as_deref()
    }
    /// <p>The URL of an image that contains a snapshot of the email message that was sent.</p>
    pub fn image_url(&self) -> ::std::option::Option<&str> {
        self.image_url.as_deref()
    }
    /// <p>The subject line, or title, of the email message.</p>
    pub fn subject(&self) -> ::std::option::Option<&str> {
        self.subject.as_deref()
    }
    /// <p>The verified email address that the email message was sent from.</p>
    pub fn from_address(&self) -> ::std::option::Option<&str> {
        self.from_address.as_deref()
    }
    /// <p>The IP addresses that were used to send the email message.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sending_ips.is_none()`.
    pub fn sending_ips(&self) -> &[::std::string::String] {
        self.sending_ips.as_deref().unwrap_or_default()
    }
    /// <p>The first time when the email message was delivered to any recipient's inbox. This value can help you determine how long it took for a campaign to deliver an email message.</p>
    pub fn first_seen_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.first_seen_date_time.as_ref()
    }
    /// <p>The last time when the email message was delivered to any recipient's inbox. This value can help you determine how long it took for a campaign to deliver an email message.</p>
    pub fn last_seen_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_seen_date_time.as_ref()
    }
    /// <p>The number of email messages that were delivered to recipients’ inboxes.</p>
    pub fn inbox_count(&self) -> ::std::option::Option<i64> {
        self.inbox_count
    }
    /// <p>The number of email messages that were delivered to recipients' spam or junk mail folders.</p>
    pub fn spam_count(&self) -> ::std::option::Option<i64> {
        self.spam_count
    }
    /// <p>The percentage of email messages that were opened by recipients. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub fn read_rate(&self) -> ::std::option::Option<f64> {
        self.read_rate
    }
    /// <p>The percentage of email messages that were deleted by recipients, without being opened first. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub fn delete_rate(&self) -> ::std::option::Option<f64> {
        self.delete_rate
    }
    /// <p>The percentage of email messages that were opened and then deleted by recipients. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub fn read_delete_rate(&self) -> ::std::option::Option<f64> {
        self.read_delete_rate
    }
    /// <p>The projected number of recipients that the email message was sent to.</p>
    pub fn projected_volume(&self) -> ::std::option::Option<i64> {
        self.projected_volume
    }
    /// <p>The major email providers who handled the email message.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.esps.is_none()`.
    pub fn esps(&self) -> &[::std::string::String] {
        self.esps.as_deref().unwrap_or_default()
    }
}
impl DomainDeliverabilityCampaign {
    /// Creates a new builder-style object to manufacture [`DomainDeliverabilityCampaign`](crate::types::DomainDeliverabilityCampaign).
    pub fn builder() -> crate::types::builders::DomainDeliverabilityCampaignBuilder {
        crate::types::builders::DomainDeliverabilityCampaignBuilder::default()
    }
}

/// A builder for [`DomainDeliverabilityCampaign`](crate::types::DomainDeliverabilityCampaign).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DomainDeliverabilityCampaignBuilder {
    pub(crate) campaign_id: ::std::option::Option<::std::string::String>,
    pub(crate) image_url: ::std::option::Option<::std::string::String>,
    pub(crate) subject: ::std::option::Option<::std::string::String>,
    pub(crate) from_address: ::std::option::Option<::std::string::String>,
    pub(crate) sending_ips: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) first_seen_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_seen_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) inbox_count: ::std::option::Option<i64>,
    pub(crate) spam_count: ::std::option::Option<i64>,
    pub(crate) read_rate: ::std::option::Option<f64>,
    pub(crate) delete_rate: ::std::option::Option<f64>,
    pub(crate) read_delete_rate: ::std::option::Option<f64>,
    pub(crate) projected_volume: ::std::option::Option<i64>,
    pub(crate) esps: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DomainDeliverabilityCampaignBuilder {
    /// <p>The unique identifier for the campaign. The Deliverability dashboard automatically generates and assigns this identifier to a campaign.</p>
    pub fn campaign_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.campaign_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the campaign. The Deliverability dashboard automatically generates and assigns this identifier to a campaign.</p>
    pub fn set_campaign_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.campaign_id = input;
        self
    }
    /// <p>The unique identifier for the campaign. The Deliverability dashboard automatically generates and assigns this identifier to a campaign.</p>
    pub fn get_campaign_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.campaign_id
    }
    /// <p>The URL of an image that contains a snapshot of the email message that was sent.</p>
    pub fn image_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.image_url = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The URL of an image that contains a snapshot of the email message that was sent.</p>
    pub fn set_image_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.image_url = input;
        self
    }
    /// <p>The URL of an image that contains a snapshot of the email message that was sent.</p>
    pub fn get_image_url(&self) -> &::std::option::Option<::std::string::String> {
        &self.image_url
    }
    /// <p>The subject line, or title, of the email message.</p>
    pub fn subject(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.subject = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The subject line, or title, of the email message.</p>
    pub fn set_subject(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.subject = input;
        self
    }
    /// <p>The subject line, or title, of the email message.</p>
    pub fn get_subject(&self) -> &::std::option::Option<::std::string::String> {
        &self.subject
    }
    /// <p>The verified email address that the email message was sent from.</p>
    pub fn from_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.from_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The verified email address that the email message was sent from.</p>
    pub fn set_from_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.from_address = input;
        self
    }
    /// <p>The verified email address that the email message was sent from.</p>
    pub fn get_from_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.from_address
    }
    /// Appends an item to `sending_ips`.
    ///
    /// To override the contents of this collection use [`set_sending_ips`](Self::set_sending_ips).
    ///
    /// <p>The IP addresses that were used to send the email message.</p>
    pub fn sending_ips(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.sending_ips.unwrap_or_default();
        v.push(input.into());
        self.sending_ips = ::std::option::Option::Some(v);
        self
    }
    /// <p>The IP addresses that were used to send the email message.</p>
    pub fn set_sending_ips(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.sending_ips = input;
        self
    }
    /// <p>The IP addresses that were used to send the email message.</p>
    pub fn get_sending_ips(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.sending_ips
    }
    /// <p>The first time when the email message was delivered to any recipient's inbox. This value can help you determine how long it took for a campaign to deliver an email message.</p>
    pub fn first_seen_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.first_seen_date_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The first time when the email message was delivered to any recipient's inbox. This value can help you determine how long it took for a campaign to deliver an email message.</p>
    pub fn set_first_seen_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.first_seen_date_time = input;
        self
    }
    /// <p>The first time when the email message was delivered to any recipient's inbox. This value can help you determine how long it took for a campaign to deliver an email message.</p>
    pub fn get_first_seen_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.first_seen_date_time
    }
    /// <p>The last time when the email message was delivered to any recipient's inbox. This value can help you determine how long it took for a campaign to deliver an email message.</p>
    pub fn last_seen_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_seen_date_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The last time when the email message was delivered to any recipient's inbox. This value can help you determine how long it took for a campaign to deliver an email message.</p>
    pub fn set_last_seen_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_seen_date_time = input;
        self
    }
    /// <p>The last time when the email message was delivered to any recipient's inbox. This value can help you determine how long it took for a campaign to deliver an email message.</p>
    pub fn get_last_seen_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_seen_date_time
    }
    /// <p>The number of email messages that were delivered to recipients’ inboxes.</p>
    pub fn inbox_count(mut self, input: i64) -> Self {
        self.inbox_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of email messages that were delivered to recipients’ inboxes.</p>
    pub fn set_inbox_count(mut self, input: ::std::option::Option<i64>) -> Self {
        self.inbox_count = input;
        self
    }
    /// <p>The number of email messages that were delivered to recipients’ inboxes.</p>
    pub fn get_inbox_count(&self) -> &::std::option::Option<i64> {
        &self.inbox_count
    }
    /// <p>The number of email messages that were delivered to recipients' spam or junk mail folders.</p>
    pub fn spam_count(mut self, input: i64) -> Self {
        self.spam_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of email messages that were delivered to recipients' spam or junk mail folders.</p>
    pub fn set_spam_count(mut self, input: ::std::option::Option<i64>) -> Self {
        self.spam_count = input;
        self
    }
    /// <p>The number of email messages that were delivered to recipients' spam or junk mail folders.</p>
    pub fn get_spam_count(&self) -> &::std::option::Option<i64> {
        &self.spam_count
    }
    /// <p>The percentage of email messages that were opened by recipients. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub fn read_rate(mut self, input: f64) -> Self {
        self.read_rate = ::std::option::Option::Some(input);
        self
    }
    /// <p>The percentage of email messages that were opened by recipients. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub fn set_read_rate(mut self, input: ::std::option::Option<f64>) -> Self {
        self.read_rate = input;
        self
    }
    /// <p>The percentage of email messages that were opened by recipients. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub fn get_read_rate(&self) -> &::std::option::Option<f64> {
        &self.read_rate
    }
    /// <p>The percentage of email messages that were deleted by recipients, without being opened first. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub fn delete_rate(mut self, input: f64) -> Self {
        self.delete_rate = ::std::option::Option::Some(input);
        self
    }
    /// <p>The percentage of email messages that were deleted by recipients, without being opened first. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub fn set_delete_rate(mut self, input: ::std::option::Option<f64>) -> Self {
        self.delete_rate = input;
        self
    }
    /// <p>The percentage of email messages that were deleted by recipients, without being opened first. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub fn get_delete_rate(&self) -> &::std::option::Option<f64> {
        &self.delete_rate
    }
    /// <p>The percentage of email messages that were opened and then deleted by recipients. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub fn read_delete_rate(mut self, input: f64) -> Self {
        self.read_delete_rate = ::std::option::Option::Some(input);
        self
    }
    /// <p>The percentage of email messages that were opened and then deleted by recipients. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub fn set_read_delete_rate(mut self, input: ::std::option::Option<f64>) -> Self {
        self.read_delete_rate = input;
        self
    }
    /// <p>The percentage of email messages that were opened and then deleted by recipients. Due to technical limitations, this value only includes recipients who opened the message by using an email client that supports images.</p>
    pub fn get_read_delete_rate(&self) -> &::std::option::Option<f64> {
        &self.read_delete_rate
    }
    /// <p>The projected number of recipients that the email message was sent to.</p>
    pub fn projected_volume(mut self, input: i64) -> Self {
        self.projected_volume = ::std::option::Option::Some(input);
        self
    }
    /// <p>The projected number of recipients that the email message was sent to.</p>
    pub fn set_projected_volume(mut self, input: ::std::option::Option<i64>) -> Self {
        self.projected_volume = input;
        self
    }
    /// <p>The projected number of recipients that the email message was sent to.</p>
    pub fn get_projected_volume(&self) -> &::std::option::Option<i64> {
        &self.projected_volume
    }
    /// Appends an item to `esps`.
    ///
    /// To override the contents of this collection use [`set_esps`](Self::set_esps).
    ///
    /// <p>The major email providers who handled the email message.</p>
    pub fn esps(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.esps.unwrap_or_default();
        v.push(input.into());
        self.esps = ::std::option::Option::Some(v);
        self
    }
    /// <p>The major email providers who handled the email message.</p>
    pub fn set_esps(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.esps = input;
        self
    }
    /// <p>The major email providers who handled the email message.</p>
    pub fn get_esps(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.esps
    }
    /// Consumes the builder and constructs a [`DomainDeliverabilityCampaign`](crate::types::DomainDeliverabilityCampaign).
    pub fn build(self) -> crate::types::DomainDeliverabilityCampaign {
        crate::types::DomainDeliverabilityCampaign {
            campaign_id: self.campaign_id,
            image_url: self.image_url,
            subject: self.subject,
            from_address: self.from_address,
            sending_ips: self.sending_ips,
            first_seen_date_time: self.first_seen_date_time,
            last_seen_date_time: self.last_seen_date_time,
            inbox_count: self.inbox_count,
            spam_count: self.spam_count,
            read_rate: self.read_rate,
            delete_rate: self.delete_rate,
            read_delete_rate: self.read_delete_rate,
            projected_volume: self.projected_volume,
            esps: self.esps,
        }
    }
}