#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartArchiveSearchInput {
pub archive_id: ::std::option::Option<::std::string::String>,
pub filters: ::std::option::Option<crate::types::ArchiveFilters>,
pub from_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub to_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub max_results: ::std::option::Option<i32>,
}
impl StartArchiveSearchInput {
pub fn archive_id(&self) -> ::std::option::Option<&str> {
self.archive_id.as_deref()
}
pub fn filters(&self) -> ::std::option::Option<&crate::types::ArchiveFilters> {
self.filters.as_ref()
}
pub fn from_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.from_timestamp.as_ref()
}
pub fn to_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.to_timestamp.as_ref()
}
pub fn max_results(&self) -> ::std::option::Option<i32> {
self.max_results
}
}
impl StartArchiveSearchInput {
pub fn builder() -> crate::operation::start_archive_search::builders::StartArchiveSearchInputBuilder {
crate::operation::start_archive_search::builders::StartArchiveSearchInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartArchiveSearchInputBuilder {
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>,
}
impl StartArchiveSearchInputBuilder {
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
}
pub fn set_archive_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.archive_id = input;
self
}
pub fn get_archive_id(&self) -> &::std::option::Option<::std::string::String> {
&self.archive_id
}
pub fn filters(mut self, input: crate::types::ArchiveFilters) -> Self {
self.filters = ::std::option::Option::Some(input);
self
}
pub fn set_filters(mut self, input: ::std::option::Option<crate::types::ArchiveFilters>) -> Self {
self.filters = input;
self
}
pub fn get_filters(&self) -> &::std::option::Option<crate::types::ArchiveFilters> {
&self.filters
}
pub fn from_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.from_timestamp = ::std::option::Option::Some(input);
self
}
pub fn set_from_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.from_timestamp = input;
self
}
pub fn get_from_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.from_timestamp
}
pub fn to_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.to_timestamp = ::std::option::Option::Some(input);
self
}
pub fn set_to_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.to_timestamp = input;
self
}
pub fn get_to_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.to_timestamp
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = ::std::option::Option::Some(input);
self
}
pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn get_max_results(&self) -> &::std::option::Option<i32> {
&self.max_results
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::start_archive_search::StartArchiveSearchInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::start_archive_search::StartArchiveSearchInput {
archive_id: self.archive_id,
filters: self.filters,
from_timestamp: self.from_timestamp,
to_timestamp: self.to_timestamp,
max_results: self.max_results,
})
}
}