#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetMessageInsightsOutput {
pub message_id: ::std::option::Option<::std::string::String>,
pub from_email_address: ::std::option::Option<::std::string::String>,
pub subject: ::std::option::Option<::std::string::String>,
pub email_tags: ::std::option::Option<::std::vec::Vec<crate::types::MessageTag>>,
pub insights: ::std::option::Option<::std::vec::Vec<crate::types::EmailInsights>>,
_request_id: Option<String>,
}
impl GetMessageInsightsOutput {
pub fn message_id(&self) -> ::std::option::Option<&str> {
self.message_id.as_deref()
}
pub fn from_email_address(&self) -> ::std::option::Option<&str> {
self.from_email_address.as_deref()
}
pub fn subject(&self) -> ::std::option::Option<&str> {
self.subject.as_deref()
}
pub fn email_tags(&self) -> &[crate::types::MessageTag] {
self.email_tags.as_deref().unwrap_or_default()
}
pub fn insights(&self) -> &[crate::types::EmailInsights] {
self.insights.as_deref().unwrap_or_default()
}
}
impl ::std::fmt::Debug for GetMessageInsightsOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetMessageInsightsOutput");
formatter.field("message_id", &self.message_id);
formatter.field("from_email_address", &"*** Sensitive Data Redacted ***");
formatter.field("subject", &"*** Sensitive Data Redacted ***");
formatter.field("email_tags", &self.email_tags);
formatter.field("insights", &self.insights);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetMessageInsightsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetMessageInsightsOutput {
pub fn builder() -> crate::operation::get_message_insights::builders::GetMessageInsightsOutputBuilder {
crate::operation::get_message_insights::builders::GetMessageInsightsOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct GetMessageInsightsOutputBuilder {
pub(crate) message_id: ::std::option::Option<::std::string::String>,
pub(crate) from_email_address: ::std::option::Option<::std::string::String>,
pub(crate) subject: ::std::option::Option<::std::string::String>,
pub(crate) email_tags: ::std::option::Option<::std::vec::Vec<crate::types::MessageTag>>,
pub(crate) insights: ::std::option::Option<::std::vec::Vec<crate::types::EmailInsights>>,
_request_id: Option<String>,
}
impl GetMessageInsightsOutputBuilder {
pub fn message_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.message_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_message_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.message_id = input;
self
}
pub fn get_message_id(&self) -> &::std::option::Option<::std::string::String> {
&self.message_id
}
pub fn from_email_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.from_email_address = ::std::option::Option::Some(input.into());
self
}
pub fn set_from_email_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.from_email_address = input;
self
}
pub fn get_from_email_address(&self) -> &::std::option::Option<::std::string::String> {
&self.from_email_address
}
pub fn subject(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.subject = ::std::option::Option::Some(input.into());
self
}
pub fn set_subject(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.subject = input;
self
}
pub fn get_subject(&self) -> &::std::option::Option<::std::string::String> {
&self.subject
}
pub fn email_tags(mut self, input: crate::types::MessageTag) -> Self {
let mut v = self.email_tags.unwrap_or_default();
v.push(input);
self.email_tags = ::std::option::Option::Some(v);
self
}
pub fn set_email_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MessageTag>>) -> Self {
self.email_tags = input;
self
}
pub fn get_email_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MessageTag>> {
&self.email_tags
}
pub fn insights(mut self, input: crate::types::EmailInsights) -> Self {
let mut v = self.insights.unwrap_or_default();
v.push(input);
self.insights = ::std::option::Option::Some(v);
self
}
pub fn set_insights(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EmailInsights>>) -> Self {
self.insights = input;
self
}
pub fn get_insights(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EmailInsights>> {
&self.insights
}
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_message_insights::GetMessageInsightsOutput {
crate::operation::get_message_insights::GetMessageInsightsOutput {
message_id: self.message_id,
from_email_address: self.from_email_address,
subject: self.subject,
email_tags: self.email_tags,
insights: self.insights,
_request_id: self._request_id,
}
}
}
impl ::std::fmt::Debug for GetMessageInsightsOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetMessageInsightsOutputBuilder");
formatter.field("message_id", &self.message_id);
formatter.field("from_email_address", &"*** Sensitive Data Redacted ***");
formatter.field("subject", &"*** Sensitive Data Redacted ***");
formatter.field("email_tags", &self.email_tags);
formatter.field("insights", &self.insights);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}