aws_sdk_databasemigration/operation/reload_replication_tables/
_reload_replication_tables_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p></p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ReloadReplicationTablesInput {
7    /// <p>The Amazon Resource Name of the replication config for which to reload tables.</p>
8    pub replication_config_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The list of tables to reload.</p>
10    pub tables_to_reload: ::std::option::Option<::std::vec::Vec<crate::types::TableToReload>>,
11    /// <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>
12    pub reload_option: ::std::option::Option<crate::types::ReloadOptionValue>,
13}
14impl ReloadReplicationTablesInput {
15    /// <p>The Amazon Resource Name of the replication config for which to reload tables.</p>
16    pub fn replication_config_arn(&self) -> ::std::option::Option<&str> {
17        self.replication_config_arn.as_deref()
18    }
19    /// <p>The list of tables to reload.</p>
20    ///
21    /// 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()`.
22    pub fn tables_to_reload(&self) -> &[crate::types::TableToReload] {
23        self.tables_to_reload.as_deref().unwrap_or_default()
24    }
25    /// <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>
26    pub fn reload_option(&self) -> ::std::option::Option<&crate::types::ReloadOptionValue> {
27        self.reload_option.as_ref()
28    }
29}
30impl ReloadReplicationTablesInput {
31    /// Creates a new builder-style object to manufacture [`ReloadReplicationTablesInput`](crate::operation::reload_replication_tables::ReloadReplicationTablesInput).
32    pub fn builder() -> crate::operation::reload_replication_tables::builders::ReloadReplicationTablesInputBuilder {
33        crate::operation::reload_replication_tables::builders::ReloadReplicationTablesInputBuilder::default()
34    }
35}
36
37/// A builder for [`ReloadReplicationTablesInput`](crate::operation::reload_replication_tables::ReloadReplicationTablesInput).
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
39#[non_exhaustive]
40pub struct ReloadReplicationTablesInputBuilder {
41    pub(crate) replication_config_arn: ::std::option::Option<::std::string::String>,
42    pub(crate) tables_to_reload: ::std::option::Option<::std::vec::Vec<crate::types::TableToReload>>,
43    pub(crate) reload_option: ::std::option::Option<crate::types::ReloadOptionValue>,
44}
45impl ReloadReplicationTablesInputBuilder {
46    /// <p>The Amazon Resource Name of the replication config for which to reload tables.</p>
47    /// This field is required.
48    pub fn replication_config_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
49        self.replication_config_arn = ::std::option::Option::Some(input.into());
50        self
51    }
52    /// <p>The Amazon Resource Name of the replication config for which to reload tables.</p>
53    pub fn set_replication_config_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
54        self.replication_config_arn = input;
55        self
56    }
57    /// <p>The Amazon Resource Name of the replication config for which to reload tables.</p>
58    pub fn get_replication_config_arn(&self) -> &::std::option::Option<::std::string::String> {
59        &self.replication_config_arn
60    }
61    /// Appends an item to `tables_to_reload`.
62    ///
63    /// To override the contents of this collection use [`set_tables_to_reload`](Self::set_tables_to_reload).
64    ///
65    /// <p>The list of tables to reload.</p>
66    pub fn tables_to_reload(mut self, input: crate::types::TableToReload) -> Self {
67        let mut v = self.tables_to_reload.unwrap_or_default();
68        v.push(input);
69        self.tables_to_reload = ::std::option::Option::Some(v);
70        self
71    }
72    /// <p>The list of tables to reload.</p>
73    pub fn set_tables_to_reload(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TableToReload>>) -> Self {
74        self.tables_to_reload = input;
75        self
76    }
77    /// <p>The list of tables to reload.</p>
78    pub fn get_tables_to_reload(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TableToReload>> {
79        &self.tables_to_reload
80    }
81    /// <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>
82    pub fn reload_option(mut self, input: crate::types::ReloadOptionValue) -> Self {
83        self.reload_option = ::std::option::Option::Some(input);
84        self
85    }
86    /// <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>
87    pub fn set_reload_option(mut self, input: ::std::option::Option<crate::types::ReloadOptionValue>) -> Self {
88        self.reload_option = input;
89        self
90    }
91    /// <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>
92    pub fn get_reload_option(&self) -> &::std::option::Option<crate::types::ReloadOptionValue> {
93        &self.reload_option
94    }
95    /// Consumes the builder and constructs a [`ReloadReplicationTablesInput`](crate::operation::reload_replication_tables::ReloadReplicationTablesInput).
96    pub fn build(
97        self,
98    ) -> ::std::result::Result<
99        crate::operation::reload_replication_tables::ReloadReplicationTablesInput,
100        ::aws_smithy_types::error::operation::BuildError,
101    > {
102        ::std::result::Result::Ok(crate::operation::reload_replication_tables::ReloadReplicationTablesInput {
103            replication_config_arn: self.replication_config_arn,
104            tables_to_reload: self.tables_to_reload,
105            reload_option: self.reload_option,
106        })
107    }
108}