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 request to stop an in-progress archive search job.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StopArchiveSearchInput {
    /// <p>The identifier of the search job to stop.</p>
    pub search_id: ::std::option::Option<::std::string::String>,
}
impl StopArchiveSearchInput {
    /// <p>The identifier of the search job to stop.</p>
    pub fn search_id(&self) -> ::std::option::Option<&str> {
        self.search_id.as_deref()
    }
}
impl StopArchiveSearchInput {
    /// Creates a new builder-style object to manufacture [`StopArchiveSearchInput`](crate::operation::stop_archive_search::StopArchiveSearchInput).
    pub fn builder() -> crate::operation::stop_archive_search::builders::StopArchiveSearchInputBuilder {
        crate::operation::stop_archive_search::builders::StopArchiveSearchInputBuilder::default()
    }
}

/// A builder for [`StopArchiveSearchInput`](crate::operation::stop_archive_search::StopArchiveSearchInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StopArchiveSearchInputBuilder {
    pub(crate) search_id: ::std::option::Option<::std::string::String>,
}
impl StopArchiveSearchInputBuilder {
    /// <p>The identifier of the search job to stop.</p>
    /// This field is required.
    pub fn search_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.search_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the search job to stop.</p>
    pub fn set_search_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.search_id = input;
        self
    }
    /// <p>The identifier of the search job to stop.</p>
    pub fn get_search_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.search_id
    }
    /// Consumes the builder and constructs a [`StopArchiveSearchInput`](crate::operation::stop_archive_search::StopArchiveSearchInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::stop_archive_search::StopArchiveSearchInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::stop_archive_search::StopArchiveSearchInput { search_id: self.search_id })
    }
}