aws-sdk-glue 1.147.0

AWS SDK for AWS Glue
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents a collection of related data organized in columns and rows.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Table {
    /// <p>The table name. For Hive compatibility, this must be entirely lowercase.</p>
    pub name: ::std::string::String,
    /// <p>The name of the database where the table metadata resides. For Hive compatibility, this must be all lowercase.</p>
    pub database_name: ::std::option::Option<::std::string::String>,
    /// <p>A description of the table.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The owner of the table.</p>
    pub owner: ::std::option::Option<::std::string::String>,
    /// <p>The time when the table definition was created in the Data Catalog.</p>
    pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The last time that the table was updated.</p>
    pub update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The last time that the table was accessed. This is usually taken from HDFS, and might not be reliable.</p>
    pub last_access_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The last time that column statistics were computed for this table.</p>
    pub last_analyzed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The retention time for this table.</p>
    pub retention: i32,
    /// <p>A storage descriptor containing information about the physical storage of this table.</p>
    pub storage_descriptor: ::std::option::Option<crate::types::StorageDescriptor>,
    /// <p>A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.</p>
    /// <p>When you create a table used by Amazon Athena, and you do not specify any <code>partitionKeys</code>, you must at least set the value of <code>partitionKeys</code> to an empty list. For example:</p>
    /// <p><code>"PartitionKeys": \[\]</code></p>
    pub partition_keys: ::std::option::Option<::std::vec::Vec<crate::types::Column>>,
    /// <p>Included for Apache Hive compatibility. Not used in the normal course of Glue operations. If the table is a <code>VIRTUAL_VIEW</code>, certain Athena configuration encoded in base64.</p>
    pub view_original_text: ::std::option::Option<::std::string::String>,
    /// <p>Included for Apache Hive compatibility. Not used in the normal course of Glue operations.</p>
    pub view_expanded_text: ::std::option::Option<::std::string::String>,
    /// <p>The type of this table. Glue will create tables with the <code>EXTERNAL_TABLE</code> type. Other services, such as Athena, may create tables with additional table types.</p>
    /// <p>Glue related table types:</p>
    /// <dl>
    /// <dt>
    /// EXTERNAL_TABLE
    /// </dt>
    /// <dd>
    /// <p>Hive compatible attribute - indicates a non-Hive managed table.</p>
    /// </dd>
    /// <dt>
    /// GOVERNED
    /// </dt>
    /// <dd>
    /// <p>Used by Lake Formation. The Glue Data Catalog understands <code>GOVERNED</code>.</p>
    /// </dd>
    /// </dl>
    pub table_type: ::std::option::Option<::std::string::String>,
    /// <p>These key-value pairs define properties associated with the table.</p>
    pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The person or entity who created the table.</p>
    pub created_by: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether the table has been registered with Lake Formation.</p>
    pub is_registered_with_lake_formation: bool,
    /// <p>A <code>TableIdentifier</code> structure that describes a target table for resource linking.</p>
    pub target_table: ::std::option::Option<crate::types::TableIdentifier>,
    /// <p>The ID of the Data Catalog in which the table resides.</p>
    pub catalog_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the table version.</p>
    pub version_id: ::std::option::Option<::std::string::String>,
    /// <p>A <code>FederatedTable</code> structure that references an entity outside the Glue Data Catalog.</p>
    pub federated_table: ::std::option::Option<crate::types::FederatedTable>,
    /// <p>A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.</p>
    pub view_definition: ::std::option::Option<crate::types::ViewDefinition>,
    /// <p>Specifies whether the view supports the SQL dialects of one or more different query engines and can therefore be read by those engines.</p>
    pub is_multi_dialect_view: ::std::option::Option<bool>,
    /// <p>Indicates a table is a <code>MaterializedView</code>.</p>
    pub is_materialized_view: ::std::option::Option<bool>,
    /// <p>Indicates the the state of an asynchronous change to a table.</p>
    pub status: ::std::option::Option<crate::types::TableStatus>,
}
impl Table {
    /// <p>The table name. For Hive compatibility, this must be entirely lowercase.</p>
    pub fn name(&self) -> &str {
        use std::ops::Deref;
        self.name.deref()
    }
    /// <p>The name of the database where the table metadata resides. For Hive compatibility, this must be all lowercase.</p>
    pub fn database_name(&self) -> ::std::option::Option<&str> {
        self.database_name.as_deref()
    }
    /// <p>A description of the table.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The owner of the table.</p>
    pub fn owner(&self) -> ::std::option::Option<&str> {
        self.owner.as_deref()
    }
    /// <p>The time when the table definition was created in the Data Catalog.</p>
    pub fn create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
    /// <p>The last time that the table was updated.</p>
    pub fn update_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.update_time.as_ref()
    }
    /// <p>The last time that the table was accessed. This is usually taken from HDFS, and might not be reliable.</p>
    pub fn last_access_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_access_time.as_ref()
    }
    /// <p>The last time that column statistics were computed for this table.</p>
    pub fn last_analyzed_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_analyzed_time.as_ref()
    }
    /// <p>The retention time for this table.</p>
    pub fn retention(&self) -> i32 {
        self.retention
    }
    /// <p>A storage descriptor containing information about the physical storage of this table.</p>
    pub fn storage_descriptor(&self) -> ::std::option::Option<&crate::types::StorageDescriptor> {
        self.storage_descriptor.as_ref()
    }
    /// <p>A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.</p>
    /// <p>When you create a table used by Amazon Athena, and you do not specify any <code>partitionKeys</code>, you must at least set the value of <code>partitionKeys</code> to an empty list. For example:</p>
    /// <p><code>"PartitionKeys": \[\]</code></p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.partition_keys.is_none()`.
    pub fn partition_keys(&self) -> &[crate::types::Column] {
        self.partition_keys.as_deref().unwrap_or_default()
    }
    /// <p>Included for Apache Hive compatibility. Not used in the normal course of Glue operations. If the table is a <code>VIRTUAL_VIEW</code>, certain Athena configuration encoded in base64.</p>
    pub fn view_original_text(&self) -> ::std::option::Option<&str> {
        self.view_original_text.as_deref()
    }
    /// <p>Included for Apache Hive compatibility. Not used in the normal course of Glue operations.</p>
    pub fn view_expanded_text(&self) -> ::std::option::Option<&str> {
        self.view_expanded_text.as_deref()
    }
    /// <p>The type of this table. Glue will create tables with the <code>EXTERNAL_TABLE</code> type. Other services, such as Athena, may create tables with additional table types.</p>
    /// <p>Glue related table types:</p>
    /// <dl>
    /// <dt>
    /// EXTERNAL_TABLE
    /// </dt>
    /// <dd>
    /// <p>Hive compatible attribute - indicates a non-Hive managed table.</p>
    /// </dd>
    /// <dt>
    /// GOVERNED
    /// </dt>
    /// <dd>
    /// <p>Used by Lake Formation. The Glue Data Catalog understands <code>GOVERNED</code>.</p>
    /// </dd>
    /// </dl>
    pub fn table_type(&self) -> ::std::option::Option<&str> {
        self.table_type.as_deref()
    }
    /// <p>These key-value pairs define properties associated with the table.</p>
    pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.parameters.as_ref()
    }
    /// <p>The person or entity who created the table.</p>
    pub fn created_by(&self) -> ::std::option::Option<&str> {
        self.created_by.as_deref()
    }
    /// <p>Indicates whether the table has been registered with Lake Formation.</p>
    pub fn is_registered_with_lake_formation(&self) -> bool {
        self.is_registered_with_lake_formation
    }
    /// <p>A <code>TableIdentifier</code> structure that describes a target table for resource linking.</p>
    pub fn target_table(&self) -> ::std::option::Option<&crate::types::TableIdentifier> {
        self.target_table.as_ref()
    }
    /// <p>The ID of the Data Catalog in which the table resides.</p>
    pub fn catalog_id(&self) -> ::std::option::Option<&str> {
        self.catalog_id.as_deref()
    }
    /// <p>The ID of the table version.</p>
    pub fn version_id(&self) -> ::std::option::Option<&str> {
        self.version_id.as_deref()
    }
    /// <p>A <code>FederatedTable</code> structure that references an entity outside the Glue Data Catalog.</p>
    pub fn federated_table(&self) -> ::std::option::Option<&crate::types::FederatedTable> {
        self.federated_table.as_ref()
    }
    /// <p>A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.</p>
    pub fn view_definition(&self) -> ::std::option::Option<&crate::types::ViewDefinition> {
        self.view_definition.as_ref()
    }
    /// <p>Specifies whether the view supports the SQL dialects of one or more different query engines and can therefore be read by those engines.</p>
    pub fn is_multi_dialect_view(&self) -> ::std::option::Option<bool> {
        self.is_multi_dialect_view
    }
    /// <p>Indicates a table is a <code>MaterializedView</code>.</p>
    pub fn is_materialized_view(&self) -> ::std::option::Option<bool> {
        self.is_materialized_view
    }
    /// <p>Indicates the the state of an asynchronous change to a table.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::TableStatus> {
        self.status.as_ref()
    }
}
impl Table {
    /// Creates a new builder-style object to manufacture [`Table`](crate::types::Table).
    pub fn builder() -> crate::types::builders::TableBuilder {
        crate::types::builders::TableBuilder::default()
    }
}

