Skip to main content

aws_sdk_pinpointsmsvoicev2/operation/send_destination_number_verification_code/
_send_destination_number_verification_code_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SendDestinationNumberVerificationCodeInput {
6    /// <p>The unique identifier for the verified destination phone number.</p>
7    pub verified_destination_number_id: ::std::option::Option<::std::string::String>,
8    /// <p>Choose to send the verification code as an SMS or voice message.</p>
9    pub verification_channel: ::std::option::Option<crate::types::VerificationChannel>,
10    /// <p>Choose the language to use for the message.</p>
11    pub language_code: ::std::option::Option<crate::types::LanguageCode>,
12    /// <p>The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.</p><important>
13    /// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
14    /// </important>
15    pub origination_identity: ::std::option::Option<::std::string::String>,
16    /// <p>The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.</p>
17    pub configuration_set_name: ::std::option::Option<::std::string::String>,
18    /// <p>You can specify custom data in this field. If you do, that data is logged to the event destination.</p>
19    pub context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20    /// <p>This field is used for any country-specific registration requirements. Currently, this setting is only used when you send messages to recipients in India using a sender ID. For more information see <a href="https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-senderid-india.html">Special requirements for sending SMS messages to recipients in India</a>.</p>
21    pub destination_country_parameters:
22        ::std::option::Option<::std::collections::HashMap<crate::types::DestinationCountryParameterKey, ::std::string::String>>,
23}
24impl SendDestinationNumberVerificationCodeInput {
25    /// <p>The unique identifier for the verified destination phone number.</p>
26    pub fn verified_destination_number_id(&self) -> ::std::option::Option<&str> {
27        self.verified_destination_number_id.as_deref()
28    }
29    /// <p>Choose to send the verification code as an SMS or voice message.</p>
30    pub fn verification_channel(&self) -> ::std::option::Option<&crate::types::VerificationChannel> {
31        self.verification_channel.as_ref()
32    }
33    /// <p>Choose the language to use for the message.</p>
34    pub fn language_code(&self) -> ::std::option::Option<&crate::types::LanguageCode> {
35        self.language_code.as_ref()
36    }
37    /// <p>The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.</p><important>
38    /// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
39    /// </important>
40    pub fn origination_identity(&self) -> ::std::option::Option<&str> {
41        self.origination_identity.as_deref()
42    }
43    /// <p>The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.</p>
44    pub fn configuration_set_name(&self) -> ::std::option::Option<&str> {
45        self.configuration_set_name.as_deref()
46    }
47    /// <p>You can specify custom data in this field. If you do, that data is logged to the event destination.</p>
48    pub fn context(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
49        self.context.as_ref()
50    }
51    /// <p>This field is used for any country-specific registration requirements. Currently, this setting is only used when you send messages to recipients in India using a sender ID. For more information see <a href="https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-senderid-india.html">Special requirements for sending SMS messages to recipients in India</a>.</p>
52    pub fn destination_country_parameters(
53        &self,
54    ) -> ::std::option::Option<&::std::collections::HashMap<crate::types::DestinationCountryParameterKey, ::std::string::String>> {
55        self.destination_country_parameters.as_ref()
56    }
57}
58impl SendDestinationNumberVerificationCodeInput {
59    /// Creates a new builder-style object to manufacture [`SendDestinationNumberVerificationCodeInput`](crate::operation::send_destination_number_verification_code::SendDestinationNumberVerificationCodeInput).
60    pub fn builder() -> crate::operation::send_destination_number_verification_code::builders::SendDestinationNumberVerificationCodeInputBuilder {
61        crate::operation::send_destination_number_verification_code::builders::SendDestinationNumberVerificationCodeInputBuilder::default()
62    }
63}
64
65/// A builder for [`SendDestinationNumberVerificationCodeInput`](crate::operation::send_destination_number_verification_code::SendDestinationNumberVerificationCodeInput).
66#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
67#[non_exhaustive]
68pub struct SendDestinationNumberVerificationCodeInputBuilder {
69    pub(crate) verified_destination_number_id: ::std::option::Option<::std::string::String>,
70    pub(crate) verification_channel: ::std::option::Option<crate::types::VerificationChannel>,
71    pub(crate) language_code: ::std::option::Option<crate::types::LanguageCode>,
72    pub(crate) origination_identity: ::std::option::Option<::std::string::String>,
73    pub(crate) configuration_set_name: ::std::option::Option<::std::string::String>,
74    pub(crate) context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
75    pub(crate) destination_country_parameters:
76        ::std::option::Option<::std::collections::HashMap<crate::types::DestinationCountryParameterKey, ::std::string::String>>,
77}
78impl SendDestinationNumberVerificationCodeInputBuilder {
79    /// <p>The unique identifier for the verified destination phone number.</p>
80    /// This field is required.
81    pub fn verified_destination_number_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.verified_destination_number_id = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The unique identifier for the verified destination phone number.</p>
86    pub fn set_verified_destination_number_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.verified_destination_number_id = input;
88        self
89    }
90    /// <p>The unique identifier for the verified destination phone number.</p>
91    pub fn get_verified_destination_number_id(&self) -> &::std::option::Option<::std::string::String> {
92        &self.verified_destination_number_id
93    }
94    /// <p>Choose to send the verification code as an SMS or voice message.</p>
95    /// This field is required.
96    pub fn verification_channel(mut self, input: crate::types::VerificationChannel) -> Self {
97        self.verification_channel = ::std::option::Option::Some(input);
98        self
99    }
100    /// <p>Choose to send the verification code as an SMS or voice message.</p>
101    pub fn set_verification_channel(mut self, input: ::std::option::Option<crate::types::VerificationChannel>) -> Self {
102        self.verification_channel = input;
103        self
104    }
105    /// <p>Choose to send the verification code as an SMS or voice message.</p>
106    pub fn get_verification_channel(&self) -> &::std::option::Option<crate::types::VerificationChannel> {
107        &self.verification_channel
108    }
109    /// <p>Choose the language to use for the message.</p>
110    pub fn language_code(mut self, input: crate::types::LanguageCode) -> Self {
111        self.language_code = ::std::option::Option::Some(input);
112        self
113    }
114    /// <p>Choose the language to use for the message.</p>
115    pub fn set_language_code(mut self, input: ::std::option::Option<crate::types::LanguageCode>) -> Self {
116        self.language_code = input;
117        self
118    }
119    /// <p>Choose the language to use for the message.</p>
120    pub fn get_language_code(&self) -> &::std::option::Option<crate::types::LanguageCode> {
121        &self.language_code
122    }
123    /// <p>The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.</p><important>
124    /// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
125    /// </important>
126    pub fn origination_identity(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.origination_identity = ::std::option::Option::Some(input.into());
128        self
129    }
130    /// <p>The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.</p><important>
131    /// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
132    /// </important>
133    pub fn set_origination_identity(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.origination_identity = input;
135        self
136    }
137    /// <p>The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.</p><important>
138    /// <p>If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).</p>
139    /// </important>
140    pub fn get_origination_identity(&self) -> &::std::option::Option<::std::string::String> {
141        &self.origination_identity
142    }
143    /// <p>The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.</p>
144    pub fn configuration_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.configuration_set_name = ::std::option::Option::Some(input.into());
146        self
147    }
148    /// <p>The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.</p>
149    pub fn set_configuration_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.configuration_set_name = input;
151        self
152    }
153    /// <p>The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.</p>
154    pub fn get_configuration_set_name(&self) -> &::std::option::Option<::std::string::String> {
155        &self.configuration_set_name
156    }
157    /// Adds a key-value pair to `context`.
158    ///
159    /// To override the contents of this collection use [`set_context`](Self::set_context).
160    ///
161    /// <p>You can specify custom data in this field. If you do, that data is logged to the event destination.</p>
162    pub fn context(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
163        let mut hash_map = self.context.unwrap_or_default();
164        hash_map.insert(k.into(), v.into());
165        self.context = ::std::option::Option::Some(hash_map);
166        self
167    }
168    /// <p>You can specify custom data in this field. If you do, that data is logged to the event destination.</p>
169    pub fn set_context(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
170        self.context = input;
171        self
172    }
173    /// <p>You can specify custom data in this field. If you do, that data is logged to the event destination.</p>
174    pub fn get_context(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
175        &self.context
176    }
177    /// Adds a key-value pair to `destination_country_parameters`.
178    ///
179    /// To override the contents of this collection use [`set_destination_country_parameters`](Self::set_destination_country_parameters).
180    ///
181    /// <p>This field is used for any country-specific registration requirements. Currently, this setting is only used when you send messages to recipients in India using a sender ID. For more information see <a href="https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-senderid-india.html">Special requirements for sending SMS messages to recipients in India</a>.</p>
182    pub fn destination_country_parameters(
183        mut self,
184        k: crate::types::DestinationCountryParameterKey,
185        v: impl ::std::convert::Into<::std::string::String>,
186    ) -> Self {
187        let mut hash_map = self.destination_country_parameters.unwrap_or_default();
188        hash_map.insert(k, v.into());
189        self.destination_country_parameters = ::std::option::Option::Some(hash_map);
190        self
191    }
192    /// <p>This field is used for any country-specific registration requirements. Currently, this setting is only used when you send messages to recipients in India using a sender ID. For more information see <a href="https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-senderid-india.html">Special requirements for sending SMS messages to recipients in India</a>.</p>
193    pub fn set_destination_country_parameters(
194        mut self,
195        input: ::std::option::Option<::std::collections::HashMap<crate::types::DestinationCountryParameterKey, ::std::string::String>>,
196    ) -> Self {
197        self.destination_country_parameters = input;
198        self
199    }
200    /// <p>This field is used for any country-specific registration requirements. Currently, this setting is only used when you send messages to recipients in India using a sender ID. For more information see <a href="https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-senderid-india.html">Special requirements for sending SMS messages to recipients in India</a>.</p>
201    pub fn get_destination_country_parameters(
202        &self,
203    ) -> &::std::option::Option<::std::collections::HashMap<crate::types::DestinationCountryParameterKey, ::std::string::String>> {
204        &self.destination_country_parameters
205    }
206    /// Consumes the builder and constructs a [`SendDestinationNumberVerificationCodeInput`](crate::operation::send_destination_number_verification_code::SendDestinationNumberVerificationCodeInput).
207    pub fn build(
208        self,
209    ) -> ::std::result::Result<
210        crate::operation::send_destination_number_verification_code::SendDestinationNumberVerificationCodeInput,
211        ::aws_smithy_types::error::operation::BuildError,
212    > {
213        ::std::result::Result::Ok(
214            crate::operation::send_destination_number_verification_code::SendDestinationNumberVerificationCodeInput {
215                verified_destination_number_id: self.verified_destination_number_id,
216                verification_channel: self.verification_channel,
217                language_code: self.language_code,
218                origination_identity: self.origination_identity,
219                configuration_set_name: self.configuration_set_name,
220                context: self.context,
221                destination_country_parameters: self.destination_country_parameters,
222            },
223        )
224    }
225}