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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct ActivateEmailContactInput {
/// <p>The Amazon Resource Name (ARN) of the resource.</p>
pub arn: ::std::option::Option<::std::string::String>,
/// <p>The activation code for this email contact.</p>
/// <p>An email contact has a maximum of five activation attempts. Activation codes expire after 12 hours and are generated by the <a href="https://docs.aws.amazon.com/notificationscontacts/latest/APIReference/API_SendActivationCode.html">SendActivationCode</a> API action.</p>
pub code: ::std::option::Option<::std::string::String>,
}
impl ActivateEmailContactInput {
/// <p>The Amazon Resource Name (ARN) of the resource.</p>
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The activation code for this email contact.</p>
/// <p>An email contact has a maximum of five activation attempts. Activation codes expire after 12 hours and are generated by the <a href="https://docs.aws.amazon.com/notificationscontacts/latest/APIReference/API_SendActivationCode.html">SendActivationCode</a> API action.</p>
pub fn code(&self) -> ::std::option::Option<&str> {
self.code.as_deref()
}
}
impl ::std::fmt::Debug for ActivateEmailContactInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("ActivateEmailContactInput");
formatter.field("arn", &self.arn);
formatter.field("code", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl ActivateEmailContactInput {
/// Creates a new builder-style object to manufacture [`ActivateEmailContactInput`](crate::operation::activate_email_contact::ActivateEmailContactInput).
pub fn builder() -> crate::operation::activate_email_contact::builders::ActivateEmailContactInputBuilder {
crate::operation::activate_email_contact::builders::ActivateEmailContactInputBuilder::default()
}
}
/// A builder for [`ActivateEmailContactInput`](crate::operation::activate_email_contact::ActivateEmailContactInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ActivateEmailContactInputBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) code: ::std::option::Option<::std::string::String>,
}
impl ActivateEmailContactInputBuilder {
/// <p>The Amazon Resource Name (ARN) of the resource.</p>
/// This field is required.
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the resource.</p>
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the resource.</p>
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
/// <p>The activation code for this email contact.</p>
/// <p>An email contact has a maximum of five activation attempts. Activation codes expire after 12 hours and are generated by the <a href="https://docs.aws.amazon.com/notificationscontacts/latest/APIReference/API_SendActivationCode.html">SendActivationCode</a> API action.</p>
/// This field is required.
pub fn code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.code = ::std::option::Option::Some(input.into());
self
}
/// <p>The activation code for this email contact.</p>
/// <p>An email contact has a maximum of five activation attempts. Activation codes expire after 12 hours and are generated by the <a href="https://docs.aws.amazon.com/notificationscontacts/latest/APIReference/API_SendActivationCode.html">SendActivationCode</a> API action.</p>
pub fn set_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.code = input;
self
}
/// <p>The activation code for this email contact.</p>
/// <p>An email contact has a maximum of five activation attempts. Activation codes expire after 12 hours and are generated by the <a href="https://docs.aws.amazon.com/notificationscontacts/latest/APIReference/API_SendActivationCode.html">SendActivationCode</a> API action.</p>
pub fn get_code(&self) -> &::std::option::Option<::std::string::String> {
&self.code
}
/// Consumes the builder and constructs a [`ActivateEmailContactInput`](crate::operation::activate_email_contact::ActivateEmailContactInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::activate_email_contact::ActivateEmailContactInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::activate_email_contact::ActivateEmailContactInput {
arn: self.arn,
code: self.code,
})
}
}
impl ::std::fmt::Debug for ActivateEmailContactInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("ActivateEmailContactInputBuilder");
formatter.field("arn", &self.arn);
formatter.field("code", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}