/// A builder for [`Table`](crate::types::Table).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TableBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) database_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) owner: ::std::option::Option<::std::string::String>,
    pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_access_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_analyzed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) retention: ::std::option::Option<i32>,
    pub(crate) storage_descriptor: ::std::option::Option<crate::types::StorageDescriptor>,
    pub(crate) partition_keys: ::std::option::Option<::std::vec::Vec<crate::types::Column>>,
    pub(crate) view_original_text: ::std::option::Option<::std::string::String>,
    pub(crate) view_expanded_text: ::std::option::Option<::std::string::String>,
    pub(crate) table_type: ::std::option::Option<::std::string::String>,
    pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) created_by: ::std::option::Option<::std::string::String>,
    pub(crate) is_registered_with_lake_formation: ::std::option::Option<bool>,
    pub(crate) target_table: ::std::option::Option<crate::types::TableIdentifier>,
    pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
    pub(crate) version_id: ::std::option::Option<::std::string::String>,
    pub(crate) federated_table: ::std::option::Option<crate::types::FederatedTable>,
    pub(crate) view_definition: ::std::option::Option<crate::types::ViewDefinition>,
    pub(crate) is_multi_dialect_view: ::std::option::Option<bool>,
    pub(crate) is_materialized_view: ::std::option::Option<bool>,
    pub(crate) status: ::std::option::Option<crate::types::TableStatus>,
}
impl TableBuilder {
    /// <p>The table name. For Hive compatibility, this must be entirely lowercase.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The table name. For Hive compatibility, this must be entirely lowercase.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The table name. For Hive compatibility, this must be entirely lowercase.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The name of the database where the table metadata resides. For Hive compatibility, this must be all lowercase.</p>
    pub fn database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.database_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the database where the table metadata resides. For Hive compatibility, this must be all lowercase.</p>
    pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.database_name = input;
        self
    }
    /// <p>The name of the database where the table metadata resides. For Hive compatibility, this must be all lowercase.</p>
    pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.database_name
    }
    /// <p>A description of the table.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the table.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the table.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The owner of the table.</p>
    pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The owner of the table.</p>
    pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner = input;
        self
    }
    /// <p>The owner of the table.</p>
    pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner
    }
    /// <p>The time when the table definition was created in the Data Catalog.</p>
    pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.create_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time when the table definition was created in the Data Catalog.</p>
    pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.create_time = input;
        self
    }
    /// <p>The time when the table definition was created in the Data Catalog.</p>
    pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.create_time
    }
    /// <p>The last time that the table was updated.</p>
    pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.update_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The last time that the table was updated.</p>
    pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.update_time = input;
        self
    }
    /// <p>The last time that the table was updated.</p>
    pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.update_time
    }
    /// <p>The last time that the table was accessed. This is usually taken from HDFS, and might not be reliable.</p>
    pub fn last_access_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_access_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The last time that the table was accessed. This is usually taken from HDFS, and might not be reliable.</p>
    pub fn set_last_access_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_access_time = input;
        self
    }
    /// <p>The last time that the table was accessed. This is usually taken from HDFS, and might not be reliable.</p>
    pub fn get_last_access_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_access_time
    }
    /// <p>The last time that column statistics were computed for this table.</p>
    pub fn last_analyzed_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_analyzed_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The last time that column statistics were computed for this table.</p>
    pub fn set_last_analyzed_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_analyzed_time = input;
        self
    }
    /// <p>The last time that column statistics were computed for this table.</p>
    pub fn get_last_analyzed_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_analyzed_time
    }
    /// <p>The retention time for this table.</p>
    pub fn retention(mut self, input: i32) -> Self {
        self.retention = ::std::option::Option::Some(input);
        self
    }
    /// <p>The retention time for this table.</p>
    pub fn set_retention(mut self, input: ::std::option::Option<i32>) -> Self {
        self.retention = input;
        self
    }
    /// <p>The retention time for this table.</p>
    pub fn get_retention(&self) -> &::std::option::Option<i32> {
        &self.retention
    }
    /// <p>A storage descriptor containing information about the physical storage of this table.</p>
    pub fn storage_descriptor(mut self, input: crate::types::StorageDescriptor) -> Self {
        self.storage_descriptor = ::std::option::Option::Some(input);
        self
    }
    /// <p>A storage descriptor containing information about the physical storage of this table.</p>
    pub fn set_storage_descriptor(mut self, input: ::std::option::Option<crate::types::StorageDescriptor>) -> Self {
        self.storage_descriptor = input;
        self
    }
    /// <p>A storage descriptor containing information about the physical storage of this table.</p>
    pub fn get_storage_descriptor(&self) -> &::std::option::Option<crate::types::StorageDescriptor> {
        &self.storage_descriptor
    }
    /// Appends an item to `partition_keys`.
    ///
    /// To override the contents of this collection use [`set_partition_keys`](Self::set_partition_keys).
    ///
    /// <p>A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.</p>
    /// <p>When you create a table used by Amazon Athena, and you do not specify any <code>partitionKeys</code>, you must at least set the value of <code>partitionKeys</code> to an empty list. For example:</p>
    /// <p><code>"PartitionKeys": \[\]</code></p>
    pub fn partition_keys(mut self, input: crate::types::Column) -> Self {
        let mut v = self.partition_keys.unwrap_or_default();
        v.push(input);
        self.partition_keys = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.</p>
    /// <p>When you create a table used by Amazon Athena, and you do not specify any <code>partitionKeys</code>, you must at least set the value of <code>partitionKeys</code> to an empty list. For example:</p>
    /// <p><code>"PartitionKeys": \[\]</code></p>
    pub fn set_partition_keys(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Column>>) -> Self {
        self.partition_keys = input;
        self
    }
    /// <p>A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.</p>
    /// <p>When you create a table used by Amazon Athena, and you do not specify any <code>partitionKeys</code>, you must at least set the value of <code>partitionKeys</code> to an empty list. For example:</p>
    /// <p><code>"PartitionKeys": \[\]</code></p>
    pub fn get_partition_keys(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Column>> {
        &self.partition_keys
    }
    /// <p>Included for Apache Hive compatibility. Not used in the normal course of Glue operations. If the table is a <code>VIRTUAL_VIEW</code>, certain Athena configuration encoded in base64.</p>
    pub fn view_original_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.view_original_text = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Included for Apache Hive compatibility. Not used in the normal course of Glue operations. If the table is a <code>VIRTUAL_VIEW</code>, certain Athena configuration encoded in base64.</p>
    pub fn set_view_original_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.view_original_text = input;
        self
    }
    /// <p>Included for Apache Hive compatibility. Not used in the normal course of Glue operations. If the table is a <code>VIRTUAL_VIEW</code>, certain Athena configuration encoded in base64.</p>
    pub fn get_view_original_text(&self) -> &::std::option::Option<::std::string::String> {
        &self.view_original_text
    }
    /// <p>Included for Apache Hive compatibility. Not used in the normal course of Glue operations.</p>
    pub fn view_expanded_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.view_expanded_text = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Included for Apache Hive compatibility. Not used in the normal course of Glue operations.</p>
    pub fn set_view_expanded_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.view_expanded_text = input;
        self
    }
    /// <p>Included for Apache Hive compatibility. Not used in the normal course of Glue operations.</p>
    pub fn get_view_expanded_text(&self) -> &::std::option::Option<::std::string::String> {
        &self.view_expanded_text
    }
    /// <p>The type of this table. Glue will create tables with the <code>EXTERNAL_TABLE</code> type. Other services, such as Athena, may create tables with additional table types.</p>
    /// <p>Glue related table types:</p>
    /// <dl>
    /// <dt>
    /// EXTERNAL_TABLE
    /// </dt>
    /// <dd>
    /// <p>Hive compatible attribute - indicates a non-Hive managed table.</p>
    /// </dd>
    /// <dt>
    /// GOVERNED
    /// </dt>
    /// <dd>
    /// <p>Used by Lake Formation. The Glue Data Catalog understands <code>GOVERNED</code>.</p>
    /// </dd>
    /// </dl>
    pub fn table_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.table_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of this table. Glue will create tables with the <code>EXTERNAL_TABLE</code> type. Other services, such as Athena, may create tables with additional table types.</p>
    /// <p>Glue related table types:</p>
    /// <dl>
    /// <dt>
    /// EXTERNAL_TABLE
    /// </dt>
    /// <dd>
    /// <p>Hive compatible attribute - indicates a non-Hive managed table.</p>
    /// </dd>
    /// <dt>
    /// GOVERNED
    /// </dt>
    /// <dd>
    /// <p>Used by Lake Formation. The Glue Data Catalog understands <code>GOVERNED</code>.</p>
    /// </dd>
    /// </dl>
    pub fn set_table_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.table_type = input;
        self
    }
    /// <p>The type of this table. Glue will create tables with the <code>EXTERNAL_TABLE</code> type. Other services, such as Athena, may create tables with additional table types.</p>
    /// <p>Glue related table types:</p>
    /// <dl>
    /// <dt>
    /// EXTERNAL_TABLE
    /// </dt>
    /// <dd>
    /// <p>Hive compatible attribute - indicates a non-Hive managed table.</p>
    /// </dd>
    /// <dt>
    /// GOVERNED
    /// </dt>
    /// <dd>
    /// <p>Used by Lake Formation. The Glue Data Catalog understands <code>GOVERNED</code>.</p>
    /// </dd>
    /// </dl>
    pub fn get_table_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.table_type
    }
    /// Adds a key-value pair to `parameters`.
    ///
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
    ///
    /// <p>These key-value pairs define properties associated with the table.</p>
    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.parameters.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.parameters = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>These key-value pairs define properties associated with the table.</p>
    pub fn set_parameters(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.parameters = input;
        self
    }
    /// <p>These key-value pairs define properties associated with the table.</p>
    pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.parameters
    }
    /// <p>The person or entity who created the table.</p>
    pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.created_by = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The person or entity who created the table.</p>
    pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.created_by = input;
        self
    }
    /// <p>The person or entity who created the table.</p>
    pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
        &self.created_by
    }
    /// <p>Indicates whether the table has been registered with Lake Formation.</p>
    pub fn is_registered_with_lake_formation(mut self, input: bool) -> Self {
        self.is_registered_with_lake_formation = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the table has been registered with Lake Formation.</p>
    pub fn set_is_registered_with_lake_formation(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_registered_with_lake_formation = input;
        self
    }
    /// <p>Indicates whether the table has been registered with Lake Formation.</p>
    pub fn get_is_registered_with_lake_formation(&self) -> &::std::option::Option<bool> {
        &self.is_registered_with_lake_formation
    }
    /// <p>A <code>TableIdentifier</code> structure that describes a target table for resource linking.</p>
    pub fn target_table(mut self, input: crate::types::TableIdentifier) -> Self {
        self.target_table = ::std::option::Option::Some(input);
        self
    }
    /// <p>A <code>TableIdentifier</code> structure that describes a target table for resource linking.</p>
    pub fn set_target_table(mut self, input: ::std::option::Option<crate::types::TableIdentifier>) -> Self {
        self.target_table = input;
        self
    }
    /// <p>A <code>TableIdentifier</code> structure that describes a target table for resource linking.</p>
    pub fn get_target_table(&self) -> &::std::option::Option<crate::types::TableIdentifier> {
        &self.target_table
    }
    /// <p>The ID of the Data Catalog in which the table resides.</p>
    pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.catalog_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Data Catalog in which the table resides.</p>
    pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.catalog_id = input;
        self
    }
    /// <p>The ID of the Data Catalog in which the table resides.</p>
    pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.catalog_id
    }
    /// <p>The ID of the table version.</p>
    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the table version.</p>
    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version_id = input;
        self
    }
    /// <p>The ID of the table version.</p>
    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.version_id
    }
    /// <p>A <code>FederatedTable</code> structure that references an entity outside the Glue Data Catalog.</p>
    pub fn federated_table(mut self, input: crate::types::FederatedTable) -> Self {
        self.federated_table = ::std::option::Option::Some(input);
        self
    }
    /// <p>A <code>FederatedTable</code> structure that references an entity outside the Glue Data Catalog.</p>
    pub fn set_federated_table(mut self, input: ::std::option::Option<crate::types::FederatedTable>) -> Self {
        self.federated_table = input;
        self
    }
    /// <p>A <code>FederatedTable</code> structure that references an entity outside the Glue Data Catalog.</p>
    pub fn get_federated_table(&self) -> &::std::option::Option<crate::types::FederatedTable> {
        &self.federated_table
    }
    /// <p>A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.</p>
    pub fn view_definition(mut self, input: crate::types::ViewDefinition) -> Self {
        self.view_definition = ::std::option::Option::Some(input);
        self
    }
    /// <p>A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.</p>
    pub fn set_view_definition(mut self, input: ::std::option::Option<crate::types::ViewDefinition>) -> Self {
        self.view_definition = input;
        self
    }
    /// <p>A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.</p>
    pub fn get_view_definition(&self) -> &::std::option::Option<crate::types::ViewDefinition> {
        &self.view_definition
    }
    /// <p>Specifies whether the view supports the SQL dialects of one or more different query engines and can therefore be read by those engines.</p>
    pub fn is_multi_dialect_view(mut self, input: bool) -> Self {
        self.is_multi_dialect_view = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether the view supports the SQL dialects of one or more different query engines and can therefore be read by those engines.</p>
    pub fn set_is_multi_dialect_view(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_multi_dialect_view = input;
        self
    }
    /// <p>Specifies whether the view supports the SQL dialects of one or more different query engines and can therefore be read by those engines.</p>
    pub fn get_is_multi_dialect_view(&self) -> &::std::option::Option<bool> {
        &self.is_multi_dialect_view
    }
    /// <p>Indicates a table is a <code>MaterializedView</code>.</p>
    pub fn is_materialized_view(mut self, input: bool) -> Self {
        self.is_materialized_view = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates a table is a <code>MaterializedView</code>.</p>
    pub fn set_is_materialized_view(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_materialized_view = input;
        self
    }
    /// <p>Indicates a table is a <code>MaterializedView</code>.</p>
    pub fn get_is_materialized_view(&self) -> &::std::option::Option<bool> {
        &self.is_materialized_view
    }
    /// <p>Indicates the the state of an asynchronous change to a table.</p>
    pub fn status(mut self, input: crate::types::TableStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates the the state of an asynchronous change to a table.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::TableStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>Indicates the the state of an asynchronous change to a table.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::TableStatus> {
        &self.status
    }
    /// Consumes the builder and constructs a [`Table`](crate::types::Table).
    /// This method will fail if any of the following fields are not set:
    /// - [`name`](crate::types::builders::TableBuilder::name)
    pub fn build(self) -> ::std::result::Result<crate::types::Table, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Table {
            name: self.name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "name",
                    "name was not specified but it is required when building Table",
                )
            })?,
            database_name: self.database_name,
            description: self.description,
            owner: self.owner,
            create_time: self.create_time,
            update_time: self.update_time,
            last_access_time: self.last_access_time,
            last_analyzed_time: self.last_analyzed_time,
            retention: self.retention.unwrap_or_default(),
            storage_descriptor: self.storage_descriptor,
            partition_keys: self.partition_keys,
            view_original_text: self.view_original_text,
            view_expanded_text: self.view_expanded_text,
            table_type: self.table_type,
            parameters: self.parameters,
            created_by: self.created_by,
            is_registered_with_lake_formation: self.is_registered_with_lake_formation.unwrap_or_default(),
            target_table: self.target_table,
            catalog_id: self.catalog_id,
            version_id: self.version_id,
            federated_table: self.federated_table,
            view_definition: self.view_definition,
            is_multi_dialect_view: self.is_multi_dialect_view,
            is_materialized_view: self.is_materialized_view,
            status: self.status,
        })
    }
}