1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* JsonParserGenerator.kt:551 */
|
2 3 | pub(crate) fn de_my_union<'a, I>(
|
3 4 | tokens: &mut ::std::iter::Peekable<I>,
|
4 5 | ) -> ::std::result::Result<
|
5 6 | Option<crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained>,
|
6 7 | ::aws_smithy_json::deserialize::error::DeserializeError,
|
7 8 | >
|
8 9 | where
|
9 10 | I: Iterator<
|
10 11 | Item = Result<
|
11 12 | ::aws_smithy_json::deserialize::Token<'a>,
|
12 13 | ::aws_smithy_json::deserialize::error::DeserializeError,
|
13 14 | >,
|
14 15 | >,
|
15 16 | {
|
17 + | /* JsonParserGenerator.kt:565 */
|
16 18 | let mut variant = None;
|
19 + | /* JsonParserGenerator.kt:567 */
|
17 20 | match tokens.next().transpose()? {
|
21 + | /* JsonParserGenerator.kt:568 */
|
18 22 | Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None),
|
19 - | Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => loop {
|
20 - | match tokens.next().transpose()? {
|
21 - | Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
|
22 - | Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
|
23 - | if let ::std::option::Option::Some(::std::result::Result::Ok(
|
24 - | ::aws_smithy_json::deserialize::Token::ValueNull { .. },
|
25 - | )) = tokens.peek()
|
26 - | {
|
27 - | let _ = tokens.next().expect("peek returned a token")?;
|
28 - | continue;
|
29 - | }
|
30 - | let key = key.to_unescaped()?;
|
31 - | if key == "__type" {
|
32 - | ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
|
33 - | continue;
|
34 - | }
|
35 - | if variant.is_some() {
|
36 - | return Err(
|
37 - | ::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
38 - | "encountered mixed variants in union",
|
39 - | ),
|
40 - | );
|
41 - | }
|
42 - | variant = match key.as_ref() {
|
23 + | Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
|
24 + | /* JsonParserGenerator.kt:684 */
|
25 + | loop {
|
26 + | /* JsonParserGenerator.kt:685 */
|
27 + | match tokens.next().transpose()? {
|
28 + | /* JsonParserGenerator.kt:686 */
|
29 + | Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
|
30 + | Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
|
31 + | /* JsonParserGenerator.kt:576 */
|
32 + | if let ::std::option::Option::Some(::std::result::Result::Ok(
|
33 + | ::aws_smithy_json::deserialize::Token::ValueNull { .. },
|
34 + | )) = tokens.peek()
|
35 + | {
|
36 + | let _ = tokens.next().expect("peek returned a token")?;
|
37 + | continue;
|
38 + | }
|
39 + | /* JsonParserGenerator.kt:585 */
|
40 + | let key = key.to_unescaped()?;
|
41 + | if key == "__type" {
|
42 + | ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
|
43 + | continue;
|
44 + | }
|
45 + | if variant.is_some() {
|
46 + | return Err(
|
47 + | ::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
48 + | "encountered mixed variants in union",
|
49 + | ),
|
50 + | );
|
51 + | }
|
52 + | /* JsonParserGenerator.kt:598 */
|
53 + | variant = match key.as_ref() {
|
54 + | /* JsonParserGenerator.kt:601 */
|
43 55 | "stringValue" => {
|
56 + | /* JsonParserGenerator.kt:611 */
|
44 57 | Some(crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::StringValue(
|
45 - | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
|
46 - | s.to_unescaped().map(|u|
|
47 - | u.into_owned()
|
48 - | )
|
49 - | ).transpose()?
|
50 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'stringValue' cannot be null"))?
|
51 - | ))
|
58 + | /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
|
59 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
60 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
61 + | /* JsonParserGenerator.kt:339 */)
|
62 + | /* JsonParserGenerator.kt:354 */).transpose()?
|
63 + | /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'stringValue' cannot be null"))?
|
64 + | /* JsonParserGenerator.kt:611 */))
|
65 + | /* JsonParserGenerator.kt:601 */
|
52 66 | }
|
67 + | /* JsonParserGenerator.kt:601 */
|
53 68 | "booleanValue" => {
|
69 + | /* JsonParserGenerator.kt:611 */
|
54 70 | Some(crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::BooleanValue(
|
55 - | ::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?
|
56 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'booleanValue' cannot be null"))?
|
57 - | ))
|
71 + | /* JsonParserGenerator.kt:298 */::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?
|
72 + | /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'booleanValue' cannot be null"))?
|
73 + | /* JsonParserGenerator.kt:611 */))
|
74 + | /* JsonParserGenerator.kt:601 */
|
58 75 | }
|
76 + | /* JsonParserGenerator.kt:601 */
|
59 77 | "numberValue" => {
|
78 + | /* JsonParserGenerator.kt:611 */
|
60 79 | Some(crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::NumberValue(
|
61 - | ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
|
80 + | /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
|
62 81 | .map(i32::try_from)
|
63 82 | .transpose()?
|
64 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'numberValue' cannot be null"))?
|
65 - | ))
|
83 + | /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'numberValue' cannot be null"))?
|
84 + | /* JsonParserGenerator.kt:611 */))
|
85 + | /* JsonParserGenerator.kt:601 */
|
66 86 | }
|
87 + | /* JsonParserGenerator.kt:601 */
|
67 88 | "blobValue" => {
|
89 + | /* JsonParserGenerator.kt:611 */
|
68 90 | Some(crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::BlobValue(
|
69 - | ::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?
|
70 - | .map(::aws_smithy_http_server_python::types::Blob::from)
|
71 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'blobValue' cannot be null"))?
|
72 - | ))
|
91 + | /* JsonParserGenerator.kt:326 */::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?
|
92 + | /* PythonServerProtocolLoader.kt:48 */.map(::aws_smithy_http_server_python::types::Blob::from)
|
93 + | /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'blobValue' cannot be null"))?
|
94 + | /* JsonParserGenerator.kt:611 */))
|
95 + | /* JsonParserGenerator.kt:601 */
|
73 96 | }
|
97 + | /* JsonParserGenerator.kt:601 */
|
74 98 | "timestampValue" => {
|
99 + | /* JsonParserGenerator.kt:611 */
|
75 100 | Some(crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::TimestampValue(
|
76 - | ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(tokens.next(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
|
77 - | .map(::aws_smithy_http_server_python::types::DateTime::from)
|
78 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'timestampValue' cannot be null"))?
|
79 - | ))
|
101 + | /* JsonParserGenerator.kt:384 */::aws_smithy_json::deserialize::token::expect_timestamp_or_null(tokens.next(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
|
102 + | /* PythonServerProtocolLoader.kt:44 */.map(::aws_smithy_http_server_python::types::DateTime::from)
|
103 + | /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'timestampValue' cannot be null"))?
|
104 + | /* JsonParserGenerator.kt:611 */))
|
105 + | /* JsonParserGenerator.kt:601 */
|
80 106 | }
|
107 + | /* JsonParserGenerator.kt:601 */
|
81 108 | "enumValue" => {
|
109 + | /* JsonParserGenerator.kt:611 */
|
82 110 | Some(crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::EnumValue(
|
83 - | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
|
84 - | s.to_unescaped().map(|u|
|
85 - | u.into_owned()
|
86 - | )
|
87 - | ).transpose()?
|
88 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'enumValue' cannot be null"))?
|
89 - | ))
|
111 + | /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
|
112 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
113 + | /* JsonParserGenerator.kt:343 */u.into_owned()
|
114 + | /* JsonParserGenerator.kt:339 */)
|
115 + | /* JsonParserGenerator.kt:354 */).transpose()?
|
116 + | /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'enumValue' cannot be null"))?
|
117 + | /* JsonParserGenerator.kt:611 */))
|
118 + | /* JsonParserGenerator.kt:601 */
|
90 119 | }
|
120 + | /* JsonParserGenerator.kt:601 */
|
91 121 | "listValue" => {
|
122 + | /* JsonParserGenerator.kt:611 */
|
92 123 | Some(crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::ListValue(
|
93 - | crate::protocol_serde::shape_string_list::de_string_list(tokens)?
|
94 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'listValue' cannot be null"))?
|
95 - | ))
|
124 + | /* JsonParserGenerator.kt:451 */crate::protocol_serde::shape_string_list::de_string_list(tokens)?
|
125 + | /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'listValue' cannot be null"))?
|
126 + | /* JsonParserGenerator.kt:611 */))
|
127 + | /* JsonParserGenerator.kt:601 */
|
96 128 | }
|
129 + | /* JsonParserGenerator.kt:601 */
|
97 130 | "mapValue" => {
|
131 + | /* JsonParserGenerator.kt:611 */
|
98 132 | Some(crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::MapValue(
|
99 - | crate::protocol_serde::shape_string_map::de_string_map(tokens)?
|
100 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'mapValue' cannot be null"))?
|
101 - | ))
|
133 + | /* JsonParserGenerator.kt:509 */crate::protocol_serde::shape_string_map::de_string_map(tokens)?
|
134 + | /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'mapValue' cannot be null"))?
|
135 + | /* JsonParserGenerator.kt:611 */))
|
136 + | /* JsonParserGenerator.kt:601 */
|
102 137 | }
|
138 + | /* JsonParserGenerator.kt:601 */
|
103 139 | "structureValue" => {
|
140 + | /* JsonParserGenerator.kt:611 */
|
104 141 | Some(crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::StructureValue(
|
105 - | crate::protocol_serde::shape_greeting_struct::de_greeting_struct(tokens)?
|
106 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'structureValue' cannot be null"))?
|
107 - | ))
|
142 + | /* JsonParserGenerator.kt:544 */crate::protocol_serde::shape_greeting_struct::de_greeting_struct(tokens)?
|
143 + | /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'structureValue' cannot be null"))?
|
144 + | /* JsonParserGenerator.kt:611 */))
|
145 + | /* JsonParserGenerator.kt:601 */
|
108 146 | }
|
147 + | /* JsonParserGenerator.kt:601 */
|
109 148 | "renamedStructureValue" => {
|
149 + | /* JsonParserGenerator.kt:611 */
|
110 150 | Some(crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::RenamedStructureValue(
|
111 - | crate::protocol_serde::shape_renamed_greeting::de_renamed_greeting(tokens)?
|
112 - | .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'renamedStructureValue' cannot be null"))?
|
113 - | ))
|
151 + | /* JsonParserGenerator.kt:544 */crate::protocol_serde::shape_renamed_greeting::de_renamed_greeting(tokens)?
|
152 + | /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'renamedStructureValue' cannot be null"))?
|
153 + | /* JsonParserGenerator.kt:611 */))
|
154 + | /* JsonParserGenerator.kt:601 */
|
114 155 | }
|
115 - | variant => return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!("unexpected union variant: {}", variant)))
|
156 + | /* JsonParserGenerator.kt:634 */
|
157 + | variant => {
|
158 + | return Err(
|
159 + | ::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
160 + | format!("unexpected union variant: {}", variant),
|
161 + | ),
|
162 + | )
|
163 + | } /* JsonParserGenerator.kt:598 */
|
116 164 | };
|
165 + | /* JsonParserGenerator.kt:686 */
|
166 + | }
|
167 + | /* JsonParserGenerator.kt:695 */
|
168 + | other => {
|
169 + | return Err(
|
170 + | ::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
171 + | format!("expected object key or end object, found: {:?}", other),
|
172 + | ),
|
173 + | )
|
174 + | } /* JsonParserGenerator.kt:685 */
|
117 175 | }
|
118 - | other => {
|
119 - | return Err(
|
120 - | ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
|
121 - | "expected object key or end object, found: {:?}",
|
122 - | other
|
123 - | )),
|
124 - | )
|
125 - | }
|
176 + | /* JsonParserGenerator.kt:684 */
|
126 177 | }
|
127 - | },
|
178 + | /* JsonParserGenerator.kt:568 */
|
179 + | }
|
180 + | /* JsonParserGenerator.kt:642 */
|
128 181 | _ => {
|
129 182 | return Err(
|
130 183 | ::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
131 184 | "expected start object or null",
|
132 185 | ),
|
133 186 | )
|
134 - | }
|
187 + | } /* JsonParserGenerator.kt:567 */
|
135 188 | }
|
189 + | /* JsonParserGenerator.kt:649 */
|
136 190 | if variant.is_none() {
|
137 191 | return Err(
|
138 192 | ::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
139 193 | "Union did not contain a valid variant.",
|
140 194 | ),
|
141 195 | );
|
142 196 | }
|
197 + | /* JsonParserGenerator.kt:657 */
|
143 198 | Ok(variant)
|
199 + | /* JsonParserGenerator.kt:551 */
|
144 200 | }
|
145 201 |
|
202 + | /* JsonSerializerGenerator.kt:547 */
|
146 203 | pub fn ser_my_union(
|
147 204 | object_2: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
|
148 205 | input: &crate::model::MyUnion,
|
149 206 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
|
207 + | /* JsonSerializerGenerator.kt:556 */
|
150 208 | match input {
|
209 + | /* JsonSerializerGenerator.kt:564 */
|
151 210 | crate::model::MyUnion::StringValue(inner) => {
|
152 - | object_2.key("stringValue").string(inner.as_str());
|
211 + | /* SerializerUtil.kt:42 */
|
212 + | {
|
213 + | /* JsonSerializerGenerator.kt:423 */
|
214 + | object_2.key("stringValue").string(inner.as_str());
|
215 + | /* SerializerUtil.kt:42 */
|
216 + | }
|
217 + | /* JsonSerializerGenerator.kt:564 */
|
153 218 | }
|
219 + | /* JsonSerializerGenerator.kt:564 */
|
154 220 | crate::model::MyUnion::BooleanValue(inner) => {
|
155 - | object_2.key("booleanValue").boolean(*inner);
|
221 + | /* SerializerUtil.kt:42 */
|
222 + | {
|
223 + | /* JsonSerializerGenerator.kt:424 */
|
224 + | object_2.key("booleanValue").boolean(*inner);
|
225 + | /* SerializerUtil.kt:42 */
|
226 + | }
|
227 + | /* JsonSerializerGenerator.kt:564 */
|
156 228 | }
|
229 + | /* JsonSerializerGenerator.kt:564 */
|
157 230 | crate::model::MyUnion::NumberValue(inner) => {
|
158 - | object_2.key("numberValue").number(
|
159 - | #[allow(clippy::useless_conversion)]
|
160 - | ::aws_smithy_types::Number::NegInt((*inner).into()),
|
161 - | );
|
231 + | /* SerializerUtil.kt:42 */
|
232 + | {
|
233 + | /* JsonSerializerGenerator.kt:432 */
|
234 + | object_2.key("numberValue").number(
|
235 + | #[allow(clippy::useless_conversion)]
|
236 + | ::aws_smithy_types::Number::NegInt((*inner).into()),
|
237 + | );
|
238 + | /* SerializerUtil.kt:42 */
|
239 + | }
|
240 + | /* JsonSerializerGenerator.kt:564 */
|
162 241 | }
|
242 + | /* JsonSerializerGenerator.kt:564 */
|
163 243 | crate::model::MyUnion::BlobValue(inner) => {
|
164 - | object_2
|
165 - | .key("blobValue")
|
166 - | .string_unchecked(&::aws_smithy_types::base64::encode(inner));
|
244 + | /* SerializerUtil.kt:42 */
|
245 + | {
|
246 + | /* JsonSerializerGenerator.kt:439 */
|
247 + | object_2
|
248 + | .key("blobValue")
|
249 + | .string_unchecked(&::aws_smithy_types::base64::encode(inner));
|
250 + | /* SerializerUtil.kt:42 */
|
251 + | }
|
252 + | /* JsonSerializerGenerator.kt:564 */
|
167 253 | }
|
254 + | /* JsonSerializerGenerator.kt:564 */
|
168 255 | crate::model::MyUnion::TimestampValue(inner) => {
|
169 - | object_2
|
170 - | .key("timestampValue")
|
171 - | .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
|
256 + | /* SerializerUtil.kt:42 */
|
257 + | {
|
258 + | /* JsonSerializerGenerator.kt:448 */
|
259 + | object_2
|
260 + | .key("timestampValue")
|
261 + | .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
|
262 + | /* SerializerUtil.kt:42 */
|
263 + | }
|
264 + | /* JsonSerializerGenerator.kt:564 */
|
172 265 | }
|
266 + | /* JsonSerializerGenerator.kt:564 */
|
173 267 | crate::model::MyUnion::EnumValue(inner) => {
|
174 - | object_2.key("enumValue").string(inner.as_str());
|
268 + | /* SerializerUtil.kt:42 */
|
269 + | {
|
270 + | /* JsonSerializerGenerator.kt:423 */
|
271 + | object_2.key("enumValue").string(inner.as_str());
|
272 + | /* SerializerUtil.kt:42 */
|
273 + | }
|
274 + | /* JsonSerializerGenerator.kt:564 */
|
175 275 | }
|
276 + | /* JsonSerializerGenerator.kt:564 */
|
176 277 | crate::model::MyUnion::ListValue(inner) => {
|
177 - | let mut array_1 = object_2.key("listValue").start_array();
|
178 - | for item_2 in inner {
|
179 - | {
|
180 - | array_1.value().string(item_2.as_str());
|
278 + | /* SerializerUtil.kt:42 */
|
279 + | {
|
280 + | /* JsonSerializerGenerator.kt:484 */
|
281 + | let mut array_1 = object_2.key("listValue").start_array();
|
282 + | /* JsonSerializerGenerator.kt:524 */
|
283 + | for item_2 in inner {
|
284 + | /* SerializerUtil.kt:42 */
|
285 + | {
|
286 + | /* JsonSerializerGenerator.kt:423 */
|
287 + | array_1.value().string(item_2.as_str());
|
288 + | /* SerializerUtil.kt:42 */
|
289 + | }
|
290 + | /* JsonSerializerGenerator.kt:524 */
|
181 291 | }
|
292 + | /* JsonSerializerGenerator.kt:486 */
|
293 + | array_1.finish();
|
294 + | /* SerializerUtil.kt:42 */
|
182 295 | }
|
183 - | array_1.finish();
|
296 + | /* JsonSerializerGenerator.kt:564 */
|
184 297 | }
|
298 + | /* JsonSerializerGenerator.kt:564 */
|
185 299 | crate::model::MyUnion::MapValue(inner) => {
|
186 - | #[allow(unused_mut)]
|
187 - | let mut object_3 = object_2.key("mapValue").start_object();
|
188 - | for (key_4, value_5) in inner {
|
189 - | {
|
190 - | object_3.key(key_4.as_str()).string(value_5.as_str());
|
300 + | /* SerializerUtil.kt:42 */
|
301 + | {
|
302 + | /* JsonSerializerGenerator.kt:495 */
|
303 + | #[allow(unused_mut)]
|
304 + | /* JsonSerializerGenerator.kt:496 */
|
305 + | let mut object_3 = object_2.key("mapValue").start_object();
|
306 + | /* JsonSerializerGenerator.kt:537 */
|
307 + | for (key_4, value_5) in inner {
|
308 + | /* SerializerUtil.kt:42 */
|
309 + | {
|
310 + | /* JsonSerializerGenerator.kt:423 */
|
311 + | object_3.key(key_4.as_str()).string(value_5.as_str());
|
312 + | /* SerializerUtil.kt:42 */
|
313 + | }
|
314 + | /* JsonSerializerGenerator.kt:537 */
|
191 315 | }
|
316 + | /* JsonSerializerGenerator.kt:515 */
|
317 + | object_3.finish();
|
318 + | /* SerializerUtil.kt:42 */
|
192 319 | }
|
193 - | object_3.finish();
|
320 + | /* JsonSerializerGenerator.kt:564 */
|
194 321 | }
|
322 + | /* JsonSerializerGenerator.kt:564 */
|
195 323 | crate::model::MyUnion::StructureValue(inner) => {
|
196 - | #[allow(unused_mut)]
|
197 - | let mut object_6 = object_2.key("structureValue").start_object();
|
198 - | crate::protocol_serde::shape_greeting_struct::ser_greeting_struct(
|
199 - | &mut object_6,
|
200 - | inner,
|
201 - | )?;
|
202 - | object_6.finish();
|
324 + | /* SerializerUtil.kt:42 */
|
325 + | {
|
326 + | /* JsonSerializerGenerator.kt:495 */
|
327 + | #[allow(unused_mut)]
|
328 + | /* JsonSerializerGenerator.kt:496 */
|
329 + | let mut object_6 = object_2.key("structureValue").start_object();
|
330 + | /* JsonSerializerGenerator.kt:375 */
|
331 + | crate::protocol_serde::shape_greeting_struct::ser_greeting_struct(
|
332 + | &mut object_6,
|
333 + | inner,
|
334 + | )?;
|
335 + | /* JsonSerializerGenerator.kt:515 */
|
336 + | object_6.finish();
|
337 + | /* SerializerUtil.kt:42 */
|
338 + | }
|
339 + | /* JsonSerializerGenerator.kt:564 */
|
203 340 | }
|
341 + | /* JsonSerializerGenerator.kt:564 */
|
204 342 | crate::model::MyUnion::RenamedStructureValue(inner) => {
|
205 - | #[allow(unused_mut)]
|
206 - | let mut object_7 = object_2.key("renamedStructureValue").start_object();
|
207 - | crate::protocol_serde::shape_renamed_greeting::ser_renamed_greeting(
|
208 - | &mut object_7,
|
209 - | inner,
|
210 - | )?;
|
211 - | object_7.finish();
|
343 + | /* SerializerUtil.kt:42 */
|
344 + | {
|
345 + | /* JsonSerializerGenerator.kt:495 */
|
346 + | #[allow(unused_mut)]
|
347 + | /* JsonSerializerGenerator.kt:496 */
|
348 + | let mut object_7 = object_2.key("renamedStructureValue").start_object();
|
349 + | /* JsonSerializerGenerator.kt:375 */
|
350 + | crate::protocol_serde::shape_renamed_greeting::ser_renamed_greeting(
|
351 + | &mut object_7,
|
352 + | inner,
|
353 + | )?;
|
354 + | /* JsonSerializerGenerator.kt:515 */
|
355 + | object_7.finish();
|
356 + | /* SerializerUtil.kt:42 */
|
357 + | }
|
358 + | /* JsonSerializerGenerator.kt:564 */
|
212 359 | }
|
360 + | /* JsonSerializerGenerator.kt:556 */
|
213 361 | }
|
362 + | /* JsonSerializerGenerator.kt:576 */
|
214 363 | Ok(())
|
364 + | /* JsonSerializerGenerator.kt:547 */
|
215 365 | }
|