#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateSenderIdOutput {
pub sender_id_arn: ::std::string::String,
pub sender_id: ::std::string::String,
pub iso_country_code: ::std::string::String,
pub message_types: ::std::vec::Vec<crate::types::MessageType>,
pub monthly_leasing_price: ::std::string::String,
pub deletion_protection_enabled: bool,
pub registered: bool,
pub registration_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl UpdateSenderIdOutput {
pub fn sender_id_arn(&self) -> &str {
use std::ops::Deref;
self.sender_id_arn.deref()
}
pub fn sender_id(&self) -> &str {
use std::ops::Deref;
self.sender_id.deref()
}
pub fn iso_country_code(&self) -> &str {
use std::ops::Deref;
self.iso_country_code.deref()
}
pub fn message_types(&self) -> &[crate::types::MessageType] {
use std::ops::Deref;
self.message_types.deref()
}
pub fn monthly_leasing_price(&self) -> &str {
use std::ops::Deref;
self.monthly_leasing_price.deref()
}
pub fn deletion_protection_enabled(&self) -> bool {
self.deletion_protection_enabled
}
pub fn registered(&self) -> bool {
self.registered
}
pub fn registration_id(&self) -> ::std::option::Option<&str> {
self.registration_id.as_deref()
}
}
impl ::aws_types::request_id::RequestId for UpdateSenderIdOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl UpdateSenderIdOutput {
pub fn builder() -> crate::operation::update_sender_id::builders::UpdateSenderIdOutputBuilder {
crate::operation::update_sender_id::builders::UpdateSenderIdOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateSenderIdOutputBuilder {
pub(crate) sender_id_arn: ::std::option::Option<::std::string::String>,
pub(crate) sender_id: ::std::option::Option<::std::string::String>,
pub(crate) iso_country_code: ::std::option::Option<::std::string::String>,
pub(crate) message_types: ::std::option::Option<::std::vec::Vec<crate::types::MessageType>>,
pub(crate) monthly_leasing_price: ::std::option::Option<::std::string::String>,
pub(crate) deletion_protection_enabled: ::std::option::Option<bool>,
pub(crate) registered: ::std::option::Option<bool>,
pub(crate) registration_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl UpdateSenderIdOutputBuilder {
pub fn sender_id_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.sender_id_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_sender_id_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.sender_id_arn = input;
self
}
pub fn get_sender_id_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.sender_id_arn
}
pub fn sender_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.sender_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_sender_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.sender_id = input;
self
}
pub fn get_sender_id(&self) -> &::std::option::Option<::std::string::String> {
&self.sender_id
}
pub fn iso_country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.iso_country_code = ::std::option::Option::Some(input.into());
self
}
pub fn set_iso_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.iso_country_code = input;
self
}
pub fn get_iso_country_code(&self) -> &::std::option::Option<::std::string::String> {
&self.iso_country_code
}
pub fn message_types(mut self, input: crate::types::MessageType) -> Self {
let mut v = self.message_types.unwrap_or_default();
v.push(input);
self.message_types = ::std::option::Option::Some(v);
self
}
pub fn set_message_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MessageType>>) -> Self {
self.message_types = input;
self
}
pub fn get_message_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MessageType>> {
&self.message_types
}
pub fn monthly_leasing_price(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.monthly_leasing_price = ::std::option::Option::Some(input.into());
self
}
pub fn set_monthly_leasing_price(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.monthly_leasing_price = input;
self
}
pub fn get_monthly_leasing_price(&self) -> &::std::option::Option<::std::string::String> {
&self.monthly_leasing_price
}
pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
self.deletion_protection_enabled = ::std::option::Option::Some(input);
self
}
pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.deletion_protection_enabled = input;
self
}
pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
&self.deletion_protection_enabled
}
pub fn registered(mut self, input: bool) -> Self {
self.registered = ::std::option::Option::Some(input);
self
}
pub fn set_registered(mut self, input: ::std::option::Option<bool>) -> Self {
self.registered = input;
self
}
pub fn get_registered(&self) -> &::std::option::Option<bool> {
&self.registered
}
pub fn registration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.registration_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_registration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.registration_id = input;
self
}
pub fn get_registration_id(&self) -> &::std::option::Option<::std::string::String> {
&self.registration_id
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_sender_id::UpdateSenderIdOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_sender_id::UpdateSenderIdOutput {
sender_id_arn: self.sender_id_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"sender_id_arn",
"sender_id_arn was not specified but it is required when building UpdateSenderIdOutput",
)
})?,
sender_id: self.sender_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"sender_id",
"sender_id was not specified but it is required when building UpdateSenderIdOutput",
)
})?,
iso_country_code: self.iso_country_code.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"iso_country_code",
"iso_country_code was not specified but it is required when building UpdateSenderIdOutput",
)
})?,
message_types: self.message_types.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"message_types",
"message_types was not specified but it is required when building UpdateSenderIdOutput",
)
})?,
monthly_leasing_price: self.monthly_leasing_price.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"monthly_leasing_price",
"monthly_leasing_price was not specified but it is required when building UpdateSenderIdOutput",
)
})?,
deletion_protection_enabled: self.deletion_protection_enabled.unwrap_or_default(),
registered: self.registered.unwrap_or_default(),
registration_id: self.registration_id,
_request_id: self._request_id,
})
}
}