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 of the specified archive search job.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetArchiveSearchOutput {
    /// <p>The identifier of the archive the email search was performed in.</p>
    pub archive_id: ::std::option::Option<::std::string::String>,
    /// <p>The criteria used to filter emails included in the search.</p>
    pub filters: ::std::option::Option<crate::types::ArchiveFilters>,
    /// <p>The start timestamp of the range the searched emails cover.</p>
    pub from_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The end timestamp of the range the searched emails cover.</p>
    pub to_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The maximum number of search results to return.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>The current status of the search job.</p>
    pub status: ::std::option::Option<crate::types::SearchStatus>,
    _request_id: Option<String>,
}
impl GetArchiveSearchOutput {
    /// <p>The identifier of the archive the email search was performed in.</p>
    pub fn archive_id(&self) -> ::std::option::Option<&str> {
        self.archive_id.as_deref()
    }
    /// <p>The criteria used to filter emails included in the search.</p>
    pub fn filters(&self) -> ::std::option::Option<&crate::types::ArchiveFilters> {
        self.filters.as_ref()
    }
    /// <p>The start timestamp of the range the searched emails cover.</p>
    pub fn from_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.from_timestamp.as_ref()
    }
    /// <p>The end timestamp of the range the searched emails cover.</p>
    pub fn to_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.to_timestamp.as_ref()
    }
    /// <p>The maximum number of search results to return.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>The current status of the search job.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::SearchStatus> {
        self.status.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetArchiveSearchOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetArchiveSearchOutput {
    /// Creates a new builder-style object to manufacture [`GetArchiveSearchOutput`](crate::operation::get_archive_search::GetArchiveSearchOutput).
    pub fn builder() -> crate::operation::get_archive_search::builders::GetArchiveSearchOutputBuilder {
        crate::operation::get_archive_search::builders::GetArchiveSearchOutputBuilder::default()
    }
}

/// A builder for [`GetArchiveSearchOutput`](crate::operation::get_archive_search::GetArchiveSearchOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetArchiveSearchOutputBuilder {
    pub(crate) archive_id: ::std::option::Option<::std::string::String>,
    pub(crate) filters: ::std::option::Option<crate::types::ArchiveFilters>,
    pub(crate) from_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) to_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) status: ::std::option::Option<crate::types::SearchStatus>,
    _request_id: Option<String>,
}
impl GetArchiveSearchOutputBuilder {
    /// <p>The identifier of the archive the email search was performed in.</p>
    pub fn archive_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.archive_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the archive the email search was performed in.</p>
    pub fn set_archive_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.archive_id = input;
        self
    }
    /// <p>The identifier of the archive the email search was performed in.</p>
    pub fn get_archive_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.archive_id
    }
    /// <p>The criteria used to filter emails included in the search.</p>
    pub fn filters(mut self, input: crate::types::ArchiveFilters) -> Self {
        self.filters = ::std::option::Option::Some(input);
        self
    }
    /// <p>The criteria used to filter emails included in the search.</p>
    pub fn set_filters(mut self, input: ::std::option::Option<crate::types::ArchiveFilters>) -> Self {
        self.filters = input;
        self
    }
    /// <p>The criteria used to filter emails included in the search.</p>
    pub fn get_filters(&self) -> &::std::option::Option<crate::types::ArchiveFilters> {
        &self.filters
    }
    /// <p>The start timestamp of the range the searched emails cover.</p>
    pub fn from_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.from_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The start timestamp of the range the searched emails cover.</p>
    pub fn set_from_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.from_timestamp = input;
        self
    }
    /// <p>The start timestamp of the range the searched emails cover.</p>
    pub fn get_from_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.from_timestamp
    }
    /// <p>The end timestamp of the range the searched emails cover.</p>
    pub fn to_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.to_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The end timestamp of the range the searched emails cover.</p>
    pub fn set_to_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.to_timestamp = input;
        self
    }
    /// <p>The end timestamp of the range the searched emails cover.</p>
    pub fn get_to_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.to_timestamp
    }
    /// <p>The maximum number of search results to return.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of search results to return.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of search results to return.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>The current status of the search job.</p>
    pub fn status(mut self, input: crate::types::SearchStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the search job.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::SearchStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current status of the search job.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::SearchStatus> {
        &self.status
    }
    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 [`GetArchiveSearchOutput`](crate::operation::get_archive_search::GetArchiveSearchOutput).
    pub fn build(self) -> crate::operation::get_archive_search::GetArchiveSearchOutput {
        crate::operation::get_archive_search::GetArchiveSearchOutput {
            archive_id: self.archive_id,
            filters: self.filters,
            from_timestamp: self.from_timestamp,
            to_timestamp: self.to_timestamp,
            max_results: self.max_results,
            status: self.status,
            _request_id: self._request_id,
        }
    }
}