aws-sdk-mailmanager 1.83.0

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

/// <p>The response containing details about the requested archived email message.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetArchiveMessageOutput {
    /// <p>A pre-signed URL to temporarily download the full message content.</p>
    pub message_download_link: ::std::option::Option<::std::string::String>,
    /// <p>The metadata about the email.</p>
    pub metadata: ::std::option::Option<crate::types::Metadata>,
    /// <p>The SMTP envelope information of the email.</p>
    pub envelope: ::std::option::Option<crate::types::Envelope>,
    _request_id: Option<String>,
}
impl GetArchiveMessageOutput {
    /// <p>A pre-signed URL to temporarily download the full message content.</p>
    pub fn message_download_link(&self) -> ::std::option::Option<&str> {
        self.message_download_link.as_deref()
    }
    /// <p>The metadata about the email.</p>
    pub fn metadata(&self) -> ::std::option::Option<&crate::types::Metadata> {
        self.metadata.as_ref()
    }
    /// <p>The SMTP envelope information of the email.</p>
    pub fn envelope(&self) -> ::std::option::Option<&crate::types::Envelope> {
        self.envelope.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetArchiveMessageOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetArchiveMessageOutput {
    /// Creates a new builder-style object to manufacture [`GetArchiveMessageOutput`](crate::operation::get_archive_message::GetArchiveMessageOutput).
    pub fn builder() -> crate::operation::get_archive_message::builders::GetArchiveMessageOutputBuilder {
        crate::operation::get_archive_message::builders::GetArchiveMessageOutputBuilder::default()
    }
}

/// A builder for [`GetArchiveMessageOutput`](crate::operation::get_archive_message::GetArchiveMessageOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetArchiveMessageOutputBuilder {
    pub(crate) message_download_link: ::std::option::Option<::std::string::String>,
    pub(crate) metadata: ::std::option::Option<crate::types::Metadata>,
    pub(crate) envelope: ::std::option::Option<crate::types::Envelope>,
    _request_id: Option<String>,
}
impl GetArchiveMessageOutputBuilder {
    /// <p>A pre-signed URL to temporarily download the full message content.</p>
    pub fn message_download_link(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.message_download_link = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A pre-signed URL to temporarily download the full message content.</p>
    pub fn set_message_download_link(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.message_download_link = input;
        self
    }
    /// <p>A pre-signed URL to temporarily download the full message content.</p>
    pub fn get_message_download_link(&self) -> &::std::option::Option<::std::string::String> {
        &self.message_download_link
    }
    /// <p>The metadata about the email.</p>
    pub fn metadata(mut self, input: crate::types::Metadata) -> Self {
        self.metadata = ::std::option::Option::Some(input);
        self
    }
    /// <p>The metadata about the email.</p>
    pub fn set_metadata(mut self, input: ::std::option::Option<crate::types::Metadata>) -> Self {
        self.metadata = input;
        self
    }
    /// <p>The metadata about the email.</p>
    pub fn get_metadata(&self) -> &::std::option::Option<crate::types::Metadata> {
        &self.metadata
    }
    /// <p>The SMTP envelope information of the email.</p>
    pub fn envelope(mut self, input: crate::types::Envelope) -> Self {
        self.envelope = ::std::option::Option::Some(input);
        self
    }
    /// <p>The SMTP envelope information of the email.</p>
    pub fn set_envelope(mut self, input: ::std::option::Option<crate::types::Envelope>) -> Self {
        self.envelope = input;
        self
    }
    /// <p>The SMTP envelope information of the email.</p>
    pub fn get_envelope(&self) -> &::std::option::Option<crate::types::Envelope> {
        &self.envelope
    }
    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
    }
    /// Consumes the builder and constructs a [`GetArchiveMessageOutput`](crate::operation::get_archive_message::GetArchiveMessageOutput).
    pub fn build(self) -> crate::operation::get_archive_message::GetArchiveMessageOutput {
        crate::operation::get_archive_message::GetArchiveMessageOutput {
            message_download_link: self.message_download_link,
            metadata: self.metadata,
            envelope: self.envelope,
            _request_id: self._request_id,
        }
    }
}