aws_sdk_dynamodb/operation/update_table/
_update_table_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of an <code>UpdateTable</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateTableInput  {
7    /// <p>An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, <code>AttributeDefinitions</code> must include the key element(s) of the new index.</p>
8    pub attribute_definitions: ::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>>,
9    /// <p>The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
10    pub table_name: ::std::option::Option<::std::string::String>,
11    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. When switching from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes.</p>
12    /// <ul>
13    /// <li>
14    /// <p><code>PAY_PER_REQUEST</code> - We recommend using <code>PAY_PER_REQUEST</code> for most DynamoDB 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>
15    /// <li>
16    /// <p><code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for steady workloads with predictable growth where capacity requirements can be reliably forecasted. <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>
17    /// </ul>
18    pub billing_mode: ::std::option::Option<crate::types::BillingMode>,
19    /// <p>The new provisioned throughput settings for the specified table or index.</p>
20    pub provisioned_throughput: ::std::option::Option<crate::types::ProvisionedThroughput>,
21    /// <p>An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:</p>
22    /// <ul>
23    /// <li>
24    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
25    /// <li>
26    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
27    /// <li>
28    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
29    /// </ul>
30    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
31    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html">Managing Global Secondary Indexes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
32    pub global_secondary_index_updates: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexUpdate>>,
33    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
34    /// <p>You receive a <code>ValidationException</code> if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.</p>
35    /// </note>
36    pub stream_specification: ::std::option::Option<crate::types::StreamSpecification>,
37    /// <p>The new server-side encryption settings for the specified table.</p>
38    pub sse_specification: ::std::option::Option<crate::types::SseSpecification>,
39    /// <p>A list of replica update actions (create, delete, or update) for the table.</p>
40    pub replica_updates: ::std::option::Option<::std::vec::Vec::<crate::types::ReplicationGroupUpdate>>,
41    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
42    pub table_class: ::std::option::Option<crate::types::TableClass>,
43    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
44    pub deletion_protection_enabled: ::std::option::Option<bool>,
45    /// <p>Specifies the consistency mode for a new global table. This parameter is only valid when you create a global table by specifying one or more <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ReplicationGroupUpdate.html#DDB-Type-ReplicationGroupUpdate-Create">Create</a> actions in the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html#DDB-UpdateTable-request-ReplicaUpdates">ReplicaUpdates</a> action list.</p>
46    /// <p>You can specify one of the following consistency modes:</p>
47    /// <ul>
48    /// <li>
49    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency (MREC). This is the default consistency mode for global tables.</p></li>
50    /// <li>
51    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li>
52    /// </ul>
53    /// <p>If you don't specify this field, the global table consistency mode defaults to <code>EVENTUAL</code>. For more information about global tables consistency modes, see <a href="https://docs.aws.amazon.com/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes"> Consistency modes</a> in DynamoDB developer guide.</p>
54    pub multi_region_consistency: ::std::option::Option<crate::types::MultiRegionConsistency>,
55    /// <p>A list of witness updates for a MRSC global table. A witness provides a cost-effective alternative to a full replica in a MRSC global table by maintaining replicated change data written to global table replicas. You cannot perform read or write operations on a witness. For each witness, you can request one action:</p>
56    /// <ul>
57    /// <li>
58    /// <p><code>Create</code> - add a new witness to the global table.</p></li>
59    /// <li>
60    /// <p><code>Delete</code> - remove a witness from the global table.</p></li>
61    /// </ul>
62    /// <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p>
63    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes">Multi-Region strong consistency (MRSC)</a> in the Amazon DynamoDB Developer Guide</p>
64    pub global_table_witness_updates: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalTableWitnessGroupUpdate>>,
65    /// <p>Updates 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>
66    pub on_demand_throughput: ::std::option::Option<crate::types::OnDemandThroughput>,
67    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
68    pub warm_throughput: ::std::option::Option<crate::types::WarmThroughput>,
69}
70impl  UpdateTableInput  {
71    /// <p>An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, <code>AttributeDefinitions</code> must include the key element(s) of the new index.</p>
72    /// 
73    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attribute_definitions.is_none()`.
74    pub fn attribute_definitions(&self) -> &[crate::types::AttributeDefinition] {
75        self.attribute_definitions.as_deref()
76        .unwrap_or_default()
77    }
78    /// <p>The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
79    pub fn table_name(&self) -> ::std::option::Option<&str> {
80        self.table_name.as_deref()
81    }
82    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. When switching from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes.</p>
83    /// <ul>
84    /// <li>
85    /// <p><code>PAY_PER_REQUEST</code> - We recommend using <code>PAY_PER_REQUEST</code> for most DynamoDB 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>
86    /// <li>
87    /// <p><code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for steady workloads with predictable growth where capacity requirements can be reliably forecasted. <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>
88    /// </ul>
89    pub fn billing_mode(&self) -> ::std::option::Option<&crate::types::BillingMode> {
90        self.billing_mode.as_ref()
91    }
92    /// <p>The new provisioned throughput settings for the specified table or index.</p>
93    pub fn provisioned_throughput(&self) -> ::std::option::Option<&crate::types::ProvisionedThroughput> {
94        self.provisioned_throughput.as_ref()
95    }
96    /// <p>An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:</p>
97    /// <ul>
98    /// <li>
99    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
100    /// <li>
101    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
102    /// <li>
103    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
104    /// </ul>
105    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
106    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html">Managing Global Secondary Indexes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
107    /// 
108    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.global_secondary_index_updates.is_none()`.
109    pub fn global_secondary_index_updates(&self) -> &[crate::types::GlobalSecondaryIndexUpdate] {
110        self.global_secondary_index_updates.as_deref()
111        .unwrap_or_default()
112    }
113    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
114    /// <p>You receive a <code>ValidationException</code> if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.</p>
115    /// </note>
116    pub fn stream_specification(&self) -> ::std::option::Option<&crate::types::StreamSpecification> {
117        self.stream_specification.as_ref()
118    }
119    /// <p>The new server-side encryption settings for the specified table.</p>
120    pub fn sse_specification(&self) -> ::std::option::Option<&crate::types::SseSpecification> {
121        self.sse_specification.as_ref()
122    }
123    /// <p>A list of replica update actions (create, delete, or update) for the table.</p>
124    /// 
125    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.replica_updates.is_none()`.
126    pub fn replica_updates(&self) -> &[crate::types::ReplicationGroupUpdate] {
127        self.replica_updates.as_deref()
128        .unwrap_or_default()
129    }
130    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
131    pub fn table_class(&self) -> ::std::option::Option<&crate::types::TableClass> {
132        self.table_class.as_ref()
133    }
134    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
135    pub fn deletion_protection_enabled(&self) -> ::std::option::Option<bool> {
136        self.deletion_protection_enabled
137    }
138    /// <p>Specifies the consistency mode for a new global table. This parameter is only valid when you create a global table by specifying one or more <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ReplicationGroupUpdate.html#DDB-Type-ReplicationGroupUpdate-Create">Create</a> actions in the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html#DDB-UpdateTable-request-ReplicaUpdates">ReplicaUpdates</a> action list.</p>
139    /// <p>You can specify one of the following consistency modes:</p>
140    /// <ul>
141    /// <li>
142    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency (MREC). This is the default consistency mode for global tables.</p></li>
143    /// <li>
144    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li>
145    /// </ul>
146    /// <p>If you don't specify this field, the global table consistency mode defaults to <code>EVENTUAL</code>. For more information about global tables consistency modes, see <a href="https://docs.aws.amazon.com/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes"> Consistency modes</a> in DynamoDB developer guide.</p>
147    pub fn multi_region_consistency(&self) -> ::std::option::Option<&crate::types::MultiRegionConsistency> {
148        self.multi_region_consistency.as_ref()
149    }
150    /// <p>A list of witness updates for a MRSC global table. A witness provides a cost-effective alternative to a full replica in a MRSC global table by maintaining replicated change data written to global table replicas. You cannot perform read or write operations on a witness. For each witness, you can request one action:</p>
151    /// <ul>
152    /// <li>
153    /// <p><code>Create</code> - add a new witness to the global table.</p></li>
154    /// <li>
155    /// <p><code>Delete</code> - remove a witness from the global table.</p></li>
156    /// </ul>
157    /// <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p>
158    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes">Multi-Region strong consistency (MRSC)</a> in the Amazon DynamoDB Developer Guide</p>
159    /// 
160    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.global_table_witness_updates.is_none()`.
161    pub fn global_table_witness_updates(&self) -> &[crate::types::GlobalTableWitnessGroupUpdate] {
162        self.global_table_witness_updates.as_deref()
163        .unwrap_or_default()
164    }
165    /// <p>Updates 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>
166    pub fn on_demand_throughput(&self) -> ::std::option::Option<&crate::types::OnDemandThroughput> {
167        self.on_demand_throughput.as_ref()
168    }
169    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
170    pub fn warm_throughput(&self) -> ::std::option::Option<&crate::types::WarmThroughput> {
171        self.warm_throughput.as_ref()
172    }
173}
174static UPDATETABLEINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.dynamodb.synthetic#UpdateTableInput", "com.amazonaws.dynamodb.synthetic", "UpdateTableInput");
175static UPDATETABLEINPUT_MEMBER_ATTRIBUTE_DEFINITIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
176                            ::aws_smithy_schema::ShapeId::from_static(
177                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$AttributeDefinitions",
178                                "com.amazonaws.dynamodb.synthetic",
179                                "UpdateTableInput",
180                            ),
181                            ::aws_smithy_schema::ShapeType::List,
182                            "AttributeDefinitions",
183                            0,
184                        );
185static UPDATETABLEINPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
186                            ::aws_smithy_schema::ShapeId::from_static(
187                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$TableName",
188                                "com.amazonaws.dynamodb.synthetic",
189                                "UpdateTableInput",
190                            ),
191                            ::aws_smithy_schema::ShapeType::String,
192                            "TableName",
193                            1,
194                        );
195static UPDATETABLEINPUT_MEMBER_BILLING_MODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
196                            ::aws_smithy_schema::ShapeId::from_static(
197                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$BillingMode",
198                                "com.amazonaws.dynamodb.synthetic",
199                                "UpdateTableInput",
200                            ),
201                            ::aws_smithy_schema::ShapeType::String,
202                            "BillingMode",
203                            2,
204                        );
205static UPDATETABLEINPUT_MEMBER_PROVISIONED_THROUGHPUT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
206                            ::aws_smithy_schema::ShapeId::from_static(
207                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$ProvisionedThroughput",
208                                "com.amazonaws.dynamodb.synthetic",
209                                "UpdateTableInput",
210                            ),
211                            ::aws_smithy_schema::ShapeType::Structure,
212                            "ProvisionedThroughput",
213                            3,
214                        );
215static UPDATETABLEINPUT_MEMBER_GLOBAL_SECONDARY_INDEX_UPDATES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
216                            ::aws_smithy_schema::ShapeId::from_static(
217                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$GlobalSecondaryIndexUpdates",
218                                "com.amazonaws.dynamodb.synthetic",
219                                "UpdateTableInput",
220                            ),
221                            ::aws_smithy_schema::ShapeType::List,
222                            "GlobalSecondaryIndexUpdates",
223                            4,
224                        );
225static UPDATETABLEINPUT_MEMBER_STREAM_SPECIFICATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
226                            ::aws_smithy_schema::ShapeId::from_static(
227                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$StreamSpecification",
228                                "com.amazonaws.dynamodb.synthetic",
229                                "UpdateTableInput",
230                            ),
231                            ::aws_smithy_schema::ShapeType::Structure,
232                            "StreamSpecification",
233                            5,
234                        );
235static UPDATETABLEINPUT_MEMBER_SSE_SPECIFICATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
236                            ::aws_smithy_schema::ShapeId::from_static(
237                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$SSESpecification",
238                                "com.amazonaws.dynamodb.synthetic",
239                                "UpdateTableInput",
240                            ),
241                            ::aws_smithy_schema::ShapeType::Structure,
242                            "SSESpecification",
243                            6,
244                        );
245static UPDATETABLEINPUT_MEMBER_REPLICA_UPDATES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
246                            ::aws_smithy_schema::ShapeId::from_static(
247                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$ReplicaUpdates",
248                                "com.amazonaws.dynamodb.synthetic",
249                                "UpdateTableInput",
250                            ),
251                            ::aws_smithy_schema::ShapeType::List,
252                            "ReplicaUpdates",
253                            7,
254                        );
255static UPDATETABLEINPUT_MEMBER_TABLE_CLASS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
256                            ::aws_smithy_schema::ShapeId::from_static(
257                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$TableClass",
258                                "com.amazonaws.dynamodb.synthetic",
259                                "UpdateTableInput",
260                            ),
261                            ::aws_smithy_schema::ShapeType::String,
262                            "TableClass",
263                            8,
264                        );
265static UPDATETABLEINPUT_MEMBER_DELETION_PROTECTION_ENABLED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
266                            ::aws_smithy_schema::ShapeId::from_static(
267                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$DeletionProtectionEnabled",
268                                "com.amazonaws.dynamodb.synthetic",
269                                "UpdateTableInput",
270                            ),
271                            ::aws_smithy_schema::ShapeType::Boolean,
272                            "DeletionProtectionEnabled",
273                            9,
274                        );
275static UPDATETABLEINPUT_MEMBER_MULTI_REGION_CONSISTENCY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
276                            ::aws_smithy_schema::ShapeId::from_static(
277                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$MultiRegionConsistency",
278                                "com.amazonaws.dynamodb.synthetic",
279                                "UpdateTableInput",
280                            ),
281                            ::aws_smithy_schema::ShapeType::String,
282                            "MultiRegionConsistency",
283                            10,
284                        );
285static UPDATETABLEINPUT_MEMBER_GLOBAL_TABLE_WITNESS_UPDATES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
286                            ::aws_smithy_schema::ShapeId::from_static(
287                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$GlobalTableWitnessUpdates",
288                                "com.amazonaws.dynamodb.synthetic",
289                                "UpdateTableInput",
290                            ),
291                            ::aws_smithy_schema::ShapeType::List,
292                            "GlobalTableWitnessUpdates",
293                            11,
294                        );
295static UPDATETABLEINPUT_MEMBER_ON_DEMAND_THROUGHPUT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
296                            ::aws_smithy_schema::ShapeId::from_static(
297                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$OnDemandThroughput",
298                                "com.amazonaws.dynamodb.synthetic",
299                                "UpdateTableInput",
300                            ),
301                            ::aws_smithy_schema::ShapeType::Structure,
302                            "OnDemandThroughput",
303                            12,
304                        );
305static UPDATETABLEINPUT_MEMBER_WARM_THROUGHPUT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
306                            ::aws_smithy_schema::ShapeId::from_static(
307                                "com.amazonaws.dynamodb.synthetic#UpdateTableInput$WarmThroughput",
308                                "com.amazonaws.dynamodb.synthetic",
309                                "UpdateTableInput",
310                            ),
311                            ::aws_smithy_schema::ShapeType::Structure,
312                            "WarmThroughput",
313                            13,
314                        );
315static UPDATETABLEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
316                            UPDATETABLEINPUT_SCHEMA_ID,
317                            ::aws_smithy_schema::ShapeType::Structure,
318                            &[&UPDATETABLEINPUT_MEMBER_ATTRIBUTE_DEFINITIONS, &UPDATETABLEINPUT_MEMBER_TABLE_NAME, &UPDATETABLEINPUT_MEMBER_BILLING_MODE, &UPDATETABLEINPUT_MEMBER_PROVISIONED_THROUGHPUT, &UPDATETABLEINPUT_MEMBER_GLOBAL_SECONDARY_INDEX_UPDATES, &UPDATETABLEINPUT_MEMBER_STREAM_SPECIFICATION, &UPDATETABLEINPUT_MEMBER_SSE_SPECIFICATION, &UPDATETABLEINPUT_MEMBER_REPLICA_UPDATES, &UPDATETABLEINPUT_MEMBER_TABLE_CLASS, &UPDATETABLEINPUT_MEMBER_DELETION_PROTECTION_ENABLED, &UPDATETABLEINPUT_MEMBER_MULTI_REGION_CONSISTENCY, &UPDATETABLEINPUT_MEMBER_GLOBAL_TABLE_WITNESS_UPDATES, &UPDATETABLEINPUT_MEMBER_ON_DEMAND_THROUGHPUT, &UPDATETABLEINPUT_MEMBER_WARM_THROUGHPUT],
319                        );
320impl UpdateTableInput {
321                /// The schema for this shape.
322                pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATETABLEINPUT_SCHEMA;
323            }
324impl ::aws_smithy_schema::serde::SerializableStruct for UpdateTableInput {
325                #[allow(unused_variables, clippy::diverging_sub_expression)]
326                fn serialize_members(&self, ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
327                    if let Some(ref val) = self.attribute_definitions {
328                                
329                    ser.write_list(&UPDATETABLEINPUT_MEMBER_ATTRIBUTE_DEFINITIONS, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
330                        for item in val {
331                            ser.write_struct(crate::types::AttributeDefinition::SCHEMA, item)?;
332                        }
333                        Ok(())
334                    })?;
335                    
336                            }
337if let Some(ref val) = self.table_name {
338                                ser.write_string(&UPDATETABLEINPUT_MEMBER_TABLE_NAME, val)?;
339                            }
340if let Some(ref val) = self.billing_mode {
341                                ser.write_string(&UPDATETABLEINPUT_MEMBER_BILLING_MODE, val.as_str())?;
342                            }
343if let Some(ref val) = self.provisioned_throughput {
344                                ser.write_struct(&UPDATETABLEINPUT_MEMBER_PROVISIONED_THROUGHPUT, val)?;
345                            }
346if let Some(ref val) = self.global_secondary_index_updates {
347                                
348                    ser.write_list(&UPDATETABLEINPUT_MEMBER_GLOBAL_SECONDARY_INDEX_UPDATES, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
349                        for item in val {
350                            ser.write_struct(crate::types::GlobalSecondaryIndexUpdate::SCHEMA, item)?;
351                        }
352                        Ok(())
353                    })?;
354                    
355                            }
356if let Some(ref val) = self.stream_specification {
357                                ser.write_struct(&UPDATETABLEINPUT_MEMBER_STREAM_SPECIFICATION, val)?;
358                            }
359if let Some(ref val) = self.sse_specification {
360                                ser.write_struct(&UPDATETABLEINPUT_MEMBER_SSE_SPECIFICATION, val)?;
361                            }
362if let Some(ref val) = self.replica_updates {
363                                
364                    ser.write_list(&UPDATETABLEINPUT_MEMBER_REPLICA_UPDATES, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
365                        for item in val {
366                            ser.write_struct(crate::types::ReplicationGroupUpdate::SCHEMA, item)?;
367                        }
368                        Ok(())
369                    })?;
370                    
371                            }
372if let Some(ref val) = self.table_class {
373                                ser.write_string(&UPDATETABLEINPUT_MEMBER_TABLE_CLASS, val.as_str())?;
374                            }
375if let Some(ref val) = self.deletion_protection_enabled {
376                                ser.write_boolean(&UPDATETABLEINPUT_MEMBER_DELETION_PROTECTION_ENABLED, *val)?;
377                            }
378if let Some(ref val) = self.multi_region_consistency {
379                                ser.write_string(&UPDATETABLEINPUT_MEMBER_MULTI_REGION_CONSISTENCY, val.as_str())?;
380                            }
381if let Some(ref val) = self.global_table_witness_updates {
382                                
383                    ser.write_list(&UPDATETABLEINPUT_MEMBER_GLOBAL_TABLE_WITNESS_UPDATES, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
384                        for item in val {
385                            ser.write_struct(crate::types::GlobalTableWitnessGroupUpdate::SCHEMA, item)?;
386                        }
387                        Ok(())
388                    })?;
389                    
390                            }
391if let Some(ref val) = self.on_demand_throughput {
392                                ser.write_struct(&UPDATETABLEINPUT_MEMBER_ON_DEMAND_THROUGHPUT, val)?;
393                            }
394if let Some(ref val) = self.warm_throughput {
395                                ser.write_struct(&UPDATETABLEINPUT_MEMBER_WARM_THROUGHPUT, val)?;
396                            }
397                    Ok(())
398                }
399            }
400impl UpdateTableInput {
401                /// Deserializes this structure from a [`ShapeDeserializer`].
402                pub fn deserialize(deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
403                    #[allow(unused_variables, unused_mut)]
404                    let mut builder = Self::builder();
405                    #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding, clippy::diverging_sub_expression)]
406                    deserializer.read_struct(&UPDATETABLEINPUT_SCHEMA, &mut |member, deser| {
407                        match member.member_index() {
408                            Some(0) => {
409                                    builder.attribute_definitions = Some({ let mut container = Vec::new(); deser.read_list(member, &mut |deser| { container.push(crate::types::AttributeDefinition::deserialize(deser)?); Ok(()) })?; container });
410                                }
411Some(1) => {
412                                    builder.table_name = Some(deser.read_string(member)?);
413                                }
414Some(2) => {
415                                    builder.billing_mode = Some(crate::types::BillingMode::from(deser.read_string(member)?.as_str()));
416                                }
417Some(3) => {
418                                    builder.provisioned_throughput = Some(crate::types::ProvisionedThroughput::deserialize(deser)?);
419                                }
420Some(4) => {
421                                    builder.global_secondary_index_updates = Some({ let mut container = Vec::new(); deser.read_list(member, &mut |deser| { container.push(crate::types::GlobalSecondaryIndexUpdate::deserialize(deser)?); Ok(()) })?; container });
422                                }
423Some(5) => {
424                                    builder.stream_specification = Some(crate::types::StreamSpecification::deserialize(deser)?);
425                                }
426Some(6) => {
427                                    builder.sse_specification = Some(crate::types::SseSpecification::deserialize(deser)?);
428                                }
429Some(7) => {
430                                    builder.replica_updates = Some({ let mut container = Vec::new(); deser.read_list(member, &mut |deser| { container.push(crate::types::ReplicationGroupUpdate::deserialize(deser)?); Ok(()) })?; container });
431                                }
432Some(8) => {
433                                    builder.table_class = Some(crate::types::TableClass::from(deser.read_string(member)?.as_str()));
434                                }
435Some(9) => {
436                                    builder.deletion_protection_enabled = Some(deser.read_boolean(member)?);
437                                }
438Some(10) => {
439                                    builder.multi_region_consistency = Some(crate::types::MultiRegionConsistency::from(deser.read_string(member)?.as_str()));
440                                }
441Some(11) => {
442                                    builder.global_table_witness_updates = Some({ let mut container = Vec::new(); deser.read_list(member, &mut |deser| { container.push(crate::types::GlobalTableWitnessGroupUpdate::deserialize(deser)?); Ok(()) })?; container });
443                                }
444Some(12) => {
445                                    builder.on_demand_throughput = Some(crate::types::OnDemandThroughput::deserialize(deser)?);
446                                }
447Some(13) => {
448                                    builder.warm_throughput = Some(crate::types::WarmThroughput::deserialize(deser)?);
449                                }
450                            _ => {}
451                        }
452                        Ok(())
453                    })?;
454                    builder.table_name = builder.table_name.or(Some(String::new()));
455builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
456                }
457            }
458impl UpdateTableInput {
459                        /// Deserializes this structure from a body deserializer and HTTP response.
460                        pub fn deserialize_with_response(
461                            deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
462                            _headers: &::aws_smithy_runtime_api::http::Headers,
463                            _status: u16,
464                            _body: &[u8],
465                        ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
466                            Self::deserialize(deserializer)
467                        }
468                    }
469impl UpdateTableInput {
470    /// Creates a new builder-style object to manufacture [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
471    pub fn builder() -> crate::operation::update_table::builders::UpdateTableInputBuilder {
472        crate::operation::update_table::builders::UpdateTableInputBuilder::default()
473    }
474}
475
476/// A builder for [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
477#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
478#[non_exhaustive]
479pub struct UpdateTableInputBuilder {
480    pub(crate) attribute_definitions: ::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>>,
481    pub(crate) table_name: ::std::option::Option<::std::string::String>,
482    pub(crate) billing_mode: ::std::option::Option<crate::types::BillingMode>,
483    pub(crate) provisioned_throughput: ::std::option::Option<crate::types::ProvisionedThroughput>,
484    pub(crate) global_secondary_index_updates: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexUpdate>>,
485    pub(crate) stream_specification: ::std::option::Option<crate::types::StreamSpecification>,
486    pub(crate) sse_specification: ::std::option::Option<crate::types::SseSpecification>,
487    pub(crate) replica_updates: ::std::option::Option<::std::vec::Vec::<crate::types::ReplicationGroupUpdate>>,
488    pub(crate) table_class: ::std::option::Option<crate::types::TableClass>,
489    pub(crate) deletion_protection_enabled: ::std::option::Option<bool>,
490    pub(crate) multi_region_consistency: ::std::option::Option<crate::types::MultiRegionConsistency>,
491    pub(crate) global_table_witness_updates: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalTableWitnessGroupUpdate>>,
492    pub(crate) on_demand_throughput: ::std::option::Option<crate::types::OnDemandThroughput>,
493    pub(crate) warm_throughput: ::std::option::Option<crate::types::WarmThroughput>,
494}
495impl UpdateTableInputBuilder {
496    /// Appends an item to `attribute_definitions`.
497    ///
498    /// To override the contents of this collection use [`set_attribute_definitions`](Self::set_attribute_definitions).
499    ///
500    /// <p>An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, <code>AttributeDefinitions</code> must include the key element(s) of the new index.</p>
501    pub fn attribute_definitions(mut self, input: crate::types::AttributeDefinition) -> Self {
502        let mut v = self.attribute_definitions.unwrap_or_default();
503                        v.push(input);
504                        self.attribute_definitions = ::std::option::Option::Some(v);
505                        self
506    }
507    /// <p>An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, <code>AttributeDefinitions</code> must include the key element(s) of the new index.</p>
508    pub fn set_attribute_definitions(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>>) -> Self {
509        self.attribute_definitions = input; self
510    }
511    /// <p>An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, <code>AttributeDefinitions</code> must include the key element(s) of the new index.</p>
512    pub fn get_attribute_definitions(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>> {
513        &self.attribute_definitions
514    }
515    /// <p>The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
516    /// This field is required.
517    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
518        self.table_name = ::std::option::Option::Some(input.into());
519        self
520    }
521    /// <p>The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
522    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
523        self.table_name = input; self
524    }
525    /// <p>The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
526    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
527        &self.table_name
528    }
529    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. When switching from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes.</p>
530    /// <ul>
531    /// <li>
532    /// <p><code>PAY_PER_REQUEST</code> - We recommend using <code>PAY_PER_REQUEST</code> for most DynamoDB 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>
533    /// <li>
534    /// <p><code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for steady workloads with predictable growth where capacity requirements can be reliably forecasted. <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>
535    /// </ul>
536    pub fn billing_mode(mut self, input: crate::types::BillingMode) -> Self {
537        self.billing_mode = ::std::option::Option::Some(input);
538        self
539    }
540    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. When switching from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes.</p>
541    /// <ul>
542    /// <li>
543    /// <p><code>PAY_PER_REQUEST</code> - We recommend using <code>PAY_PER_REQUEST</code> for most DynamoDB 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>
544    /// <li>
545    /// <p><code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for steady workloads with predictable growth where capacity requirements can be reliably forecasted. <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>
546    /// </ul>
547    pub fn set_billing_mode(mut self, input: ::std::option::Option<crate::types::BillingMode>) -> Self {
548        self.billing_mode = input; self
549    }
550    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. When switching from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes.</p>
551    /// <ul>
552    /// <li>
553    /// <p><code>PAY_PER_REQUEST</code> - We recommend using <code>PAY_PER_REQUEST</code> for most DynamoDB 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>
554    /// <li>
555    /// <p><code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for steady workloads with predictable growth where capacity requirements can be reliably forecasted. <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>
556    /// </ul>
557    pub fn get_billing_mode(&self) -> &::std::option::Option<crate::types::BillingMode> {
558        &self.billing_mode
559    }
560    /// <p>The new provisioned throughput settings for the specified table or index.</p>
561    pub fn provisioned_throughput(mut self, input: crate::types::ProvisionedThroughput) -> Self {
562        self.provisioned_throughput = ::std::option::Option::Some(input);
563        self
564    }
565    /// <p>The new provisioned throughput settings for the specified table or index.</p>
566    pub fn set_provisioned_throughput(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughput>) -> Self {
567        self.provisioned_throughput = input; self
568    }
569    /// <p>The new provisioned throughput settings for the specified table or index.</p>
570    pub fn get_provisioned_throughput(&self) -> &::std::option::Option<crate::types::ProvisionedThroughput> {
571        &self.provisioned_throughput
572    }
573    /// Appends an item to `global_secondary_index_updates`.
574    ///
575    /// To override the contents of this collection use [`set_global_secondary_index_updates`](Self::set_global_secondary_index_updates).
576    ///
577    /// <p>An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:</p>
578    /// <ul>
579    /// <li>
580    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
581    /// <li>
582    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
583    /// <li>
584    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
585    /// </ul>
586    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
587    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html">Managing Global Secondary Indexes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
588    pub fn global_secondary_index_updates(mut self, input: crate::types::GlobalSecondaryIndexUpdate) -> Self {
589        let mut v = self.global_secondary_index_updates.unwrap_or_default();
590                        v.push(input);
591                        self.global_secondary_index_updates = ::std::option::Option::Some(v);
592                        self
593    }
594    /// <p>An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:</p>
595    /// <ul>
596    /// <li>
597    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
598    /// <li>
599    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
600    /// <li>
601    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
602    /// </ul>
603    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
604    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html">Managing Global Secondary Indexes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
605    pub fn set_global_secondary_index_updates(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexUpdate>>) -> Self {
606        self.global_secondary_index_updates = input; self
607    }
608    /// <p>An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:</p>
609    /// <ul>
610    /// <li>
611    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
612    /// <li>
613    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
614    /// <li>
615    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
616    /// </ul>
617    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
618    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html">Managing Global Secondary Indexes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
619    pub fn get_global_secondary_index_updates(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexUpdate>> {
620        &self.global_secondary_index_updates
621    }
622    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
623    /// <p>You receive a <code>ValidationException</code> if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.</p>
624    /// </note>
625    pub fn stream_specification(mut self, input: crate::types::StreamSpecification) -> Self {
626        self.stream_specification = ::std::option::Option::Some(input);
627        self
628    }
629    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
630    /// <p>You receive a <code>ValidationException</code> if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.</p>
631    /// </note>
632    pub fn set_stream_specification(mut self, input: ::std::option::Option<crate::types::StreamSpecification>) -> Self {
633        self.stream_specification = input; self
634    }
635    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
636    /// <p>You receive a <code>ValidationException</code> if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.</p>
637    /// </note>
638    pub fn get_stream_specification(&self) -> &::std::option::Option<crate::types::StreamSpecification> {
639        &self.stream_specification
640    }
641    /// <p>The new server-side encryption settings for the specified table.</p>
642    pub fn sse_specification(mut self, input: crate::types::SseSpecification) -> Self {
643        self.sse_specification = ::std::option::Option::Some(input);
644        self
645    }
646    /// <p>The new server-side encryption settings for the specified table.</p>
647    pub fn set_sse_specification(mut self, input: ::std::option::Option<crate::types::SseSpecification>) -> Self {
648        self.sse_specification = input; self
649    }
650    /// <p>The new server-side encryption settings for the specified table.</p>
651    pub fn get_sse_specification(&self) -> &::std::option::Option<crate::types::SseSpecification> {
652        &self.sse_specification
653    }
654    /// Appends an item to `replica_updates`.
655    ///
656    /// To override the contents of this collection use [`set_replica_updates`](Self::set_replica_updates).
657    ///
658    /// <p>A list of replica update actions (create, delete, or update) for the table.</p>
659    pub fn replica_updates(mut self, input: crate::types::ReplicationGroupUpdate) -> Self {
660        let mut v = self.replica_updates.unwrap_or_default();
661                        v.push(input);
662                        self.replica_updates = ::std::option::Option::Some(v);
663                        self
664    }
665    /// <p>A list of replica update actions (create, delete, or update) for the table.</p>
666    pub fn set_replica_updates(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::ReplicationGroupUpdate>>) -> Self {
667        self.replica_updates = input; self
668    }
669    /// <p>A list of replica update actions (create, delete, or update) for the table.</p>
670    pub fn get_replica_updates(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::ReplicationGroupUpdate>> {
671        &self.replica_updates
672    }
673    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
674    pub fn table_class(mut self, input: crate::types::TableClass) -> Self {
675        self.table_class = ::std::option::Option::Some(input);
676        self
677    }
678    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
679    pub fn set_table_class(mut self, input: ::std::option::Option<crate::types::TableClass>) -> Self {
680        self.table_class = input; self
681    }
682    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
683    pub fn get_table_class(&self) -> &::std::option::Option<crate::types::TableClass> {
684        &self.table_class
685    }
686    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
687    pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
688        self.deletion_protection_enabled = ::std::option::Option::Some(input);
689        self
690    }
691    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
692    pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
693        self.deletion_protection_enabled = input; self
694    }
695    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
696    pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
697        &self.deletion_protection_enabled
698    }
699    /// <p>Specifies the consistency mode for a new global table. This parameter is only valid when you create a global table by specifying one or more <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ReplicationGroupUpdate.html#DDB-Type-ReplicationGroupUpdate-Create">Create</a> actions in the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html#DDB-UpdateTable-request-ReplicaUpdates">ReplicaUpdates</a> action list.</p>
700    /// <p>You can specify one of the following consistency modes:</p>
701    /// <ul>
702    /// <li>
703    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency (MREC). This is the default consistency mode for global tables.</p></li>
704    /// <li>
705    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li>
706    /// </ul>
707    /// <p>If you don't specify this field, the global table consistency mode defaults to <code>EVENTUAL</code>. For more information about global tables consistency modes, see <a href="https://docs.aws.amazon.com/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes"> Consistency modes</a> in DynamoDB developer guide.</p>
708    pub fn multi_region_consistency(mut self, input: crate::types::MultiRegionConsistency) -> Self {
709        self.multi_region_consistency = ::std::option::Option::Some(input);
710        self
711    }
712    /// <p>Specifies the consistency mode for a new global table. This parameter is only valid when you create a global table by specifying one or more <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ReplicationGroupUpdate.html#DDB-Type-ReplicationGroupUpdate-Create">Create</a> actions in the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html#DDB-UpdateTable-request-ReplicaUpdates">ReplicaUpdates</a> action list.</p>
713    /// <p>You can specify one of the following consistency modes:</p>
714    /// <ul>
715    /// <li>
716    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency (MREC). This is the default consistency mode for global tables.</p></li>
717    /// <li>
718    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li>
719    /// </ul>
720    /// <p>If you don't specify this field, the global table consistency mode defaults to <code>EVENTUAL</code>. For more information about global tables consistency modes, see <a href="https://docs.aws.amazon.com/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes"> Consistency modes</a> in DynamoDB developer guide.</p>
721    pub fn set_multi_region_consistency(mut self, input: ::std::option::Option<crate::types::MultiRegionConsistency>) -> Self {
722        self.multi_region_consistency = input; self
723    }
724    /// <p>Specifies the consistency mode for a new global table. This parameter is only valid when you create a global table by specifying one or more <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ReplicationGroupUpdate.html#DDB-Type-ReplicationGroupUpdate-Create">Create</a> actions in the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html#DDB-UpdateTable-request-ReplicaUpdates">ReplicaUpdates</a> action list.</p>
725    /// <p>You can specify one of the following consistency modes:</p>
726    /// <ul>
727    /// <li>
728    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency (MREC). This is the default consistency mode for global tables.</p></li>
729    /// <li>
730    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li>
731    /// </ul>
732    /// <p>If you don't specify this field, the global table consistency mode defaults to <code>EVENTUAL</code>. For more information about global tables consistency modes, see <a href="https://docs.aws.amazon.com/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes"> Consistency modes</a> in DynamoDB developer guide.</p>
733    pub fn get_multi_region_consistency(&self) -> &::std::option::Option<crate::types::MultiRegionConsistency> {
734        &self.multi_region_consistency
735    }
736    /// Appends an item to `global_table_witness_updates`.
737    ///
738    /// To override the contents of this collection use [`set_global_table_witness_updates`](Self::set_global_table_witness_updates).
739    ///
740    /// <p>A list of witness updates for a MRSC global table. A witness provides a cost-effective alternative to a full replica in a MRSC global table by maintaining replicated change data written to global table replicas. You cannot perform read or write operations on a witness. For each witness, you can request one action:</p>
741    /// <ul>
742    /// <li>
743    /// <p><code>Create</code> - add a new witness to the global table.</p></li>
744    /// <li>
745    /// <p><code>Delete</code> - remove a witness from the global table.</p></li>
746    /// </ul>
747    /// <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p>
748    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes">Multi-Region strong consistency (MRSC)</a> in the Amazon DynamoDB Developer Guide</p>
749    pub fn global_table_witness_updates(mut self, input: crate::types::GlobalTableWitnessGroupUpdate) -> Self {
750        let mut v = self.global_table_witness_updates.unwrap_or_default();
751                        v.push(input);
752                        self.global_table_witness_updates = ::std::option::Option::Some(v);
753                        self
754    }
755    /// <p>A list of witness updates for a MRSC global table. A witness provides a cost-effective alternative to a full replica in a MRSC global table by maintaining replicated change data written to global table replicas. You cannot perform read or write operations on a witness. For each witness, you can request one action:</p>
756    /// <ul>
757    /// <li>
758    /// <p><code>Create</code> - add a new witness to the global table.</p></li>
759    /// <li>
760    /// <p><code>Delete</code> - remove a witness from the global table.</p></li>
761    /// </ul>
762    /// <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p>
763    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes">Multi-Region strong consistency (MRSC)</a> in the Amazon DynamoDB Developer Guide</p>
764    pub fn set_global_table_witness_updates(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalTableWitnessGroupUpdate>>) -> Self {
765        self.global_table_witness_updates = input; self
766    }
767    /// <p>A list of witness updates for a MRSC global table. A witness provides a cost-effective alternative to a full replica in a MRSC global table by maintaining replicated change data written to global table replicas. You cannot perform read or write operations on a witness. For each witness, you can request one action:</p>
768    /// <ul>
769    /// <li>
770    /// <p><code>Create</code> - add a new witness to the global table.</p></li>
771    /// <li>
772    /// <p><code>Delete</code> - remove a witness from the global table.</p></li>
773    /// </ul>
774    /// <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p>
775    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes">Multi-Region strong consistency (MRSC)</a> in the Amazon DynamoDB Developer Guide</p>
776    pub fn get_global_table_witness_updates(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::GlobalTableWitnessGroupUpdate>> {
777        &self.global_table_witness_updates
778    }
779    /// <p>Updates 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>
780    pub fn on_demand_throughput(mut self, input: crate::types::OnDemandThroughput) -> Self {
781        self.on_demand_throughput = ::std::option::Option::Some(input);
782        self
783    }
784    /// <p>Updates 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>
785    pub fn set_on_demand_throughput(mut self, input: ::std::option::Option<crate::types::OnDemandThroughput>) -> Self {
786        self.on_demand_throughput = input; self
787    }
788    /// <p>Updates 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>
789    pub fn get_on_demand_throughput(&self) -> &::std::option::Option<crate::types::OnDemandThroughput> {
790        &self.on_demand_throughput
791    }
792    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
793    pub fn warm_throughput(mut self, input: crate::types::WarmThroughput) -> Self {
794        self.warm_throughput = ::std::option::Option::Some(input);
795        self
796    }
797    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
798    pub fn set_warm_throughput(mut self, input: ::std::option::Option<crate::types::WarmThroughput>) -> Self {
799        self.warm_throughput = input; self
800    }
801    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
802    pub fn get_warm_throughput(&self) -> &::std::option::Option<crate::types::WarmThroughput> {
803        &self.warm_throughput
804    }
805    /// Consumes the builder and constructs a [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
806    pub fn build(self) -> ::std::result::Result<crate::operation::update_table::UpdateTableInput, ::aws_smithy_types::error::operation::BuildError> {
807        ::std::result::Result::Ok(
808            crate::operation::update_table::UpdateTableInput {
809                attribute_definitions: self.attribute_definitions
810                ,
811                table_name: self.table_name
812                ,
813                billing_mode: self.billing_mode
814                ,
815                provisioned_throughput: self.provisioned_throughput
816                ,
817                global_secondary_index_updates: self.global_secondary_index_updates
818                ,
819                stream_specification: self.stream_specification
820                ,
821                sse_specification: self.sse_specification
822                ,
823                replica_updates: self.replica_updates
824                ,
825                table_class: self.table_class
826                ,
827                deletion_protection_enabled: self.deletion_protection_enabled
828                ,
829                multi_region_consistency: self.multi_region_consistency
830                ,
831                global_table_witness_updates: self.global_table_witness_updates
832                ,
833                on_demand_throughput: self.on_demand_throughput
834                ,
835                warm_throughput: self.warm_throughput
836                ,
837            }
838        )
839    }
840}
841