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><note>
40    /// <p>For global tables, this property only applies to global tables using Version 2019.11.21 (Current version).</p>
41    /// </note>
42    pub replica_updates: ::std::option::Option<::std::vec::Vec::<crate::types::ReplicationGroupUpdate>>,
43    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
44    pub table_class: ::std::option::Option<crate::types::TableClass>,
45    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
46    pub deletion_protection_enabled: ::std::option::Option<bool>,
47    /// <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>
48    /// <p>You can specify one of the following consistency modes:</p>
49    /// <ul>
50    /// <li>
51    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency. This is the default consistency mode for global tables.</p></li>
52    /// <li>
53    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (preview).</p><note>
54    /// <p>Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview mode. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt">Global tables multi-Region strong consistency</a>.</p>
55    /// </note></li>
56    /// </ul>
57    /// <p>If you don't specify this parameter, the global table consistency mode defaults to <code>EVENTUAL</code>.</p>
58    pub multi_region_consistency: ::std::option::Option<crate::types::MultiRegionConsistency>,
59    /// <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>
60    pub on_demand_throughput: ::std::option::Option<crate::types::OnDemandThroughput>,
61    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
62    pub warm_throughput: ::std::option::Option<crate::types::WarmThroughput>,
63}
64impl  UpdateTableInput  {
65    /// <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>
66    /// 
67    /// 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()`.
68    pub fn attribute_definitions(&self) -> &[crate::types::AttributeDefinition] {
69        self.attribute_definitions.as_deref()
70        .unwrap_or_default()
71    }
72    /// <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>
73    pub fn table_name(&self) -> ::std::option::Option<&str> {
74        self.table_name.as_deref()
75    }
76    /// <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>
77    /// <ul>
78    /// <li>
79    /// <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>
80    /// <li>
81    /// <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>
82    /// </ul>
83    pub fn billing_mode(&self) -> ::std::option::Option<&crate::types::BillingMode> {
84        self.billing_mode.as_ref()
85    }
86    /// <p>The new provisioned throughput settings for the specified table or index.</p>
87    pub fn provisioned_throughput(&self) -> ::std::option::Option<&crate::types::ProvisionedThroughput> {
88        self.provisioned_throughput.as_ref()
89    }
90    /// <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>
91    /// <ul>
92    /// <li>
93    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
94    /// <li>
95    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
96    /// <li>
97    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
98    /// </ul>
99    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
100    /// <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>
101    /// 
102    /// 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()`.
103    pub fn global_secondary_index_updates(&self) -> &[crate::types::GlobalSecondaryIndexUpdate] {
104        self.global_secondary_index_updates.as_deref()
105        .unwrap_or_default()
106    }
107    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
108    /// <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>
109    /// </note>
110    pub fn stream_specification(&self) -> ::std::option::Option<&crate::types::StreamSpecification> {
111        self.stream_specification.as_ref()
112    }
113    /// <p>The new server-side encryption settings for the specified table.</p>
114    pub fn sse_specification(&self) -> ::std::option::Option<&crate::types::SseSpecification> {
115        self.sse_specification.as_ref()
116    }
117    /// <p>A list of replica update actions (create, delete, or update) for the table.</p><note>
118    /// <p>For global tables, this property only applies to global tables using Version 2019.11.21 (Current version).</p>
119    /// </note>
120    /// 
121    /// 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()`.
122    pub fn replica_updates(&self) -> &[crate::types::ReplicationGroupUpdate] {
123        self.replica_updates.as_deref()
124        .unwrap_or_default()
125    }
126    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
127    pub fn table_class(&self) -> ::std::option::Option<&crate::types::TableClass> {
128        self.table_class.as_ref()
129    }
130    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
131    pub fn deletion_protection_enabled(&self) -> ::std::option::Option<bool> {
132        self.deletion_protection_enabled
133    }
134    /// <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>
135    /// <p>You can specify one of the following consistency modes:</p>
136    /// <ul>
137    /// <li>
138    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency. This is the default consistency mode for global tables.</p></li>
139    /// <li>
140    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (preview).</p><note>
141    /// <p>Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview mode. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt">Global tables multi-Region strong consistency</a>.</p>
142    /// </note></li>
143    /// </ul>
144    /// <p>If you don't specify this parameter, the global table consistency mode defaults to <code>EVENTUAL</code>.</p>
145    pub fn multi_region_consistency(&self) -> ::std::option::Option<&crate::types::MultiRegionConsistency> {
146        self.multi_region_consistency.as_ref()
147    }
148    /// <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>
149    pub fn on_demand_throughput(&self) -> ::std::option::Option<&crate::types::OnDemandThroughput> {
150        self.on_demand_throughput.as_ref()
151    }
152    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
153    pub fn warm_throughput(&self) -> ::std::option::Option<&crate::types::WarmThroughput> {
154        self.warm_throughput.as_ref()
155    }
156}
157impl UpdateTableInput {
158    /// Creates a new builder-style object to manufacture [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
159    pub fn builder() -> crate::operation::update_table::builders::UpdateTableInputBuilder {
160        crate::operation::update_table::builders::UpdateTableInputBuilder::default()
161    }
162}
163
164/// A builder for [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
165#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
166#[non_exhaustive]
167pub struct UpdateTableInputBuilder {
168    pub(crate) attribute_definitions: ::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>>,
169    pub(crate) table_name: ::std::option::Option<::std::string::String>,
170    pub(crate) billing_mode: ::std::option::Option<crate::types::BillingMode>,
171    pub(crate) provisioned_throughput: ::std::option::Option<crate::types::ProvisionedThroughput>,
172    pub(crate) global_secondary_index_updates: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexUpdate>>,
173    pub(crate) stream_specification: ::std::option::Option<crate::types::StreamSpecification>,
174    pub(crate) sse_specification: ::std::option::Option<crate::types::SseSpecification>,
175    pub(crate) replica_updates: ::std::option::Option<::std::vec::Vec::<crate::types::ReplicationGroupUpdate>>,
176    pub(crate) table_class: ::std::option::Option<crate::types::TableClass>,
177    pub(crate) deletion_protection_enabled: ::std::option::Option<bool>,
178    pub(crate) multi_region_consistency: ::std::option::Option<crate::types::MultiRegionConsistency>,
179    pub(crate) on_demand_throughput: ::std::option::Option<crate::types::OnDemandThroughput>,
180    pub(crate) warm_throughput: ::std::option::Option<crate::types::WarmThroughput>,
181}
182impl UpdateTableInputBuilder {
183    /// Appends an item to `attribute_definitions`.
184    ///
185    /// To override the contents of this collection use [`set_attribute_definitions`](Self::set_attribute_definitions).
186    ///
187    /// <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>
188    pub fn attribute_definitions(mut self, input: crate::types::AttributeDefinition) -> Self {
189        let mut v = self.attribute_definitions.unwrap_or_default();
190                        v.push(input);
191                        self.attribute_definitions = ::std::option::Option::Some(v);
192                        self
193    }
194    /// <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>
195    pub fn set_attribute_definitions(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>>) -> Self {
196        self.attribute_definitions = input; self
197    }
198    /// <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>
199    pub fn get_attribute_definitions(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>> {
200        &self.attribute_definitions
201    }
202    /// <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>
203    /// This field is required.
204    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
205        self.table_name = ::std::option::Option::Some(input.into());
206        self
207    }
208    /// <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>
209    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210        self.table_name = input; self
211    }
212    /// <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>
213    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
214        &self.table_name
215    }
216    /// <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>
217    /// <ul>
218    /// <li>
219    /// <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>
220    /// <li>
221    /// <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>
222    /// </ul>
223    pub fn billing_mode(mut self, input: crate::types::BillingMode) -> Self {
224        self.billing_mode = ::std::option::Option::Some(input);
225        self
226    }
227    /// <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>
228    /// <ul>
229    /// <li>
230    /// <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>
231    /// <li>
232    /// <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>
233    /// </ul>
234    pub fn set_billing_mode(mut self, input: ::std::option::Option<crate::types::BillingMode>) -> Self {
235        self.billing_mode = input; self
236    }
237    /// <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>
238    /// <ul>
239    /// <li>
240    /// <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>
241    /// <li>
242    /// <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>
243    /// </ul>
244    pub fn get_billing_mode(&self) -> &::std::option::Option<crate::types::BillingMode> {
245        &self.billing_mode
246    }
247    /// <p>The new provisioned throughput settings for the specified table or index.</p>
248    pub fn provisioned_throughput(mut self, input: crate::types::ProvisionedThroughput) -> Self {
249        self.provisioned_throughput = ::std::option::Option::Some(input);
250        self
251    }
252    /// <p>The new provisioned throughput settings for the specified table or index.</p>
253    pub fn set_provisioned_throughput(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughput>) -> Self {
254        self.provisioned_throughput = input; self
255    }
256    /// <p>The new provisioned throughput settings for the specified table or index.</p>
257    pub fn get_provisioned_throughput(&self) -> &::std::option::Option<crate::types::ProvisionedThroughput> {
258        &self.provisioned_throughput
259    }
260    /// Appends an item to `global_secondary_index_updates`.
261    ///
262    /// To override the contents of this collection use [`set_global_secondary_index_updates`](Self::set_global_secondary_index_updates).
263    ///
264    /// <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>
265    /// <ul>
266    /// <li>
267    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
268    /// <li>
269    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
270    /// <li>
271    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
272    /// </ul>
273    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
274    /// <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>
275    pub fn global_secondary_index_updates(mut self, input: crate::types::GlobalSecondaryIndexUpdate) -> Self {
276        let mut v = self.global_secondary_index_updates.unwrap_or_default();
277                        v.push(input);
278                        self.global_secondary_index_updates = ::std::option::Option::Some(v);
279                        self
280    }
281    /// <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>
282    /// <ul>
283    /// <li>
284    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
285    /// <li>
286    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
287    /// <li>
288    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
289    /// </ul>
290    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
291    /// <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>
292    pub fn set_global_secondary_index_updates(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexUpdate>>) -> Self {
293        self.global_secondary_index_updates = input; self
294    }
295    /// <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>
296    /// <ul>
297    /// <li>
298    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
299    /// <li>
300    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
301    /// <li>
302    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
303    /// </ul>
304    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
305    /// <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>
306    pub fn get_global_secondary_index_updates(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexUpdate>> {
307        &self.global_secondary_index_updates
308    }
309    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
310    /// <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>
311    /// </note>
312    pub fn stream_specification(mut self, input: crate::types::StreamSpecification) -> Self {
313        self.stream_specification = ::std::option::Option::Some(input);
314        self
315    }
316    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
317    /// <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>
318    /// </note>
319    pub fn set_stream_specification(mut self, input: ::std::option::Option<crate::types::StreamSpecification>) -> Self {
320        self.stream_specification = input; self
321    }
322    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
323    /// <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>
324    /// </note>
325    pub fn get_stream_specification(&self) -> &::std::option::Option<crate::types::StreamSpecification> {
326        &self.stream_specification
327    }
328    /// <p>The new server-side encryption settings for the specified table.</p>
329    pub fn sse_specification(mut self, input: crate::types::SseSpecification) -> Self {
330        self.sse_specification = ::std::option::Option::Some(input);
331        self
332    }
333    /// <p>The new server-side encryption settings for the specified table.</p>
334    pub fn set_sse_specification(mut self, input: ::std::option::Option<crate::types::SseSpecification>) -> Self {
335        self.sse_specification = input; self
336    }
337    /// <p>The new server-side encryption settings for the specified table.</p>
338    pub fn get_sse_specification(&self) -> &::std::option::Option<crate::types::SseSpecification> {
339        &self.sse_specification
340    }
341    /// Appends an item to `replica_updates`.
342    ///
343    /// To override the contents of this collection use [`set_replica_updates`](Self::set_replica_updates).
344    ///
345    /// <p>A list of replica update actions (create, delete, or update) for the table.</p><note>
346    /// <p>For global tables, this property only applies to global tables using Version 2019.11.21 (Current version).</p>
347    /// </note>
348    pub fn replica_updates(mut self, input: crate::types::ReplicationGroupUpdate) -> Self {
349        let mut v = self.replica_updates.unwrap_or_default();
350                        v.push(input);
351                        self.replica_updates = ::std::option::Option::Some(v);
352                        self
353    }
354    /// <p>A list of replica update actions (create, delete, or update) for the table.</p><note>
355    /// <p>For global tables, this property only applies to global tables using Version 2019.11.21 (Current version).</p>
356    /// </note>
357    pub fn set_replica_updates(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::ReplicationGroupUpdate>>) -> Self {
358        self.replica_updates = input; self
359    }
360    /// <p>A list of replica update actions (create, delete, or update) for the table.</p><note>
361    /// <p>For global tables, this property only applies to global tables using Version 2019.11.21 (Current version).</p>
362    /// </note>
363    pub fn get_replica_updates(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::ReplicationGroupUpdate>> {
364        &self.replica_updates
365    }
366    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
367    pub fn table_class(mut self, input: crate::types::TableClass) -> Self {
368        self.table_class = ::std::option::Option::Some(input);
369        self
370    }
371    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
372    pub fn set_table_class(mut self, input: ::std::option::Option<crate::types::TableClass>) -> Self {
373        self.table_class = input; self
374    }
375    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
376    pub fn get_table_class(&self) -> &::std::option::Option<crate::types::TableClass> {
377        &self.table_class
378    }
379    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
380    pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
381        self.deletion_protection_enabled = ::std::option::Option::Some(input);
382        self
383    }
384    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
385    pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
386        self.deletion_protection_enabled = input; self
387    }
388    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
389    pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
390        &self.deletion_protection_enabled
391    }
392    /// <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>
393    /// <p>You can specify one of the following consistency modes:</p>
394    /// <ul>
395    /// <li>
396    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency. This is the default consistency mode for global tables.</p></li>
397    /// <li>
398    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (preview).</p><note>
399    /// <p>Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview mode. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt">Global tables multi-Region strong consistency</a>.</p>
400    /// </note></li>
401    /// </ul>
402    /// <p>If you don't specify this parameter, the global table consistency mode defaults to <code>EVENTUAL</code>.</p>
403    pub fn multi_region_consistency(mut self, input: crate::types::MultiRegionConsistency) -> Self {
404        self.multi_region_consistency = ::std::option::Option::Some(input);
405        self
406    }
407    /// <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>
408    /// <p>You can specify one of the following consistency modes:</p>
409    /// <ul>
410    /// <li>
411    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency. This is the default consistency mode for global tables.</p></li>
412    /// <li>
413    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (preview).</p><note>
414    /// <p>Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview mode. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt">Global tables multi-Region strong consistency</a>.</p>
415    /// </note></li>
416    /// </ul>
417    /// <p>If you don't specify this parameter, the global table consistency mode defaults to <code>EVENTUAL</code>.</p>
418    pub fn set_multi_region_consistency(mut self, input: ::std::option::Option<crate::types::MultiRegionConsistency>) -> Self {
419        self.multi_region_consistency = input; self
420    }
421    /// <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>
422    /// <p>You can specify one of the following consistency modes:</p>
423    /// <ul>
424    /// <li>
425    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency. This is the default consistency mode for global tables.</p></li>
426    /// <li>
427    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (preview).</p><note>
428    /// <p>Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview mode. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt">Global tables multi-Region strong consistency</a>.</p>
429    /// </note></li>
430    /// </ul>
431    /// <p>If you don't specify this parameter, the global table consistency mode defaults to <code>EVENTUAL</code>.</p>
432    pub fn get_multi_region_consistency(&self) -> &::std::option::Option<crate::types::MultiRegionConsistency> {
433        &self.multi_region_consistency
434    }
435    /// <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>
436    pub fn on_demand_throughput(mut self, input: crate::types::OnDemandThroughput) -> Self {
437        self.on_demand_throughput = ::std::option::Option::Some(input);
438        self
439    }
440    /// <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>
441    pub fn set_on_demand_throughput(mut self, input: ::std::option::Option<crate::types::OnDemandThroughput>) -> Self {
442        self.on_demand_throughput = input; self
443    }
444    /// <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>
445    pub fn get_on_demand_throughput(&self) -> &::std::option::Option<crate::types::OnDemandThroughput> {
446        &self.on_demand_throughput
447    }
448    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
449    pub fn warm_throughput(mut self, input: crate::types::WarmThroughput) -> Self {
450        self.warm_throughput = ::std::option::Option::Some(input);
451        self
452    }
453    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
454    pub fn set_warm_throughput(mut self, input: ::std::option::Option<crate::types::WarmThroughput>) -> Self {
455        self.warm_throughput = input; self
456    }
457    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
458    pub fn get_warm_throughput(&self) -> &::std::option::Option<crate::types::WarmThroughput> {
459        &self.warm_throughput
460    }
461    /// Consumes the builder and constructs a [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
462    pub fn build(self) -> ::std::result::Result<crate::operation::update_table::UpdateTableInput, ::aws_smithy_types::error::operation::BuildError> {
463        ::std::result::Result::Ok(
464            crate::operation::update_table::UpdateTableInput {
465                attribute_definitions: self.attribute_definitions
466                ,
467                table_name: self.table_name
468                ,
469                billing_mode: self.billing_mode
470                ,
471                provisioned_throughput: self.provisioned_throughput
472                ,
473                global_secondary_index_updates: self.global_secondary_index_updates
474                ,
475                stream_specification: self.stream_specification
476                ,
477                sse_specification: self.sse_specification
478                ,
479                replica_updates: self.replica_updates
480                ,
481                table_class: self.table_class
482                ,
483                deletion_protection_enabled: self.deletion_protection_enabled
484                ,
485                multi_region_consistency: self.multi_region_consistency
486                ,
487                on_demand_throughput: self.on_demand_throughput
488                ,
489                warm_throughput: self.warm_throughput
490                ,
491            }
492        )
493    }
494}
495