aws_sdk_dynamodb/operation/put_item/
_put_item_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of a <code>PutItem</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PutItemInput {
7    /// <p>The name of the table to contain the item. 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>A map of attribute name/value pairs, one for each attribute. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item.</p>
10    /// <p>You must provide all of the attributes for the primary key. 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 both values for both the partition key and the sort key.</p>
11    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p>
12    /// <p>Empty String and Binary attribute values are allowed. Attribute values of type String and Binary must have a length greater than zero if the attribute is used as a key attribute for a table or index.</p>
13    /// <p>For more information about primary keys, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey">Primary Key</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
14    /// <p>Each element in the <code>Item</code> map is an <code>AttributeValue</code> object.</p>
15    pub item: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
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.Expected.html">Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
17    pub expected: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ExpectedAttributeValue>>,
18    /// <p>Use <code>ReturnValues</code> if you want to get the item attributes as they appeared before they were updated with the <code>PutItem</code> request. For <code>PutItem</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> - If <code>PutItem</code> overwrote an attribute name-value pair, then the content of the old item is returned.</p></li>
24    /// </ul>
25    /// <p>The values returned are strongly consistent.</p>
26    /// <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><note>
27    /// <p>The <code>ReturnValues</code> parameter is used by several DynamoDB operations; however, <code>PutItem</code> does not recognize any values other than <code>NONE</code> or <code>ALL_OLD</code>.</p>
28    /// </note>
29    pub return_values: ::std::option::Option<crate::types::ReturnValue>,
30    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
31    /// <ul>
32    /// <li>
33    /// <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>
34    /// <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>
35    /// <li>
36    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
37    /// <li>
38    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
39    /// </ul>
40    pub return_consumed_capacity: ::std::option::Option<crate::types::ReturnConsumedCapacity>,
41    /// <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>
42    pub return_item_collection_metrics: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>,
43    /// <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>
44    pub conditional_operator: ::std::option::Option<crate::types::ConditionalOperator>,
45    /// <p>A condition that must be satisfied in order for a conditional <code>PutItem</code> operation to succeed.</p>
46    /// <p>An expression can contain any of the following:</p>
47    /// <ul>
48    /// <li>
49    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
50    /// <p>These function names are case-sensitive.</p></li>
51    /// <li>
52    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
53    /// <li>
54    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
55    /// </ul>
56    /// <p>For more information on condition expressions, 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>
57    pub condition_expression: ::std::option::Option<::std::string::String>,
58    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
59    /// <ul>
60    /// <li>
61    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
62    /// <li>
63    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
64    /// <li>
65    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
66    /// </ul>
67    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
68    /// <ul>
69    /// <li>
70    /// <p><code>Percentile</code></p></li>
71    /// </ul>
72    /// <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>
73    /// <ul>
74    /// <li>
75    /// <p><code>{"#P":"Percentile"}</code></p></li>
76    /// </ul>
77    /// <p>You could then use this substitution in an expression, as in this example:</p>
78    /// <ul>
79    /// <li>
80    /// <p><code>#P = :val</code></p></li>
81    /// </ul><note>
82    /// <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>
83    /// </note>
84    /// <p>For more information on 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>
85    pub expression_attribute_names: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
86    /// <p>One or more values that can be substituted in an expression.</p>
87    /// <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 <i>ProductStatus</i> attribute was one of the following:</p>
88    /// <p><code>Available | Backordered | Discontinued</code></p>
89    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
90    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
91    /// <p>You could then use these values in an expression, such as this:</p>
92    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
93    /// <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>
94    pub expression_attribute_values: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
95    /// <p>An optional parameter that returns the item attributes for a <code>PutItem</code> operation that failed a condition check.</p>
96    /// <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>
97    pub return_values_on_condition_check_failure: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>,
98}
99impl PutItemInput {
100    /// <p>The name of the table to contain the item. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
101    pub fn table_name(&self) -> ::std::option::Option<&str> {
102        self.table_name.as_deref()
103    }
104    /// <p>A map of attribute name/value pairs, one for each attribute. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item.</p>
105    /// <p>You must provide all of the attributes for the primary key. 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 both values for both the partition key and the sort key.</p>
106    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p>
107    /// <p>Empty String and Binary attribute values are allowed. Attribute values of type String and Binary must have a length greater than zero if the attribute is used as a key attribute for a table or index.</p>
108    /// <p>For more information about primary keys, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey">Primary Key</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
109    /// <p>Each element in the <code>Item</code> map is an <code>AttributeValue</code> object.</p>
110    pub fn item(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
111        self.item.as_ref()
112    }
113    /// <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>
114    pub fn expected(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::ExpectedAttributeValue>> {
115        self.expected.as_ref()
116    }
117    /// <p>Use <code>ReturnValues</code> if you want to get the item attributes as they appeared before they were updated with the <code>PutItem</code> request. For <code>PutItem</code>, the valid values are:</p>
118    /// <ul>
119    /// <li>
120    /// <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>
121    /// <li>
122    /// <p><code>ALL_OLD</code> - If <code>PutItem</code> overwrote an attribute name-value pair, then the content of the old item is returned.</p></li>
123    /// </ul>
124    /// <p>The values returned are strongly consistent.</p>
125    /// <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><note>
126    /// <p>The <code>ReturnValues</code> parameter is used by several DynamoDB operations; however, <code>PutItem</code> does not recognize any values other than <code>NONE</code> or <code>ALL_OLD</code>.</p>
127    /// </note>
128    pub fn return_values(&self) -> ::std::option::Option<&crate::types::ReturnValue> {
129        self.return_values.as_ref()
130    }
131    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
132    /// <ul>
133    /// <li>
134    /// <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>
135    /// <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>
136    /// <li>
137    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
138    /// <li>
139    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
140    /// </ul>
141    pub fn return_consumed_capacity(&self) -> ::std::option::Option<&crate::types::ReturnConsumedCapacity> {
142        self.return_consumed_capacity.as_ref()
143    }
144    /// <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>
145    pub fn return_item_collection_metrics(&self) -> ::std::option::Option<&crate::types::ReturnItemCollectionMetrics> {
146        self.return_item_collection_metrics.as_ref()
147    }
148    /// <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>
149    pub fn conditional_operator(&self) -> ::std::option::Option<&crate::types::ConditionalOperator> {
150        self.conditional_operator.as_ref()
151    }
152    /// <p>A condition that must be satisfied in order for a conditional <code>PutItem</code> operation to succeed.</p>
153    /// <p>An expression can contain any of the following:</p>
154    /// <ul>
155    /// <li>
156    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
157    /// <p>These function names are case-sensitive.</p></li>
158    /// <li>
159    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
160    /// <li>
161    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
162    /// </ul>
163    /// <p>For more information on condition expressions, 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>
164    pub fn condition_expression(&self) -> ::std::option::Option<&str> {
165        self.condition_expression.as_deref()
166    }
167    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
168    /// <ul>
169    /// <li>
170    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
171    /// <li>
172    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
173    /// <li>
174    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
175    /// </ul>
176    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
177    /// <ul>
178    /// <li>
179    /// <p><code>Percentile</code></p></li>
180    /// </ul>
181    /// <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>
182    /// <ul>
183    /// <li>
184    /// <p><code>{"#P":"Percentile"}</code></p></li>
185    /// </ul>
186    /// <p>You could then use this substitution in an expression, as in this example:</p>
187    /// <ul>
188    /// <li>
189    /// <p><code>#P = :val</code></p></li>
190    /// </ul><note>
191    /// <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>
192    /// </note>
193    /// <p>For more information on 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>
194    pub fn expression_attribute_names(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
195        self.expression_attribute_names.as_ref()
196    }
197    /// <p>One or more values that can be substituted in an expression.</p>
198    /// <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 <i>ProductStatus</i> attribute was one of the following:</p>
199    /// <p><code>Available | Backordered | Discontinued</code></p>
200    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
201    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
202    /// <p>You could then use these values in an expression, such as this:</p>
203    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
204    /// <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>
205    pub fn expression_attribute_values(
206        &self,
207    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
208        self.expression_attribute_values.as_ref()
209    }
210    /// <p>An optional parameter that returns the item attributes for a <code>PutItem</code> operation that failed a condition check.</p>
211    /// <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>
212    pub fn return_values_on_condition_check_failure(&self) -> ::std::option::Option<&crate::types::ReturnValuesOnConditionCheckFailure> {
213        self.return_values_on_condition_check_failure.as_ref()
214    }
215}
216impl PutItemInput {
217    /// Creates a new builder-style object to manufacture [`PutItemInput`](crate::operation::put_item::PutItemInput).
218    pub fn builder() -> crate::operation::put_item::builders::PutItemInputBuilder {
219        crate::operation::put_item::builders::PutItemInputBuilder::default()
220    }
221}
222
223/// A builder for [`PutItemInput`](crate::operation::put_item::PutItemInput).
224#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
225#[non_exhaustive]
226pub struct PutItemInputBuilder {
227    pub(crate) table_name: ::std::option::Option<::std::string::String>,
228    pub(crate) item: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
229    pub(crate) expected: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ExpectedAttributeValue>>,
230    pub(crate) return_values: ::std::option::Option<crate::types::ReturnValue>,
231    pub(crate) return_consumed_capacity: ::std::option::Option<crate::types::ReturnConsumedCapacity>,
232    pub(crate) return_item_collection_metrics: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>,
233    pub(crate) conditional_operator: ::std::option::Option<crate::types::ConditionalOperator>,
234    pub(crate) condition_expression: ::std::option::Option<::std::string::String>,
235    pub(crate) expression_attribute_names: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
236    pub(crate) expression_attribute_values: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
237    pub(crate) return_values_on_condition_check_failure: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>,
238}
239impl PutItemInputBuilder {
240    /// <p>The name of the table to contain the item. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
241    /// This field is required.
242    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
243        self.table_name = ::std::option::Option::Some(input.into());
244        self
245    }
246    /// <p>The name of the table to contain the item. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
247    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
248        self.table_name = input;
249        self
250    }
251    /// <p>The name of the table to contain the item. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
252    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
253        &self.table_name
254    }
255    /// Adds a key-value pair to `item`.
256    ///
257    /// To override the contents of this collection use [`set_item`](Self::set_item).
258    ///
259    /// <p>A map of attribute name/value pairs, one for each attribute. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item.</p>
260    /// <p>You must provide all of the attributes for the primary key. 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 both values for both the partition key and the sort key.</p>
261    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p>
262    /// <p>Empty String and Binary attribute values are allowed. Attribute values of type String and Binary must have a length greater than zero if the attribute is used as a key attribute for a table or index.</p>
263    /// <p>For more information about primary keys, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey">Primary Key</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
264    /// <p>Each element in the <code>Item</code> map is an <code>AttributeValue</code> object.</p>
265    pub fn item(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
266        let mut hash_map = self.item.unwrap_or_default();
267        hash_map.insert(k.into(), v);
268        self.item = ::std::option::Option::Some(hash_map);
269        self
270    }
271    /// <p>A map of attribute name/value pairs, one for each attribute. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item.</p>
272    /// <p>You must provide all of the attributes for the primary key. 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 both values for both the partition key and the sort key.</p>
273    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p>
274    /// <p>Empty String and Binary attribute values are allowed. Attribute values of type String and Binary must have a length greater than zero if the attribute is used as a key attribute for a table or index.</p>
275    /// <p>For more information about primary keys, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey">Primary Key</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
276    /// <p>Each element in the <code>Item</code> map is an <code>AttributeValue</code> object.</p>
277    pub fn set_item(
278        mut self,
279        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
280    ) -> Self {
281        self.item = input;
282        self
283    }
284    /// <p>A map of attribute name/value pairs, one for each attribute. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item.</p>
285    /// <p>You must provide all of the attributes for the primary key. 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 both values for both the partition key and the sort key.</p>
286    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p>
287    /// <p>Empty String and Binary attribute values are allowed. Attribute values of type String and Binary must have a length greater than zero if the attribute is used as a key attribute for a table or index.</p>
288    /// <p>For more information about primary keys, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey">Primary Key</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
289    /// <p>Each element in the <code>Item</code> map is an <code>AttributeValue</code> object.</p>
290    pub fn get_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
291        &self.item
292    }
293    /// Adds a key-value pair to `expected`.
294    ///
295    /// To override the contents of this collection use [`set_expected`](Self::set_expected).
296    ///
297    /// <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>
298    pub fn expected(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ExpectedAttributeValue) -> Self {
299        let mut hash_map = self.expected.unwrap_or_default();
300        hash_map.insert(k.into(), v);
301        self.expected = ::std::option::Option::Some(hash_map);
302        self
303    }
304    /// <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>
305    pub fn set_expected(
306        mut self,
307        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ExpectedAttributeValue>>,
308    ) -> Self {
309        self.expected = input;
310        self
311    }
312    /// <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>
313    pub fn get_expected(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ExpectedAttributeValue>> {
314        &self.expected
315    }
316    /// <p>Use <code>ReturnValues</code> if you want to get the item attributes as they appeared before they were updated with the <code>PutItem</code> request. For <code>PutItem</code>, the valid values are:</p>
317    /// <ul>
318    /// <li>
319    /// <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>
320    /// <li>
321    /// <p><code>ALL_OLD</code> - If <code>PutItem</code> overwrote an attribute name-value pair, then the content of the old item is returned.</p></li>
322    /// </ul>
323    /// <p>The values returned are strongly consistent.</p>
324    /// <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><note>
325    /// <p>The <code>ReturnValues</code> parameter is used by several DynamoDB operations; however, <code>PutItem</code> does not recognize any values other than <code>NONE</code> or <code>ALL_OLD</code>.</p>
326    /// </note>
327    pub fn return_values(mut self, input: crate::types::ReturnValue) -> Self {
328        self.return_values = ::std::option::Option::Some(input);
329        self
330    }
331    /// <p>Use <code>ReturnValues</code> if you want to get the item attributes as they appeared before they were updated with the <code>PutItem</code> request. For <code>PutItem</code>, the valid values are:</p>
332    /// <ul>
333    /// <li>
334    /// <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>
335    /// <li>
336    /// <p><code>ALL_OLD</code> - If <code>PutItem</code> overwrote an attribute name-value pair, then the content of the old item is returned.</p></li>
337    /// </ul>
338    /// <p>The values returned are strongly consistent.</p>
339    /// <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><note>
340    /// <p>The <code>ReturnValues</code> parameter is used by several DynamoDB operations; however, <code>PutItem</code> does not recognize any values other than <code>NONE</code> or <code>ALL_OLD</code>.</p>
341    /// </note>
342    pub fn set_return_values(mut self, input: ::std::option::Option<crate::types::ReturnValue>) -> Self {
343        self.return_values = input;
344        self
345    }
346    /// <p>Use <code>ReturnValues</code> if you want to get the item attributes as they appeared before they were updated with the <code>PutItem</code> request. For <code>PutItem</code>, the valid values are:</p>
347    /// <ul>
348    /// <li>
349    /// <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>
350    /// <li>
351    /// <p><code>ALL_OLD</code> - If <code>PutItem</code> overwrote an attribute name-value pair, then the content of the old item is returned.</p></li>
352    /// </ul>
353    /// <p>The values returned are strongly consistent.</p>
354    /// <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><note>
355    /// <p>The <code>ReturnValues</code> parameter is used by several DynamoDB operations; however, <code>PutItem</code> does not recognize any values other than <code>NONE</code> or <code>ALL_OLD</code>.</p>
356    /// </note>
357    pub fn get_return_values(&self) -> &::std::option::Option<crate::types::ReturnValue> {
358        &self.return_values
359    }
360    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
361    /// <ul>
362    /// <li>
363    /// <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>
364    /// <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>
365    /// <li>
366    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
367    /// <li>
368    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
369    /// </ul>
370    pub fn return_consumed_capacity(mut self, input: crate::types::ReturnConsumedCapacity) -> Self {
371        self.return_consumed_capacity = ::std::option::Option::Some(input);
372        self
373    }
374    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
375    /// <ul>
376    /// <li>
377    /// <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>
378    /// <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>
379    /// <li>
380    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
381    /// <li>
382    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
383    /// </ul>
384    pub fn set_return_consumed_capacity(mut self, input: ::std::option::Option<crate::types::ReturnConsumedCapacity>) -> Self {
385        self.return_consumed_capacity = input;
386        self
387    }
388    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
389    /// <ul>
390    /// <li>
391    /// <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>
392    /// <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>
393    /// <li>
394    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
395    /// <li>
396    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
397    /// </ul>
398    pub fn get_return_consumed_capacity(&self) -> &::std::option::Option<crate::types::ReturnConsumedCapacity> {
399        &self.return_consumed_capacity
400    }
401    /// <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>
402    pub fn return_item_collection_metrics(mut self, input: crate::types::ReturnItemCollectionMetrics) -> Self {
403        self.return_item_collection_metrics = ::std::option::Option::Some(input);
404        self
405    }
406    /// <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>
407    pub fn set_return_item_collection_metrics(mut self, input: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>) -> Self {
408        self.return_item_collection_metrics = input;
409        self
410    }
411    /// <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>
412    pub fn get_return_item_collection_metrics(&self) -> &::std::option::Option<crate::types::ReturnItemCollectionMetrics> {
413        &self.return_item_collection_metrics
414    }
415    /// <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>
416    pub fn conditional_operator(mut self, input: crate::types::ConditionalOperator) -> Self {
417        self.conditional_operator = ::std::option::Option::Some(input);
418        self
419    }
420    /// <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>
421    pub fn set_conditional_operator(mut self, input: ::std::option::Option<crate::types::ConditionalOperator>) -> Self {
422        self.conditional_operator = input;
423        self
424    }
425    /// <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>
426    pub fn get_conditional_operator(&self) -> &::std::option::Option<crate::types::ConditionalOperator> {
427        &self.conditional_operator
428    }
429    /// <p>A condition that must be satisfied in order for a conditional <code>PutItem</code> operation to succeed.</p>
430    /// <p>An expression can contain any of the following:</p>
431    /// <ul>
432    /// <li>
433    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
434    /// <p>These function names are case-sensitive.</p></li>
435    /// <li>
436    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
437    /// <li>
438    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
439    /// </ul>
440    /// <p>For more information on condition expressions, 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>
441    pub fn condition_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
442        self.condition_expression = ::std::option::Option::Some(input.into());
443        self
444    }
445    /// <p>A condition that must be satisfied in order for a conditional <code>PutItem</code> operation to succeed.</p>
446    /// <p>An expression can contain any of the following:</p>
447    /// <ul>
448    /// <li>
449    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
450    /// <p>These function names are case-sensitive.</p></li>
451    /// <li>
452    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
453    /// <li>
454    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
455    /// </ul>
456    /// <p>For more information on condition expressions, 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>
457    pub fn set_condition_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
458        self.condition_expression = input;
459        self
460    }
461    /// <p>A condition that must be satisfied in order for a conditional <code>PutItem</code> operation to succeed.</p>
462    /// <p>An expression can contain any of the following:</p>
463    /// <ul>
464    /// <li>
465    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
466    /// <p>These function names are case-sensitive.</p></li>
467    /// <li>
468    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
469    /// <li>
470    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
471    /// </ul>
472    /// <p>For more information on condition expressions, 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>
473    pub fn get_condition_expression(&self) -> &::std::option::Option<::std::string::String> {
474        &self.condition_expression
475    }
476    /// Adds a key-value pair to `expression_attribute_names`.
477    ///
478    /// To override the contents of this collection use [`set_expression_attribute_names`](Self::set_expression_attribute_names).
479    ///
480    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
481    /// <ul>
482    /// <li>
483    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
484    /// <li>
485    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
486    /// <li>
487    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
488    /// </ul>
489    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
490    /// <ul>
491    /// <li>
492    /// <p><code>Percentile</code></p></li>
493    /// </ul>
494    /// <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>
495    /// <ul>
496    /// <li>
497    /// <p><code>{"#P":"Percentile"}</code></p></li>
498    /// </ul>
499    /// <p>You could then use this substitution in an expression, as in this example:</p>
500    /// <ul>
501    /// <li>
502    /// <p><code>#P = :val</code></p></li>
503    /// </ul><note>
504    /// <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>
505    /// </note>
506    /// <p>For more information on 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>
507    pub fn expression_attribute_names(
508        mut self,
509        k: impl ::std::convert::Into<::std::string::String>,
510        v: impl ::std::convert::Into<::std::string::String>,
511    ) -> Self {
512        let mut hash_map = self.expression_attribute_names.unwrap_or_default();
513        hash_map.insert(k.into(), v.into());
514        self.expression_attribute_names = ::std::option::Option::Some(hash_map);
515        self
516    }
517    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
518    /// <ul>
519    /// <li>
520    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
521    /// <li>
522    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
523    /// <li>
524    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
525    /// </ul>
526    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
527    /// <ul>
528    /// <li>
529    /// <p><code>Percentile</code></p></li>
530    /// </ul>
531    /// <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>
532    /// <ul>
533    /// <li>
534    /// <p><code>{"#P":"Percentile"}</code></p></li>
535    /// </ul>
536    /// <p>You could then use this substitution in an expression, as in this example:</p>
537    /// <ul>
538    /// <li>
539    /// <p><code>#P = :val</code></p></li>
540    /// </ul><note>
541    /// <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>
542    /// </note>
543    /// <p>For more information on 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>
544    pub fn set_expression_attribute_names(
545        mut self,
546        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
547    ) -> Self {
548        self.expression_attribute_names = input;
549        self
550    }
551    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
552    /// <ul>
553    /// <li>
554    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
555    /// <li>
556    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
557    /// <li>
558    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
559    /// </ul>
560    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
561    /// <ul>
562    /// <li>
563    /// <p><code>Percentile</code></p></li>
564    /// </ul>
565    /// <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>
566    /// <ul>
567    /// <li>
568    /// <p><code>{"#P":"Percentile"}</code></p></li>
569    /// </ul>
570    /// <p>You could then use this substitution in an expression, as in this example:</p>
571    /// <ul>
572    /// <li>
573    /// <p><code>#P = :val</code></p></li>
574    /// </ul><note>
575    /// <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>
576    /// </note>
577    /// <p>For more information on 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>
578    pub fn get_expression_attribute_names(
579        &self,
580    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
581        &self.expression_attribute_names
582    }
583    /// Adds a key-value pair to `expression_attribute_values`.
584    ///
585    /// To override the contents of this collection use [`set_expression_attribute_values`](Self::set_expression_attribute_values).
586    ///
587    /// <p>One or more values that can be substituted in an expression.</p>
588    /// <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 <i>ProductStatus</i> attribute was one of the following:</p>
589    /// <p><code>Available | Backordered | Discontinued</code></p>
590    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
591    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
592    /// <p>You could then use these values in an expression, such as this:</p>
593    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
594    /// <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>
595    pub fn expression_attribute_values(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
596        let mut hash_map = self.expression_attribute_values.unwrap_or_default();
597        hash_map.insert(k.into(), v);
598        self.expression_attribute_values = ::std::option::Option::Some(hash_map);
599        self
600    }
601    /// <p>One or more values that can be substituted in an expression.</p>
602    /// <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 <i>ProductStatus</i> attribute was one of the following:</p>
603    /// <p><code>Available | Backordered | Discontinued</code></p>
604    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
605    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
606    /// <p>You could then use these values in an expression, such as this:</p>
607    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
608    /// <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>
609    pub fn set_expression_attribute_values(
610        mut self,
611        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
612    ) -> Self {
613        self.expression_attribute_values = input;
614        self
615    }
616    /// <p>One or more values that can be substituted in an expression.</p>
617    /// <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 <i>ProductStatus</i> attribute was one of the following:</p>
618    /// <p><code>Available | Backordered | Discontinued</code></p>
619    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
620    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
621    /// <p>You could then use these values in an expression, such as this:</p>
622    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
623    /// <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>
624    pub fn get_expression_attribute_values(
625        &self,
626    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
627        &self.expression_attribute_values
628    }
629    /// <p>An optional parameter that returns the item attributes for a <code>PutItem</code> operation that failed a condition check.</p>
630    /// <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>
631    pub fn return_values_on_condition_check_failure(mut self, input: crate::types::ReturnValuesOnConditionCheckFailure) -> Self {
632        self.return_values_on_condition_check_failure = ::std::option::Option::Some(input);
633        self
634    }
635    /// <p>An optional parameter that returns the item attributes for a <code>PutItem</code> operation that failed a condition check.</p>
636    /// <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>
637    pub fn set_return_values_on_condition_check_failure(
638        mut self,
639        input: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>,
640    ) -> Self {
641        self.return_values_on_condition_check_failure = input;
642        self
643    }
644    /// <p>An optional parameter that returns the item attributes for a <code>PutItem</code> operation that failed a condition check.</p>
645    /// <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>
646    pub fn get_return_values_on_condition_check_failure(&self) -> &::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure> {
647        &self.return_values_on_condition_check_failure
648    }
649    /// Consumes the builder and constructs a [`PutItemInput`](crate::operation::put_item::PutItemInput).
650    pub fn build(self) -> ::std::result::Result<crate::operation::put_item::PutItemInput, ::aws_smithy_types::error::operation::BuildError> {
651        ::std::result::Result::Ok(crate::operation::put_item::PutItemInput {
652            table_name: self.table_name,
653            item: self.item,
654            expected: self.expected,
655            return_values: self.return_values,
656            return_consumed_capacity: self.return_consumed_capacity,
657            return_item_collection_metrics: self.return_item_collection_metrics,
658            conditional_operator: self.conditional_operator,
659            condition_expression: self.condition_expression,
660            expression_attribute_names: self.expression_attribute_names,
661            expression_attribute_values: self.expression_attribute_values,
662            return_values_on_condition_check_failure: self.return_values_on_condition_check_failure,
663        })
664    }
665}