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