1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* RustType.kt:516 */
|
2 3 | #[allow(clippy::unnecessary_wraps)]
|
4 + | /* ServerHttpBoundProtocolGenerator.kt:383 */
|
3 5 | pub async fn de_start_snapshot_http_request<B>(
|
4 6 | #[allow(unused_variables)] request: ::http::Request<B>,
|
5 7 | ) -> std::result::Result<
|
6 8 | crate::input::StartSnapshotInput,
|
7 9 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
|
8 10 | >
|
9 11 | where
|
10 12 | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
11 13 | B::Data: Send,
|
12 14 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
13 15 | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
14 16 | {
|
17 + | /* ServerHttpBoundProtocolGenerator.kt:399 */
|
15 18 | Ok({
|
19 + | /* RustType.kt:516 */
|
16 20 | #[allow(unused_mut)]
|
21 + | /* ServerHttpBoundProtocolGenerator.kt:723 */
|
17 22 | let mut input = crate::input::start_snapshot_input::Builder::default();
|
23 + | /* RustType.kt:516 */
|
18 24 | #[allow(unused_variables)]
|
25 + | /* ServerHttpBoundProtocolGenerator.kt:728 */
|
19 26 | let ::aws_smithy_runtime_api::http::RequestParts {
|
20 27 | uri, headers, body, ..
|
21 28 | } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
|
29 + | /* ServerHttpBoundProtocolGenerator.kt:745 */
|
22 30 | let bytes = ::hyper::body::to_bytes(body).await?;
|
31 + | /* ServerHttpBoundProtocolGenerator.kt:768 */
|
23 32 | if !bytes.is_empty() {
|
33 + | /* ServerHttpBoundProtocolGenerator.kt:769 */
|
24 34 | ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
|
25 35 | &headers,
|
26 36 | Some("application/json"),
|
27 37 | )?;
|
28 38 | input = crate::protocol_serde::shape_start_snapshot::de_start_snapshot(
|
29 39 | bytes.as_ref(),
|
30 40 | input,
|
31 41 | )?;
|
42 + | /* ServerHttpBoundProtocolGenerator.kt:768 */
|
32 43 | }
|
44 + | /* ServerHttpBoundProtocolGenerator.kt:834 */
|
33 45 | input.build()?
|
46 + | /* ServerHttpBoundProtocolGenerator.kt:399 */
|
34 47 | })
|
48 + | /* ServerHttpBoundProtocolGenerator.kt:383 */
|
35 49 | }
|
36 50 |
|
51 + | /* RustType.kt:516 */
|
37 52 | #[allow(clippy::unnecessary_wraps)]
|
53 + | /* ServerHttpBoundProtocolGenerator.kt:421 */
|
38 54 | pub fn ser_start_snapshot_http_response(
|
39 55 | #[allow(unused_variables)] output: crate::output::StartSnapshotOutput,
|
40 56 | ) -> std::result::Result<
|
41 57 | ::aws_smithy_http_server::response::Response,
|
42 58 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
|
43 59 | > {
|
60 + | /* ServerHttpBoundProtocolGenerator.kt:433 */
|
44 61 | Ok({
|
62 + | /* RustType.kt:516 */
|
45 63 | #[allow(unused_mut)]
|
64 + | /* ServerHttpBoundProtocolGenerator.kt:523 */
|
46 65 | let mut builder = ::http::Response::builder();
|
66 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
47 67 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
48 68 | builder,
|
49 69 | ::http::header::CONTENT_TYPE,
|
50 70 | "application/json",
|
51 71 | );
|
72 + | /* ServerHttpBoundProtocolGenerator.kt:682 */
|
52 73 | let http_status: u16 = 201;
|
53 74 | builder = builder.status(http_status);
|
75 + | /* ServerHttpBoundProtocolGenerator.kt:561 */
|
54 76 | let payload =
|
55 - | crate::protocol_serde::shape_start_snapshot_output::ser_start_snapshot_output_output_output(&output)?
|
56 - | ;
|
77 + | /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_start_snapshot_output::ser_start_snapshot_output_output_output(&output)?
|
78 + | /* ServerHttpBoundProtocolGenerator.kt:561 */;
|
79 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
57 80 | let content_length = payload.len();
|
58 81 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
59 82 | builder,
|
60 83 | ::http::header::CONTENT_LENGTH,
|
61 84 | content_length,
|
62 85 | );
|
86 + | /* ServerHttpBoundProtocolGenerator.kt:567 */
|
63 87 | let body = ::aws_smithy_http_server::body::to_boxed(payload);
|
88 + | /* ServerHttpBoundProtocolGenerator.kt:575 */
|
64 89 | builder.body(body)?
|
90 + | /* ServerHttpBoundProtocolGenerator.kt:433 */
|
65 91 | })
|
92 + | /* ServerHttpBoundProtocolGenerator.kt:421 */
|
66 93 | }
|
67 94 |
|
95 + | /* RustType.kt:516 */
|
68 96 | #[allow(clippy::unnecessary_wraps)]
|
97 + | /* ServerHttpBoundProtocolGenerator.kt:447 */
|
69 98 | pub fn ser_start_snapshot_http_error(
|
70 99 | error: &crate::error::StartSnapshotError,
|
71 100 | ) -> std::result::Result<
|
72 101 | ::aws_smithy_http_server::response::Response,
|
73 102 | ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
|
74 103 | > {
|
104 + | /* ServerHttpBoundProtocolGenerator.kt:452 */
|
75 105 | Ok({
|
106 + | /* ServerHttpBoundProtocolGenerator.kt:468 */
|
76 107 | match error {
|
108 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
77 109 | crate::error::StartSnapshotError::InternalServerException(output) => {
|
110 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
78 111 | let payload = crate::protocol_serde::shape_internal_server_exception::ser_internal_server_exception_error(output)?;
|
112 + | /* RustType.kt:516 */
|
79 113 | #[allow(unused_mut)]
|
114 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
80 115 | let mut builder = ::http::Response::builder();
|
116 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
81 117 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
82 118 | builder,
|
83 119 | ::http::header::CONTENT_TYPE,
|
84 120 | "application/json",
|
85 121 | );
|
122 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
86 123 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
87 124 | builder,
|
88 125 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
89 126 | "InternalServerException",
|
90 127 | );
|
128 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
91 129 | let content_length = payload.len();
|
92 130 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
93 131 | builder,
|
94 132 | ::http::header::CONTENT_LENGTH,
|
95 133 | content_length,
|
96 134 | );
|
135 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
97 136 | builder
|
98 137 | .status(500)
|
99 138 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
139 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
100 140 | }
|
141 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
101 142 | crate::error::StartSnapshotError::ResourceNotFoundException(output) => {
|
143 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
102 144 | let payload = crate::protocol_serde::shape_resource_not_found_exception::ser_resource_not_found_exception_error(output)?;
|
145 + | /* RustType.kt:516 */
|
103 146 | #[allow(unused_mut)]
|
147 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
104 148 | let mut builder = ::http::Response::builder();
|
149 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
105 150 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
106 151 | builder,
|
107 152 | ::http::header::CONTENT_TYPE,
|
108 153 | "application/json",
|
109 154 | );
|
155 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
110 156 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
111 157 | builder,
|
112 158 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
113 159 | "ResourceNotFoundException",
|
114 160 | );
|
161 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
115 162 | let content_length = payload.len();
|
116 163 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
117 164 | builder,
|
118 165 | ::http::header::CONTENT_LENGTH,
|
119 166 | content_length,
|
120 167 | );
|
168 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
121 169 | builder
|
122 170 | .status(404)
|
123 171 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
172 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
124 173 | }
|
174 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
125 175 | crate::error::StartSnapshotError::AccessDeniedException(output) => {
|
176 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
126 177 | let payload = crate::protocol_serde::shape_access_denied_exception::ser_access_denied_exception_error(output)?;
|
178 + | /* RustType.kt:516 */
|
127 179 | #[allow(unused_mut)]
|
180 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
128 181 | let mut builder = ::http::Response::builder();
|
182 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
129 183 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
130 184 | builder,
|
131 185 | ::http::header::CONTENT_TYPE,
|
132 186 | "application/json",
|
133 187 | );
|
188 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
134 189 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
135 190 | builder,
|
136 191 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
137 192 | "AccessDeniedException",
|
138 193 | );
|
194 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
139 195 | let content_length = payload.len();
|
140 196 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
141 197 | builder,
|
142 198 | ::http::header::CONTENT_LENGTH,
|
143 199 | content_length,
|
144 200 | );
|
201 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
145 202 | builder
|
146 203 | .status(403)
|
147 204 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
205 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
148 206 | }
|
207 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
149 208 | crate::error::StartSnapshotError::ConflictException(output) => {
|
209 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
150 210 | let payload =
|
151 211 | crate::protocol_serde::shape_conflict_exception::ser_conflict_exception_error(
|
152 212 | output,
|
153 213 | )?;
|
214 + | /* RustType.kt:516 */
|
154 215 | #[allow(unused_mut)]
|
216 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
155 217 | let mut builder = ::http::Response::builder();
|
218 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
156 219 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
157 220 | builder,
|
158 221 | ::http::header::CONTENT_TYPE,
|
159 222 | "application/json",
|
160 223 | );
|
224 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
161 225 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
162 226 | builder,
|
163 227 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
164 228 | "ConflictException",
|
165 229 | );
|
230 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
166 231 | let content_length = payload.len();
|
167 232 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
168 233 | builder,
|
169 234 | ::http::header::CONTENT_LENGTH,
|
170 235 | content_length,
|
171 236 | );
|
237 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
172 238 | builder
|
173 239 | .status(503)
|
174 240 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
241 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
175 242 | }
|
243 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
176 244 | crate::error::StartSnapshotError::RequestThrottledException(output) => {
|
245 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
177 246 | let payload = crate::protocol_serde::shape_request_throttled_exception::ser_request_throttled_exception_error(output)?;
|
247 + | /* RustType.kt:516 */
|
178 248 | #[allow(unused_mut)]
|
249 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
179 250 | let mut builder = ::http::Response::builder();
|
251 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
180 252 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
181 253 | builder,
|
182 254 | ::http::header::CONTENT_TYPE,
|
183 255 | "application/json",
|
184 256 | );
|
257 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
185 258 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
186 259 | builder,
|
187 260 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
188 261 | "RequestThrottledException",
|
189 262 | );
|
263 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
190 264 | let content_length = payload.len();
|
191 265 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
192 266 | builder,
|
193 267 | ::http::header::CONTENT_LENGTH,
|
194 268 | content_length,
|
195 269 | );
|
270 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
196 271 | builder
|
197 272 | .status(400)
|
198 273 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
274 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
199 275 | }
|
276 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
200 277 | crate::error::StartSnapshotError::ServiceQuotaExceededException(output) => {
|
278 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
201 279 | let payload = crate::protocol_serde::shape_service_quota_exceeded_exception::ser_service_quota_exceeded_exception_error(output)?;
|
280 + | /* RustType.kt:516 */
|
202 281 | #[allow(unused_mut)]
|
282 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
203 283 | let mut builder = ::http::Response::builder();
|
284 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
204 285 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
205 286 | builder,
|
206 287 | ::http::header::CONTENT_TYPE,
|
207 288 | "application/json",
|
208 289 | );
|
290 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
209 291 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
210 292 | builder,
|
211 293 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
212 294 | "ServiceQuotaExceededException",
|
213 295 | );
|
296 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
214 297 | let content_length = payload.len();
|
215 298 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
216 299 | builder,
|
217 300 | ::http::header::CONTENT_LENGTH,
|
218 301 | content_length,
|
219 302 | );
|
303 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
220 304 | builder
|
221 305 | .status(402)
|
222 306 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
307 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
223 308 | }
|
309 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
224 310 | crate::error::StartSnapshotError::ConcurrentLimitExceededException(output) => {
|
311 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
225 312 | let payload = crate::protocol_serde::shape_concurrent_limit_exceeded_exception::ser_concurrent_limit_exceeded_exception_error(output)?;
|
313 + | /* RustType.kt:516 */
|
226 314 | #[allow(unused_mut)]
|
315 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
227 316 | let mut builder = ::http::Response::builder();
|
317 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
228 318 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
229 319 | builder,
|
230 320 | ::http::header::CONTENT_TYPE,
|
231 321 | "application/json",
|
232 322 | );
|
323 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
233 324 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
234 325 | builder,
|
235 326 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
236 327 | "ConcurrentLimitExceededException",
|
237 328 | );
|
329 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
238 330 | let content_length = payload.len();
|
239 331 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
240 332 | builder,
|
241 333 | ::http::header::CONTENT_LENGTH,
|
242 334 | content_length,
|
243 335 | );
|
336 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
244 337 | builder
|
245 338 | .status(400)
|
246 339 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
340 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
247 341 | }
|
342 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
248 343 | crate::error::StartSnapshotError::ValidationException(output) => {
|
344 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
249 345 | let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
|
346 + | /* RustType.kt:516 */
|
250 347 | #[allow(unused_mut)]
|
348 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
251 349 | let mut builder = ::http::Response::builder();
|
350 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
252 351 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
253 352 | builder,
|
254 353 | ::http::header::CONTENT_TYPE,
|
255 354 | "application/json",
|
256 355 | );
|
356 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
257 357 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
258 358 | builder,
|
259 359 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
260 360 | "ValidationException",
|
261 361 | );
|
362 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
262 363 | let content_length = payload.len();
|
263 364 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
264 365 | builder,
|
265 366 | ::http::header::CONTENT_LENGTH,
|
266 367 | content_length,
|
267 368 | );
|
369 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
268 370 | builder
|
269 371 | .status(400)
|
270 372 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
271 - | }
|
373 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
374 + | } /* ServerHttpBoundProtocolGenerator.kt:468 */
|
272 375 | }
|
376 + | /* ServerHttpBoundProtocolGenerator.kt:452 */
|
273 377 | })
|
378 + | /* ServerHttpBoundProtocolGenerator.kt:447 */
|
274 379 | }
|
275 380 |
|
381 + | /* JsonParserGenerator.kt:148 */
|
276 382 | pub(crate) fn de_start_snapshot(
|
277 383 | value: &[u8],
|
278 384 | mut builder: crate::input::start_snapshot_input::Builder,
|
279 385 | ) -> ::std::result::Result<
|
280 386 | crate::input::start_snapshot_input::Builder,
|
281 387 | ::aws_smithy_json::deserialize::error::DeserializeError,
|
282 388 | > {
|
389 + | /* JsonParserGenerator.kt:153 */
|
283 390 | let mut tokens_owned =
|
284 391 | ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value))
|
285 392 | .peekable();
|
286 393 | let tokens = &mut tokens_owned;
|
287 394 | ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
|
395 + | /* JsonParserGenerator.kt:684 */
|
288 396 | loop {
|
397 + | /* JsonParserGenerator.kt:685 */
|
289 398 | match tokens.next().transpose()? {
|
399 + | /* JsonParserGenerator.kt:686 */
|
290 400 | Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
|
291 401 | Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
|
402 + | /* JsonParserGenerator.kt:260 */
|
292 403 | match key.to_unescaped()?.as_ref() {
|
404 + | /* JsonParserGenerator.kt:262 */
|
293 405 | "ClientToken" => {
|
406 + | /* JsonParserGenerator.kt:272 */
|
294 407 | builder = builder.set_client_token(
|
408 + | /* JsonParserGenerator.kt:354 */
|
295 409 | ::aws_smithy_json::deserialize::token::expect_string_or_null(
|
296 410 | tokens.next(),
|
297 411 | )?
|
298 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
299 - | .transpose()?,
|
412 + | .map(|s|
|
413 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
414 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
415 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
416 + | .transpose()?, /* JsonParserGenerator.kt:272 */
|
300 417 | );
|
418 + | /* JsonParserGenerator.kt:262 */
|
301 419 | }
|
420 + | /* JsonParserGenerator.kt:262 */
|
302 421 | "Description" => {
|
422 + | /* JsonParserGenerator.kt:272 */
|
303 423 | builder = builder.set_description(
|
424 + | /* JsonParserGenerator.kt:354 */
|
304 425 | ::aws_smithy_json::deserialize::token::expect_string_or_null(
|
305 426 | tokens.next(),
|
306 427 | )?
|
307 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
308 - | .transpose()?,
|
428 + | .map(|s|
|
429 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
430 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
431 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
432 + | .transpose()?, /* JsonParserGenerator.kt:272 */
|
309 433 | );
|
434 + | /* JsonParserGenerator.kt:262 */
|
310 435 | }
|
436 + | /* JsonParserGenerator.kt:262 */
|
311 437 | "Encrypted" => {
|
438 + | /* JsonParserGenerator.kt:272 */
|
312 439 | builder = builder.set_encrypted(
|
440 + | /* JsonParserGenerator.kt:298 */
|
313 441 | ::aws_smithy_json::deserialize::token::expect_bool_or_null(
|
314 442 | tokens.next(),
|
315 - | )?,
|
443 + | )?, /* JsonParserGenerator.kt:272 */
|
316 444 | );
|
445 + | /* JsonParserGenerator.kt:262 */
|
317 446 | }
|
447 + | /* JsonParserGenerator.kt:262 */
|
318 448 | "KmsKeyArn" => {
|
449 + | /* JsonParserGenerator.kt:272 */
|
319 450 | builder = builder.set_kms_key_arn(
|
451 + | /* JsonParserGenerator.kt:354 */
|
320 452 | ::aws_smithy_json::deserialize::token::expect_string_or_null(
|
321 453 | tokens.next(),
|
322 454 | )?
|
323 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
324 - | .transpose()?,
|
455 + | .map(|s|
|
456 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
457 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
458 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
459 + | .transpose()?, /* JsonParserGenerator.kt:272 */
|
325 460 | );
|
461 + | /* JsonParserGenerator.kt:262 */
|
326 462 | }
|
463 + | /* JsonParserGenerator.kt:262 */
|
327 464 | "ParentSnapshotId" => {
|
465 + | /* JsonParserGenerator.kt:272 */
|
328 466 | builder = builder.set_parent_snapshot_id(
|
467 + | /* JsonParserGenerator.kt:354 */
|
329 468 | ::aws_smithy_json::deserialize::token::expect_string_or_null(
|
330 469 | tokens.next(),
|
331 470 | )?
|
332 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
333 - | .transpose()?,
|
471 + | .map(|s|
|
472 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
473 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
474 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
475 + | .transpose()?, /* JsonParserGenerator.kt:272 */
|
334 476 | );
|
477 + | /* JsonParserGenerator.kt:262 */
|
335 478 | }
|
479 + | /* JsonParserGenerator.kt:262 */
|
336 480 | "Tags" => {
|
337 - | builder =
|
338 - | builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens)?);
|
481 + | /* JsonParserGenerator.kt:272 */
|
482 + | builder = builder.set_tags(
|
483 + | /* JsonParserGenerator.kt:451 */crate::protocol_serde::shape_tags::de_tags(tokens)?
|
484 + | /* JsonParserGenerator.kt:272 */);
|
485 + | /* JsonParserGenerator.kt:262 */
|
339 486 | }
|
487 + | /* JsonParserGenerator.kt:262 */
|
340 488 | "Timeout" => {
|
489 + | /* JsonParserGenerator.kt:272 */
|
341 490 | builder = builder.set_timeout(
|
491 + | /* JsonParserGenerator.kt:365 */
|
342 492 | ::aws_smithy_json::deserialize::token::expect_number_or_null(
|
343 493 | tokens.next(),
|
344 494 | )?
|
345 495 | .map(i32::try_from)
|
346 - | .transpose()?,
|
496 + | .transpose()?, /* JsonParserGenerator.kt:272 */
|
347 497 | );
|
498 + | /* JsonParserGenerator.kt:262 */
|
348 499 | }
|
500 + | /* JsonParserGenerator.kt:262 */
|
349 501 | "VolumeSize" => {
|
502 + | /* JsonParserGenerator.kt:276 */
|
350 503 | if let Some(v) =
|
504 + | /* JsonParserGenerator.kt:365 */
|
351 505 | ::aws_smithy_json::deserialize::token::expect_number_or_null(
|
352 - | tokens.next(),
|
353 - | )?
|
354 - | .map(i64::try_from)
|
355 - | .transpose()?
|
506 + | tokens.next(),
|
507 + | )?
|
508 + | .map(i64::try_from)
|
509 + | .transpose()?
|
510 + | /* JsonParserGenerator.kt:278 */
|
356 511 | {
|
357 512 | builder = builder.set_volume_size(v);
|
358 513 | }
|
514 + | /* JsonParserGenerator.kt:262 */
|
359 515 | }
|
360 - | _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
|
516 + | /* JsonParserGenerator.kt:290 */
|
517 + | _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
|
361 518 | }
|
519 + | /* JsonParserGenerator.kt:686 */
|
362 520 | }
|
521 + | /* JsonParserGenerator.kt:695 */
|
363 522 | other => {
|
364 523 | return Err(
|
365 524 | ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
|
366 525 | "expected object key or end object, found: {:?}",
|
367 526 | other
|
368 527 | )),
|
369 528 | )
|
370 - | }
|
529 + | } /* JsonParserGenerator.kt:685 */
|
371 530 | }
|
531 + | /* JsonParserGenerator.kt:684 */
|
372 532 | }
|
533 + | /* JsonParserGenerator.kt:250 */
|
373 534 | if tokens.next().is_some() {
|
535 + | /* JsonParserGenerator.kt:251 */
|
374 536 | return Err(
|
375 537 | ::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
376 538 | "found more JSON tokens after completing parsing",
|
377 539 | ),
|
378 540 | );
|
541 + | /* JsonParserGenerator.kt:250 */
|
379 542 | }
|
543 + | /* JsonParserGenerator.kt:163 */
|
380 544 | Ok(builder)
|
545 + | /* JsonParserGenerator.kt:148 */
|
381 546 | }
|