Skip to main content

winterbaume_appsync/
wire.rs

1//! Auto-generated wire helpers from Smithy models.
2//! Do not edit manually. Regenerate with:
3//!   smithy-codegen gen-serializers winterbaume-appsync
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 response for restJson protocol.
19pub fn serialize_associate_api_response(result: &AssociateApiResponse) -> MockResponse {
20    let status = 200_u16;
21    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
22    MockResponse::rest_json(status, body)
23}
24
25/// Serialize response for restJson protocol.
26pub fn serialize_associate_merged_graphql_api_response(
27    result: &AssociateMergedGraphqlApiResponse,
28) -> MockResponse {
29    let status = 200_u16;
30    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
31    MockResponse::rest_json(status, body)
32}
33
34/// Serialize response for restJson protocol.
35pub fn serialize_associate_source_graphql_api_response(
36    result: &AssociateSourceGraphqlApiResponse,
37) -> MockResponse {
38    let status = 200_u16;
39    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
40    MockResponse::rest_json(status, body)
41}
42
43/// Serialize response for restJson protocol.
44pub fn serialize_create_api_response(result: &CreateApiResponse) -> MockResponse {
45    let status = 200_u16;
46    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
47    MockResponse::rest_json(status, body)
48}
49
50/// Serialize response for restJson protocol.
51pub fn serialize_create_api_cache_response(result: &CreateApiCacheResponse) -> MockResponse {
52    let status = 200_u16;
53    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
54    MockResponse::rest_json(status, body)
55}
56
57/// Serialize response for restJson protocol.
58pub fn serialize_create_api_key_response(result: &CreateApiKeyResponse) -> MockResponse {
59    let status = 200_u16;
60    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
61    MockResponse::rest_json(status, body)
62}
63
64/// Serialize response for restJson protocol.
65pub fn serialize_create_channel_namespace_response(
66    result: &CreateChannelNamespaceResponse,
67) -> MockResponse {
68    let status = 200_u16;
69    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
70    MockResponse::rest_json(status, body)
71}
72
73/// Serialize response for restJson protocol.
74pub fn serialize_create_data_source_response(result: &CreateDataSourceResponse) -> MockResponse {
75    let status = 200_u16;
76    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
77    MockResponse::rest_json(status, body)
78}
79
80/// Serialize response for restJson protocol.
81pub fn serialize_create_domain_name_response(result: &CreateDomainNameResponse) -> MockResponse {
82    let status = 200_u16;
83    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
84    MockResponse::rest_json(status, body)
85}
86
87/// Serialize response for restJson protocol.
88pub fn serialize_create_function_response(result: &CreateFunctionResponse) -> MockResponse {
89    let status = 200_u16;
90    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
91    MockResponse::rest_json(status, body)
92}
93
94/// Serialize response for restJson protocol.
95pub fn serialize_create_graphql_api_response(result: &CreateGraphqlApiResponse) -> MockResponse {
96    let status = 200_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_resolver_response(result: &CreateResolverResponse) -> MockResponse {
103    let status = 200_u16;
104    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
105    MockResponse::rest_json(status, body)
106}
107
108/// Serialize response for restJson protocol.
109pub fn serialize_create_type_response(result: &CreateTypeResponse) -> MockResponse {
110    let status = 200_u16;
111    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
112    MockResponse::rest_json(status, body)
113}
114
115/// Serialize response for restJson protocol.
116pub fn serialize_delete_api_response(result: &DeleteApiResponse) -> MockResponse {
117    let status = 200_u16;
118    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
119    MockResponse::rest_json(status, body)
120}
121
122/// Serialize response for restJson protocol.
123pub fn serialize_delete_api_cache_response(result: &DeleteApiCacheResponse) -> MockResponse {
124    let status = 200_u16;
125    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
126    MockResponse::rest_json(status, body)
127}
128
129/// Serialize response for restJson protocol.
130pub fn serialize_delete_api_key_response(result: &DeleteApiKeyResponse) -> MockResponse {
131    let status = 200_u16;
132    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
133    MockResponse::rest_json(status, body)
134}
135
136/// Serialize response for restJson protocol.
137pub fn serialize_delete_channel_namespace_response(
138    result: &DeleteChannelNamespaceResponse,
139) -> MockResponse {
140    let status = 200_u16;
141    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
142    MockResponse::rest_json(status, body)
143}
144
145/// Serialize response for restJson protocol.
146pub fn serialize_delete_data_source_response(result: &DeleteDataSourceResponse) -> MockResponse {
147    let status = 200_u16;
148    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
149    MockResponse::rest_json(status, body)
150}
151
152/// Serialize response for restJson protocol.
153pub fn serialize_delete_domain_name_response(result: &DeleteDomainNameResponse) -> MockResponse {
154    let status = 200_u16;
155    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
156    MockResponse::rest_json(status, body)
157}
158
159/// Serialize response for restJson protocol.
160pub fn serialize_delete_function_response(result: &DeleteFunctionResponse) -> MockResponse {
161    let status = 200_u16;
162    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
163    MockResponse::rest_json(status, body)
164}
165
166/// Serialize response for restJson protocol.
167pub fn serialize_delete_graphql_api_response(result: &DeleteGraphqlApiResponse) -> MockResponse {
168    let status = 200_u16;
169    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
170    MockResponse::rest_json(status, body)
171}
172
173/// Serialize response for restJson protocol.
174pub fn serialize_delete_resolver_response(result: &DeleteResolverResponse) -> MockResponse {
175    let status = 200_u16;
176    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
177    MockResponse::rest_json(status, body)
178}
179
180/// Serialize response for restJson protocol.
181pub fn serialize_delete_type_response(result: &DeleteTypeResponse) -> MockResponse {
182    let status = 200_u16;
183    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
184    MockResponse::rest_json(status, body)
185}
186
187/// Serialize response for restJson protocol.
188pub fn serialize_disassociate_api_response(result: &DisassociateApiResponse) -> MockResponse {
189    let status = 200_u16;
190    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
191    MockResponse::rest_json(status, body)
192}
193
194/// Serialize response for restJson protocol.
195pub fn serialize_disassociate_merged_graphql_api_response(
196    result: &DisassociateMergedGraphqlApiResponse,
197) -> MockResponse {
198    let status = 200_u16;
199    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
200    MockResponse::rest_json(status, body)
201}
202
203/// Serialize response for restJson protocol.
204pub fn serialize_disassociate_source_graphql_api_response(
205    result: &DisassociateSourceGraphqlApiResponse,
206) -> MockResponse {
207    let status = 200_u16;
208    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
209    MockResponse::rest_json(status, body)
210}
211
212/// Serialize response for restJson protocol.
213pub fn serialize_evaluate_code_response(result: &EvaluateCodeResponse) -> MockResponse {
214    let status = 200_u16;
215    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
216    MockResponse::rest_json(status, body)
217}
218
219/// Serialize response for restJson protocol.
220pub fn serialize_evaluate_mapping_template_response(
221    result: &EvaluateMappingTemplateResponse,
222) -> MockResponse {
223    let status = 200_u16;
224    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
225    MockResponse::rest_json(status, body)
226}
227
228/// Serialize response for restJson protocol.
229pub fn serialize_flush_api_cache_response(result: &FlushApiCacheResponse) -> MockResponse {
230    let status = 200_u16;
231    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
232    MockResponse::rest_json(status, body)
233}
234
235/// Serialize response for restJson protocol.
236pub fn serialize_get_api_response(result: &GetApiResponse) -> 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_get_api_association_response(result: &GetApiAssociationResponse) -> MockResponse {
244    let status = 200_u16;
245    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
246    MockResponse::rest_json(status, body)
247}
248
249/// Serialize response for restJson protocol.
250pub fn serialize_get_api_cache_response(result: &GetApiCacheResponse) -> MockResponse {
251    let status = 200_u16;
252    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
253    MockResponse::rest_json(status, body)
254}
255
256/// Serialize response for restJson protocol.
257pub fn serialize_get_channel_namespace_response(
258    result: &GetChannelNamespaceResponse,
259) -> 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_get_data_source_response(result: &GetDataSourceResponse) -> 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_get_data_source_introspection_response(
274    result: &GetDataSourceIntrospectionResponse,
275) -> MockResponse {
276    let status = 200_u16;
277    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
278    MockResponse::rest_json(status, body)
279}
280
281/// Serialize response for restJson protocol.
282pub fn serialize_get_domain_name_response(result: &GetDomainNameResponse) -> MockResponse {
283    let status = 200_u16;
284    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
285    MockResponse::rest_json(status, body)
286}
287
288/// Serialize response for restJson protocol.
289pub fn serialize_get_function_response(result: &GetFunctionResponse) -> MockResponse {
290    let status = 200_u16;
291    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
292    MockResponse::rest_json(status, body)
293}
294
295/// Serialize response for restJson protocol.
296pub fn serialize_get_graphql_api_response(result: &GetGraphqlApiResponse) -> MockResponse {
297    let status = 200_u16;
298    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
299    MockResponse::rest_json(status, body)
300}
301
302/// Serialize response for restJson protocol.
303pub fn serialize_get_graphql_api_environment_variables_response(
304    result: &GetGraphqlApiEnvironmentVariablesResponse,
305) -> MockResponse {
306    let status = 200_u16;
307    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
308    MockResponse::rest_json(status, body)
309}
310
311/// Serialize response for restJson protocol.
312pub fn serialize_get_introspection_schema_response(
313    result: &GetIntrospectionSchemaResponse,
314) -> MockResponse {
315    let status = 200_u16;
316    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
317    MockResponse::rest_json(status, body)
318}
319
320/// Serialize response for restJson protocol.
321pub fn serialize_get_resolver_response(result: &GetResolverResponse) -> MockResponse {
322    let status = 200_u16;
323    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
324    MockResponse::rest_json(status, body)
325}
326
327/// Serialize response for restJson protocol.
328pub fn serialize_get_schema_creation_status_response(
329    result: &GetSchemaCreationStatusResponse,
330) -> MockResponse {
331    let status = 200_u16;
332    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
333    MockResponse::rest_json(status, body)
334}
335
336/// Serialize response for restJson protocol.
337pub fn serialize_get_source_api_association_response(
338    result: &GetSourceApiAssociationResponse,
339) -> MockResponse {
340    let status = 200_u16;
341    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
342    MockResponse::rest_json(status, body)
343}
344
345/// Serialize response for restJson protocol.
346pub fn serialize_get_type_response(result: &GetTypeResponse) -> MockResponse {
347    let status = 200_u16;
348    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
349    MockResponse::rest_json(status, body)
350}
351
352/// Serialize response for restJson protocol.
353pub fn serialize_list_api_keys_response(result: &ListApiKeysResponse) -> MockResponse {
354    let status = 200_u16;
355    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
356    MockResponse::rest_json(status, body)
357}
358
359/// Serialize response for restJson protocol.
360pub fn serialize_list_apis_response(result: &ListApisResponse) -> MockResponse {
361    let status = 200_u16;
362    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
363    MockResponse::rest_json(status, body)
364}
365
366/// Serialize response for restJson protocol.
367pub fn serialize_list_channel_namespaces_response(
368    result: &ListChannelNamespacesResponse,
369) -> MockResponse {
370    let status = 200_u16;
371    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
372    MockResponse::rest_json(status, body)
373}
374
375/// Serialize response for restJson protocol.
376pub fn serialize_list_data_sources_response(result: &ListDataSourcesResponse) -> MockResponse {
377    let status = 200_u16;
378    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
379    MockResponse::rest_json(status, body)
380}
381
382/// Serialize response for restJson protocol.
383pub fn serialize_list_domain_names_response(result: &ListDomainNamesResponse) -> MockResponse {
384    let status = 200_u16;
385    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
386    MockResponse::rest_json(status, body)
387}
388
389/// Serialize response for restJson protocol.
390pub fn serialize_list_functions_response(result: &ListFunctionsResponse) -> 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_list_graphql_apis_response(result: &ListGraphqlApisResponse) -> MockResponse {
398    let status = 200_u16;
399    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
400    MockResponse::rest_json(status, body)
401}
402
403/// Serialize response for restJson protocol.
404pub fn serialize_list_resolvers_response(result: &ListResolversResponse) -> MockResponse {
405    let status = 200_u16;
406    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
407    MockResponse::rest_json(status, body)
408}
409
410/// Serialize response for restJson protocol.
411pub fn serialize_list_resolvers_by_function_response(
412    result: &ListResolversByFunctionResponse,
413) -> MockResponse {
414    let status = 200_u16;
415    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
416    MockResponse::rest_json(status, body)
417}
418
419/// Serialize response for restJson protocol.
420pub fn serialize_list_source_api_associations_response(
421    result: &ListSourceApiAssociationsResponse,
422) -> MockResponse {
423    let status = 200_u16;
424    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
425    MockResponse::rest_json(status, body)
426}
427
428/// Serialize response for restJson protocol.
429pub fn serialize_list_tags_for_resource_response(
430    result: &ListTagsForResourceResponse,
431) -> MockResponse {
432    let status = 200_u16;
433    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
434    MockResponse::rest_json(status, body)
435}
436
437/// Serialize response for restJson protocol.
438pub fn serialize_list_types_response(result: &ListTypesResponse) -> MockResponse {
439    let status = 200_u16;
440    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
441    MockResponse::rest_json(status, body)
442}
443
444/// Serialize response for restJson protocol.
445pub fn serialize_list_types_by_association_response(
446    result: &ListTypesByAssociationResponse,
447) -> MockResponse {
448    let status = 200_u16;
449    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
450    MockResponse::rest_json(status, body)
451}
452
453/// Serialize response for restJson protocol.
454pub fn serialize_put_graphql_api_environment_variables_response(
455    result: &PutGraphqlApiEnvironmentVariablesResponse,
456) -> MockResponse {
457    let status = 200_u16;
458    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
459    MockResponse::rest_json(status, body)
460}
461
462/// Serialize response for restJson protocol.
463pub fn serialize_start_data_source_introspection_response(
464    result: &StartDataSourceIntrospectionResponse,
465) -> MockResponse {
466    let status = 200_u16;
467    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
468    MockResponse::rest_json(status, body)
469}
470
471/// Serialize response for restJson protocol.
472pub fn serialize_start_schema_creation_response(
473    result: &StartSchemaCreationResponse,
474) -> MockResponse {
475    let status = 200_u16;
476    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
477    MockResponse::rest_json(status, body)
478}
479
480/// Serialize response for restJson protocol.
481pub fn serialize_start_schema_merge_response(result: &StartSchemaMergeResponse) -> MockResponse {
482    let status = 200_u16;
483    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
484    MockResponse::rest_json(status, body)
485}
486
487/// Serialize response for restJson protocol.
488pub fn serialize_tag_resource_response(result: &TagResourceResponse) -> MockResponse {
489    let status = 200_u16;
490    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
491    MockResponse::rest_json(status, body)
492}
493
494/// Serialize response for restJson protocol.
495pub fn serialize_untag_resource_response(result: &UntagResourceResponse) -> MockResponse {
496    let status = 200_u16;
497    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
498    MockResponse::rest_json(status, body)
499}
500
501/// Serialize response for restJson protocol.
502pub fn serialize_update_api_response(result: &UpdateApiResponse) -> MockResponse {
503    let status = 200_u16;
504    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
505    MockResponse::rest_json(status, body)
506}
507
508/// Serialize response for restJson protocol.
509pub fn serialize_update_api_cache_response(result: &UpdateApiCacheResponse) -> MockResponse {
510    let status = 200_u16;
511    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
512    MockResponse::rest_json(status, body)
513}
514
515/// Serialize response for restJson protocol.
516pub fn serialize_update_api_key_response(result: &UpdateApiKeyResponse) -> MockResponse {
517    let status = 200_u16;
518    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
519    MockResponse::rest_json(status, body)
520}
521
522/// Serialize response for restJson protocol.
523pub fn serialize_update_channel_namespace_response(
524    result: &UpdateChannelNamespaceResponse,
525) -> MockResponse {
526    let status = 200_u16;
527    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
528    MockResponse::rest_json(status, body)
529}
530
531/// Serialize response for restJson protocol.
532pub fn serialize_update_data_source_response(result: &UpdateDataSourceResponse) -> MockResponse {
533    let status = 200_u16;
534    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
535    MockResponse::rest_json(status, body)
536}
537
538/// Serialize response for restJson protocol.
539pub fn serialize_update_domain_name_response(result: &UpdateDomainNameResponse) -> MockResponse {
540    let status = 200_u16;
541    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
542    MockResponse::rest_json(status, body)
543}
544
545/// Serialize response for restJson protocol.
546pub fn serialize_update_function_response(result: &UpdateFunctionResponse) -> MockResponse {
547    let status = 200_u16;
548    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
549    MockResponse::rest_json(status, body)
550}
551
552/// Serialize response for restJson protocol.
553pub fn serialize_update_graphql_api_response(result: &UpdateGraphqlApiResponse) -> MockResponse {
554    let status = 200_u16;
555    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
556    MockResponse::rest_json(status, body)
557}
558
559/// Serialize response for restJson protocol.
560pub fn serialize_update_resolver_response(result: &UpdateResolverResponse) -> MockResponse {
561    let status = 200_u16;
562    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
563    MockResponse::rest_json(status, body)
564}
565
566/// Serialize response for restJson protocol.
567pub fn serialize_update_source_api_association_response(
568    result: &UpdateSourceApiAssociationResponse,
569) -> MockResponse {
570    let status = 200_u16;
571    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
572    MockResponse::rest_json(status, body)
573}
574
575/// Serialize response for restJson protocol.
576pub fn serialize_update_type_response(result: &UpdateTypeResponse) -> MockResponse {
577    let status = 200_u16;
578    let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
579    MockResponse::rest_json(status, body)
580}
581
582/// Deserialize request for restJson protocol.
583pub fn deserialize_associate_api_request(
584    request: &winterbaume_core::MockRequest,
585    labels: &[(&str, &str)],
586    query: &std::collections::HashMap<String, String>,
587) -> Result<AssociateApiRequest, String> {
588    let mut input = AssociateApiRequest::default();
589    if !request.body.is_empty() {
590        input = serde_json::from_slice::<AssociateApiRequest>(&request.body)
591            .map_err(|err| format!("failed to deserialize AssociateApi request: {err}"))?;
592    }
593    for (name, value) in labels {
594        match *name {
595            "domainName" => {
596                input.domain_name = value.to_string();
597            }
598            _ => {}
599        }
600    }
601    Ok(input)
602}
603
604/// Deserialize request for restJson protocol.
605pub fn deserialize_associate_merged_graphql_api_request(
606    request: &winterbaume_core::MockRequest,
607    labels: &[(&str, &str)],
608    query: &std::collections::HashMap<String, String>,
609) -> Result<AssociateMergedGraphqlApiRequest, String> {
610    let mut input = AssociateMergedGraphqlApiRequest::default();
611    if !request.body.is_empty() {
612        input = serde_json::from_slice::<AssociateMergedGraphqlApiRequest>(&request.body).map_err(
613            |err| format!("failed to deserialize AssociateMergedGraphqlApi request: {err}"),
614        )?;
615    }
616    for (name, value) in labels {
617        match *name {
618            "sourceApiIdentifier" => {
619                input.source_api_identifier = value.to_string();
620            }
621            _ => {}
622        }
623    }
624    Ok(input)
625}
626
627/// Deserialize request for restJson protocol.
628pub fn deserialize_associate_source_graphql_api_request(
629    request: &winterbaume_core::MockRequest,
630    labels: &[(&str, &str)],
631    query: &std::collections::HashMap<String, String>,
632) -> Result<AssociateSourceGraphqlApiRequest, String> {
633    let mut input = AssociateSourceGraphqlApiRequest::default();
634    if !request.body.is_empty() {
635        input = serde_json::from_slice::<AssociateSourceGraphqlApiRequest>(&request.body).map_err(
636            |err| format!("failed to deserialize AssociateSourceGraphqlApi request: {err}"),
637        )?;
638    }
639    for (name, value) in labels {
640        match *name {
641            "mergedApiIdentifier" => {
642                input.merged_api_identifier = value.to_string();
643            }
644            _ => {}
645        }
646    }
647    Ok(input)
648}
649
650/// Deserialize request for restJson protocol.
651pub fn deserialize_create_api_request(
652    request: &winterbaume_core::MockRequest,
653    labels: &[(&str, &str)],
654    query: &std::collections::HashMap<String, String>,
655) -> Result<CreateApiRequest, String> {
656    let mut input = CreateApiRequest::default();
657    if !request.body.is_empty() {
658        input = serde_json::from_slice::<CreateApiRequest>(&request.body)
659            .map_err(|err| format!("failed to deserialize CreateApi request: {err}"))?;
660    }
661    Ok(input)
662}
663
664/// Deserialize request for restJson protocol.
665pub fn deserialize_create_api_cache_request(
666    request: &winterbaume_core::MockRequest,
667    labels: &[(&str, &str)],
668    query: &std::collections::HashMap<String, String>,
669) -> Result<CreateApiCacheRequest, String> {
670    let mut input = CreateApiCacheRequest::default();
671    if !request.body.is_empty() {
672        input = serde_json::from_slice::<CreateApiCacheRequest>(&request.body)
673            .map_err(|err| format!("failed to deserialize CreateApiCache request: {err}"))?;
674    }
675    for (name, value) in labels {
676        match *name {
677            "apiId" => {
678                input.api_id = value.to_string();
679            }
680            _ => {}
681        }
682    }
683    Ok(input)
684}
685
686/// Deserialize request for restJson protocol.
687pub fn deserialize_create_api_key_request(
688    request: &winterbaume_core::MockRequest,
689    labels: &[(&str, &str)],
690    query: &std::collections::HashMap<String, String>,
691) -> Result<CreateApiKeyRequest, String> {
692    let mut input = CreateApiKeyRequest::default();
693    if !request.body.is_empty() {
694        input = serde_json::from_slice::<CreateApiKeyRequest>(&request.body)
695            .map_err(|err| format!("failed to deserialize CreateApiKey request: {err}"))?;
696    }
697    for (name, value) in labels {
698        match *name {
699            "apiId" => {
700                input.api_id = value.to_string();
701            }
702            _ => {}
703        }
704    }
705    Ok(input)
706}
707
708/// Deserialize request for restJson protocol.
709pub fn deserialize_create_channel_namespace_request(
710    request: &winterbaume_core::MockRequest,
711    labels: &[(&str, &str)],
712    query: &std::collections::HashMap<String, String>,
713) -> Result<CreateChannelNamespaceRequest, String> {
714    let mut input = CreateChannelNamespaceRequest::default();
715    if !request.body.is_empty() {
716        input = serde_json::from_slice::<CreateChannelNamespaceRequest>(&request.body).map_err(
717            |err| format!("failed to deserialize CreateChannelNamespace request: {err}"),
718        )?;
719    }
720    for (name, value) in labels {
721        match *name {
722            "apiId" => {
723                input.api_id = value.to_string();
724            }
725            _ => {}
726        }
727    }
728    Ok(input)
729}
730
731/// Deserialize request for restJson protocol.
732pub fn deserialize_create_data_source_request(
733    request: &winterbaume_core::MockRequest,
734    labels: &[(&str, &str)],
735    query: &std::collections::HashMap<String, String>,
736) -> Result<CreateDataSourceRequest, String> {
737    let mut input = CreateDataSourceRequest::default();
738    if !request.body.is_empty() {
739        input = serde_json::from_slice::<CreateDataSourceRequest>(&request.body)
740            .map_err(|err| format!("failed to deserialize CreateDataSource request: {err}"))?;
741    }
742    for (name, value) in labels {
743        match *name {
744            "apiId" => {
745                input.api_id = value.to_string();
746            }
747            _ => {}
748        }
749    }
750    Ok(input)
751}
752
753/// Deserialize request for restJson protocol.
754pub fn deserialize_create_domain_name_request(
755    request: &winterbaume_core::MockRequest,
756    labels: &[(&str, &str)],
757    query: &std::collections::HashMap<String, String>,
758) -> Result<CreateDomainNameRequest, String> {
759    let mut input = CreateDomainNameRequest::default();
760    if !request.body.is_empty() {
761        input = serde_json::from_slice::<CreateDomainNameRequest>(&request.body)
762            .map_err(|err| format!("failed to deserialize CreateDomainName request: {err}"))?;
763    }
764    Ok(input)
765}
766
767/// Deserialize request for restJson protocol.
768pub fn deserialize_create_function_request(
769    request: &winterbaume_core::MockRequest,
770    labels: &[(&str, &str)],
771    query: &std::collections::HashMap<String, String>,
772) -> Result<CreateFunctionRequest, String> {
773    let mut input = CreateFunctionRequest::default();
774    if !request.body.is_empty() {
775        input = serde_json::from_slice::<CreateFunctionRequest>(&request.body)
776            .map_err(|err| format!("failed to deserialize CreateFunction request: {err}"))?;
777    }
778    for (name, value) in labels {
779        match *name {
780            "apiId" => {
781                input.api_id = value.to_string();
782            }
783            _ => {}
784        }
785    }
786    Ok(input)
787}
788
789/// Deserialize request for restJson protocol.
790pub fn deserialize_create_graphql_api_request(
791    request: &winterbaume_core::MockRequest,
792    labels: &[(&str, &str)],
793    query: &std::collections::HashMap<String, String>,
794) -> Result<CreateGraphqlApiRequest, String> {
795    let mut input = CreateGraphqlApiRequest::default();
796    if !request.body.is_empty() {
797        input = serde_json::from_slice::<CreateGraphqlApiRequest>(&request.body)
798            .map_err(|err| format!("failed to deserialize CreateGraphqlApi request: {err}"))?;
799    }
800    Ok(input)
801}
802
803/// Deserialize request for restJson protocol.
804pub fn deserialize_create_resolver_request(
805    request: &winterbaume_core::MockRequest,
806    labels: &[(&str, &str)],
807    query: &std::collections::HashMap<String, String>,
808) -> Result<CreateResolverRequest, String> {
809    let mut input = CreateResolverRequest::default();
810    if !request.body.is_empty() {
811        input = serde_json::from_slice::<CreateResolverRequest>(&request.body)
812            .map_err(|err| format!("failed to deserialize CreateResolver request: {err}"))?;
813    }
814    for (name, value) in labels {
815        match *name {
816            "apiId" => {
817                input.api_id = value.to_string();
818            }
819            "typeName" => {
820                input.type_name = value.to_string();
821            }
822            _ => {}
823        }
824    }
825    Ok(input)
826}
827
828/// Deserialize request for restJson protocol.
829pub fn deserialize_create_type_request(
830    request: &winterbaume_core::MockRequest,
831    labels: &[(&str, &str)],
832    query: &std::collections::HashMap<String, String>,
833) -> Result<CreateTypeRequest, String> {
834    let mut input = CreateTypeRequest::default();
835    if !request.body.is_empty() {
836        input = serde_json::from_slice::<CreateTypeRequest>(&request.body)
837            .map_err(|err| format!("failed to deserialize CreateType request: {err}"))?;
838    }
839    for (name, value) in labels {
840        match *name {
841            "apiId" => {
842                input.api_id = value.to_string();
843            }
844            _ => {}
845        }
846    }
847    Ok(input)
848}
849
850/// Deserialize request for restJson protocol.
851pub fn deserialize_delete_api_request(
852    request: &winterbaume_core::MockRequest,
853    labels: &[(&str, &str)],
854    query: &std::collections::HashMap<String, String>,
855) -> Result<DeleteApiRequest, String> {
856    let mut input = DeleteApiRequest::default();
857    for (name, value) in labels {
858        match *name {
859            "apiId" => {
860                input.api_id = value.to_string();
861            }
862            _ => {}
863        }
864    }
865    Ok(input)
866}
867
868/// Deserialize request for restJson protocol.
869pub fn deserialize_delete_api_cache_request(
870    request: &winterbaume_core::MockRequest,
871    labels: &[(&str, &str)],
872    query: &std::collections::HashMap<String, String>,
873) -> Result<DeleteApiCacheRequest, String> {
874    let mut input = DeleteApiCacheRequest::default();
875    for (name, value) in labels {
876        match *name {
877            "apiId" => {
878                input.api_id = value.to_string();
879            }
880            _ => {}
881        }
882    }
883    Ok(input)
884}
885
886/// Deserialize request for restJson protocol.
887pub fn deserialize_delete_api_key_request(
888    request: &winterbaume_core::MockRequest,
889    labels: &[(&str, &str)],
890    query: &std::collections::HashMap<String, String>,
891) -> Result<DeleteApiKeyRequest, String> {
892    let mut input = DeleteApiKeyRequest::default();
893    for (name, value) in labels {
894        match *name {
895            "apiId" => {
896                input.api_id = value.to_string();
897            }
898            "id" => {
899                input.id = value.to_string();
900            }
901            _ => {}
902        }
903    }
904    Ok(input)
905}
906
907/// Deserialize request for restJson protocol.
908pub fn deserialize_delete_channel_namespace_request(
909    request: &winterbaume_core::MockRequest,
910    labels: &[(&str, &str)],
911    query: &std::collections::HashMap<String, String>,
912) -> Result<DeleteChannelNamespaceRequest, String> {
913    let mut input = DeleteChannelNamespaceRequest::default();
914    for (name, value) in labels {
915        match *name {
916            "apiId" => {
917                input.api_id = value.to_string();
918            }
919            "name" => {
920                input.name = value.to_string();
921            }
922            _ => {}
923        }
924    }
925    Ok(input)
926}
927
928/// Deserialize request for restJson protocol.
929pub fn deserialize_delete_data_source_request(
930    request: &winterbaume_core::MockRequest,
931    labels: &[(&str, &str)],
932    query: &std::collections::HashMap<String, String>,
933) -> Result<DeleteDataSourceRequest, String> {
934    let mut input = DeleteDataSourceRequest::default();
935    for (name, value) in labels {
936        match *name {
937            "apiId" => {
938                input.api_id = value.to_string();
939            }
940            "name" => {
941                input.name = value.to_string();
942            }
943            _ => {}
944        }
945    }
946    Ok(input)
947}
948
949/// Deserialize request for restJson protocol.
950pub fn deserialize_delete_domain_name_request(
951    request: &winterbaume_core::MockRequest,
952    labels: &[(&str, &str)],
953    query: &std::collections::HashMap<String, String>,
954) -> Result<DeleteDomainNameRequest, String> {
955    let mut input = DeleteDomainNameRequest::default();
956    for (name, value) in labels {
957        match *name {
958            "domainName" => {
959                input.domain_name = value.to_string();
960            }
961            _ => {}
962        }
963    }
964    Ok(input)
965}
966
967/// Deserialize request for restJson protocol.
968pub fn deserialize_delete_function_request(
969    request: &winterbaume_core::MockRequest,
970    labels: &[(&str, &str)],
971    query: &std::collections::HashMap<String, String>,
972) -> Result<DeleteFunctionRequest, String> {
973    let mut input = DeleteFunctionRequest::default();
974    for (name, value) in labels {
975        match *name {
976            "apiId" => {
977                input.api_id = value.to_string();
978            }
979            "functionId" => {
980                input.function_id = value.to_string();
981            }
982            _ => {}
983        }
984    }
985    Ok(input)
986}
987
988/// Deserialize request for restJson protocol.
989pub fn deserialize_delete_graphql_api_request(
990    request: &winterbaume_core::MockRequest,
991    labels: &[(&str, &str)],
992    query: &std::collections::HashMap<String, String>,
993) -> Result<DeleteGraphqlApiRequest, String> {
994    let mut input = DeleteGraphqlApiRequest::default();
995    for (name, value) in labels {
996        match *name {
997            "apiId" => {
998                input.api_id = value.to_string();
999            }
1000            _ => {}
1001        }
1002    }
1003    Ok(input)
1004}
1005
1006/// Deserialize request for restJson protocol.
1007pub fn deserialize_delete_resolver_request(
1008    request: &winterbaume_core::MockRequest,
1009    labels: &[(&str, &str)],
1010    query: &std::collections::HashMap<String, String>,
1011) -> Result<DeleteResolverRequest, String> {
1012    let mut input = DeleteResolverRequest::default();
1013    for (name, value) in labels {
1014        match *name {
1015            "apiId" => {
1016                input.api_id = value.to_string();
1017            }
1018            "fieldName" => {
1019                input.field_name = value.to_string();
1020            }
1021            "typeName" => {
1022                input.type_name = value.to_string();
1023            }
1024            _ => {}
1025        }
1026    }
1027    Ok(input)
1028}
1029
1030/// Deserialize request for restJson protocol.
1031pub fn deserialize_delete_type_request(
1032    request: &winterbaume_core::MockRequest,
1033    labels: &[(&str, &str)],
1034    query: &std::collections::HashMap<String, String>,
1035) -> Result<DeleteTypeRequest, String> {
1036    let mut input = DeleteTypeRequest::default();
1037    for (name, value) in labels {
1038        match *name {
1039            "apiId" => {
1040                input.api_id = value.to_string();
1041            }
1042            "typeName" => {
1043                input.type_name = value.to_string();
1044            }
1045            _ => {}
1046        }
1047    }
1048    Ok(input)
1049}
1050
1051/// Deserialize request for restJson protocol.
1052pub fn deserialize_disassociate_api_request(
1053    request: &winterbaume_core::MockRequest,
1054    labels: &[(&str, &str)],
1055    query: &std::collections::HashMap<String, String>,
1056) -> Result<DisassociateApiRequest, String> {
1057    let mut input = DisassociateApiRequest::default();
1058    for (name, value) in labels {
1059        match *name {
1060            "domainName" => {
1061                input.domain_name = value.to_string();
1062            }
1063            _ => {}
1064        }
1065    }
1066    Ok(input)
1067}
1068
1069/// Deserialize request for restJson protocol.
1070pub fn deserialize_disassociate_merged_graphql_api_request(
1071    request: &winterbaume_core::MockRequest,
1072    labels: &[(&str, &str)],
1073    query: &std::collections::HashMap<String, String>,
1074) -> Result<DisassociateMergedGraphqlApiRequest, String> {
1075    let mut input = DisassociateMergedGraphqlApiRequest::default();
1076    for (name, value) in labels {
1077        match *name {
1078            "associationId" => {
1079                input.association_id = value.to_string();
1080            }
1081            "sourceApiIdentifier" => {
1082                input.source_api_identifier = value.to_string();
1083            }
1084            _ => {}
1085        }
1086    }
1087    Ok(input)
1088}
1089
1090/// Deserialize request for restJson protocol.
1091pub fn deserialize_disassociate_source_graphql_api_request(
1092    request: &winterbaume_core::MockRequest,
1093    labels: &[(&str, &str)],
1094    query: &std::collections::HashMap<String, String>,
1095) -> Result<DisassociateSourceGraphqlApiRequest, String> {
1096    let mut input = DisassociateSourceGraphqlApiRequest::default();
1097    for (name, value) in labels {
1098        match *name {
1099            "associationId" => {
1100                input.association_id = value.to_string();
1101            }
1102            "mergedApiIdentifier" => {
1103                input.merged_api_identifier = value.to_string();
1104            }
1105            _ => {}
1106        }
1107    }
1108    Ok(input)
1109}
1110
1111/// Deserialize request for restJson protocol.
1112pub fn deserialize_evaluate_code_request(
1113    request: &winterbaume_core::MockRequest,
1114    labels: &[(&str, &str)],
1115    query: &std::collections::HashMap<String, String>,
1116) -> Result<EvaluateCodeRequest, String> {
1117    let mut input = EvaluateCodeRequest::default();
1118    if !request.body.is_empty() {
1119        input = serde_json::from_slice::<EvaluateCodeRequest>(&request.body)
1120            .map_err(|err| format!("failed to deserialize EvaluateCode request: {err}"))?;
1121    }
1122    Ok(input)
1123}
1124
1125/// Deserialize request for restJson protocol.
1126pub fn deserialize_evaluate_mapping_template_request(
1127    request: &winterbaume_core::MockRequest,
1128    labels: &[(&str, &str)],
1129    query: &std::collections::HashMap<String, String>,
1130) -> Result<EvaluateMappingTemplateRequest, String> {
1131    let mut input = EvaluateMappingTemplateRequest::default();
1132    if !request.body.is_empty() {
1133        input = serde_json::from_slice::<EvaluateMappingTemplateRequest>(&request.body).map_err(
1134            |err| format!("failed to deserialize EvaluateMappingTemplate request: {err}"),
1135        )?;
1136    }
1137    Ok(input)
1138}
1139
1140/// Deserialize request for restJson protocol.
1141pub fn deserialize_flush_api_cache_request(
1142    request: &winterbaume_core::MockRequest,
1143    labels: &[(&str, &str)],
1144    query: &std::collections::HashMap<String, String>,
1145) -> Result<FlushApiCacheRequest, String> {
1146    let mut input = FlushApiCacheRequest::default();
1147    for (name, value) in labels {
1148        match *name {
1149            "apiId" => {
1150                input.api_id = value.to_string();
1151            }
1152            _ => {}
1153        }
1154    }
1155    Ok(input)
1156}
1157
1158/// Deserialize request for restJson protocol.
1159pub fn deserialize_get_api_request(
1160    request: &winterbaume_core::MockRequest,
1161    labels: &[(&str, &str)],
1162    query: &std::collections::HashMap<String, String>,
1163) -> Result<GetApiRequest, String> {
1164    let mut input = GetApiRequest::default();
1165    for (name, value) in labels {
1166        match *name {
1167            "apiId" => {
1168                input.api_id = value.to_string();
1169            }
1170            _ => {}
1171        }
1172    }
1173    Ok(input)
1174}
1175
1176/// Deserialize request for restJson protocol.
1177pub fn deserialize_get_api_association_request(
1178    request: &winterbaume_core::MockRequest,
1179    labels: &[(&str, &str)],
1180    query: &std::collections::HashMap<String, String>,
1181) -> Result<GetApiAssociationRequest, String> {
1182    let mut input = GetApiAssociationRequest::default();
1183    for (name, value) in labels {
1184        match *name {
1185            "domainName" => {
1186                input.domain_name = value.to_string();
1187            }
1188            _ => {}
1189        }
1190    }
1191    Ok(input)
1192}
1193
1194/// Deserialize request for restJson protocol.
1195pub fn deserialize_get_api_cache_request(
1196    request: &winterbaume_core::MockRequest,
1197    labels: &[(&str, &str)],
1198    query: &std::collections::HashMap<String, String>,
1199) -> Result<GetApiCacheRequest, String> {
1200    let mut input = GetApiCacheRequest::default();
1201    for (name, value) in labels {
1202        match *name {
1203            "apiId" => {
1204                input.api_id = value.to_string();
1205            }
1206            _ => {}
1207        }
1208    }
1209    Ok(input)
1210}
1211
1212/// Deserialize request for restJson protocol.
1213pub fn deserialize_get_channel_namespace_request(
1214    request: &winterbaume_core::MockRequest,
1215    labels: &[(&str, &str)],
1216    query: &std::collections::HashMap<String, String>,
1217) -> Result<GetChannelNamespaceRequest, String> {
1218    let mut input = GetChannelNamespaceRequest::default();
1219    for (name, value) in labels {
1220        match *name {
1221            "apiId" => {
1222                input.api_id = value.to_string();
1223            }
1224            "name" => {
1225                input.name = value.to_string();
1226            }
1227            _ => {}
1228        }
1229    }
1230    Ok(input)
1231}
1232
1233/// Deserialize request for restJson protocol.
1234pub fn deserialize_get_data_source_request(
1235    request: &winterbaume_core::MockRequest,
1236    labels: &[(&str, &str)],
1237    query: &std::collections::HashMap<String, String>,
1238) -> Result<GetDataSourceRequest, String> {
1239    let mut input = GetDataSourceRequest::default();
1240    for (name, value) in labels {
1241        match *name {
1242            "apiId" => {
1243                input.api_id = value.to_string();
1244            }
1245            "name" => {
1246                input.name = value.to_string();
1247            }
1248            _ => {}
1249        }
1250    }
1251    Ok(input)
1252}
1253
1254/// Deserialize request for restJson protocol.
1255pub fn deserialize_get_data_source_introspection_request(
1256    request: &winterbaume_core::MockRequest,
1257    labels: &[(&str, &str)],
1258    query: &std::collections::HashMap<String, String>,
1259) -> Result<GetDataSourceIntrospectionRequest, String> {
1260    let mut input = GetDataSourceIntrospectionRequest::default();
1261    for (name, value) in labels {
1262        match *name {
1263            "introspectionId" => {
1264                input.introspection_id = value.to_string();
1265            }
1266            _ => {}
1267        }
1268    }
1269    if let Some(value) = query.get("includeModelsSDL") {
1270        input.include_models_s_d_l = Some(
1271            value
1272                .parse::<bool>()
1273                .map_err(|err| format!("failed to parse bool: {err}"))?,
1274        );
1275    }
1276    if let Some(value) = query.get("maxResults") {
1277        input.max_results = Some(
1278            value
1279                .parse::<i32>()
1280                .map_err(|err| format!("failed to parse integer: {err}"))?,
1281        );
1282    }
1283    if let Some(value) = query.get("nextToken") {
1284        input.next_token = Some(value.to_string());
1285    }
1286    Ok(input)
1287}
1288
1289/// Deserialize request for restJson protocol.
1290pub fn deserialize_get_domain_name_request(
1291    request: &winterbaume_core::MockRequest,
1292    labels: &[(&str, &str)],
1293    query: &std::collections::HashMap<String, String>,
1294) -> Result<GetDomainNameRequest, String> {
1295    let mut input = GetDomainNameRequest::default();
1296    for (name, value) in labels {
1297        match *name {
1298            "domainName" => {
1299                input.domain_name = value.to_string();
1300            }
1301            _ => {}
1302        }
1303    }
1304    Ok(input)
1305}
1306
1307/// Deserialize request for restJson protocol.
1308pub fn deserialize_get_function_request(
1309    request: &winterbaume_core::MockRequest,
1310    labels: &[(&str, &str)],
1311    query: &std::collections::HashMap<String, String>,
1312) -> Result<GetFunctionRequest, String> {
1313    let mut input = GetFunctionRequest::default();
1314    for (name, value) in labels {
1315        match *name {
1316            "apiId" => {
1317                input.api_id = value.to_string();
1318            }
1319            "functionId" => {
1320                input.function_id = value.to_string();
1321            }
1322            _ => {}
1323        }
1324    }
1325    Ok(input)
1326}
1327
1328/// Deserialize request for restJson protocol.
1329pub fn deserialize_get_graphql_api_request(
1330    request: &winterbaume_core::MockRequest,
1331    labels: &[(&str, &str)],
1332    query: &std::collections::HashMap<String, String>,
1333) -> Result<GetGraphqlApiRequest, String> {
1334    let mut input = GetGraphqlApiRequest::default();
1335    for (name, value) in labels {
1336        match *name {
1337            "apiId" => {
1338                input.api_id = value.to_string();
1339            }
1340            _ => {}
1341        }
1342    }
1343    Ok(input)
1344}
1345
1346/// Deserialize request for restJson protocol.
1347pub fn deserialize_get_graphql_api_environment_variables_request(
1348    request: &winterbaume_core::MockRequest,
1349    labels: &[(&str, &str)],
1350    query: &std::collections::HashMap<String, String>,
1351) -> Result<GetGraphqlApiEnvironmentVariablesRequest, String> {
1352    let mut input = GetGraphqlApiEnvironmentVariablesRequest::default();
1353    for (name, value) in labels {
1354        match *name {
1355            "apiId" => {
1356                input.api_id = value.to_string();
1357            }
1358            _ => {}
1359        }
1360    }
1361    Ok(input)
1362}
1363
1364/// Deserialize request for restJson protocol.
1365pub fn deserialize_get_introspection_schema_request(
1366    request: &winterbaume_core::MockRequest,
1367    labels: &[(&str, &str)],
1368    query: &std::collections::HashMap<String, String>,
1369) -> Result<GetIntrospectionSchemaRequest, String> {
1370    let mut input = GetIntrospectionSchemaRequest::default();
1371    for (name, value) in labels {
1372        match *name {
1373            "apiId" => {
1374                input.api_id = value.to_string();
1375            }
1376            _ => {}
1377        }
1378    }
1379    if let Some(value) = query.get("format") {
1380        input.format = value.to_string();
1381    }
1382    if let Some(value) = query.get("includeDirectives") {
1383        input.include_directives = Some(
1384            value
1385                .parse::<bool>()
1386                .map_err(|err| format!("failed to parse bool: {err}"))?,
1387        );
1388    }
1389    Ok(input)
1390}
1391
1392/// Deserialize request for restJson protocol.
1393pub fn deserialize_get_resolver_request(
1394    request: &winterbaume_core::MockRequest,
1395    labels: &[(&str, &str)],
1396    query: &std::collections::HashMap<String, String>,
1397) -> Result<GetResolverRequest, String> {
1398    let mut input = GetResolverRequest::default();
1399    for (name, value) in labels {
1400        match *name {
1401            "apiId" => {
1402                input.api_id = value.to_string();
1403            }
1404            "fieldName" => {
1405                input.field_name = value.to_string();
1406            }
1407            "typeName" => {
1408                input.type_name = value.to_string();
1409            }
1410            _ => {}
1411        }
1412    }
1413    Ok(input)
1414}
1415
1416/// Deserialize request for restJson protocol.
1417pub fn deserialize_get_schema_creation_status_request(
1418    request: &winterbaume_core::MockRequest,
1419    labels: &[(&str, &str)],
1420    query: &std::collections::HashMap<String, String>,
1421) -> Result<GetSchemaCreationStatusRequest, String> {
1422    let mut input = GetSchemaCreationStatusRequest::default();
1423    for (name, value) in labels {
1424        match *name {
1425            "apiId" => {
1426                input.api_id = value.to_string();
1427            }
1428            _ => {}
1429        }
1430    }
1431    Ok(input)
1432}
1433
1434/// Deserialize request for restJson protocol.
1435pub fn deserialize_get_source_api_association_request(
1436    request: &winterbaume_core::MockRequest,
1437    labels: &[(&str, &str)],
1438    query: &std::collections::HashMap<String, String>,
1439) -> Result<GetSourceApiAssociationRequest, String> {
1440    let mut input = GetSourceApiAssociationRequest::default();
1441    for (name, value) in labels {
1442        match *name {
1443            "associationId" => {
1444                input.association_id = value.to_string();
1445            }
1446            "mergedApiIdentifier" => {
1447                input.merged_api_identifier = value.to_string();
1448            }
1449            _ => {}
1450        }
1451    }
1452    Ok(input)
1453}
1454
1455/// Deserialize request for restJson protocol.
1456pub fn deserialize_get_type_request(
1457    request: &winterbaume_core::MockRequest,
1458    labels: &[(&str, &str)],
1459    query: &std::collections::HashMap<String, String>,
1460) -> Result<GetTypeRequest, String> {
1461    let mut input = GetTypeRequest::default();
1462    for (name, value) in labels {
1463        match *name {
1464            "apiId" => {
1465                input.api_id = value.to_string();
1466            }
1467            "typeName" => {
1468                input.type_name = value.to_string();
1469            }
1470            _ => {}
1471        }
1472    }
1473    if let Some(value) = query.get("format") {
1474        input.format = value.to_string();
1475    }
1476    Ok(input)
1477}
1478
1479/// Deserialize request for restJson protocol.
1480pub fn deserialize_list_api_keys_request(
1481    request: &winterbaume_core::MockRequest,
1482    labels: &[(&str, &str)],
1483    query: &std::collections::HashMap<String, String>,
1484) -> Result<ListApiKeysRequest, String> {
1485    let mut input = ListApiKeysRequest::default();
1486    for (name, value) in labels {
1487        match *name {
1488            "apiId" => {
1489                input.api_id = value.to_string();
1490            }
1491            _ => {}
1492        }
1493    }
1494    if let Some(value) = query.get("maxResults") {
1495        input.max_results = Some(
1496            value
1497                .parse::<i32>()
1498                .map_err(|err| format!("failed to parse integer: {err}"))?,
1499        );
1500    }
1501    if let Some(value) = query.get("nextToken") {
1502        input.next_token = Some(value.to_string());
1503    }
1504    Ok(input)
1505}
1506
1507/// Deserialize request for restJson protocol.
1508pub fn deserialize_list_apis_request(
1509    request: &winterbaume_core::MockRequest,
1510    labels: &[(&str, &str)],
1511    query: &std::collections::HashMap<String, String>,
1512) -> Result<ListApisRequest, String> {
1513    let mut input = ListApisRequest::default();
1514    if let Some(value) = query.get("maxResults") {
1515        input.max_results = Some(
1516            value
1517                .parse::<i32>()
1518                .map_err(|err| format!("failed to parse integer: {err}"))?,
1519        );
1520    }
1521    if let Some(value) = query.get("nextToken") {
1522        input.next_token = Some(value.to_string());
1523    }
1524    Ok(input)
1525}
1526
1527/// Deserialize request for restJson protocol.
1528pub fn deserialize_list_channel_namespaces_request(
1529    request: &winterbaume_core::MockRequest,
1530    labels: &[(&str, &str)],
1531    query: &std::collections::HashMap<String, String>,
1532) -> Result<ListChannelNamespacesRequest, String> {
1533    let mut input = ListChannelNamespacesRequest::default();
1534    for (name, value) in labels {
1535        match *name {
1536            "apiId" => {
1537                input.api_id = value.to_string();
1538            }
1539            _ => {}
1540        }
1541    }
1542    if let Some(value) = query.get("maxResults") {
1543        input.max_results = Some(
1544            value
1545                .parse::<i32>()
1546                .map_err(|err| format!("failed to parse integer: {err}"))?,
1547        );
1548    }
1549    if let Some(value) = query.get("nextToken") {
1550        input.next_token = Some(value.to_string());
1551    }
1552    Ok(input)
1553}
1554
1555/// Deserialize request for restJson protocol.
1556pub fn deserialize_list_data_sources_request(
1557    request: &winterbaume_core::MockRequest,
1558    labels: &[(&str, &str)],
1559    query: &std::collections::HashMap<String, String>,
1560) -> Result<ListDataSourcesRequest, String> {
1561    let mut input = ListDataSourcesRequest::default();
1562    for (name, value) in labels {
1563        match *name {
1564            "apiId" => {
1565                input.api_id = value.to_string();
1566            }
1567            _ => {}
1568        }
1569    }
1570    if let Some(value) = query.get("maxResults") {
1571        input.max_results = Some(
1572            value
1573                .parse::<i32>()
1574                .map_err(|err| format!("failed to parse integer: {err}"))?,
1575        );
1576    }
1577    if let Some(value) = query.get("nextToken") {
1578        input.next_token = Some(value.to_string());
1579    }
1580    Ok(input)
1581}
1582
1583/// Deserialize request for restJson protocol.
1584pub fn deserialize_list_domain_names_request(
1585    request: &winterbaume_core::MockRequest,
1586    labels: &[(&str, &str)],
1587    query: &std::collections::HashMap<String, String>,
1588) -> Result<ListDomainNamesRequest, String> {
1589    let mut input = ListDomainNamesRequest::default();
1590    if let Some(value) = query.get("maxResults") {
1591        input.max_results = Some(
1592            value
1593                .parse::<i32>()
1594                .map_err(|err| format!("failed to parse integer: {err}"))?,
1595        );
1596    }
1597    if let Some(value) = query.get("nextToken") {
1598        input.next_token = Some(value.to_string());
1599    }
1600    Ok(input)
1601}
1602
1603/// Deserialize request for restJson protocol.
1604pub fn deserialize_list_functions_request(
1605    request: &winterbaume_core::MockRequest,
1606    labels: &[(&str, &str)],
1607    query: &std::collections::HashMap<String, String>,
1608) -> Result<ListFunctionsRequest, String> {
1609    let mut input = ListFunctionsRequest::default();
1610    for (name, value) in labels {
1611        match *name {
1612            "apiId" => {
1613                input.api_id = value.to_string();
1614            }
1615            _ => {}
1616        }
1617    }
1618    if let Some(value) = query.get("maxResults") {
1619        input.max_results = Some(
1620            value
1621                .parse::<i32>()
1622                .map_err(|err| format!("failed to parse integer: {err}"))?,
1623        );
1624    }
1625    if let Some(value) = query.get("nextToken") {
1626        input.next_token = Some(value.to_string());
1627    }
1628    Ok(input)
1629}
1630
1631/// Deserialize request for restJson protocol.
1632pub fn deserialize_list_graphql_apis_request(
1633    request: &winterbaume_core::MockRequest,
1634    labels: &[(&str, &str)],
1635    query: &std::collections::HashMap<String, String>,
1636) -> Result<ListGraphqlApisRequest, String> {
1637    let mut input = ListGraphqlApisRequest::default();
1638    if let Some(value) = query.get("apiType") {
1639        input.api_type = Some(value.to_string());
1640    }
1641    if let Some(value) = query.get("maxResults") {
1642        input.max_results = Some(
1643            value
1644                .parse::<i32>()
1645                .map_err(|err| format!("failed to parse integer: {err}"))?,
1646        );
1647    }
1648    if let Some(value) = query.get("nextToken") {
1649        input.next_token = Some(value.to_string());
1650    }
1651    if let Some(value) = query.get("owner") {
1652        input.owner = Some(value.to_string());
1653    }
1654    Ok(input)
1655}
1656
1657/// Deserialize request for restJson protocol.
1658pub fn deserialize_list_resolvers_request(
1659    request: &winterbaume_core::MockRequest,
1660    labels: &[(&str, &str)],
1661    query: &std::collections::HashMap<String, String>,
1662) -> Result<ListResolversRequest, String> {
1663    let mut input = ListResolversRequest::default();
1664    for (name, value) in labels {
1665        match *name {
1666            "apiId" => {
1667                input.api_id = value.to_string();
1668            }
1669            "typeName" => {
1670                input.type_name = value.to_string();
1671            }
1672            _ => {}
1673        }
1674    }
1675    if let Some(value) = query.get("maxResults") {
1676        input.max_results = Some(
1677            value
1678                .parse::<i32>()
1679                .map_err(|err| format!("failed to parse integer: {err}"))?,
1680        );
1681    }
1682    if let Some(value) = query.get("nextToken") {
1683        input.next_token = Some(value.to_string());
1684    }
1685    Ok(input)
1686}
1687
1688/// Deserialize request for restJson protocol.
1689pub fn deserialize_list_resolvers_by_function_request(
1690    request: &winterbaume_core::MockRequest,
1691    labels: &[(&str, &str)],
1692    query: &std::collections::HashMap<String, String>,
1693) -> Result<ListResolversByFunctionRequest, String> {
1694    let mut input = ListResolversByFunctionRequest::default();
1695    for (name, value) in labels {
1696        match *name {
1697            "apiId" => {
1698                input.api_id = value.to_string();
1699            }
1700            "functionId" => {
1701                input.function_id = value.to_string();
1702            }
1703            _ => {}
1704        }
1705    }
1706    if let Some(value) = query.get("maxResults") {
1707        input.max_results = Some(
1708            value
1709                .parse::<i32>()
1710                .map_err(|err| format!("failed to parse integer: {err}"))?,
1711        );
1712    }
1713    if let Some(value) = query.get("nextToken") {
1714        input.next_token = Some(value.to_string());
1715    }
1716    Ok(input)
1717}
1718
1719/// Deserialize request for restJson protocol.
1720pub fn deserialize_list_source_api_associations_request(
1721    request: &winterbaume_core::MockRequest,
1722    labels: &[(&str, &str)],
1723    query: &std::collections::HashMap<String, String>,
1724) -> Result<ListSourceApiAssociationsRequest, String> {
1725    let mut input = ListSourceApiAssociationsRequest::default();
1726    for (name, value) in labels {
1727        match *name {
1728            "apiId" => {
1729                input.api_id = value.to_string();
1730            }
1731            _ => {}
1732        }
1733    }
1734    if let Some(value) = query.get("maxResults") {
1735        input.max_results = Some(
1736            value
1737                .parse::<i32>()
1738                .map_err(|err| format!("failed to parse integer: {err}"))?,
1739        );
1740    }
1741    if let Some(value) = query.get("nextToken") {
1742        input.next_token = Some(value.to_string());
1743    }
1744    Ok(input)
1745}
1746
1747/// Deserialize request for restJson protocol.
1748pub fn deserialize_list_tags_for_resource_request(
1749    request: &winterbaume_core::MockRequest,
1750    labels: &[(&str, &str)],
1751    query: &std::collections::HashMap<String, String>,
1752) -> Result<ListTagsForResourceRequest, String> {
1753    let mut input = ListTagsForResourceRequest::default();
1754    for (name, value) in labels {
1755        match *name {
1756            "resourceArn" => {
1757                input.resource_arn = value.to_string();
1758            }
1759            _ => {}
1760        }
1761    }
1762    Ok(input)
1763}
1764
1765/// Deserialize request for restJson protocol.
1766pub fn deserialize_list_types_request(
1767    request: &winterbaume_core::MockRequest,
1768    labels: &[(&str, &str)],
1769    query: &std::collections::HashMap<String, String>,
1770) -> Result<ListTypesRequest, String> {
1771    let mut input = ListTypesRequest::default();
1772    for (name, value) in labels {
1773        match *name {
1774            "apiId" => {
1775                input.api_id = value.to_string();
1776            }
1777            _ => {}
1778        }
1779    }
1780    if let Some(value) = query.get("format") {
1781        input.format = value.to_string();
1782    }
1783    if let Some(value) = query.get("maxResults") {
1784        input.max_results = Some(
1785            value
1786                .parse::<i32>()
1787                .map_err(|err| format!("failed to parse integer: {err}"))?,
1788        );
1789    }
1790    if let Some(value) = query.get("nextToken") {
1791        input.next_token = Some(value.to_string());
1792    }
1793    Ok(input)
1794}
1795
1796/// Deserialize request for restJson protocol.
1797pub fn deserialize_list_types_by_association_request(
1798    request: &winterbaume_core::MockRequest,
1799    labels: &[(&str, &str)],
1800    query: &std::collections::HashMap<String, String>,
1801) -> Result<ListTypesByAssociationRequest, String> {
1802    let mut input = ListTypesByAssociationRequest::default();
1803    for (name, value) in labels {
1804        match *name {
1805            "associationId" => {
1806                input.association_id = value.to_string();
1807            }
1808            "mergedApiIdentifier" => {
1809                input.merged_api_identifier = value.to_string();
1810            }
1811            _ => {}
1812        }
1813    }
1814    if let Some(value) = query.get("format") {
1815        input.format = value.to_string();
1816    }
1817    if let Some(value) = query.get("maxResults") {
1818        input.max_results = Some(
1819            value
1820                .parse::<i32>()
1821                .map_err(|err| format!("failed to parse integer: {err}"))?,
1822        );
1823    }
1824    if let Some(value) = query.get("nextToken") {
1825        input.next_token = Some(value.to_string());
1826    }
1827    Ok(input)
1828}
1829
1830/// Deserialize request for restJson protocol.
1831pub fn deserialize_put_graphql_api_environment_variables_request(
1832    request: &winterbaume_core::MockRequest,
1833    labels: &[(&str, &str)],
1834    query: &std::collections::HashMap<String, String>,
1835) -> Result<PutGraphqlApiEnvironmentVariablesRequest, String> {
1836    let mut input = PutGraphqlApiEnvironmentVariablesRequest::default();
1837    if !request.body.is_empty() {
1838        input = serde_json::from_slice::<PutGraphqlApiEnvironmentVariablesRequest>(&request.body)
1839            .map_err(|err| {
1840            format!("failed to deserialize PutGraphqlApiEnvironmentVariables request: {err}")
1841        })?;
1842    }
1843    for (name, value) in labels {
1844        match *name {
1845            "apiId" => {
1846                input.api_id = value.to_string();
1847            }
1848            _ => {}
1849        }
1850    }
1851    Ok(input)
1852}
1853
1854/// Deserialize request for restJson protocol.
1855pub fn deserialize_start_data_source_introspection_request(
1856    request: &winterbaume_core::MockRequest,
1857    labels: &[(&str, &str)],
1858    query: &std::collections::HashMap<String, String>,
1859) -> Result<StartDataSourceIntrospectionRequest, String> {
1860    let mut input = StartDataSourceIntrospectionRequest::default();
1861    if !request.body.is_empty() {
1862        input = serde_json::from_slice::<StartDataSourceIntrospectionRequest>(&request.body)
1863            .map_err(|err| {
1864                format!("failed to deserialize StartDataSourceIntrospection request: {err}")
1865            })?;
1866    }
1867    Ok(input)
1868}
1869
1870/// Deserialize request for restJson protocol.
1871pub fn deserialize_start_schema_creation_request(
1872    request: &winterbaume_core::MockRequest,
1873    labels: &[(&str, &str)],
1874    query: &std::collections::HashMap<String, String>,
1875) -> Result<StartSchemaCreationRequest, String> {
1876    let mut input = StartSchemaCreationRequest::default();
1877    if !request.body.is_empty() {
1878        input = serde_json::from_slice::<StartSchemaCreationRequest>(&request.body)
1879            .map_err(|err| format!("failed to deserialize StartSchemaCreation request: {err}"))?;
1880    }
1881    for (name, value) in labels {
1882        match *name {
1883            "apiId" => {
1884                input.api_id = value.to_string();
1885            }
1886            _ => {}
1887        }
1888    }
1889    Ok(input)
1890}
1891
1892/// Deserialize request for restJson protocol.
1893pub fn deserialize_start_schema_merge_request(
1894    request: &winterbaume_core::MockRequest,
1895    labels: &[(&str, &str)],
1896    query: &std::collections::HashMap<String, String>,
1897) -> Result<StartSchemaMergeRequest, String> {
1898    let mut input = StartSchemaMergeRequest::default();
1899    for (name, value) in labels {
1900        match *name {
1901            "associationId" => {
1902                input.association_id = value.to_string();
1903            }
1904            "mergedApiIdentifier" => {
1905                input.merged_api_identifier = value.to_string();
1906            }
1907            _ => {}
1908        }
1909    }
1910    Ok(input)
1911}
1912
1913/// Deserialize request for restJson protocol.
1914pub fn deserialize_tag_resource_request(
1915    request: &winterbaume_core::MockRequest,
1916    labels: &[(&str, &str)],
1917    query: &std::collections::HashMap<String, String>,
1918) -> Result<TagResourceRequest, String> {
1919    let mut input = TagResourceRequest::default();
1920    if !request.body.is_empty() {
1921        input = serde_json::from_slice::<TagResourceRequest>(&request.body)
1922            .map_err(|err| format!("failed to deserialize TagResource request: {err}"))?;
1923    }
1924    for (name, value) in labels {
1925        match *name {
1926            "resourceArn" => {
1927                input.resource_arn = value.to_string();
1928            }
1929            _ => {}
1930        }
1931    }
1932    Ok(input)
1933}
1934
1935/// Deserialize request for restJson protocol.
1936pub fn deserialize_untag_resource_request(
1937    request: &winterbaume_core::MockRequest,
1938    labels: &[(&str, &str)],
1939    query: &std::collections::HashMap<String, String>,
1940) -> Result<UntagResourceRequest, String> {
1941    let mut input = UntagResourceRequest::default();
1942    for (name, value) in labels {
1943        match *name {
1944            "resourceArn" => {
1945                input.resource_arn = value.to_string();
1946            }
1947            _ => {}
1948        }
1949    }
1950    if let Some(value) = query.get("tagKeys") {
1951        input.tag_keys = value
1952            .split(',')
1953            .filter(|item| !item.trim().is_empty())
1954            .map(|item| Ok(item.trim().to_string()))
1955            .collect::<Result<Vec<_>, String>>()?;
1956    }
1957    Ok(input)
1958}
1959
1960/// Deserialize request for restJson protocol.
1961pub fn deserialize_update_api_request(
1962    request: &winterbaume_core::MockRequest,
1963    labels: &[(&str, &str)],
1964    query: &std::collections::HashMap<String, String>,
1965) -> Result<UpdateApiRequest, String> {
1966    let mut input = UpdateApiRequest::default();
1967    if !request.body.is_empty() {
1968        input = serde_json::from_slice::<UpdateApiRequest>(&request.body)
1969            .map_err(|err| format!("failed to deserialize UpdateApi request: {err}"))?;
1970    }
1971    for (name, value) in labels {
1972        match *name {
1973            "apiId" => {
1974                input.api_id = value.to_string();
1975            }
1976            _ => {}
1977        }
1978    }
1979    Ok(input)
1980}
1981
1982/// Deserialize request for restJson protocol.
1983pub fn deserialize_update_api_cache_request(
1984    request: &winterbaume_core::MockRequest,
1985    labels: &[(&str, &str)],
1986    query: &std::collections::HashMap<String, String>,
1987) -> Result<UpdateApiCacheRequest, String> {
1988    let mut input = UpdateApiCacheRequest::default();
1989    if !request.body.is_empty() {
1990        input = serde_json::from_slice::<UpdateApiCacheRequest>(&request.body)
1991            .map_err(|err| format!("failed to deserialize UpdateApiCache request: {err}"))?;
1992    }
1993    for (name, value) in labels {
1994        match *name {
1995            "apiId" => {
1996                input.api_id = value.to_string();
1997            }
1998            _ => {}
1999        }
2000    }
2001    Ok(input)
2002}
2003
2004/// Deserialize request for restJson protocol.
2005pub fn deserialize_update_api_key_request(
2006    request: &winterbaume_core::MockRequest,
2007    labels: &[(&str, &str)],
2008    query: &std::collections::HashMap<String, String>,
2009) -> Result<UpdateApiKeyRequest, String> {
2010    let mut input = UpdateApiKeyRequest::default();
2011    if !request.body.is_empty() {
2012        input = serde_json::from_slice::<UpdateApiKeyRequest>(&request.body)
2013            .map_err(|err| format!("failed to deserialize UpdateApiKey request: {err}"))?;
2014    }
2015    for (name, value) in labels {
2016        match *name {
2017            "apiId" => {
2018                input.api_id = value.to_string();
2019            }
2020            "id" => {
2021                input.id = value.to_string();
2022            }
2023            _ => {}
2024        }
2025    }
2026    Ok(input)
2027}
2028
2029/// Deserialize request for restJson protocol.
2030pub fn deserialize_update_channel_namespace_request(
2031    request: &winterbaume_core::MockRequest,
2032    labels: &[(&str, &str)],
2033    query: &std::collections::HashMap<String, String>,
2034) -> Result<UpdateChannelNamespaceRequest, String> {
2035    let mut input = UpdateChannelNamespaceRequest::default();
2036    if !request.body.is_empty() {
2037        input = serde_json::from_slice::<UpdateChannelNamespaceRequest>(&request.body).map_err(
2038            |err| format!("failed to deserialize UpdateChannelNamespace request: {err}"),
2039        )?;
2040    }
2041    for (name, value) in labels {
2042        match *name {
2043            "apiId" => {
2044                input.api_id = value.to_string();
2045            }
2046            "name" => {
2047                input.name = value.to_string();
2048            }
2049            _ => {}
2050        }
2051    }
2052    Ok(input)
2053}
2054
2055/// Deserialize request for restJson protocol.
2056pub fn deserialize_update_data_source_request(
2057    request: &winterbaume_core::MockRequest,
2058    labels: &[(&str, &str)],
2059    query: &std::collections::HashMap<String, String>,
2060) -> Result<UpdateDataSourceRequest, String> {
2061    let mut input = UpdateDataSourceRequest::default();
2062    if !request.body.is_empty() {
2063        input = serde_json::from_slice::<UpdateDataSourceRequest>(&request.body)
2064            .map_err(|err| format!("failed to deserialize UpdateDataSource request: {err}"))?;
2065    }
2066    for (name, value) in labels {
2067        match *name {
2068            "apiId" => {
2069                input.api_id = value.to_string();
2070            }
2071            "name" => {
2072                input.name = value.to_string();
2073            }
2074            _ => {}
2075        }
2076    }
2077    Ok(input)
2078}
2079
2080/// Deserialize request for restJson protocol.
2081pub fn deserialize_update_domain_name_request(
2082    request: &winterbaume_core::MockRequest,
2083    labels: &[(&str, &str)],
2084    query: &std::collections::HashMap<String, String>,
2085) -> Result<UpdateDomainNameRequest, String> {
2086    let mut input = UpdateDomainNameRequest::default();
2087    if !request.body.is_empty() {
2088        input = serde_json::from_slice::<UpdateDomainNameRequest>(&request.body)
2089            .map_err(|err| format!("failed to deserialize UpdateDomainName request: {err}"))?;
2090    }
2091    for (name, value) in labels {
2092        match *name {
2093            "domainName" => {
2094                input.domain_name = value.to_string();
2095            }
2096            _ => {}
2097        }
2098    }
2099    Ok(input)
2100}
2101
2102/// Deserialize request for restJson protocol.
2103pub fn deserialize_update_function_request(
2104    request: &winterbaume_core::MockRequest,
2105    labels: &[(&str, &str)],
2106    query: &std::collections::HashMap<String, String>,
2107) -> Result<UpdateFunctionRequest, String> {
2108    let mut input = UpdateFunctionRequest::default();
2109    if !request.body.is_empty() {
2110        input = serde_json::from_slice::<UpdateFunctionRequest>(&request.body)
2111            .map_err(|err| format!("failed to deserialize UpdateFunction request: {err}"))?;
2112    }
2113    for (name, value) in labels {
2114        match *name {
2115            "apiId" => {
2116                input.api_id = value.to_string();
2117            }
2118            "functionId" => {
2119                input.function_id = value.to_string();
2120            }
2121            _ => {}
2122        }
2123    }
2124    Ok(input)
2125}
2126
2127/// Deserialize request for restJson protocol.
2128pub fn deserialize_update_graphql_api_request(
2129    request: &winterbaume_core::MockRequest,
2130    labels: &[(&str, &str)],
2131    query: &std::collections::HashMap<String, String>,
2132) -> Result<UpdateGraphqlApiRequest, String> {
2133    let mut input = UpdateGraphqlApiRequest::default();
2134    if !request.body.is_empty() {
2135        input = serde_json::from_slice::<UpdateGraphqlApiRequest>(&request.body)
2136            .map_err(|err| format!("failed to deserialize UpdateGraphqlApi request: {err}"))?;
2137    }
2138    for (name, value) in labels {
2139        match *name {
2140            "apiId" => {
2141                input.api_id = value.to_string();
2142            }
2143            _ => {}
2144        }
2145    }
2146    Ok(input)
2147}
2148
2149/// Deserialize request for restJson protocol.
2150pub fn deserialize_update_resolver_request(
2151    request: &winterbaume_core::MockRequest,
2152    labels: &[(&str, &str)],
2153    query: &std::collections::HashMap<String, String>,
2154) -> Result<UpdateResolverRequest, String> {
2155    let mut input = UpdateResolverRequest::default();
2156    if !request.body.is_empty() {
2157        input = serde_json::from_slice::<UpdateResolverRequest>(&request.body)
2158            .map_err(|err| format!("failed to deserialize UpdateResolver request: {err}"))?;
2159    }
2160    for (name, value) in labels {
2161        match *name {
2162            "apiId" => {
2163                input.api_id = value.to_string();
2164            }
2165            "fieldName" => {
2166                input.field_name = value.to_string();
2167            }
2168            "typeName" => {
2169                input.type_name = value.to_string();
2170            }
2171            _ => {}
2172        }
2173    }
2174    Ok(input)
2175}
2176
2177/// Deserialize request for restJson protocol.
2178pub fn deserialize_update_source_api_association_request(
2179    request: &winterbaume_core::MockRequest,
2180    labels: &[(&str, &str)],
2181    query: &std::collections::HashMap<String, String>,
2182) -> Result<UpdateSourceApiAssociationRequest, String> {
2183    let mut input = UpdateSourceApiAssociationRequest::default();
2184    if !request.body.is_empty() {
2185        input = serde_json::from_slice::<UpdateSourceApiAssociationRequest>(&request.body)
2186            .map_err(|err| {
2187                format!("failed to deserialize UpdateSourceApiAssociation request: {err}")
2188            })?;
2189    }
2190    for (name, value) in labels {
2191        match *name {
2192            "associationId" => {
2193                input.association_id = value.to_string();
2194            }
2195            "mergedApiIdentifier" => {
2196                input.merged_api_identifier = value.to_string();
2197            }
2198            _ => {}
2199        }
2200    }
2201    Ok(input)
2202}
2203
2204/// Deserialize request for restJson protocol.
2205pub fn deserialize_update_type_request(
2206    request: &winterbaume_core::MockRequest,
2207    labels: &[(&str, &str)],
2208    query: &std::collections::HashMap<String, String>,
2209) -> Result<UpdateTypeRequest, String> {
2210    let mut input = UpdateTypeRequest::default();
2211    if !request.body.is_empty() {
2212        input = serde_json::from_slice::<UpdateTypeRequest>(&request.body)
2213            .map_err(|err| format!("failed to deserialize UpdateType request: {err}"))?;
2214    }
2215    for (name, value) in labels {
2216        match *name {
2217            "apiId" => {
2218                input.api_id = value.to_string();
2219            }
2220            "typeName" => {
2221                input.type_name = value.to_string();
2222            }
2223            _ => {}
2224        }
2225    }
2226    Ok(input)
2227}