#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetContactOutput {
pub contact_list_name: ::std::option::Option<::std::string::String>,
pub email_address: ::std::option::Option<::std::string::String>,
pub topic_preferences: ::std::option::Option<::std::vec::Vec<crate::types::TopicPreference>>,
pub topic_default_preferences: ::std::option::Option<::std::vec::Vec<crate::types::TopicPreference>>,
pub unsubscribe_all: bool,
pub attributes_data: ::std::option::Option<::std::string::String>,
pub created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub last_updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetContactOutput {
pub fn contact_list_name(&self) -> ::std::option::Option<&str> {
self.contact_list_name.as_deref()
}
pub fn email_address(&self) -> ::std::option::Option<&str> {
self.email_address.as_deref()
}
pub fn topic_preferences(&self) -> &[crate::types::TopicPreference] {
self.topic_preferences.as_deref().unwrap_or_default()
}
pub fn topic_default_preferences(&self) -> &[crate::types::TopicPreference] {
self.topic_default_preferences.as_deref().unwrap_or_default()
}
pub fn unsubscribe_all(&self) -> bool {
self.unsubscribe_all
}
pub fn attributes_data(&self) -> ::std::option::Option<&str> {
self.attributes_data.as_deref()
}
pub fn created_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_timestamp.as_ref()
}
pub fn last_updated_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_updated_timestamp.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetContactOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetContactOutput {
pub fn builder() -> crate::operation::get_contact::builders::GetContactOutputBuilder {
crate::operation::get_contact::builders::GetContactOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetContactOutputBuilder {
pub(crate) contact_list_name: ::std::option::Option<::std::string::String>,
pub(crate) email_address: ::std::option::Option<::std::string::String>,
pub(crate) topic_preferences: ::std::option::Option<::std::vec::Vec<crate::types::TopicPreference>>,
pub(crate) topic_default_preferences: ::std::option::Option<::std::vec::Vec<crate::types::TopicPreference>>,
pub(crate) unsubscribe_all: ::std::option::Option<bool>,
pub(crate) attributes_data: ::std::option::Option<::std::string::String>,
pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetContactOutputBuilder {
pub fn contact_list_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.contact_list_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_contact_list_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.contact_list_name = input;
self
}
pub fn get_contact_list_name(&self) -> &::std::option::Option<::std::string::String> {
&self.contact_list_name
}
pub fn email_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.email_address = ::std::option::Option::Some(input.into());
self
}
pub fn set_email_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.email_address = input;
self
}
pub fn get_email_address(&self) -> &::std::option::Option<::std::string::String> {
&self.email_address
}
pub fn topic_preferences(mut self, input: crate::types::TopicPreference) -> Self {
let mut v = self.topic_preferences.unwrap_or_default();
v.push(input);
self.topic_preferences = ::std::option::Option::Some(v);
self
}
pub fn set_topic_preferences(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TopicPreference>>) -> Self {
self.topic_preferences = input;
self
}
pub fn get_topic_preferences(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TopicPreference>> {
&self.topic_preferences
}
pub fn topic_default_preferences(mut self, input: crate::types::TopicPreference) -> Self {
let mut v = self.topic_default_preferences.unwrap_or_default();
v.push(input);
self.topic_default_preferences = ::std::option::Option::Some(v);
self
}
pub fn set_topic_default_preferences(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TopicPreference>>) -> Self {
self.topic_default_preferences = input;
self
}
pub fn get_topic_default_preferences(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TopicPreference>> {
&self.topic_default_preferences
}
pub fn unsubscribe_all(mut self, input: bool) -> Self {
self.unsubscribe_all = ::std::option::Option::Some(input);
self
}
pub fn set_unsubscribe_all(mut self, input: ::std::option::Option<bool>) -> Self {
self.unsubscribe_all = input;
self
}
pub fn get_unsubscribe_all(&self) -> &::std::option::Option<bool> {
&self.unsubscribe_all
}
pub fn attributes_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.attributes_data = ::std::option::Option::Some(input.into());
self
}
pub fn set_attributes_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.attributes_data = input;
self
}
pub fn get_attributes_data(&self) -> &::std::option::Option<::std::string::String> {
&self.attributes_data
}
pub fn created_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_timestamp = ::std::option::Option::Some(input);
self
}
pub fn set_created_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_timestamp = input;
self
}
pub fn get_created_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_timestamp
}
pub fn last_updated_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_updated_timestamp = ::std::option::Option::Some(input);
self
}
pub fn set_last_updated_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_updated_timestamp = input;
self
}
pub fn get_last_updated_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_updated_timestamp
}
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) -> crate::operation::get_contact::GetContactOutput {
crate::operation::get_contact::GetContactOutput {
contact_list_name: self.contact_list_name,
email_address: self.email_address,
topic_preferences: self.topic_preferences,
topic_default_preferences: self.topic_default_preferences,
unsubscribe_all: self.unsubscribe_all.unwrap_or_default(),
attributes_data: self.attributes_data,
created_timestamp: self.created_timestamp,
last_updated_timestamp: self.last_updated_timestamp,
_request_id: self._request_id,
}
}
}