aws-sdk-mailmanager 1.84.0

AWS SDK for MailManager
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The metadata about the email.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Metadata {
    /// <p>The timestamp of when the email was received.</p>
    pub timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The ID of the ingress endpoint through which the email was received.</p>
    pub ingress_point_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the traffic policy that was in effect when the email was received.</p>
    pub traffic_policy_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the rule set that processed the email.</p>
    pub rule_set_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the host from which the email was received.</p>
    pub sender_hostname: ::std::option::Option<::std::string::String>,
    /// <p>The IP address of the host from which the email was received.</p>
    pub sender_ip_address: ::std::option::Option<::std::string::String>,
    /// <p>The TLS cipher suite used to communicate with the host from which the email was received.</p>
    pub tls_cipher_suite: ::std::option::Option<::std::string::String>,
    /// <p>The TLS protocol used to communicate with the host from which the email was received.</p>
    pub tls_protocol: ::std::option::Option<::std::string::String>,
    /// <p>The name of the API call used when sent through a configuration set with archiving enabled.</p>
    pub sending_method: ::std::option::Option<::std::string::String>,
    /// <p>The identity name used to authorize the sending action when sent through a configuration set with archiving enabled.</p>
    pub source_identity: ::std::option::Option<::std::string::String>,
    /// <p>The name of the dedicated IP pool used when sent through a configuration set with archiving enabled.</p>
    pub sending_pool: ::std::option::Option<::std::string::String>,
    /// <p>The name of the configuration set used when sent through a configuration set with archiving enabled.</p>
    pub configuration_set: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the archived email source, identified by either a Rule Set's ARN with an Archive action, or a Configuration Set's Archive ARN.</p>
    pub source_arn: ::std::option::Option<::std::string::String>,
}
impl Metadata {
    /// <p>The timestamp of when the email was received.</p>
    pub fn timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.timestamp.as_ref()
    }
    /// <p>The ID of the ingress endpoint through which the email was received.</p>
    pub fn ingress_point_id(&self) -> ::std::option::Option<&str> {
        self.ingress_point_id.as_deref()
    }
    /// <p>The ID of the traffic policy that was in effect when the email was received.</p>
    pub fn traffic_policy_id(&self) -> ::std::option::Option<&str> {
        self.traffic_policy_id.as_deref()
    }
    /// <p>The ID of the rule set that processed the email.</p>
    pub fn rule_set_id(&self) -> ::std::option::Option<&str> {
        self.rule_set_id.as_deref()
    }
    /// <p>The name of the host from which the email was received.</p>
    pub fn sender_hostname(&self) -> ::std::option::Option<&str> {
        self.sender_hostname.as_deref()
    }
    /// <p>The IP address of the host from which the email was received.</p>
    pub fn sender_ip_address(&self) -> ::std::option::Option<&str> {
        self.sender_ip_address.as_deref()
    }
    /// <p>The TLS cipher suite used to communicate with the host from which the email was received.</p>
    pub fn tls_cipher_suite(&self) -> ::std::option::Option<&str> {
        self.tls_cipher_suite.as_deref()
    }
    /// <p>The TLS protocol used to communicate with the host from which the email was received.</p>
    pub fn tls_protocol(&self) -> ::std::option::Option<&str> {
        self.tls_protocol.as_deref()
    }
    /// <p>The name of the API call used when sent through a configuration set with archiving enabled.</p>
    pub fn sending_method(&self) -> ::std::option::Option<&str> {
        self.sending_method.as_deref()
    }
    /// <p>The identity name used to authorize the sending action when sent through a configuration set with archiving enabled.</p>
    pub fn source_identity(&self) -> ::std::option::Option<&str> {
        self.source_identity.as_deref()
    }
    /// <p>The name of the dedicated IP pool used when sent through a configuration set with archiving enabled.</p>
    pub fn sending_pool(&self) -> ::std::option::Option<&str> {
        self.sending_pool.as_deref()
    }
    /// <p>The name of the configuration set used when sent through a configuration set with archiving enabled.</p>
    pub fn configuration_set(&self) -> ::std::option::Option<&str> {
        self.configuration_set.as_deref()
    }
    /// <p>Specifies the archived email source, identified by either a Rule Set's ARN with an Archive action, or a Configuration Set's Archive ARN.</p>
    pub fn source_arn(&self) -> ::std::option::Option<&str> {
        self.source_arn.as_deref()
    }
}
impl ::std::fmt::Debug for Metadata {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Metadata");
        formatter.field("timestamp", &self.timestamp);
        formatter.field("ingress_point_id", &self.ingress_point_id);
        formatter.field("traffic_policy_id", &self.traffic_policy_id);
        formatter.field("rule_set_id", &self.rule_set_id);
        formatter.field("sender_hostname", &self.sender_hostname);
        formatter.field("sender_ip_address", &"*** Sensitive Data Redacted ***");
        formatter.field("tls_cipher_suite", &self.tls_cipher_suite);
        formatter.field("tls_protocol", &self.tls_protocol);
        formatter.field("sending_method", &self.sending_method);
        formatter.field("source_identity", &self.source_identity);
        formatter.field("sending_pool", &self.sending_pool);
        formatter.field("configuration_set", &self.configuration_set);
        formatter.field("source_arn", &self.source_arn);
        formatter.finish()
    }
}
impl Metadata {
    /// Creates a new builder-style object to manufacture [`Metadata`](crate::types::Metadata).
    pub fn builder() -> crate::types::builders::MetadataBuilder {
        crate::types::builders::MetadataBuilder::default()
    }
}

