#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetContactOutput {
#[doc(hidden)]
pub contact_list_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub email_address: std::option::Option<std::string::String>,
#[doc(hidden)]
pub topic_preferences: std::option::Option<std::vec::Vec<crate::types::TopicPreference>>,
#[doc(hidden)]
pub topic_default_preferences:
std::option::Option<std::vec::Vec<crate::types::TopicPreference>>,
#[doc(hidden)]
pub unsubscribe_all: bool,
#[doc(hidden)]
pub attributes_data: std::option::Option<std::string::String>,
#[doc(hidden)]
pub created_timestamp: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
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) -> std::option::Option<&[crate::types::TopicPreference]> {
self.topic_preferences.as_deref()
}
pub fn topic_default_preferences(
&self,
) -> std::option::Option<&[crate::types::TopicPreference]> {
self.topic_default_preferences.as_deref()
}
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_http::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 Into<std::string::String>) -> Self {
self.contact_list_name = 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 email_address(mut self, input: impl Into<std::string::String>) -> Self {
self.email_address = 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 topic_preferences(mut self, input: crate::types::TopicPreference) -> Self {
let mut v = self.topic_preferences.unwrap_or_default();
v.push(input);
self.topic_preferences = 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 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 = 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 unsubscribe_all(mut self, input: bool) -> Self {
self.unsubscribe_all = Some(input);
self
}
pub fn set_unsubscribe_all(mut self, input: std::option::Option<bool>) -> Self {
self.unsubscribe_all = input;
self
}
pub fn attributes_data(mut self, input: impl Into<std::string::String>) -> Self {
self.attributes_data = 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 created_timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_timestamp = 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 last_updated_timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_updated_timestamp = 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(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,
}
}
}