aws_sdk_s3tables/operation/get_table/
_get_table_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetTableOutput {
6 pub name: ::std::string::String,
8 pub r#type: crate::types::TableType,
10 pub table_arn: ::std::string::String,
12 pub namespace: ::std::vec::Vec<::std::string::String>,
14 pub namespace_id: ::std::option::Option<::std::string::String>,
16 pub version_token: ::std::string::String,
18 pub metadata_location: ::std::option::Option<::std::string::String>,
20 pub warehouse_location: ::std::string::String,
22 pub created_at: ::aws_smithy_types::DateTime,
24 pub created_by: ::std::string::String,
26 pub managed_by_service: ::std::option::Option<::std::string::String>,
28 pub modified_at: ::aws_smithy_types::DateTime,
30 pub modified_by: ::std::string::String,
32 pub owner_account_id: ::std::string::String,
34 pub format: crate::types::OpenTableFormat,
36 pub table_bucket_id: ::std::option::Option<::std::string::String>,
38 _request_id: Option<String>,
39}
40impl GetTableOutput {
41 pub fn name(&self) -> &str {
43 use std::ops::Deref;
44 self.name.deref()
45 }
46 pub fn r#type(&self) -> &crate::types::TableType {
48 &self.r#type
49 }
50 pub fn table_arn(&self) -> &str {
52 use std::ops::Deref;
53 self.table_arn.deref()
54 }
55 pub fn namespace(&self) -> &[::std::string::String] {
57 use std::ops::Deref;
58 self.namespace.deref()
59 }
60 pub fn namespace_id(&self) -> ::std::option::Option<&str> {
62 self.namespace_id.as_deref()
63 }
64 pub fn version_token(&self) -> &str {
66 use std::ops::Deref;
67 self.version_token.deref()
68 }
69 pub fn metadata_location(&self) -> ::std::option::Option<&str> {
71 self.metadata_location.as_deref()
72 }
73 pub fn warehouse_location(&self) -> &str {
75 use std::ops::Deref;
76 self.warehouse_location.deref()
77 }
78 pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
80 &self.created_at
81 }
82 pub fn created_by(&self) -> &str {
84 use std::ops::Deref;
85 self.created_by.deref()
86 }
87 pub fn managed_by_service(&self) -> ::std::option::Option<&str> {
89 self.managed_by_service.as_deref()
90 }
91 pub fn modified_at(&self) -> &::aws_smithy_types::DateTime {
93 &self.modified_at
94 }
95 pub fn modified_by(&self) -> &str {
97 use std::ops::Deref;
98 self.modified_by.deref()
99 }
100 pub fn owner_account_id(&self) -> &str {
102 use std::ops::Deref;
103 self.owner_account_id.deref()
104 }
105 pub fn format(&self) -> &crate::types::OpenTableFormat {
107 &self.format
108 }
109 pub fn table_bucket_id(&self) -> ::std::option::Option<&str> {
111 self.table_bucket_id.as_deref()
112 }
113}
114impl ::aws_types::request_id::RequestId for GetTableOutput {
115 fn request_id(&self) -> Option<&str> {
116 self._request_id.as_deref()
117 }
118}
119impl GetTableOutput {
120 pub fn builder() -> crate::operation::get_table::builders::GetTableOutputBuilder {
122 crate::operation::get_table::builders::GetTableOutputBuilder::default()
123 }
124}
125
126#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
128#[non_exhaustive]
129pub struct GetTableOutputBuilder {
130 pub(crate) name: ::std::option::Option<::std::string::String>,
131 pub(crate) r#type: ::std::option::Option<crate::types::TableType>,
132 pub(crate) table_arn: ::std::option::Option<::std::string::String>,
133 pub(crate) namespace: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
134 pub(crate) namespace_id: ::std::option::Option<::std::string::String>,
135 pub(crate) version_token: ::std::option::Option<::std::string::String>,
136 pub(crate) metadata_location: ::std::option::Option<::std::string::String>,
137 pub(crate) warehouse_location: ::std::option::Option<::std::string::String>,
138 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
139 pub(crate) created_by: ::std::option::Option<::std::string::String>,
140 pub(crate) managed_by_service: ::std::option::Option<::std::string::String>,
141 pub(crate) modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
142 pub(crate) modified_by: ::std::option::Option<::std::string::String>,
143 pub(crate) owner_account_id: ::std::option::Option<::std::string::String>,
144 pub(crate) format: ::std::option::Option<crate::types::OpenTableFormat>,
145 pub(crate) table_bucket_id: ::std::option::Option<::std::string::String>,
146 _request_id: Option<String>,
147}
148impl GetTableOutputBuilder {
149 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152 self.name = ::std::option::Option::Some(input.into());
153 self
154 }
155 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157 self.name = input;
158 self
159 }
160 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
162 &self.name
163 }
164 pub fn r#type(mut self, input: crate::types::TableType) -> Self {
167 self.r#type = ::std::option::Option::Some(input);
168 self
169 }
170 pub fn set_type(mut self, input: ::std::option::Option<crate::types::TableType>) -> Self {
172 self.r#type = input;
173 self
174 }
175 pub fn get_type(&self) -> &::std::option::Option<crate::types::TableType> {
177 &self.r#type
178 }
179 pub fn table_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182 self.table_arn = ::std::option::Option::Some(input.into());
183 self
184 }
185 pub fn set_table_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187 self.table_arn = input;
188 self
189 }
190 pub fn get_table_arn(&self) -> &::std::option::Option<::std::string::String> {
192 &self.table_arn
193 }
194 pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200 let mut v = self.namespace.unwrap_or_default();
201 v.push(input.into());
202 self.namespace = ::std::option::Option::Some(v);
203 self
204 }
205 pub fn set_namespace(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
207 self.namespace = input;
208 self
209 }
210 pub fn get_namespace(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
212 &self.namespace
213 }
214 pub fn namespace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216 self.namespace_id = ::std::option::Option::Some(input.into());
217 self
218 }
219 pub fn set_namespace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221 self.namespace_id = input;
222 self
223 }
224 pub fn get_namespace_id(&self) -> &::std::option::Option<::std::string::String> {
226 &self.namespace_id
227 }
228 pub fn version_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231 self.version_token = ::std::option::Option::Some(input.into());
232 self
233 }
234 pub fn set_version_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
236 self.version_token = input;
237 self
238 }
239 pub fn get_version_token(&self) -> &::std::option::Option<::std::string::String> {
241 &self.version_token
242 }
243 pub fn metadata_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
245 self.metadata_location = ::std::option::Option::Some(input.into());
246 self
247 }
248 pub fn set_metadata_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
250 self.metadata_location = input;
251 self
252 }
253 pub fn get_metadata_location(&self) -> &::std::option::Option<::std::string::String> {
255 &self.metadata_location
256 }
257 pub fn warehouse_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
260 self.warehouse_location = ::std::option::Option::Some(input.into());
261 self
262 }
263 pub fn set_warehouse_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
265 self.warehouse_location = input;
266 self
267 }
268 pub fn get_warehouse_location(&self) -> &::std::option::Option<::std::string::String> {
270 &self.warehouse_location
271 }
272 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
275 self.created_at = ::std::option::Option::Some(input);
276 self
277 }
278 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
280 self.created_at = input;
281 self
282 }
283 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
285 &self.created_at
286 }
287 pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
290 self.created_by = ::std::option::Option::Some(input.into());
291 self
292 }
293 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
295 self.created_by = input;
296 self
297 }
298 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
300 &self.created_by
301 }
302 pub fn managed_by_service(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
304 self.managed_by_service = ::std::option::Option::Some(input.into());
305 self
306 }
307 pub fn set_managed_by_service(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
309 self.managed_by_service = input;
310 self
311 }
312 pub fn get_managed_by_service(&self) -> &::std::option::Option<::std::string::String> {
314 &self.managed_by_service
315 }
316 pub fn modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
319 self.modified_at = ::std::option::Option::Some(input);
320 self
321 }
322 pub fn set_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
324 self.modified_at = input;
325 self
326 }
327 pub fn get_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
329 &self.modified_at
330 }
331 pub fn modified_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
334 self.modified_by = ::std::option::Option::Some(input.into());
335 self
336 }
337 pub fn set_modified_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
339 self.modified_by = input;
340 self
341 }
342 pub fn get_modified_by(&self) -> &::std::option::Option<::std::string::String> {
344 &self.modified_by
345 }
346 pub fn owner_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
349 self.owner_account_id = ::std::option::Option::Some(input.into());
350 self
351 }
352 pub fn set_owner_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
354 self.owner_account_id = input;
355 self
356 }
357 pub fn get_owner_account_id(&self) -> &::std::option::Option<::std::string::String> {
359 &self.owner_account_id
360 }
361 pub fn format(mut self, input: crate::types::OpenTableFormat) -> Self {
364 self.format = ::std::option::Option::Some(input);
365 self
366 }
367 pub fn set_format(mut self, input: ::std::option::Option<crate::types::OpenTableFormat>) -> Self {
369 self.format = input;
370 self
371 }
372 pub fn get_format(&self) -> &::std::option::Option<crate::types::OpenTableFormat> {
374 &self.format
375 }
376 pub fn table_bucket_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
378 self.table_bucket_id = ::std::option::Option::Some(input.into());
379 self
380 }
381 pub fn set_table_bucket_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
383 self.table_bucket_id = input;
384 self
385 }
386 pub fn get_table_bucket_id(&self) -> &::std::option::Option<::std::string::String> {
388 &self.table_bucket_id
389 }
390 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
391 self._request_id = Some(request_id.into());
392 self
393 }
394
395 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
396 self._request_id = request_id;
397 self
398 }
399 pub fn build(self) -> ::std::result::Result<crate::operation::get_table::GetTableOutput, ::aws_smithy_types::error::operation::BuildError> {
414 ::std::result::Result::Ok(crate::operation::get_table::GetTableOutput {
415 name: self.name.ok_or_else(|| {
416 ::aws_smithy_types::error::operation::BuildError::missing_field(
417 "name",
418 "name was not specified but it is required when building GetTableOutput",
419 )
420 })?,
421 r#type: self.r#type.ok_or_else(|| {
422 ::aws_smithy_types::error::operation::BuildError::missing_field(
423 "r#type",
424 "r#type was not specified but it is required when building GetTableOutput",
425 )
426 })?,
427 table_arn: self.table_arn.ok_or_else(|| {
428 ::aws_smithy_types::error::operation::BuildError::missing_field(
429 "table_arn",
430 "table_arn was not specified but it is required when building GetTableOutput",
431 )
432 })?,
433 namespace: self.namespace.ok_or_else(|| {
434 ::aws_smithy_types::error::operation::BuildError::missing_field(
435 "namespace",
436 "namespace was not specified but it is required when building GetTableOutput",
437 )
438 })?,
439 namespace_id: self.namespace_id,
440 version_token: self.version_token.ok_or_else(|| {
441 ::aws_smithy_types::error::operation::BuildError::missing_field(
442 "version_token",
443 "version_token was not specified but it is required when building GetTableOutput",
444 )
445 })?,
446 metadata_location: self.metadata_location,
447 warehouse_location: self.warehouse_location.ok_or_else(|| {
448 ::aws_smithy_types::error::operation::BuildError::missing_field(
449 "warehouse_location",
450 "warehouse_location was not specified but it is required when building GetTableOutput",
451 )
452 })?,
453 created_at: self.created_at.ok_or_else(|| {
454 ::aws_smithy_types::error::operation::BuildError::missing_field(
455 "created_at",
456 "created_at was not specified but it is required when building GetTableOutput",
457 )
458 })?,
459 created_by: self.created_by.ok_or_else(|| {
460 ::aws_smithy_types::error::operation::BuildError::missing_field(
461 "created_by",
462 "created_by was not specified but it is required when building GetTableOutput",
463 )
464 })?,
465 managed_by_service: self.managed_by_service,
466 modified_at: self.modified_at.ok_or_else(|| {
467 ::aws_smithy_types::error::operation::BuildError::missing_field(
468 "modified_at",
469 "modified_at was not specified but it is required when building GetTableOutput",
470 )
471 })?,
472 modified_by: self.modified_by.ok_or_else(|| {
473 ::aws_smithy_types::error::operation::BuildError::missing_field(
474 "modified_by",
475 "modified_by was not specified but it is required when building GetTableOutput",
476 )
477 })?,
478 owner_account_id: self.owner_account_id.ok_or_else(|| {
479 ::aws_smithy_types::error::operation::BuildError::missing_field(
480 "owner_account_id",
481 "owner_account_id was not specified but it is required when building GetTableOutput",
482 )
483 })?,
484 format: self.format.ok_or_else(|| {
485 ::aws_smithy_types::error::operation::BuildError::missing_field(
486 "format",
487 "format was not specified but it is required when building GetTableOutput",
488 )
489 })?,
490 table_bucket_id: self.table_bucket_id,
491 _request_id: self._request_id,
492 })
493 }
494}