/// A builder for [`Metadata`](crate::types::Metadata).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct MetadataBuilder {
    pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) ingress_point_id: ::std::option::Option<::std::string::String>,
    pub(crate) traffic_policy_id: ::std::option::Option<::std::string::String>,
    pub(crate) rule_set_id: ::std::option::Option<::std::string::String>,
    pub(crate) sender_hostname: ::std::option::Option<::std::string::String>,
    pub(crate) sender_ip_address: ::std::option::Option<::std::string::String>,
    pub(crate) tls_cipher_suite: ::std::option::Option<::std::string::String>,
    pub(crate) tls_protocol: ::std::option::Option<::std::string::String>,
    pub(crate) sending_method: ::std::option::Option<::std::string::String>,
    pub(crate) source_identity: ::std::option::Option<::std::string::String>,
    pub(crate) sending_pool: ::std::option::Option<::std::string::String>,
    pub(crate) configuration_set: ::std::option::Option<::std::string::String>,
    pub(crate) source_arn: ::std::option::Option<::std::string::String>,
}
impl MetadataBuilder {
    /// <p>The timestamp of when the email was received.</p>
    pub fn timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp of when the email was received.</p>
    pub fn set_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.timestamp = input;
        self
    }
    /// <p>The timestamp of when the email was received.</p>
    pub fn get_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.timestamp
    }
    /// <p>The ID of the ingress endpoint through which the email was received.</p>
    pub fn ingress_point_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ingress_point_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the ingress endpoint through which the email was received.</p>
    pub fn set_ingress_point_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ingress_point_id = input;
        self
    }
    /// <p>The ID of the ingress endpoint through which the email was received.</p>
    pub fn get_ingress_point_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.ingress_point_id
    }
    /// <p>The ID of the traffic policy that was in effect when the email was received.</p>
    pub fn traffic_policy_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.traffic_policy_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the traffic policy that was in effect when the email was received.</p>
    pub fn set_traffic_policy_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.traffic_policy_id = input;
        self
    }
    /// <p>The ID of the traffic policy that was in effect when the email was received.</p>
    pub fn get_traffic_policy_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.traffic_policy_id
    }
    /// <p>The ID of the rule set that processed the email.</p>
    pub fn rule_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rule_set_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the rule set that processed the email.</p>
    pub fn set_rule_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_set_id = input;
        self
    }
    /// <p>The ID of the rule set that processed the email.</p>
    pub fn get_rule_set_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_set_id
    }
    /// <p>The name of the host from which the email was received.</p>
    pub fn sender_hostname(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sender_hostname = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the host from which the email was received.</p>
    pub fn set_sender_hostname(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sender_hostname = input;
        self
    }
    /// <p>The name of the host from which the email was received.</p>
    pub fn get_sender_hostname(&self) -> &::std::option::Option<::std::string::String> {
        &self.sender_hostname
    }
    /// <p>The IP address of the host from which the email was received.</p>
    pub fn sender_ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sender_ip_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The IP address of the host from which the email was received.</p>
    pub fn set_sender_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sender_ip_address = input;
        self
    }
    /// <p>The IP address of the host from which the email was received.</p>
    pub fn get_sender_ip_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.sender_ip_address
    }
    /// <p>The TLS cipher suite used to communicate with the host from which the email was received.</p>
    pub fn tls_cipher_suite(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.tls_cipher_suite = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The TLS cipher suite used to communicate with the host from which the email was received.</p>
    pub fn set_tls_cipher_suite(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.tls_cipher_suite = input;
        self
    }
    /// <p>The TLS cipher suite used to communicate with the host from which the email was received.</p>
    pub fn get_tls_cipher_suite(&self) -> &::std::option::Option<::std::string::String> {
        &self.tls_cipher_suite
    }
    /// <p>The TLS protocol used to communicate with the host from which the email was received.</p>
    pub fn tls_protocol(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.tls_protocol = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The TLS protocol used to communicate with the host from which the email was received.</p>
    pub fn set_tls_protocol(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.tls_protocol = input;
        self
    }
    /// <p>The TLS protocol used to communicate with the host from which the email was received.</p>
    pub fn get_tls_protocol(&self) -> &::std::option::Option<::std::string::String> {
        &self.tls_protocol
    }
    /// <p>The name of the API call used when sent through a configuration set with archiving enabled.</p>
    pub fn sending_method(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sending_method = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the API call used when sent through a configuration set with archiving enabled.</p>
    pub fn set_sending_method(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sending_method = input;
        self
    }
    /// <p>The name of the API call used when sent through a configuration set with archiving enabled.</p>
    pub fn get_sending_method(&self) -> &::std::option::Option<::std::string::String> {
        &self.sending_method
    }
    /// <p>The identity name used to authorize the sending action when sent through a configuration set with archiving enabled.</p>
    pub fn source_identity(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_identity = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identity name used to authorize the sending action when sent through a configuration set with archiving enabled.</p>
    pub fn set_source_identity(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_identity = input;
        self
    }
    /// <p>The identity name used to authorize the sending action when sent through a configuration set with archiving enabled.</p>
    pub fn get_source_identity(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_identity
    }
    /// <p>The name of the dedicated IP pool used when sent through a configuration set with archiving enabled.</p>
    pub fn sending_pool(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sending_pool = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the dedicated IP pool used when sent through a configuration set with archiving enabled.</p>
    pub fn set_sending_pool(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sending_pool = input;
        self
    }
    /// <p>The name of the dedicated IP pool used when sent through a configuration set with archiving enabled.</p>
    pub fn get_sending_pool(&self) -> &::std::option::Option<::std::string::String> {
        &self.sending_pool
    }
    /// <p>The name of the configuration set used when sent through a configuration set with archiving enabled.</p>
    pub fn configuration_set(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.configuration_set = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the configuration set used when sent through a configuration set with archiving enabled.</p>
    pub fn set_configuration_set(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.configuration_set = input;
        self
    }
    /// <p>The name of the configuration set used when sent through a configuration set with archiving enabled.</p>
    pub fn get_configuration_set(&self) -> &::std::option::Option<::std::string::String> {
        &self.configuration_set
    }
    /// <p>Specifies the archived email source, identified by either a Rule Set's ARN with an Archive action, or a Configuration Set's Archive ARN.</p>
    pub fn source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the archived email source, identified by either a Rule Set's ARN with an Archive action, or a Configuration Set's Archive ARN.</p>
    pub fn set_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_arn = input;
        self
    }
    /// <p>Specifies the archived email source, identified by either a Rule Set's ARN with an Archive action, or a Configuration Set's Archive ARN.</p>
    pub fn get_source_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_arn
    }
    /// Consumes the builder and constructs a [`Metadata`](crate::types::Metadata).
    pub fn build(self) -> crate::types::Metadata {
        crate::types::Metadata {
            timestamp: self.timestamp,
            ingress_point_id: self.ingress_point_id,
            traffic_policy_id: self.traffic_policy_id,
            rule_set_id: self.rule_set_id,
            sender_hostname: self.sender_hostname,
            sender_ip_address: self.sender_ip_address,
            tls_cipher_suite: self.tls_cipher_suite,
            tls_protocol: self.tls_protocol,
            sending_method: self.sending_method,
            source_identity: self.source_identity,
            sending_pool: self.sending_pool,
            configuration_set: self.configuration_set,
            source_arn: self.source_arn,
        }
    }
}
impl ::std::fmt::Debug for MetadataBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("MetadataBuilder");
        formatter.field("timestamp", &self.timestamp);
        formatter.field("ingress_point_id", &self.ingress_point_id);
        formatter.field("traffic_policy_id", &self.traffic_policy_id);
        formatter.field("rule_set_id", &self.rule_set_id);
        formatter.field("sender_hostname", &self.sender_hostname);
        formatter.field("sender_ip_address", &"*** Sensitive Data Redacted ***");
        formatter.field("tls_cipher_suite", &self.tls_cipher_suite);
        formatter.field("tls_protocol", &self.tls_protocol);
        formatter.field("sending_method", &self.sending_method);
        formatter.field("source_identity", &self.source_identity);
        formatter.field("sending_pool", &self.sending_pool);
        formatter.field("configuration_set", &self.configuration_set);
        formatter.field("source_arn", &self.source_arn);
        formatter.finish()
    }
}