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 pub managed_table_information: ::std::option::Option<crate::types::ManagedTableInformation>,
40 _request_id: Option<String>,
41}
42impl GetTableOutput {
43 pub fn name(&self) -> &str {
45 use std::ops::Deref;
46 self.name.deref()
47 }
48 pub fn r#type(&self) -> &crate::types::TableType {
50 &self.r#type
51 }
52 pub fn table_arn(&self) -> &str {
54 use std::ops::Deref;
55 self.table_arn.deref()
56 }
57 pub fn namespace(&self) -> &[::std::string::String] {
59 use std::ops::Deref;
60 self.namespace.deref()
61 }
62 pub fn namespace_id(&self) -> ::std::option::Option<&str> {
64 self.namespace_id.as_deref()
65 }
66 pub fn version_token(&self) -> &str {
68 use std::ops::Deref;
69 self.version_token.deref()
70 }
71 pub fn metadata_location(&self) -> ::std::option::Option<&str> {
73 self.metadata_location.as_deref()
74 }
75 pub fn warehouse_location(&self) -> &str {
77 use std::ops::Deref;
78 self.warehouse_location.deref()
79 }
80 pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
82 &self.created_at
83 }
84 pub fn created_by(&self) -> &str {
86 use std::ops::Deref;
87 self.created_by.deref()
88 }
89 pub fn managed_by_service(&self) -> ::std::option::Option<&str> {
91 self.managed_by_service.as_deref()
92 }
93 pub fn modified_at(&self) -> &::aws_smithy_types::DateTime {
95 &self.modified_at
96 }
97 pub fn modified_by(&self) -> &str {
99 use std::ops::Deref;
100 self.modified_by.deref()
101 }
102 pub fn owner_account_id(&self) -> &str {
104 use std::ops::Deref;
105 self.owner_account_id.deref()
106 }
107 pub fn format(&self) -> &crate::types::OpenTableFormat {
109 &self.format
110 }
111 pub fn table_bucket_id(&self) -> ::std::option::Option<&str> {
113 self.table_bucket_id.as_deref()
114 }
115 pub fn managed_table_information(&self) -> ::std::option::Option<&crate::types::ManagedTableInformation> {
117 self.managed_table_information.as_ref()
118 }
119}
120impl ::aws_types::request_id::RequestId for GetTableOutput {
121 fn request_id(&self) -> Option<&str> {
122 self._request_id.as_deref()
123 }
124}
125impl GetTableOutput {
126 pub fn builder() -> crate::operation::get_table::builders::GetTableOutputBuilder {
128 crate::operation::get_table::builders::GetTableOutputBuilder::default()
129 }
130}
131
132#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
134#[non_exhaustive]
135pub struct GetTableOutputBuilder {
136 pub(crate) name: ::std::option::Option<::std::string::String>,
137 pub(crate) r#type: ::std::option::Option<crate::types::TableType>,
138 pub(crate) table_arn: ::std::option::Option<::std::string::String>,
139 pub(crate) namespace: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
140 pub(crate) namespace_id: ::std::option::Option<::std::string::String>,
141 pub(crate) version_token: ::std::option::Option<::std::string::String>,
142 pub(crate) metadata_location: ::std::option::Option<::std::string::String>,
143 pub(crate) warehouse_location: ::std::option::Option<::std::string::String>,
144 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
145 pub(crate) created_by: ::std::option::Option<::std::string::String>,
146 pub(crate) managed_by_service: ::std::option::Option<::std::string::String>,
147 pub(crate) modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
148 pub(crate) modified_by: ::std::option::Option<::std::string::String>,
149 pub(crate) owner_account_id: ::std::option::Option<::std::string::String>,
150 pub(crate) format: ::std::option::Option<crate::types::OpenTableFormat>,
151 pub(crate) table_bucket_id: ::std::option::Option<::std::string::String>,
152 pub(crate) managed_table_information: ::std::option::Option<crate::types::ManagedTableInformation>,
153 _request_id: Option<String>,
154}
155impl GetTableOutputBuilder {
156 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159 self.name = ::std::option::Option::Some(input.into());
160 self
161 }
162 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.name = input;
165 self
166 }
167 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
169 &self.name
170 }
171 pub fn r#type(mut self, input: crate::types::TableType) -> Self {
174 self.r#type = ::std::option::Option::Some(input);
175 self
176 }
177 pub fn set_type(mut self, input: ::std::option::Option<crate::types::TableType>) -> Self {
179 self.r#type = input;
180 self
181 }
182 pub fn get_type(&self) -> &::std::option::Option<crate::types::TableType> {
184 &self.r#type
185 }
186 pub fn table_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189 self.table_arn = ::std::option::Option::Some(input.into());
190 self
191 }
192 pub fn set_table_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194 self.table_arn = input;
195 self
196 }
197 pub fn get_table_arn(&self) -> &::std::option::Option<::std::string::String> {
199 &self.table_arn
200 }
201 pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207 let mut v = self.namespace.unwrap_or_default();
208 v.push(input.into());
209 self.namespace = ::std::option::Option::Some(v);
210 self
211 }
212 pub fn set_namespace(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
214 self.namespace = input;
215 self
216 }
217 pub fn get_namespace(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
219 &self.namespace
220 }
221 pub fn namespace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223 self.namespace_id = ::std::option::Option::Some(input.into());
224 self
225 }
226 pub fn set_namespace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228 self.namespace_id = input;
229 self
230 }
231 pub fn get_namespace_id(&self) -> &::std::option::Option<::std::string::String> {
233 &self.namespace_id
234 }
235 pub fn version_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
238 self.version_token = ::std::option::Option::Some(input.into());
239 self
240 }
241 pub fn set_version_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
243 self.version_token = input;
244 self
245 }
246 pub fn get_version_token(&self) -> &::std::option::Option<::std::string::String> {
248 &self.version_token
249 }
250 pub fn metadata_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
252 self.metadata_location = ::std::option::Option::Some(input.into());
253 self
254 }
255 pub fn set_metadata_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
257 self.metadata_location = input;
258 self
259 }
260 pub fn get_metadata_location(&self) -> &::std::option::Option<::std::string::String> {
262 &self.metadata_location
263 }
264 pub fn warehouse_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
267 self.warehouse_location = ::std::option::Option::Some(input.into());
268 self
269 }
270 pub fn set_warehouse_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272 self.warehouse_location = input;
273 self
274 }
275 pub fn get_warehouse_location(&self) -> &::std::option::Option<::std::string::String> {
277 &self.warehouse_location
278 }
279 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
282 self.created_at = ::std::option::Option::Some(input);
283 self
284 }
285 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
287 self.created_at = input;
288 self
289 }
290 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
292 &self.created_at
293 }
294 pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
297 self.created_by = ::std::option::Option::Some(input.into());
298 self
299 }
300 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
302 self.created_by = input;
303 self
304 }
305 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
307 &self.created_by
308 }
309 pub fn managed_by_service(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
311 self.managed_by_service = ::std::option::Option::Some(input.into());
312 self
313 }
314 pub fn set_managed_by_service(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
316 self.managed_by_service = input;
317 self
318 }
319 pub fn get_managed_by_service(&self) -> &::std::option::Option<::std::string::String> {
321 &self.managed_by_service
322 }
323 pub fn modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
326 self.modified_at = ::std::option::Option::Some(input);
327 self
328 }
329 pub fn set_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
331 self.modified_at = input;
332 self
333 }
334 pub fn get_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
336 &self.modified_at
337 }
338 pub fn modified_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
341 self.modified_by = ::std::option::Option::Some(input.into());
342 self
343 }
344 pub fn set_modified_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
346 self.modified_by = input;
347 self
348 }
349 pub fn get_modified_by(&self) -> &::std::option::Option<::std::string::String> {
351 &self.modified_by
352 }
353 pub fn owner_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
356 self.owner_account_id = ::std::option::Option::Some(input.into());
357 self
358 }
359 pub fn set_owner_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
361 self.owner_account_id = input;
362 self
363 }
364 pub fn get_owner_account_id(&self) -> &::std::option::Option<::std::string::String> {
366 &self.owner_account_id
367 }
368 pub fn format(mut self, input: crate::types::OpenTableFormat) -> Self {
371 self.format = ::std::option::Option::Some(input);
372 self
373 }
374 pub fn set_format(mut self, input: ::std::option::Option<crate::types::OpenTableFormat>) -> Self {
376 self.format = input;
377 self
378 }
379 pub fn get_format(&self) -> &::std::option::Option<crate::types::OpenTableFormat> {
381 &self.format
382 }
383 pub fn table_bucket_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
385 self.table_bucket_id = ::std::option::Option::Some(input.into());
386 self
387 }
388 pub fn set_table_bucket_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
390 self.table_bucket_id = input;
391 self
392 }
393 pub fn get_table_bucket_id(&self) -> &::std::option::Option<::std::string::String> {
395 &self.table_bucket_id
396 }
397 pub fn managed_table_information(mut self, input: crate::types::ManagedTableInformation) -> Self {
399 self.managed_table_information = ::std::option::Option::Some(input);
400 self
401 }
402 pub fn set_managed_table_information(mut self, input: ::std::option::Option<crate::types::ManagedTableInformation>) -> Self {
404 self.managed_table_information = input;
405 self
406 }
407 pub fn get_managed_table_information(&self) -> &::std::option::Option<crate::types::ManagedTableInformation> {
409 &self.managed_table_information
410 }
411 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
412 self._request_id = Some(request_id.into());
413 self
414 }
415
416 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
417 self._request_id = request_id;
418 self
419 }
420 pub fn build(self) -> ::std::result::Result<crate::operation::get_table::GetTableOutput, ::aws_smithy_types::error::operation::BuildError> {
435 ::std::result::Result::Ok(crate::operation::get_table::GetTableOutput {
436 name: self.name.ok_or_else(|| {
437 ::aws_smithy_types::error::operation::BuildError::missing_field(
438 "name",
439 "name was not specified but it is required when building GetTableOutput",
440 )
441 })?,
442 r#type: self.r#type.ok_or_else(|| {
443 ::aws_smithy_types::error::operation::BuildError::missing_field(
444 "r#type",
445 "r#type was not specified but it is required when building GetTableOutput",
446 )
447 })?,
448 table_arn: self.table_arn.ok_or_else(|| {
449 ::aws_smithy_types::error::operation::BuildError::missing_field(
450 "table_arn",
451 "table_arn was not specified but it is required when building GetTableOutput",
452 )
453 })?,
454 namespace: self.namespace.ok_or_else(|| {
455 ::aws_smithy_types::error::operation::BuildError::missing_field(
456 "namespace",
457 "namespace was not specified but it is required when building GetTableOutput",
458 )
459 })?,
460 namespace_id: self.namespace_id,
461 version_token: self.version_token.ok_or_else(|| {
462 ::aws_smithy_types::error::operation::BuildError::missing_field(
463 "version_token",
464 "version_token was not specified but it is required when building GetTableOutput",
465 )
466 })?,
467 metadata_location: self.metadata_location,
468 warehouse_location: self.warehouse_location.ok_or_else(|| {
469 ::aws_smithy_types::error::operation::BuildError::missing_field(
470 "warehouse_location",
471 "warehouse_location was not specified but it is required when building GetTableOutput",
472 )
473 })?,
474 created_at: self.created_at.ok_or_else(|| {
475 ::aws_smithy_types::error::operation::BuildError::missing_field(
476 "created_at",
477 "created_at was not specified but it is required when building GetTableOutput",
478 )
479 })?,
480 created_by: self.created_by.ok_or_else(|| {
481 ::aws_smithy_types::error::operation::BuildError::missing_field(
482 "created_by",
483 "created_by was not specified but it is required when building GetTableOutput",
484 )
485 })?,
486 managed_by_service: self.managed_by_service,
487 modified_at: self.modified_at.ok_or_else(|| {
488 ::aws_smithy_types::error::operation::BuildError::missing_field(
489 "modified_at",
490 "modified_at was not specified but it is required when building GetTableOutput",
491 )
492 })?,
493 modified_by: self.modified_by.ok_or_else(|| {
494 ::aws_smithy_types::error::operation::BuildError::missing_field(
495 "modified_by",
496 "modified_by was not specified but it is required when building GetTableOutput",
497 )
498 })?,
499 owner_account_id: self.owner_account_id.ok_or_else(|| {
500 ::aws_smithy_types::error::operation::BuildError::missing_field(
501 "owner_account_id",
502 "owner_account_id was not specified but it is required when building GetTableOutput",
503 )
504 })?,
505 format: self.format.ok_or_else(|| {
506 ::aws_smithy_types::error::operation::BuildError::missing_field(
507 "format",
508 "format was not specified but it is required when building GetTableOutput",
509 )
510 })?,
511 table_bucket_id: self.table_bucket_id,
512 managed_table_information: self.managed_table_information,
513 _request_id: self._request_id,
514 })
515 }
516}