aws_sdk_glue/operation/update_table/
_update_table_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateTableInput {
6 pub catalog_id: ::std::option::Option<::std::string::String>,
8 pub database_name: ::std::option::Option<::std::string::String>,
10 pub name: ::std::option::Option<::std::string::String>,
12 pub table_input: ::std::option::Option<crate::types::TableInput>,
14 pub skip_archive: ::std::option::Option<bool>,
16 pub transaction_id: ::std::option::Option<::std::string::String>,
18 pub version_id: ::std::option::Option<::std::string::String>,
20 pub view_update_action: ::std::option::Option<crate::types::ViewUpdateAction>,
22 pub force: ::std::option::Option<bool>,
24 pub update_open_table_format_input: ::std::option::Option<crate::types::UpdateOpenTableFormatInput>,
26}
27impl UpdateTableInput {
28 pub fn catalog_id(&self) -> ::std::option::Option<&str> {
30 self.catalog_id.as_deref()
31 }
32 pub fn database_name(&self) -> ::std::option::Option<&str> {
34 self.database_name.as_deref()
35 }
36 pub fn name(&self) -> ::std::option::Option<&str> {
38 self.name.as_deref()
39 }
40 pub fn table_input(&self) -> ::std::option::Option<&crate::types::TableInput> {
42 self.table_input.as_ref()
43 }
44 pub fn skip_archive(&self) -> ::std::option::Option<bool> {
46 self.skip_archive
47 }
48 pub fn transaction_id(&self) -> ::std::option::Option<&str> {
50 self.transaction_id.as_deref()
51 }
52 pub fn version_id(&self) -> ::std::option::Option<&str> {
54 self.version_id.as_deref()
55 }
56 pub fn view_update_action(&self) -> ::std::option::Option<&crate::types::ViewUpdateAction> {
58 self.view_update_action.as_ref()
59 }
60 pub fn force(&self) -> ::std::option::Option<bool> {
62 self.force
63 }
64 pub fn update_open_table_format_input(&self) -> ::std::option::Option<&crate::types::UpdateOpenTableFormatInput> {
66 self.update_open_table_format_input.as_ref()
67 }
68}
69impl UpdateTableInput {
70 pub fn builder() -> crate::operation::update_table::builders::UpdateTableInputBuilder {
72 crate::operation::update_table::builders::UpdateTableInputBuilder::default()
73 }
74}
75
76#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
78#[non_exhaustive]
79pub struct UpdateTableInputBuilder {
80 pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
81 pub(crate) database_name: ::std::option::Option<::std::string::String>,
82 pub(crate) name: ::std::option::Option<::std::string::String>,
83 pub(crate) table_input: ::std::option::Option<crate::types::TableInput>,
84 pub(crate) skip_archive: ::std::option::Option<bool>,
85 pub(crate) transaction_id: ::std::option::Option<::std::string::String>,
86 pub(crate) version_id: ::std::option::Option<::std::string::String>,
87 pub(crate) view_update_action: ::std::option::Option<crate::types::ViewUpdateAction>,
88 pub(crate) force: ::std::option::Option<bool>,
89 pub(crate) update_open_table_format_input: ::std::option::Option<crate::types::UpdateOpenTableFormatInput>,
90}
91impl UpdateTableInputBuilder {
92 pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.catalog_id = ::std::option::Option::Some(input.into());
95 self
96 }
97 pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.catalog_id = input;
100 self
101 }
102 pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
104 &self.catalog_id
105 }
106 pub fn database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109 self.database_name = ::std::option::Option::Some(input.into());
110 self
111 }
112 pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114 self.database_name = input;
115 self
116 }
117 pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
119 &self.database_name
120 }
121 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.name = ::std::option::Option::Some(input.into());
124 self
125 }
126 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.name = input;
129 self
130 }
131 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
133 &self.name
134 }
135 pub fn table_input(mut self, input: crate::types::TableInput) -> Self {
137 self.table_input = ::std::option::Option::Some(input);
138 self
139 }
140 pub fn set_table_input(mut self, input: ::std::option::Option<crate::types::TableInput>) -> Self {
142 self.table_input = input;
143 self
144 }
145 pub fn get_table_input(&self) -> &::std::option::Option<crate::types::TableInput> {
147 &self.table_input
148 }
149 pub fn skip_archive(mut self, input: bool) -> Self {
151 self.skip_archive = ::std::option::Option::Some(input);
152 self
153 }
154 pub fn set_skip_archive(mut self, input: ::std::option::Option<bool>) -> Self {
156 self.skip_archive = input;
157 self
158 }
159 pub fn get_skip_archive(&self) -> &::std::option::Option<bool> {
161 &self.skip_archive
162 }
163 pub fn transaction_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165 self.transaction_id = ::std::option::Option::Some(input.into());
166 self
167 }
168 pub fn set_transaction_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170 self.transaction_id = input;
171 self
172 }
173 pub fn get_transaction_id(&self) -> &::std::option::Option<::std::string::String> {
175 &self.transaction_id
176 }
177 pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179 self.version_id = ::std::option::Option::Some(input.into());
180 self
181 }
182 pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184 self.version_id = input;
185 self
186 }
187 pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
189 &self.version_id
190 }
191 pub fn view_update_action(mut self, input: crate::types::ViewUpdateAction) -> Self {
193 self.view_update_action = ::std::option::Option::Some(input);
194 self
195 }
196 pub fn set_view_update_action(mut self, input: ::std::option::Option<crate::types::ViewUpdateAction>) -> Self {
198 self.view_update_action = input;
199 self
200 }
201 pub fn get_view_update_action(&self) -> &::std::option::Option<crate::types::ViewUpdateAction> {
203 &self.view_update_action
204 }
205 pub fn force(mut self, input: bool) -> Self {
207 self.force = ::std::option::Option::Some(input);
208 self
209 }
210 pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
212 self.force = input;
213 self
214 }
215 pub fn get_force(&self) -> &::std::option::Option<bool> {
217 &self.force
218 }
219 pub fn update_open_table_format_input(mut self, input: crate::types::UpdateOpenTableFormatInput) -> Self {
221 self.update_open_table_format_input = ::std::option::Option::Some(input);
222 self
223 }
224 pub fn set_update_open_table_format_input(mut self, input: ::std::option::Option<crate::types::UpdateOpenTableFormatInput>) -> Self {
226 self.update_open_table_format_input = input;
227 self
228 }
229 pub fn get_update_open_table_format_input(&self) -> &::std::option::Option<crate::types::UpdateOpenTableFormatInput> {
231 &self.update_open_table_format_input
232 }
233 pub fn build(self) -> ::std::result::Result<crate::operation::update_table::UpdateTableInput, ::aws_smithy_types::error::operation::BuildError> {
235 ::std::result::Result::Ok(crate::operation::update_table::UpdateTableInput {
236 catalog_id: self.catalog_id,
237 database_name: self.database_name,
238 name: self.name,
239 table_input: self.table_input,
240 skip_archive: self.skip_archive,
241 transaction_id: self.transaction_id,
242 version_id: self.version_id,
243 view_update_action: self.view_update_action,
244 force: self.force,
245 update_open_table_format_input: self.update_open_table_format_input,
246 })
247 }
248}