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(&self) -> ::std::option::Option<&::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>> {
206        self.expression_attribute_values.as_ref()
207    }
208    /// <p>An optional parameter that returns the item attributes for a <code>PutItem</code> operation that failed a condition check.</p>
209    /// <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>
210    pub fn return_values_on_condition_check_failure(&self) -> ::std::option::Option<&crate::types::ReturnValuesOnConditionCheckFailure> {
211        self.return_values_on_condition_check_failure.as_ref()
212    }
213}
214static PUTITEMINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.dynamodb.synthetic#PutItemInput", "com.amazonaws.dynamodb.synthetic", "PutItemInput");
215static PUTITEMINPUT_MEMBER_TABLE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
216                            ::aws_smithy_schema::ShapeId::from_static(
217                                "com.amazonaws.dynamodb.synthetic#PutItemInput$TableName",
218                                "com.amazonaws.dynamodb.synthetic",
219                                "PutItemInput",
220                            ),
221                            ::aws_smithy_schema::ShapeType::String,
222                            "TableName",
223                            0,
224                        );
225static PUTITEMINPUT_MEMBER_ITEM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
226                            ::aws_smithy_schema::ShapeId::from_static(
227                                "com.amazonaws.dynamodb.synthetic#PutItemInput$Item",
228                                "com.amazonaws.dynamodb.synthetic",
229                                "PutItemInput",
230                            ),
231                            ::aws_smithy_schema::ShapeType::Map,
232                            "Item",
233                            1,
234                        );
235static PUTITEMINPUT_MEMBER_EXPECTED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
236                            ::aws_smithy_schema::ShapeId::from_static(
237                                "com.amazonaws.dynamodb.synthetic#PutItemInput$Expected",
238                                "com.amazonaws.dynamodb.synthetic",
239                                "PutItemInput",
240                            ),
241                            ::aws_smithy_schema::ShapeType::Map,
242                            "Expected",
243                            2,
244                        );
245static PUTITEMINPUT_MEMBER_RETURN_VALUES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
246                            ::aws_smithy_schema::ShapeId::from_static(
247                                "com.amazonaws.dynamodb.synthetic#PutItemInput$ReturnValues",
248                                "com.amazonaws.dynamodb.synthetic",
249                                "PutItemInput",
250                            ),
251                            ::aws_smithy_schema::ShapeType::String,
252                            "ReturnValues",
253                            3,
254                        );
255static PUTITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
256                            ::aws_smithy_schema::ShapeId::from_static(
257                                "com.amazonaws.dynamodb.synthetic#PutItemInput$ReturnConsumedCapacity",
258                                "com.amazonaws.dynamodb.synthetic",
259                                "PutItemInput",
260                            ),
261                            ::aws_smithy_schema::ShapeType::String,
262                            "ReturnConsumedCapacity",
263                            4,
264                        );
265static PUTITEMINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
266                            ::aws_smithy_schema::ShapeId::from_static(
267                                "com.amazonaws.dynamodb.synthetic#PutItemInput$ReturnItemCollectionMetrics",
268                                "com.amazonaws.dynamodb.synthetic",
269                                "PutItemInput",
270                            ),
271                            ::aws_smithy_schema::ShapeType::String,
272                            "ReturnItemCollectionMetrics",
273                            5,
274                        );
275static PUTITEMINPUT_MEMBER_CONDITIONAL_OPERATOR: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
276                            ::aws_smithy_schema::ShapeId::from_static(
277                                "com.amazonaws.dynamodb.synthetic#PutItemInput$ConditionalOperator",
278                                "com.amazonaws.dynamodb.synthetic",
279                                "PutItemInput",
280                            ),
281                            ::aws_smithy_schema::ShapeType::String,
282                            "ConditionalOperator",
283                            6,
284                        );
285static PUTITEMINPUT_MEMBER_CONDITION_EXPRESSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
286                            ::aws_smithy_schema::ShapeId::from_static(
287                                "com.amazonaws.dynamodb.synthetic#PutItemInput$ConditionExpression",
288                                "com.amazonaws.dynamodb.synthetic",
289                                "PutItemInput",
290                            ),
291                            ::aws_smithy_schema::ShapeType::String,
292                            "ConditionExpression",
293                            7,
294                        );
295static PUTITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_NAMES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
296                            ::aws_smithy_schema::ShapeId::from_static(
297                                "com.amazonaws.dynamodb.synthetic#PutItemInput$ExpressionAttributeNames",
298                                "com.amazonaws.dynamodb.synthetic",
299                                "PutItemInput",
300                            ),
301                            ::aws_smithy_schema::ShapeType::Map,
302                            "ExpressionAttributeNames",
303                            8,
304                        );
305static PUTITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_VALUES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
306                            ::aws_smithy_schema::ShapeId::from_static(
307                                "com.amazonaws.dynamodb.synthetic#PutItemInput$ExpressionAttributeValues",
308                                "com.amazonaws.dynamodb.synthetic",
309                                "PutItemInput",
310                            ),
311                            ::aws_smithy_schema::ShapeType::Map,
312                            "ExpressionAttributeValues",
313                            9,
314                        );
315static PUTITEMINPUT_MEMBER_RETURN_VALUES_ON_CONDITION_CHECK_FAILURE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
316                            ::aws_smithy_schema::ShapeId::from_static(
317                                "com.amazonaws.dynamodb.synthetic#PutItemInput$ReturnValuesOnConditionCheckFailure",
318                                "com.amazonaws.dynamodb.synthetic",
319                                "PutItemInput",
320                            ),
321                            ::aws_smithy_schema::ShapeType::String,
322                            "ReturnValuesOnConditionCheckFailure",
323                            10,
324                        );
325static PUTITEMINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
326                            PUTITEMINPUT_SCHEMA_ID,
327                            ::aws_smithy_schema::ShapeType::Structure,
328                            &[&PUTITEMINPUT_MEMBER_TABLE_NAME, &PUTITEMINPUT_MEMBER_ITEM, &PUTITEMINPUT_MEMBER_EXPECTED, &PUTITEMINPUT_MEMBER_RETURN_VALUES, &PUTITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY, &PUTITEMINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS, &PUTITEMINPUT_MEMBER_CONDITIONAL_OPERATOR, &PUTITEMINPUT_MEMBER_CONDITION_EXPRESSION, &PUTITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_NAMES, &PUTITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_VALUES, &PUTITEMINPUT_MEMBER_RETURN_VALUES_ON_CONDITION_CHECK_FAILURE],
329                        );
330impl PutItemInput {
331                /// The schema for this shape.
332                pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTITEMINPUT_SCHEMA;
333            }
334impl ::aws_smithy_schema::serde::SerializableStruct for PutItemInput {
335                #[allow(unused_variables, clippy::diverging_sub_expression)]
336                fn serialize_members(&self, ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
337                    if let Some(ref val) = self.table_name {
338                                ser.write_string(&PUTITEMINPUT_MEMBER_TABLE_NAME, val)?;
339                            }
340if let Some(ref val) = self.item {
341                                
342                    ser.write_map(&PUTITEMINPUT_MEMBER_ITEM, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
343                        for (key, value) in val {
344                            ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
345                            ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
346                        }
347                        Ok(())
348                    })?;
349                    
350                            }
351if let Some(ref val) = self.expected {
352                                
353                    ser.write_map(&PUTITEMINPUT_MEMBER_EXPECTED, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
354                        for (key, value) in val {
355                            ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
356                            ser.write_struct(crate::types::ExpectedAttributeValue::SCHEMA, value)?;
357                        }
358                        Ok(())
359                    })?;
360                    
361                            }
362if let Some(ref val) = self.return_values {
363                                ser.write_string(&PUTITEMINPUT_MEMBER_RETURN_VALUES, val.as_str())?;
364                            }
365if let Some(ref val) = self.return_consumed_capacity {
366                                ser.write_string(&PUTITEMINPUT_MEMBER_RETURN_CONSUMED_CAPACITY, val.as_str())?;
367                            }
368if let Some(ref val) = self.return_item_collection_metrics {
369                                ser.write_string(&PUTITEMINPUT_MEMBER_RETURN_ITEM_COLLECTION_METRICS, val.as_str())?;
370                            }
371if let Some(ref val) = self.conditional_operator {
372                                ser.write_string(&PUTITEMINPUT_MEMBER_CONDITIONAL_OPERATOR, val.as_str())?;
373                            }
374if let Some(ref val) = self.condition_expression {
375                                ser.write_string(&PUTITEMINPUT_MEMBER_CONDITION_EXPRESSION, val)?;
376                            }
377if let Some(ref val) = self.expression_attribute_names {
378                                
379                    ser.write_map(&PUTITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_NAMES, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
380                        for (key, value) in val {
381                            ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
382                            ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
383                        }
384                        Ok(())
385                    })?;
386                    
387                            }
388if let Some(ref val) = self.expression_attribute_values {
389                                
390                    ser.write_map(&PUTITEMINPUT_MEMBER_EXPRESSION_ATTRIBUTE_VALUES, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
391                        for (key, value) in val {
392                            ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
393                            ser.write_struct(crate::types::AttributeValue::SCHEMA, value)?;
394                        }
395                        Ok(())
396                    })?;
397                    
398                            }
399if let Some(ref val) = self.return_values_on_condition_check_failure {
400                                ser.write_string(&PUTITEMINPUT_MEMBER_RETURN_VALUES_ON_CONDITION_CHECK_FAILURE, val.as_str())?;
401                            }
402                    Ok(())
403                }
404            }
405impl PutItemInput {
406                /// Deserializes this structure from a [`ShapeDeserializer`].
407                pub fn deserialize(deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
408                    #[allow(unused_variables, unused_mut)]
409                    let mut builder = Self::builder();
410                    #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding, clippy::diverging_sub_expression)]
411                    deserializer.read_struct(&PUTITEMINPUT_SCHEMA, &mut |member, deser| {
412                        match member.member_index() {
413                            Some(0) => {
414                                    builder.table_name = Some(deser.read_string(member)?);
415                                }
416Some(1) => {
417                                    builder.item = Some({ let mut container = std::collections::HashMap::new(); deser.read_map(member, &mut |key, deser| { container.insert(key, crate::types::AttributeValue::deserialize(deser)?); Ok(()) })?; container });
418                                }
419Some(2) => {
420                                    builder.expected = Some({ let mut container = std::collections::HashMap::new(); deser.read_map(member, &mut |key, deser| { container.insert(key, crate::types::ExpectedAttributeValue::deserialize(deser)?); Ok(()) })?; container });
421                                }
422Some(3) => {
423                                    builder.return_values = Some(crate::types::ReturnValue::from(deser.read_string(member)?.as_str()));
424                                }
425Some(4) => {
426                                    builder.return_consumed_capacity = Some(crate::types::ReturnConsumedCapacity::from(deser.read_string(member)?.as_str()));
427                                }
428Some(5) => {
429                                    builder.return_item_collection_metrics = Some(crate::types::ReturnItemCollectionMetrics::from(deser.read_string(member)?.as_str()));
430                                }
431Some(6) => {
432                                    builder.conditional_operator = Some(crate::types::ConditionalOperator::from(deser.read_string(member)?.as_str()));
433                                }
434Some(7) => {
435                                    builder.condition_expression = Some(deser.read_string(member)?);
436                                }
437Some(8) => {
438                                    builder.expression_attribute_names = Some(deser.read_string_string_map(member)?);
439                                }
440Some(9) => {
441                                    builder.expression_attribute_values = Some({ let mut container = std::collections::HashMap::new(); deser.read_map(member, &mut |key, deser| { container.insert(key, crate::types::AttributeValue::deserialize(deser)?); Ok(()) })?; container });
442                                }
443Some(10) => {
444                                    builder.return_values_on_condition_check_failure = Some(crate::types::ReturnValuesOnConditionCheckFailure::from(deser.read_string(member)?.as_str()));
445                                }
446                            _ => {}
447                        }
448                        Ok(())
449                    })?;
450                    builder.table_name = builder.table_name.or(Some(String::new()));
451builder.item = builder.item.or(Some(::std::collections::HashMap::new()));
452builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
453                }
454            }
455impl PutItemInput {
456                        /// Deserializes this structure from a body deserializer and HTTP response.
457                        pub fn deserialize_with_response(
458                            deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
459                            _headers: &::aws_smithy_runtime_api::http::Headers,
460                            _status: u16,
461                            _body: &[u8],
462                        ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
463                            Self::deserialize(deserializer)
464                        }
465                    }
466impl PutItemInput {
467    /// Creates a new builder-style object to manufacture [`PutItemInput`](crate::operation::put_item::PutItemInput).
468    pub fn builder() -> crate::operation::put_item::builders::PutItemInputBuilder {
469        crate::operation::put_item::builders::PutItemInputBuilder::default()
470    }
471}
472
473/// A builder for [`PutItemInput`](crate::operation::put_item::PutItemInput).
474#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
475#[non_exhaustive]
476pub struct PutItemInputBuilder {
477    pub(crate) table_name: ::std::option::Option<::std::string::String>,
478    pub(crate) item: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>,
479    pub(crate) expected: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::ExpectedAttributeValue>>,
480    pub(crate) return_values: ::std::option::Option<crate::types::ReturnValue>,
481    pub(crate) return_consumed_capacity: ::std::option::Option<crate::types::ReturnConsumedCapacity>,
482    pub(crate) return_item_collection_metrics: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>,
483    pub(crate) conditional_operator: ::std::option::Option<crate::types::ConditionalOperator>,
484    pub(crate) condition_expression: ::std::option::Option<::std::string::String>,
485    pub(crate) expression_attribute_names: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::string::String>>,
486    pub(crate) expression_attribute_values: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>,
487    pub(crate) return_values_on_condition_check_failure: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>,
488}
489impl PutItemInputBuilder {
490    /// <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>
491    /// This field is required.
492    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
493        self.table_name = ::std::option::Option::Some(input.into());
494        self
495    }
496    /// <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>
497    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
498        self.table_name = input; self
499    }
500    /// <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>
501    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
502        &self.table_name
503    }
504    /// Adds a key-value pair to `item`.
505    ///
506    /// To override the contents of this collection use [`set_item`](Self::set_item).
507    ///
508    /// <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>
509    /// <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>
510    /// <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>
511    /// <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>
512    /// <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>
513    /// <p>Each element in the <code>Item</code> map is an <code>AttributeValue</code> object.</p>
514    pub fn item(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
515        let mut hash_map = self.item.unwrap_or_default();
516                        hash_map.insert(k.into(), v);
517                        self.item = ::std::option::Option::Some(hash_map);
518                        self
519    }
520    /// <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>
521    /// <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>
522    /// <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>
523    /// <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>
524    /// <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>
525    /// <p>Each element in the <code>Item</code> map is an <code>AttributeValue</code> object.</p>
526    pub fn set_item(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>) -> Self {
527        self.item = input; self
528    }
529    /// <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>
530    /// <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>
531    /// <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>
532    /// <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>
533    /// <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>
534    /// <p>Each element in the <code>Item</code> map is an <code>AttributeValue</code> object.</p>
535    pub fn get_item(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>> {
536        &self.item
537    }
538    /// Adds a key-value pair to `expected`.
539    ///
540    /// To override the contents of this collection use [`set_expected`](Self::set_expected).
541    ///
542    /// <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>
543    pub fn expected(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ExpectedAttributeValue) -> Self {
544        let mut hash_map = self.expected.unwrap_or_default();
545                        hash_map.insert(k.into(), v);
546                        self.expected = ::std::option::Option::Some(hash_map);
547                        self
548    }
549    /// <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>
550    pub fn set_expected(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::ExpectedAttributeValue>>) -> Self {
551        self.expected = input; self
552    }
553    /// <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>
554    pub fn get_expected(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::ExpectedAttributeValue>> {
555        &self.expected
556    }
557    /// <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>
558    /// <ul>
559    /// <li>
560    /// <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>
561    /// <li>
562    /// <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>
563    /// </ul>
564    /// <p>The values returned are strongly consistent.</p>
565    /// <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>
566    /// <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>
567    /// </note>
568    pub fn return_values(mut self, input: crate::types::ReturnValue) -> Self {
569        self.return_values = ::std::option::Option::Some(input);
570        self
571    }
572    /// <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>
573    /// <ul>
574    /// <li>
575    /// <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>
576    /// <li>
577    /// <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>
578    /// </ul>
579    /// <p>The values returned are strongly consistent.</p>
580    /// <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>
581    /// <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>
582    /// </note>
583    pub fn set_return_values(mut self, input: ::std::option::Option<crate::types::ReturnValue>) -> Self {
584        self.return_values = input; self
585    }
586    /// <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>
587    /// <ul>
588    /// <li>
589    /// <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>
590    /// <li>
591    /// <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>
592    /// </ul>
593    /// <p>The values returned are strongly consistent.</p>
594    /// <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>
595    /// <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>
596    /// </note>
597    pub fn get_return_values(&self) -> &::std::option::Option<crate::types::ReturnValue> {
598        &self.return_values
599    }
600    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
601    /// <ul>
602    /// <li>
603    /// <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>
604    /// <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>
605    /// <li>
606    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
607    /// <li>
608    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
609    /// </ul>
610    pub fn return_consumed_capacity(mut self, input: crate::types::ReturnConsumedCapacity) -> Self {
611        self.return_consumed_capacity = ::std::option::Option::Some(input);
612        self
613    }
614    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
615    /// <ul>
616    /// <li>
617    /// <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>
618    /// <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>
619    /// <li>
620    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
621    /// <li>
622    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
623    /// </ul>
624    pub fn set_return_consumed_capacity(mut self, input: ::std::option::Option<crate::types::ReturnConsumedCapacity>) -> Self {
625        self.return_consumed_capacity = input; self
626    }
627    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
628    /// <ul>
629    /// <li>
630    /// <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>
631    /// <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>
632    /// <li>
633    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
634    /// <li>
635    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
636    /// </ul>
637    pub fn get_return_consumed_capacity(&self) -> &::std::option::Option<crate::types::ReturnConsumedCapacity> {
638        &self.return_consumed_capacity
639    }
640    /// <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>
641    pub fn return_item_collection_metrics(mut self, input: crate::types::ReturnItemCollectionMetrics) -> Self {
642        self.return_item_collection_metrics = ::std::option::Option::Some(input);
643        self
644    }
645    /// <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>
646    pub fn set_return_item_collection_metrics(mut self, input: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>) -> Self {
647        self.return_item_collection_metrics = input; self
648    }
649    /// <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>
650    pub fn get_return_item_collection_metrics(&self) -> &::std::option::Option<crate::types::ReturnItemCollectionMetrics> {
651        &self.return_item_collection_metrics
652    }
653    /// <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>
654    pub fn conditional_operator(mut self, input: crate::types::ConditionalOperator) -> Self {
655        self.conditional_operator = ::std::option::Option::Some(input);
656        self
657    }
658    /// <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>
659    pub fn set_conditional_operator(mut self, input: ::std::option::Option<crate::types::ConditionalOperator>) -> Self {
660        self.conditional_operator = input; self
661    }
662    /// <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>
663    pub fn get_conditional_operator(&self) -> &::std::option::Option<crate::types::ConditionalOperator> {
664        &self.conditional_operator
665    }
666    /// <p>A condition that must be satisfied in order for a conditional <code>PutItem</code> operation to succeed.</p>
667    /// <p>An expression can contain any of the following:</p>
668    /// <ul>
669    /// <li>
670    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
671    /// <p>These function names are case-sensitive.</p></li>
672    /// <li>
673    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
674    /// <li>
675    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
676    /// </ul>
677    /// <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>
678    pub fn condition_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
679        self.condition_expression = ::std::option::Option::Some(input.into());
680        self
681    }
682    /// <p>A condition that must be satisfied in order for a conditional <code>PutItem</code> operation to succeed.</p>
683    /// <p>An expression can contain any of the following:</p>
684    /// <ul>
685    /// <li>
686    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
687    /// <p>These function names are case-sensitive.</p></li>
688    /// <li>
689    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
690    /// <li>
691    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
692    /// </ul>
693    /// <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>
694    pub fn set_condition_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
695        self.condition_expression = input; self
696    }
697    /// <p>A condition that must be satisfied in order for a conditional <code>PutItem</code> operation to succeed.</p>
698    /// <p>An expression can contain any of the following:</p>
699    /// <ul>
700    /// <li>
701    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
702    /// <p>These function names are case-sensitive.</p></li>
703    /// <li>
704    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
705    /// <li>
706    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
707    /// </ul>
708    /// <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>
709    pub fn get_condition_expression(&self) -> &::std::option::Option<::std::string::String> {
710        &self.condition_expression
711    }
712    /// Adds a key-value pair to `expression_attribute_names`.
713    ///
714    /// To override the contents of this collection use [`set_expression_attribute_names`](Self::set_expression_attribute_names).
715    ///
716    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
717    /// <ul>
718    /// <li>
719    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
720    /// <li>
721    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
722    /// <li>
723    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
724    /// </ul>
725    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
726    /// <ul>
727    /// <li>
728    /// <p><code>Percentile</code></p></li>
729    /// </ul>
730    /// <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>
731    /// <ul>
732    /// <li>
733    /// <p><code>{"#P":"Percentile"}</code></p></li>
734    /// </ul>
735    /// <p>You could then use this substitution in an expression, as in this example:</p>
736    /// <ul>
737    /// <li>
738    /// <p><code>#P = :val</code></p></li>
739    /// </ul><note>
740    /// <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>
741    /// </note>
742    /// <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>
743    pub fn expression_attribute_names(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
744        let mut hash_map = self.expression_attribute_names.unwrap_or_default();
745                        hash_map.insert(k.into(), v.into());
746                        self.expression_attribute_names = ::std::option::Option::Some(hash_map);
747                        self
748    }
749    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
750    /// <ul>
751    /// <li>
752    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
753    /// <li>
754    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
755    /// <li>
756    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
757    /// </ul>
758    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
759    /// <ul>
760    /// <li>
761    /// <p><code>Percentile</code></p></li>
762    /// </ul>
763    /// <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>
764    /// <ul>
765    /// <li>
766    /// <p><code>{"#P":"Percentile"}</code></p></li>
767    /// </ul>
768    /// <p>You could then use this substitution in an expression, as in this example:</p>
769    /// <ul>
770    /// <li>
771    /// <p><code>#P = :val</code></p></li>
772    /// </ul><note>
773    /// <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>
774    /// </note>
775    /// <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>
776    pub fn set_expression_attribute_names(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::string::String>>) -> Self {
777        self.expression_attribute_names = input; self
778    }
779    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
780    /// <ul>
781    /// <li>
782    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
783    /// <li>
784    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
785    /// <li>
786    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
787    /// </ul>
788    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
789    /// <ul>
790    /// <li>
791    /// <p><code>Percentile</code></p></li>
792    /// </ul>
793    /// <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>
794    /// <ul>
795    /// <li>
796    /// <p><code>{"#P":"Percentile"}</code></p></li>
797    /// </ul>
798    /// <p>You could then use this substitution in an expression, as in this example:</p>
799    /// <ul>
800    /// <li>
801    /// <p><code>#P = :val</code></p></li>
802    /// </ul><note>
803    /// <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>
804    /// </note>
805    /// <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>
806    pub fn get_expression_attribute_names(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::string::String>> {
807        &self.expression_attribute_names
808    }
809    /// Adds a key-value pair to `expression_attribute_values`.
810    ///
811    /// To override the contents of this collection use [`set_expression_attribute_values`](Self::set_expression_attribute_values).
812    ///
813    /// <p>One or more values that can be substituted in an expression.</p>
814    /// <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>
815    /// <p><code>Available | Backordered | Discontinued</code></p>
816    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
817    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
818    /// <p>You could then use these values in an expression, such as this:</p>
819    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
820    /// <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>
821    pub fn expression_attribute_values(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
822        let mut hash_map = self.expression_attribute_values.unwrap_or_default();
823                        hash_map.insert(k.into(), v);
824                        self.expression_attribute_values = ::std::option::Option::Some(hash_map);
825                        self
826    }
827    /// <p>One or more values that can be substituted in an expression.</p>
828    /// <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>
829    /// <p><code>Available | Backordered | Discontinued</code></p>
830    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
831    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
832    /// <p>You could then use these values in an expression, such as this:</p>
833    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
834    /// <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>
835    pub fn set_expression_attribute_values(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>) -> Self {
836        self.expression_attribute_values = input; self
837    }
838    /// <p>One or more values that can be substituted in an expression.</p>
839    /// <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>
840    /// <p><code>Available | Backordered | Discontinued</code></p>
841    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
842    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
843    /// <p>You could then use these values in an expression, such as this:</p>
844    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
845    /// <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>
846    pub fn get_expression_attribute_values(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>> {
847        &self.expression_attribute_values
848    }
849    /// <p>An optional parameter that returns the item attributes for a <code>PutItem</code> operation that failed a condition check.</p>
850    /// <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>
851    pub fn return_values_on_condition_check_failure(mut self, input: crate::types::ReturnValuesOnConditionCheckFailure) -> Self {
852        self.return_values_on_condition_check_failure = ::std::option::Option::Some(input);
853        self
854    }
855    /// <p>An optional parameter that returns the item attributes for a <code>PutItem</code> operation that failed a condition check.</p>
856    /// <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>
857    pub fn set_return_values_on_condition_check_failure(mut self, input: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>) -> Self {
858        self.return_values_on_condition_check_failure = input; self
859    }
860    /// <p>An optional parameter that returns the item attributes for a <code>PutItem</code> operation that failed a condition check.</p>
861    /// <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>
862    pub fn get_return_values_on_condition_check_failure(&self) -> &::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure> {
863        &self.return_values_on_condition_check_failure
864    }
865    /// Consumes the builder and constructs a [`PutItemInput`](crate::operation::put_item::PutItemInput).
866    pub fn build(self) -> ::std::result::Result<crate::operation::put_item::PutItemInput, ::aws_smithy_types::error::operation::BuildError> {
867        ::std::result::Result::Ok(
868            crate::operation::put_item::PutItemInput {
869                table_name: self.table_name
870                ,
871                item: self.item
872                ,
873                expected: self.expected
874                ,
875                return_values: self.return_values
876                ,
877                return_consumed_capacity: self.return_consumed_capacity
878                ,
879                return_item_collection_metrics: self.return_item_collection_metrics
880                ,
881                conditional_operator: self.conditional_operator
882                ,
883                condition_expression: self.condition_expression
884                ,
885                expression_attribute_names: self.expression_attribute_names
886                ,
887                expression_attribute_values: self.expression_attribute_values
888                ,
889                return_values_on_condition_check_failure: self.return_values_on_condition_check_failure
890                ,
891            }
892        )
893    }
894}
895