aws-sdk-m2 1.98.0

AWS SDK for AWSMainframeModernization
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_data_set_export_task::_create_data_set_export_task_output::CreateDataSetExportTaskOutputBuilder;

pub use crate::operation::create_data_set_export_task::_create_data_set_export_task_input::CreateDataSetExportTaskInputBuilder;

impl crate::operation::create_data_set_export_task::builders::CreateDataSetExportTaskInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::create_data_set_export_task::CreateDataSetExportTaskOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_data_set_export_task::CreateDataSetExportTaskError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_data_set_export_task();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateDataSetExportTask`.
///
/// <p>Starts a data set export task for a specific application.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateDataSetExportTaskFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_data_set_export_task::builders::CreateDataSetExportTaskInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_data_set_export_task::CreateDataSetExportTaskOutput,
        crate::operation::create_data_set_export_task::CreateDataSetExportTaskError,
    > for CreateDataSetExportTaskFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_data_set_export_task::CreateDataSetExportTaskOutput,
            crate::operation::create_data_set_export_task::CreateDataSetExportTaskError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateDataSetExportTaskFluentBuilder {
    /// Creates a new `CreateDataSetExportTaskFluentBuilder`.
    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 CreateDataSetExportTask as a reference.
    pub fn as_input(&self) -> &crate::operation::create_data_set_export_task::builders::CreateDataSetExportTaskInputBuilder {
        &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::create_data_set_export_task::CreateDataSetExportTaskOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_data_set_export_task::CreateDataSetExportTaskError,
            ::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::create_data_set_export_task::CreateDataSetExportTask::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_data_set_export_task::CreateDataSetExportTask::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::create_data_set_export_task::CreateDataSetExportTaskOutput,
        crate::operation::create_data_set_export_task::CreateDataSetExportTaskError,
        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 identifier of the application for which you want to export data sets.</p>
    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.application_id(input.into());
        self
    }
    /// <p>The unique identifier of the application for which you want to export data sets.</p>
    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_application_id(input);
        self
    }
    /// <p>The unique identifier of the application for which you want to export data sets.</p>
    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_application_id()
    }
    /// <p>The data set export task configuration.</p>
    pub fn export_config(mut self, input: crate::types::DataSetExportConfig) -> Self {
        self.inner = self.inner.export_config(input);
        self
    }
    /// <p>The data set export task configuration.</p>
    pub fn set_export_config(mut self, input: ::std::option::Option<crate::types::DataSetExportConfig>) -> Self {
        self.inner = self.inner.set_export_config(input);
        self
    }
    /// <p>The data set export task configuration.</p>
    pub fn get_export_config(&self) -> &::std::option::Option<crate::types::DataSetExportConfig> {
        self.inner.get_export_config()
    }
    /// <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the request to create a data set export. The service generates the clientToken when the API call is triggered. The token expires after one hour, so if you retry the API within this timeframe with the same clientToken, you will get the same response. The service also handles deleting the clientToken after it expires.</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>Unique, case-sensitive identifier you provide to ensure the idempotency of the request to create a data set export. The service generates the clientToken when the API call is triggered. The token expires after one hour, so if you retry the API within this timeframe with the same clientToken, you will get the same response. The service also handles deleting the clientToken after it expires.</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>Unique, case-sensitive identifier you provide to ensure the idempotency of the request to create a data set export. The service generates the clientToken when the API call is triggered. The token expires after one hour, so if you retry the API within this timeframe with the same clientToken, you will get the same response. The service also handles deleting the clientToken after it expires.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
    /// <p>The identifier of a customer managed key.</p>
    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.kms_key_id(input.into());
        self
    }
    /// <p>The identifier of a customer managed key.</p>
    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_kms_key_id(input);
        self
    }
    /// <p>The identifier of a customer managed key.</p>
    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_kms_key_id()
    }
}