aws_sdk_chime/operation/update_phone_number/
_update_phone_number_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdatePhoneNumberInput {
6 pub phone_number_id: ::std::option::Option<::std::string::String>,
8 pub product_type: ::std::option::Option<crate::types::PhoneNumberProductType>,
10 pub calling_name: ::std::option::Option<::std::string::String>,
12}
13impl UpdatePhoneNumberInput {
14 pub fn phone_number_id(&self) -> ::std::option::Option<&str> {
16 self.phone_number_id.as_deref()
17 }
18 pub fn product_type(&self) -> ::std::option::Option<&crate::types::PhoneNumberProductType> {
20 self.product_type.as_ref()
21 }
22 pub fn calling_name(&self) -> ::std::option::Option<&str> {
24 self.calling_name.as_deref()
25 }
26}
27impl ::std::fmt::Debug for UpdatePhoneNumberInput {
28 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29 let mut formatter = f.debug_struct("UpdatePhoneNumberInput");
30 formatter.field("phone_number_id", &self.phone_number_id);
31 formatter.field("product_type", &self.product_type);
32 formatter.field("calling_name", &"*** Sensitive Data Redacted ***");
33 formatter.finish()
34 }
35}
36impl UpdatePhoneNumberInput {
37 pub fn builder() -> crate::operation::update_phone_number::builders::UpdatePhoneNumberInputBuilder {
39 crate::operation::update_phone_number::builders::UpdatePhoneNumberInputBuilder::default()
40 }
41}
42
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
45#[non_exhaustive]
46pub struct UpdatePhoneNumberInputBuilder {
47 pub(crate) phone_number_id: ::std::option::Option<::std::string::String>,
48 pub(crate) product_type: ::std::option::Option<crate::types::PhoneNumberProductType>,
49 pub(crate) calling_name: ::std::option::Option<::std::string::String>,
50}
51impl UpdatePhoneNumberInputBuilder {
52 pub fn phone_number_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.phone_number_id = ::std::option::Option::Some(input.into());
56 self
57 }
58 pub fn set_phone_number_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.phone_number_id = input;
61 self
62 }
63 pub fn get_phone_number_id(&self) -> &::std::option::Option<::std::string::String> {
65 &self.phone_number_id
66 }
67 pub fn product_type(mut self, input: crate::types::PhoneNumberProductType) -> Self {
69 self.product_type = ::std::option::Option::Some(input);
70 self
71 }
72 pub fn set_product_type(mut self, input: ::std::option::Option<crate::types::PhoneNumberProductType>) -> Self {
74 self.product_type = input;
75 self
76 }
77 pub fn get_product_type(&self) -> &::std::option::Option<crate::types::PhoneNumberProductType> {
79 &self.product_type
80 }
81 pub fn calling_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83 self.calling_name = ::std::option::Option::Some(input.into());
84 self
85 }
86 pub fn set_calling_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.calling_name = input;
89 self
90 }
91 pub fn get_calling_name(&self) -> &::std::option::Option<::std::string::String> {
93 &self.calling_name
94 }
95 pub fn build(
97 self,
98 ) -> ::std::result::Result<crate::operation::update_phone_number::UpdatePhoneNumberInput, ::aws_smithy_types::error::operation::BuildError> {
99 ::std::result::Result::Ok(crate::operation::update_phone_number::UpdatePhoneNumberInput {
100 phone_number_id: self.phone_number_id,
101 product_type: self.product_type,
102 calling_name: self.calling_name,
103 })
104 }
105}
106impl ::std::fmt::Debug for UpdatePhoneNumberInputBuilder {
107 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
108 let mut formatter = f.debug_struct("UpdatePhoneNumberInputBuilder");
109 formatter.field("phone_number_id", &self.phone_number_id);
110 formatter.field("product_type", &self.product_type);
111 formatter.field("calling_name", &"*** Sensitive Data Redacted ***");
112 formatter.finish()
113 }
114}