aws_sdk_databasemigration/operation/reload_tables/
_reload_tables_input.rs

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