aws-sdk-databasemigration 1.112.0

AWS SDK for AWS Database Migration Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p></p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ReloadReplicationTablesInput {
    /// <p>The Amazon Resource Name of the replication config for which to reload tables.</p>
    pub replication_config_arn: ::std::option::Option<::std::string::String>,
    /// <p>The list of tables to reload.</p>
    pub tables_to_reload: ::std::option::Option<::std::vec::Vec<crate::types::TableToReload>>,
    /// <p>Options for reload. Specify <code>data-reload</code> to reload the data and re-validate it if validation is enabled. Specify <code>validate-only</code> to re-validate the table. This option applies only when validation is enabled for the replication.</p>
    pub reload_option: ::std::option::Option<crate::types::ReloadOptionValue>,
}
impl ReloadReplicationTablesInput {
    /// <p>The Amazon Resource Name of the replication config for which to reload tables.</p>
    pub fn replication_config_arn(&self) -> ::std::option::Option<&str> {
        self.replication_config_arn.as_deref()
    }
    /// <p>The list of tables to reload.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tables_to_reload.is_none()`.
    pub fn tables_to_reload(&self) -> &[crate::types::TableToReload] {
        self.tables_to_reload.as_deref().unwrap_or_default()
    }
    /// <p>Options for reload. Specify <code>data-reload</code> to reload the data and re-validate it if validation is enabled. Specify <code>validate-only</code> to re-validate the table. This option applies only when validation is enabled for the replication.</p>
    pub fn reload_option(&self) -> ::std::option::Option<&crate::types::ReloadOptionValue> {
        self.reload_option.as_ref()
    }
}
impl ReloadReplicationTablesInput {
    /// Creates a new builder-style object to manufacture [`ReloadReplicationTablesInput`](crate::operation::reload_replication_tables::ReloadReplicationTablesInput).
    pub fn builder() -> crate::operation::reload_replication_tables::builders::ReloadReplicationTablesInputBuilder {
        crate::operation::reload_replication_tables::builders::ReloadReplicationTablesInputBuilder::default()
    }
}

/// A builder for [`ReloadReplicationTablesInput`](crate::operation::reload_replication_tables::ReloadReplicationTablesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ReloadReplicationTablesInputBuilder {
    pub(crate) replication_config_arn: ::std::option::Option<::std::string::String>,
    pub(crate) tables_to_reload: ::std::option::Option<::std::vec::Vec<crate::types::TableToReload>>,
    pub(crate) reload_option: ::std::option::Option<crate::types::ReloadOptionValue>,
}
impl ReloadReplicationTablesInputBuilder {
    /// <p>The Amazon Resource Name of the replication config for which to reload tables.</p>
    /// This field is required.
    pub fn replication_config_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.replication_config_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name of the replication config for which to reload tables.</p>
    pub fn set_replication_config_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.replication_config_arn = input;
        self
    }
    /// <p>The Amazon Resource Name of the replication config for which to reload tables.</p>
    pub fn get_replication_config_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.replication_config_arn
    }
    /// Appends an item to `tables_to_reload`.
    ///
    /// To override the contents of this collection use [`set_tables_to_reload`](Self::set_tables_to_reload).
    ///
    /// <p>The list of tables to reload.</p>
    pub fn tables_to_reload(mut self, input: crate::types::TableToReload) -> Self {
        let mut v = self.tables_to_reload.unwrap_or_default();
        v.push(input);
        self.tables_to_reload = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of tables to reload.</p>
    pub fn set_tables_to_reload(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TableToReload>>) -> Self {
        self.tables_to_reload = input;
        self
    }
    /// <p>The list of tables to reload.</p>
    pub fn get_tables_to_reload(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TableToReload>> {
        &self.tables_to_reload
    }
    /// <p>Options for reload. Specify <code>data-reload</code> to reload the data and re-validate it if validation is enabled. Specify <code>validate-only</code> to re-validate the table. This option applies only when validation is enabled for the replication.</p>
    pub fn reload_option(mut self, input: crate::types::ReloadOptionValue) -> Self {
        self.reload_option = ::std::option::Option::Some(input);
        self
    }
    /// <p>Options for reload. Specify <code>data-reload</code> to reload the data and re-validate it if validation is enabled. Specify <code>validate-only</code> to re-validate the table. This option applies only when validation is enabled for the replication.</p>
    pub fn set_reload_option(mut self, input: ::std::option::Option<crate::types::ReloadOptionValue>) -> Self {
        self.reload_option = input;
        self
    }
    /// <p>Options for reload. Specify <code>data-reload</code> to reload the data and re-validate it if validation is enabled. Specify <code>validate-only</code> to re-validate the table. This option applies only when validation is enabled for the replication.</p>
    pub fn get_reload_option(&self) -> &::std::option::Option<crate::types::ReloadOptionValue> {
        &self.reload_option
    }
    /// Consumes the builder and constructs a [`ReloadReplicationTablesInput`](crate::operation::reload_replication_tables::ReloadReplicationTablesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::reload_replication_tables::ReloadReplicationTablesInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::reload_replication_tables::ReloadReplicationTablesInput {
            replication_config_arn: self.replication_config_arn,
            tables_to_reload: self.tables_to_reload,
            reload_option: self.reload_option,
        })
    }
}