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.
71 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>> {
72 let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
73 let runtime_plugins = crate::operation::delete_item::DeleteItem::operation_runtime_plugins(
74 self.handle.runtime_plugins.clone(),
75 &self.handle.conf,
76 self.config_override,
77 );
78 crate::operation::delete_item::DeleteItem::orchestrate(&runtime_plugins, input).await
79 }
80
81 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
82 pub fn customize(
83 self,
84 ) -> crate::client::customize::CustomizableOperation<crate::operation::delete_item::DeleteItemOutput, crate::operation::delete_item::DeleteItemError, Self> {
85 crate::client::customize::CustomizableOperation::new(self)
86 }
87 pub(crate) fn config_override(
88 mut self,
89 config_override: impl ::std::convert::Into<crate::config::Builder>,
90 ) -> Self {
91 self.set_config_override(::std::option::Option::Some(config_override.into()));
92 self
93 }
94
95 pub(crate) fn set_config_override(
96 &mut self,
97 config_override: ::std::option::Option<crate::config::Builder>,
98 ) -> &mut Self {
99 self.config_override = config_override;
100 self
101 }
102 /// <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>
103 pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104 self.inner = self.inner.table_name(input.into());
105 self
106 }
107 /// <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>
108 pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109 self.inner = self.inner.set_table_name(input);
110 self
111 }
112 /// <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>
113 pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
114 self.inner.get_table_name()
115 }
116 ///
117 /// Adds a key-value pair to `Key`.
118 ///
119 /// To override the contents of this collection use [`set_key`](Self::set_key).
120 ///
121 /// <p>A map of attribute names to <code>AttributeValue</code> objects, representing the primary key of the item to delete.</p>
122 /// <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>
123 pub fn key(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
124 self.inner = self.inner.key(k.into(), v);
125 self
126 }
127 /// <p>A map of attribute names to <code>AttributeValue</code> objects, representing the primary key of the item to delete.</p>
128 /// <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>
129 pub fn set_key(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>) -> Self {
130 self.inner = self.inner.set_key(input);
131 self
132 }
133 /// <p>A map of attribute names to <code>AttributeValue</code> objects, representing the primary key of the item to delete.</p>
134 /// <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>
135 pub fn get_key(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>> {
136 self.inner.get_key()
137 }
138 ///
139 /// Adds a key-value pair to `Expected`.
140 ///
141 /// To override the contents of this collection use [`set_expected`](Self::set_expected).
142 ///
143 /// <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>
144 pub fn expected(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ExpectedAttributeValue) -> Self {
145 self.inner = self.inner.expected(k.into(), v);
146 self
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.Expected.html">Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
149 pub fn set_expected(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::ExpectedAttributeValue>>) -> Self {
150 self.inner = self.inner.set_expected(input);
151 self
152 }
153 /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html">Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
154 pub fn get_expected(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::ExpectedAttributeValue>> {
155 self.inner.get_expected()
156 }
157 /// <p>This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html">ConditionalOperator</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
158 pub fn conditional_operator(mut self, input: crate::types::ConditionalOperator) -> Self {
159 self.inner = self.inner.conditional_operator(input);
160 self
161 }
162 /// <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>
163 pub fn set_conditional_operator(mut self, input: ::std::option::Option<crate::types::ConditionalOperator>) -> Self {
164 self.inner = self.inner.set_conditional_operator(input);
165 self
166 }
167 /// <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>
168 pub fn get_conditional_operator(&self) -> &::std::option::Option<crate::types::ConditionalOperator> {
169 self.inner.get_conditional_operator()
170 }
171 /// <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>
172 /// <ul>
173 /// <li>
174 /// <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>
175 /// <li>
176 /// <p><code>ALL_OLD</code> - The content of the old item is returned.</p></li>
177 /// </ul>
178 /// <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>
179 /// <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>
180 /// </note>
181 pub fn return_values(mut self, input: crate::types::ReturnValue) -> Self {
182 self.inner = self.inner.return_values(input);
183 self
184 }
185 /// <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>
186 /// <ul>
187 /// <li>
188 /// <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>
189 /// <li>
190 /// <p><code>ALL_OLD</code> - The content of the old item is returned.</p></li>
191 /// </ul>
192 /// <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>
193 /// <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>
194 /// </note>
195 pub fn set_return_values(mut self, input: ::std::option::Option<crate::types::ReturnValue>) -> Self {
196 self.inner = self.inner.set_return_values(input);
197 self
198 }
199 /// <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>
200 /// <ul>
201 /// <li>
202 /// <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>
203 /// <li>
204 /// <p><code>ALL_OLD</code> - The content of the old item is returned.</p></li>
205 /// </ul>
206 /// <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>
207 /// <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>
208 /// </note>
209 pub fn get_return_values(&self) -> &::std::option::Option<crate::types::ReturnValue> {
210 self.inner.get_return_values()
211 }
212 /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
213 /// <ul>
214 /// <li>
215 /// <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>
216 /// <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>
217 /// <li>
218 /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
219 /// <li>
220 /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
221 /// </ul>
222 pub fn return_consumed_capacity(mut self, input: crate::types::ReturnConsumedCapacity) -> Self {
223 self.inner = self.inner.return_consumed_capacity(input);
224 self
225 }
226 /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
227 /// <ul>
228 /// <li>
229 /// <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>
230 /// <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>
231 /// <li>
232 /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
233 /// <li>
234 /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
235 /// </ul>
236 pub fn set_return_consumed_capacity(mut self, input: ::std::option::Option<crate::types::ReturnConsumedCapacity>) -> Self {
237 self.inner = self.inner.set_return_consumed_capacity(input);
238 self
239 }
240 /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
241 /// <ul>
242 /// <li>
243 /// <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>
244 /// <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>
245 /// <li>
246 /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
247 /// <li>
248 /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
249 /// </ul>
250 pub fn get_return_consumed_capacity(&self) -> &::std::option::Option<crate::types::ReturnConsumedCapacity> {
251 self.inner.get_return_consumed_capacity()
252 }
253 /// <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>
254 pub fn return_item_collection_metrics(mut self, input: crate::types::ReturnItemCollectionMetrics) -> Self {
255 self.inner = self.inner.return_item_collection_metrics(input);
256 self
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 set_return_item_collection_metrics(mut self, input: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>) -> Self {
260 self.inner = self.inner.set_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 get_return_item_collection_metrics(&self) -> &::std::option::Option<crate::types::ReturnItemCollectionMetrics> {
265 self.inner.get_return_item_collection_metrics()
266 }
267 /// <p>A condition that must be satisfied in order for a conditional <code>DeleteItem</code> to succeed.</p>
268 /// <p>An expression can contain any of the following:</p>
269 /// <ul>
270 /// <li>
271 /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
272 /// <p>These function names are case-sensitive.</p></li>
273 /// <li>
274 /// <p>Comparison operators: <code>= | <> | < | > | <= | >= | BETWEEN | IN </code></p></li>
275 /// <li>
276 /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
277 /// </ul>
278 /// <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>
279 pub fn condition_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
280 self.inner = self.inner.condition_expression(input.into());
281 self
282 }
283 /// <p>A condition that must be satisfied in order for a conditional <code>DeleteItem</code> to succeed.</p>
284 /// <p>An expression can contain any of the following:</p>
285 /// <ul>
286 /// <li>
287 /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
288 /// <p>These function names are case-sensitive.</p></li>
289 /// <li>
290 /// <p>Comparison operators: <code>= | <> | < | > | <= | >= | BETWEEN | IN </code></p></li>
291 /// <li>
292 /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
293 /// </ul>
294 /// <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>
295 pub fn set_condition_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
296 self.inner = self.inner.set_condition_expression(input);
297 self
298 }
299 /// <p>A condition that must be satisfied in order for a conditional <code>DeleteItem</code> to succeed.</p>
300 /// <p>An expression can contain any of the following:</p>
301 /// <ul>
302 /// <li>
303 /// <p>Functions: <code>attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size</code></p>
304 /// <p>These function names are case-sensitive.</p></li>
305 /// <li>
306 /// <p>Comparison operators: <code>= | <> | < | > | <= | >= | BETWEEN | IN </code></p></li>
307 /// <li>
308 /// <p>Logical operators: <code>AND | OR | NOT</code></p></li>
309 /// </ul>
310 /// <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>
311 pub fn get_condition_expression(&self) -> &::std::option::Option<::std::string::String> {
312 self.inner.get_condition_expression()
313 }
314 ///
315 /// Adds a key-value pair to `ExpressionAttributeNames`.
316 ///
317 /// To override the contents of this collection use [`set_expression_attribute_names`](Self::set_expression_attribute_names).
318 ///
319 /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
320 /// <ul>
321 /// <li>
322 /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
323 /// <li>
324 /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
325 /// <li>
326 /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
327 /// </ul>
328 /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
329 /// <ul>
330 /// <li>
331 /// <p><code>Percentile</code></p></li>
332 /// </ul>
333 /// <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>
334 /// <ul>
335 /// <li>
336 /// <p><code>{"#P":"Percentile"}</code></p></li>
337 /// </ul>
338 /// <p>You could then use this substitution in an expression, as in this example:</p>
339 /// <ul>
340 /// <li>
341 /// <p><code>#P = :val</code></p></li>
342 /// </ul><note>
343 /// <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>
344 /// </note>
345 /// <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>
346 pub fn expression_attribute_names(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
347 self.inner = self.inner.expression_attribute_names(k.into(), v.into());
348 self
349 }
350 /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
351 /// <ul>
352 /// <li>
353 /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
354 /// <li>
355 /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
356 /// <li>
357 /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
358 /// </ul>
359 /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
360 /// <ul>
361 /// <li>
362 /// <p><code>Percentile</code></p></li>
363 /// </ul>
364 /// <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>
365 /// <ul>
366 /// <li>
367 /// <p><code>{"#P":"Percentile"}</code></p></li>
368 /// </ul>
369 /// <p>You could then use this substitution in an expression, as in this example:</p>
370 /// <ul>
371 /// <li>
372 /// <p><code>#P = :val</code></p></li>
373 /// </ul><note>
374 /// <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>
375 /// </note>
376 /// <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>
377 pub fn set_expression_attribute_names(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::string::String>>) -> Self {
378 self.inner = self.inner.set_expression_attribute_names(input);
379 self
380 }
381 /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
382 /// <ul>
383 /// <li>
384 /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
385 /// <li>
386 /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
387 /// <li>
388 /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
389 /// </ul>
390 /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
391 /// <ul>
392 /// <li>
393 /// <p><code>Percentile</code></p></li>
394 /// </ul>
395 /// <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>
396 /// <ul>
397 /// <li>
398 /// <p><code>{"#P":"Percentile"}</code></p></li>
399 /// </ul>
400 /// <p>You could then use this substitution in an expression, as in this example:</p>
401 /// <ul>
402 /// <li>
403 /// <p><code>#P = :val</code></p></li>
404 /// </ul><note>
405 /// <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>
406 /// </note>
407 /// <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>
408 pub fn get_expression_attribute_names(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::string::String>> {
409 self.inner.get_expression_attribute_names()
410 }
411 ///
412 /// Adds a key-value pair to `ExpressionAttributeValues`.
413 ///
414 /// To override the contents of this collection use [`set_expression_attribute_values`](Self::set_expression_attribute_values).
415 ///
416 /// <p>One or more values that can be substituted in an expression.</p>
417 /// <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>
418 /// <p><code>Available | Backordered | Discontinued</code></p>
419 /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
420 /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
421 /// <p>You could then use these values in an expression, such as this:</p>
422 /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
423 /// <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>
424 pub fn expression_attribute_values(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
425 self.inner = self.inner.expression_attribute_values(k.into(), v);
426 self
427 }
428 /// <p>One or more values that can be substituted in an expression.</p>
429 /// <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>
430 /// <p><code>Available | Backordered | Discontinued</code></p>
431 /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
432 /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
433 /// <p>You could then use these values in an expression, such as this:</p>
434 /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
435 /// <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>
436 pub fn set_expression_attribute_values(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>>) -> Self {
437 self.inner = self.inner.set_expression_attribute_values(input);
438 self
439 }
440 /// <p>One or more values that can be substituted in an expression.</p>
441 /// <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>
442 /// <p><code>Available | Backordered | Discontinued</code></p>
443 /// <p>You would first need to specify <code>ExpressionAttributeValues</code> as follows:</p>
444 /// <p><code>{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"} }</code></p>
445 /// <p>You could then use these values in an expression, such as this:</p>
446 /// <p><code>ProductStatus IN (:avail, :back, :disc)</code></p>
447 /// <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>
448 pub fn get_expression_attribute_values(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, crate::types::AttributeValue>> {
449 self.inner.get_expression_attribute_values()
450 }
451 /// <p>An optional parameter that returns the item attributes for a <code>DeleteItem</code> operation that failed a condition check.</p>
452 /// <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>
453 pub fn return_values_on_condition_check_failure(mut self, input: crate::types::ReturnValuesOnConditionCheckFailure) -> Self {
454 self.inner = self.inner.return_values_on_condition_check_failure(input);
455 self
456 }
457 /// <p>An optional parameter that returns the item attributes for a <code>DeleteItem</code> operation that failed a condition check.</p>
458 /// <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>
459 pub fn set_return_values_on_condition_check_failure(mut self, input: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>) -> Self {
460 self.inner = self.inner.set_return_values_on_condition_check_failure(input);
461 self
462 }
463 /// <p>An optional parameter that returns the item attributes for a <code>DeleteItem</code> operation that failed a condition check.</p>
464 /// <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>
465 pub fn get_return_values_on_condition_check_failure(&self) -> &::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure> {
466 self.inner.get_return_values_on_condition_check_failure()
467 }
468}
469