aws_sdk_s3tables/operation/rename_table/
_rename_table_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 RenameTableInput {
6    /// <p>The Amazon Resource Name (ARN) of the table bucket.</p>
7    pub table_bucket_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The namespace associated with the table.</p>
9    pub namespace: ::std::option::Option<::std::string::String>,
10    /// <p>The current name of the table.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The new name for the namespace.</p>
13    pub new_namespace_name: ::std::option::Option<::std::string::String>,
14    /// <p>The new name for the table.</p>
15    pub new_name: ::std::option::Option<::std::string::String>,
16    /// <p>The version token of the table.</p>
17    pub version_token: ::std::option::Option<::std::string::String>,
18}
19impl RenameTableInput {
20    /// <p>The Amazon Resource Name (ARN) of the table bucket.</p>
21    pub fn table_bucket_arn(&self) -> ::std::option::Option<&str> {
22        self.table_bucket_arn.as_deref()
23    }
24    /// <p>The namespace associated with the table.</p>
25    pub fn namespace(&self) -> ::std::option::Option<&str> {
26        self.namespace.as_deref()
27    }
28    /// <p>The current name of the table.</p>
29    pub fn name(&self) -> ::std::option::Option<&str> {
30        self.name.as_deref()
31    }
32    /// <p>The new name for the namespace.</p>
33    pub fn new_namespace_name(&self) -> ::std::option::Option<&str> {
34        self.new_namespace_name.as_deref()
35    }
36    /// <p>The new name for the table.</p>
37    pub fn new_name(&self) -> ::std::option::Option<&str> {
38        self.new_name.as_deref()
39    }
40    /// <p>The version token of the table.</p>
41    pub fn version_token(&self) -> ::std::option::Option<&str> {
42        self.version_token.as_deref()
43    }
44}
45impl RenameTableInput {
46    /// Creates a new builder-style object to manufacture [`RenameTableInput`](crate::operation::rename_table::RenameTableInput).
47    pub fn builder() -> crate::operation::rename_table::builders::RenameTableInputBuilder {
48        crate::operation::rename_table::builders::RenameTableInputBuilder::default()
49    }
50}
51
52/// A builder for [`RenameTableInput`](crate::operation::rename_table::RenameTableInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct RenameTableInputBuilder {
56    pub(crate) table_bucket_arn: ::std::option::Option<::std::string::String>,
57    pub(crate) namespace: ::std::option::Option<::std::string::String>,
58    pub(crate) name: ::std::option::Option<::std::string::String>,
59    pub(crate) new_namespace_name: ::std::option::Option<::std::string::String>,
60    pub(crate) new_name: ::std::option::Option<::std::string::String>,
61    pub(crate) version_token: ::std::option::Option<::std::string::String>,
62}
63impl RenameTableInputBuilder {
64    /// <p>The Amazon Resource Name (ARN) of the table bucket.</p>
65    /// This field is required.
66    pub fn table_bucket_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.table_bucket_arn = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The Amazon Resource Name (ARN) of the table bucket.</p>
71    pub fn set_table_bucket_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.table_bucket_arn = input;
73        self
74    }
75    /// <p>The Amazon Resource Name (ARN) of the table bucket.</p>
76    pub fn get_table_bucket_arn(&self) -> &::std::option::Option<::std::string::String> {
77        &self.table_bucket_arn
78    }
79    /// <p>The namespace associated with the table.</p>
80    /// This field is required.
81    pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.namespace = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The namespace associated with the table.</p>
86    pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.namespace = input;
88        self
89    }
90    /// <p>The namespace associated with the table.</p>
91    pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
92        &self.namespace
93    }
94    /// <p>The current name of the table.</p>
95    /// This field is required.
96    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.name = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The current name of the table.</p>
101    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.name = input;
103        self
104    }
105    /// <p>The current name of the table.</p>
106    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
107        &self.name
108    }
109    /// <p>The new name for the namespace.</p>
110    pub fn new_namespace_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
111        self.new_namespace_name = ::std::option::Option::Some(input.into());
112        self
113    }
114    /// <p>The new name for the namespace.</p>
115    pub fn set_new_namespace_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
116        self.new_namespace_name = input;
117        self
118    }
119    /// <p>The new name for the namespace.</p>
120    pub fn get_new_namespace_name(&self) -> &::std::option::Option<::std::string::String> {
121        &self.new_namespace_name
122    }
123    /// <p>The new name for the table.</p>
124    pub fn new_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.new_name = ::std::option::Option::Some(input.into());
126        self
127    }
128    /// <p>The new name for the table.</p>
129    pub fn set_new_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.new_name = input;
131        self
132    }
133    /// <p>The new name for the table.</p>
134    pub fn get_new_name(&self) -> &::std::option::Option<::std::string::String> {
135        &self.new_name
136    }
137    /// <p>The version token of the table.</p>
138    pub fn version_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139        self.version_token = ::std::option::Option::Some(input.into());
140        self
141    }
142    /// <p>The version token of the table.</p>
143    pub fn set_version_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144        self.version_token = input;
145        self
146    }
147    /// <p>The version token of the table.</p>
148    pub fn get_version_token(&self) -> &::std::option::Option<::std::string::String> {
149        &self.version_token
150    }
151    /// Consumes the builder and constructs a [`RenameTableInput`](crate::operation::rename_table::RenameTableInput).
152    pub fn build(self) -> ::std::result::Result<crate::operation::rename_table::RenameTableInput, ::aws_smithy_types::error::operation::BuildError> {
153        ::std::result::Result::Ok(crate::operation::rename_table::RenameTableInput {
154            table_bucket_arn: self.table_bucket_arn,
155            namespace: self.namespace,
156            name: self.name,
157            new_namespace_name: self.new_namespace_name,
158            new_name: self.new_name,
159            version_token: self.version_token,
160        })
161    }
162}