aws_sdk_dynamodb/operation/update_item/
_update_item_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>UpdateItem</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateItemInput  {
7    /// <p>The name of the table containing the item to update. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
8    pub table_name: ::std::option::Option<::std::string::String>,
9    /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
10    /// <p>For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for both the partition key and the sort key.</p>
11    pub key: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>,
12    /// <p>This is a legacy parameter. Use <code>UpdateExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributeUpdates.html">AttributeUpdates</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
13    pub attribute_updates: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValueUpdate>>,
14    /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html">Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
15    pub expected: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::ExpectedAttributeValue>>,
16    /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html">ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
17    pub conditional_operator: ::std::option::Option<crate::types::ConditionalOperator>,
18    /// <p>Use <code>ReturnValues</code> if you want to get the item attributes as they appear before or after they are successfully updated. For <code>UpdateItem</code>, the valid values are:</p>
19    /// <ul>
20    /// <li>
21    /// <p><code>NONE</code> - If <code>ReturnValues</code> is not specified, or if its value is <code>NONE</code>, then nothing is returned. (This setting is the default for <code>ReturnValues</code>.)</p></li>
22    /// <li>
23    /// <p><code>ALL_OLD</code> - Returns all of the attributes of the item, as they appeared before the UpdateItem operation.</p></li>
24    /// <li>
25    /// <p><code>UPDATED_OLD</code> - Returns only the updated attributes, as they appeared before the UpdateItem operation.</p></li>
26    /// <li>
27    /// <p><code>ALL_NEW</code> - Returns all of the attributes of the item, as they appear after the UpdateItem operation.</p></li>
28    /// <li>
29    /// <p><code>UPDATED_NEW</code> - Returns only the updated attributes, as they appear after the UpdateItem operation.</p></li>
30    /// </ul>
31    /// <p>There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No read capacity units are consumed.</p>
32    /// <p>The values returned are strongly consistent.</p>
33    pub return_values: ::std::option::Option<crate::types::ReturnValue>,
34    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
35    /// <ul>
36    /// <li>
37    /// <p><code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p>
38    /// <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p></li>
39    /// <li>
40    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
41    /// <li>
42    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
43    /// </ul>
44    pub return_consumed_capacity: ::std::option::Option<crate::types::ReturnConsumedCapacity>,
45    /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
46    pub return_item_collection_metrics: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>,
47    /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them.</p>
48    /// <p>The following action values are available for <code>UpdateExpression</code>.</p>
49    /// <ul>
50    /// <li>
51    /// <p><code>SET</code> - Adds one or more attributes and values to an item. If any of these attributes already exist, they are replaced by the new values. You can also use <code>SET</code> to add or subtract from an attribute that is of type Number. For example: <code>SET myNum = myNum + :val</code></p>
52    /// <p><code>SET</code> supports the following functions:</p>
53    /// <ul>
54    /// <li>
55    /// <p><code>if_not_exists (path, operand)</code> - if the item does not contain an attribute at the specified path, then <code>if_not_exists</code> evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute that may already be present in the item.</p></li>
56    /// <li>
57    /// <p><code>list_append (operand, operand)</code> - evaluates to a list with a new element added to it. You can append the new element to the start or the end of the list by reversing the order of the operands.</p></li>
58    /// </ul>
59    /// <p>These function names are case-sensitive.</p></li>
60    /// <li>
61    /// <p><code>REMOVE</code> - Removes one or more attributes from an item.</p></li>
62    /// <li>
63    /// <p><code>ADD</code> - Adds the specified value to the item, if the attribute does not already exist. If the attribute does exist, then the behavior of <code>ADD</code> depends on the data type of the attribute:</p>
64    /// <ul>
65    /// <li>
66    /// <p>If the existing attribute is a number, and if <code>Value</code> is also a number, then <code>Value</code> is mathematically added to the existing attribute. If <code>Value</code> is a negative number, then it is subtracted from the existing attribute.</p><note>
67    /// <p>If you use <code>ADD</code> to increment or decrement a number value for an item that doesn't exist before the update, DynamoDB uses <code>0</code> as the initial value.</p>
68    /// <p>Similarly, if you use <code>ADD</code> for an existing item to increment or decrement an attribute value that doesn't exist before the update, DynamoDB uses <code>0</code> as the initial value. For example, suppose that the item you want to update doesn't have an attribute named <code>itemcount</code>, but you decide to <code>ADD</code> the number <code>3</code> to this attribute anyway. DynamoDB will create the <code>itemcount</code> attribute, set its initial value to <code>0</code>, and finally add <code>3</code> to it. The result will be a new <code>itemcount</code> attribute in the item, with a value of <code>3</code>.</p>
69    /// </note></li>
70    /// <li>
71    /// <p>If the existing data type is a set and if <code>Value</code> is also a set, then <code>Value</code> is added to the existing set. For example, if the attribute value is the set <code>\[1,2\]</code>, and the <code>ADD</code> action specified <code>\[3\]</code>, then the final attribute value is <code>\[1,2,3\]</code>. An error occurs if an <code>ADD</code> action is specified for a set attribute and the attribute type specified does not match the existing set type.</p>
72    /// <p>Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the <code>Value</code> must also be a set of strings.</p></li>
73    /// </ul><important>
74    /// <p>The <code>ADD</code> action only supports Number and set data types. In addition, <code>ADD</code> can only be used on top-level attributes, not nested attributes.</p>
75    /// </important></li>
76    /// <li>
77    /// <p><code>DELETE</code> - Deletes an element from a set.</p>
78    /// <p>If a set of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set <code>\[a,b,c\]</code> and the <code>DELETE</code> action specifies <code>\[a,c\]</code>, then the final attribute value is <code>\[b\]</code>. Specifying an empty set is an error.</p><important>
79    /// <p>The <code>DELETE</code> action only supports set data types. In addition, <code>DELETE</code> can only be used on top-level attributes, not nested attributes.</p>
80    /// </important></li>
81    /// </ul>
82    /// <p>You can have many actions in a single expression, such as the following: <code>SET a=:value1, b=:value2 DELETE :value3, :value4, :value5</code></p>
83    /// <p>For more information on update expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html">Modifying Items and Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
84    pub update_expression: ::std::option::Option<::std::string::String>,
85    /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
86    /// <p>An expression can contain any of the following:</p>
87    /// <ul>
88    /// <li>
89    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
90    /// <p>These function names are case-sensitive.</p></li>
91    /// <li>
92    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
93    /// <li>
94    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
95    /// </ul>
96    /// <p>For more information about condition expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Specifying Conditions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
97    pub condition_expression: ::std::option::Option<::std::string::String>,
98    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
99    /// <ul>
100    /// <li>
101    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
102    /// <li>
103    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
104    /// <li>
105    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
106    /// </ul>
107    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
108    /// <ul>
109    /// <li>
110    /// <p><code>Percentile</code></p></li>
111    /// </ul>
112    /// <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>.) To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p>
113    /// <ul>
114    /// <li>
115    /// <p><code>{"#P":"Percentile"}</code></p></li>
116    /// </ul>
117    /// <p>You could then use this substitution in an expression, as in this example:</p>
118    /// <ul>
119    /// <li>
120    /// <p><code>#P = :val</code></p></li>
121    /// </ul><note>
122    /// <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p>
123    /// </note>
124    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Specifying Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
125    pub expression_attribute_names: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::string::String>>,
126    /// <p>One or more values that can be substituted in an expression.</p>
127    /// <p>Use the <b>:</b> (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the <code>ProductStatus</code> attribute was one of the following:</p>
128    /// <p><code>Available | Backordered | Discontinued</code></p>
129    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
130    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
131    /// <p>You could then use these values in an expression, such as this:</p>
132    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
133    /// <p>For more information on expression attribute values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Condition Expressions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
134    pub expression_attribute_values: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>,
135    /// <p>An optional parameter that returns the item attributes for an <code>UpdateItem</code> operation that failed a condition check.</p>
136    /// <p>There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No read capacity units are consumed.</p>
137    pub return_values_on_condition_check_failure: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>,
138}
139impl  UpdateItemInput  {
140    /// <p>The name of the table containing the item to update. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
141    pub fn table_name(&self) -> ::std::option::Option<&str> {
142        self.table_name.as_deref()
143    }
144    /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
145    /// <p>For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for both the partition key and the sort key.</p>
146    pub fn key(&self) -> ::std::option::Option<&::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>> {
147        self.key.as_ref()
148    }
149    /// <p>This is a legacy parameter. Use <code>UpdateExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributeUpdates.html">AttributeUpdates</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
150    pub fn attribute_updates(&self) -> ::std::option::Option<&::std::collections::HashMap::<::std::string::String, crate::types::AttributeValueUpdate>> {
151        self.attribute_updates.as_ref()
152    }
153    /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html">Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
154    pub fn expected(&self) -> ::std::option::Option<&::std::collections::HashMap::<::std::string::String, crate::types::ExpectedAttributeValue>> {
155        self.expected.as_ref()
156    }
157    /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html">ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
158    pub fn conditional_operator(&self) -> ::std::option::Option<&crate::types::ConditionalOperator> {
159        self.conditional_operator.as_ref()
160    }
161    /// <p>Use <code>ReturnValues</code> if you want to get the item attributes as they appear before or after they are successfully updated. For <code>UpdateItem</code>, the valid values are:</p>
162    /// <ul>
163    /// <li>
164    /// <p><code>NONE</code> - If <code>ReturnValues</code> is not specified, or if its value is <code>NONE</code>, then nothing is returned. (This setting is the default for <code>ReturnValues</code>.)</p></li>
165    /// <li>
166    /// <p><code>ALL_OLD</code> - Returns all of the attributes of the item, as they appeared before the UpdateItem operation.</p></li>
167    /// <li>
168    /// <p><code>UPDATED_OLD</code> - Returns only the updated attributes, as they appeared before the UpdateItem operation.</p></li>
169    /// <li>
170    /// <p><code>ALL_NEW</code> - Returns all of the attributes of the item, as they appear after the UpdateItem operation.</p></li>
171    /// <li>
172    /// <p><code>UPDATED_NEW</code> - Returns only the updated attributes, as they appear after the UpdateItem operation.</p></li>
173    /// </ul>
174    /// <p>There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No read capacity units are consumed.</p>
175    /// <p>The values returned are strongly consistent.</p>
176    pub fn return_values(&self) -> ::std::option::Option<&crate::types::ReturnValue> {
177        self.return_values.as_ref()
178    }
179    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
180    /// <ul>
181    /// <li>
182    /// <p><code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p>
183    /// <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p></li>
184    /// <li>
185    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
186    /// <li>
187    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
188    /// </ul>
189    pub fn return_consumed_capacity(&self) -> ::std::option::Option<&crate::types::ReturnConsumedCapacity> {
190        self.return_consumed_capacity.as_ref()
191    }
192    /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
193    pub fn return_item_collection_metrics(&self) -> ::std::option::Option<&crate::types::ReturnItemCollectionMetrics> {
194        self.return_item_collection_metrics.as_ref()
195    }
196    /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them.</p>
197    /// <p>The following action values are available for <code>UpdateExpression</code>.</p>
198    /// <ul>
199    /// <li>
200    /// <p><code>SET</code> - Adds one or more attributes and values to an item. If any of these attributes already exist, they are replaced by the new values. You can also use <code>SET</code> to add or subtract from an attribute that is of type Number. For example: <code>SET myNum = myNum + :val</code></p>
201    /// <p><code>SET</code> supports the following functions:</p>
202    /// <ul>
203    /// <li>
204    /// <p><code>if_not_exists (path, operand)</code> - if the item does not contain an attribute at the specified path, then <code>if_not_exists</code> evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute that may already be present in the item.</p></li>
205    /// <li>
206    /// <p><code>list_append (operand, operand)</code> - evaluates to a list with a new element added to it. You can append the new element to the start or the end of the list by reversing the order of the operands.</p></li>
207    /// </ul>
208    /// <p>These function names are case-sensitive.</p></li>
209    /// <li>
210    /// <p><code>REMOVE</code> - Removes one or more attributes from an item.</p></li>
211    /// <li>
212    /// <p><code>ADD</code> - Adds the specified value to the item, if the attribute does not already exist. If the attribute does exist, then the behavior of <code>ADD</code> depends on the data type of the attribute:</p>
213    /// <ul>
214    /// <li>
215    /// <p>If the existing attribute is a number, and if <code>Value</code> is also a number, then <code>Value</code> is mathematically added to the existing attribute. If <code>Value</code> is a negative number, then it is subtracted from the existing attribute.</p><note>
216    /// <p>If you use <code>ADD</code> to increment or decrement a number value for an item that doesn't exist before the update, DynamoDB uses <code>0</code> as the initial value.</p>
217    /// <p>Similarly, if you use <code>ADD</code> for an existing item to increment or decrement an attribute value that doesn't exist before the update, DynamoDB uses <code>0</code> as the initial value. For example, suppose that the item you want to update doesn't have an attribute named <code>itemcount</code>, but you decide to <code>ADD</code> the number <code>3</code> to this attribute anyway. DynamoDB will create the <code>itemcount</code> attribute, set its initial value to <code>0</code>, and finally add <code>3</code> to it. The result will be a new <code>itemcount</code> attribute in the item, with a value of <code>3</code>.</p>
218    /// </note></li>
219    /// <li>
220    /// <p>If the existing data type is a set and if <code>Value</code> is also a set, then <code>Value</code> is added to the existing set. For example, if the attribute value is the set <code>\[1,2\]</code>, and the <code>ADD</code> action specified <code>\[3\]</code>, then the final attribute value is <code>\[1,2,3\]</code>. An error occurs if an <code>ADD</code> action is specified for a set attribute and the attribute type specified does not match the existing set type.</p>
221    /// <p>Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the <code>Value</code> must also be a set of strings.</p></li>
222    /// </ul><important>
223    /// <p>The <code>ADD</code> action only supports Number and set data types. In addition, <code>ADD</code> can only be used on top-level attributes, not nested attributes.</p>
224    /// </important></li>
225    /// <li>
226    /// <p><code>DELETE</code> - Deletes an element from a set.</p>
227    /// <p>If a set of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set <code>\[a,b,c\]</code> and the <code>DELETE</code> action specifies <code>\[a,c\]</code>, then the final attribute value is <code>\[b\]</code>. Specifying an empty set is an error.</p><important>
228    /// <p>The <code>DELETE</code> action only supports set data types. In addition, <code>DELETE</code> can only be used on top-level attributes, not nested attributes.</p>
229    /// </important></li>
230    /// </ul>
231    /// <p>You can have many actions in a single expression, such as the following: <code>SET a=:value1, b=:value2 DELETE :value3, :value4, :value5</code></p>
232    /// <p>For more information on update expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html">Modifying Items and Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
233    pub fn update_expression(&self) -> ::std::option::Option<&str> {
234        self.update_expression.as_deref()
235    }
236    /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
237    /// <p>An expression can contain any of the following:</p>
238    /// <ul>
239    /// <li>
240    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
241    /// <p>These function names are case-sensitive.</p></li>
242    /// <li>
243    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
244    /// <li>
245    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
246    /// </ul>
247    /// <p>For more information about condition expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Specifying Conditions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
248    pub fn condition_expression(&self) -> ::std::option::Option<&str> {
249        self.condition_expression.as_deref()
250    }
251    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
252    /// <ul>
253    /// <li>
254    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
255    /// <li>
256    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
257    /// <li>
258    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
259    /// </ul>
260    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
261    /// <ul>
262    /// <li>
263    /// <p><code>Percentile</code></p></li>
264    /// </ul>
265    /// <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>.) To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p>
266    /// <ul>
267    /// <li>
268    /// <p><code>{"#P":"Percentile"}</code></p></li>
269    /// </ul>
270    /// <p>You could then use this substitution in an expression, as in this example:</p>
271    /// <ul>
272    /// <li>
273    /// <p><code>#P = :val</code></p></li>
274    /// </ul><note>
275    /// <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p>
276    /// </note>
277    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Specifying Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
278    pub fn expression_attribute_names(&self) -> ::std::option::Option<&::std::collections::HashMap::<::std::string::String, ::std::string::String>> {
279        self.expression_attribute_names.as_ref()
280    }
281    /// <p>One or more values that can be substituted in an expression.</p>
282    /// <p>Use the <b>:</b> (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the <code>ProductStatus</code> attribute was one of the following:</p>
283    /// <p><code>Available | Backordered | Discontinued</code></p>
284    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
285    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
286    /// <p>You could then use these values in an expression, such as this:</p>
287    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
288    /// <p>For more information on expression attribute values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Condition Expressions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
289    pub fn expression_attribute_values(&self) -> ::std::option::Option<&::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>> {
290        self.expression_attribute_values.as_ref()
291    }
292    /// <p>An optional parameter that returns the item attributes for an <code>UpdateItem</code> operation that failed a condition check.</p>
293    /// <p>There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No read capacity units are consumed.</p>
294    pub fn return_values_on_condition_check_failure(&self) -> ::std::option::Option<&crate::types::ReturnValuesOnConditionCheckFailure> {
295        self.return_values_on_condition_check_failure.as_ref()
296    }
297}
298impl UpdateItemInput {
299    /// Creates a new builder-style object to manufacture [`UpdateItemInput`](crate::operation::update_item::UpdateItemInput).
300    pub fn builder() -> crate::operation::update_item::builders::UpdateItemInputBuilder {
301        crate::operation::update_item::builders::UpdateItemInputBuilder::default()
302    }
303}
304
305/// A builder for [`UpdateItemInput`](crate::operation::update_item::UpdateItemInput).
306#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
307#[non_exhaustive]
308pub struct UpdateItemInputBuilder {
309    pub(crate) table_name: ::std::option::Option<::std::string::String>,
310    pub(crate) key: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>,
311    pub(crate) attribute_updates: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValueUpdate>>,
312    pub(crate) expected: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::ExpectedAttributeValue>>,
313    pub(crate) conditional_operator: ::std::option::Option<crate::types::ConditionalOperator>,
314    pub(crate) return_values: ::std::option::Option<crate::types::ReturnValue>,
315    pub(crate) return_consumed_capacity: ::std::option::Option<crate::types::ReturnConsumedCapacity>,
316    pub(crate) return_item_collection_metrics: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>,
317    pub(crate) update_expression: ::std::option::Option<::std::string::String>,
318    pub(crate) condition_expression: ::std::option::Option<::std::string::String>,
319    pub(crate) expression_attribute_names: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::string::String>>,
320    pub(crate) expression_attribute_values: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>,
321    pub(crate) return_values_on_condition_check_failure: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>,
322}
323impl UpdateItemInputBuilder {
324    /// <p>The name of the table containing the item to update. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
325    /// This field is required.
326    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
327        self.table_name = ::std::option::Option::Some(input.into());
328        self
329    }
330    /// <p>The name of the table containing the item to update. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
331    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
332        self.table_name = input; self
333    }
334    /// <p>The name of the table containing the item to update. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
335    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
336        &self.table_name
337    }
338    /// Adds a key-value pair to `key`.
339    ///
340    /// To override the contents of this collection use [`set_key`](Self::set_key).
341    ///
342    /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
343    /// <p>For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for both the partition key and the sort key.</p>
344    pub fn key(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
345        let mut hash_map = self.key.unwrap_or_default();
346                        hash_map.insert(k.into(), v);
347                        self.key = ::std::option::Option::Some(hash_map);
348                        self
349    }
350    /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
351    /// <p>For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for both the partition key and the sort key.</p>
352    pub fn set_key(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>) -> Self {
353        self.key = input; self
354    }
355    /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
356    /// <p>For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for both the partition key and the sort key.</p>
357    pub fn get_key(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>> {
358        &self.key
359    }
360    /// Adds a key-value pair to `attribute_updates`.
361    ///
362    /// To override the contents of this collection use [`set_attribute_updates`](Self::set_attribute_updates).
363    ///
364    /// <p>This is a legacy parameter. Use <code>UpdateExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributeUpdates.html">AttributeUpdates</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
365    pub fn attribute_updates(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValueUpdate) -> Self {
366        let mut hash_map = self.attribute_updates.unwrap_or_default();
367                        hash_map.insert(k.into(), v);
368                        self.attribute_updates = ::std::option::Option::Some(hash_map);
369                        self
370    }
371    /// <p>This is a legacy parameter. Use <code>UpdateExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributeUpdates.html">AttributeUpdates</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
372    pub fn set_attribute_updates(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValueUpdate>>) -> Self {
373        self.attribute_updates = input; self
374    }
375    /// <p>This is a legacy parameter. Use <code>UpdateExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributeUpdates.html">AttributeUpdates</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
376    pub fn get_attribute_updates(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValueUpdate>> {
377        &self.attribute_updates
378    }
379    /// Adds a key-value pair to `expected`.
380    ///
381    /// To override the contents of this collection use [`set_expected`](Self::set_expected).
382    ///
383    /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html">Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
384    pub fn expected(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ExpectedAttributeValue) -> Self {
385        let mut hash_map = self.expected.unwrap_or_default();
386                        hash_map.insert(k.into(), v);
387                        self.expected = ::std::option::Option::Some(hash_map);
388                        self
389    }
390    /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html">Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
391    pub fn set_expected(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::ExpectedAttributeValue>>) -> Self {
392        self.expected = input; self
393    }
394    /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html">Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
395    pub fn get_expected(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::ExpectedAttributeValue>> {
396        &self.expected
397    }
398    /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html">ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
399    pub fn conditional_operator(mut self, input: crate::types::ConditionalOperator) -> Self {
400        self.conditional_operator = ::std::option::Option::Some(input);
401        self
402    }
403    /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html">ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
404    pub fn set_conditional_operator(mut self, input: ::std::option::Option<crate::types::ConditionalOperator>) -> Self {
405        self.conditional_operator = input; self
406    }
407    /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html">ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
408    pub fn get_conditional_operator(&self) -> &::std::option::Option<crate::types::ConditionalOperator> {
409        &self.conditional_operator
410    }
411    /// <p>Use <code>ReturnValues</code> if you want to get the item attributes as they appear before or after they are successfully updated. For <code>UpdateItem</code>, the valid values are:</p>
412    /// <ul>
413    /// <li>
414    /// <p><code>NONE</code> - If <code>ReturnValues</code> is not specified, or if its value is <code>NONE</code>, then nothing is returned. (This setting is the default for <code>ReturnValues</code>.)</p></li>
415    /// <li>
416    /// <p><code>ALL_OLD</code> - Returns all of the attributes of the item, as they appeared before the UpdateItem operation.</p></li>
417    /// <li>
418    /// <p><code>UPDATED_OLD</code> - Returns only the updated attributes, as they appeared before the UpdateItem operation.</p></li>
419    /// <li>
420    /// <p><code>ALL_NEW</code> - Returns all of the attributes of the item, as they appear after the UpdateItem operation.</p></li>
421    /// <li>
422    /// <p><code>UPDATED_NEW</code> - Returns only the updated attributes, as they appear after the UpdateItem operation.</p></li>
423    /// </ul>
424    /// <p>There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No read capacity units are consumed.</p>
425    /// <p>The values returned are strongly consistent.</p>
426    pub fn return_values(mut self, input: crate::types::ReturnValue) -> Self {
427        self.return_values = ::std::option::Option::Some(input);
428        self
429    }
430    /// <p>Use <code>ReturnValues</code> if you want to get the item attributes as they appear before or after they are successfully updated. For <code>UpdateItem</code>, the valid values are:</p>
431    /// <ul>
432    /// <li>
433    /// <p><code>NONE</code> - If <code>ReturnValues</code> is not specified, or if its value is <code>NONE</code>, then nothing is returned. (This setting is the default for <code>ReturnValues</code>.)</p></li>
434    /// <li>
435    /// <p><code>ALL_OLD</code> - Returns all of the attributes of the item, as they appeared before the UpdateItem operation.</p></li>
436    /// <li>
437    /// <p><code>UPDATED_OLD</code> - Returns only the updated attributes, as they appeared before the UpdateItem operation.</p></li>
438    /// <li>
439    /// <p><code>ALL_NEW</code> - Returns all of the attributes of the item, as they appear after the UpdateItem operation.</p></li>
440    /// <li>
441    /// <p><code>UPDATED_NEW</code> - Returns only the updated attributes, as they appear after the UpdateItem operation.</p></li>
442    /// </ul>
443    /// <p>There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No read capacity units are consumed.</p>
444    /// <p>The values returned are strongly consistent.</p>
445    pub fn set_return_values(mut self, input: ::std::option::Option<crate::types::ReturnValue>) -> Self {
446        self.return_values = input; self
447    }
448    /// <p>Use <code>ReturnValues</code> if you want to get the item attributes as they appear before or after they are successfully updated. For <code>UpdateItem</code>, the valid values are:</p>
449    /// <ul>
450    /// <li>
451    /// <p><code>NONE</code> - If <code>ReturnValues</code> is not specified, or if its value is <code>NONE</code>, then nothing is returned. (This setting is the default for <code>ReturnValues</code>.)</p></li>
452    /// <li>
453    /// <p><code>ALL_OLD</code> - Returns all of the attributes of the item, as they appeared before the UpdateItem operation.</p></li>
454    /// <li>
455    /// <p><code>UPDATED_OLD</code> - Returns only the updated attributes, as they appeared before the UpdateItem operation.</p></li>
456    /// <li>
457    /// <p><code>ALL_NEW</code> - Returns all of the attributes of the item, as they appear after the UpdateItem operation.</p></li>
458    /// <li>
459    /// <p><code>UPDATED_NEW</code> - Returns only the updated attributes, as they appear after the UpdateItem operation.</p></li>
460    /// </ul>
461    /// <p>There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No read capacity units are consumed.</p>
462    /// <p>The values returned are strongly consistent.</p>
463    pub fn get_return_values(&self) -> &::std::option::Option<crate::types::ReturnValue> {
464        &self.return_values
465    }
466    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
467    /// <ul>
468    /// <li>
469    /// <p><code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p>
470    /// <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p></li>
471    /// <li>
472    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
473    /// <li>
474    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
475    /// </ul>
476    pub fn return_consumed_capacity(mut self, input: crate::types::ReturnConsumedCapacity) -> Self {
477        self.return_consumed_capacity = ::std::option::Option::Some(input);
478        self
479    }
480    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
481    /// <ul>
482    /// <li>
483    /// <p><code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p>
484    /// <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p></li>
485    /// <li>
486    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
487    /// <li>
488    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
489    /// </ul>
490    pub fn set_return_consumed_capacity(mut self, input: ::std::option::Option<crate::types::ReturnConsumedCapacity>) -> Self {
491        self.return_consumed_capacity = input; self
492    }
493    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
494    /// <ul>
495    /// <li>
496    /// <p><code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p>
497    /// <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p></li>
498    /// <li>
499    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
500    /// <li>
501    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
502    /// </ul>
503    pub fn get_return_consumed_capacity(&self) -> &::std::option::Option<crate::types::ReturnConsumedCapacity> {
504        &self.return_consumed_capacity
505    }
506    /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
507    pub fn return_item_collection_metrics(mut self, input: crate::types::ReturnItemCollectionMetrics) -> Self {
508        self.return_item_collection_metrics = ::std::option::Option::Some(input);
509        self
510    }
511    /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
512    pub fn set_return_item_collection_metrics(mut self, input: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>) -> Self {
513        self.return_item_collection_metrics = input; self
514    }
515    /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
516    pub fn get_return_item_collection_metrics(&self) -> &::std::option::Option<crate::types::ReturnItemCollectionMetrics> {
517        &self.return_item_collection_metrics
518    }
519    /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them.</p>
520    /// <p>The following action values are available for <code>UpdateExpression</code>.</p>
521    /// <ul>
522    /// <li>
523    /// <p><code>SET</code> - Adds one or more attributes and values to an item. If any of these attributes already exist, they are replaced by the new values. You can also use <code>SET</code> to add or subtract from an attribute that is of type Number. For example: <code>SET myNum = myNum + :val</code></p>
524    /// <p><code>SET</code> supports the following functions:</p>
525    /// <ul>
526    /// <li>
527    /// <p><code>if_not_exists (path, operand)</code> - if the item does not contain an attribute at the specified path, then <code>if_not_exists</code> evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute that may already be present in the item.</p></li>
528    /// <li>
529    /// <p><code>list_append (operand, operand)</code> - evaluates to a list with a new element added to it. You can append the new element to the start or the end of the list by reversing the order of the operands.</p></li>
530    /// </ul>
531    /// <p>These function names are case-sensitive.</p></li>
532    /// <li>
533    /// <p><code>REMOVE</code> - Removes one or more attributes from an item.</p></li>
534    /// <li>
535    /// <p><code>ADD</code> - Adds the specified value to the item, if the attribute does not already exist. If the attribute does exist, then the behavior of <code>ADD</code> depends on the data type of the attribute:</p>
536    /// <ul>
537    /// <li>
538    /// <p>If the existing attribute is a number, and if <code>Value</code> is also a number, then <code>Value</code> is mathematically added to the existing attribute. If <code>Value</code> is a negative number, then it is subtracted from the existing attribute.</p><note>
539    /// <p>If you use <code>ADD</code> to increment or decrement a number value for an item that doesn't exist before the update, DynamoDB uses <code>0</code> as the initial value.</p>
540    /// <p>Similarly, if you use <code>ADD</code> for an existing item to increment or decrement an attribute value that doesn't exist before the update, DynamoDB uses <code>0</code> as the initial value. For example, suppose that the item you want to update doesn't have an attribute named <code>itemcount</code>, but you decide to <code>ADD</code> the number <code>3</code> to this attribute anyway. DynamoDB will create the <code>itemcount</code> attribute, set its initial value to <code>0</code>, and finally add <code>3</code> to it. The result will be a new <code>itemcount</code> attribute in the item, with a value of <code>3</code>.</p>
541    /// </note></li>
542    /// <li>
543    /// <p>If the existing data type is a set and if <code>Value</code> is also a set, then <code>Value</code> is added to the existing set. For example, if the attribute value is the set <code>\[1,2\]</code>, and the <code>ADD</code> action specified <code>\[3\]</code>, then the final attribute value is <code>\[1,2,3\]</code>. An error occurs if an <code>ADD</code> action is specified for a set attribute and the attribute type specified does not match the existing set type.</p>
544    /// <p>Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the <code>Value</code> must also be a set of strings.</p></li>
545    /// </ul><important>
546    /// <p>The <code>ADD</code> action only supports Number and set data types. In addition, <code>ADD</code> can only be used on top-level attributes, not nested attributes.</p>
547    /// </important></li>
548    /// <li>
549    /// <p><code>DELETE</code> - Deletes an element from a set.</p>
550    /// <p>If a set of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set <code>\[a,b,c\]</code> and the <code>DELETE</code> action specifies <code>\[a,c\]</code>, then the final attribute value is <code>\[b\]</code>. Specifying an empty set is an error.</p><important>
551    /// <p>The <code>DELETE</code> action only supports set data types. In addition, <code>DELETE</code> can only be used on top-level attributes, not nested attributes.</p>
552    /// </important></li>
553    /// </ul>
554    /// <p>You can have many actions in a single expression, such as the following: <code>SET a=:value1, b=:value2 DELETE :value3, :value4, :value5</code></p>
555    /// <p>For more information on update expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html">Modifying Items and Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
556    pub fn update_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
557        self.update_expression = ::std::option::Option::Some(input.into());
558        self
559    }
560    /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them.</p>
561    /// <p>The following action values are available for <code>UpdateExpression</code>.</p>
562    /// <ul>
563    /// <li>
564    /// <p><code>SET</code> - Adds one or more attributes and values to an item. If any of these attributes already exist, they are replaced by the new values. You can also use <code>SET</code> to add or subtract from an attribute that is of type Number. For example: <code>SET myNum = myNum + :val</code></p>
565    /// <p><code>SET</code> supports the following functions:</p>
566    /// <ul>
567    /// <li>
568    /// <p><code>if_not_exists (path, operand)</code> - if the item does not contain an attribute at the specified path, then <code>if_not_exists</code> evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute that may already be present in the item.</p></li>
569    /// <li>
570    /// <p><code>list_append (operand, operand)</code> - evaluates to a list with a new element added to it. You can append the new element to the start or the end of the list by reversing the order of the operands.</p></li>
571    /// </ul>
572    /// <p>These function names are case-sensitive.</p></li>
573    /// <li>
574    /// <p><code>REMOVE</code> - Removes one or more attributes from an item.</p></li>
575    /// <li>
576    /// <p><code>ADD</code> - Adds the specified value to the item, if the attribute does not already exist. If the attribute does exist, then the behavior of <code>ADD</code> depends on the data type of the attribute:</p>
577    /// <ul>
578    /// <li>
579    /// <p>If the existing attribute is a number, and if <code>Value</code> is also a number, then <code>Value</code> is mathematically added to the existing attribute. If <code>Value</code> is a negative number, then it is subtracted from the existing attribute.</p><note>
580    /// <p>If you use <code>ADD</code> to increment or decrement a number value for an item that doesn't exist before the update, DynamoDB uses <code>0</code> as the initial value.</p>
581    /// <p>Similarly, if you use <code>ADD</code> for an existing item to increment or decrement an attribute value that doesn't exist before the update, DynamoDB uses <code>0</code> as the initial value. For example, suppose that the item you want to update doesn't have an attribute named <code>itemcount</code>, but you decide to <code>ADD</code> the number <code>3</code> to this attribute anyway. DynamoDB will create the <code>itemcount</code> attribute, set its initial value to <code>0</code>, and finally add <code>3</code> to it. The result will be a new <code>itemcount</code> attribute in the item, with a value of <code>3</code>.</p>
582    /// </note></li>
583    /// <li>
584    /// <p>If the existing data type is a set and if <code>Value</code> is also a set, then <code>Value</code> is added to the existing set. For example, if the attribute value is the set <code>\[1,2\]</code>, and the <code>ADD</code> action specified <code>\[3\]</code>, then the final attribute value is <code>\[1,2,3\]</code>. An error occurs if an <code>ADD</code> action is specified for a set attribute and the attribute type specified does not match the existing set type.</p>
585    /// <p>Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the <code>Value</code> must also be a set of strings.</p></li>
586    /// </ul><important>
587    /// <p>The <code>ADD</code> action only supports Number and set data types. In addition, <code>ADD</code> can only be used on top-level attributes, not nested attributes.</p>
588    /// </important></li>
589    /// <li>
590    /// <p><code>DELETE</code> - Deletes an element from a set.</p>
591    /// <p>If a set of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set <code>\[a,b,c\]</code> and the <code>DELETE</code> action specifies <code>\[a,c\]</code>, then the final attribute value is <code>\[b\]</code>. Specifying an empty set is an error.</p><important>
592    /// <p>The <code>DELETE</code> action only supports set data types. In addition, <code>DELETE</code> can only be used on top-level attributes, not nested attributes.</p>
593    /// </important></li>
594    /// </ul>
595    /// <p>You can have many actions in a single expression, such as the following: <code>SET a=:value1, b=:value2 DELETE :value3, :value4, :value5</code></p>
596    /// <p>For more information on update expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html">Modifying Items and Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
597    pub fn set_update_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
598        self.update_expression = input; self
599    }
600    /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them.</p>
601    /// <p>The following action values are available for <code>UpdateExpression</code>.</p>
602    /// <ul>
603    /// <li>
604    /// <p><code>SET</code> - Adds one or more attributes and values to an item. If any of these attributes already exist, they are replaced by the new values. You can also use <code>SET</code> to add or subtract from an attribute that is of type Number. For example: <code>SET myNum = myNum + :val</code></p>
605    /// <p><code>SET</code> supports the following functions:</p>
606    /// <ul>
607    /// <li>
608    /// <p><code>if_not_exists (path, operand)</code> - if the item does not contain an attribute at the specified path, then <code>if_not_exists</code> evaluates to operand; otherwise, it evaluates to path. You can use this function to avoid overwriting an attribute that may already be present in the item.</p></li>
609    /// <li>
610    /// <p><code>list_append (operand, operand)</code> - evaluates to a list with a new element added to it. You can append the new element to the start or the end of the list by reversing the order of the operands.</p></li>
611    /// </ul>
612    /// <p>These function names are case-sensitive.</p></li>
613    /// <li>
614    /// <p><code>REMOVE</code> - Removes one or more attributes from an item.</p></li>
615    /// <li>
616    /// <p><code>ADD</code> - Adds the specified value to the item, if the attribute does not already exist. If the attribute does exist, then the behavior of <code>ADD</code> depends on the data type of the attribute:</p>
617    /// <ul>
618    /// <li>
619    /// <p>If the existing attribute is a number, and if <code>Value</code> is also a number, then <code>Value</code> is mathematically added to the existing attribute. If <code>Value</code> is a negative number, then it is subtracted from the existing attribute.</p><note>
620    /// <p>If you use <code>ADD</code> to increment or decrement a number value for an item that doesn't exist before the update, DynamoDB uses <code>0</code> as the initial value.</p>
621    /// <p>Similarly, if you use <code>ADD</code> for an existing item to increment or decrement an attribute value that doesn't exist before the update, DynamoDB uses <code>0</code> as the initial value. For example, suppose that the item you want to update doesn't have an attribute named <code>itemcount</code>, but you decide to <code>ADD</code> the number <code>3</code> to this attribute anyway. DynamoDB will create the <code>itemcount</code> attribute, set its initial value to <code>0</code>, and finally add <code>3</code> to it. The result will be a new <code>itemcount</code> attribute in the item, with a value of <code>3</code>.</p>
622    /// </note></li>
623    /// <li>
624    /// <p>If the existing data type is a set and if <code>Value</code> is also a set, then <code>Value</code> is added to the existing set. For example, if the attribute value is the set <code>\[1,2\]</code>, and the <code>ADD</code> action specified <code>\[3\]</code>, then the final attribute value is <code>\[1,2,3\]</code>. An error occurs if an <code>ADD</code> action is specified for a set attribute and the attribute type specified does not match the existing set type.</p>
625    /// <p>Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the <code>Value</code> must also be a set of strings.</p></li>
626    /// </ul><important>
627    /// <p>The <code>ADD</code> action only supports Number and set data types. In addition, <code>ADD</code> can only be used on top-level attributes, not nested attributes.</p>
628    /// </important></li>
629    /// <li>
630    /// <p><code>DELETE</code> - Deletes an element from a set.</p>
631    /// <p>If a set of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set <code>\[a,b,c\]</code> and the <code>DELETE</code> action specifies <code>\[a,c\]</code>, then the final attribute value is <code>\[b\]</code>. Specifying an empty set is an error.</p><important>
632    /// <p>The <code>DELETE</code> action only supports set data types. In addition, <code>DELETE</code> can only be used on top-level attributes, not nested attributes.</p>
633    /// </important></li>
634    /// </ul>
635    /// <p>You can have many actions in a single expression, such as the following: <code>SET a=:value1, b=:value2 DELETE :value3, :value4, :value5</code></p>
636    /// <p>For more information on update expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html">Modifying Items and Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
637    pub fn get_update_expression(&self) -> &::std::option::Option<::std::string::String> {
638        &self.update_expression
639    }
640    /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
641    /// <p>An expression can contain any of the following:</p>
642    /// <ul>
643    /// <li>
644    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
645    /// <p>These function names are case-sensitive.</p></li>
646    /// <li>
647    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
648    /// <li>
649    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
650    /// </ul>
651    /// <p>For more information about condition expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Specifying Conditions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
652    pub fn condition_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
653        self.condition_expression = ::std::option::Option::Some(input.into());
654        self
655    }
656    /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
657    /// <p>An expression can contain any of the following:</p>
658    /// <ul>
659    /// <li>
660    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
661    /// <p>These function names are case-sensitive.</p></li>
662    /// <li>
663    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
664    /// <li>
665    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
666    /// </ul>
667    /// <p>For more information about condition expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Specifying Conditions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
668    pub fn set_condition_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
669        self.condition_expression = input; self
670    }
671    /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
672    /// <p>An expression can contain any of the following:</p>
673    /// <ul>
674    /// <li>
675    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
676    /// <p>These function names are case-sensitive.</p></li>
677    /// <li>
678    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
679    /// <li>
680    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
681    /// </ul>
682    /// <p>For more information about condition expressions, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Specifying Conditions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
683    pub fn get_condition_expression(&self) -> &::std::option::Option<::std::string::String> {
684        &self.condition_expression
685    }
686    /// Adds a key-value pair to `expression_attribute_names`.
687    ///
688    /// To override the contents of this collection use [`set_expression_attribute_names`](Self::set_expression_attribute_names).
689    ///
690    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
691    /// <ul>
692    /// <li>
693    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
694    /// <li>
695    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
696    /// <li>
697    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
698    /// </ul>
699    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
700    /// <ul>
701    /// <li>
702    /// <p><code>Percentile</code></p></li>
703    /// </ul>
704    /// <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>.) To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p>
705    /// <ul>
706    /// <li>
707    /// <p><code>{"#P":"Percentile"}</code></p></li>
708    /// </ul>
709    /// <p>You could then use this substitution in an expression, as in this example:</p>
710    /// <ul>
711    /// <li>
712    /// <p><code>#P = :val</code></p></li>
713    /// </ul><note>
714    /// <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p>
715    /// </note>
716    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Specifying Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
717    pub fn expression_attribute_names(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
718        let mut hash_map = self.expression_attribute_names.unwrap_or_default();
719                        hash_map.insert(k.into(), v.into());
720                        self.expression_attribute_names = ::std::option::Option::Some(hash_map);
721                        self
722    }
723    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
724    /// <ul>
725    /// <li>
726    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
727    /// <li>
728    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
729    /// <li>
730    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
731    /// </ul>
732    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
733    /// <ul>
734    /// <li>
735    /// <p><code>Percentile</code></p></li>
736    /// </ul>
737    /// <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>.) To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p>
738    /// <ul>
739    /// <li>
740    /// <p><code>{"#P":"Percentile"}</code></p></li>
741    /// </ul>
742    /// <p>You could then use this substitution in an expression, as in this example:</p>
743    /// <ul>
744    /// <li>
745    /// <p><code>#P = :val</code></p></li>
746    /// </ul><note>
747    /// <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p>
748    /// </note>
749    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Specifying Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
750    pub fn set_expression_attribute_names(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::string::String>>) -> Self {
751        self.expression_attribute_names = input; self
752    }
753    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
754    /// <ul>
755    /// <li>
756    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
757    /// <li>
758    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
759    /// <li>
760    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
761    /// </ul>
762    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
763    /// <ul>
764    /// <li>
765    /// <p><code>Percentile</code></p></li>
766    /// </ul>
767    /// <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>.) To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p>
768    /// <ul>
769    /// <li>
770    /// <p><code>{"#P":"Percentile"}</code></p></li>
771    /// </ul>
772    /// <p>You could then use this substitution in an expression, as in this example:</p>
773    /// <ul>
774    /// <li>
775    /// <p><code>#P = :val</code></p></li>
776    /// </ul><note>
777    /// <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p>
778    /// </note>
779    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Specifying Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
780    pub fn get_expression_attribute_names(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::string::String>> {
781        &self.expression_attribute_names
782    }
783    /// Adds a key-value pair to `expression_attribute_values`.
784    ///
785    /// To override the contents of this collection use [`set_expression_attribute_values`](Self::set_expression_attribute_values).
786    ///
787    /// <p>One or more values that can be substituted in an expression.</p>
788    /// <p>Use the <b>:</b> (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the <code>ProductStatus</code> attribute was one of the following:</p>
789    /// <p><code>Available | Backordered | Discontinued</code></p>
790    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
791    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
792    /// <p>You could then use these values in an expression, such as this:</p>
793    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
794    /// <p>For more information on expression attribute values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Condition Expressions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
795    pub fn expression_attribute_values(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
796        let mut hash_map = self.expression_attribute_values.unwrap_or_default();
797                        hash_map.insert(k.into(), v);
798                        self.expression_attribute_values = ::std::option::Option::Some(hash_map);
799                        self
800    }
801    /// <p>One or more values that can be substituted in an expression.</p>
802    /// <p>Use the <b>:</b> (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the <code>ProductStatus</code> attribute was one of the following:</p>
803    /// <p><code>Available | Backordered | Discontinued</code></p>
804    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
805    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
806    /// <p>You could then use these values in an expression, such as this:</p>
807    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
808    /// <p>For more information on expression attribute values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Condition Expressions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
809    pub fn set_expression_attribute_values(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>) -> Self {
810        self.expression_attribute_values = input; self
811    }
812    /// <p>One or more values that can be substituted in an expression.</p>
813    /// <p>Use the <b>:</b> (colon) character in an expression to dereference an attribute value. For example, suppose that you wanted to check whether the value of the <code>ProductStatus</code> attribute was one of the following:</p>
814    /// <p><code>Available | Backordered | Discontinued</code></p>
815    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
816    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
817    /// <p>You could then use these values in an expression, such as this:</p>
818    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
819    /// <p>For more information on expression attribute values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html">Condition Expressions</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
820    pub fn get_expression_attribute_values(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>> {
821        &self.expression_attribute_values
822    }
823    /// <p>An optional parameter that returns the item attributes for an <code>UpdateItem</code> operation that failed a condition check.</p>
824    /// <p>There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No read capacity units are consumed.</p>
825    pub fn return_values_on_condition_check_failure(mut self, input: crate::types::ReturnValuesOnConditionCheckFailure) -> Self {
826        self.return_values_on_condition_check_failure = ::std::option::Option::Some(input);
827        self
828    }
829    /// <p>An optional parameter that returns the item attributes for an <code>UpdateItem</code> operation that failed a condition check.</p>
830    /// <p>There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No read capacity units are consumed.</p>
831    pub fn set_return_values_on_condition_check_failure(mut self, input: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>) -> Self {
832        self.return_values_on_condition_check_failure = input; self
833    }
834    /// <p>An optional parameter that returns the item attributes for an <code>UpdateItem</code> operation that failed a condition check.</p>
835    /// <p>There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No read capacity units are consumed.</p>
836    pub fn get_return_values_on_condition_check_failure(&self) -> &::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure> {
837        &self.return_values_on_condition_check_failure
838    }
839    /// Consumes the builder and constructs a [`UpdateItemInput`](crate::operation::update_item::UpdateItemInput).
840    pub fn build(self) -> ::std::result::Result<crate::operation::update_item::UpdateItemInput, ::aws_smithy_types::error::operation::BuildError> {
841        ::std::result::Result::Ok(
842            crate::operation::update_item::UpdateItemInput {
843                table_name: self.table_name
844                ,
845                key: self.key
846                ,
847                attribute_updates: self.attribute_updates
848                ,
849                expected: self.expected
850                ,
851                conditional_operator: self.conditional_operator
852                ,
853                return_values: self.return_values
854                ,
855                return_consumed_capacity: self.return_consumed_capacity
856                ,
857                return_item_collection_metrics: self.return_item_collection_metrics
858                ,
859                update_expression: self.update_expression
860                ,
861                condition_expression: self.condition_expression
862                ,
863                expression_attribute_names: self.expression_attribute_names
864                ,
865                expression_attribute_values: self.expression_attribute_values
866                ,
867                return_values_on_condition_check_failure: self.return_values_on_condition_check_failure
868                ,
869            }
870        )
871    }
872}
873