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_internal::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))?
|
373 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
271 374 | }
|
375 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
272 376 | crate::error::StartSnapshotError::InternalServerError(output) => {
|
377 + | /* ServerHttpBoundProtocolGenerator.kt:477 */
|
273 378 | let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
|
379 + | /* RustType.kt:516 */
|
274 380 | #[allow(unused_mut)]
|
381 + | /* ServerHttpBoundProtocolGenerator.kt:487 */
|
275 382 | let mut builder = ::http::Response::builder();
|
383 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
276 384 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
277 385 | builder,
|
278 386 | ::http::header::CONTENT_TYPE,
|
279 387 | "application/json",
|
280 388 | );
|
389 + | /* ServerHttpBoundProtocolGenerator.kt:597 */
|
281 390 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
282 391 | builder,
|
283 392 | ::http::header::HeaderName::from_static("x-amzn-errortype"),
|
284 393 | "InternalServerError",
|
285 394 | );
|
395 + | /* ServerHttpBoundProtocolGenerator.kt:663 */
|
286 396 | let content_length = payload.len();
|
287 397 | builder = ::aws_smithy_http::header::set_response_header_if_absent(
|
288 398 | builder,
|
289 399 | ::http::header::CONTENT_LENGTH,
|
290 400 | content_length,
|
291 401 | );
|
402 + | /* ServerHttpBoundProtocolGenerator.kt:504 */
|
292 403 | builder
|
293 404 | .status(500)
|
294 405 | .body(::aws_smithy_http_server::body::to_boxed(payload))?
|
295 - | }
|
406 + | /* ServerHttpBoundProtocolGenerator.kt:476 */
|
407 + | } /* ServerHttpBoundProtocolGenerator.kt:468 */
|
296 408 | }
|
409 + | /* ServerHttpBoundProtocolGenerator.kt:452 */
|
297 410 | })
|
411 + | /* ServerHttpBoundProtocolGenerator.kt:447 */
|
298 412 | }
|
299 413 |
|
414 + | /* JsonParserGenerator.kt:148 */
|
300 415 | pub(crate) fn de_start_snapshot(
|
301 416 | value: &[u8],
|
302 417 | mut builder: crate::input::start_snapshot_input_internal::Builder,
|
303 418 | ) -> ::std::result::Result<
|
304 419 | crate::input::start_snapshot_input_internal::Builder,
|
305 420 | ::aws_smithy_json::deserialize::error::DeserializeError,
|
306 421 | > {
|
422 + | /* JsonParserGenerator.kt:153 */
|
307 423 | let mut tokens_owned =
|
308 424 | ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value))
|
309 425 | .peekable();
|
310 426 | let tokens = &mut tokens_owned;
|
311 427 | ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
|
428 + | /* JsonParserGenerator.kt:684 */
|
312 429 | loop {
|
430 + | /* JsonParserGenerator.kt:685 */
|
313 431 | match tokens.next().transpose()? {
|
432 + | /* JsonParserGenerator.kt:686 */
|
314 433 | Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
|
315 434 | Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
|
435 + | /* JsonParserGenerator.kt:260 */
|
316 436 | match key.to_unescaped()?.as_ref() {
|
437 + | /* JsonParserGenerator.kt:262 */
|
317 438 | "ClientToken" => {
|
439 + | /* JsonParserGenerator.kt:272 */
|
318 440 | builder = builder.set_client_token(
|
441 + | /* JsonParserGenerator.kt:354 */
|
319 442 | ::aws_smithy_json::deserialize::token::expect_string_or_null(
|
320 443 | tokens.next(),
|
321 444 | )?
|
322 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
323 - | .transpose()?,
|
445 + | .map(|s|
|
446 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
447 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
448 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
449 + | .transpose()?, /* JsonParserGenerator.kt:272 */
|
324 450 | );
|
451 + | /* JsonParserGenerator.kt:262 */
|
325 452 | }
|
453 + | /* JsonParserGenerator.kt:262 */
|
326 454 | "Description" => {
|
455 + | /* JsonParserGenerator.kt:272 */
|
327 456 | builder = builder.set_description(
|
457 + | /* JsonParserGenerator.kt:354 */
|
328 458 | ::aws_smithy_json::deserialize::token::expect_string_or_null(
|
329 459 | tokens.next(),
|
330 460 | )?
|
331 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
332 - | .transpose()?,
|
461 + | .map(|s|
|
462 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
463 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
464 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
465 + | .transpose()?, /* JsonParserGenerator.kt:272 */
|
333 466 | );
|
467 + | /* JsonParserGenerator.kt:262 */
|
334 468 | }
|
469 + | /* JsonParserGenerator.kt:262 */
|
335 470 | "Encrypted" => {
|
471 + | /* JsonParserGenerator.kt:272 */
|
336 472 | builder = builder.set_encrypted(
|
473 + | /* JsonParserGenerator.kt:298 */
|
337 474 | ::aws_smithy_json::deserialize::token::expect_bool_or_null(
|
338 475 | tokens.next(),
|
339 - | )?,
|
476 + | )?, /* JsonParserGenerator.kt:272 */
|
340 477 | );
|
478 + | /* JsonParserGenerator.kt:262 */
|
341 479 | }
|
480 + | /* JsonParserGenerator.kt:262 */
|
342 481 | "KmsKeyArn" => {
|
482 + | /* JsonParserGenerator.kt:272 */
|
343 483 | builder = builder.set_kms_key_arn(
|
484 + | /* JsonParserGenerator.kt:354 */
|
344 485 | ::aws_smithy_json::deserialize::token::expect_string_or_null(
|
345 486 | tokens.next(),
|
346 487 | )?
|
347 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
348 - | .transpose()?,
|
488 + | .map(|s|
|
489 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
490 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
491 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
492 + | .transpose()?, /* JsonParserGenerator.kt:272 */
|
349 493 | );
|
494 + | /* JsonParserGenerator.kt:262 */
|
350 495 | }
|
496 + | /* JsonParserGenerator.kt:262 */
|
351 497 | "ParentSnapshotId" => {
|
498 + | /* JsonParserGenerator.kt:272 */
|
352 499 | builder = builder.set_parent_snapshot_id(
|
500 + | /* JsonParserGenerator.kt:354 */
|
353 501 | ::aws_smithy_json::deserialize::token::expect_string_or_null(
|
354 502 | tokens.next(),
|
355 503 | )?
|
356 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
357 - | .transpose()?,
|
504 + | .map(|s|
|
505 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
506 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
507 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
508 + | .transpose()?, /* JsonParserGenerator.kt:272 */
|
358 509 | );
|
510 + | /* JsonParserGenerator.kt:262 */
|
359 511 | }
|
512 + | /* JsonParserGenerator.kt:262 */
|
360 513 | "Tags" => {
|
361 - | builder =
|
362 - | builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens)?);
|
514 + | /* JsonParserGenerator.kt:272 */
|
515 + | builder = builder.set_tags(
|
516 + | /* JsonParserGenerator.kt:451 */crate::protocol_serde::shape_tags::de_tags(tokens)?
|
517 + | /* JsonParserGenerator.kt:272 */);
|
518 + | /* JsonParserGenerator.kt:262 */
|
363 519 | }
|
520 + | /* JsonParserGenerator.kt:262 */
|
364 521 | "Timeout" => {
|
522 + | /* JsonParserGenerator.kt:272 */
|
365 523 | builder = builder.set_timeout(
|
524 + | /* JsonParserGenerator.kt:365 */
|
366 525 | ::aws_smithy_json::deserialize::token::expect_number_or_null(
|
367 526 | tokens.next(),
|
368 527 | )?
|
369 528 | .map(i32::try_from)
|
370 - | .transpose()?,
|
529 + | .transpose()?, /* JsonParserGenerator.kt:272 */
|
371 530 | );
|
531 + | /* JsonParserGenerator.kt:262 */
|
372 532 | }
|
533 + | /* JsonParserGenerator.kt:262 */
|
373 534 | "VolumeSize" => {
|
535 + | /* JsonParserGenerator.kt:276 */
|
374 536 | if let Some(v) =
|
537 + | /* JsonParserGenerator.kt:365 */
|
375 538 | ::aws_smithy_json::deserialize::token::expect_number_or_null(
|
376 - | tokens.next(),
|
377 - | )?
|
378 - | .map(i64::try_from)
|
379 - | .transpose()?
|
539 + | tokens.next(),
|
540 + | )?
|
541 + | .map(i64::try_from)
|
542 + | .transpose()?
|
543 + | /* JsonParserGenerator.kt:278 */
|
380 544 | {
|
381 545 | builder = builder.set_volume_size(v);
|
382 546 | }
|
547 + | /* JsonParserGenerator.kt:262 */
|
383 548 | }
|
384 - | _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
|
549 + | /* JsonParserGenerator.kt:290 */
|
550 + | _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
|
385 551 | }
|
552 + | /* JsonParserGenerator.kt:686 */
|
386 553 | }
|
554 + | /* JsonParserGenerator.kt:695 */
|
387 555 | other => {
|
388 556 | return Err(
|
389 557 | ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
|
390 558 | "expected object key or end object, found: {:?}",
|
391 559 | other
|
392 560 | )),
|
393 561 | )
|
394 - | }
|
562 + | } /* JsonParserGenerator.kt:685 */
|
395 563 | }
|
564 + | /* JsonParserGenerator.kt:684 */
|
396 565 | }
|
566 + | /* JsonParserGenerator.kt:250 */
|
397 567 | if tokens.next().is_some() {
|
568 + | /* JsonParserGenerator.kt:251 */
|
398 569 | return Err(
|
399 570 | ::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
400 571 | "found more JSON tokens after completing parsing",
|
401 572 | ),
|
402 573 | );
|
574 + | /* JsonParserGenerator.kt:250 */
|
403 575 | }
|
576 + | /* JsonParserGenerator.kt:163 */
|
404 577 | Ok(builder)
|
578 + | /* JsonParserGenerator.kt:148 */
|
405 579 | }
|