aws_sdk_chime/types/
_telephony_settings.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct TelephonySettings {
7 pub inbound_calling: bool,
9 pub outbound_calling: bool,
11 pub sms: bool,
13}
14impl TelephonySettings {
15 pub fn inbound_calling(&self) -> bool {
17 self.inbound_calling
18 }
19 pub fn outbound_calling(&self) -> bool {
21 self.outbound_calling
22 }
23 pub fn sms(&self) -> bool {
25 self.sms
26 }
27}
28impl TelephonySettings {
29 pub fn builder() -> crate::types::builders::TelephonySettingsBuilder {
31 crate::types::builders::TelephonySettingsBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct TelephonySettingsBuilder {
39 pub(crate) inbound_calling: ::std::option::Option<bool>,
40 pub(crate) outbound_calling: ::std::option::Option<bool>,
41 pub(crate) sms: ::std::option::Option<bool>,
42}
43impl TelephonySettingsBuilder {
44 pub fn inbound_calling(mut self, input: bool) -> Self {
47 self.inbound_calling = ::std::option::Option::Some(input);
48 self
49 }
50 pub fn set_inbound_calling(mut self, input: ::std::option::Option<bool>) -> Self {
52 self.inbound_calling = input;
53 self
54 }
55 pub fn get_inbound_calling(&self) -> &::std::option::Option<bool> {
57 &self.inbound_calling
58 }
59 pub fn outbound_calling(mut self, input: bool) -> Self {
62 self.outbound_calling = ::std::option::Option::Some(input);
63 self
64 }
65 pub fn set_outbound_calling(mut self, input: ::std::option::Option<bool>) -> Self {
67 self.outbound_calling = input;
68 self
69 }
70 pub fn get_outbound_calling(&self) -> &::std::option::Option<bool> {
72 &self.outbound_calling
73 }
74 pub fn sms(mut self, input: bool) -> Self {
77 self.sms = ::std::option::Option::Some(input);
78 self
79 }
80 pub fn set_sms(mut self, input: ::std::option::Option<bool>) -> Self {
82 self.sms = input;
83 self
84 }
85 pub fn get_sms(&self) -> &::std::option::Option<bool> {
87 &self.sms
88 }
89 pub fn build(self) -> ::std::result::Result<crate::types::TelephonySettings, ::aws_smithy_types::error::operation::BuildError> {
95 ::std::result::Result::Ok(crate::types::TelephonySettings {
96 inbound_calling: self.inbound_calling.ok_or_else(|| {
97 ::aws_smithy_types::error::operation::BuildError::missing_field(
98 "inbound_calling",
99 "inbound_calling was not specified but it is required when building TelephonySettings",
100 )
101 })?,
102 outbound_calling: self.outbound_calling.ok_or_else(|| {
103 ::aws_smithy_types::error::operation::BuildError::missing_field(
104 "outbound_calling",
105 "outbound_calling was not specified but it is required when building TelephonySettings",
106 )
107 })?,
108 sms: self.sms.ok_or_else(|| {
109 ::aws_smithy_types::error::operation::BuildError::missing_field(
110 "sms",
111 "sms was not specified but it is required when building TelephonySettings",
112 )
113 })?,
114 })
115 }
116}