1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* JsonSerializerGenerator.kt:547 */
|
2 3 | pub fn ser_attribute_value(
|
3 4 | object_6: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
|
4 5 | input: &crate::types::AttributeValue,
|
5 6 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
|
7 + | /* JsonSerializerGenerator.kt:556 */
|
6 8 | match input {
|
9 + | /* JsonSerializerGenerator.kt:564 */
|
7 10 | crate::types::AttributeValue::S(inner) => {
|
8 - | object_6.key("S").string(inner.as_str());
|
11 + | /* SerializerUtil.kt:42 */
|
12 + | {
|
13 + | /* JsonSerializerGenerator.kt:423 */
|
14 + | object_6.key("S").string(inner.as_str());
|
15 + | /* SerializerUtil.kt:42 */
|
16 + | }
|
17 + | /* JsonSerializerGenerator.kt:564 */
|
9 18 | }
|
19 + | /* JsonSerializerGenerator.kt:564 */
|
10 20 | crate::types::AttributeValue::N(inner) => {
|
11 - | object_6.key("N").string(inner.as_str());
|
21 + | /* SerializerUtil.kt:42 */
|
22 + | {
|
23 + | /* JsonSerializerGenerator.kt:423 */
|
24 + | object_6.key("N").string(inner.as_str());
|
25 + | /* SerializerUtil.kt:42 */
|
26 + | }
|
27 + | /* JsonSerializerGenerator.kt:564 */
|
12 28 | }
|
29 + | /* JsonSerializerGenerator.kt:564 */
|
13 30 | crate::types::AttributeValue::B(inner) => {
|
14 - | object_6.key("B").string_unchecked(&::aws_smithy_types::base64::encode(inner));
|
31 + | /* SerializerUtil.kt:42 */
|
32 + | {
|
33 + | /* JsonSerializerGenerator.kt:439 */
|
34 + | object_6.key("B").string_unchecked(&::aws_smithy_types::base64::encode(inner));
|
35 + | /* SerializerUtil.kt:42 */
|
36 + | }
|
37 + | /* JsonSerializerGenerator.kt:564 */
|
15 38 | }
|
39 + | /* JsonSerializerGenerator.kt:564 */
|
16 40 | crate::types::AttributeValue::Ss(inner) => {
|
17 - | let mut array_1 = object_6.key("SS").start_array();
|
18 - | for item_2 in inner {
|
19 - | {
|
20 - | array_1.value().string(item_2.as_str());
|
41 + | /* SerializerUtil.kt:42 */
|
42 + | {
|
43 + | /* JsonSerializerGenerator.kt:484 */
|
44 + | let mut array_1 = object_6.key("SS").start_array();
|
45 + | /* JsonSerializerGenerator.kt:524 */
|
46 + | for item_2 in inner {
|
47 + | /* SerializerUtil.kt:42 */
|
48 + | {
|
49 + | /* JsonSerializerGenerator.kt:423 */
|
50 + | array_1.value().string(item_2.as_str());
|
51 + | /* SerializerUtil.kt:42 */
|
52 + | }
|
53 + | /* JsonSerializerGenerator.kt:524 */
|
21 54 | }
|
55 + | /* JsonSerializerGenerator.kt:486 */
|
56 + | array_1.finish();
|
57 + | /* SerializerUtil.kt:42 */
|
22 58 | }
|
23 - | array_1.finish();
|
59 + | /* JsonSerializerGenerator.kt:564 */
|
24 60 | }
|
61 + | /* JsonSerializerGenerator.kt:564 */
|
25 62 | crate::types::AttributeValue::Ns(inner) => {
|
26 - | let mut array_3 = object_6.key("NS").start_array();
|
27 - | for item_4 in inner {
|
28 - | {
|
29 - | array_3.value().string(item_4.as_str());
|
63 + | /* SerializerUtil.kt:42 */
|
64 + | {
|
65 + | /* JsonSerializerGenerator.kt:484 */
|
66 + | let mut array_3 = object_6.key("NS").start_array();
|
67 + | /* JsonSerializerGenerator.kt:524 */
|
68 + | for item_4 in inner {
|
69 + | /* SerializerUtil.kt:42 */
|
70 + | {
|
71 + | /* JsonSerializerGenerator.kt:423 */
|
72 + | array_3.value().string(item_4.as_str());
|
73 + | /* SerializerUtil.kt:42 */
|
74 + | }
|
75 + | /* JsonSerializerGenerator.kt:524 */
|
30 76 | }
|
77 + | /* JsonSerializerGenerator.kt:486 */
|
78 + | array_3.finish();
|
79 + | /* SerializerUtil.kt:42 */
|
31 80 | }
|
32 - | array_3.finish();
|
81 + | /* JsonSerializerGenerator.kt:564 */
|
33 82 | }
|
83 + | /* JsonSerializerGenerator.kt:564 */
|
34 84 | crate::types::AttributeValue::Bs(inner) => {
|
35 - | let mut array_5 = object_6.key("BS").start_array();
|
36 - | for item_6 in inner {
|
37 - | {
|
38 - | array_5.value().string_unchecked(&::aws_smithy_types::base64::encode(item_6));
|
85 + | /* SerializerUtil.kt:42 */
|
86 + | {
|
87 + | /* JsonSerializerGenerator.kt:484 */
|
88 + | let mut array_5 = object_6.key("BS").start_array();
|
89 + | /* JsonSerializerGenerator.kt:524 */
|
90 + | for item_6 in inner {
|
91 + | /* SerializerUtil.kt:42 */
|
92 + | {
|
93 + | /* JsonSerializerGenerator.kt:439 */
|
94 + | array_5.value().string_unchecked(&::aws_smithy_types::base64::encode(item_6));
|
95 + | /* SerializerUtil.kt:42 */
|
96 + | }
|
97 + | /* JsonSerializerGenerator.kt:524 */
|
39 98 | }
|
99 + | /* JsonSerializerGenerator.kt:486 */
|
100 + | array_5.finish();
|
101 + | /* SerializerUtil.kt:42 */
|
40 102 | }
|
41 - | array_5.finish();
|
103 + | /* JsonSerializerGenerator.kt:564 */
|
42 104 | }
|
105 + | /* JsonSerializerGenerator.kt:564 */
|
43 106 | crate::types::AttributeValue::M(inner) => {
|
44 - | #[allow(unused_mut)]
|
45 - | let mut object_7 = object_6.key("M").start_object();
|
46 - | for (key_8, value_9) in inner {
|
47 - | {
|
48 - | #[allow(unused_mut)]
|
49 - | let mut object_10 = object_7.key(key_8.as_str()).start_object();
|
50 - | crate::protocol_serde::shape_attribute_value::ser_attribute_value(&mut object_10, value_9)?;
|
51 - | object_10.finish();
|
107 + | /* SerializerUtil.kt:42 */
|
108 + | {
|
109 + | /* JsonSerializerGenerator.kt:495 */
|
110 + | #[allow(unused_mut)]
|
111 + | /* JsonSerializerGenerator.kt:496 */
|
112 + | let mut object_7 = object_6.key("M").start_object();
|
113 + | /* JsonSerializerGenerator.kt:537 */
|
114 + | for (key_8, value_9) in inner {
|
115 + | /* SerializerUtil.kt:42 */
|
116 + | {
|
117 + | /* JsonSerializerGenerator.kt:495 */
|
118 + | #[allow(unused_mut)]
|
119 + | /* JsonSerializerGenerator.kt:496 */
|
120 + | let mut object_10 = object_7.key(key_8.as_str()).start_object();
|
121 + | /* JsonSerializerGenerator.kt:579 */
|
122 + | crate::protocol_serde::shape_attribute_value::ser_attribute_value(&mut object_10, value_9)?;
|
123 + | /* JsonSerializerGenerator.kt:515 */
|
124 + | object_10.finish();
|
125 + | /* SerializerUtil.kt:42 */
|
126 + | }
|
127 + | /* JsonSerializerGenerator.kt:537 */
|
52 128 | }
|
129 + | /* JsonSerializerGenerator.kt:515 */
|
130 + | object_7.finish();
|
131 + | /* SerializerUtil.kt:42 */
|
53 132 | }
|
54 - | object_7.finish();
|
133 + | /* JsonSerializerGenerator.kt:564 */
|
55 134 | }
|
135 + | /* JsonSerializerGenerator.kt:564 */
|
56 136 | crate::types::AttributeValue::L(inner) => {
|
57 - | let mut array_11 = object_6.key("L").start_array();
|
58 - | for item_12 in inner {
|
59 - | {
|
60 - | #[allow(unused_mut)]
|
61 - | let mut object_13 = array_11.value().start_object();
|
62 - | crate::protocol_serde::shape_attribute_value::ser_attribute_value(&mut object_13, item_12)?;
|
63 - | object_13.finish();
|
137 + | /* SerializerUtil.kt:42 */
|
138 + | {
|
139 + | /* JsonSerializerGenerator.kt:484 */
|
140 + | let mut array_11 = object_6.key("L").start_array();
|
141 + | /* JsonSerializerGenerator.kt:524 */
|
142 + | for item_12 in inner {
|
143 + | /* SerializerUtil.kt:42 */
|
144 + | {
|
145 + | /* JsonSerializerGenerator.kt:495 */
|
146 + | #[allow(unused_mut)]
|
147 + | /* JsonSerializerGenerator.kt:496 */
|
148 + | let mut object_13 = array_11.value().start_object();
|
149 + | /* JsonSerializerGenerator.kt:579 */
|
150 + | crate::protocol_serde::shape_attribute_value::ser_attribute_value(&mut object_13, item_12)?;
|
151 + | /* JsonSerializerGenerator.kt:515 */
|
152 + | object_13.finish();
|
153 + | /* SerializerUtil.kt:42 */
|
154 + | }
|
155 + | /* JsonSerializerGenerator.kt:524 */
|
64 156 | }
|
157 + | /* JsonSerializerGenerator.kt:486 */
|
158 + | array_11.finish();
|
159 + | /* SerializerUtil.kt:42 */
|
65 160 | }
|
66 - | array_11.finish();
|
161 + | /* JsonSerializerGenerator.kt:564 */
|
67 162 | }
|
163 + | /* JsonSerializerGenerator.kt:564 */
|
68 164 | crate::types::AttributeValue::Null(inner) => {
|
69 - | object_6.key("NULL").boolean(*inner);
|
165 + | /* SerializerUtil.kt:42 */
|
166 + | {
|
167 + | /* JsonSerializerGenerator.kt:424 */
|
168 + | object_6.key("NULL").boolean(*inner);
|
169 + | /* SerializerUtil.kt:42 */
|
170 + | }
|
171 + | /* JsonSerializerGenerator.kt:564 */
|
70 172 | }
|
173 + | /* JsonSerializerGenerator.kt:564 */
|
71 174 | crate::types::AttributeValue::Bool(inner) => {
|
72 - | object_6.key("BOOL").boolean(*inner);
|
175 + | /* SerializerUtil.kt:42 */
|
176 + | {
|
177 + | /* JsonSerializerGenerator.kt:424 */
|
178 + | object_6.key("BOOL").boolean(*inner);
|
179 + | /* SerializerUtil.kt:42 */
|
180 + | }
|
181 + | /* JsonSerializerGenerator.kt:564 */
|
73 182 | }
|
183 + | /* JsonSerializerGenerator.kt:569 */
|
74 184 | crate::types::AttributeValue::Unknown => {
|
75 185 | return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant(
|
76 186 | "AttributeValue",
|
77 187 | ))
|
78 - | }
|
188 + | } /* JsonSerializerGenerator.kt:556 */
|
79 189 | }
|
190 + | /* JsonSerializerGenerator.kt:576 */
|
80 191 | Ok(())
|
192 + | /* JsonSerializerGenerator.kt:547 */
|
81 193 | }
|
82 194 |
|
195 + | /* JsonParserGenerator.kt:551 */
|
83 196 | pub(crate) fn de_attribute_value<'a, I>(
|
84 197 | tokens: &mut ::std::iter::Peekable<I>,
|
85 198 | ) -> ::std::result::Result<Option<crate::types::AttributeValue>, ::aws_smithy_json::deserialize::error::DeserializeError>
|
86 199 | where
|
87 200 | I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
|
88 201 | {
|
202 + | /* JsonParserGenerator.kt:565 */
|
89 203 | let mut variant = None;
|
204 + | /* JsonParserGenerator.kt:567 */
|
90 205 | match tokens.next().transpose()? {
|
91 - | Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None),
|
92 - | Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => loop {
|
93 - | match tokens.next().transpose()? {
|
94 - | Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
|
95 - | Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
|
96 - | if let ::std::option::Option::Some(::std::result::Result::Ok(::aws_smithy_json::deserialize::Token::ValueNull { .. })) =
|
97 - | tokens.peek()
|
98 - | {
|
99 - | let _ = tokens.next().expect("peek returned a token")?;
|
100 - | continue;
|
101 - | }
|
102 - | let key = key.to_unescaped()?;
|
103 - | if key == "__type" {
|
104 - | ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
|
105 - | continue;
|
106 - | }
|
107 - | if variant.is_some() {
|
108 - | return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
109 - | "encountered mixed variants in union",
|
110 - | ));
|
111 - | }
|
112 - | variant = match key.as_ref() {
|
113 - | "S" => Some(crate::types::AttributeValue::S(
|
114 - | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
115 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
116 - | .transpose()?
|
117 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'S' cannot be null"))?,
|
118 - | )),
|
119 - | "N" => Some(crate::types::AttributeValue::N(
|
120 - | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
121 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
122 - | .transpose()?
|
123 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'N' cannot be null"))?,
|
124 - | )),
|
125 - | "B" => Some(crate::types::AttributeValue::B(
|
126 - | ::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?
|
127 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'B' cannot be null"))?,
|
128 - | )),
|
129 - | "SS" => Some(crate::types::AttributeValue::Ss(
|
130 - | crate::protocol_serde::shape_string_set_attribute_value::de_string_set_attribute_value(tokens)?
|
131 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'SS' cannot be null"))?,
|
132 - | )),
|
133 - | "NS" => Some(crate::types::AttributeValue::Ns(
|
134 - | crate::protocol_serde::shape_number_set_attribute_value::de_number_set_attribute_value(tokens)?
|
135 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'NS' cannot be null"))?,
|
136 - | )),
|
137 - | "BS" => Some(crate::types::AttributeValue::Bs(
|
138 - | crate::protocol_serde::shape_binary_set_attribute_value::de_binary_set_attribute_value(tokens)?
|
139 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'BS' cannot be null"))?,
|
140 - | )),
|
141 - | "M" => Some(crate::types::AttributeValue::M(
|
142 - | crate::protocol_serde::shape_map_attribute_value::de_map_attribute_value(tokens)?
|
143 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'M' cannot be null"))?,
|
144 - | )),
|
145 - | "L" => Some(crate::types::AttributeValue::L(
|
146 - | crate::protocol_serde::shape_list_attribute_value::de_list_attribute_value(tokens)?
|
147 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'L' cannot be null"))?,
|
148 - | )),
|
149 - | "NULL" => Some(crate::types::AttributeValue::Null(
|
150 - | ::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?
|
151 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'NULL' cannot be null"))?,
|
152 - | )),
|
153 - | "BOOL" => Some(crate::types::AttributeValue::Bool(
|
154 - | ::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?
|
155 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'BOOL' cannot be null"))?,
|
156 - | )),
|
157 - | _ => {
|
206 + | /* JsonParserGenerator.kt:568 */ Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None),
|
207 + | Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
|
208 + | /* JsonParserGenerator.kt:684 */
|
209 + | loop {
|
210 + | /* JsonParserGenerator.kt:685 */
|
211 + | match tokens.next().transpose()? {
|
212 + | /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
|
213 + | Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
|
214 + | /* JsonParserGenerator.kt:576 */
|
215 + | if let ::std::option::Option::Some(::std::result::Result::Ok(::aws_smithy_json::deserialize::Token::ValueNull { .. })) =
|
216 + | tokens.peek()
|
217 + | {
|
218 + | let _ = tokens.next().expect("peek returned a token")?;
|
219 + | continue;
|
220 + | }
|
221 + | /* JsonParserGenerator.kt:585 */
|
222 + | let key = key.to_unescaped()?;
|
223 + | if key == "__type" {
|
158 224 | ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
|
159 - | Some(crate::types::AttributeValue::Unknown)
|
225 + | continue;
|
160 226 | }
|
161 - | };
|
162 - | }
|
163 - | other => {
|
164 - | return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
|
165 - | "expected object key or end object, found: {:?}",
|
166 - | other
|
167 - | )))
|
227 + | if variant.is_some() {
|
228 + | return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
229 + | "encountered mixed variants in union",
|
230 + | ));
|
231 + | }
|
232 + | /* JsonParserGenerator.kt:598 */
|
233 + | variant = match key.as_ref() {
|
234 + | /* JsonParserGenerator.kt:601 */
|
235 + | "S" => {
|
236 + | /* JsonParserGenerator.kt:611 */
|
237 + | Some(crate::types::AttributeValue::S(
|
238 + | /* JsonParserGenerator.kt:354 */
|
239 + | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
240 + | .map(|s|
|
241 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
242 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
243 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
244 + | .transpose()?
|
245 + | /* JsonParserGenerator.kt:670 */
|
246 + | .ok_or_else(|| {
|
247 + | ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'S' cannot be null")
|
248 + | })?, /* JsonParserGenerator.kt:611 */
|
249 + | ))
|
250 + | /* JsonParserGenerator.kt:601 */
|
251 + | }
|
252 + | /* JsonParserGenerator.kt:601 */
|
253 + | "N" => {
|
254 + | /* JsonParserGenerator.kt:611 */
|
255 + | Some(crate::types::AttributeValue::N(
|
256 + | /* JsonParserGenerator.kt:354 */
|
257 + | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
258 + | .map(|s|
|
259 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
260 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
261 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
262 + | .transpose()?
|
263 + | /* JsonParserGenerator.kt:670 */
|
264 + | .ok_or_else(|| {
|
265 + | ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'N' cannot be null")
|
266 + | })?, /* JsonParserGenerator.kt:611 */
|
267 + | ))
|
268 + | /* JsonParserGenerator.kt:601 */
|
269 + | }
|
270 + | /* JsonParserGenerator.kt:601 */
|
271 + | "B" => {
|
272 + | /* JsonParserGenerator.kt:611 */
|
273 + | Some(crate::types::AttributeValue::B(
|
274 + | /* JsonParserGenerator.kt:326 */
|
275 + | ::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?
|
276 + | /* JsonParserGenerator.kt:670 */
|
277 + | .ok_or_else(|| {
|
278 + | ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'B' cannot be null")
|
279 + | })?, /* JsonParserGenerator.kt:611 */
|
280 + | ))
|
281 + | /* JsonParserGenerator.kt:601 */
|
282 + | }
|
283 + | /* JsonParserGenerator.kt:601 */
|
284 + | "SS" => {
|
285 + | /* JsonParserGenerator.kt:611 */
|
286 + | Some(crate::types::AttributeValue::Ss(
|
287 + | /* JsonParserGenerator.kt:451 */
|
288 + | crate::protocol_serde::shape_string_set_attribute_value::de_string_set_attribute_value(tokens)?
|
289 + | /* JsonParserGenerator.kt:670 */
|
290 + | .ok_or_else(|| {
|
291 + | ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'SS' cannot be null")
|
292 + | })?, /* JsonParserGenerator.kt:611 */
|
293 + | ))
|
294 + | /* JsonParserGenerator.kt:601 */
|
295 + | }
|
296 + | /* JsonParserGenerator.kt:601 */
|
297 + | "NS" => {
|
298 + | /* JsonParserGenerator.kt:611 */
|
299 + | Some(crate::types::AttributeValue::Ns(
|
300 + | /* JsonParserGenerator.kt:451 */
|
301 + | crate::protocol_serde::shape_number_set_attribute_value::de_number_set_attribute_value(tokens)?
|
302 + | /* JsonParserGenerator.kt:670 */
|
303 + | .ok_or_else(|| {
|
304 + | ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'NS' cannot be null")
|
305 + | })?, /* JsonParserGenerator.kt:611 */
|
306 + | ))
|
307 + | /* JsonParserGenerator.kt:601 */
|
308 + | }
|
309 + | /* JsonParserGenerator.kt:601 */
|
310 + | "BS" => {
|
311 + | /* JsonParserGenerator.kt:611 */
|
312 + | Some(crate::types::AttributeValue::Bs(
|
313 + | /* JsonParserGenerator.kt:451 */
|
314 + | crate::protocol_serde::shape_binary_set_attribute_value::de_binary_set_attribute_value(tokens)?
|
315 + | /* JsonParserGenerator.kt:670 */
|
316 + | .ok_or_else(|| {
|
317 + | ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'BS' cannot be null")
|
318 + | })?, /* JsonParserGenerator.kt:611 */
|
319 + | ))
|
320 + | /* JsonParserGenerator.kt:601 */
|
321 + | }
|
322 + | /* JsonParserGenerator.kt:601 */
|
323 + | "M" => {
|
324 + | /* JsonParserGenerator.kt:611 */
|
325 + | Some(crate::types::AttributeValue::M(
|
326 + | /* JsonParserGenerator.kt:509 */
|
327 + | crate::protocol_serde::shape_map_attribute_value::de_map_attribute_value(tokens)?
|
328 + | /* JsonParserGenerator.kt:670 */
|
329 + | .ok_or_else(|| {
|
330 + | ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'M' cannot be null")
|
331 + | })?, /* JsonParserGenerator.kt:611 */
|
332 + | ))
|
333 + | /* JsonParserGenerator.kt:601 */
|
334 + | }
|
335 + | /* JsonParserGenerator.kt:601 */
|
336 + | "L" => {
|
337 + | /* JsonParserGenerator.kt:611 */
|
338 + | Some(crate::types::AttributeValue::L(
|
339 + | /* JsonParserGenerator.kt:451 */
|
340 + | crate::protocol_serde::shape_list_attribute_value::de_list_attribute_value(tokens)?
|
341 + | /* JsonParserGenerator.kt:670 */
|
342 + | .ok_or_else(|| {
|
343 + | ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'L' cannot be null")
|
344 + | })?, /* JsonParserGenerator.kt:611 */
|
345 + | ))
|
346 + | /* JsonParserGenerator.kt:601 */
|
347 + | }
|
348 + | /* JsonParserGenerator.kt:601 */
|
349 + | "NULL" => {
|
350 + | /* JsonParserGenerator.kt:611 */
|
351 + | Some(crate::types::AttributeValue::Null(
|
352 + | /* JsonParserGenerator.kt:298 */
|
353 + | ::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?
|
354 + | /* JsonParserGenerator.kt:670 */
|
355 + | .ok_or_else(|| {
|
356 + | ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'NULL' cannot be null")
|
357 + | })?, /* JsonParserGenerator.kt:611 */
|
358 + | ))
|
359 + | /* JsonParserGenerator.kt:601 */
|
360 + | }
|
361 + | /* JsonParserGenerator.kt:601 */
|
362 + | "BOOL" => {
|
363 + | /* JsonParserGenerator.kt:611 */
|
364 + | Some(crate::types::AttributeValue::Bool(
|
365 + | /* JsonParserGenerator.kt:298 */
|
366 + | ::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?
|
367 + | /* JsonParserGenerator.kt:670 */
|
368 + | .ok_or_else(|| {
|
369 + | ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'BOOL' cannot be null")
|
370 + | })?, /* JsonParserGenerator.kt:611 */
|
371 + | ))
|
372 + | /* JsonParserGenerator.kt:601 */
|
373 + | }
|
374 + | /* JsonParserGenerator.kt:621 */
|
375 + | _ => {
|
376 + | ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
|
377 + | Some(crate::types::AttributeValue::Unknown)
|
378 + | } /* JsonParserGenerator.kt:598 */
|
379 + | };
|
380 + | /* JsonParserGenerator.kt:686 */
|
381 + | }
|
382 + | /* JsonParserGenerator.kt:695 */
|
383 + | other => {
|
384 + | return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
|
385 + | "expected object key or end object, found: {:?}",
|
386 + | other
|
387 + | )))
|
388 + | } /* JsonParserGenerator.kt:685 */
|
168 389 | }
|
390 + | /* JsonParserGenerator.kt:684 */
|
169 391 | }
|
170 - | },
|
392 + | /* JsonParserGenerator.kt:568 */
|
393 + | }
|
394 + | /* JsonParserGenerator.kt:642 */
|
171 395 | _ => {
|
172 396 | return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
173 397 | "expected start object or null",
|
174 398 | ))
|
175 - | }
|
399 + | } /* JsonParserGenerator.kt:567 */
|
176 400 | }
|
401 + | /* JsonParserGenerator.kt:649 */
|
177 402 | if variant.is_none() {
|
178 403 | return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
179 404 | "Union did not contain a valid variant.",
|
180 405 | ));
|
181 406 | }
|
407 + | /* JsonParserGenerator.kt:657 */
|
182 408 | Ok(variant)
|
409 + | /* JsonParserGenerator.kt:551 */
|
183 410 | }
|