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