aws-sdk-redshiftserverless 1.101.0

AWS SDK for Redshift Serverless
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::restore_table_from_recovery_point::_restore_table_from_recovery_point_output::RestoreTableFromRecoveryPointOutputBuilder;

pub use crate::operation::restore_table_from_recovery_point::_restore_table_from_recovery_point_input::RestoreTableFromRecoveryPointInputBuilder;

impl crate::operation::restore_table_from_recovery_point::builders::RestoreTableFromRecoveryPointInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::restore_table_from_recovery_point::RestoreTableFromRecoveryPointOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::restore_table_from_recovery_point::RestoreTableFromRecoveryPointError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.restore_table_from_recovery_point();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `RestoreTableFromRecoveryPoint`.
///
/// <p>Restores a table from a recovery point to your Amazon Redshift Serverless instance. You can't use this operation to restore tables with interleaved sort keys.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct RestoreTableFromRecoveryPointFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::restore_table_from_recovery_point::builders::RestoreTableFromRecoveryPointInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::restore_table_from_recovery_point::RestoreTableFromRecoveryPointOutput,
        crate::operation::restore_table_from_recovery_point::RestoreTableFromRecoveryPointError,
    > for RestoreTableFromRecoveryPointFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::restore_table_from_recovery_point::RestoreTableFromRecoveryPointOutput,
            crate::operation::restore_table_from_recovery_point::RestoreTableFromRecoveryPointError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl RestoreTableFromRecoveryPointFluentBuilder {
    /// Creates a new `RestoreTableFromRecoveryPointFluentBuilder`.
    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 RestoreTableFromRecoveryPoint as a reference.
    pub fn as_input(&self) -> &crate::operation::restore_table_from_recovery_point::builders::RestoreTableFromRecoveryPointInputBuilder {
        &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::restore_table_from_recovery_point::RestoreTableFromRecoveryPointOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::restore_table_from_recovery_point::RestoreTableFromRecoveryPointError,
            ::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::restore_table_from_recovery_point::RestoreTableFromRecoveryPoint::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::restore_table_from_recovery_point::RestoreTableFromRecoveryPoint::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::restore_table_from_recovery_point::RestoreTableFromRecoveryPointOutput,
        crate::operation::restore_table_from_recovery_point::RestoreTableFromRecoveryPointError,
        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>Namespace of the recovery point to restore from.</p>
    pub fn namespace_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.namespace_name(input.into());
        self
    }
    /// <p>Namespace of the recovery point to restore from.</p>
    pub fn set_namespace_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_namespace_name(input);
        self
    }
    /// <p>Namespace of the recovery point to restore from.</p>
    pub fn get_namespace_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_namespace_name()
    }
    /// <p>The workgroup to restore the table to.</p>
    pub fn workgroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.workgroup_name(input.into());
        self
    }
    /// <p>The workgroup to restore the table to.</p>
    pub fn set_workgroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_workgroup_name(input);
        self
    }
    /// <p>The workgroup to restore the table to.</p>
    pub fn get_workgroup_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_workgroup_name()
    }
    /// <p>The ID of the recovery point to restore the table from.</p>
    pub fn recovery_point_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.recovery_point_id(input.into());
        self
    }
    /// <p>The ID of the recovery point to restore the table from.</p>
    pub fn set_recovery_point_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_recovery_point_id(input);
        self
    }
    /// <p>The ID of the recovery point to restore the table from.</p>
    pub fn get_recovery_point_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_recovery_point_id()
    }
    /// <p>The name of the source database that contains the table being restored.</p>
    pub fn source_database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.source_database_name(input.into());
        self
    }
    /// <p>The name of the source database that contains the table being restored.</p>
    pub fn set_source_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_source_database_name(input);
        self
    }
    /// <p>The name of the source database that contains the table being restored.</p>
    pub fn get_source_database_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_source_database_name()
    }
    /// <p>The name of the source schema that contains the table being restored.</p>
    pub fn source_schema_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.source_schema_name(input.into());
        self
    }
    /// <p>The name of the source schema that contains the table being restored.</p>
    pub fn set_source_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_source_schema_name(input);
        self
    }
    /// <p>The name of the source schema that contains the table being restored.</p>
    pub fn get_source_schema_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_source_schema_name()
    }
    /// <p>The name of the source table being restored.</p>
    pub fn source_table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.source_table_name(input.into());
        self
    }
    /// <p>The name of the source table being restored.</p>
    pub fn set_source_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_source_table_name(input);
        self
    }
    /// <p>The name of the source table being restored.</p>
    pub fn get_source_table_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_source_table_name()
    }
    /// <p>The name of the database to restore the table to.</p>
    pub fn target_database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.target_database_name(input.into());
        self
    }
    /// <p>The name of the database to restore the table to.</p>
    pub fn set_target_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_target_database_name(input);
        self
    }
    /// <p>The name of the database to restore the table to.</p>
    pub fn get_target_database_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_target_database_name()
    }
    /// <p>The name of the schema to restore the table to.</p>
    pub fn target_schema_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.target_schema_name(input.into());
        self
    }
    /// <p>The name of the schema to restore the table to.</p>
    pub fn set_target_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_target_schema_name(input);
        self
    }
    /// <p>The name of the schema to restore the table to.</p>
    pub fn get_target_schema_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_target_schema_name()
    }
    /// <p>The name of the table to create from the restore operation.</p>
    pub fn new_table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.new_table_name(input.into());
        self
    }
    /// <p>The name of the table to create from the restore operation.</p>
    pub fn set_new_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_new_table_name(input);
        self
    }
    /// <p>The name of the table to create from the restore operation.</p>
    pub fn get_new_table_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_new_table_name()
    }
    /// <p>Indicates whether name identifiers for database, schema, and table are case sensitive. If true, the names are case sensitive. If false, the names are not case sensitive. The default is false.</p>
    pub fn activate_case_sensitive_identifier(mut self, input: bool) -> Self {
        self.inner = self.inner.activate_case_sensitive_identifier(input);
        self
    }
    /// <p>Indicates whether name identifiers for database, schema, and table are case sensitive. If true, the names are case sensitive. If false, the names are not case sensitive. The default is false.</p>
    pub fn set_activate_case_sensitive_identifier(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_activate_case_sensitive_identifier(input);
        self
    }
    /// <p>Indicates whether name identifiers for database, schema, and table are case sensitive. If true, the names are case sensitive. If false, the names are not case sensitive. The default is false.</p>
    pub fn get_activate_case_sensitive_identifier(&self) -> &::std::option::Option<bool> {
        self.inner.get_activate_case_sensitive_identifier()
    }
}