1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - |
|
3 - | /// <p>Represents a set of primary keys and, for each key, the attributes to retrieve from the table.</p>
|
2 + | /* StructureGenerator.kt:197 */
|
3 + | /// /* StructureGenerator.kt:197 */<p>Represents a set of primary keys and, for each key, the attributes to retrieve from the table.</p>
|
4 4 | /// <p>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. For a composite primary key, you must provide <i>both</i> the partition key and the sort key.</p>
|
5 + | /* RustType.kt:516 */
|
5 6 | #[non_exhaustive]
|
7 + | /* RustType.kt:516 */
|
6 8 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
7 - | pub struct KeysAndAttributes {
|
8 - | /// <p>The primary key attribute values that define the items and the attributes associated with the items.</p>
|
9 + | pub /* StructureGenerator.kt:201 */ struct KeysAndAttributes {
|
10 + | /// /* StructureGenerator.kt:231 */<p>The primary key attribute values that define the items and the attributes associated with the items.</p>
|
9 11 | pub keys: ::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
|
10 - | /// <p>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.html">Legacy Conditional Parameters</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
|
12 + | /// /* StructureGenerator.kt:231 */<p>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.html">Legacy Conditional Parameters</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
|
11 13 | pub attributes_to_get: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
12 - | /// <p>The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p>
|
14 + | /// /* StructureGenerator.kt:231 */<p>The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p>
|
13 15 | pub consistent_read: ::std::option::Option<bool>,
|
14 - | /// <p>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 <code>ProjectionExpression</code> must be separated by commas.</p>
|
16 + | /// /* StructureGenerator.kt:231 */<p>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 <code>ProjectionExpression</code> must be separated by commas.</p>
|
15 17 | /// <p>If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.</p>
|
16 18 | /// <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>
|
17 19 | pub projection_expression: ::std::option::Option<::std::string::String>,
|
18 - | /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
|
20 + | /// /* StructureGenerator.kt:231 */<p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
|
19 21 | /// <ul>
|
20 22 | /// <li>
|
21 23 | /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
|
22 24 | /// <li>
|
23 25 | /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
|
24 26 | /// <li>
|
25 27 | /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
|
26 28 | /// </ul>
|
27 29 | /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
|
28 30 | /// <ul>
|
29 31 | /// <li>
|
30 32 | /// <p><code>Percentile</code></p></li>
|
31 33 | /// </ul>
|
32 34 | /// <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>
|
33 35 | /// <ul>
|
34 36 | /// <li>
|
35 37 | /// <p><code>{"#P":"Percentile"}</code></p></li>
|
36 38 | /// </ul>
|
37 39 | /// <p>You could then use this substitution in an expression, as in this example:</p>
|
38 40 | /// <ul>
|
39 41 | /// <li>
|
40 42 | /// <p><code>#P = :val</code></p></li>
|
41 43 | /// </ul><note>
|
42 44 | /// <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>
|
43 45 | /// </note>
|
44 46 | /// <p>For more information on 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>
|
45 47 | pub expression_attribute_names: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
|
48 + | /* StructureGenerator.kt:201 */
|
46 49 | }
|
50 + | /* StructureGenerator.kt:135 */
|
47 51 | impl KeysAndAttributes {
|
48 - | /// <p>The primary key attribute values that define the items and the attributes associated with the items.</p>
|
52 + | /// /* StructureGenerator.kt:231 */<p>The primary key attribute values that define the items and the attributes associated with the items.</p>
|
53 + | /* StructureGenerator.kt:166 */
|
49 54 | pub fn keys(&self) -> &[::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>] {
|
55 + | /* StructureGenerator.kt:171 */
|
50 56 | use std::ops::Deref;
|
51 57 | self.keys.deref()
|
58 + | /* StructureGenerator.kt:166 */
|
52 59 | }
|
53 - | /// <p>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.html">Legacy Conditional Parameters</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
|
54 - | ///
|
55 - | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attributes_to_get.is_none()`.
|
60 + | /// /* StructureGenerator.kt:231 */<p>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.html">Legacy Conditional Parameters</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
|
61 + | /// /* StructureGenerator.kt:162 */
|
62 + | /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attributes_to_get.is_none()`.
|
63 + | /* StructureGenerator.kt:166 */
|
56 64 | pub fn attributes_to_get(&self) -> &[::std::string::String] {
|
57 - | self.attributes_to_get.as_deref().unwrap_or_default()
|
65 + | /* StructureGenerator.kt:169 */
|
66 + | self.attributes_to_get
|
67 + | .as_deref()
|
68 + | /* StructureGenerator.kt:175 */
|
69 + | .unwrap_or_default()
|
70 + | /* StructureGenerator.kt:166 */
|
58 71 | }
|
59 - | /// <p>The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p>
|
72 + | /// /* StructureGenerator.kt:231 */<p>The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p>
|
73 + | /* StructureGenerator.kt:166 */
|
60 74 | pub fn consistent_read(&self) -> ::std::option::Option<bool> {
|
75 + | /* StructureGenerator.kt:168 */
|
61 76 | self.consistent_read
|
77 + | /* StructureGenerator.kt:166 */
|
62 78 | }
|
63 - | /// <p>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 <code>ProjectionExpression</code> must be separated by commas.</p>
|
79 + | /// /* StructureGenerator.kt:231 */<p>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 <code>ProjectionExpression</code> must be separated by commas.</p>
|
64 80 | /// <p>If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.</p>
|
65 81 | /// <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>
|
82 + | /* StructureGenerator.kt:166 */
|
66 83 | pub fn projection_expression(&self) -> ::std::option::Option<&str> {
|
84 + | /* StructureGenerator.kt:169 */
|
67 85 | self.projection_expression.as_deref()
|
86 + | /* StructureGenerator.kt:166 */
|
68 87 | }
|
69 - | /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
|
88 + | /// /* StructureGenerator.kt:231 */<p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
|
70 89 | /// <ul>
|
71 90 | /// <li>
|
72 91 | /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
|
73 92 | /// <li>
|
74 93 | /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
|
75 94 | /// <li>
|
76 95 | /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
|
77 96 | /// </ul>
|
78 97 | /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
|
79 98 | /// <ul>
|
80 99 | /// <li>
|
81 100 | /// <p><code>Percentile</code></p></li>
|
82 101 | /// </ul>
|
83 102 | /// <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 103 | /// <ul>
|
85 104 | /// <li>
|
86 105 | /// <p><code>{"#P":"Percentile"}</code></p></li>
|
87 106 | /// </ul>
|
88 107 | /// <p>You could then use this substitution in an expression, as in this example:</p>
|
89 108 | /// <ul>
|
90 109 | /// <li>
|
91 110 | /// <p><code>#P = :val</code></p></li>
|
92 111 | /// </ul><note>
|
93 112 | /// <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 113 | /// </note>
|
95 114 | /// <p>For more information on 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>
|
115 + | /* StructureGenerator.kt:166 */
|
96 116 | pub fn expression_attribute_names(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
|
117 + | /* StructureGenerator.kt:170 */
|
97 118 | self.expression_attribute_names.as_ref()
|
119 + | /* StructureGenerator.kt:166 */
|
98 120 | }
|
121 + | /* StructureGenerator.kt:135 */
|
99 122 | }
|
123 + | /* ClientCodegenVisitor.kt:237 */
|
100 124 | impl KeysAndAttributes {
|
101 - | /// Creates a new builder-style object to manufacture [`KeysAndAttributes`](crate::types::KeysAndAttributes).
|
125 + | /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`KeysAndAttributes`](crate::types::KeysAndAttributes).
|
126 + | /* BuilderGenerator.kt:175 */
|
102 127 | pub fn builder() -> crate::types::builders::KeysAndAttributesBuilder {
|
128 + | /* BuilderGenerator.kt:176 */
|
103 129 | crate::types::builders::KeysAndAttributesBuilder::default()
|
130 + | /* BuilderGenerator.kt:175 */
|
104 131 | }
|
132 + | /* ClientCodegenVisitor.kt:237 */
|
105 133 | }
|
106 134 |
|
107 - | /// A builder for [`KeysAndAttributes`](crate::types::KeysAndAttributes).
|
135 + | /// /* BuilderGenerator.kt:342 */A builder for [`KeysAndAttributes`](crate::types::KeysAndAttributes).
|
136 + | /* RustType.kt:516 */
|
108 137 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
138 + | /* RustType.kt:516 */
|
109 139 | #[non_exhaustive]
|
140 + | /* BuilderGenerator.kt:345 */
|
110 141 | pub struct KeysAndAttributesBuilder {
|
142 + | /* BuilderGenerator.kt:275 */
|
111 143 | pub(crate) keys: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>>,
|
112 - | pub(crate) attributes_to_get: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
113 - | pub(crate) consistent_read: ::std::option::Option<bool>,
|
114 - | pub(crate) projection_expression: ::std::option::Option<::std::string::String>,
|
144 + | /* BuilderGenerator.kt:275 */ pub(crate) attributes_to_get: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
145 + | /* BuilderGenerator.kt:275 */ pub(crate) consistent_read: ::std::option::Option<bool>,
|
146 + | /* BuilderGenerator.kt:275 */ pub(crate) projection_expression: ::std::option::Option<::std::string::String>,
|
147 + | /* BuilderGenerator.kt:275 */
|
115 148 | pub(crate) expression_attribute_names: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
|
149 + | /* BuilderGenerator.kt:345 */
|
116 150 | }
|
151 + | /* BuilderGenerator.kt:355 */
|
117 152 | impl KeysAndAttributesBuilder {
|
118 - | /// Appends an item to `keys`.
|
153 + | /// /* BuilderGenerator.kt:410 */Appends an item to `keys`.
|
154 + | /* BuilderGenerator.kt:411 */
|
119 155 | ///
|
120 - | /// To override the contents of this collection use [`set_keys`](Self::set_keys).
|
156 + | /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_keys`](Self::set_keys).
|
157 + | /* BuilderGenerator.kt:413 */
|
121 158 | ///
|
122 - | /// <p>The primary key attribute values that define the items and the attributes associated with the items.</p>
|
159 + | /// /* BuilderGenerator.kt:414 */<p>The primary key attribute values that define the items and the attributes associated with the items.</p>
|
160 + | /* BuilderGenerator.kt:418 */
|
123 161 | pub fn keys(mut self, input: ::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>) -> Self {
|
162 + | /* BuilderGenerator.kt:419 */
|
124 163 | let mut v = self.keys.unwrap_or_default();
|
125 164 | v.push(input);
|
126 165 | self.keys = ::std::option::Option::Some(v);
|
127 166 | self
|
167 + | /* BuilderGenerator.kt:418 */
|
128 168 | }
|
129 - | /// <p>The primary key attribute values that define the items and the attributes associated with the items.</p>
|
169 + | /// /* BuilderGenerator.kt:312 */<p>The primary key attribute values that define the items and the attributes associated with the items.</p>
|
170 + | /* BuilderGenerator.kt:314 */
|
130 171 | pub fn set_keys(
|
131 172 | mut self,
|
132 173 | input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>>,
|
133 174 | ) -> Self {
|
175 + | /* BuilderGenerator.kt:315 */
|
134 176 | self.keys = input;
|
135 177 | self
|
178 + | /* BuilderGenerator.kt:314 */
|
136 179 | }
|
137 - | /// <p>The primary key attribute values that define the items and the attributes associated with the items.</p>
|
180 + | /// /* BuilderGenerator.kt:334 */<p>The primary key attribute values that define the items and the attributes associated with the items.</p>
|
181 + | /* BuilderGenerator.kt:336 */
|
138 182 | pub fn get_keys(
|
139 183 | &self,
|
140 184 | ) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>> {
|
185 + | /* BuilderGenerator.kt:337 */
|
141 186 | &self.keys
|
187 + | /* BuilderGenerator.kt:336 */
|
142 188 | }
|
143 - | /// Appends an item to `attributes_to_get`.
|
189 + | /// /* BuilderGenerator.kt:410 */Appends an item to `attributes_to_get`.
|
190 + | /* BuilderGenerator.kt:411 */
|
144 191 | ///
|
145 - | /// To override the contents of this collection use [`set_attributes_to_get`](Self::set_attributes_to_get).
|
192 + | /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_attributes_to_get`](Self::set_attributes_to_get).
|
193 + | /* BuilderGenerator.kt:413 */
|
146 194 | ///
|
147 - | /// <p>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.html">Legacy Conditional Parameters</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
|
195 + | /// /* BuilderGenerator.kt:414 */<p>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.html">Legacy Conditional Parameters</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
|
196 + | /* BuilderGenerator.kt:418 */
|
148 197 | pub fn attributes_to_get(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
198 + | /* BuilderGenerator.kt:419 */
|
149 199 | let mut v = self.attributes_to_get.unwrap_or_default();
|
150 200 | v.push(input.into());
|
151 201 | self.attributes_to_get = ::std::option::Option::Some(v);
|
152 202 | self
|
203 + | /* BuilderGenerator.kt:418 */
|
153 204 | }
|
154 - | /// <p>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.html">Legacy Conditional Parameters</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
|
205 + | /// /* BuilderGenerator.kt:312 */<p>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.html">Legacy Conditional Parameters</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
|
206 + | /* BuilderGenerator.kt:314 */
|
155 207 | pub fn set_attributes_to_get(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
|
208 + | /* BuilderGenerator.kt:315 */
|
156 209 | self.attributes_to_get = input;
|
157 210 | self
|
211 + | /* BuilderGenerator.kt:314 */
|
158 212 | }
|
159 - | /// <p>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.html">Legacy Conditional Parameters</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
|
213 + | /// /* BuilderGenerator.kt:334 */<p>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.html">Legacy Conditional Parameters</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
|
214 + | /* BuilderGenerator.kt:336 */
|
160 215 | pub fn get_attributes_to_get(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
|
216 + | /* BuilderGenerator.kt:337 */
|
161 217 | &self.attributes_to_get
|
218 + | /* BuilderGenerator.kt:336 */
|
162 219 | }
|
163 - | /// <p>The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p>
|
220 + | /// /* BuilderGenerator.kt:286 */<p>The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p>
|
221 + | /* BuilderGenerator.kt:291 */
|
164 222 | pub fn consistent_read(mut self, input: bool) -> Self {
|
223 + | /* BuilderGenerator.kt:292 */
|
165 224 | self.consistent_read = ::std::option::Option::Some(input);
|
225 + | /* BuilderGenerator.kt:293 */
|
166 226 | self
|
227 + | /* BuilderGenerator.kt:291 */
|
167 228 | }
|
168 - | /// <p>The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p>
|
229 + | /// /* BuilderGenerator.kt:312 */<p>The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p>
|
230 + | /* BuilderGenerator.kt:314 */
|
169 231 | pub fn set_consistent_read(mut self, input: ::std::option::Option<bool>) -> Self {
|
232 + | /* BuilderGenerator.kt:315 */
|
170 233 | self.consistent_read = input;
|
171 234 | self
|
235 + | /* BuilderGenerator.kt:314 */
|
172 236 | }
|
173 - | /// <p>The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p>
|
237 + | /// /* BuilderGenerator.kt:334 */<p>The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p>
|
238 + | /* BuilderGenerator.kt:336 */
|
174 239 | pub fn get_consistent_read(&self) -> &::std::option::Option<bool> {
|
240 + | /* BuilderGenerator.kt:337 */
|
175 241 | &self.consistent_read
|
242 + | /* BuilderGenerator.kt:336 */
|
176 243 | }
|
177 - | /// <p>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 <code>ProjectionExpression</code> must be separated by commas.</p>
|
244 + | /// /* BuilderGenerator.kt:286 */<p>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 <code>ProjectionExpression</code> must be separated by commas.</p>
|
178 245 | /// <p>If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.</p>
|
179 246 | /// <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>
|
247 + | /* BuilderGenerator.kt:291 */
|
180 248 | pub fn projection_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
249 + | /* BuilderGenerator.kt:292 */
|
181 250 | self.projection_expression = ::std::option::Option::Some(input.into());
|
251 + | /* BuilderGenerator.kt:293 */
|
182 252 | self
|
253 + | /* BuilderGenerator.kt:291 */
|
183 254 | }
|
184 - | /// <p>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 <code>ProjectionExpression</code> must be separated by commas.</p>
|
255 + | /// /* BuilderGenerator.kt:312 */<p>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 <code>ProjectionExpression</code> must be separated by commas.</p>
|
185 256 | /// <p>If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.</p>
|
186 257 | /// <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>
|
258 + | /* BuilderGenerator.kt:314 */
|
187 259 | pub fn set_projection_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
260 + | /* BuilderGenerator.kt:315 */
|
188 261 | self.projection_expression = input;
|
189 262 | self
|
263 + | /* BuilderGenerator.kt:314 */
|
190 264 | }
|
191 - | /// <p>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 <code>ProjectionExpression</code> must be separated by commas.</p>
|
265 + | /// /* BuilderGenerator.kt:334 */<p>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 <code>ProjectionExpression</code> must be separated by commas.</p>
|
192 266 | /// <p>If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.</p>
|
193 267 | /// <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>
|
268 + | /* BuilderGenerator.kt:336 */
|
194 269 | pub fn get_projection_expression(&self) -> &::std::option::Option<::std::string::String> {
|
270 + | /* BuilderGenerator.kt:337 */
|
195 271 | &self.projection_expression
|
272 + | /* BuilderGenerator.kt:336 */
|
196 273 | }
|
197 - | /// Adds a key-value pair to `expression_attribute_names`.
|
274 + | /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `expression_attribute_names`.
|
275 + | /* BuilderGenerator.kt:437 */
|
198 276 | ///
|
199 - | /// To override the contents of this collection use [`set_expression_attribute_names`](Self::set_expression_attribute_names).
|
277 + | /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_expression_attribute_names`](Self::set_expression_attribute_names).
|
278 + | /* BuilderGenerator.kt:439 */
|
200 279 | ///
|
201 - | /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
|
280 + | /// /* BuilderGenerator.kt:440 */<p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
|
202 281 | /// <ul>
|
203 282 | /// <li>
|
204 283 | /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
|
205 284 | /// <li>
|
206 285 | /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
|
207 286 | /// <li>
|
208 287 | /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
|
209 288 | /// </ul>
|
210 289 | /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
|
211 290 | /// <ul>
|
212 291 | /// <li>
|
213 292 | /// <p><code>Percentile</code></p></li>
|
214 293 | /// </ul>
|
215 294 | /// <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>
|
216 295 | /// <ul>
|
217 296 | /// <li>
|
218 297 | /// <p><code>{"#P":"Percentile"}</code></p></li>
|
219 298 | /// </ul>
|
220 299 | /// <p>You could then use this substitution in an expression, as in this example:</p>
|
221 300 | /// <ul>
|
222 301 | /// <li>
|
223 302 | /// <p><code>#P = :val</code></p></li>
|
224 303 | /// </ul><note>
|
225 304 | /// <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>
|
226 305 | /// </note>
|
227 306 | /// <p>For more information on 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>
|
307 + | /* BuilderGenerator.kt:445 */
|
228 308 | pub fn expression_attribute_names(
|
229 309 | mut self,
|
230 310 | k: impl ::std::convert::Into<::std::string::String>,
|
231 311 | v: impl ::std::convert::Into<::std::string::String>,
|
232 312 | ) -> Self {
|
313 + | /* BuilderGenerator.kt:448 */
|
233 314 | let mut hash_map = self.expression_attribute_names.unwrap_or_default();
|
234 315 | hash_map.insert(k.into(), v.into());
|
235 316 | self.expression_attribute_names = ::std::option::Option::Some(hash_map);
|
236 317 | self
|
318 + | /* BuilderGenerator.kt:445 */
|
237 319 | }
|
238 - | /// <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 + | /// /* BuilderGenerator.kt:312 */<p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
|
239 321 | /// <ul>
|
240 322 | /// <li>
|
241 323 | /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
|
242 324 | /// <li>
|
243 325 | /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
|
244 326 | /// <li>
|
245 327 | /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
|
246 328 | /// </ul>
|
247 329 | /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
|
248 330 | /// <ul>
|
249 331 | /// <li>
|
250 332 | /// <p><code>Percentile</code></p></li>
|
251 333 | /// </ul>
|
252 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>
|
253 335 | /// <ul>
|
254 336 | /// <li>
|
255 337 | /// <p><code>{"#P":"Percentile"}</code></p></li>
|
256 338 | /// </ul>
|
257 339 | /// <p>You could then use this substitution in an expression, as in this example:</p>
|
258 340 | /// <ul>
|
259 341 | /// <li>
|
260 342 | /// <p><code>#P = :val</code></p></li>
|
261 343 | /// </ul><note>
|
262 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>
|
263 345 | /// </note>
|
264 346 | /// <p>For more information on 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>
|
347 + | /* BuilderGenerator.kt:314 */
|
265 348 | pub fn set_expression_attribute_names(
|
266 349 | mut self,
|
267 350 | input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
|
268 351 | ) -> Self {
|
352 + | /* BuilderGenerator.kt:315 */
|
269 353 | self.expression_attribute_names = input;
|
270 354 | self
|
355 + | /* BuilderGenerator.kt:314 */
|
271 356 | }
|
272 - | /// <p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
|
357 + | /// /* BuilderGenerator.kt:334 */<p>One or more substitution tokens for attribute names in an expression. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
|
273 358 | /// <ul>
|
274 359 | /// <li>
|
275 360 | /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
|
276 361 | /// <li>
|
277 362 | /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
|
278 363 | /// <li>
|
279 364 | /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
|
280 365 | /// </ul>
|
281 366 | /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
|
282 367 | /// <ul>
|
283 368 | /// <li>
|
284 369 | /// <p><code>Percentile</code></p></li>
|
285 370 | /// </ul>
|
286 371 | /// <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>
|
287 372 | /// <ul>
|
288 373 | /// <li>
|
289 374 | /// <p><code>{"#P":"Percentile"}</code></p></li>
|
290 375 | /// </ul>
|
291 376 | /// <p>You could then use this substitution in an expression, as in this example:</p>
|
292 377 | /// <ul>
|
293 378 | /// <li>
|
294 379 | /// <p><code>#P = :val</code></p></li>
|
295 380 | /// </ul><note>
|
296 381 | /// <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>
|
297 382 | /// </note>
|
298 383 | /// <p>For more information on 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>
|
384 + | /* BuilderGenerator.kt:336 */
|
299 385 | pub fn get_expression_attribute_names(
|
300 386 | &self,
|
301 387 | ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
|
388 + | /* BuilderGenerator.kt:337 */
|
302 389 | &self.expression_attribute_names
|
390 + | /* BuilderGenerator.kt:336 */
|
303 391 | }
|
304 - | /// Consumes the builder and constructs a [`KeysAndAttributes`](crate::types::KeysAndAttributes).
|
305 - | /// This method will fail if any of the following fields are not set:
|
306 - | /// - [`keys`](crate::types::builders::KeysAndAttributesBuilder::keys)
|
392 + | /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`KeysAndAttributes`](crate::types::KeysAndAttributes).
|
393 + | /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
|
394 + | /// /* BuilderGenerator.kt:246 */- [`keys`](crate::types::builders::KeysAndAttributesBuilder::keys)
|
395 + | /* BuilderGenerator.kt:253 */
|
307 396 | pub fn build(self) -> ::std::result::Result<crate::types::KeysAndAttributes, ::aws_smithy_types::error::operation::BuildError> {
|
308 - | ::std::result::Result::Ok(crate::types::KeysAndAttributes {
|
309 - | keys: self.keys.ok_or_else(|| {
|
310 - | ::aws_smithy_types::error::operation::BuildError::missing_field(
|
311 - | "keys",
|
312 - | "keys was not specified but it is required when building KeysAndAttributes",
|
313 - | )
|
314 - | })?,
|
315 - | attributes_to_get: self.attributes_to_get,
|
316 - | consistent_read: self.consistent_read,
|
317 - | projection_expression: self.projection_expression,
|
318 - | expression_attribute_names: self.expression_attribute_names,
|
319 - | })
|
397 + | /* BuilderGenerator.kt:254 */
|
398 + | ::std::result::Result::Ok(
|
399 + | /* BuilderGenerator.kt:477 */crate::types::KeysAndAttributes {
|
400 + | /* BuilderGenerator.kt:481 */keys: self.keys
|
401 + | /* BuilderGenerator.kt:494 */.ok_or_else(||
|
402 + | /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("keys", "keys was not specified but it is required when building KeysAndAttributes")
|
403 + | /* BuilderGenerator.kt:494 */)?
|
404 + | ,
|
405 + | /* BuilderGenerator.kt:481 */attributes_to_get: self.attributes_to_get
|
406 + | ,
|
407 + | /* BuilderGenerator.kt:481 */consistent_read: self.consistent_read
|
408 + | ,
|
409 + | /* BuilderGenerator.kt:481 */projection_expression: self.projection_expression
|
410 + | ,
|
411 + | /* BuilderGenerator.kt:481 */expression_attribute_names: self.expression_attribute_names
|
412 + | ,
|
413 + | /* BuilderGenerator.kt:477 */}
|
414 + | /* BuilderGenerator.kt:254 */)
|
415 + | /* BuilderGenerator.kt:253 */
|
320 416 | }
|
417 + | /* BuilderGenerator.kt:355 */
|
321 418 | }
|