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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_table::_create_table_output::CreateTableOutputBuilder;

pub use crate::operation::create_table::_create_table_input::CreateTableInputBuilder;

impl crate::operation::create_table::builders::CreateTableInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::create_table::CreateTableOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_table::CreateTableError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_table();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateTable`.
///
/// <p>The <code>CreateTable</code> operation adds a new table to your account. In an Amazon Web Services account, table names must be unique within each Region. That is, you can have two tables with same name if you create the tables in different Regions.</p>
/// <p><code>CreateTable</code> is an asynchronous operation. Upon receiving a <code>CreateTable</code> request, DynamoDB immediately returns a response with a <code>TableStatus</code> of <code>CREATING</code>. After the table is created, DynamoDB sets the <code>TableStatus</code> to <code>ACTIVE</code>. You can perform read and write operations only on an <code>ACTIVE</code> table.</p>
/// <p>You can optionally define secondary indexes on the new table, as part of the <code>CreateTable</code> operation. If you want to create multiple tables with secondary indexes on them, you must create the tables sequentially. Only one table with secondary indexes can be in the <code>CREATING</code> state at any given time.</p>
/// <p>You can use the <code>DescribeTable</code> action to check the table status.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateTableFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_table::builders::CreateTableInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_table::CreateTableOutput,
        crate::operation::create_table::CreateTableError,
    > for CreateTableFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_table::CreateTableOutput,
            crate::operation::create_table::CreateTableError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateTableFluentBuilder {
    /// Creates a new `CreateTableFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the CreateTable as a reference.
    pub fn as_input(&self) -> &crate::operation::create_table::builders::CreateTableInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_table::CreateTableOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_table::CreateTableError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::create_table::CreateTable::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_table::CreateTable::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::create_table::CreateTableOutput,
        crate::operation::create_table::CreateTableError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    ///
    /// Appends an item to `AttributeDefinitions`.
    ///
    /// To override the contents of this collection use [`set_attribute_definitions`](Self::set_attribute_definitions).
    ///
    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
    pub fn attribute_definitions(mut self, input: crate::types::AttributeDefinition) -> Self {
        self.inner = self.inner.attribute_definitions(input);
        self
    }
    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
    pub fn set_attribute_definitions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AttributeDefinition>>) -> Self {
        self.inner = self.inner.set_attribute_definitions(input);
        self
    }
    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
    pub fn get_attribute_definitions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AttributeDefinition>> {
        self.inner.get_attribute_definitions()
    }
    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.table_name(input.into());
        self
    }
    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_table_name(input);
        self
    }
    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_table_name()
    }
    ///
    /// Appends an item to `KeySchema`.
    ///
    /// To override the contents of this collection use [`set_key_schema`](Self::set_key_schema).
    ///
    /// <p>Specifies the attributes that make up the primary key for a table or an index. The attributes in <code>KeySchema</code> must also be defined in the <code>AttributeDefinitions</code> array. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html">Data Model</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
    /// <ul>
    /// <li>
    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
    /// <li>
    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
    /// <ul>
    /// <li>
    /// <p><code>HASH</code> - partition key</p></li>
    /// <li>
    /// <p><code>RANGE</code> - sort key</p></li>
    /// </ul></li>
    /// </ul><note>
    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from the DynamoDB usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
    /// </note>
    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
    /// <p>For a composite primary key (partition key and sort key), you must provide exactly two elements, in this order: The first element must have a <code>KeyType</code> of <code>HASH</code>, and the second element must have a <code>KeyType</code> of <code>RANGE</code>.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key">Working with Tables</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
    pub fn key_schema(mut self, input: crate::types::KeySchemaElement) -> Self {
        self.inner = self.inner.key_schema(input);
        self
    }
    /// <p>Specifies the attributes that make up the primary key for a table or an index. The attributes in <code>KeySchema</code> must also be defined in the <code>AttributeDefinitions</code> array. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html">Data Model</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
    /// <ul>
    /// <li>
    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
    /// <li>
    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
    /// <ul>
    /// <li>
    /// <p><code>HASH</code> - partition key</p></li>
    /// <li>
    /// <p><code>RANGE</code> - sort key</p></li>
    /// </ul></li>
    /// </ul><note>
    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from the DynamoDB usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
    /// </note>
    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
    /// <p>For a composite primary key (partition key and sort key), you must provide exactly two elements, in this order: The first element must have a <code>KeyType</code> of <code>HASH</code>, and the second element must have a <code>KeyType</code> of <code>RANGE</code>.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key">Working with Tables</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
    pub fn set_key_schema(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>) -> Self {
        self.inner = self.inner.set_key_schema(input);
        self
    }
    /// <p>Specifies the attributes that make up the primary key for a table or an index. The attributes in <code>KeySchema</code> must also be defined in the <code>AttributeDefinitions</code> array. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html">Data Model</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
    /// <ul>
    /// <li>
    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
    /// <li>
    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
    /// <ul>
    /// <li>
    /// <p><code>HASH</code> - partition key</p></li>
    /// <li>
    /// <p><code>RANGE</code> - sort key</p></li>
    /// </ul></li>
    /// </ul><note>
    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from the DynamoDB usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
    /// </note>
    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
    /// <p>For a composite primary key (partition key and sort key), you must provide exactly two elements, in this order: The first element must have a <code>KeyType</code> of <code>HASH</code>, and the second element must have a <code>KeyType</code> of <code>RANGE</code>.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key">Working with Tables</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
    pub fn get_key_schema(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>> {
        self.inner.get_key_schema()
    }
    ///
    /// Appends an item to `LocalSecondaryIndexes`.
    ///
    /// To override the contents of this collection use [`set_local_secondary_indexes`](Self::set_local_secondary_indexes).
    ///
    /// <p>One or more local secondary indexes (the maximum is 5) to be created on the table. Each index is scoped to a given partition key value. There is a 10 GB size limit per partition key value; otherwise, the size of a local secondary index is unconstrained.</p>
    /// <p>Each local secondary index in the array includes the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
    /// <p></p></li>
    /// <li>
    /// <p><code>KeySchema</code> - Specifies the key schema for the local secondary index. The key schema must begin with the same partition key as the table.</p></li>
    /// <li>
    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p>
    /// <ul>
    /// <li>
    /// <p><code>ProjectionType</code> - One of the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
    /// <li>
    /// <p><code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p></li>
    /// <li>
    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p></li>
    /// </ul></li>
    /// </ul>
    pub fn local_secondary_indexes(mut self, input: crate::types::LocalSecondaryIndex) -> Self {
        self.inner = self.inner.local_secondary_indexes(input);
        self
    }
    /// <p>One or more local secondary indexes (the maximum is 5) to be created on the table. Each index is scoped to a given partition key value. There is a 10 GB size limit per partition key value; otherwise, the size of a local secondary index is unconstrained.</p>
    /// <p>Each local secondary index in the array includes the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
    /// <p></p></li>
    /// <li>
    /// <p><code>KeySchema</code> - Specifies the key schema for the local secondary index. The key schema must begin with the same partition key as the table.</p></li>
    /// <li>
    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p>
    /// <ul>
    /// <li>
    /// <p><code>ProjectionType</code> - One of the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
    /// <li>
    /// <p><code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p></li>
    /// <li>
    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p></li>
    /// </ul></li>
    /// </ul>
    pub fn set_local_secondary_indexes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LocalSecondaryIndex>>) -> Self {
        self.inner = self.inner.set_local_secondary_indexes(input);
        self
    }
    /// <p>One or more local secondary indexes (the maximum is 5) to be created on the table. Each index is scoped to a given partition key value. There is a 10 GB size limit per partition key value; otherwise, the size of a local secondary index is unconstrained.</p>
    /// <p>Each local secondary index in the array includes the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
    /// <p></p></li>
    /// <li>
    /// <p><code>KeySchema</code> - Specifies the key schema for the local secondary index. The key schema must begin with the same partition key as the table.</p></li>
    /// <li>
    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p>
    /// <ul>
    /// <li>
    /// <p><code>ProjectionType</code> - One of the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
    /// <li>
    /// <p><code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p></li>
    /// <li>
    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p></li>
    /// </ul></li>
    /// </ul>
    pub fn get_local_secondary_indexes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LocalSecondaryIndex>> {
        self.inner.get_local_secondary_indexes()
    }
    ///
    /// Appends an item to `GlobalSecondaryIndexes`.
    ///
    /// To override the contents of this collection use [`set_global_secondary_indexes`](Self::set_global_secondary_indexes).
    ///
    /// <p>One or more global secondary indexes (the maximum is 20) to be created on the table. Each global secondary index in the array includes the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
    /// <p></p></li>
    /// <li>
    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index.</p></li>
    /// <li>
    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p>
    /// <ul>
    /// <li>
    /// <p><code>ProjectionType</code> - One of the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
    /// <li>
    /// <p><code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p></li>
    /// <li>
    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
    /// </ul>
    pub fn global_secondary_indexes(mut self, input: crate::types::GlobalSecondaryIndex) -> Self {
        self.inner = self.inner.global_secondary_indexes(input);
        self
    }
    /// <p>One or more global secondary indexes (the maximum is 20) to be created on the table. Each global secondary index in the array includes the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
    /// <p></p></li>
    /// <li>
    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index.</p></li>
    /// <li>
    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p>
    /// <ul>
    /// <li>
    /// <p><code>ProjectionType</code> - One of the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
    /// <li>
    /// <p><code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p></li>
    /// <li>
    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
    /// </ul>
    pub fn set_global_secondary_indexes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GlobalSecondaryIndex>>) -> Self {
        self.inner = self.inner.set_global_secondary_indexes(input);
        self
    }
    /// <p>One or more global secondary indexes (the maximum is 20) to be created on the table. Each global secondary index in the array includes the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
    /// <p></p></li>
    /// <li>
    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index.</p></li>
    /// <li>
    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p>
    /// <ul>
    /// <li>
    /// <p><code>ProjectionType</code> - One of the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
    /// <li>
    /// <p><code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p></li>
    /// <li>
    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
    /// </ul>
    pub fn get_global_secondary_indexes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GlobalSecondaryIndex>> {
        self.inner.get_global_secondary_indexes()
    }
    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
    /// <ul>
    /// <li>
    /// <p><code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for predictable workloads. <code>PROVISIONED</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/provisioned-capacity-mode.html">Provisioned capacity mode</a>.</p></li>
    /// <li>
    /// <p><code>PAY_PER_REQUEST</code> - We recommend using <code>PAY_PER_REQUEST</code> for unpredictable workloads. <code>PAY_PER_REQUEST</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/on-demand-capacity-mode.html">On-demand capacity mode</a>.</p></li>
    /// </ul>
    pub fn billing_mode(mut self, input: crate::types::BillingMode) -> Self {
        self.inner = self.inner.billing_mode(input);
        self
    }
    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
    /// <ul>
    /// <li>
    /// <p><code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for predictable workloads. <code>PROVISIONED</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/provisioned-capacity-mode.html">Provisioned capacity mode</a>.</p></li>
    /// <li>
    /// <p><code>PAY_PER_REQUEST</code> - We recommend using <code>PAY_PER_REQUEST</code> for unpredictable workloads. <code>PAY_PER_REQUEST</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/on-demand-capacity-mode.html">On-demand capacity mode</a>.</p></li>
    /// </ul>
    pub fn set_billing_mode(mut self, input: ::std::option::Option<crate::types::BillingMode>) -> Self {
        self.inner = self.inner.set_billing_mode(input);
        self
    }
    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
    /// <ul>
    /// <li>
    /// <p><code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for predictable workloads. <code>PROVISIONED</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/provisioned-capacity-mode.html">Provisioned capacity mode</a>.</p></li>
    /// <li>
    /// <p><code>PAY_PER_REQUEST</code> - We recommend using <code>PAY_PER_REQUEST</code> for unpredictable workloads. <code>PAY_PER_REQUEST</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/on-demand-capacity-mode.html">On-demand capacity mode</a>.</p></li>
    /// </ul>
    pub fn get_billing_mode(&self) -> &::std::option::Option<crate::types::BillingMode> {
        self.inner.get_billing_mode()
    }
    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
    /// <p>If you set BillingMode as <code>PROVISIONED</code>, you must specify this property. If you set BillingMode as <code>PAY_PER_REQUEST</code>, you cannot specify this property.</p>
    /// <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
    pub fn provisioned_throughput(mut self, input: crate::types::ProvisionedThroughput) -> Self {
        self.inner = self.inner.provisioned_throughput(input);
        self
    }
    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
    /// <p>If you set BillingMode as <code>PROVISIONED</code>, you must specify this property. If you set BillingMode as <code>PAY_PER_REQUEST</code>, you cannot specify this property.</p>
    /// <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
    pub fn set_provisioned_throughput(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughput>) -> Self {
        self.inner = self.inner.set_provisioned_throughput(input);
        self
    }
    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
    /// <p>If you set BillingMode as <code>PROVISIONED</code>, you must specify this property. If you set BillingMode as <code>PAY_PER_REQUEST</code>, you cannot specify this property.</p>
    /// <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
    pub fn get_provisioned_throughput(&self) -> &::std::option::Option<crate::types::ProvisionedThroughput> {
        self.inner.get_provisioned_throughput()
    }
    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
    /// <ul>
    /// <li>
    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
    /// <li>
    /// <p><code>StreamViewType</code> - When an item in the table is modified, <code>StreamViewType</code> determines what information is written to the table's stream. Valid values for <code>StreamViewType</code> are:</p>
    /// <ul>
    /// <li>
    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
    /// <li>
    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
    /// <li>
    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
    /// <li>
    /// <p><code>NEW_AND_OLD_IMAGES</code> - Both the new and the old item images of the item are written to the stream.</p></li>
    /// </ul></li>
    /// </ul>
    pub fn stream_specification(mut self, input: crate::types::StreamSpecification) -> Self {
        self.inner = self.inner.stream_specification(input);
        self
    }
    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
    /// <ul>
    /// <li>
    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
    /// <li>
    /// <p><code>StreamViewType</code> - When an item in the table is modified, <code>StreamViewType</code> determines what information is written to the table's stream. Valid values for <code>StreamViewType</code> are:</p>
    /// <ul>
    /// <li>
    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
    /// <li>
    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
    /// <li>
    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
    /// <li>
    /// <p><code>NEW_AND_OLD_IMAGES</code> - Both the new and the old item images of the item are written to the stream.</p></li>
    /// </ul></li>
    /// </ul>
    pub fn set_stream_specification(mut self, input: ::std::option::Option<crate::types::StreamSpecification>) -> Self {
        self.inner = self.inner.set_stream_specification(input);
        self
    }
    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
    /// <ul>
    /// <li>
    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
    /// <li>
    /// <p><code>StreamViewType</code> - When an item in the table is modified, <code>StreamViewType</code> determines what information is written to the table's stream. Valid values for <code>StreamViewType</code> are:</p>
    /// <ul>
    /// <li>
    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
    /// <li>
    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
    /// <li>
    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
    /// <li>
    /// <p><code>NEW_AND_OLD_IMAGES</code> - Both the new and the old item images of the item are written to the stream.</p></li>
    /// </ul></li>
    /// </ul>
    pub fn get_stream_specification(&self) -> &::std::option::Option<crate::types::StreamSpecification> {
        self.inner.get_stream_specification()
    }
    /// <p>Represents the settings used to enable server-side encryption.</p>
    pub fn sse_specification(mut self, input: crate::types::SseSpecification) -> Self {
        self.inner = self.inner.sse_specification(input);
        self
    }
    /// <p>Represents the settings used to enable server-side encryption.</p>
    pub fn set_sse_specification(mut self, input: ::std::option::Option<crate::types::SseSpecification>) -> Self {
        self.inner = self.inner.set_sse_specification(input);
        self
    }
    /// <p>Represents the settings used to enable server-side encryption.</p>
    pub fn get_sse_specification(&self) -> &::std::option::Option<crate::types::SseSpecification> {
        self.inner.get_sse_specification()
    }
    ///
    /// Appends an item to `Tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A list of key-value pairs to label the table. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a>.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        self.inner = self.inner.tags(input);
        self
    }
    /// <p>A list of key-value pairs to label the table. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a>.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.inner = self.inner.set_tags(input);
        self
    }
    /// <p>A list of key-value pairs to label the table. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a>.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        self.inner.get_tags()
    }
    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
    pub fn table_class(mut self, input: crate::types::TableClass) -> Self {
        self.inner = self.inner.table_class(input);
        self
    }
    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
    pub fn set_table_class(mut self, input: ::std::option::Option<crate::types::TableClass>) -> Self {
        self.inner = self.inner.set_table_class(input);
        self
    }
    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
    pub fn get_table_class(&self) -> &::std::option::Option<crate::types::TableClass> {
        self.inner.get_table_class()
    }
    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
    pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
        self.inner = self.inner.deletion_protection_enabled(input);
        self
    }
    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
    pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_deletion_protection_enabled(input);
        self
    }
    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
    pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
        self.inner.get_deletion_protection_enabled()
    }
    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
    /// <p>The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit. For a full list of all considerations that apply for resource-based policies, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/rbac-considerations.html">Resource-based policy considerations</a>.</p><note>
    /// <p>You need to specify the <code>CreateTable</code> and <code>PutResourcePolicy</code> IAM actions for authorizing a user to create a table with a resource-based policy.</p>
    /// </note>
    pub fn resource_policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.resource_policy(input.into());
        self
    }
    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
    /// <p>The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit. For a full list of all considerations that apply for resource-based policies, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/rbac-considerations.html">Resource-based policy considerations</a>.</p><note>
    /// <p>You need to specify the <code>CreateTable</code> and <code>PutResourcePolicy</code> IAM actions for authorizing a user to create a table with a resource-based policy.</p>
    /// </note>
    pub fn set_resource_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_resource_policy(input);
        self
    }
    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
    /// <p>The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit. For a full list of all considerations that apply for resource-based policies, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/rbac-considerations.html">Resource-based policy considerations</a>.</p><note>
    /// <p>You need to specify the <code>CreateTable</code> and <code>PutResourcePolicy</code> IAM actions for authorizing a user to create a table with a resource-based policy.</p>
    /// </note>
    pub fn get_resource_policy(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_resource_policy()
    }
    /// <p>Sets the maximum number of read and write units for the specified table in on-demand capacity mode. If you use this parameter, you must specify <code>MaxReadRequestUnits</code>, <code>MaxWriteRequestUnits</code>, or both.</p>
    pub fn on_demand_throughput(mut self, input: crate::types::OnDemandThroughput) -> Self {
        self.inner = self.inner.on_demand_throughput(input);
        self
    }
    /// <p>Sets the maximum number of read and write units for the specified table in on-demand capacity mode. If you use this parameter, you must specify <code>MaxReadRequestUnits</code>, <code>MaxWriteRequestUnits</code>, or both.</p>
    pub fn set_on_demand_throughput(mut self, input: ::std::option::Option<crate::types::OnDemandThroughput>) -> Self {
        self.inner = self.inner.set_on_demand_throughput(input);
        self
    }
    /// <p>Sets the maximum number of read and write units for the specified table in on-demand capacity mode. If you use this parameter, you must specify <code>MaxReadRequestUnits</code>, <code>MaxWriteRequestUnits</code>, or both.</p>
    pub fn get_on_demand_throughput(&self) -> &::std::option::Option<crate::types::OnDemandThroughput> {
        self.inner.get_on_demand_throughput()
    }
}