1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - |
|
3 - | /// <p>Represents a request to perform an <code>UpdateItem</code> operation.</p>
|
2 + | /* StructureGenerator.kt:197 */
|
3 + | /// /* StructureGenerator.kt:197 */<p>Represents a request to perform an <code>UpdateItem</code> operation.</p>
|
4 + | /* RustType.kt:516 */
|
4 5 | #[non_exhaustive]
|
6 + | /* RustType.kt:516 */
|
5 7 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 - | pub struct Update {
|
7 - | /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
|
8 + | pub /* StructureGenerator.kt:201 */ struct Update {
|
9 + | /// /* StructureGenerator.kt:231 */<p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
|
8 10 | pub key: ::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>,
|
9 - | /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
|
11 + | /// /* StructureGenerator.kt:231 */<p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
|
10 12 | pub update_expression: ::std::string::String,
|
11 - | /// <p>Name of the table for the <code>UpdateItem</code> request.</p>
|
13 + | /// /* StructureGenerator.kt:231 */<p>Name of the table for the <code>UpdateItem</code> request.</p>
|
12 14 | pub table_name: ::std::string::String,
|
13 - | /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
|
15 + | /// /* StructureGenerator.kt:231 */<p>A condition that must be satisfied in order for a conditional update to succeed.</p>
|
14 16 | pub condition_expression: ::std::option::Option<::std::string::String>,
|
15 - | /// <p>One or more substitution tokens for attribute names in an expression.</p>
|
17 + | /// /* StructureGenerator.kt:231 */<p>One or more substitution tokens for attribute names in an expression.</p>
|
16 18 | pub expression_attribute_names: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
|
17 - | /// <p>One or more values that can be substituted in an expression.</p>
|
19 + | /// /* StructureGenerator.kt:231 */<p>One or more values that can be substituted in an expression.</p>
|
18 20 | pub expression_attribute_values: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
|
19 - | /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
|
21 + | /// /* StructureGenerator.kt:231 */<p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
|
20 22 | pub return_values_on_condition_check_failure: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>,
|
23 + | /* StructureGenerator.kt:201 */
|
21 24 | }
|
25 + | /* StructureGenerator.kt:135 */
|
22 26 | impl Update {
|
23 - | /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
|
27 + | /// /* StructureGenerator.kt:231 */<p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
|
28 + | /* StructureGenerator.kt:166 */
|
24 29 | pub fn key(&self) -> &::std::collections::HashMap<::std::string::String, crate::types::AttributeValue> {
|
30 + | /* StructureGenerator.kt:172 */
|
25 31 | &self.key
|
32 + | /* StructureGenerator.kt:166 */
|
26 33 | }
|
27 - | /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
|
34 + | /// /* StructureGenerator.kt:231 */<p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
|
35 + | /* StructureGenerator.kt:166 */
|
28 36 | pub fn update_expression(&self) -> &str {
|
37 + | /* StructureGenerator.kt:171 */
|
29 38 | use std::ops::Deref;
|
30 39 | self.update_expression.deref()
|
40 + | /* StructureGenerator.kt:166 */
|
31 41 | }
|
32 - | /// <p>Name of the table for the <code>UpdateItem</code> request.</p>
|
42 + | /// /* StructureGenerator.kt:231 */<p>Name of the table for the <code>UpdateItem</code> request.</p>
|
43 + | /* StructureGenerator.kt:166 */
|
33 44 | pub fn table_name(&self) -> &str {
|
45 + | /* StructureGenerator.kt:171 */
|
34 46 | use std::ops::Deref;
|
35 47 | self.table_name.deref()
|
48 + | /* StructureGenerator.kt:166 */
|
36 49 | }
|
37 - | /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
|
50 + | /// /* StructureGenerator.kt:231 */<p>A condition that must be satisfied in order for a conditional update to succeed.</p>
|
51 + | /* StructureGenerator.kt:166 */
|
38 52 | pub fn condition_expression(&self) -> ::std::option::Option<&str> {
|
53 + | /* StructureGenerator.kt:169 */
|
39 54 | self.condition_expression.as_deref()
|
55 + | /* StructureGenerator.kt:166 */
|
40 56 | }
|
41 - | /// <p>One or more substitution tokens for attribute names in an expression.</p>
|
57 + | /// /* StructureGenerator.kt:231 */<p>One or more substitution tokens for attribute names in an expression.</p>
|
58 + | /* StructureGenerator.kt:166 */
|
42 59 | pub fn expression_attribute_names(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
|
60 + | /* StructureGenerator.kt:170 */
|
43 61 | self.expression_attribute_names.as_ref()
|
62 + | /* StructureGenerator.kt:166 */
|
44 63 | }
|
45 - | /// <p>One or more values that can be substituted in an expression.</p>
|
64 + | /// /* StructureGenerator.kt:231 */<p>One or more values that can be substituted in an expression.</p>
|
65 + | /* StructureGenerator.kt:166 */
|
46 66 | pub fn expression_attribute_values(
|
47 67 | &self,
|
48 68 | ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
|
69 + | /* StructureGenerator.kt:170 */
|
49 70 | self.expression_attribute_values.as_ref()
|
71 + | /* StructureGenerator.kt:166 */
|
50 72 | }
|
51 - | /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
|
73 + | /// /* StructureGenerator.kt:231 */<p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
|
74 + | /* StructureGenerator.kt:166 */
|
52 75 | pub fn return_values_on_condition_check_failure(&self) -> ::std::option::Option<&crate::types::ReturnValuesOnConditionCheckFailure> {
|
76 + | /* StructureGenerator.kt:170 */
|
53 77 | self.return_values_on_condition_check_failure.as_ref()
|
78 + | /* StructureGenerator.kt:166 */
|
54 79 | }
|
80 + | /* StructureGenerator.kt:135 */
|
55 81 | }
|
82 + | /* ClientCodegenVisitor.kt:237 */
|
56 83 | impl Update {
|
57 - | /// Creates a new builder-style object to manufacture [`Update`](crate::types::Update).
|
84 + | /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`Update`](crate::types::Update).
|
85 + | /* BuilderGenerator.kt:175 */
|
58 86 | pub fn builder() -> crate::types::builders::UpdateBuilder {
|
87 + | /* BuilderGenerator.kt:176 */
|
59 88 | crate::types::builders::UpdateBuilder::default()
|
89 + | /* BuilderGenerator.kt:175 */
|
60 90 | }
|
91 + | /* ClientCodegenVisitor.kt:237 */
|
61 92 | }
|
62 93 |
|
63 - | /// A builder for [`Update`](crate::types::Update).
|
94 + | /// /* BuilderGenerator.kt:342 */A builder for [`Update`](crate::types::Update).
|
95 + | /* RustType.kt:516 */
|
64 96 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
97 + | /* RustType.kt:516 */
|
65 98 | #[non_exhaustive]
|
99 + | /* BuilderGenerator.kt:345 */
|
66 100 | pub struct UpdateBuilder {
|
101 + | /* BuilderGenerator.kt:275 */
|
67 102 | pub(crate) key: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
|
68 - | pub(crate) update_expression: ::std::option::Option<::std::string::String>,
|
69 - | pub(crate) table_name: ::std::option::Option<::std::string::String>,
|
70 - | pub(crate) condition_expression: ::std::option::Option<::std::string::String>,
|
103 + | /* BuilderGenerator.kt:275 */ pub(crate) update_expression: ::std::option::Option<::std::string::String>,
|
104 + | /* BuilderGenerator.kt:275 */ pub(crate) table_name: ::std::option::Option<::std::string::String>,
|
105 + | /* BuilderGenerator.kt:275 */ pub(crate) condition_expression: ::std::option::Option<::std::string::String>,
|
106 + | /* BuilderGenerator.kt:275 */
|
71 107 | pub(crate) expression_attribute_names: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
|
108 + | /* BuilderGenerator.kt:275 */
|
72 109 | pub(crate) expression_attribute_values: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
|
110 + | /* BuilderGenerator.kt:275 */
|
73 111 | pub(crate) return_values_on_condition_check_failure: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>,
|
112 + | /* BuilderGenerator.kt:345 */
|
74 113 | }
|
114 + | /* BuilderGenerator.kt:355 */
|
75 115 | impl UpdateBuilder {
|
76 - | /// Adds a key-value pair to `key`.
|
116 + | /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `key`.
|
117 + | /* BuilderGenerator.kt:437 */
|
77 118 | ///
|
78 - | /// To override the contents of this collection use [`set_key`](Self::set_key).
|
119 + | /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_key`](Self::set_key).
|
120 + | /* BuilderGenerator.kt:439 */
|
79 121 | ///
|
80 - | /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
|
122 + | /// /* BuilderGenerator.kt:440 */<p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
|
123 + | /* BuilderGenerator.kt:445 */
|
81 124 | pub fn key(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
|
125 + | /* BuilderGenerator.kt:448 */
|
82 126 | let mut hash_map = self.key.unwrap_or_default();
|
83 127 | hash_map.insert(k.into(), v);
|
84 128 | self.key = ::std::option::Option::Some(hash_map);
|
85 129 | self
|
130 + | /* BuilderGenerator.kt:445 */
|
86 131 | }
|
87 - | /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
|
132 + | /// /* BuilderGenerator.kt:312 */<p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
|
133 + | /* BuilderGenerator.kt:314 */
|
88 134 | pub fn set_key(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>) -> Self {
|
135 + | /* BuilderGenerator.kt:315 */
|
89 136 | self.key = input;
|
90 137 | self
|
138 + | /* BuilderGenerator.kt:314 */
|
91 139 | }
|
92 - | /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
|
140 + | /// /* BuilderGenerator.kt:334 */<p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
|
141 + | /* BuilderGenerator.kt:336 */
|
93 142 | pub fn get_key(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
|
143 + | /* BuilderGenerator.kt:337 */
|
94 144 | &self.key
|
145 + | /* BuilderGenerator.kt:336 */
|
95 146 | }
|
96 - | /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
|
97 - | /// This field is required.
|
147 + | /// /* BuilderGenerator.kt:286 */<p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
|
148 + | /// /* BuilderGenerator.kt:288 */This field is required.
|
149 + | /* BuilderGenerator.kt:291 */
|
98 150 | pub fn update_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
151 + | /* BuilderGenerator.kt:292 */
|
99 152 | self.update_expression = ::std::option::Option::Some(input.into());
|
153 + | /* BuilderGenerator.kt:293 */
|
100 154 | self
|
155 + | /* BuilderGenerator.kt:291 */
|
101 156 | }
|
102 - | /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
|
157 + | /// /* BuilderGenerator.kt:312 */<p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
|
158 + | /* BuilderGenerator.kt:314 */
|
103 159 | pub fn set_update_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
160 + | /* BuilderGenerator.kt:315 */
|
104 161 | self.update_expression = input;
|
105 162 | self
|
163 + | /* BuilderGenerator.kt:314 */
|
106 164 | }
|
107 - | /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
|
165 + | /// /* BuilderGenerator.kt:334 */<p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
|
166 + | /* BuilderGenerator.kt:336 */
|
108 167 | pub fn get_update_expression(&self) -> &::std::option::Option<::std::string::String> {
|
168 + | /* BuilderGenerator.kt:337 */
|
109 169 | &self.update_expression
|
170 + | /* BuilderGenerator.kt:336 */
|
110 171 | }
|
111 - | /// <p>Name of the table for the <code>UpdateItem</code> request.</p>
|
112 - | /// This field is required.
|
172 + | /// /* BuilderGenerator.kt:286 */<p>Name of the table for the <code>UpdateItem</code> request.</p>
|
173 + | /// /* BuilderGenerator.kt:288 */This field is required.
|
174 + | /* BuilderGenerator.kt:291 */
|
113 175 | pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
176 + | /* BuilderGenerator.kt:292 */
|
114 177 | self.table_name = ::std::option::Option::Some(input.into());
|
178 + | /* BuilderGenerator.kt:293 */
|
115 179 | self
|
180 + | /* BuilderGenerator.kt:291 */
|
116 181 | }
|
117 - | /// <p>Name of the table for the <code>UpdateItem</code> request.</p>
|
182 + | /// /* BuilderGenerator.kt:312 */<p>Name of the table for the <code>UpdateItem</code> request.</p>
|
183 + | /* BuilderGenerator.kt:314 */
|
118 184 | pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
185 + | /* BuilderGenerator.kt:315 */
|
119 186 | self.table_name = input;
|
120 187 | self
|
188 + | /* BuilderGenerator.kt:314 */
|
121 189 | }
|
122 - | /// <p>Name of the table for the <code>UpdateItem</code> request.</p>
|
190 + | /// /* BuilderGenerator.kt:334 */<p>Name of the table for the <code>UpdateItem</code> request.</p>
|
191 + | /* BuilderGenerator.kt:336 */
|
123 192 | pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
|
193 + | /* BuilderGenerator.kt:337 */
|
124 194 | &self.table_name
|
195 + | /* BuilderGenerator.kt:336 */
|
125 196 | }
|
126 - | /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
|
197 + | /// /* BuilderGenerator.kt:286 */<p>A condition that must be satisfied in order for a conditional update to succeed.</p>
|
198 + | /* BuilderGenerator.kt:291 */
|
127 199 | pub fn condition_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
200 + | /* BuilderGenerator.kt:292 */
|
128 201 | self.condition_expression = ::std::option::Option::Some(input.into());
|
202 + | /* BuilderGenerator.kt:293 */
|
129 203 | self
|
204 + | /* BuilderGenerator.kt:291 */
|
130 205 | }
|
131 - | /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
|
206 + | /// /* BuilderGenerator.kt:312 */<p>A condition that must be satisfied in order for a conditional update to succeed.</p>
|
207 + | /* BuilderGenerator.kt:314 */
|
132 208 | pub fn set_condition_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
209 + | /* BuilderGenerator.kt:315 */
|
133 210 | self.condition_expression = input;
|
134 211 | self
|
212 + | /* BuilderGenerator.kt:314 */
|
135 213 | }
|
136 - | /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
|
214 + | /// /* BuilderGenerator.kt:334 */<p>A condition that must be satisfied in order for a conditional update to succeed.</p>
|
215 + | /* BuilderGenerator.kt:336 */
|
137 216 | pub fn get_condition_expression(&self) -> &::std::option::Option<::std::string::String> {
|
217 + | /* BuilderGenerator.kt:337 */
|
138 218 | &self.condition_expression
|
219 + | /* BuilderGenerator.kt:336 */
|
139 220 | }
|
140 - | /// Adds a key-value pair to `expression_attribute_names`.
|
221 + | /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `expression_attribute_names`.
|
222 + | /* BuilderGenerator.kt:437 */
|
141 223 | ///
|
142 - | /// To override the contents of this collection use [`set_expression_attribute_names`](Self::set_expression_attribute_names).
|
224 + | /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_expression_attribute_names`](Self::set_expression_attribute_names).
|
225 + | /* BuilderGenerator.kt:439 */
|
143 226 | ///
|
144 - | /// <p>One or more substitution tokens for attribute names in an expression.</p>
|
227 + | /// /* BuilderGenerator.kt:440 */<p>One or more substitution tokens for attribute names in an expression.</p>
|
228 + | /* BuilderGenerator.kt:445 */
|
145 229 | pub fn expression_attribute_names(
|
146 230 | mut self,
|
147 231 | k: impl ::std::convert::Into<::std::string::String>,
|
148 232 | v: impl ::std::convert::Into<::std::string::String>,
|
149 233 | ) -> Self {
|
234 + | /* BuilderGenerator.kt:448 */
|
150 235 | let mut hash_map = self.expression_attribute_names.unwrap_or_default();
|
151 236 | hash_map.insert(k.into(), v.into());
|
152 237 | self.expression_attribute_names = ::std::option::Option::Some(hash_map);
|
153 238 | self
|
239 + | /* BuilderGenerator.kt:445 */
|
154 240 | }
|
155 - | /// <p>One or more substitution tokens for attribute names in an expression.</p>
|
241 + | /// /* BuilderGenerator.kt:312 */<p>One or more substitution tokens for attribute names in an expression.</p>
|
242 + | /* BuilderGenerator.kt:314 */
|
156 243 | pub fn set_expression_attribute_names(
|
157 244 | mut self,
|
158 245 | input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
|
159 246 | ) -> Self {
|
247 + | /* BuilderGenerator.kt:315 */
|
160 248 | self.expression_attribute_names = input;
|
161 249 | self
|
250 + | /* BuilderGenerator.kt:314 */
|
162 251 | }
|
163 - | /// <p>One or more substitution tokens for attribute names in an expression.</p>
|
252 + | /// /* BuilderGenerator.kt:334 */<p>One or more substitution tokens for attribute names in an expression.</p>
|
253 + | /* BuilderGenerator.kt:336 */
|
164 254 | pub fn get_expression_attribute_names(
|
165 255 | &self,
|
166 256 | ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
|
257 + | /* BuilderGenerator.kt:337 */
|
167 258 | &self.expression_attribute_names
|
259 + | /* BuilderGenerator.kt:336 */
|
168 260 | }
|
169 - | /// Adds a key-value pair to `expression_attribute_values`.
|
261 + | /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `expression_attribute_values`.
|
262 + | /* BuilderGenerator.kt:437 */
|
170 263 | ///
|
171 - | /// To override the contents of this collection use [`set_expression_attribute_values`](Self::set_expression_attribute_values).
|
264 + | /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_expression_attribute_values`](Self::set_expression_attribute_values).
|
265 + | /* BuilderGenerator.kt:439 */
|
172 266 | ///
|
173 - | /// <p>One or more values that can be substituted in an expression.</p>
|
267 + | /// /* BuilderGenerator.kt:440 */<p>One or more values that can be substituted in an expression.</p>
|
268 + | /* BuilderGenerator.kt:445 */
|
174 269 | pub fn expression_attribute_values(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
|
270 + | /* BuilderGenerator.kt:448 */
|
175 271 | let mut hash_map = self.expression_attribute_values.unwrap_or_default();
|
176 272 | hash_map.insert(k.into(), v);
|
177 273 | self.expression_attribute_values = ::std::option::Option::Some(hash_map);
|
178 274 | self
|
275 + | /* BuilderGenerator.kt:445 */
|
179 276 | }
|
180 - | /// <p>One or more values that can be substituted in an expression.</p>
|
277 + | /// /* BuilderGenerator.kt:312 */<p>One or more values that can be substituted in an expression.</p>
|
278 + | /* BuilderGenerator.kt:314 */
|
181 279 | pub fn set_expression_attribute_values(
|
182 280 | mut self,
|
183 281 | input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
|
184 282 | ) -> Self {
|
283 + | /* BuilderGenerator.kt:315 */
|
185 284 | self.expression_attribute_values = input;
|
186 285 | self
|
286 + | /* BuilderGenerator.kt:314 */
|
187 287 | }
|
188 - | /// <p>One or more values that can be substituted in an expression.</p>
|
288 + | /// /* BuilderGenerator.kt:334 */<p>One or more values that can be substituted in an expression.</p>
|
289 + | /* BuilderGenerator.kt:336 */
|
189 290 | pub fn get_expression_attribute_values(
|
190 291 | &self,
|
191 292 | ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
|
293 + | /* BuilderGenerator.kt:337 */
|
192 294 | &self.expression_attribute_values
|
295 + | /* BuilderGenerator.kt:336 */
|
193 296 | }
|
194 - | /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
|
297 + | /// /* BuilderGenerator.kt:286 */<p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
|
298 + | /* BuilderGenerator.kt:291 */
|
195 299 | pub fn return_values_on_condition_check_failure(mut self, input: crate::types::ReturnValuesOnConditionCheckFailure) -> Self {
|
300 + | /* BuilderGenerator.kt:292 */
|
196 301 | self.return_values_on_condition_check_failure = ::std::option::Option::Some(input);
|
302 + | /* BuilderGenerator.kt:293 */
|
197 303 | self
|
304 + | /* BuilderGenerator.kt:291 */
|
198 305 | }
|
199 - | /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
|
306 + | /// /* BuilderGenerator.kt:312 */<p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
|
307 + | /* BuilderGenerator.kt:314 */
|
200 308 | pub fn set_return_values_on_condition_check_failure(
|
201 309 | mut self,
|
202 310 | input: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>,
|
203 311 | ) -> Self {
|
312 + | /* BuilderGenerator.kt:315 */
|
204 313 | self.return_values_on_condition_check_failure = input;
|
205 314 | self
|
315 + | /* BuilderGenerator.kt:314 */
|
206 316 | }
|
207 - | /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
|
317 + | /// /* BuilderGenerator.kt:334 */<p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
|
318 + | /* BuilderGenerator.kt:336 */
|
208 319 | pub fn get_return_values_on_condition_check_failure(&self) -> &::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure> {
|
320 + | /* BuilderGenerator.kt:337 */
|
209 321 | &self.return_values_on_condition_check_failure
|
322 + | /* BuilderGenerator.kt:336 */
|
210 323 | }
|
211 - | /// Consumes the builder and constructs a [`Update`](crate::types::Update).
|
212 - | /// This method will fail if any of the following fields are not set:
|
213 - | /// - [`key`](crate::types::builders::UpdateBuilder::key)
|
214 - | /// - [`update_expression`](crate::types::builders::UpdateBuilder::update_expression)
|
215 - | /// - [`table_name`](crate::types::builders::UpdateBuilder::table_name)
|
324 + | /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`Update`](crate::types::Update).
|
325 + | /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
|
326 + | /// /* BuilderGenerator.kt:246 */- [`key`](crate::types::builders::UpdateBuilder::key)
|
327 + | /// /* BuilderGenerator.kt:246 */- [`update_expression`](crate::types::builders::UpdateBuilder::update_expression)
|
328 + | /// /* BuilderGenerator.kt:246 */- [`table_name`](crate::types::builders::UpdateBuilder::table_name)
|
329 + | /* BuilderGenerator.kt:253 */
|
216 330 | pub fn build(self) -> ::std::result::Result<crate::types::Update, ::aws_smithy_types::error::operation::BuildError> {
|
217 - | ::std::result::Result::Ok(crate::types::Update {
|
218 - | key: self.key.ok_or_else(|| {
|
219 - | ::aws_smithy_types::error::operation::BuildError::missing_field(
|
220 - | "key",
|
221 - | "key was not specified but it is required when building Update",
|
222 - | )
|
223 - | })?,
|
224 - | update_expression: self.update_expression.ok_or_else(|| {
|
225 - | ::aws_smithy_types::error::operation::BuildError::missing_field(
|
226 - | "update_expression",
|
227 - | "update_expression was not specified but it is required when building Update",
|
228 - | )
|
229 - | })?,
|
230 - | table_name: self.table_name.ok_or_else(|| {
|
231 - | ::aws_smithy_types::error::operation::BuildError::missing_field(
|
232 - | "table_name",
|
233 - | "table_name was not specified but it is required when building Update",
|
234 - | )
|
235 - | })?,
|
236 - | condition_expression: self.condition_expression,
|
237 - | expression_attribute_names: self.expression_attribute_names,
|
238 - | expression_attribute_values: self.expression_attribute_values,
|
239 - | return_values_on_condition_check_failure: self.return_values_on_condition_check_failure,
|
240 - | })
|
331 + | /* BuilderGenerator.kt:254 */
|
332 + | ::std::result::Result::Ok(
|
333 + | /* BuilderGenerator.kt:477 */crate::types::Update {
|
334 + | /* BuilderGenerator.kt:481 */key: self.key
|
335 + | /* BuilderGenerator.kt:494 */.ok_or_else(||
|
336 + | /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("key", "key was not specified but it is required when building Update")
|
337 + | /* BuilderGenerator.kt:494 */)?
|
338 + | ,
|
339 + | /* BuilderGenerator.kt:481 */update_expression: self.update_expression
|
340 + | /* BuilderGenerator.kt:494 */.ok_or_else(||
|
341 + | /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("update_expression", "update_expression was not specified but it is required when building Update")
|
342 + | /* BuilderGenerator.kt:494 */)?
|
343 + | ,
|
344 + | /* BuilderGenerator.kt:481 */table_name: self.table_name
|
345 + | /* BuilderGenerator.kt:494 */.ok_or_else(||
|
346 + | /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("table_name", "table_name was not specified but it is required when building Update")
|
347 + | /* BuilderGenerator.kt:494 */)?
|
348 + | ,
|
349 + | /* BuilderGenerator.kt:481 */condition_expression: self.condition_expression
|
350 + | ,
|
351 + | /* BuilderGenerator.kt:481 */expression_attribute_names: self.expression_attribute_names
|
352 + | ,
|
353 + | /* BuilderGenerator.kt:481 */expression_attribute_values: self.expression_attribute_values
|
354 + | ,
|
355 + | /* BuilderGenerator.kt:481 */return_values_on_condition_check_failure: self.return_values_on_condition_check_failure
|
356 + | ,
|
357 + | /* BuilderGenerator.kt:477 */}
|
358 + | /* BuilderGenerator.kt:254 */)
|
359 + | /* BuilderGenerator.kt:253 */
|
241 360 | }
|
361 + | /* BuilderGenerator.kt:355 */
|
242 362 | }
|