aws_sdk_pinpoint/types/
_sms_channel_request.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Specifies the status and settings of the SMS channel for an application.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SmsChannelRequest {
7    /// <p>Specifies whether to enable the SMS channel for the application.</p>
8    pub enabled: ::std::option::Option<bool>,
9    /// <p>The identity that you want to display on recipients' devices when they receive messages from the SMS channel.</p>
10    pub sender_id: ::std::option::Option<::std::string::String>,
11    /// <p>The registered short code that you want to use when you send messages through the SMS channel.</p>
12    pub short_code: ::std::option::Option<::std::string::String>,
13}
14impl SmsChannelRequest {
15    /// <p>Specifies whether to enable the SMS channel for the application.</p>
16    pub fn enabled(&self) -> ::std::option::Option<bool> {
17        self.enabled
18    }
19    /// <p>The identity that you want to display on recipients' devices when they receive messages from the SMS channel.</p>
20    pub fn sender_id(&self) -> ::std::option::Option<&str> {
21        self.sender_id.as_deref()
22    }
23    /// <p>The registered short code that you want to use when you send messages through the SMS channel.</p>
24    pub fn short_code(&self) -> ::std::option::Option<&str> {
25        self.short_code.as_deref()
26    }
27}
28impl SmsChannelRequest {
29    /// Creates a new builder-style object to manufacture [`SmsChannelRequest`](crate::types::SmsChannelRequest).
30    pub fn builder() -> crate::types::builders::SmsChannelRequestBuilder {
31        crate::types::builders::SmsChannelRequestBuilder::default()
32    }
33}
34
35/// A builder for [`SmsChannelRequest`](crate::types::SmsChannelRequest).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct SmsChannelRequestBuilder {
39    pub(crate) enabled: ::std::option::Option<bool>,
40    pub(crate) sender_id: ::std::option::Option<::std::string::String>,
41    pub(crate) short_code: ::std::option::Option<::std::string::String>,
42}
43impl SmsChannelRequestBuilder {
44    /// <p>Specifies whether to enable the SMS channel for the application.</p>
45    pub fn enabled(mut self, input: bool) -> Self {
46        self.enabled = ::std::option::Option::Some(input);
47        self
48    }
49    /// <p>Specifies whether to enable the SMS channel for the application.</p>
50    pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
51        self.enabled = input;
52        self
53    }
54    /// <p>Specifies whether to enable the SMS channel for the application.</p>
55    pub fn get_enabled(&self) -> &::std::option::Option<bool> {
56        &self.enabled
57    }
58    /// <p>The identity that you want to display on recipients' devices when they receive messages from the SMS channel.</p>
59    pub fn sender_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.sender_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The identity that you want to display on recipients' devices when they receive messages from the SMS channel.</p>
64    pub fn set_sender_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.sender_id = input;
66        self
67    }
68    /// <p>The identity that you want to display on recipients' devices when they receive messages from the SMS channel.</p>
69    pub fn get_sender_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.sender_id
71    }
72    /// <p>The registered short code that you want to use when you send messages through the SMS channel.</p>
73    pub fn short_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.short_code = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The registered short code that you want to use when you send messages through the SMS channel.</p>
78    pub fn set_short_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.short_code = input;
80        self
81    }
82    /// <p>The registered short code that you want to use when you send messages through the SMS channel.</p>
83    pub fn get_short_code(&self) -> &::std::option::Option<::std::string::String> {
84        &self.short_code
85    }
86    /// Consumes the builder and constructs a [`SmsChannelRequest`](crate::types::SmsChannelRequest).
87    pub fn build(self) -> crate::types::SmsChannelRequest {
88        crate::types::SmsChannelRequest {
89            enabled: self.enabled,
90            sender_id: self.sender_id,
91            short_code: self.short_code,
92        }
93    }
94}