Skip to main content

winterbaume_backup/
wire.rs

1//! Auto-generated wire helpers from Smithy models.
2//! Do not edit manually. Regenerate with:
3//!   smithy-codegen gen-serializers winterbaume-backup
4
5#![allow(
6    dead_code,
7    unused_variables,
8    clippy::let_and_return,
9    clippy::single_match
10)]
11
12#[allow(unused_imports)]
13use http::header::HeaderName;
14use winterbaume_core::MockResponse;
15
16pub use super::model::*;
17
18/// Serialize void response for restJson protocol.
19pub fn serialize_associate_backup_vault_mpa_approval_team_response() -> MockResponse {
20    MockResponse::rest_json(204, "{}")
21}
22
23/// Serialize response for restJson protocol.
24pub fn serialize_cancel_legal_hold_response(result: &CancelLegalHoldOutput) -> MockResponse {
25    let status = 201_u16;
26    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
27    MockResponse::rest_json(status, body)
28}
29
30/// Serialize response for restJson protocol.
31pub fn serialize_create_backup_plan_response(result: &CreateBackupPlanOutput) -> MockResponse {
32    let status = 200_u16;
33    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
34    MockResponse::rest_json(status, body)
35}
36
37/// Serialize response for restJson protocol.
38pub fn serialize_create_backup_selection_response(
39    result: &CreateBackupSelectionOutput,
40) -> MockResponse {
41    let status = 200_u16;
42    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
43    MockResponse::rest_json(status, body)
44}
45
46/// Serialize response for restJson protocol.
47pub fn serialize_create_backup_vault_response(result: &CreateBackupVaultOutput) -> MockResponse {
48    let status = 200_u16;
49    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
50    MockResponse::rest_json(status, body)
51}
52
53/// Serialize response for restJson protocol.
54pub fn serialize_create_framework_response(result: &CreateFrameworkOutput) -> MockResponse {
55    let status = 200_u16;
56    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
57    MockResponse::rest_json(status, body)
58}
59
60/// Serialize response for restJson protocol.
61pub fn serialize_create_legal_hold_response(result: &CreateLegalHoldOutput) -> MockResponse {
62    let status = 200_u16;
63    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
64    MockResponse::rest_json(status, body)
65}
66
67/// Serialize response for restJson protocol.
68pub fn serialize_create_logically_air_gapped_backup_vault_response(
69    result: &CreateLogicallyAirGappedBackupVaultOutput,
70) -> MockResponse {
71    let status = 200_u16;
72    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
73    MockResponse::rest_json(status, body)
74}
75
76/// Serialize response for restJson protocol.
77pub fn serialize_create_report_plan_response(result: &CreateReportPlanOutput) -> MockResponse {
78    let status = 200_u16;
79    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
80    MockResponse::rest_json(status, body)
81}
82
83/// Serialize response for restJson protocol.
84pub fn serialize_create_restore_access_backup_vault_response(
85    result: &CreateRestoreAccessBackupVaultOutput,
86) -> MockResponse {
87    let status = 200_u16;
88    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
89    MockResponse::rest_json(status, body)
90}
91
92/// Serialize response for restJson protocol.
93pub fn serialize_create_restore_testing_plan_response(
94    result: &CreateRestoreTestingPlanOutput,
95) -> MockResponse {
96    let status = 201_u16;
97    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
98    MockResponse::rest_json(status, body)
99}
100
101/// Serialize response for restJson protocol.
102pub fn serialize_create_restore_testing_selection_response(
103    result: &CreateRestoreTestingSelectionOutput,
104) -> MockResponse {
105    let status = 201_u16;
106    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
107    MockResponse::rest_json(status, body)
108}
109
110/// Serialize response for restJson protocol.
111pub fn serialize_create_tiering_configuration_response(
112    result: &CreateTieringConfigurationOutput,
113) -> MockResponse {
114    let status = 200_u16;
115    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
116    MockResponse::rest_json(status, body)
117}
118
119/// Serialize response for restJson protocol.
120pub fn serialize_delete_backup_plan_response(result: &DeleteBackupPlanOutput) -> MockResponse {
121    let status = 200_u16;
122    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
123    MockResponse::rest_json(status, body)
124}
125
126/// Serialize void response for restJson protocol.
127pub fn serialize_delete_backup_selection_response() -> MockResponse {
128    MockResponse::rest_json(200, "{}")
129}
130
131/// Serialize void response for restJson protocol.
132pub fn serialize_delete_backup_vault_response() -> MockResponse {
133    MockResponse::rest_json(200, "{}")
134}
135
136/// Serialize void response for restJson protocol.
137pub fn serialize_delete_backup_vault_access_policy_response() -> MockResponse {
138    MockResponse::rest_json(200, "{}")
139}
140
141/// Serialize void response for restJson protocol.
142pub fn serialize_delete_backup_vault_lock_configuration_response() -> MockResponse {
143    MockResponse::rest_json(200, "{}")
144}
145
146/// Serialize void response for restJson protocol.
147pub fn serialize_delete_backup_vault_notifications_response() -> MockResponse {
148    MockResponse::rest_json(200, "{}")
149}
150
151/// Serialize void response for restJson protocol.
152pub fn serialize_delete_framework_response() -> MockResponse {
153    MockResponse::rest_json(200, "{}")
154}
155
156/// Serialize void response for restJson protocol.
157pub fn serialize_delete_recovery_point_response() -> MockResponse {
158    MockResponse::rest_json(200, "{}")
159}
160
161/// Serialize void response for restJson protocol.
162pub fn serialize_delete_report_plan_response() -> MockResponse {
163    MockResponse::rest_json(200, "{}")
164}
165
166/// Serialize void response for restJson protocol.
167pub fn serialize_delete_restore_testing_plan_response() -> MockResponse {
168    MockResponse::rest_json(204, "{}")
169}
170
171/// Serialize void response for restJson protocol.
172pub fn serialize_delete_restore_testing_selection_response() -> MockResponse {
173    MockResponse::rest_json(204, "{}")
174}
175
176/// Serialize response for restJson protocol.
177pub fn serialize_delete_tiering_configuration_response(
178    result: &DeleteTieringConfigurationOutput,
179) -> MockResponse {
180    let status = 200_u16;
181    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
182    MockResponse::rest_json(status, body)
183}
184
185/// Serialize response for restJson protocol.
186pub fn serialize_describe_backup_job_response(result: &DescribeBackupJobOutput) -> MockResponse {
187    let status = 200_u16;
188    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
189    MockResponse::rest_json(status, body)
190}
191
192/// Serialize response for restJson protocol.
193pub fn serialize_describe_backup_vault_response(
194    result: &DescribeBackupVaultOutput,
195) -> MockResponse {
196    let status = 200_u16;
197    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
198    MockResponse::rest_json(status, body)
199}
200
201/// Serialize response for restJson protocol.
202pub fn serialize_describe_copy_job_response(result: &DescribeCopyJobOutput) -> MockResponse {
203    let status = 200_u16;
204    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
205    MockResponse::rest_json(status, body)
206}
207
208/// Serialize response for restJson protocol.
209pub fn serialize_describe_framework_response(result: &DescribeFrameworkOutput) -> MockResponse {
210    let status = 200_u16;
211    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
212    MockResponse::rest_json(status, body)
213}
214
215/// Serialize response for restJson protocol.
216pub fn serialize_describe_global_settings_response(
217    result: &DescribeGlobalSettingsOutput,
218) -> MockResponse {
219    let status = 200_u16;
220    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
221    MockResponse::rest_json(status, body)
222}
223
224/// Serialize response for restJson protocol.
225pub fn serialize_describe_protected_resource_response(
226    result: &DescribeProtectedResourceOutput,
227) -> MockResponse {
228    let status = 200_u16;
229    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
230    MockResponse::rest_json(status, body)
231}
232
233/// Serialize response for restJson protocol.
234pub fn serialize_describe_recovery_point_response(
235    result: &DescribeRecoveryPointOutput,
236) -> MockResponse {
237    let status = 200_u16;
238    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
239    MockResponse::rest_json(status, body)
240}
241
242/// Serialize response for restJson protocol.
243pub fn serialize_describe_region_settings_response(
244    result: &DescribeRegionSettingsOutput,
245) -> MockResponse {
246    let status = 200_u16;
247    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
248    MockResponse::rest_json(status, body)
249}
250
251/// Serialize response for restJson protocol.
252pub fn serialize_describe_report_job_response(result: &DescribeReportJobOutput) -> MockResponse {
253    let status = 200_u16;
254    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
255    MockResponse::rest_json(status, body)
256}
257
258/// Serialize response for restJson protocol.
259pub fn serialize_describe_report_plan_response(result: &DescribeReportPlanOutput) -> MockResponse {
260    let status = 200_u16;
261    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
262    MockResponse::rest_json(status, body)
263}
264
265/// Serialize response for restJson protocol.
266pub fn serialize_describe_restore_job_response(result: &DescribeRestoreJobOutput) -> MockResponse {
267    let status = 200_u16;
268    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
269    MockResponse::rest_json(status, body)
270}
271
272/// Serialize response for restJson protocol.
273pub fn serialize_describe_scan_job_response(result: &DescribeScanJobOutput) -> MockResponse {
274    let status = 200_u16;
275    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
276    MockResponse::rest_json(status, body)
277}
278
279/// Serialize void response for restJson protocol.
280pub fn serialize_disassociate_backup_vault_mpa_approval_team_response() -> MockResponse {
281    MockResponse::rest_json(204, "{}")
282}
283
284/// Serialize void response for restJson protocol.
285pub fn serialize_disassociate_recovery_point_response() -> MockResponse {
286    MockResponse::rest_json(200, "{}")
287}
288
289/// Serialize void response for restJson protocol.
290pub fn serialize_disassociate_recovery_point_from_parent_response() -> MockResponse {
291    MockResponse::rest_json(204, "{}")
292}
293
294/// Serialize response for restJson protocol.
295pub fn serialize_export_backup_plan_template_response(
296    result: &ExportBackupPlanTemplateOutput,
297) -> MockResponse {
298    let status = 200_u16;
299    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
300    MockResponse::rest_json(status, body)
301}
302
303/// Serialize response for restJson protocol.
304pub fn serialize_get_backup_plan_response(result: &GetBackupPlanOutput) -> MockResponse {
305    let status = 200_u16;
306    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
307    MockResponse::rest_json(status, body)
308}
309
310/// Serialize response for restJson protocol.
311pub fn serialize_get_backup_plan_from_j_s_o_n_response(
312    result: &GetBackupPlanFromJSONOutput,
313) -> MockResponse {
314    let status = 200_u16;
315    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
316    MockResponse::rest_json(status, body)
317}
318
319/// Serialize response for restJson protocol.
320pub fn serialize_get_backup_plan_from_template_response(
321    result: &GetBackupPlanFromTemplateOutput,
322) -> MockResponse {
323    let status = 200_u16;
324    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
325    MockResponse::rest_json(status, body)
326}
327
328/// Serialize response for restJson protocol.
329pub fn serialize_get_backup_selection_response(result: &GetBackupSelectionOutput) -> MockResponse {
330    let status = 200_u16;
331    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
332    MockResponse::rest_json(status, body)
333}
334
335/// Serialize response for restJson protocol.
336pub fn serialize_get_backup_vault_access_policy_response(
337    result: &GetBackupVaultAccessPolicyOutput,
338) -> MockResponse {
339    let status = 200_u16;
340    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
341    MockResponse::rest_json(status, body)
342}
343
344/// Serialize response for restJson protocol.
345pub fn serialize_get_backup_vault_notifications_response(
346    result: &GetBackupVaultNotificationsOutput,
347) -> MockResponse {
348    let status = 200_u16;
349    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
350    MockResponse::rest_json(status, body)
351}
352
353/// Serialize response for restJson protocol.
354pub fn serialize_get_legal_hold_response(result: &GetLegalHoldOutput) -> MockResponse {
355    let status = 200_u16;
356    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
357    MockResponse::rest_json(status, body)
358}
359
360/// Serialize response for restJson protocol.
361pub fn serialize_get_recovery_point_index_details_response(
362    result: &GetRecoveryPointIndexDetailsOutput,
363) -> MockResponse {
364    let status = 200_u16;
365    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
366    MockResponse::rest_json(status, body)
367}
368
369/// Serialize response for restJson protocol.
370pub fn serialize_get_recovery_point_restore_metadata_response(
371    result: &GetRecoveryPointRestoreMetadataOutput,
372) -> MockResponse {
373    let status = 200_u16;
374    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
375    MockResponse::rest_json(status, body)
376}
377
378/// Serialize response for restJson protocol.
379pub fn serialize_get_restore_job_metadata_response(
380    result: &GetRestoreJobMetadataOutput,
381) -> MockResponse {
382    let status = 200_u16;
383    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
384    MockResponse::rest_json(status, body)
385}
386
387/// Serialize response for restJson protocol.
388pub fn serialize_get_restore_testing_inferred_metadata_response(
389    result: &GetRestoreTestingInferredMetadataOutput,
390) -> MockResponse {
391    let status = 200_u16;
392    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
393    MockResponse::rest_json(status, body)
394}
395
396/// Serialize response for restJson protocol.
397pub fn serialize_get_restore_testing_plan_response(
398    result: &GetRestoreTestingPlanOutput,
399) -> MockResponse {
400    let status = 200_u16;
401    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
402    MockResponse::rest_json(status, body)
403}
404
405/// Serialize response for restJson protocol.
406pub fn serialize_get_restore_testing_selection_response(
407    result: &GetRestoreTestingSelectionOutput,
408) -> MockResponse {
409    let status = 200_u16;
410    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
411    MockResponse::rest_json(status, body)
412}
413
414/// Serialize response for restJson protocol.
415pub fn serialize_get_supported_resource_types_response(
416    result: &GetSupportedResourceTypesOutput,
417) -> MockResponse {
418    let status = 200_u16;
419    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
420    MockResponse::rest_json(status, body)
421}
422
423/// Serialize response for restJson protocol.
424pub fn serialize_get_tiering_configuration_response(
425    result: &GetTieringConfigurationOutput,
426) -> MockResponse {
427    let status = 200_u16;
428    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
429    MockResponse::rest_json(status, body)
430}
431
432/// Serialize response for restJson protocol.
433pub fn serialize_list_backup_job_summaries_response(
434    result: &ListBackupJobSummariesOutput,
435) -> MockResponse {
436    let status = 200_u16;
437    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
438    MockResponse::rest_json(status, body)
439}
440
441/// Serialize response for restJson protocol.
442pub fn serialize_list_backup_jobs_response(result: &ListBackupJobsOutput) -> MockResponse {
443    let status = 200_u16;
444    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
445    MockResponse::rest_json(status, body)
446}
447
448/// Serialize response for restJson protocol.
449pub fn serialize_list_backup_plan_templates_response(
450    result: &ListBackupPlanTemplatesOutput,
451) -> MockResponse {
452    let status = 200_u16;
453    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
454    MockResponse::rest_json(status, body)
455}
456
457/// Serialize response for restJson protocol.
458pub fn serialize_list_backup_plan_versions_response(
459    result: &ListBackupPlanVersionsOutput,
460) -> MockResponse {
461    let status = 200_u16;
462    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
463    MockResponse::rest_json(status, body)
464}
465
466/// Serialize response for restJson protocol.
467pub fn serialize_list_backup_plans_response(result: &ListBackupPlansOutput) -> MockResponse {
468    let status = 200_u16;
469    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
470    MockResponse::rest_json(status, body)
471}
472
473/// Serialize response for restJson protocol.
474pub fn serialize_list_backup_selections_response(
475    result: &ListBackupSelectionsOutput,
476) -> MockResponse {
477    let status = 200_u16;
478    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
479    MockResponse::rest_json(status, body)
480}
481
482/// Serialize response for restJson protocol.
483pub fn serialize_list_backup_vaults_response(result: &ListBackupVaultsOutput) -> MockResponse {
484    let status = 200_u16;
485    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
486    MockResponse::rest_json(status, body)
487}
488
489/// Serialize response for restJson protocol.
490pub fn serialize_list_copy_job_summaries_response(
491    result: &ListCopyJobSummariesOutput,
492) -> MockResponse {
493    let status = 200_u16;
494    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
495    MockResponse::rest_json(status, body)
496}
497
498/// Serialize response for restJson protocol.
499pub fn serialize_list_copy_jobs_response(result: &ListCopyJobsOutput) -> MockResponse {
500    let status = 200_u16;
501    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
502    MockResponse::rest_json(status, body)
503}
504
505/// Serialize response for restJson protocol.
506pub fn serialize_list_frameworks_response(result: &ListFrameworksOutput) -> MockResponse {
507    let status = 200_u16;
508    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
509    MockResponse::rest_json(status, body)
510}
511
512/// Serialize response for restJson protocol.
513pub fn serialize_list_indexed_recovery_points_response(
514    result: &ListIndexedRecoveryPointsOutput,
515) -> MockResponse {
516    let status = 200_u16;
517    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
518    MockResponse::rest_json(status, body)
519}
520
521/// Serialize response for restJson protocol.
522pub fn serialize_list_legal_holds_response(result: &ListLegalHoldsOutput) -> MockResponse {
523    let status = 200_u16;
524    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
525    MockResponse::rest_json(status, body)
526}
527
528/// Serialize response for restJson protocol.
529pub fn serialize_list_protected_resources_response(
530    result: &ListProtectedResourcesOutput,
531) -> MockResponse {
532    let status = 200_u16;
533    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
534    MockResponse::rest_json(status, body)
535}
536
537/// Serialize response for restJson protocol.
538pub fn serialize_list_protected_resources_by_backup_vault_response(
539    result: &ListProtectedResourcesByBackupVaultOutput,
540) -> MockResponse {
541    let status = 200_u16;
542    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
543    MockResponse::rest_json(status, body)
544}
545
546/// Serialize response for restJson protocol.
547pub fn serialize_list_recovery_points_by_backup_vault_response(
548    result: &ListRecoveryPointsByBackupVaultOutput,
549) -> MockResponse {
550    let status = 200_u16;
551    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
552    MockResponse::rest_json(status, body)
553}
554
555/// Serialize response for restJson protocol.
556pub fn serialize_list_recovery_points_by_legal_hold_response(
557    result: &ListRecoveryPointsByLegalHoldOutput,
558) -> MockResponse {
559    let status = 200_u16;
560    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
561    MockResponse::rest_json(status, body)
562}
563
564/// Serialize response for restJson protocol.
565pub fn serialize_list_recovery_points_by_resource_response(
566    result: &ListRecoveryPointsByResourceOutput,
567) -> MockResponse {
568    let status = 200_u16;
569    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
570    MockResponse::rest_json(status, body)
571}
572
573/// Serialize response for restJson protocol.
574pub fn serialize_list_report_jobs_response(result: &ListReportJobsOutput) -> MockResponse {
575    let status = 200_u16;
576    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
577    MockResponse::rest_json(status, body)
578}
579
580/// Serialize response for restJson protocol.
581pub fn serialize_list_report_plans_response(result: &ListReportPlansOutput) -> MockResponse {
582    let status = 200_u16;
583    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
584    MockResponse::rest_json(status, body)
585}
586
587/// Serialize response for restJson protocol.
588pub fn serialize_list_restore_access_backup_vaults_response(
589    result: &ListRestoreAccessBackupVaultsOutput,
590) -> MockResponse {
591    let status = 200_u16;
592    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
593    MockResponse::rest_json(status, body)
594}
595
596/// Serialize response for restJson protocol.
597pub fn serialize_list_restore_job_summaries_response(
598    result: &ListRestoreJobSummariesOutput,
599) -> MockResponse {
600    let status = 200_u16;
601    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
602    MockResponse::rest_json(status, body)
603}
604
605/// Serialize response for restJson protocol.
606pub fn serialize_list_restore_jobs_response(result: &ListRestoreJobsOutput) -> MockResponse {
607    let status = 200_u16;
608    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
609    MockResponse::rest_json(status, body)
610}
611
612/// Serialize response for restJson protocol.
613pub fn serialize_list_restore_jobs_by_protected_resource_response(
614    result: &ListRestoreJobsByProtectedResourceOutput,
615) -> MockResponse {
616    let status = 200_u16;
617    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
618    MockResponse::rest_json(status, body)
619}
620
621/// Serialize response for restJson protocol.
622pub fn serialize_list_restore_testing_plans_response(
623    result: &ListRestoreTestingPlansOutput,
624) -> MockResponse {
625    let status = 200_u16;
626    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
627    MockResponse::rest_json(status, body)
628}
629
630/// Serialize response for restJson protocol.
631pub fn serialize_list_restore_testing_selections_response(
632    result: &ListRestoreTestingSelectionsOutput,
633) -> MockResponse {
634    let status = 200_u16;
635    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
636    MockResponse::rest_json(status, body)
637}
638
639/// Serialize response for restJson protocol.
640pub fn serialize_list_scan_job_summaries_response(
641    result: &ListScanJobSummariesOutput,
642) -> MockResponse {
643    let status = 200_u16;
644    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
645    MockResponse::rest_json(status, body)
646}
647
648/// Serialize response for restJson protocol.
649pub fn serialize_list_scan_jobs_response(result: &ListScanJobsOutput) -> MockResponse {
650    let status = 200_u16;
651    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
652    MockResponse::rest_json(status, body)
653}
654
655/// Serialize response for restJson protocol.
656pub fn serialize_list_tags_response(result: &ListTagsOutput) -> MockResponse {
657    let status = 200_u16;
658    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
659    MockResponse::rest_json(status, body)
660}
661
662/// Serialize response for restJson protocol.
663pub fn serialize_list_tiering_configurations_response(
664    result: &ListTieringConfigurationsOutput,
665) -> MockResponse {
666    let status = 200_u16;
667    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
668    MockResponse::rest_json(status, body)
669}
670
671/// Serialize void response for restJson protocol.
672pub fn serialize_put_backup_vault_access_policy_response() -> MockResponse {
673    MockResponse::rest_json(200, "{}")
674}
675
676/// Serialize void response for restJson protocol.
677pub fn serialize_put_backup_vault_lock_configuration_response() -> MockResponse {
678    MockResponse::rest_json(200, "{}")
679}
680
681/// Serialize void response for restJson protocol.
682pub fn serialize_put_backup_vault_notifications_response() -> MockResponse {
683    MockResponse::rest_json(200, "{}")
684}
685
686/// Serialize void response for restJson protocol.
687pub fn serialize_put_restore_validation_result_response() -> MockResponse {
688    MockResponse::rest_json(204, "{}")
689}
690
691/// Serialize void response for restJson protocol.
692pub fn serialize_revoke_restore_access_backup_vault_response() -> MockResponse {
693    MockResponse::rest_json(200, "{}")
694}
695
696/// Serialize response for restJson protocol.
697pub fn serialize_start_backup_job_response(result: &StartBackupJobOutput) -> MockResponse {
698    let status = 200_u16;
699    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
700    MockResponse::rest_json(status, body)
701}
702
703/// Serialize response for restJson protocol.
704pub fn serialize_start_copy_job_response(result: &StartCopyJobOutput) -> MockResponse {
705    let status = 200_u16;
706    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
707    MockResponse::rest_json(status, body)
708}
709
710/// Serialize response for restJson protocol.
711pub fn serialize_start_report_job_response(result: &StartReportJobOutput) -> MockResponse {
712    let status = 200_u16;
713    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
714    MockResponse::rest_json(status, body)
715}
716
717/// Serialize response for restJson protocol.
718pub fn serialize_start_restore_job_response(result: &StartRestoreJobOutput) -> MockResponse {
719    let status = 200_u16;
720    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
721    MockResponse::rest_json(status, body)
722}
723
724/// Serialize response for restJson protocol.
725pub fn serialize_start_scan_job_response(result: &StartScanJobOutput) -> MockResponse {
726    let status = 201_u16;
727    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
728    MockResponse::rest_json(status, body)
729}
730
731/// Serialize void response for restJson protocol.
732pub fn serialize_stop_backup_job_response() -> MockResponse {
733    MockResponse::rest_json(200, "{}")
734}
735
736/// Serialize void response for restJson protocol.
737pub fn serialize_tag_resource_response() -> MockResponse {
738    MockResponse::rest_json(200, "{}")
739}
740
741/// Serialize void response for restJson protocol.
742pub fn serialize_untag_resource_response() -> MockResponse {
743    MockResponse::rest_json(200, "{}")
744}
745
746/// Serialize response for restJson protocol.
747pub fn serialize_update_backup_plan_response(result: &UpdateBackupPlanOutput) -> MockResponse {
748    let status = 200_u16;
749    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
750    MockResponse::rest_json(status, body)
751}
752
753/// Serialize response for restJson protocol.
754pub fn serialize_update_framework_response(result: &UpdateFrameworkOutput) -> MockResponse {
755    let status = 200_u16;
756    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
757    MockResponse::rest_json(status, body)
758}
759
760/// Serialize void response for restJson protocol.
761pub fn serialize_update_global_settings_response() -> MockResponse {
762    MockResponse::rest_json(200, "{}")
763}
764
765/// Serialize response for restJson protocol.
766pub fn serialize_update_recovery_point_index_settings_response(
767    result: &UpdateRecoveryPointIndexSettingsOutput,
768) -> MockResponse {
769    let status = 200_u16;
770    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
771    MockResponse::rest_json(status, body)
772}
773
774/// Serialize response for restJson protocol.
775pub fn serialize_update_recovery_point_lifecycle_response(
776    result: &UpdateRecoveryPointLifecycleOutput,
777) -> MockResponse {
778    let status = 200_u16;
779    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
780    MockResponse::rest_json(status, body)
781}
782
783/// Serialize void response for restJson protocol.
784pub fn serialize_update_region_settings_response() -> MockResponse {
785    MockResponse::rest_json(200, "{}")
786}
787
788/// Serialize response for restJson protocol.
789pub fn serialize_update_report_plan_response(result: &UpdateReportPlanOutput) -> MockResponse {
790    let status = 200_u16;
791    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
792    MockResponse::rest_json(status, body)
793}
794
795/// Serialize response for restJson protocol.
796pub fn serialize_update_restore_testing_plan_response(
797    result: &UpdateRestoreTestingPlanOutput,
798) -> MockResponse {
799    let status = 200_u16;
800    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
801    MockResponse::rest_json(status, body)
802}
803
804/// Serialize response for restJson protocol.
805pub fn serialize_update_restore_testing_selection_response(
806    result: &UpdateRestoreTestingSelectionOutput,
807) -> MockResponse {
808    let status = 200_u16;
809    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
810    MockResponse::rest_json(status, body)
811}
812
813/// Serialize response for restJson protocol.
814pub fn serialize_update_tiering_configuration_response(
815    result: &UpdateTieringConfigurationOutput,
816) -> MockResponse {
817    let status = 200_u16;
818    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
819    MockResponse::rest_json(status, body)
820}
821
822/// Deserialize request for restJson protocol.
823pub fn deserialize_associate_backup_vault_mpa_approval_team_request(
824    request: &winterbaume_core::MockRequest,
825    labels: &[(&str, &str)],
826    query: &std::collections::HashMap<String, String>,
827) -> Result<AssociateBackupVaultMpaApprovalTeamInput, String> {
828    let mut input = AssociateBackupVaultMpaApprovalTeamInput::default();
829    if !request.body.is_empty() {
830        input = serde_json::from_slice::<AssociateBackupVaultMpaApprovalTeamInput>(&request.body)
831            .map_err(|err| {
832            format!("failed to deserialize AssociateBackupVaultMpaApprovalTeam request: {err}")
833        })?;
834    }
835    for (name, value) in labels {
836        match *name {
837            "BackupVaultName" => {
838                input.backup_vault_name = value.to_string();
839            }
840            _ => {}
841        }
842    }
843    Ok(input)
844}
845
846/// Deserialize request for restJson protocol.
847pub fn deserialize_cancel_legal_hold_request(
848    request: &winterbaume_core::MockRequest,
849    labels: &[(&str, &str)],
850    query: &std::collections::HashMap<String, String>,
851) -> Result<CancelLegalHoldInput, String> {
852    let mut input = CancelLegalHoldInput::default();
853    for (name, value) in labels {
854        match *name {
855            "LegalHoldId" => {
856                input.legal_hold_id = value.to_string();
857            }
858            _ => {}
859        }
860    }
861    if let Some(value) = query.get("cancelDescription") {
862        input.cancel_description = value.to_string();
863    }
864    if let Some(value) = query.get("retainRecordInDays") {
865        input.retain_record_in_days = Some(
866            value
867                .parse::<i64>()
868                .map_err(|err| format!("failed to parse long: {err}"))?,
869        );
870    }
871    Ok(input)
872}
873
874/// Deserialize request for restJson protocol.
875pub fn deserialize_create_backup_plan_request(
876    request: &winterbaume_core::MockRequest,
877    labels: &[(&str, &str)],
878    query: &std::collections::HashMap<String, String>,
879) -> Result<CreateBackupPlanInput, String> {
880    let mut input = CreateBackupPlanInput::default();
881    if !request.body.is_empty() {
882        input = serde_json::from_slice::<CreateBackupPlanInput>(&request.body)
883            .map_err(|err| format!("failed to deserialize CreateBackupPlan request: {err}"))?;
884    }
885    Ok(input)
886}
887
888/// Deserialize request for restJson protocol.
889pub fn deserialize_create_backup_selection_request(
890    request: &winterbaume_core::MockRequest,
891    labels: &[(&str, &str)],
892    query: &std::collections::HashMap<String, String>,
893) -> Result<CreateBackupSelectionInput, String> {
894    let mut input = CreateBackupSelectionInput::default();
895    if !request.body.is_empty() {
896        input = serde_json::from_slice::<CreateBackupSelectionInput>(&request.body)
897            .map_err(|err| format!("failed to deserialize CreateBackupSelection request: {err}"))?;
898    }
899    for (name, value) in labels {
900        match *name {
901            "BackupPlanId" => {
902                input.backup_plan_id = value.to_string();
903            }
904            _ => {}
905        }
906    }
907    Ok(input)
908}
909
910/// Deserialize request for restJson protocol.
911pub fn deserialize_create_backup_vault_request(
912    request: &winterbaume_core::MockRequest,
913    labels: &[(&str, &str)],
914    query: &std::collections::HashMap<String, String>,
915) -> Result<CreateBackupVaultInput, String> {
916    let mut input = CreateBackupVaultInput::default();
917    if !request.body.is_empty() {
918        input = serde_json::from_slice::<CreateBackupVaultInput>(&request.body)
919            .map_err(|err| format!("failed to deserialize CreateBackupVault request: {err}"))?;
920    }
921    for (name, value) in labels {
922        match *name {
923            "BackupVaultName" => {
924                input.backup_vault_name = value.to_string();
925            }
926            _ => {}
927        }
928    }
929    Ok(input)
930}
931
932/// Deserialize request for restJson protocol.
933pub fn deserialize_create_framework_request(
934    request: &winterbaume_core::MockRequest,
935    labels: &[(&str, &str)],
936    query: &std::collections::HashMap<String, String>,
937) -> Result<CreateFrameworkInput, String> {
938    let mut input = CreateFrameworkInput::default();
939    if !request.body.is_empty() {
940        input = serde_json::from_slice::<CreateFrameworkInput>(&request.body)
941            .map_err(|err| format!("failed to deserialize CreateFramework request: {err}"))?;
942    }
943    Ok(input)
944}
945
946/// Deserialize request for restJson protocol.
947pub fn deserialize_create_legal_hold_request(
948    request: &winterbaume_core::MockRequest,
949    labels: &[(&str, &str)],
950    query: &std::collections::HashMap<String, String>,
951) -> Result<CreateLegalHoldInput, String> {
952    let mut input = CreateLegalHoldInput::default();
953    if !request.body.is_empty() {
954        input = serde_json::from_slice::<CreateLegalHoldInput>(&request.body)
955            .map_err(|err| format!("failed to deserialize CreateLegalHold request: {err}"))?;
956    }
957    Ok(input)
958}
959
960/// Deserialize request for restJson protocol.
961pub fn deserialize_create_logically_air_gapped_backup_vault_request(
962    request: &winterbaume_core::MockRequest,
963    labels: &[(&str, &str)],
964    query: &std::collections::HashMap<String, String>,
965) -> Result<CreateLogicallyAirGappedBackupVaultInput, String> {
966    let mut input = CreateLogicallyAirGappedBackupVaultInput::default();
967    if !request.body.is_empty() {
968        input = serde_json::from_slice::<CreateLogicallyAirGappedBackupVaultInput>(&request.body)
969            .map_err(|err| {
970            format!("failed to deserialize CreateLogicallyAirGappedBackupVault request: {err}")
971        })?;
972    }
973    for (name, value) in labels {
974        match *name {
975            "BackupVaultName" => {
976                input.backup_vault_name = value.to_string();
977            }
978            _ => {}
979        }
980    }
981    Ok(input)
982}
983
984/// Deserialize request for restJson protocol.
985pub fn deserialize_create_report_plan_request(
986    request: &winterbaume_core::MockRequest,
987    labels: &[(&str, &str)],
988    query: &std::collections::HashMap<String, String>,
989) -> Result<CreateReportPlanInput, String> {
990    let mut input = CreateReportPlanInput::default();
991    if !request.body.is_empty() {
992        input = serde_json::from_slice::<CreateReportPlanInput>(&request.body)
993            .map_err(|err| format!("failed to deserialize CreateReportPlan request: {err}"))?;
994    }
995    Ok(input)
996}
997
998/// Deserialize request for restJson protocol.
999pub fn deserialize_create_restore_access_backup_vault_request(
1000    request: &winterbaume_core::MockRequest,
1001    labels: &[(&str, &str)],
1002    query: &std::collections::HashMap<String, String>,
1003) -> Result<CreateRestoreAccessBackupVaultInput, String> {
1004    let mut input = CreateRestoreAccessBackupVaultInput::default();
1005    if !request.body.is_empty() {
1006        input = serde_json::from_slice::<CreateRestoreAccessBackupVaultInput>(&request.body)
1007            .map_err(|err| {
1008                format!("failed to deserialize CreateRestoreAccessBackupVault request: {err}")
1009            })?;
1010    }
1011    Ok(input)
1012}
1013
1014/// Deserialize request for restJson protocol.
1015pub fn deserialize_create_restore_testing_plan_request(
1016    request: &winterbaume_core::MockRequest,
1017    labels: &[(&str, &str)],
1018    query: &std::collections::HashMap<String, String>,
1019) -> Result<CreateRestoreTestingPlanInput, String> {
1020    let mut input = CreateRestoreTestingPlanInput::default();
1021    if !request.body.is_empty() {
1022        input = serde_json::from_slice::<CreateRestoreTestingPlanInput>(&request.body).map_err(
1023            |err| format!("failed to deserialize CreateRestoreTestingPlan request: {err}"),
1024        )?;
1025    }
1026    Ok(input)
1027}
1028
1029/// Deserialize request for restJson protocol.
1030pub fn deserialize_create_restore_testing_selection_request(
1031    request: &winterbaume_core::MockRequest,
1032    labels: &[(&str, &str)],
1033    query: &std::collections::HashMap<String, String>,
1034) -> Result<CreateRestoreTestingSelectionInput, String> {
1035    let mut input = CreateRestoreTestingSelectionInput::default();
1036    if !request.body.is_empty() {
1037        input = serde_json::from_slice::<CreateRestoreTestingSelectionInput>(&request.body)
1038            .map_err(|err| {
1039                format!("failed to deserialize CreateRestoreTestingSelection request: {err}")
1040            })?;
1041    }
1042    for (name, value) in labels {
1043        match *name {
1044            "RestoreTestingPlanName" => {
1045                input.restore_testing_plan_name = value.to_string();
1046            }
1047            _ => {}
1048        }
1049    }
1050    Ok(input)
1051}
1052
1053/// Deserialize request for restJson protocol.
1054pub fn deserialize_create_tiering_configuration_request(
1055    request: &winterbaume_core::MockRequest,
1056    labels: &[(&str, &str)],
1057    query: &std::collections::HashMap<String, String>,
1058) -> Result<CreateTieringConfigurationInput, String> {
1059    let mut input = CreateTieringConfigurationInput::default();
1060    if !request.body.is_empty() {
1061        input = serde_json::from_slice::<CreateTieringConfigurationInput>(&request.body).map_err(
1062            |err| format!("failed to deserialize CreateTieringConfiguration request: {err}"),
1063        )?;
1064    }
1065    Ok(input)
1066}
1067
1068/// Deserialize request for restJson protocol.
1069pub fn deserialize_delete_backup_plan_request(
1070    request: &winterbaume_core::MockRequest,
1071    labels: &[(&str, &str)],
1072    query: &std::collections::HashMap<String, String>,
1073) -> Result<DeleteBackupPlanInput, String> {
1074    let mut input = DeleteBackupPlanInput::default();
1075    for (name, value) in labels {
1076        match *name {
1077            "BackupPlanId" => {
1078                input.backup_plan_id = value.to_string();
1079            }
1080            _ => {}
1081        }
1082    }
1083    Ok(input)
1084}
1085
1086/// Deserialize request for restJson protocol.
1087pub fn deserialize_delete_backup_selection_request(
1088    request: &winterbaume_core::MockRequest,
1089    labels: &[(&str, &str)],
1090    query: &std::collections::HashMap<String, String>,
1091) -> Result<DeleteBackupSelectionInput, String> {
1092    let mut input = DeleteBackupSelectionInput::default();
1093    for (name, value) in labels {
1094        match *name {
1095            "BackupPlanId" => {
1096                input.backup_plan_id = value.to_string();
1097            }
1098            "SelectionId" => {
1099                input.selection_id = value.to_string();
1100            }
1101            _ => {}
1102        }
1103    }
1104    Ok(input)
1105}
1106
1107/// Deserialize request for restJson protocol.
1108pub fn deserialize_delete_backup_vault_request(
1109    request: &winterbaume_core::MockRequest,
1110    labels: &[(&str, &str)],
1111    query: &std::collections::HashMap<String, String>,
1112) -> Result<DeleteBackupVaultInput, String> {
1113    let mut input = DeleteBackupVaultInput::default();
1114    for (name, value) in labels {
1115        match *name {
1116            "BackupVaultName" => {
1117                input.backup_vault_name = value.to_string();
1118            }
1119            _ => {}
1120        }
1121    }
1122    Ok(input)
1123}
1124
1125/// Deserialize request for restJson protocol.
1126pub fn deserialize_delete_backup_vault_access_policy_request(
1127    request: &winterbaume_core::MockRequest,
1128    labels: &[(&str, &str)],
1129    query: &std::collections::HashMap<String, String>,
1130) -> Result<DeleteBackupVaultAccessPolicyInput, String> {
1131    let mut input = DeleteBackupVaultAccessPolicyInput::default();
1132    for (name, value) in labels {
1133        match *name {
1134            "BackupVaultName" => {
1135                input.backup_vault_name = value.to_string();
1136            }
1137            _ => {}
1138        }
1139    }
1140    Ok(input)
1141}
1142
1143/// Deserialize request for restJson protocol.
1144pub fn deserialize_delete_backup_vault_lock_configuration_request(
1145    request: &winterbaume_core::MockRequest,
1146    labels: &[(&str, &str)],
1147    query: &std::collections::HashMap<String, String>,
1148) -> Result<DeleteBackupVaultLockConfigurationInput, String> {
1149    let mut input = DeleteBackupVaultLockConfigurationInput::default();
1150    for (name, value) in labels {
1151        match *name {
1152            "BackupVaultName" => {
1153                input.backup_vault_name = value.to_string();
1154            }
1155            _ => {}
1156        }
1157    }
1158    Ok(input)
1159}
1160
1161/// Deserialize request for restJson protocol.
1162pub fn deserialize_delete_backup_vault_notifications_request(
1163    request: &winterbaume_core::MockRequest,
1164    labels: &[(&str, &str)],
1165    query: &std::collections::HashMap<String, String>,
1166) -> Result<DeleteBackupVaultNotificationsInput, String> {
1167    let mut input = DeleteBackupVaultNotificationsInput::default();
1168    for (name, value) in labels {
1169        match *name {
1170            "BackupVaultName" => {
1171                input.backup_vault_name = value.to_string();
1172            }
1173            _ => {}
1174        }
1175    }
1176    Ok(input)
1177}
1178
1179/// Deserialize request for restJson protocol.
1180pub fn deserialize_delete_framework_request(
1181    request: &winterbaume_core::MockRequest,
1182    labels: &[(&str, &str)],
1183    query: &std::collections::HashMap<String, String>,
1184) -> Result<DeleteFrameworkInput, String> {
1185    let mut input = DeleteFrameworkInput::default();
1186    for (name, value) in labels {
1187        match *name {
1188            "FrameworkName" => {
1189                input.framework_name = value.to_string();
1190            }
1191            _ => {}
1192        }
1193    }
1194    Ok(input)
1195}
1196
1197/// Deserialize request for restJson protocol.
1198pub fn deserialize_delete_recovery_point_request(
1199    request: &winterbaume_core::MockRequest,
1200    labels: &[(&str, &str)],
1201    query: &std::collections::HashMap<String, String>,
1202) -> Result<DeleteRecoveryPointInput, String> {
1203    let mut input = DeleteRecoveryPointInput::default();
1204    for (name, value) in labels {
1205        match *name {
1206            "BackupVaultName" => {
1207                input.backup_vault_name = value.to_string();
1208            }
1209            "RecoveryPointArn" => {
1210                input.recovery_point_arn = value.to_string();
1211            }
1212            _ => {}
1213        }
1214    }
1215    Ok(input)
1216}
1217
1218/// Deserialize request for restJson protocol.
1219pub fn deserialize_delete_report_plan_request(
1220    request: &winterbaume_core::MockRequest,
1221    labels: &[(&str, &str)],
1222    query: &std::collections::HashMap<String, String>,
1223) -> Result<DeleteReportPlanInput, String> {
1224    let mut input = DeleteReportPlanInput::default();
1225    for (name, value) in labels {
1226        match *name {
1227            "ReportPlanName" => {
1228                input.report_plan_name = value.to_string();
1229            }
1230            _ => {}
1231        }
1232    }
1233    Ok(input)
1234}
1235
1236/// Deserialize request for restJson protocol.
1237pub fn deserialize_delete_restore_testing_plan_request(
1238    request: &winterbaume_core::MockRequest,
1239    labels: &[(&str, &str)],
1240    query: &std::collections::HashMap<String, String>,
1241) -> Result<DeleteRestoreTestingPlanInput, String> {
1242    let mut input = DeleteRestoreTestingPlanInput::default();
1243    for (name, value) in labels {
1244        match *name {
1245            "RestoreTestingPlanName" => {
1246                input.restore_testing_plan_name = value.to_string();
1247            }
1248            _ => {}
1249        }
1250    }
1251    Ok(input)
1252}
1253
1254/// Deserialize request for restJson protocol.
1255pub fn deserialize_delete_restore_testing_selection_request(
1256    request: &winterbaume_core::MockRequest,
1257    labels: &[(&str, &str)],
1258    query: &std::collections::HashMap<String, String>,
1259) -> Result<DeleteRestoreTestingSelectionInput, String> {
1260    let mut input = DeleteRestoreTestingSelectionInput::default();
1261    for (name, value) in labels {
1262        match *name {
1263            "RestoreTestingPlanName" => {
1264                input.restore_testing_plan_name = value.to_string();
1265            }
1266            "RestoreTestingSelectionName" => {
1267                input.restore_testing_selection_name = value.to_string();
1268            }
1269            _ => {}
1270        }
1271    }
1272    Ok(input)
1273}
1274
1275/// Deserialize request for restJson protocol.
1276pub fn deserialize_delete_tiering_configuration_request(
1277    request: &winterbaume_core::MockRequest,
1278    labels: &[(&str, &str)],
1279    query: &std::collections::HashMap<String, String>,
1280) -> Result<DeleteTieringConfigurationInput, String> {
1281    let mut input = DeleteTieringConfigurationInput::default();
1282    for (name, value) in labels {
1283        match *name {
1284            "TieringConfigurationName" => {
1285                input.tiering_configuration_name = value.to_string();
1286            }
1287            _ => {}
1288        }
1289    }
1290    Ok(input)
1291}
1292
1293/// Deserialize request for restJson protocol.
1294pub fn deserialize_describe_backup_job_request(
1295    request: &winterbaume_core::MockRequest,
1296    labels: &[(&str, &str)],
1297    query: &std::collections::HashMap<String, String>,
1298) -> Result<DescribeBackupJobInput, String> {
1299    let mut input = DescribeBackupJobInput::default();
1300    for (name, value) in labels {
1301        match *name {
1302            "BackupJobId" => {
1303                input.backup_job_id = value.to_string();
1304            }
1305            _ => {}
1306        }
1307    }
1308    Ok(input)
1309}
1310
1311/// Deserialize request for restJson protocol.
1312pub fn deserialize_describe_backup_vault_request(
1313    request: &winterbaume_core::MockRequest,
1314    labels: &[(&str, &str)],
1315    query: &std::collections::HashMap<String, String>,
1316) -> Result<DescribeBackupVaultInput, String> {
1317    let mut input = DescribeBackupVaultInput::default();
1318    for (name, value) in labels {
1319        match *name {
1320            "BackupVaultName" => {
1321                input.backup_vault_name = value.to_string();
1322            }
1323            _ => {}
1324        }
1325    }
1326    if let Some(value) = query.get("backupVaultAccountId") {
1327        input.backup_vault_account_id = Some(value.to_string());
1328    }
1329    Ok(input)
1330}
1331
1332/// Deserialize request for restJson protocol.
1333pub fn deserialize_describe_copy_job_request(
1334    request: &winterbaume_core::MockRequest,
1335    labels: &[(&str, &str)],
1336    query: &std::collections::HashMap<String, String>,
1337) -> Result<DescribeCopyJobInput, String> {
1338    let mut input = DescribeCopyJobInput::default();
1339    for (name, value) in labels {
1340        match *name {
1341            "CopyJobId" => {
1342                input.copy_job_id = value.to_string();
1343            }
1344            _ => {}
1345        }
1346    }
1347    Ok(input)
1348}
1349
1350/// Deserialize request for restJson protocol.
1351pub fn deserialize_describe_framework_request(
1352    request: &winterbaume_core::MockRequest,
1353    labels: &[(&str, &str)],
1354    query: &std::collections::HashMap<String, String>,
1355) -> Result<DescribeFrameworkInput, String> {
1356    let mut input = DescribeFrameworkInput::default();
1357    for (name, value) in labels {
1358        match *name {
1359            "FrameworkName" => {
1360                input.framework_name = value.to_string();
1361            }
1362            _ => {}
1363        }
1364    }
1365    Ok(input)
1366}
1367
1368/// Deserialize request for restJson protocol.
1369pub fn deserialize_describe_global_settings_request(
1370    request: &winterbaume_core::MockRequest,
1371    labels: &[(&str, &str)],
1372    query: &std::collections::HashMap<String, String>,
1373) -> Result<DescribeGlobalSettingsInput, String> {
1374    let input = DescribeGlobalSettingsInput {};
1375    Ok(input)
1376}
1377
1378/// Deserialize request for restJson protocol.
1379pub fn deserialize_describe_protected_resource_request(
1380    request: &winterbaume_core::MockRequest,
1381    labels: &[(&str, &str)],
1382    query: &std::collections::HashMap<String, String>,
1383) -> Result<DescribeProtectedResourceInput, String> {
1384    let mut input = DescribeProtectedResourceInput::default();
1385    for (name, value) in labels {
1386        match *name {
1387            "ResourceArn" => {
1388                input.resource_arn = value.to_string();
1389            }
1390            _ => {}
1391        }
1392    }
1393    Ok(input)
1394}
1395
1396/// Deserialize request for restJson protocol.
1397pub fn deserialize_describe_recovery_point_request(
1398    request: &winterbaume_core::MockRequest,
1399    labels: &[(&str, &str)],
1400    query: &std::collections::HashMap<String, String>,
1401) -> Result<DescribeRecoveryPointInput, String> {
1402    let mut input = DescribeRecoveryPointInput::default();
1403    for (name, value) in labels {
1404        match *name {
1405            "BackupVaultName" => {
1406                input.backup_vault_name = value.to_string();
1407            }
1408            "RecoveryPointArn" => {
1409                input.recovery_point_arn = value.to_string();
1410            }
1411            _ => {}
1412        }
1413    }
1414    if let Some(value) = query.get("backupVaultAccountId") {
1415        input.backup_vault_account_id = Some(value.to_string());
1416    }
1417    Ok(input)
1418}
1419
1420/// Deserialize request for restJson protocol.
1421pub fn deserialize_describe_region_settings_request(
1422    request: &winterbaume_core::MockRequest,
1423    labels: &[(&str, &str)],
1424    query: &std::collections::HashMap<String, String>,
1425) -> Result<DescribeRegionSettingsInput, String> {
1426    let input = DescribeRegionSettingsInput {};
1427    Ok(input)
1428}
1429
1430/// Deserialize request for restJson protocol.
1431pub fn deserialize_describe_report_job_request(
1432    request: &winterbaume_core::MockRequest,
1433    labels: &[(&str, &str)],
1434    query: &std::collections::HashMap<String, String>,
1435) -> Result<DescribeReportJobInput, String> {
1436    let mut input = DescribeReportJobInput::default();
1437    for (name, value) in labels {
1438        match *name {
1439            "ReportJobId" => {
1440                input.report_job_id = value.to_string();
1441            }
1442            _ => {}
1443        }
1444    }
1445    Ok(input)
1446}
1447
1448/// Deserialize request for restJson protocol.
1449pub fn deserialize_describe_report_plan_request(
1450    request: &winterbaume_core::MockRequest,
1451    labels: &[(&str, &str)],
1452    query: &std::collections::HashMap<String, String>,
1453) -> Result<DescribeReportPlanInput, String> {
1454    let mut input = DescribeReportPlanInput::default();
1455    for (name, value) in labels {
1456        match *name {
1457            "ReportPlanName" => {
1458                input.report_plan_name = value.to_string();
1459            }
1460            _ => {}
1461        }
1462    }
1463    Ok(input)
1464}
1465
1466/// Deserialize request for restJson protocol.
1467pub fn deserialize_describe_restore_job_request(
1468    request: &winterbaume_core::MockRequest,
1469    labels: &[(&str, &str)],
1470    query: &std::collections::HashMap<String, String>,
1471) -> Result<DescribeRestoreJobInput, String> {
1472    let mut input = DescribeRestoreJobInput::default();
1473    for (name, value) in labels {
1474        match *name {
1475            "RestoreJobId" => {
1476                input.restore_job_id = value.to_string();
1477            }
1478            _ => {}
1479        }
1480    }
1481    Ok(input)
1482}
1483
1484/// Deserialize request for restJson protocol.
1485pub fn deserialize_describe_scan_job_request(
1486    request: &winterbaume_core::MockRequest,
1487    labels: &[(&str, &str)],
1488    query: &std::collections::HashMap<String, String>,
1489) -> Result<DescribeScanJobInput, String> {
1490    let mut input = DescribeScanJobInput::default();
1491    for (name, value) in labels {
1492        match *name {
1493            "ScanJobId" => {
1494                input.scan_job_id = value.to_string();
1495            }
1496            _ => {}
1497        }
1498    }
1499    Ok(input)
1500}
1501
1502/// Deserialize request for restJson protocol.
1503pub fn deserialize_disassociate_backup_vault_mpa_approval_team_request(
1504    request: &winterbaume_core::MockRequest,
1505    labels: &[(&str, &str)],
1506    query: &std::collections::HashMap<String, String>,
1507) -> Result<DisassociateBackupVaultMpaApprovalTeamInput, String> {
1508    let mut input = DisassociateBackupVaultMpaApprovalTeamInput::default();
1509    if !request.body.is_empty() {
1510        input = serde_json::from_slice::<DisassociateBackupVaultMpaApprovalTeamInput>(
1511            &request.body,
1512        )
1513        .map_err(|err| {
1514            format!("failed to deserialize DisassociateBackupVaultMpaApprovalTeam request: {err}")
1515        })?;
1516    }
1517    for (name, value) in labels {
1518        match *name {
1519            "BackupVaultName" => {
1520                input.backup_vault_name = value.to_string();
1521            }
1522            _ => {}
1523        }
1524    }
1525    Ok(input)
1526}
1527
1528/// Deserialize request for restJson protocol.
1529pub fn deserialize_disassociate_recovery_point_request(
1530    request: &winterbaume_core::MockRequest,
1531    labels: &[(&str, &str)],
1532    query: &std::collections::HashMap<String, String>,
1533) -> Result<DisassociateRecoveryPointInput, String> {
1534    let mut input = DisassociateRecoveryPointInput::default();
1535    for (name, value) in labels {
1536        match *name {
1537            "BackupVaultName" => {
1538                input.backup_vault_name = value.to_string();
1539            }
1540            "RecoveryPointArn" => {
1541                input.recovery_point_arn = value.to_string();
1542            }
1543            _ => {}
1544        }
1545    }
1546    Ok(input)
1547}
1548
1549/// Deserialize request for restJson protocol.
1550pub fn deserialize_disassociate_recovery_point_from_parent_request(
1551    request: &winterbaume_core::MockRequest,
1552    labels: &[(&str, &str)],
1553    query: &std::collections::HashMap<String, String>,
1554) -> Result<DisassociateRecoveryPointFromParentInput, String> {
1555    let mut input = DisassociateRecoveryPointFromParentInput::default();
1556    for (name, value) in labels {
1557        match *name {
1558            "BackupVaultName" => {
1559                input.backup_vault_name = value.to_string();
1560            }
1561            "RecoveryPointArn" => {
1562                input.recovery_point_arn = value.to_string();
1563            }
1564            _ => {}
1565        }
1566    }
1567    Ok(input)
1568}
1569
1570/// Deserialize request for restJson protocol.
1571pub fn deserialize_export_backup_plan_template_request(
1572    request: &winterbaume_core::MockRequest,
1573    labels: &[(&str, &str)],
1574    query: &std::collections::HashMap<String, String>,
1575) -> Result<ExportBackupPlanTemplateInput, String> {
1576    let mut input = ExportBackupPlanTemplateInput::default();
1577    for (name, value) in labels {
1578        match *name {
1579            "BackupPlanId" => {
1580                input.backup_plan_id = value.to_string();
1581            }
1582            _ => {}
1583        }
1584    }
1585    Ok(input)
1586}
1587
1588/// Deserialize request for restJson protocol.
1589pub fn deserialize_get_backup_plan_request(
1590    request: &winterbaume_core::MockRequest,
1591    labels: &[(&str, &str)],
1592    query: &std::collections::HashMap<String, String>,
1593) -> Result<GetBackupPlanInput, String> {
1594    let mut input = GetBackupPlanInput::default();
1595    for (name, value) in labels {
1596        match *name {
1597            "BackupPlanId" => {
1598                input.backup_plan_id = value.to_string();
1599            }
1600            _ => {}
1601        }
1602    }
1603    if let Some(value) = query.get("MaxScheduledRunsPreview") {
1604        input.max_scheduled_runs_preview = Some(
1605            value
1606                .parse::<i32>()
1607                .map_err(|err| format!("failed to parse integer: {err}"))?,
1608        );
1609    }
1610    if let Some(value) = query.get("versionId") {
1611        input.version_id = Some(value.to_string());
1612    }
1613    Ok(input)
1614}
1615
1616/// Deserialize request for restJson protocol.
1617pub fn deserialize_get_backup_plan_from_j_s_o_n_request(
1618    request: &winterbaume_core::MockRequest,
1619    labels: &[(&str, &str)],
1620    query: &std::collections::HashMap<String, String>,
1621) -> Result<GetBackupPlanFromJSONInput, String> {
1622    let mut input = GetBackupPlanFromJSONInput::default();
1623    if !request.body.is_empty() {
1624        input = serde_json::from_slice::<GetBackupPlanFromJSONInput>(&request.body)
1625            .map_err(|err| format!("failed to deserialize GetBackupPlanFromJSON request: {err}"))?;
1626    }
1627    Ok(input)
1628}
1629
1630/// Deserialize request for restJson protocol.
1631pub fn deserialize_get_backup_plan_from_template_request(
1632    request: &winterbaume_core::MockRequest,
1633    labels: &[(&str, &str)],
1634    query: &std::collections::HashMap<String, String>,
1635) -> Result<GetBackupPlanFromTemplateInput, String> {
1636    let mut input = GetBackupPlanFromTemplateInput::default();
1637    for (name, value) in labels {
1638        match *name {
1639            "BackupPlanTemplateId" => {
1640                input.backup_plan_template_id = value.to_string();
1641            }
1642            _ => {}
1643        }
1644    }
1645    Ok(input)
1646}
1647
1648/// Deserialize request for restJson protocol.
1649pub fn deserialize_get_backup_selection_request(
1650    request: &winterbaume_core::MockRequest,
1651    labels: &[(&str, &str)],
1652    query: &std::collections::HashMap<String, String>,
1653) -> Result<GetBackupSelectionInput, String> {
1654    let mut input = GetBackupSelectionInput::default();
1655    for (name, value) in labels {
1656        match *name {
1657            "BackupPlanId" => {
1658                input.backup_plan_id = value.to_string();
1659            }
1660            "SelectionId" => {
1661                input.selection_id = value.to_string();
1662            }
1663            _ => {}
1664        }
1665    }
1666    Ok(input)
1667}
1668
1669/// Deserialize request for restJson protocol.
1670pub fn deserialize_get_backup_vault_access_policy_request(
1671    request: &winterbaume_core::MockRequest,
1672    labels: &[(&str, &str)],
1673    query: &std::collections::HashMap<String, String>,
1674) -> Result<GetBackupVaultAccessPolicyInput, String> {
1675    let mut input = GetBackupVaultAccessPolicyInput::default();
1676    for (name, value) in labels {
1677        match *name {
1678            "BackupVaultName" => {
1679                input.backup_vault_name = value.to_string();
1680            }
1681            _ => {}
1682        }
1683    }
1684    Ok(input)
1685}
1686
1687/// Deserialize request for restJson protocol.
1688pub fn deserialize_get_backup_vault_notifications_request(
1689    request: &winterbaume_core::MockRequest,
1690    labels: &[(&str, &str)],
1691    query: &std::collections::HashMap<String, String>,
1692) -> Result<GetBackupVaultNotificationsInput, String> {
1693    let mut input = GetBackupVaultNotificationsInput::default();
1694    for (name, value) in labels {
1695        match *name {
1696            "BackupVaultName" => {
1697                input.backup_vault_name = value.to_string();
1698            }
1699            _ => {}
1700        }
1701    }
1702    Ok(input)
1703}
1704
1705/// Deserialize request for restJson protocol.
1706pub fn deserialize_get_legal_hold_request(
1707    request: &winterbaume_core::MockRequest,
1708    labels: &[(&str, &str)],
1709    query: &std::collections::HashMap<String, String>,
1710) -> Result<GetLegalHoldInput, String> {
1711    let mut input = GetLegalHoldInput::default();
1712    for (name, value) in labels {
1713        match *name {
1714            "LegalHoldId" => {
1715                input.legal_hold_id = value.to_string();
1716            }
1717            _ => {}
1718        }
1719    }
1720    Ok(input)
1721}
1722
1723/// Deserialize request for restJson protocol.
1724pub fn deserialize_get_recovery_point_index_details_request(
1725    request: &winterbaume_core::MockRequest,
1726    labels: &[(&str, &str)],
1727    query: &std::collections::HashMap<String, String>,
1728) -> Result<GetRecoveryPointIndexDetailsInput, String> {
1729    let mut input = GetRecoveryPointIndexDetailsInput::default();
1730    for (name, value) in labels {
1731        match *name {
1732            "BackupVaultName" => {
1733                input.backup_vault_name = value.to_string();
1734            }
1735            "RecoveryPointArn" => {
1736                input.recovery_point_arn = value.to_string();
1737            }
1738            _ => {}
1739        }
1740    }
1741    Ok(input)
1742}
1743
1744/// Deserialize request for restJson protocol.
1745pub fn deserialize_get_recovery_point_restore_metadata_request(
1746    request: &winterbaume_core::MockRequest,
1747    labels: &[(&str, &str)],
1748    query: &std::collections::HashMap<String, String>,
1749) -> Result<GetRecoveryPointRestoreMetadataInput, String> {
1750    let mut input = GetRecoveryPointRestoreMetadataInput::default();
1751    for (name, value) in labels {
1752        match *name {
1753            "BackupVaultName" => {
1754                input.backup_vault_name = value.to_string();
1755            }
1756            "RecoveryPointArn" => {
1757                input.recovery_point_arn = value.to_string();
1758            }
1759            _ => {}
1760        }
1761    }
1762    if let Some(value) = query.get("backupVaultAccountId") {
1763        input.backup_vault_account_id = Some(value.to_string());
1764    }
1765    Ok(input)
1766}
1767
1768/// Deserialize request for restJson protocol.
1769pub fn deserialize_get_restore_job_metadata_request(
1770    request: &winterbaume_core::MockRequest,
1771    labels: &[(&str, &str)],
1772    query: &std::collections::HashMap<String, String>,
1773) -> Result<GetRestoreJobMetadataInput, String> {
1774    let mut input = GetRestoreJobMetadataInput::default();
1775    for (name, value) in labels {
1776        match *name {
1777            "RestoreJobId" => {
1778                input.restore_job_id = value.to_string();
1779            }
1780            _ => {}
1781        }
1782    }
1783    Ok(input)
1784}
1785
1786/// Deserialize request for restJson protocol.
1787pub fn deserialize_get_restore_testing_inferred_metadata_request(
1788    request: &winterbaume_core::MockRequest,
1789    labels: &[(&str, &str)],
1790    query: &std::collections::HashMap<String, String>,
1791) -> Result<GetRestoreTestingInferredMetadataInput, String> {
1792    let mut input = GetRestoreTestingInferredMetadataInput::default();
1793    if let Some(value) = query.get("BackupVaultAccountId") {
1794        input.backup_vault_account_id = Some(value.to_string());
1795    }
1796    if let Some(value) = query.get("BackupVaultName") {
1797        input.backup_vault_name = value.to_string();
1798    }
1799    if let Some(value) = query.get("RecoveryPointArn") {
1800        input.recovery_point_arn = value.to_string();
1801    }
1802    Ok(input)
1803}
1804
1805/// Deserialize request for restJson protocol.
1806pub fn deserialize_get_restore_testing_plan_request(
1807    request: &winterbaume_core::MockRequest,
1808    labels: &[(&str, &str)],
1809    query: &std::collections::HashMap<String, String>,
1810) -> Result<GetRestoreTestingPlanInput, String> {
1811    let mut input = GetRestoreTestingPlanInput::default();
1812    for (name, value) in labels {
1813        match *name {
1814            "RestoreTestingPlanName" => {
1815                input.restore_testing_plan_name = value.to_string();
1816            }
1817            _ => {}
1818        }
1819    }
1820    Ok(input)
1821}
1822
1823/// Deserialize request for restJson protocol.
1824pub fn deserialize_get_restore_testing_selection_request(
1825    request: &winterbaume_core::MockRequest,
1826    labels: &[(&str, &str)],
1827    query: &std::collections::HashMap<String, String>,
1828) -> Result<GetRestoreTestingSelectionInput, String> {
1829    let mut input = GetRestoreTestingSelectionInput::default();
1830    for (name, value) in labels {
1831        match *name {
1832            "RestoreTestingPlanName" => {
1833                input.restore_testing_plan_name = value.to_string();
1834            }
1835            "RestoreTestingSelectionName" => {
1836                input.restore_testing_selection_name = value.to_string();
1837            }
1838            _ => {}
1839        }
1840    }
1841    Ok(input)
1842}
1843
1844/// Deserialize request for restJson protocol.
1845pub fn deserialize_get_tiering_configuration_request(
1846    request: &winterbaume_core::MockRequest,
1847    labels: &[(&str, &str)],
1848    query: &std::collections::HashMap<String, String>,
1849) -> Result<GetTieringConfigurationInput, String> {
1850    let mut input = GetTieringConfigurationInput::default();
1851    for (name, value) in labels {
1852        match *name {
1853            "TieringConfigurationName" => {
1854                input.tiering_configuration_name = value.to_string();
1855            }
1856            _ => {}
1857        }
1858    }
1859    Ok(input)
1860}
1861
1862/// Deserialize request for restJson protocol.
1863pub fn deserialize_list_backup_job_summaries_request(
1864    request: &winterbaume_core::MockRequest,
1865    labels: &[(&str, &str)],
1866    query: &std::collections::HashMap<String, String>,
1867) -> Result<ListBackupJobSummariesInput, String> {
1868    let mut input = ListBackupJobSummariesInput::default();
1869    if let Some(value) = query.get("AccountId") {
1870        input.account_id = Some(value.to_string());
1871    }
1872    if let Some(value) = query.get("AggregationPeriod") {
1873        input.aggregation_period = Some(value.to_string());
1874    }
1875    if let Some(value) = query.get("MaxResults") {
1876        input.max_results = Some(
1877            value
1878                .parse::<i32>()
1879                .map_err(|err| format!("failed to parse integer: {err}"))?,
1880        );
1881    }
1882    if let Some(value) = query.get("MessageCategory") {
1883        input.message_category = Some(value.to_string());
1884    }
1885    if let Some(value) = query.get("NextToken") {
1886        input.next_token = Some(value.to_string());
1887    }
1888    if let Some(value) = query.get("ResourceType") {
1889        input.resource_type = Some(value.to_string());
1890    }
1891    if let Some(value) = query.get("State") {
1892        input.state = Some(value.to_string());
1893    }
1894    Ok(input)
1895}
1896
1897/// Deserialize request for restJson protocol.
1898pub fn deserialize_list_backup_jobs_request(
1899    request: &winterbaume_core::MockRequest,
1900    labels: &[(&str, &str)],
1901    query: &std::collections::HashMap<String, String>,
1902) -> Result<ListBackupJobsInput, String> {
1903    let mut input = ListBackupJobsInput::default();
1904    if let Some(value) = query.get("accountId") {
1905        input.by_account_id = Some(value.to_string());
1906    }
1907    if let Some(value) = query.get("backupVaultName") {
1908        input.by_backup_vault_name = Some(value.to_string());
1909    }
1910    if let Some(value) = query.get("completeAfter") {
1911        input.by_complete_after = Some(
1912            value
1913                .parse::<f64>()
1914                .ok()
1915                .or_else(|| {
1916                    chrono::DateTime::parse_from_rfc3339(value)
1917                        .ok()
1918                        .map(|dt| dt.timestamp() as f64)
1919                })
1920                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
1921        );
1922    }
1923    if let Some(value) = query.get("completeBefore") {
1924        input.by_complete_before = Some(
1925            value
1926                .parse::<f64>()
1927                .ok()
1928                .or_else(|| {
1929                    chrono::DateTime::parse_from_rfc3339(value)
1930                        .ok()
1931                        .map(|dt| dt.timestamp() as f64)
1932                })
1933                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
1934        );
1935    }
1936    if let Some(value) = query.get("createdAfter") {
1937        input.by_created_after = Some(
1938            value
1939                .parse::<f64>()
1940                .ok()
1941                .or_else(|| {
1942                    chrono::DateTime::parse_from_rfc3339(value)
1943                        .ok()
1944                        .map(|dt| dt.timestamp() as f64)
1945                })
1946                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
1947        );
1948    }
1949    if let Some(value) = query.get("createdBefore") {
1950        input.by_created_before = Some(
1951            value
1952                .parse::<f64>()
1953                .ok()
1954                .or_else(|| {
1955                    chrono::DateTime::parse_from_rfc3339(value)
1956                        .ok()
1957                        .map(|dt| dt.timestamp() as f64)
1958                })
1959                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
1960        );
1961    }
1962    if let Some(value) = query.get("messageCategory") {
1963        input.by_message_category = Some(value.to_string());
1964    }
1965    if let Some(value) = query.get("parentJobId") {
1966        input.by_parent_job_id = Some(value.to_string());
1967    }
1968    if let Some(value) = query.get("resourceArn") {
1969        input.by_resource_arn = Some(value.to_string());
1970    }
1971    if let Some(value) = query.get("resourceType") {
1972        input.by_resource_type = Some(value.to_string());
1973    }
1974    if let Some(value) = query.get("state") {
1975        input.by_state = Some(value.to_string());
1976    }
1977    if let Some(value) = query.get("maxResults") {
1978        input.max_results = Some(
1979            value
1980                .parse::<i32>()
1981                .map_err(|err| format!("failed to parse integer: {err}"))?,
1982        );
1983    }
1984    if let Some(value) = query.get("nextToken") {
1985        input.next_token = Some(value.to_string());
1986    }
1987    Ok(input)
1988}
1989
1990/// Deserialize request for restJson protocol.
1991pub fn deserialize_list_backup_plan_templates_request(
1992    request: &winterbaume_core::MockRequest,
1993    labels: &[(&str, &str)],
1994    query: &std::collections::HashMap<String, String>,
1995) -> Result<ListBackupPlanTemplatesInput, String> {
1996    let mut input = ListBackupPlanTemplatesInput::default();
1997    if let Some(value) = query.get("maxResults") {
1998        input.max_results = Some(
1999            value
2000                .parse::<i32>()
2001                .map_err(|err| format!("failed to parse integer: {err}"))?,
2002        );
2003    }
2004    if let Some(value) = query.get("nextToken") {
2005        input.next_token = Some(value.to_string());
2006    }
2007    Ok(input)
2008}
2009
2010/// Deserialize request for restJson protocol.
2011pub fn deserialize_list_backup_plan_versions_request(
2012    request: &winterbaume_core::MockRequest,
2013    labels: &[(&str, &str)],
2014    query: &std::collections::HashMap<String, String>,
2015) -> Result<ListBackupPlanVersionsInput, String> {
2016    let mut input = ListBackupPlanVersionsInput::default();
2017    for (name, value) in labels {
2018        match *name {
2019            "BackupPlanId" => {
2020                input.backup_plan_id = value.to_string();
2021            }
2022            _ => {}
2023        }
2024    }
2025    if let Some(value) = query.get("maxResults") {
2026        input.max_results = Some(
2027            value
2028                .parse::<i32>()
2029                .map_err(|err| format!("failed to parse integer: {err}"))?,
2030        );
2031    }
2032    if let Some(value) = query.get("nextToken") {
2033        input.next_token = Some(value.to_string());
2034    }
2035    Ok(input)
2036}
2037
2038/// Deserialize request for restJson protocol.
2039pub fn deserialize_list_backup_plans_request(
2040    request: &winterbaume_core::MockRequest,
2041    labels: &[(&str, &str)],
2042    query: &std::collections::HashMap<String, String>,
2043) -> Result<ListBackupPlansInput, String> {
2044    let mut input = ListBackupPlansInput::default();
2045    if let Some(value) = query.get("includeDeleted") {
2046        input.include_deleted = Some(
2047            value
2048                .parse::<bool>()
2049                .map_err(|err| format!("failed to parse bool: {err}"))?,
2050        );
2051    }
2052    if let Some(value) = query.get("maxResults") {
2053        input.max_results = Some(
2054            value
2055                .parse::<i32>()
2056                .map_err(|err| format!("failed to parse integer: {err}"))?,
2057        );
2058    }
2059    if let Some(value) = query.get("nextToken") {
2060        input.next_token = Some(value.to_string());
2061    }
2062    Ok(input)
2063}
2064
2065/// Deserialize request for restJson protocol.
2066pub fn deserialize_list_backup_selections_request(
2067    request: &winterbaume_core::MockRequest,
2068    labels: &[(&str, &str)],
2069    query: &std::collections::HashMap<String, String>,
2070) -> Result<ListBackupSelectionsInput, String> {
2071    let mut input = ListBackupSelectionsInput::default();
2072    for (name, value) in labels {
2073        match *name {
2074            "BackupPlanId" => {
2075                input.backup_plan_id = value.to_string();
2076            }
2077            _ => {}
2078        }
2079    }
2080    if let Some(value) = query.get("maxResults") {
2081        input.max_results = Some(
2082            value
2083                .parse::<i32>()
2084                .map_err(|err| format!("failed to parse integer: {err}"))?,
2085        );
2086    }
2087    if let Some(value) = query.get("nextToken") {
2088        input.next_token = Some(value.to_string());
2089    }
2090    Ok(input)
2091}
2092
2093/// Deserialize request for restJson protocol.
2094pub fn deserialize_list_backup_vaults_request(
2095    request: &winterbaume_core::MockRequest,
2096    labels: &[(&str, &str)],
2097    query: &std::collections::HashMap<String, String>,
2098) -> Result<ListBackupVaultsInput, String> {
2099    let mut input = ListBackupVaultsInput::default();
2100    if let Some(value) = query.get("shared") {
2101        input.by_shared = Some(
2102            value
2103                .parse::<bool>()
2104                .map_err(|err| format!("failed to parse bool: {err}"))?,
2105        );
2106    }
2107    if let Some(value) = query.get("vaultType") {
2108        input.by_vault_type = Some(value.to_string());
2109    }
2110    if let Some(value) = query.get("maxResults") {
2111        input.max_results = Some(
2112            value
2113                .parse::<i32>()
2114                .map_err(|err| format!("failed to parse integer: {err}"))?,
2115        );
2116    }
2117    if let Some(value) = query.get("nextToken") {
2118        input.next_token = Some(value.to_string());
2119    }
2120    Ok(input)
2121}
2122
2123/// Deserialize request for restJson protocol.
2124pub fn deserialize_list_copy_job_summaries_request(
2125    request: &winterbaume_core::MockRequest,
2126    labels: &[(&str, &str)],
2127    query: &std::collections::HashMap<String, String>,
2128) -> Result<ListCopyJobSummariesInput, String> {
2129    let mut input = ListCopyJobSummariesInput::default();
2130    if let Some(value) = query.get("AccountId") {
2131        input.account_id = Some(value.to_string());
2132    }
2133    if let Some(value) = query.get("AggregationPeriod") {
2134        input.aggregation_period = Some(value.to_string());
2135    }
2136    if let Some(value) = query.get("MaxResults") {
2137        input.max_results = Some(
2138            value
2139                .parse::<i32>()
2140                .map_err(|err| format!("failed to parse integer: {err}"))?,
2141        );
2142    }
2143    if let Some(value) = query.get("MessageCategory") {
2144        input.message_category = Some(value.to_string());
2145    }
2146    if let Some(value) = query.get("NextToken") {
2147        input.next_token = Some(value.to_string());
2148    }
2149    if let Some(value) = query.get("ResourceType") {
2150        input.resource_type = Some(value.to_string());
2151    }
2152    if let Some(value) = query.get("State") {
2153        input.state = Some(value.to_string());
2154    }
2155    Ok(input)
2156}
2157
2158/// Deserialize request for restJson protocol.
2159pub fn deserialize_list_copy_jobs_request(
2160    request: &winterbaume_core::MockRequest,
2161    labels: &[(&str, &str)],
2162    query: &std::collections::HashMap<String, String>,
2163) -> Result<ListCopyJobsInput, String> {
2164    let mut input = ListCopyJobsInput::default();
2165    if let Some(value) = query.get("accountId") {
2166        input.by_account_id = Some(value.to_string());
2167    }
2168    if let Some(value) = query.get("completeAfter") {
2169        input.by_complete_after = Some(
2170            value
2171                .parse::<f64>()
2172                .ok()
2173                .or_else(|| {
2174                    chrono::DateTime::parse_from_rfc3339(value)
2175                        .ok()
2176                        .map(|dt| dt.timestamp() as f64)
2177                })
2178                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2179        );
2180    }
2181    if let Some(value) = query.get("completeBefore") {
2182        input.by_complete_before = Some(
2183            value
2184                .parse::<f64>()
2185                .ok()
2186                .or_else(|| {
2187                    chrono::DateTime::parse_from_rfc3339(value)
2188                        .ok()
2189                        .map(|dt| dt.timestamp() as f64)
2190                })
2191                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2192        );
2193    }
2194    if let Some(value) = query.get("createdAfter") {
2195        input.by_created_after = Some(
2196            value
2197                .parse::<f64>()
2198                .ok()
2199                .or_else(|| {
2200                    chrono::DateTime::parse_from_rfc3339(value)
2201                        .ok()
2202                        .map(|dt| dt.timestamp() as f64)
2203                })
2204                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2205        );
2206    }
2207    if let Some(value) = query.get("createdBefore") {
2208        input.by_created_before = Some(
2209            value
2210                .parse::<f64>()
2211                .ok()
2212                .or_else(|| {
2213                    chrono::DateTime::parse_from_rfc3339(value)
2214                        .ok()
2215                        .map(|dt| dt.timestamp() as f64)
2216                })
2217                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2218        );
2219    }
2220    if let Some(value) = query.get("destinationVaultArn") {
2221        input.by_destination_vault_arn = Some(value.to_string());
2222    }
2223    if let Some(value) = query.get("messageCategory") {
2224        input.by_message_category = Some(value.to_string());
2225    }
2226    if let Some(value) = query.get("parentJobId") {
2227        input.by_parent_job_id = Some(value.to_string());
2228    }
2229    if let Some(value) = query.get("resourceArn") {
2230        input.by_resource_arn = Some(value.to_string());
2231    }
2232    if let Some(value) = query.get("resourceType") {
2233        input.by_resource_type = Some(value.to_string());
2234    }
2235    if let Some(value) = query.get("sourceRecoveryPointArn") {
2236        input.by_source_recovery_point_arn = Some(value.to_string());
2237    }
2238    if let Some(value) = query.get("state") {
2239        input.by_state = Some(value.to_string());
2240    }
2241    if let Some(value) = query.get("maxResults") {
2242        input.max_results = Some(
2243            value
2244                .parse::<i32>()
2245                .map_err(|err| format!("failed to parse integer: {err}"))?,
2246        );
2247    }
2248    if let Some(value) = query.get("nextToken") {
2249        input.next_token = Some(value.to_string());
2250    }
2251    Ok(input)
2252}
2253
2254/// Deserialize request for restJson protocol.
2255pub fn deserialize_list_frameworks_request(
2256    request: &winterbaume_core::MockRequest,
2257    labels: &[(&str, &str)],
2258    query: &std::collections::HashMap<String, String>,
2259) -> Result<ListFrameworksInput, String> {
2260    let mut input = ListFrameworksInput::default();
2261    if let Some(value) = query.get("MaxResults") {
2262        input.max_results = Some(
2263            value
2264                .parse::<i32>()
2265                .map_err(|err| format!("failed to parse integer: {err}"))?,
2266        );
2267    }
2268    if let Some(value) = query.get("NextToken") {
2269        input.next_token = Some(value.to_string());
2270    }
2271    Ok(input)
2272}
2273
2274/// Deserialize request for restJson protocol.
2275pub fn deserialize_list_indexed_recovery_points_request(
2276    request: &winterbaume_core::MockRequest,
2277    labels: &[(&str, &str)],
2278    query: &std::collections::HashMap<String, String>,
2279) -> Result<ListIndexedRecoveryPointsInput, String> {
2280    let mut input = ListIndexedRecoveryPointsInput::default();
2281    if let Some(value) = query.get("createdAfter") {
2282        input.created_after = Some(
2283            value
2284                .parse::<f64>()
2285                .ok()
2286                .or_else(|| {
2287                    chrono::DateTime::parse_from_rfc3339(value)
2288                        .ok()
2289                        .map(|dt| dt.timestamp() as f64)
2290                })
2291                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2292        );
2293    }
2294    if let Some(value) = query.get("createdBefore") {
2295        input.created_before = Some(
2296            value
2297                .parse::<f64>()
2298                .ok()
2299                .or_else(|| {
2300                    chrono::DateTime::parse_from_rfc3339(value)
2301                        .ok()
2302                        .map(|dt| dt.timestamp() as f64)
2303                })
2304                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2305        );
2306    }
2307    if let Some(value) = query.get("indexStatus") {
2308        input.index_status = Some(value.to_string());
2309    }
2310    if let Some(value) = query.get("maxResults") {
2311        input.max_results = Some(
2312            value
2313                .parse::<i32>()
2314                .map_err(|err| format!("failed to parse integer: {err}"))?,
2315        );
2316    }
2317    if let Some(value) = query.get("nextToken") {
2318        input.next_token = Some(value.to_string());
2319    }
2320    if let Some(value) = query.get("resourceType") {
2321        input.resource_type = Some(value.to_string());
2322    }
2323    if let Some(value) = query.get("sourceResourceArn") {
2324        input.source_resource_arn = Some(value.to_string());
2325    }
2326    Ok(input)
2327}
2328
2329/// Deserialize request for restJson protocol.
2330pub fn deserialize_list_legal_holds_request(
2331    request: &winterbaume_core::MockRequest,
2332    labels: &[(&str, &str)],
2333    query: &std::collections::HashMap<String, String>,
2334) -> Result<ListLegalHoldsInput, String> {
2335    let mut input = ListLegalHoldsInput::default();
2336    if let Some(value) = query.get("maxResults") {
2337        input.max_results = Some(
2338            value
2339                .parse::<i32>()
2340                .map_err(|err| format!("failed to parse integer: {err}"))?,
2341        );
2342    }
2343    if let Some(value) = query.get("nextToken") {
2344        input.next_token = Some(value.to_string());
2345    }
2346    Ok(input)
2347}
2348
2349/// Deserialize request for restJson protocol.
2350pub fn deserialize_list_protected_resources_request(
2351    request: &winterbaume_core::MockRequest,
2352    labels: &[(&str, &str)],
2353    query: &std::collections::HashMap<String, String>,
2354) -> Result<ListProtectedResourcesInput, String> {
2355    let mut input = ListProtectedResourcesInput::default();
2356    if let Some(value) = query.get("maxResults") {
2357        input.max_results = Some(
2358            value
2359                .parse::<i32>()
2360                .map_err(|err| format!("failed to parse integer: {err}"))?,
2361        );
2362    }
2363    if let Some(value) = query.get("nextToken") {
2364        input.next_token = Some(value.to_string());
2365    }
2366    Ok(input)
2367}
2368
2369/// Deserialize request for restJson protocol.
2370pub fn deserialize_list_protected_resources_by_backup_vault_request(
2371    request: &winterbaume_core::MockRequest,
2372    labels: &[(&str, &str)],
2373    query: &std::collections::HashMap<String, String>,
2374) -> Result<ListProtectedResourcesByBackupVaultInput, String> {
2375    let mut input = ListProtectedResourcesByBackupVaultInput::default();
2376    for (name, value) in labels {
2377        match *name {
2378            "BackupVaultName" => {
2379                input.backup_vault_name = value.to_string();
2380            }
2381            _ => {}
2382        }
2383    }
2384    if let Some(value) = query.get("backupVaultAccountId") {
2385        input.backup_vault_account_id = Some(value.to_string());
2386    }
2387    if let Some(value) = query.get("maxResults") {
2388        input.max_results = Some(
2389            value
2390                .parse::<i32>()
2391                .map_err(|err| format!("failed to parse integer: {err}"))?,
2392        );
2393    }
2394    if let Some(value) = query.get("nextToken") {
2395        input.next_token = Some(value.to_string());
2396    }
2397    Ok(input)
2398}
2399
2400/// Deserialize request for restJson protocol.
2401pub fn deserialize_list_recovery_points_by_backup_vault_request(
2402    request: &winterbaume_core::MockRequest,
2403    labels: &[(&str, &str)],
2404    query: &std::collections::HashMap<String, String>,
2405) -> Result<ListRecoveryPointsByBackupVaultInput, String> {
2406    let mut input = ListRecoveryPointsByBackupVaultInput::default();
2407    for (name, value) in labels {
2408        match *name {
2409            "BackupVaultName" => {
2410                input.backup_vault_name = value.to_string();
2411            }
2412            _ => {}
2413        }
2414    }
2415    if let Some(value) = query.get("backupVaultAccountId") {
2416        input.backup_vault_account_id = Some(value.to_string());
2417    }
2418    if let Some(value) = query.get("backupPlanId") {
2419        input.by_backup_plan_id = Some(value.to_string());
2420    }
2421    if let Some(value) = query.get("createdAfter") {
2422        input.by_created_after = Some(
2423            value
2424                .parse::<f64>()
2425                .ok()
2426                .or_else(|| {
2427                    chrono::DateTime::parse_from_rfc3339(value)
2428                        .ok()
2429                        .map(|dt| dt.timestamp() as f64)
2430                })
2431                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2432        );
2433    }
2434    if let Some(value) = query.get("createdBefore") {
2435        input.by_created_before = Some(
2436            value
2437                .parse::<f64>()
2438                .ok()
2439                .or_else(|| {
2440                    chrono::DateTime::parse_from_rfc3339(value)
2441                        .ok()
2442                        .map(|dt| dt.timestamp() as f64)
2443                })
2444                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2445        );
2446    }
2447    if let Some(value) = query.get("parentRecoveryPointArn") {
2448        input.by_parent_recovery_point_arn = Some(value.to_string());
2449    }
2450    if let Some(value) = query.get("resourceArn") {
2451        input.by_resource_arn = Some(value.to_string());
2452    }
2453    if let Some(value) = query.get("resourceType") {
2454        input.by_resource_type = Some(value.to_string());
2455    }
2456    if let Some(value) = query.get("maxResults") {
2457        input.max_results = Some(
2458            value
2459                .parse::<i32>()
2460                .map_err(|err| format!("failed to parse integer: {err}"))?,
2461        );
2462    }
2463    if let Some(value) = query.get("nextToken") {
2464        input.next_token = Some(value.to_string());
2465    }
2466    Ok(input)
2467}
2468
2469/// Deserialize request for restJson protocol.
2470pub fn deserialize_list_recovery_points_by_legal_hold_request(
2471    request: &winterbaume_core::MockRequest,
2472    labels: &[(&str, &str)],
2473    query: &std::collections::HashMap<String, String>,
2474) -> Result<ListRecoveryPointsByLegalHoldInput, String> {
2475    let mut input = ListRecoveryPointsByLegalHoldInput::default();
2476    for (name, value) in labels {
2477        match *name {
2478            "LegalHoldId" => {
2479                input.legal_hold_id = value.to_string();
2480            }
2481            _ => {}
2482        }
2483    }
2484    if let Some(value) = query.get("maxResults") {
2485        input.max_results = Some(
2486            value
2487                .parse::<i32>()
2488                .map_err(|err| format!("failed to parse integer: {err}"))?,
2489        );
2490    }
2491    if let Some(value) = query.get("nextToken") {
2492        input.next_token = Some(value.to_string());
2493    }
2494    Ok(input)
2495}
2496
2497/// Deserialize request for restJson protocol.
2498pub fn deserialize_list_recovery_points_by_resource_request(
2499    request: &winterbaume_core::MockRequest,
2500    labels: &[(&str, &str)],
2501    query: &std::collections::HashMap<String, String>,
2502) -> Result<ListRecoveryPointsByResourceInput, String> {
2503    let mut input = ListRecoveryPointsByResourceInput::default();
2504    for (name, value) in labels {
2505        match *name {
2506            "ResourceArn" => {
2507                input.resource_arn = value.to_string();
2508            }
2509            _ => {}
2510        }
2511    }
2512    if let Some(value) = query.get("managedByAWSBackupOnly") {
2513        input.managed_by_a_w_s_backup_only = Some(
2514            value
2515                .parse::<bool>()
2516                .map_err(|err| format!("failed to parse bool: {err}"))?,
2517        );
2518    }
2519    if let Some(value) = query.get("maxResults") {
2520        input.max_results = Some(
2521            value
2522                .parse::<i32>()
2523                .map_err(|err| format!("failed to parse integer: {err}"))?,
2524        );
2525    }
2526    if let Some(value) = query.get("nextToken") {
2527        input.next_token = Some(value.to_string());
2528    }
2529    Ok(input)
2530}
2531
2532/// Deserialize request for restJson protocol.
2533pub fn deserialize_list_report_jobs_request(
2534    request: &winterbaume_core::MockRequest,
2535    labels: &[(&str, &str)],
2536    query: &std::collections::HashMap<String, String>,
2537) -> Result<ListReportJobsInput, String> {
2538    let mut input = ListReportJobsInput::default();
2539    if let Some(value) = query.get("CreationAfter") {
2540        input.by_creation_after = Some(
2541            value
2542                .parse::<f64>()
2543                .ok()
2544                .or_else(|| {
2545                    chrono::DateTime::parse_from_rfc3339(value)
2546                        .ok()
2547                        .map(|dt| dt.timestamp() as f64)
2548                })
2549                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2550        );
2551    }
2552    if let Some(value) = query.get("CreationBefore") {
2553        input.by_creation_before = Some(
2554            value
2555                .parse::<f64>()
2556                .ok()
2557                .or_else(|| {
2558                    chrono::DateTime::parse_from_rfc3339(value)
2559                        .ok()
2560                        .map(|dt| dt.timestamp() as f64)
2561                })
2562                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2563        );
2564    }
2565    if let Some(value) = query.get("ReportPlanName") {
2566        input.by_report_plan_name = Some(value.to_string());
2567    }
2568    if let Some(value) = query.get("Status") {
2569        input.by_status = Some(value.to_string());
2570    }
2571    if let Some(value) = query.get("MaxResults") {
2572        input.max_results = Some(
2573            value
2574                .parse::<i32>()
2575                .map_err(|err| format!("failed to parse integer: {err}"))?,
2576        );
2577    }
2578    if let Some(value) = query.get("NextToken") {
2579        input.next_token = Some(value.to_string());
2580    }
2581    Ok(input)
2582}
2583
2584/// Deserialize request for restJson protocol.
2585pub fn deserialize_list_report_plans_request(
2586    request: &winterbaume_core::MockRequest,
2587    labels: &[(&str, &str)],
2588    query: &std::collections::HashMap<String, String>,
2589) -> Result<ListReportPlansInput, String> {
2590    let mut input = ListReportPlansInput::default();
2591    if let Some(value) = query.get("MaxResults") {
2592        input.max_results = Some(
2593            value
2594                .parse::<i32>()
2595                .map_err(|err| format!("failed to parse integer: {err}"))?,
2596        );
2597    }
2598    if let Some(value) = query.get("NextToken") {
2599        input.next_token = Some(value.to_string());
2600    }
2601    Ok(input)
2602}
2603
2604/// Deserialize request for restJson protocol.
2605pub fn deserialize_list_restore_access_backup_vaults_request(
2606    request: &winterbaume_core::MockRequest,
2607    labels: &[(&str, &str)],
2608    query: &std::collections::HashMap<String, String>,
2609) -> Result<ListRestoreAccessBackupVaultsInput, String> {
2610    let mut input = ListRestoreAccessBackupVaultsInput::default();
2611    for (name, value) in labels {
2612        match *name {
2613            "BackupVaultName" => {
2614                input.backup_vault_name = value.to_string();
2615            }
2616            _ => {}
2617        }
2618    }
2619    if let Some(value) = query.get("maxResults") {
2620        input.max_results = Some(
2621            value
2622                .parse::<i32>()
2623                .map_err(|err| format!("failed to parse integer: {err}"))?,
2624        );
2625    }
2626    if let Some(value) = query.get("nextToken") {
2627        input.next_token = Some(value.to_string());
2628    }
2629    Ok(input)
2630}
2631
2632/// Deserialize request for restJson protocol.
2633pub fn deserialize_list_restore_job_summaries_request(
2634    request: &winterbaume_core::MockRequest,
2635    labels: &[(&str, &str)],
2636    query: &std::collections::HashMap<String, String>,
2637) -> Result<ListRestoreJobSummariesInput, String> {
2638    let mut input = ListRestoreJobSummariesInput::default();
2639    if let Some(value) = query.get("AccountId") {
2640        input.account_id = Some(value.to_string());
2641    }
2642    if let Some(value) = query.get("AggregationPeriod") {
2643        input.aggregation_period = Some(value.to_string());
2644    }
2645    if let Some(value) = query.get("MaxResults") {
2646        input.max_results = Some(
2647            value
2648                .parse::<i32>()
2649                .map_err(|err| format!("failed to parse integer: {err}"))?,
2650        );
2651    }
2652    if let Some(value) = query.get("NextToken") {
2653        input.next_token = Some(value.to_string());
2654    }
2655    if let Some(value) = query.get("ResourceType") {
2656        input.resource_type = Some(value.to_string());
2657    }
2658    if let Some(value) = query.get("State") {
2659        input.state = Some(value.to_string());
2660    }
2661    Ok(input)
2662}
2663
2664/// Deserialize request for restJson protocol.
2665pub fn deserialize_list_restore_jobs_request(
2666    request: &winterbaume_core::MockRequest,
2667    labels: &[(&str, &str)],
2668    query: &std::collections::HashMap<String, String>,
2669) -> Result<ListRestoreJobsInput, String> {
2670    let mut input = ListRestoreJobsInput::default();
2671    if let Some(value) = query.get("accountId") {
2672        input.by_account_id = Some(value.to_string());
2673    }
2674    if let Some(value) = query.get("completeAfter") {
2675        input.by_complete_after = Some(
2676            value
2677                .parse::<f64>()
2678                .ok()
2679                .or_else(|| {
2680                    chrono::DateTime::parse_from_rfc3339(value)
2681                        .ok()
2682                        .map(|dt| dt.timestamp() as f64)
2683                })
2684                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2685        );
2686    }
2687    if let Some(value) = query.get("completeBefore") {
2688        input.by_complete_before = Some(
2689            value
2690                .parse::<f64>()
2691                .ok()
2692                .or_else(|| {
2693                    chrono::DateTime::parse_from_rfc3339(value)
2694                        .ok()
2695                        .map(|dt| dt.timestamp() as f64)
2696                })
2697                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2698        );
2699    }
2700    if let Some(value) = query.get("createdAfter") {
2701        input.by_created_after = Some(
2702            value
2703                .parse::<f64>()
2704                .ok()
2705                .or_else(|| {
2706                    chrono::DateTime::parse_from_rfc3339(value)
2707                        .ok()
2708                        .map(|dt| dt.timestamp() as f64)
2709                })
2710                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2711        );
2712    }
2713    if let Some(value) = query.get("createdBefore") {
2714        input.by_created_before = Some(
2715            value
2716                .parse::<f64>()
2717                .ok()
2718                .or_else(|| {
2719                    chrono::DateTime::parse_from_rfc3339(value)
2720                        .ok()
2721                        .map(|dt| dt.timestamp() as f64)
2722                })
2723                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2724        );
2725    }
2726    if let Some(value) = query.get("parentJobId") {
2727        input.by_parent_job_id = Some(value.to_string());
2728    }
2729    if let Some(value) = query.get("resourceType") {
2730        input.by_resource_type = Some(value.to_string());
2731    }
2732    if let Some(value) = query.get("restoreTestingPlanArn") {
2733        input.by_restore_testing_plan_arn = Some(value.to_string());
2734    }
2735    if let Some(value) = query.get("status") {
2736        input.by_status = Some(value.to_string());
2737    }
2738    if let Some(value) = query.get("maxResults") {
2739        input.max_results = Some(
2740            value
2741                .parse::<i32>()
2742                .map_err(|err| format!("failed to parse integer: {err}"))?,
2743        );
2744    }
2745    if let Some(value) = query.get("nextToken") {
2746        input.next_token = Some(value.to_string());
2747    }
2748    Ok(input)
2749}
2750
2751/// Deserialize request for restJson protocol.
2752pub fn deserialize_list_restore_jobs_by_protected_resource_request(
2753    request: &winterbaume_core::MockRequest,
2754    labels: &[(&str, &str)],
2755    query: &std::collections::HashMap<String, String>,
2756) -> Result<ListRestoreJobsByProtectedResourceInput, String> {
2757    let mut input = ListRestoreJobsByProtectedResourceInput::default();
2758    for (name, value) in labels {
2759        match *name {
2760            "ResourceArn" => {
2761                input.resource_arn = value.to_string();
2762            }
2763            _ => {}
2764        }
2765    }
2766    if let Some(value) = query.get("recoveryPointCreationDateAfter") {
2767        input.by_recovery_point_creation_date_after = Some(
2768            value
2769                .parse::<f64>()
2770                .ok()
2771                .or_else(|| {
2772                    chrono::DateTime::parse_from_rfc3339(value)
2773                        .ok()
2774                        .map(|dt| dt.timestamp() as f64)
2775                })
2776                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2777        );
2778    }
2779    if let Some(value) = query.get("recoveryPointCreationDateBefore") {
2780        input.by_recovery_point_creation_date_before = Some(
2781            value
2782                .parse::<f64>()
2783                .ok()
2784                .or_else(|| {
2785                    chrono::DateTime::parse_from_rfc3339(value)
2786                        .ok()
2787                        .map(|dt| dt.timestamp() as f64)
2788                })
2789                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2790        );
2791    }
2792    if let Some(value) = query.get("status") {
2793        input.by_status = Some(value.to_string());
2794    }
2795    if let Some(value) = query.get("maxResults") {
2796        input.max_results = Some(
2797            value
2798                .parse::<i32>()
2799                .map_err(|err| format!("failed to parse integer: {err}"))?,
2800        );
2801    }
2802    if let Some(value) = query.get("nextToken") {
2803        input.next_token = Some(value.to_string());
2804    }
2805    Ok(input)
2806}
2807
2808/// Deserialize request for restJson protocol.
2809pub fn deserialize_list_restore_testing_plans_request(
2810    request: &winterbaume_core::MockRequest,
2811    labels: &[(&str, &str)],
2812    query: &std::collections::HashMap<String, String>,
2813) -> Result<ListRestoreTestingPlansInput, String> {
2814    let mut input = ListRestoreTestingPlansInput::default();
2815    if let Some(value) = query.get("MaxResults") {
2816        input.max_results = Some(
2817            value
2818                .parse::<i32>()
2819                .map_err(|err| format!("failed to parse integer: {err}"))?,
2820        );
2821    }
2822    if let Some(value) = query.get("NextToken") {
2823        input.next_token = Some(value.to_string());
2824    }
2825    Ok(input)
2826}
2827
2828/// Deserialize request for restJson protocol.
2829pub fn deserialize_list_restore_testing_selections_request(
2830    request: &winterbaume_core::MockRequest,
2831    labels: &[(&str, &str)],
2832    query: &std::collections::HashMap<String, String>,
2833) -> Result<ListRestoreTestingSelectionsInput, String> {
2834    let mut input = ListRestoreTestingSelectionsInput::default();
2835    for (name, value) in labels {
2836        match *name {
2837            "RestoreTestingPlanName" => {
2838                input.restore_testing_plan_name = value.to_string();
2839            }
2840            _ => {}
2841        }
2842    }
2843    if let Some(value) = query.get("MaxResults") {
2844        input.max_results = Some(
2845            value
2846                .parse::<i32>()
2847                .map_err(|err| format!("failed to parse integer: {err}"))?,
2848        );
2849    }
2850    if let Some(value) = query.get("NextToken") {
2851        input.next_token = Some(value.to_string());
2852    }
2853    Ok(input)
2854}
2855
2856/// Deserialize request for restJson protocol.
2857pub fn deserialize_list_scan_job_summaries_request(
2858    request: &winterbaume_core::MockRequest,
2859    labels: &[(&str, &str)],
2860    query: &std::collections::HashMap<String, String>,
2861) -> Result<ListScanJobSummariesInput, String> {
2862    let mut input = ListScanJobSummariesInput::default();
2863    if let Some(value) = query.get("AccountId") {
2864        input.account_id = Some(value.to_string());
2865    }
2866    if let Some(value) = query.get("AggregationPeriod") {
2867        input.aggregation_period = Some(value.to_string());
2868    }
2869    if let Some(value) = query.get("MalwareScanner") {
2870        input.malware_scanner = Some(value.to_string());
2871    }
2872    if let Some(value) = query.get("MaxResults") {
2873        input.max_results = Some(
2874            value
2875                .parse::<i32>()
2876                .map_err(|err| format!("failed to parse integer: {err}"))?,
2877        );
2878    }
2879    if let Some(value) = query.get("NextToken") {
2880        input.next_token = Some(value.to_string());
2881    }
2882    if let Some(value) = query.get("ResourceType") {
2883        input.resource_type = Some(value.to_string());
2884    }
2885    if let Some(value) = query.get("ScanResultStatus") {
2886        input.scan_result_status = Some(value.to_string());
2887    }
2888    if let Some(value) = query.get("State") {
2889        input.state = Some(value.to_string());
2890    }
2891    Ok(input)
2892}
2893
2894/// Deserialize request for restJson protocol.
2895pub fn deserialize_list_scan_jobs_request(
2896    request: &winterbaume_core::MockRequest,
2897    labels: &[(&str, &str)],
2898    query: &std::collections::HashMap<String, String>,
2899) -> Result<ListScanJobsInput, String> {
2900    let mut input = ListScanJobsInput::default();
2901    if let Some(value) = query.get("ByAccountId") {
2902        input.by_account_id = Some(value.to_string());
2903    }
2904    if let Some(value) = query.get("ByBackupVaultName") {
2905        input.by_backup_vault_name = Some(value.to_string());
2906    }
2907    if let Some(value) = query.get("ByCompleteAfter") {
2908        input.by_complete_after = Some(
2909            value
2910                .parse::<f64>()
2911                .ok()
2912                .or_else(|| {
2913                    chrono::DateTime::parse_from_rfc3339(value)
2914                        .ok()
2915                        .map(|dt| dt.timestamp() as f64)
2916                })
2917                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2918        );
2919    }
2920    if let Some(value) = query.get("ByCompleteBefore") {
2921        input.by_complete_before = Some(
2922            value
2923                .parse::<f64>()
2924                .ok()
2925                .or_else(|| {
2926                    chrono::DateTime::parse_from_rfc3339(value)
2927                        .ok()
2928                        .map(|dt| dt.timestamp() as f64)
2929                })
2930                .ok_or_else(|| format!("failed to parse timestamp: {}", value))?,
2931        );
2932    }
2933    if let Some(value) = query.get("ByMalwareScanner") {
2934        input.by_malware_scanner = Some(value.to_string());
2935    }
2936    if let Some(value) = query.get("ByRecoveryPointArn") {
2937        input.by_recovery_point_arn = Some(value.to_string());
2938    }
2939    if let Some(value) = query.get("ByResourceArn") {
2940        input.by_resource_arn = Some(value.to_string());
2941    }
2942    if let Some(value) = query.get("ByResourceType") {
2943        input.by_resource_type = Some(value.to_string());
2944    }
2945    if let Some(value) = query.get("ByScanResultStatus") {
2946        input.by_scan_result_status = Some(value.to_string());
2947    }
2948    if let Some(value) = query.get("ByState") {
2949        input.by_state = Some(value.to_string());
2950    }
2951    if let Some(value) = query.get("MaxResults") {
2952        input.max_results = Some(
2953            value
2954                .parse::<i32>()
2955                .map_err(|err| format!("failed to parse integer: {err}"))?,
2956        );
2957    }
2958    if let Some(value) = query.get("NextToken") {
2959        input.next_token = Some(value.to_string());
2960    }
2961    Ok(input)
2962}
2963
2964/// Deserialize request for restJson protocol.
2965pub fn deserialize_list_tags_request(
2966    request: &winterbaume_core::MockRequest,
2967    labels: &[(&str, &str)],
2968    query: &std::collections::HashMap<String, String>,
2969) -> Result<ListTagsInput, String> {
2970    let mut input = ListTagsInput::default();
2971    for (name, value) in labels {
2972        match *name {
2973            "ResourceArn" => {
2974                input.resource_arn = value.to_string();
2975            }
2976            _ => {}
2977        }
2978    }
2979    if let Some(value) = query.get("maxResults") {
2980        input.max_results = Some(
2981            value
2982                .parse::<i32>()
2983                .map_err(|err| format!("failed to parse integer: {err}"))?,
2984        );
2985    }
2986    if let Some(value) = query.get("nextToken") {
2987        input.next_token = Some(value.to_string());
2988    }
2989    Ok(input)
2990}
2991
2992/// Deserialize request for restJson protocol.
2993pub fn deserialize_list_tiering_configurations_request(
2994    request: &winterbaume_core::MockRequest,
2995    labels: &[(&str, &str)],
2996    query: &std::collections::HashMap<String, String>,
2997) -> Result<ListTieringConfigurationsInput, String> {
2998    let mut input = ListTieringConfigurationsInput::default();
2999    if let Some(value) = query.get("maxResults") {
3000        input.max_results = Some(
3001            value
3002                .parse::<i32>()
3003                .map_err(|err| format!("failed to parse integer: {err}"))?,
3004        );
3005    }
3006    if let Some(value) = query.get("nextToken") {
3007        input.next_token = Some(value.to_string());
3008    }
3009    Ok(input)
3010}
3011
3012/// Deserialize request for restJson protocol.
3013pub fn deserialize_put_backup_vault_access_policy_request(
3014    request: &winterbaume_core::MockRequest,
3015    labels: &[(&str, &str)],
3016    query: &std::collections::HashMap<String, String>,
3017) -> Result<PutBackupVaultAccessPolicyInput, String> {
3018    let mut input = PutBackupVaultAccessPolicyInput::default();
3019    if !request.body.is_empty() {
3020        input = serde_json::from_slice::<PutBackupVaultAccessPolicyInput>(&request.body).map_err(
3021            |err| format!("failed to deserialize PutBackupVaultAccessPolicy request: {err}"),
3022        )?;
3023    }
3024    for (name, value) in labels {
3025        match *name {
3026            "BackupVaultName" => {
3027                input.backup_vault_name = value.to_string();
3028            }
3029            _ => {}
3030        }
3031    }
3032    Ok(input)
3033}
3034
3035/// Deserialize request for restJson protocol.
3036pub fn deserialize_put_backup_vault_lock_configuration_request(
3037    request: &winterbaume_core::MockRequest,
3038    labels: &[(&str, &str)],
3039    query: &std::collections::HashMap<String, String>,
3040) -> Result<PutBackupVaultLockConfigurationInput, String> {
3041    let mut input = PutBackupVaultLockConfigurationInput::default();
3042    if !request.body.is_empty() {
3043        input = serde_json::from_slice::<PutBackupVaultLockConfigurationInput>(&request.body)
3044            .map_err(|err| {
3045                format!("failed to deserialize PutBackupVaultLockConfiguration request: {err}")
3046            })?;
3047    }
3048    for (name, value) in labels {
3049        match *name {
3050            "BackupVaultName" => {
3051                input.backup_vault_name = value.to_string();
3052            }
3053            _ => {}
3054        }
3055    }
3056    Ok(input)
3057}
3058
3059/// Deserialize request for restJson protocol.
3060pub fn deserialize_put_backup_vault_notifications_request(
3061    request: &winterbaume_core::MockRequest,
3062    labels: &[(&str, &str)],
3063    query: &std::collections::HashMap<String, String>,
3064) -> Result<PutBackupVaultNotificationsInput, String> {
3065    let mut input = PutBackupVaultNotificationsInput::default();
3066    if !request.body.is_empty() {
3067        input = serde_json::from_slice::<PutBackupVaultNotificationsInput>(&request.body).map_err(
3068            |err| format!("failed to deserialize PutBackupVaultNotifications request: {err}"),
3069        )?;
3070    }
3071    for (name, value) in labels {
3072        match *name {
3073            "BackupVaultName" => {
3074                input.backup_vault_name = value.to_string();
3075            }
3076            _ => {}
3077        }
3078    }
3079    Ok(input)
3080}
3081
3082/// Deserialize request for restJson protocol.
3083pub fn deserialize_put_restore_validation_result_request(
3084    request: &winterbaume_core::MockRequest,
3085    labels: &[(&str, &str)],
3086    query: &std::collections::HashMap<String, String>,
3087) -> Result<PutRestoreValidationResultInput, String> {
3088    let mut input = PutRestoreValidationResultInput::default();
3089    if !request.body.is_empty() {
3090        input = serde_json::from_slice::<PutRestoreValidationResultInput>(&request.body).map_err(
3091            |err| format!("failed to deserialize PutRestoreValidationResult request: {err}"),
3092        )?;
3093    }
3094    for (name, value) in labels {
3095        match *name {
3096            "RestoreJobId" => {
3097                input.restore_job_id = value.to_string();
3098            }
3099            _ => {}
3100        }
3101    }
3102    Ok(input)
3103}
3104
3105/// Deserialize request for restJson protocol.
3106pub fn deserialize_revoke_restore_access_backup_vault_request(
3107    request: &winterbaume_core::MockRequest,
3108    labels: &[(&str, &str)],
3109    query: &std::collections::HashMap<String, String>,
3110) -> Result<RevokeRestoreAccessBackupVaultInput, String> {
3111    let mut input = RevokeRestoreAccessBackupVaultInput::default();
3112    for (name, value) in labels {
3113        match *name {
3114            "BackupVaultName" => {
3115                input.backup_vault_name = value.to_string();
3116            }
3117            "RestoreAccessBackupVaultArn" => {
3118                input.restore_access_backup_vault_arn = value.to_string();
3119            }
3120            _ => {}
3121        }
3122    }
3123    if let Some(value) = query.get("requesterComment") {
3124        input.requester_comment = Some(value.to_string());
3125    }
3126    Ok(input)
3127}
3128
3129/// Deserialize request for restJson protocol.
3130pub fn deserialize_start_backup_job_request(
3131    request: &winterbaume_core::MockRequest,
3132    labels: &[(&str, &str)],
3133    query: &std::collections::HashMap<String, String>,
3134) -> Result<StartBackupJobInput, String> {
3135    let mut input = StartBackupJobInput::default();
3136    if !request.body.is_empty() {
3137        input = serde_json::from_slice::<StartBackupJobInput>(&request.body)
3138            .map_err(|err| format!("failed to deserialize StartBackupJob request: {err}"))?;
3139    }
3140    Ok(input)
3141}
3142
3143/// Deserialize request for restJson protocol.
3144pub fn deserialize_start_copy_job_request(
3145    request: &winterbaume_core::MockRequest,
3146    labels: &[(&str, &str)],
3147    query: &std::collections::HashMap<String, String>,
3148) -> Result<StartCopyJobInput, String> {
3149    let mut input = StartCopyJobInput::default();
3150    if !request.body.is_empty() {
3151        input = serde_json::from_slice::<StartCopyJobInput>(&request.body)
3152            .map_err(|err| format!("failed to deserialize StartCopyJob request: {err}"))?;
3153    }
3154    Ok(input)
3155}
3156
3157/// Deserialize request for restJson protocol.
3158pub fn deserialize_start_report_job_request(
3159    request: &winterbaume_core::MockRequest,
3160    labels: &[(&str, &str)],
3161    query: &std::collections::HashMap<String, String>,
3162) -> Result<StartReportJobInput, String> {
3163    let mut input = StartReportJobInput::default();
3164    if !request.body.is_empty() {
3165        input = serde_json::from_slice::<StartReportJobInput>(&request.body)
3166            .map_err(|err| format!("failed to deserialize StartReportJob request: {err}"))?;
3167    }
3168    for (name, value) in labels {
3169        match *name {
3170            "ReportPlanName" => {
3171                input.report_plan_name = value.to_string();
3172            }
3173            _ => {}
3174        }
3175    }
3176    Ok(input)
3177}
3178
3179/// Deserialize request for restJson protocol.
3180pub fn deserialize_start_restore_job_request(
3181    request: &winterbaume_core::MockRequest,
3182    labels: &[(&str, &str)],
3183    query: &std::collections::HashMap<String, String>,
3184) -> Result<StartRestoreJobInput, String> {
3185    let mut input = StartRestoreJobInput::default();
3186    if !request.body.is_empty() {
3187        input = serde_json::from_slice::<StartRestoreJobInput>(&request.body)
3188            .map_err(|err| format!("failed to deserialize StartRestoreJob request: {err}"))?;
3189    }
3190    Ok(input)
3191}
3192
3193/// Deserialize request for restJson protocol.
3194pub fn deserialize_start_scan_job_request(
3195    request: &winterbaume_core::MockRequest,
3196    labels: &[(&str, &str)],
3197    query: &std::collections::HashMap<String, String>,
3198) -> Result<StartScanJobInput, String> {
3199    let mut input = StartScanJobInput::default();
3200    if !request.body.is_empty() {
3201        input = serde_json::from_slice::<StartScanJobInput>(&request.body)
3202            .map_err(|err| format!("failed to deserialize StartScanJob request: {err}"))?;
3203    }
3204    Ok(input)
3205}
3206
3207/// Deserialize request for restJson protocol.
3208pub fn deserialize_stop_backup_job_request(
3209    request: &winterbaume_core::MockRequest,
3210    labels: &[(&str, &str)],
3211    query: &std::collections::HashMap<String, String>,
3212) -> Result<StopBackupJobInput, String> {
3213    let mut input = StopBackupJobInput::default();
3214    for (name, value) in labels {
3215        match *name {
3216            "BackupJobId" => {
3217                input.backup_job_id = value.to_string();
3218            }
3219            _ => {}
3220        }
3221    }
3222    Ok(input)
3223}
3224
3225/// Deserialize request for restJson protocol.
3226pub fn deserialize_tag_resource_request(
3227    request: &winterbaume_core::MockRequest,
3228    labels: &[(&str, &str)],
3229    query: &std::collections::HashMap<String, String>,
3230) -> Result<TagResourceInput, String> {
3231    let mut input = TagResourceInput::default();
3232    if !request.body.is_empty() {
3233        input = serde_json::from_slice::<TagResourceInput>(&request.body)
3234            .map_err(|err| format!("failed to deserialize TagResource request: {err}"))?;
3235    }
3236    for (name, value) in labels {
3237        match *name {
3238            "ResourceArn" => {
3239                input.resource_arn = value.to_string();
3240            }
3241            _ => {}
3242        }
3243    }
3244    Ok(input)
3245}
3246
3247/// Deserialize request for restJson protocol.
3248pub fn deserialize_untag_resource_request(
3249    request: &winterbaume_core::MockRequest,
3250    labels: &[(&str, &str)],
3251    query: &std::collections::HashMap<String, String>,
3252) -> Result<UntagResourceInput, String> {
3253    let mut input = UntagResourceInput::default();
3254    if !request.body.is_empty() {
3255        input = serde_json::from_slice::<UntagResourceInput>(&request.body)
3256            .map_err(|err| format!("failed to deserialize UntagResource request: {err}"))?;
3257    }
3258    for (name, value) in labels {
3259        match *name {
3260            "ResourceArn" => {
3261                input.resource_arn = value.to_string();
3262            }
3263            _ => {}
3264        }
3265    }
3266    Ok(input)
3267}
3268
3269/// Deserialize request for restJson protocol.
3270pub fn deserialize_update_backup_plan_request(
3271    request: &winterbaume_core::MockRequest,
3272    labels: &[(&str, &str)],
3273    query: &std::collections::HashMap<String, String>,
3274) -> Result<UpdateBackupPlanInput, String> {
3275    let mut input = UpdateBackupPlanInput::default();
3276    if !request.body.is_empty() {
3277        input = serde_json::from_slice::<UpdateBackupPlanInput>(&request.body)
3278            .map_err(|err| format!("failed to deserialize UpdateBackupPlan request: {err}"))?;
3279    }
3280    for (name, value) in labels {
3281        match *name {
3282            "BackupPlanId" => {
3283                input.backup_plan_id = value.to_string();
3284            }
3285            _ => {}
3286        }
3287    }
3288    Ok(input)
3289}
3290
3291/// Deserialize request for restJson protocol.
3292pub fn deserialize_update_framework_request(
3293    request: &winterbaume_core::MockRequest,
3294    labels: &[(&str, &str)],
3295    query: &std::collections::HashMap<String, String>,
3296) -> Result<UpdateFrameworkInput, String> {
3297    let mut input = UpdateFrameworkInput::default();
3298    if !request.body.is_empty() {
3299        input = serde_json::from_slice::<UpdateFrameworkInput>(&request.body)
3300            .map_err(|err| format!("failed to deserialize UpdateFramework request: {err}"))?;
3301    }
3302    for (name, value) in labels {
3303        match *name {
3304            "FrameworkName" => {
3305                input.framework_name = value.to_string();
3306            }
3307            _ => {}
3308        }
3309    }
3310    Ok(input)
3311}
3312
3313/// Deserialize request for restJson protocol.
3314pub fn deserialize_update_global_settings_request(
3315    request: &winterbaume_core::MockRequest,
3316    labels: &[(&str, &str)],
3317    query: &std::collections::HashMap<String, String>,
3318) -> Result<UpdateGlobalSettingsInput, String> {
3319    let mut input = UpdateGlobalSettingsInput::default();
3320    if !request.body.is_empty() {
3321        input = serde_json::from_slice::<UpdateGlobalSettingsInput>(&request.body)
3322            .map_err(|err| format!("failed to deserialize UpdateGlobalSettings request: {err}"))?;
3323    }
3324    Ok(input)
3325}
3326
3327/// Deserialize request for restJson protocol.
3328pub fn deserialize_update_recovery_point_index_settings_request(
3329    request: &winterbaume_core::MockRequest,
3330    labels: &[(&str, &str)],
3331    query: &std::collections::HashMap<String, String>,
3332) -> Result<UpdateRecoveryPointIndexSettingsInput, String> {
3333    let mut input = UpdateRecoveryPointIndexSettingsInput::default();
3334    if !request.body.is_empty() {
3335        input = serde_json::from_slice::<UpdateRecoveryPointIndexSettingsInput>(&request.body)
3336            .map_err(|err| {
3337                format!("failed to deserialize UpdateRecoveryPointIndexSettings request: {err}")
3338            })?;
3339    }
3340    for (name, value) in labels {
3341        match *name {
3342            "BackupVaultName" => {
3343                input.backup_vault_name = value.to_string();
3344            }
3345            "RecoveryPointArn" => {
3346                input.recovery_point_arn = value.to_string();
3347            }
3348            _ => {}
3349        }
3350    }
3351    Ok(input)
3352}
3353
3354/// Deserialize request for restJson protocol.
3355pub fn deserialize_update_recovery_point_lifecycle_request(
3356    request: &winterbaume_core::MockRequest,
3357    labels: &[(&str, &str)],
3358    query: &std::collections::HashMap<String, String>,
3359) -> Result<UpdateRecoveryPointLifecycleInput, String> {
3360    let mut input = UpdateRecoveryPointLifecycleInput::default();
3361    if !request.body.is_empty() {
3362        input = serde_json::from_slice::<UpdateRecoveryPointLifecycleInput>(&request.body)
3363            .map_err(|err| {
3364                format!("failed to deserialize UpdateRecoveryPointLifecycle request: {err}")
3365            })?;
3366    }
3367    for (name, value) in labels {
3368        match *name {
3369            "BackupVaultName" => {
3370                input.backup_vault_name = value.to_string();
3371            }
3372            "RecoveryPointArn" => {
3373                input.recovery_point_arn = value.to_string();
3374            }
3375            _ => {}
3376        }
3377    }
3378    Ok(input)
3379}
3380
3381/// Deserialize request for restJson protocol.
3382pub fn deserialize_update_region_settings_request(
3383    request: &winterbaume_core::MockRequest,
3384    labels: &[(&str, &str)],
3385    query: &std::collections::HashMap<String, String>,
3386) -> Result<UpdateRegionSettingsInput, String> {
3387    let mut input = UpdateRegionSettingsInput::default();
3388    if !request.body.is_empty() {
3389        input = serde_json::from_slice::<UpdateRegionSettingsInput>(&request.body)
3390            .map_err(|err| format!("failed to deserialize UpdateRegionSettings request: {err}"))?;
3391    }
3392    Ok(input)
3393}
3394
3395/// Deserialize request for restJson protocol.
3396pub fn deserialize_update_report_plan_request(
3397    request: &winterbaume_core::MockRequest,
3398    labels: &[(&str, &str)],
3399    query: &std::collections::HashMap<String, String>,
3400) -> Result<UpdateReportPlanInput, String> {
3401    let mut input = UpdateReportPlanInput::default();
3402    if !request.body.is_empty() {
3403        input = serde_json::from_slice::<UpdateReportPlanInput>(&request.body)
3404            .map_err(|err| format!("failed to deserialize UpdateReportPlan request: {err}"))?;
3405    }
3406    for (name, value) in labels {
3407        match *name {
3408            "ReportPlanName" => {
3409                input.report_plan_name = value.to_string();
3410            }
3411            _ => {}
3412        }
3413    }
3414    Ok(input)
3415}
3416
3417/// Deserialize request for restJson protocol.
3418pub fn deserialize_update_restore_testing_plan_request(
3419    request: &winterbaume_core::MockRequest,
3420    labels: &[(&str, &str)],
3421    query: &std::collections::HashMap<String, String>,
3422) -> Result<UpdateRestoreTestingPlanInput, String> {
3423    let mut input = UpdateRestoreTestingPlanInput::default();
3424    if !request.body.is_empty() {
3425        input = serde_json::from_slice::<UpdateRestoreTestingPlanInput>(&request.body).map_err(
3426            |err| format!("failed to deserialize UpdateRestoreTestingPlan request: {err}"),
3427        )?;
3428    }
3429    for (name, value) in labels {
3430        match *name {
3431            "RestoreTestingPlanName" => {
3432                input.restore_testing_plan_name = value.to_string();
3433            }
3434            _ => {}
3435        }
3436    }
3437    Ok(input)
3438}
3439
3440/// Deserialize request for restJson protocol.
3441pub fn deserialize_update_restore_testing_selection_request(
3442    request: &winterbaume_core::MockRequest,
3443    labels: &[(&str, &str)],
3444    query: &std::collections::HashMap<String, String>,
3445) -> Result<UpdateRestoreTestingSelectionInput, String> {
3446    let mut input = UpdateRestoreTestingSelectionInput::default();
3447    if !request.body.is_empty() {
3448        input = serde_json::from_slice::<UpdateRestoreTestingSelectionInput>(&request.body)
3449            .map_err(|err| {
3450                format!("failed to deserialize UpdateRestoreTestingSelection request: {err}")
3451            })?;
3452    }
3453    for (name, value) in labels {
3454        match *name {
3455            "RestoreTestingPlanName" => {
3456                input.restore_testing_plan_name = value.to_string();
3457            }
3458            "RestoreTestingSelectionName" => {
3459                input.restore_testing_selection_name = value.to_string();
3460            }
3461            _ => {}
3462        }
3463    }
3464    Ok(input)
3465}
3466
3467/// Deserialize request for restJson protocol.
3468pub fn deserialize_update_tiering_configuration_request(
3469    request: &winterbaume_core::MockRequest,
3470    labels: &[(&str, &str)],
3471    query: &std::collections::HashMap<String, String>,
3472) -> Result<UpdateTieringConfigurationInput, String> {
3473    let mut input = UpdateTieringConfigurationInput::default();
3474    if !request.body.is_empty() {
3475        input = serde_json::from_slice::<UpdateTieringConfigurationInput>(&request.body).map_err(
3476            |err| format!("failed to deserialize UpdateTieringConfiguration request: {err}"),
3477        )?;
3478    }
3479    for (name, value) in labels {
3480        match *name {
3481            "TieringConfigurationName" => {
3482                input.tiering_configuration_name = value.to_string();
3483            }
3484            _ => {}
3485        }
3486    }
3487    Ok(input)
3488}