#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct UpdatePhoneNumberInput {
pub phone_number_id: ::std::option::Option<::std::string::String>,
pub product_type: ::std::option::Option<crate::types::PhoneNumberProductType>,
pub calling_name: ::std::option::Option<::std::string::String>,
}
impl UpdatePhoneNumberInput {
pub fn phone_number_id(&self) -> ::std::option::Option<&str> {
self.phone_number_id.as_deref()
}
pub fn product_type(&self) -> ::std::option::Option<&crate::types::PhoneNumberProductType> {
self.product_type.as_ref()
}
pub fn calling_name(&self) -> ::std::option::Option<&str> {
self.calling_name.as_deref()
}
}
impl ::std::fmt::Debug for UpdatePhoneNumberInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdatePhoneNumberInput");
formatter.field("phone_number_id", &self.phone_number_id);
formatter.field("product_type", &self.product_type);
formatter.field("calling_name", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl UpdatePhoneNumberInput {
pub fn builder() -> crate::operation::update_phone_number::builders::UpdatePhoneNumberInputBuilder {
crate::operation::update_phone_number::builders::UpdatePhoneNumberInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdatePhoneNumberInputBuilder {
pub(crate) phone_number_id: ::std::option::Option<::std::string::String>,
pub(crate) product_type: ::std::option::Option<crate::types::PhoneNumberProductType>,
pub(crate) calling_name: ::std::option::Option<::std::string::String>,
}
impl UpdatePhoneNumberInputBuilder {
pub fn phone_number_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.phone_number_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_phone_number_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.phone_number_id = input;
self
}
pub fn get_phone_number_id(&self) -> &::std::option::Option<::std::string::String> {
&self.phone_number_id
}
pub fn product_type(mut self, input: crate::types::PhoneNumberProductType) -> Self {
self.product_type = ::std::option::Option::Some(input);
self
}
pub fn set_product_type(mut self, input: ::std::option::Option<crate::types::PhoneNumberProductType>) -> Self {
self.product_type = input;
self
}
pub fn get_product_type(&self) -> &::std::option::Option<crate::types::PhoneNumberProductType> {
&self.product_type
}
pub fn calling_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.calling_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_calling_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.calling_name = input;
self
}
pub fn get_calling_name(&self) -> &::std::option::Option<::std::string::String> {
&self.calling_name
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_phone_number::UpdatePhoneNumberInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_phone_number::UpdatePhoneNumberInput {
phone_number_id: self.phone_number_id,
product_type: self.product_type,
calling_name: self.calling_name,
})
}
}
impl ::std::fmt::Debug for UpdatePhoneNumberInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdatePhoneNumberInputBuilder");
formatter.field("phone_number_id", &self.phone_number_id);
formatter.field("product_type", &self.product_type);
formatter.field("calling_name", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}