aws_sdk_dynamodb/operation/batch_get_item/
_batch_get_item_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of a <code>BatchGetItem</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct BatchGetItemInput {
7    /// <p>A map of one or more table names or table ARNs and, for each table, a map that describes one or more items to retrieve from that table. Each table name or ARN can be used only once per <code>BatchGetItem</code> request.</p>
8    /// <p>Each element in the map of items to retrieve consists of the following:</p>
9    /// <ul>
10    /// <li>
11    /// <p><code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p></li>
12    /// <li>
13    /// <p><code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
14    /// <ul>
15    /// <li>
16    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
17    /// <li>
18    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
19    /// <li>
20    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
21    /// </ul>
22    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
23    /// <ul>
24    /// <li>
25    /// <p><code>Percentile</code></p></li>
26    /// </ul>
27    /// <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>
28    /// <ul>
29    /// <li>
30    /// <p><code>{"#P":"Percentile"}</code></p></li>
31    /// </ul>
32    /// <p>You could then use this substitution in an expression, as in this example:</p>
33    /// <ul>
34    /// <li>
35    /// <p><code>#P = :val</code></p></li>
36    /// </ul><note>
37    /// <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>
38    /// </note>
39    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
40    /// <li>
41    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p></li>
42    /// <li>
43    /// <p><code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p>
44    /// <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
45    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
46    /// <li>
47    /// <p><code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
48    /// </ul>
49    pub request_items: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>>,
50    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
51    /// <ul>
52    /// <li>
53    /// <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>
54    /// <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>
55    /// <li>
56    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
57    /// <li>
58    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
59    /// </ul>
60    pub return_consumed_capacity: ::std::option::Option<crate::types::ReturnConsumedCapacity>,
61}
62impl BatchGetItemInput {
63    /// <p>A map of one or more table names or table ARNs and, for each table, a map that describes one or more items to retrieve from that table. Each table name or ARN can be used only once per <code>BatchGetItem</code> request.</p>
64    /// <p>Each element in the map of items to retrieve consists of the following:</p>
65    /// <ul>
66    /// <li>
67    /// <p><code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p></li>
68    /// <li>
69    /// <p><code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
70    /// <ul>
71    /// <li>
72    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
73    /// <li>
74    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
75    /// <li>
76    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
77    /// </ul>
78    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
79    /// <ul>
80    /// <li>
81    /// <p><code>Percentile</code></p></li>
82    /// </ul>
83    /// <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>
84    /// <ul>
85    /// <li>
86    /// <p><code>{"#P":"Percentile"}</code></p></li>
87    /// </ul>
88    /// <p>You could then use this substitution in an expression, as in this example:</p>
89    /// <ul>
90    /// <li>
91    /// <p><code>#P = :val</code></p></li>
92    /// </ul><note>
93    /// <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>
94    /// </note>
95    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
96    /// <li>
97    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p></li>
98    /// <li>
99    /// <p><code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p>
100    /// <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
101    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
102    /// <li>
103    /// <p><code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
104    /// </ul>
105    pub fn request_items(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>> {
106        self.request_items.as_ref()
107    }
108    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
109    /// <ul>
110    /// <li>
111    /// <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>
112    /// <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>
113    /// <li>
114    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
115    /// <li>
116    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
117    /// </ul>
118    pub fn return_consumed_capacity(&self) -> ::std::option::Option<&crate::types::ReturnConsumedCapacity> {
119        self.return_consumed_capacity.as_ref()
120    }
121}
122impl BatchGetItemInput {
123    /// Creates a new builder-style object to manufacture [`BatchGetItemInput`](crate::operation::batch_get_item::BatchGetItemInput).
124    pub fn builder() -> crate::operation::batch_get_item::builders::BatchGetItemInputBuilder {
125        crate::operation::batch_get_item::builders::BatchGetItemInputBuilder::default()
126    }
127}
128
129/// A builder for [`BatchGetItemInput`](crate::operation::batch_get_item::BatchGetItemInput).
130#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
131#[non_exhaustive]
132pub struct BatchGetItemInputBuilder {
133    pub(crate) request_items: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>>,
134    pub(crate) return_consumed_capacity: ::std::option::Option<crate::types::ReturnConsumedCapacity>,
135}
136impl BatchGetItemInputBuilder {
137    /// Adds a key-value pair to `request_items`.
138    ///
139    /// To override the contents of this collection use [`set_request_items`](Self::set_request_items).
140    ///
141    /// <p>A map of one or more table names or table ARNs and, for each table, a map that describes one or more items to retrieve from that table. Each table name or ARN can be used only once per <code>BatchGetItem</code> request.</p>
142    /// <p>Each element in the map of items to retrieve consists of the following:</p>
143    /// <ul>
144    /// <li>
145    /// <p><code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p></li>
146    /// <li>
147    /// <p><code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
148    /// <ul>
149    /// <li>
150    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
151    /// <li>
152    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
153    /// <li>
154    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
155    /// </ul>
156    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
157    /// <ul>
158    /// <li>
159    /// <p><code>Percentile</code></p></li>
160    /// </ul>
161    /// <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>
162    /// <ul>
163    /// <li>
164    /// <p><code>{"#P":"Percentile"}</code></p></li>
165    /// </ul>
166    /// <p>You could then use this substitution in an expression, as in this example:</p>
167    /// <ul>
168    /// <li>
169    /// <p><code>#P = :val</code></p></li>
170    /// </ul><note>
171    /// <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>
172    /// </note>
173    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
174    /// <li>
175    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p></li>
176    /// <li>
177    /// <p><code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p>
178    /// <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
179    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
180    /// <li>
181    /// <p><code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
182    /// </ul>
183    pub fn request_items(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::KeysAndAttributes) -> Self {
184        let mut hash_map = self.request_items.unwrap_or_default();
185        hash_map.insert(k.into(), v);
186        self.request_items = ::std::option::Option::Some(hash_map);
187        self
188    }
189    /// <p>A map of one or more table names or table ARNs and, for each table, a map that describes one or more items to retrieve from that table. Each table name or ARN can be used only once per <code>BatchGetItem</code> request.</p>
190    /// <p>Each element in the map of items to retrieve consists of the following:</p>
191    /// <ul>
192    /// <li>
193    /// <p><code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p></li>
194    /// <li>
195    /// <p><code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
196    /// <ul>
197    /// <li>
198    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
199    /// <li>
200    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
201    /// <li>
202    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
203    /// </ul>
204    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
205    /// <ul>
206    /// <li>
207    /// <p><code>Percentile</code></p></li>
208    /// </ul>
209    /// <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>
210    /// <ul>
211    /// <li>
212    /// <p><code>{"#P":"Percentile"}</code></p></li>
213    /// </ul>
214    /// <p>You could then use this substitution in an expression, as in this example:</p>
215    /// <ul>
216    /// <li>
217    /// <p><code>#P = :val</code></p></li>
218    /// </ul><note>
219    /// <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>
220    /// </note>
221    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
222    /// <li>
223    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p></li>
224    /// <li>
225    /// <p><code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p>
226    /// <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
227    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
228    /// <li>
229    /// <p><code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
230    /// </ul>
231    pub fn set_request_items(
232        mut self,
233        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>>,
234    ) -> Self {
235        self.request_items = input;
236        self
237    }
238    /// <p>A map of one or more table names or table ARNs and, for each table, a map that describes one or more items to retrieve from that table. Each table name or ARN can be used only once per <code>BatchGetItem</code> request.</p>
239    /// <p>Each element in the map of items to retrieve consists of the following:</p>
240    /// <ul>
241    /// <li>
242    /// <p><code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p></li>
243    /// <li>
244    /// <p><code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
245    /// <ul>
246    /// <li>
247    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
248    /// <li>
249    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
250    /// <li>
251    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
252    /// </ul>
253    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
254    /// <ul>
255    /// <li>
256    /// <p><code>Percentile</code></p></li>
257    /// </ul>
258    /// <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>
259    /// <ul>
260    /// <li>
261    /// <p><code>{"#P":"Percentile"}</code></p></li>
262    /// </ul>
263    /// <p>You could then use this substitution in an expression, as in this example:</p>
264    /// <ul>
265    /// <li>
266    /// <p><code>#P = :val</code></p></li>
267    /// </ul><note>
268    /// <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>
269    /// </note>
270    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
271    /// <li>
272    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p></li>
273    /// <li>
274    /// <p><code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p>
275    /// <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
276    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
277    /// <li>
278    /// <p><code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
279    /// </ul>
280    pub fn get_request_items(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>> {
281        &self.request_items
282    }
283    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
284    /// <ul>
285    /// <li>
286    /// <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>
287    /// <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>
288    /// <li>
289    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
290    /// <li>
291    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
292    /// </ul>
293    pub fn return_consumed_capacity(mut self, input: crate::types::ReturnConsumedCapacity) -> Self {
294        self.return_consumed_capacity = ::std::option::Option::Some(input);
295        self
296    }
297    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
298    /// <ul>
299    /// <li>
300    /// <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>
301    /// <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>
302    /// <li>
303    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
304    /// <li>
305    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
306    /// </ul>
307    pub fn set_return_consumed_capacity(mut self, input: ::std::option::Option<crate::types::ReturnConsumedCapacity>) -> Self {
308        self.return_consumed_capacity = input;
309        self
310    }
311    /// <p>Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:</p>
312    /// <ul>
313    /// <li>
314    /// <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>
315    /// <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>
316    /// <li>
317    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
318    /// <li>
319    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
320    /// </ul>
321    pub fn get_return_consumed_capacity(&self) -> &::std::option::Option<crate::types::ReturnConsumedCapacity> {
322        &self.return_consumed_capacity
323    }
324    /// Consumes the builder and constructs a [`BatchGetItemInput`](crate::operation::batch_get_item::BatchGetItemInput).
325    pub fn build(
326        self,
327    ) -> ::std::result::Result<crate::operation::batch_get_item::BatchGetItemInput, ::aws_smithy_types::error::operation::BuildError> {
328        ::std::result::Result::Ok(crate::operation::batch_get_item::BatchGetItemInput {
329            request_items: self.request_items,
330            return_consumed_capacity: self.return_consumed_capacity,
331        })
332    }
333}