aws-sdk-backupsearch 1.49.0

AWS SDK for AWS Backup Search
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::start_search_result_export_job::_start_search_result_export_job_input::StartSearchResultExportJobInputBuilder;

pub use crate::operation::start_search_result_export_job::_start_search_result_export_job_output::StartSearchResultExportJobOutputBuilder;

impl crate::operation::start_search_result_export_job::builders::StartSearchResultExportJobInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::start_search_result_export_job::StartSearchResultExportJobOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_search_result_export_job::StartSearchResultExportJobError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.start_search_result_export_job();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `StartSearchResultExportJob`.
///
/// <p>This operations starts a job to export the results of search job to a designated S3 bucket.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct StartSearchResultExportJobFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::start_search_result_export_job::builders::StartSearchResultExportJobInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::start_search_result_export_job::StartSearchResultExportJobOutput,
        crate::operation::start_search_result_export_job::StartSearchResultExportJobError,
    > for StartSearchResultExportJobFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::start_search_result_export_job::StartSearchResultExportJobOutput,
            crate::operation::start_search_result_export_job::StartSearchResultExportJobError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl StartSearchResultExportJobFluentBuilder {
    /// Creates a new `StartSearchResultExportJobFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the StartSearchResultExportJob as a reference.
    pub fn as_input(&self) -> &crate::operation::start_search_result_export_job::builders::StartSearchResultExportJobInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::start_search_result_export_job::StartSearchResultExportJobOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_search_result_export_job::StartSearchResultExportJobError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::start_search_result_export_job::StartSearchResultExportJob::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::start_search_result_export_job::StartSearchResultExportJob::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::start_search_result_export_job::StartSearchResultExportJobOutput,
        crate::operation::start_search_result_export_job::StartSearchResultExportJobError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The unique string that specifies the search job.</p>
    pub fn search_job_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.search_job_identifier(input.into());
        self
    }
    /// <p>The unique string that specifies the search job.</p>
    pub fn set_search_job_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_search_job_identifier(input);
        self
    }
    /// <p>The unique string that specifies the search job.</p>
    pub fn get_search_job_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_search_job_identifier()
    }
    /// <p>This specification contains a required string of the destination bucket; optionally, you can include the destination prefix.</p>
    pub fn export_specification(mut self, input: crate::types::ExportSpecification) -> Self {
        self.inner = self.inner.export_specification(input);
        self
    }
    /// <p>This specification contains a required string of the destination bucket; optionally, you can include the destination prefix.</p>
    pub fn set_export_specification(mut self, input: ::std::option::Option<crate::types::ExportSpecification>) -> Self {
        self.inner = self.inner.set_export_specification(input);
        self
    }
    /// <p>This specification contains a required string of the destination bucket; optionally, you can include the destination prefix.</p>
    pub fn get_export_specification(&self) -> &::std::option::Option<crate::types::ExportSpecification> {
        self.inner.get_export_specification()
    }
    /// <p>Include this parameter to allow multiple identical calls for idempotency.</p>
    /// <p>A client token is valid for 8 hours after the first request that uses it is completed. After this time, any request with the same token is treated as a new request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_token(input.into());
        self
    }
    /// <p>Include this parameter to allow multiple identical calls for idempotency.</p>
    /// <p>A client token is valid for 8 hours after the first request that uses it is completed. After this time, any request with the same token is treated as a new request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_token(input);
        self
    }
    /// <p>Include this parameter to allow multiple identical calls for idempotency.</p>
    /// <p>A client token is valid for 8 hours after the first request that uses it is completed. After this time, any request with the same token is treated as a new request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
    ///
    /// Adds a key-value pair to `Tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Optional tags to include. A tag is a key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters, numbers, spaces, and the following characters: + - = . _ : /.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.tags(k.into(), v);
        self
    }
    /// <p>Optional tags to include. A tag is a key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters, numbers, spaces, and the following characters: + - = . _ : /.</p>
    pub fn set_tags(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>>,
    ) -> Self {
        self.inner = self.inner.set_tags(input);
        self
    }
    /// <p>Optional tags to include. A tag is a key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters, numbers, spaces, and the following characters: + - = . _ : /.</p>
    pub fn get_tags(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>> {
        self.inner.get_tags()
    }
    /// <p>This parameter specifies the role ARN used to start the search results export jobs.</p>
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.role_arn(input.into());
        self
    }
    /// <p>This parameter specifies the role ARN used to start the search results export jobs.</p>
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_role_arn(input);
        self
    }
    /// <p>This parameter specifies the role ARN used to start the search results export jobs.</p>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_role_arn()
    }
}