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
// 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, ::std::fmt::Debug)]
pub struct PutKeywordInput {
/// <p>The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use <code>DescribePhoneNumbers</code> get the values for PhoneNumberId and PhoneNumberArn while <code>DescribeSenderIds</code> can be used to get the values for SenderId and SenderIdArn.</p><important>
/// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
/// </important>
pub origination_identity: ::std::option::Option<::std::string::String>,
/// <p>The new keyword to add.</p>
pub keyword: ::std::option::Option<::std::string::String>,
/// <p>The message associated with the keyword.</p>
pub keyword_message: ::std::option::Option<::std::string::String>,
/// <p>The action to perform for the new keyword when it is received.</p>
/// <ul>
/// <li>
/// <p>AUTOMATIC_RESPONSE: A message is sent to the recipient.</p></li>
/// <li>
/// <p>OPT_OUT: Keeps the recipient from receiving future messages.</p></li>
/// <li>
/// <p>OPT_IN: The recipient wants to receive future messages.</p></li>
/// </ul>
pub keyword_action: ::std::option::Option<crate::types::KeywordAction>,
}
impl PutKeywordInput {
/// <p>The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use <code>DescribePhoneNumbers</code> get the values for PhoneNumberId and PhoneNumberArn while <code>DescribeSenderIds</code> can be used to get the values for SenderId and SenderIdArn.</p><important>
/// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
/// </important>
pub fn origination_identity(&self) -> ::std::option::Option<&str> {
self.origination_identity.as_deref()
}
/// <p>The new keyword to add.</p>
pub fn keyword(&self) -> ::std::option::Option<&str> {
self.keyword.as_deref()
}
/// <p>The message associated with the keyword.</p>
pub fn keyword_message(&self) -> ::std::option::Option<&str> {
self.keyword_message.as_deref()
}
/// <p>The action to perform for the new keyword when it is received.</p>
/// <ul>
/// <li>
/// <p>AUTOMATIC_RESPONSE: A message is sent to the recipient.</p></li>
/// <li>
/// <p>OPT_OUT: Keeps the recipient from receiving future messages.</p></li>
/// <li>
/// <p>OPT_IN: The recipient wants to receive future messages.</p></li>
/// </ul>
pub fn keyword_action(&self) -> ::std::option::Option<&crate::types::KeywordAction> {
self.keyword_action.as_ref()
}
}
impl PutKeywordInput {
/// Creates a new builder-style object to manufacture [`PutKeywordInput`](crate::operation::put_keyword::PutKeywordInput).
pub fn builder() -> crate::operation::put_keyword::builders::PutKeywordInputBuilder {
crate::operation::put_keyword::builders::PutKeywordInputBuilder::default()
}
}
/// A builder for [`PutKeywordInput`](crate::operation::put_keyword::PutKeywordInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutKeywordInputBuilder {
pub(crate) origination_identity: ::std::option::Option<::std::string::String>,
pub(crate) keyword: ::std::option::Option<::std::string::String>,
pub(crate) keyword_message: ::std::option::Option<::std::string::String>,
pub(crate) keyword_action: ::std::option::Option<crate::types::KeywordAction>,
}
impl PutKeywordInputBuilder {
/// <p>The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use <code>DescribePhoneNumbers</code> get the values for PhoneNumberId and PhoneNumberArn while <code>DescribeSenderIds</code> can be used to get the values for SenderId and SenderIdArn.</p><important>
/// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
/// </important>
/// This field is required.
pub fn origination_identity(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.origination_identity = ::std::option::Option::Some(input.into());
self
}
/// <p>The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use <code>DescribePhoneNumbers</code> get the values for PhoneNumberId and PhoneNumberArn while <code>DescribeSenderIds</code> can be used to get the values for SenderId and SenderIdArn.</p><important>
/// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
/// </important>
pub fn set_origination_identity(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.origination_identity = input;
self
}
/// <p>The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use <code>DescribePhoneNumbers</code> get the values for PhoneNumberId and PhoneNumberArn while <code>DescribeSenderIds</code> can be used to get the values for SenderId and SenderIdArn.</p><important>
/// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
/// </important>
pub fn get_origination_identity(&self) -> &::std::option::Option<::std::string::String> {
&self.origination_identity
}
/// <p>The new keyword to add.</p>
/// This field is required.
pub fn keyword(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.keyword = ::std::option::Option::Some(input.into());
self
}
/// <p>The new keyword to add.</p>
pub fn set_keyword(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.keyword = input;
self
}
/// <p>The new keyword to add.</p>
pub fn get_keyword(&self) -> &::std::option::Option<::std::string::String> {
&self.keyword
}
/// <p>The message associated with the keyword.</p>
/// This field is required.
pub fn keyword_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.keyword_message = ::std::option::Option::Some(input.into());
self
}
/// <p>The message associated with the keyword.</p>
pub fn set_keyword_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.keyword_message = input;
self
}
/// <p>The message associated with the keyword.</p>
pub fn get_keyword_message(&self) -> &::std::option::Option<::std::string::String> {
&self.keyword_message
}
/// <p>The action to perform for the new keyword when it is received.</p>
/// <ul>
/// <li>
/// <p>AUTOMATIC_RESPONSE: A message is sent to the recipient.</p></li>
/// <li>
/// <p>OPT_OUT: Keeps the recipient from receiving future messages.</p></li>
/// <li>
/// <p>OPT_IN: The recipient wants to receive future messages.</p></li>
/// </ul>
pub fn keyword_action(mut self, input: crate::types::KeywordAction) -> Self {
self.keyword_action = ::std::option::Option::Some(input);
self
}
/// <p>The action to perform for the new keyword when it is received.</p>
/// <ul>
/// <li>
/// <p>AUTOMATIC_RESPONSE: A message is sent to the recipient.</p></li>
/// <li>
/// <p>OPT_OUT: Keeps the recipient from receiving future messages.</p></li>
/// <li>
/// <p>OPT_IN: The recipient wants to receive future messages.</p></li>
/// </ul>
pub fn set_keyword_action(mut self, input: ::std::option::Option<crate::types::KeywordAction>) -> Self {
self.keyword_action = input;
self
}
/// <p>The action to perform for the new keyword when it is received.</p>
/// <ul>
/// <li>
/// <p>AUTOMATIC_RESPONSE: A message is sent to the recipient.</p></li>
/// <li>
/// <p>OPT_OUT: Keeps the recipient from receiving future messages.</p></li>
/// <li>
/// <p>OPT_IN: The recipient wants to receive future messages.</p></li>
/// </ul>
pub fn get_keyword_action(&self) -> &::std::option::Option<crate::types::KeywordAction> {
&self.keyword_action
}
/// Consumes the builder and constructs a [`PutKeywordInput`](crate::operation::put_keyword::PutKeywordInput).
pub fn build(self) -> ::std::result::Result<crate::operation::put_keyword::PutKeywordInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::put_keyword::PutKeywordInput {
origination_identity: self.origination_identity,
keyword: self.keyword,
keyword_message: self.keyword_message,
keyword_action: self.keyword_action,
})
}
}