aws_sdk_dynamodb/operation/put_item/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::put_item::_put_item_output::PutItemOutputBuilder;
3
4pub use crate::operation::put_item::_put_item_input::PutItemInputBuilder;
5
6impl crate::operation::put_item::builders::PutItemInputBuilder {
7                    /// Sends a request with this input using the given client.
8                    pub async fn send_with(self, client: &crate::Client) -> ::std::result::Result<
9                        crate::operation::put_item::PutItemOutput,
10                        ::aws_smithy_runtime_api::client::result::SdkError<
11                            crate::operation::put_item::PutItemError,
12                            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse
13                        >
14                    > {
15                        let mut fluent_builder = client.put_item();
16                        fluent_builder.inner = self;
17                        fluent_builder.send().await
18                    }
19                }
20/// Fluent builder constructing a request to `PutItem`.
21/// 
22/// <p>Creates a new item, or replaces an old item with a new item. If an item that has the same primary key as the new item already exists in the specified table, the new item completely replaces the existing item. You can perform a conditional put operation (add a new item if one with the specified primary key doesn't exist), or replace an existing item if it has certain attribute values. You can return the item's attribute values in the same operation, using the <code>ReturnValues</code> parameter.</p>
23/// <p>When you add an item, the primary key attributes are the only required attributes.</p>
24/// <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. Set type attributes cannot be empty.</p>
25/// <p>Invalid Requests with empty values will be rejected with a <code>ValidationException</code> exception.</p><note>
26/// <p>To prevent a new item from replacing an existing item, use a conditional expression that contains the <code>attribute_not_exists</code> function with the name of the attribute being used as the partition key for the table. Since every record must contain that attribute, the <code>attribute_not_exists</code> function will only succeed if no matching item exists.</p>
27/// </note>
28/// <p>For more information about <code>PutItem</code>, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html">Working with Items</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct PutItemFluentBuilder {
31                handle: ::std::sync::Arc<crate::client::Handle>,
32                inner: crate::operation::put_item::builders::PutItemInputBuilder,
33config_override: ::std::option::Option<crate::config::Builder>,
34            }
35impl
36                crate::client::customize::internal::CustomizableSend<
37                    crate::operation::put_item::PutItemOutput,
38                    crate::operation::put_item::PutItemError,
39                > for PutItemFluentBuilder
40            {
41                fn send(
42                    self,
43                    config_override: crate::config::Builder,
44                ) -> crate::client::customize::internal::BoxFuture<
45                    crate::client::customize::internal::SendResult<
46                        crate::operation::put_item::PutItemOutput,
47                        crate::operation::put_item::PutItemError,
48                    >,
49                > {
50                    ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51                }
52            }
53impl PutItemFluentBuilder {
54    /// Creates a new `PutItemFluentBuilder`.
55                    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56                        Self {
57                            handle,
58                            inner: ::std::default::Default::default(),
59    config_override: ::std::option::Option::None,
60                        }
61                    }
62    /// Access the PutItem as a reference.
63                    pub fn as_input(&self) -> &crate::operation::put_item::builders::PutItemInputBuilder {
64                        &self.inner
65                    }
66    /// Sends the request and returns the response.
67                    ///
68                    /// If an error occurs, an `SdkError` will be returned with additional details that
69                    /// can be matched against.
70                    ///
71                    /// By default, any retryable failures will be retried twice. Retry behavior
72                    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73                    /// set when configuring the client. Note: retries are enabled by default when using
74                    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
75                    pub async fn send(self) -> ::std::result::Result<crate::operation::put_item::PutItemOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_item::PutItemError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>> {
76                        let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
77                        let runtime_plugins = crate::operation::put_item::PutItem::operation_runtime_plugins(
78                            self.handle.runtime_plugins.clone(),
79                            &self.handle.conf,
80                            self.config_override,
81                        );
82                        crate::operation::put_item::PutItem::orchestrate(&runtime_plugins, input).await
83                    }
84    
85                    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
86                    pub fn customize(
87                        self,
88                    ) -> crate::client::customize::CustomizableOperation<crate::operation::put_item::PutItemOutput, crate::operation::put_item::PutItemError, Self> {
89                        crate::client::customize::CustomizableOperation::new(self)
90                    }
91    pub(crate) fn config_override(
92                            mut self,
93                            config_override: impl ::std::convert::Into<crate::config::Builder>,
94                        ) -> Self {
95                            self.set_config_override(::std::option::Option::Some(config_override.into()));
96                            self
97                        }
98    
99                        pub(crate) fn set_config_override(
100                            &mut self,
101                            config_override: ::std::option::Option<crate::config::Builder>,
102                        ) -> &mut Self {
103                            self.config_override = config_override;
104                            self
105                        }
106    /// <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>
107    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108                    self.inner = self.inner.table_name(input.into());
109                    self
110                }
111    /// <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>
112    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113                    self.inner = self.inner.set_table_name(input);
114                    self
115                }
116    /// <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>
117    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
118                    self.inner.get_table_name()
119                }
120    /// 
121    /// Adds a key-value pair to `Item`.
122    /// 
123    /// To override the contents of this collection use [`set_item`](Self::set_item).
124    /// 
125    /// <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>
126    /// <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>
127    /// <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>
128    /// <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>
129    /// <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>
130    /// <p>Each element in the <code>Item</code> map is an <code>AttributeValue</code> object.</p>
131    pub fn item(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
132                    self.inner = self.inner.item(k.into(), v);
133                    self
134                }
135    /// <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>
136    /// <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>
137    /// <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>
138    /// <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>
139    /// <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>
140    /// <p>Each element in the <code>Item</code> map is an <code>AttributeValue</code> object.</p>
141    pub fn set_item(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>) -> Self {
142                    self.inner = self.inner.set_item(input);
143                    self
144                }
145    /// <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>
146    /// <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>
147    /// <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>
148    /// <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>
149    /// <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>
150    /// <p>Each element in the <code>Item</code> map is an <code>AttributeValue</code> object.</p>
151    pub fn get_item(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>> {
152                    self.inner.get_item()
153                }
154    /// 
155    /// Adds a key-value pair to `Expected`.
156    /// 
157    /// To override the contents of this collection use [`set_expected`](Self::set_expected).
158    /// 
159    /// <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>
160    pub fn expected(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ExpectedAttributeValue) -> Self {
161                    self.inner = self.inner.expected(k.into(), v);
162                    self
163                }
164    /// <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>
165    pub fn set_expected(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::ExpectedAttributeValue>>) -> Self {
166                    self.inner = self.inner.set_expected(input);
167                    self
168                }
169    /// <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>
170    pub fn get_expected(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::ExpectedAttributeValue>> {
171                    self.inner.get_expected()
172                }
173    /// <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>
174    /// <ul>
175    /// <li>
176    /// <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>
177    /// <li>
178    /// <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>
179    /// </ul>
180    /// <p>The values returned are strongly consistent.</p>
181    /// <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>
182    /// <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>
183    /// </note>
184    pub fn return_values(mut self, input: crate::types::ReturnValue) -> Self {
185                    self.inner = self.inner.return_values(input);
186                    self
187                }
188    /// <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>
189    /// <ul>
190    /// <li>
191    /// <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>
192    /// <li>
193    /// <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>
194    /// </ul>
195    /// <p>The values returned are strongly consistent.</p>
196    /// <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>
197    /// <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>
198    /// </note>
199    pub fn set_return_values(mut self, input: ::std::option::Option<crate::types::ReturnValue>) -> Self {
200                    self.inner = self.inner.set_return_values(input);
201                    self
202                }
203    /// <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>
204    /// <ul>
205    /// <li>
206    /// <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>
207    /// <li>
208    /// <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>
209    /// </ul>
210    /// <p>The values returned are strongly consistent.</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><note>
212    /// <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>
213    /// </note>
214    pub fn get_return_values(&self) -> &::std::option::Option<crate::types::ReturnValue> {
215                    self.inner.get_return_values()
216                }
217    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
218    /// <ul>
219    /// <li>
220    /// <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>
221    /// <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>
222    /// <li>
223    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
224    /// <li>
225    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
226    /// </ul>
227    pub fn return_consumed_capacity(mut self, input: crate::types::ReturnConsumedCapacity) -> Self {
228                    self.inner = self.inner.return_consumed_capacity(input);
229                    self
230                }
231    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
232    /// <ul>
233    /// <li>
234    /// <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>
235    /// <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>
236    /// <li>
237    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
238    /// <li>
239    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
240    /// </ul>
241    pub fn set_return_consumed_capacity(mut self, input: ::std::option::Option<crate::types::ReturnConsumedCapacity>) -> Self {
242                    self.inner = self.inner.set_return_consumed_capacity(input);
243                    self
244                }
245    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
246    /// <ul>
247    /// <li>
248    /// <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>
249    /// <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>
250    /// <li>
251    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
252    /// <li>
253    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
254    /// </ul>
255    pub fn get_return_consumed_capacity(&self) -> &::std::option::Option<crate::types::ReturnConsumedCapacity> {
256                    self.inner.get_return_consumed_capacity()
257                }
258    /// <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>
259    pub fn return_item_collection_metrics(mut self, input: crate::types::ReturnItemCollectionMetrics) -> Self {
260                    self.inner = self.inner.return_item_collection_metrics(input);
261                    self
262                }
263    /// <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>
264    pub fn set_return_item_collection_metrics(mut self, input: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>) -> Self {
265                    self.inner = self.inner.set_return_item_collection_metrics(input);
266                    self
267                }
268    /// <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>
269    pub fn get_return_item_collection_metrics(&self) -> &::std::option::Option<crate::types::ReturnItemCollectionMetrics> {
270                    self.inner.get_return_item_collection_metrics()
271                }
272    /// <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>
273    pub fn conditional_operator(mut self, input: crate::types::ConditionalOperator) -> Self {
274                    self.inner = self.inner.conditional_operator(input);
275                    self
276                }
277    /// <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>
278    pub fn set_conditional_operator(mut self, input: ::std::option::Option<crate::types::ConditionalOperator>) -> Self {
279                    self.inner = self.inner.set_conditional_operator(input);
280                    self
281                }
282    /// <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>
283    pub fn get_conditional_operator(&self) -> &::std::option::Option<crate::types::ConditionalOperator> {
284                    self.inner.get_conditional_operator()
285                }
286    /// <p>A condition that must be satisfied in order for a conditional <code>PutItem</code> operation to succeed.</p>
287    /// <p>An expression can contain any of the following:</p>
288    /// <ul>
289    /// <li>
290    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
291    /// <p>These function names are case-sensitive.</p></li>
292    /// <li>
293    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
294    /// <li>
295    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
296    /// </ul>
297    /// <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>
298    pub fn condition_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
299                    self.inner = self.inner.condition_expression(input.into());
300                    self
301                }
302    /// <p>A condition that must be satisfied in order for a conditional <code>PutItem</code> operation to succeed.</p>
303    /// <p>An expression can contain any of the following:</p>
304    /// <ul>
305    /// <li>
306    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
307    /// <p>These function names are case-sensitive.</p></li>
308    /// <li>
309    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
310    /// <li>
311    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
312    /// </ul>
313    /// <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>
314    pub fn set_condition_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
315                    self.inner = self.inner.set_condition_expression(input);
316                    self
317                }
318    /// <p>A condition that must be satisfied in order for a conditional <code>PutItem</code> operation to succeed.</p>
319    /// <p>An expression can contain any of the following:</p>
320    /// <ul>
321    /// <li>
322    /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
323    /// <p>These function names are case-sensitive.</p></li>
324    /// <li>
325    /// <p>Comparison operators: <code>= | &lt;&gt; | &lt; | &gt; | &lt;= | &gt;= | BETWEEN | IN </code></p></li>
326    /// <li>
327    /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
328    /// </ul>
329    /// <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>
330    pub fn get_condition_expression(&self) -> &::std::option::Option<::std::string::String> {
331                    self.inner.get_condition_expression()
332                }
333    /// 
334    /// Adds a key-value pair to `ExpressionAttributeNames`.
335    /// 
336    /// To override the contents of this collection use [`set_expression_attribute_names`](Self::set_expression_attribute_names).
337    /// 
338    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
339    /// <ul>
340    /// <li>
341    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
342    /// <li>
343    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
344    /// <li>
345    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
346    /// </ul>
347    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
348    /// <ul>
349    /// <li>
350    /// <p><code>Percentile</code></p></li>
351    /// </ul>
352    /// <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>
353    /// <ul>
354    /// <li>
355    /// <p><code>{"#P":"Percentile"}</code></p></li>
356    /// </ul>
357    /// <p>You could then use this substitution in an expression, as in this example:</p>
358    /// <ul>
359    /// <li>
360    /// <p><code>#P = :val</code></p></li>
361    /// </ul><note>
362    /// <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>
363    /// </note>
364    /// <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>
365    pub fn expression_attribute_names(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
366                    self.inner = self.inner.expression_attribute_names(k.into(), v.into());
367                    self
368                }
369    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
370    /// <ul>
371    /// <li>
372    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
373    /// <li>
374    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
375    /// <li>
376    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
377    /// </ul>
378    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
379    /// <ul>
380    /// <li>
381    /// <p><code>Percentile</code></p></li>
382    /// </ul>
383    /// <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>
384    /// <ul>
385    /// <li>
386    /// <p><code>{"#P":"Percentile"}</code></p></li>
387    /// </ul>
388    /// <p>You could then use this substitution in an expression, as in this example:</p>
389    /// <ul>
390    /// <li>
391    /// <p><code>#P = :val</code></p></li>
392    /// </ul><note>
393    /// <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>
394    /// </note>
395    /// <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>
396    pub fn set_expression_attribute_names(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::string::String>>) -> Self {
397                    self.inner = self.inner.set_expression_attribute_names(input);
398                    self
399                }
400    /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
401    /// <ul>
402    /// <li>
403    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
404    /// <li>
405    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
406    /// <li>
407    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
408    /// </ul>
409    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
410    /// <ul>
411    /// <li>
412    /// <p><code>Percentile</code></p></li>
413    /// </ul>
414    /// <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>
415    /// <ul>
416    /// <li>
417    /// <p><code>{"#P":"Percentile"}</code></p></li>
418    /// </ul>
419    /// <p>You could then use this substitution in an expression, as in this example:</p>
420    /// <ul>
421    /// <li>
422    /// <p><code>#P = :val</code></p></li>
423    /// </ul><note>
424    /// <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>
425    /// </note>
426    /// <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>
427    pub fn get_expression_attribute_names(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::string::String>> {
428                    self.inner.get_expression_attribute_names()
429                }
430    /// 
431    /// Adds a key-value pair to `ExpressionAttributeValues`.
432    /// 
433    /// To override the contents of this collection use [`set_expression_attribute_values`](Self::set_expression_attribute_values).
434    /// 
435    /// <p>One or more values that can be substituted in an expression.</p>
436    /// <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>
437    /// <p><code>Available | Backordered | Discontinued</code></p>
438    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
439    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
440    /// <p>You could then use these values in an expression, such as this:</p>
441    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
442    /// <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>
443    pub fn expression_attribute_values(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
444                    self.inner = self.inner.expression_attribute_values(k.into(), v);
445                    self
446                }
447    /// <p>One or more values that can be substituted in an expression.</p>
448    /// <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>
449    /// <p><code>Available | Backordered | Discontinued</code></p>
450    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
451    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
452    /// <p>You could then use these values in an expression, such as this:</p>
453    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
454    /// <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>
455    pub fn set_expression_attribute_values(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>) -> Self {
456                    self.inner = self.inner.set_expression_attribute_values(input);
457                    self
458                }
459    /// <p>One or more values that can be substituted in an expression.</p>
460    /// <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>
461    /// <p><code>Available | Backordered | Discontinued</code></p>
462    /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
463    /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
464    /// <p>You could then use these values in an expression, such as this:</p>
465    /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
466    /// <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>
467    pub fn get_expression_attribute_values(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>> {
468                    self.inner.get_expression_attribute_values()
469                }
470    /// <p>An optional parameter that returns the item attributes for a <code>PutItem</code> operation that failed a condition check.</p>
471    /// <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>
472    pub fn return_values_on_condition_check_failure(mut self, input: crate::types::ReturnValuesOnConditionCheckFailure) -> Self {
473                    self.inner = self.inner.return_values_on_condition_check_failure(input);
474                    self
475                }
476    /// <p>An optional parameter that returns the item attributes for a <code>PutItem</code> operation that failed a condition check.</p>
477    /// <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>
478    pub fn set_return_values_on_condition_check_failure(mut self, input: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>) -> Self {
479                    self.inner = self.inner.set_return_values_on_condition_check_failure(input);
480                    self
481                }
482    /// <p>An optional parameter that returns the item attributes for a <code>PutItem</code> operation that failed a condition check.</p>
483    /// <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>
484    pub fn get_return_values_on_condition_check_failure(&self) -> &::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure> {
485                    self.inner.get_return_values_on_condition_check_failure()
486                }
487}
488