aws-sdk-elasticache 0.24.0

AWS SDK for Amazon ElastiCache
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn serialize_operation_crate_operation_add_tags_to_resource(
    input: &crate::input::AddTagsToResourceInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "AddTagsToResource", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_1 = writer.prefix("ResourceName");
    if let Some(var_2) = &input.resource_name {
        scope_1.string(var_2);
    }
    #[allow(unused_mut)]
    let mut scope_3 = writer.prefix("Tags");
    if let Some(var_4) = &input.tags {
        let mut list_6 = scope_3.start_list(false, Some("Tag"));
        for item_5 in var_4 {
            #[allow(unused_mut)]
            let mut entry_7 = list_6.entry();
            crate::query_ser::serialize_structure_crate_model_tag(entry_7, item_5)?;
        }
        list_6.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_authorize_cache_security_group_ingress(
    input: &crate::input::AuthorizeCacheSecurityGroupIngressInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(
        &mut out,
        "AuthorizeCacheSecurityGroupIngress",
        "2015-02-02",
    );
    #[allow(unused_mut)]
    let mut scope_8 = writer.prefix("CacheSecurityGroupName");
    if let Some(var_9) = &input.cache_security_group_name {
        scope_8.string(var_9);
    }
    #[allow(unused_mut)]
    let mut scope_10 = writer.prefix("EC2SecurityGroupName");
    if let Some(var_11) = &input.ec2_security_group_name {
        scope_10.string(var_11);
    }
    #[allow(unused_mut)]
    let mut scope_12 = writer.prefix("EC2SecurityGroupOwnerId");
    if let Some(var_13) = &input.ec2_security_group_owner_id {
        scope_12.string(var_13);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_batch_apply_update_action(
    input: &crate::input::BatchApplyUpdateActionInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "BatchApplyUpdateAction", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_14 = writer.prefix("ReplicationGroupIds");
    if let Some(var_15) = &input.replication_group_ids {
        let mut list_17 = scope_14.start_list(false, None);
        for item_16 in var_15 {
            #[allow(unused_mut)]
            let mut entry_18 = list_17.entry();
            entry_18.string(item_16);
        }
        list_17.finish();
    }
    #[allow(unused_mut)]
    let mut scope_19 = writer.prefix("CacheClusterIds");
    if let Some(var_20) = &input.cache_cluster_ids {
        let mut list_22 = scope_19.start_list(false, None);
        for item_21 in var_20 {
            #[allow(unused_mut)]
            let mut entry_23 = list_22.entry();
            entry_23.string(item_21);
        }
        list_22.finish();
    }
    #[allow(unused_mut)]
    let mut scope_24 = writer.prefix("ServiceUpdateName");
    if let Some(var_25) = &input.service_update_name {
        scope_24.string(var_25);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_batch_stop_update_action(
    input: &crate::input::BatchStopUpdateActionInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "BatchStopUpdateAction", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_26 = writer.prefix("ReplicationGroupIds");
    if let Some(var_27) = &input.replication_group_ids {
        let mut list_29 = scope_26.start_list(false, None);
        for item_28 in var_27 {
            #[allow(unused_mut)]
            let mut entry_30 = list_29.entry();
            entry_30.string(item_28);
        }
        list_29.finish();
    }
    #[allow(unused_mut)]
    let mut scope_31 = writer.prefix("CacheClusterIds");
    if let Some(var_32) = &input.cache_cluster_ids {
        let mut list_34 = scope_31.start_list(false, None);
        for item_33 in var_32 {
            #[allow(unused_mut)]
            let mut entry_35 = list_34.entry();
            entry_35.string(item_33);
        }
        list_34.finish();
    }
    #[allow(unused_mut)]
    let mut scope_36 = writer.prefix("ServiceUpdateName");
    if let Some(var_37) = &input.service_update_name {
        scope_36.string(var_37);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_complete_migration(
    input: &crate::input::CompleteMigrationInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "CompleteMigration", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_38 = writer.prefix("ReplicationGroupId");
    if let Some(var_39) = &input.replication_group_id {
        scope_38.string(var_39);
    }
    #[allow(unused_mut)]
    let mut scope_40 = writer.prefix("Force");
    if input.force {
        scope_40.boolean(input.force);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_copy_snapshot(
    input: &crate::input::CopySnapshotInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CopySnapshot", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_41 = writer.prefix("SourceSnapshotName");
    if let Some(var_42) = &input.source_snapshot_name {
        scope_41.string(var_42);
    }
    #[allow(unused_mut)]
    let mut scope_43 = writer.prefix("TargetSnapshotName");
    if let Some(var_44) = &input.target_snapshot_name {
        scope_43.string(var_44);
    }
    #[allow(unused_mut)]
    let mut scope_45 = writer.prefix("TargetBucket");
    if let Some(var_46) = &input.target_bucket {
        scope_45.string(var_46);
    }
    #[allow(unused_mut)]
    let mut scope_47 = writer.prefix("KmsKeyId");
    if let Some(var_48) = &input.kms_key_id {
        scope_47.string(var_48);
    }
    #[allow(unused_mut)]
    let mut scope_49 = writer.prefix("Tags");
    if let Some(var_50) = &input.tags {
        let mut list_52 = scope_49.start_list(false, Some("Tag"));
        for item_51 in var_50 {
            #[allow(unused_mut)]
            let mut entry_53 = list_52.entry();
            crate::query_ser::serialize_structure_crate_model_tag(entry_53, item_51)?;
        }
        list_52.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_create_cache_cluster(
    input: &crate::input::CreateCacheClusterInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "CreateCacheCluster", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_54 = writer.prefix("CacheClusterId");
    if let Some(var_55) = &input.cache_cluster_id {
        scope_54.string(var_55);
    }
    #[allow(unused_mut)]
    let mut scope_56 = writer.prefix("ReplicationGroupId");
    if let Some(var_57) = &input.replication_group_id {
        scope_56.string(var_57);
    }
    #[allow(unused_mut)]
    let mut scope_58 = writer.prefix("AZMode");
    if let Some(var_59) = &input.az_mode {
        scope_58.string(var_59.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_60 = writer.prefix("PreferredAvailabilityZone");
    if let Some(var_61) = &input.preferred_availability_zone {
        scope_60.string(var_61);
    }
    #[allow(unused_mut)]
    let mut scope_62 = writer.prefix("PreferredAvailabilityZones");
    if let Some(var_63) = &input.preferred_availability_zones {
        let mut list_65 = scope_62.start_list(false, Some("PreferredAvailabilityZone"));
        for item_64 in var_63 {
            #[allow(unused_mut)]
            let mut entry_66 = list_65.entry();
            entry_66.string(item_64);
        }
        list_65.finish();
    }
    #[allow(unused_mut)]
    let mut scope_67 = writer.prefix("NumCacheNodes");
    if let Some(var_68) = &input.num_cache_nodes {
        scope_67.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_68).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_69 = writer.prefix("CacheNodeType");
    if let Some(var_70) = &input.cache_node_type {
        scope_69.string(var_70);
    }
    #[allow(unused_mut)]
    let mut scope_71 = writer.prefix("Engine");
    if let Some(var_72) = &input.engine {
        scope_71.string(var_72);
    }
    #[allow(unused_mut)]
    let mut scope_73 = writer.prefix("EngineVersion");
    if let Some(var_74) = &input.engine_version {
        scope_73.string(var_74);
    }
    #[allow(unused_mut)]
    let mut scope_75 = writer.prefix("CacheParameterGroupName");
    if let Some(var_76) = &input.cache_parameter_group_name {
        scope_75.string(var_76);
    }
    #[allow(unused_mut)]
    let mut scope_77 = writer.prefix("CacheSubnetGroupName");
    if let Some(var_78) = &input.cache_subnet_group_name {
        scope_77.string(var_78);
    }
    #[allow(unused_mut)]
    let mut scope_79 = writer.prefix("CacheSecurityGroupNames");
    if let Some(var_80) = &input.cache_security_group_names {
        let mut list_82 = scope_79.start_list(false, Some("CacheSecurityGroupName"));
        for item_81 in var_80 {
            #[allow(unused_mut)]
            let mut entry_83 = list_82.entry();
            entry_83.string(item_81);
        }
        list_82.finish();
    }
    #[allow(unused_mut)]
    let mut scope_84 = writer.prefix("SecurityGroupIds");
    if let Some(var_85) = &input.security_group_ids {
        let mut list_87 = scope_84.start_list(false, Some("SecurityGroupId"));
        for item_86 in var_85 {
            #[allow(unused_mut)]
            let mut entry_88 = list_87.entry();
            entry_88.string(item_86);
        }
        list_87.finish();
    }
    #[allow(unused_mut)]
    let mut scope_89 = writer.prefix("Tags");
    if let Some(var_90) = &input.tags {
        let mut list_92 = scope_89.start_list(false, Some("Tag"));
        for item_91 in var_90 {
            #[allow(unused_mut)]
            let mut entry_93 = list_92.entry();
            crate::query_ser::serialize_structure_crate_model_tag(entry_93, item_91)?;
        }
        list_92.finish();
    }
    #[allow(unused_mut)]
    let mut scope_94 = writer.prefix("SnapshotArns");
    if let Some(var_95) = &input.snapshot_arns {
        let mut list_97 = scope_94.start_list(false, Some("SnapshotArn"));
        for item_96 in var_95 {
            #[allow(unused_mut)]
            let mut entry_98 = list_97.entry();
            entry_98.string(item_96);
        }
        list_97.finish();
    }
    #[allow(unused_mut)]
    let mut scope_99 = writer.prefix("SnapshotName");
    if let Some(var_100) = &input.snapshot_name {
        scope_99.string(var_100);
    }
    #[allow(unused_mut)]
    let mut scope_101 = writer.prefix("PreferredMaintenanceWindow");
    if let Some(var_102) = &input.preferred_maintenance_window {
        scope_101.string(var_102);
    }
    #[allow(unused_mut)]
    let mut scope_103 = writer.prefix("Port");
    if let Some(var_104) = &input.port {
        scope_103.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_104).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_105 = writer.prefix("NotificationTopicArn");
    if let Some(var_106) = &input.notification_topic_arn {
        scope_105.string(var_106);
    }
    #[allow(unused_mut)]
    let mut scope_107 = writer.prefix("AutoMinorVersionUpgrade");
    if let Some(var_108) = &input.auto_minor_version_upgrade {
        scope_107.boolean(*var_108);
    }
    #[allow(unused_mut)]
    let mut scope_109 = writer.prefix("SnapshotRetentionLimit");
    if let Some(var_110) = &input.snapshot_retention_limit {
        scope_109.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_110).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_111 = writer.prefix("SnapshotWindow");
    if let Some(var_112) = &input.snapshot_window {
        scope_111.string(var_112);
    }
    #[allow(unused_mut)]
    let mut scope_113 = writer.prefix("AuthToken");
    if let Some(var_114) = &input.auth_token {
        scope_113.string(var_114);
    }
    #[allow(unused_mut)]
    let mut scope_115 = writer.prefix("OutpostMode");
    if let Some(var_116) = &input.outpost_mode {
        scope_115.string(var_116.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_117 = writer.prefix("PreferredOutpostArn");
    if let Some(var_118) = &input.preferred_outpost_arn {
        scope_117.string(var_118);
    }
    #[allow(unused_mut)]
    let mut scope_119 = writer.prefix("PreferredOutpostArns");
    if let Some(var_120) = &input.preferred_outpost_arns {
        let mut list_122 = scope_119.start_list(false, Some("PreferredOutpostArn"));
        for item_121 in var_120 {
            #[allow(unused_mut)]
            let mut entry_123 = list_122.entry();
            entry_123.string(item_121);
        }
        list_122.finish();
    }
    #[allow(unused_mut)]
    let mut scope_124 = writer.prefix("LogDeliveryConfigurations");
    if let Some(var_125) = &input.log_delivery_configurations {
        let mut list_127 = scope_124.start_list(false, Some("LogDeliveryConfigurationRequest"));
        for item_126 in var_125 {
            #[allow(unused_mut)]
            let mut entry_128 = list_127.entry();
            crate::query_ser::serialize_structure_crate_model_log_delivery_configuration_request(
                entry_128, item_126,
            )?;
        }
        list_127.finish();
    }
    #[allow(unused_mut)]
    let mut scope_129 = writer.prefix("TransitEncryptionEnabled");
    if let Some(var_130) = &input.transit_encryption_enabled {
        scope_129.boolean(*var_130);
    }
    #[allow(unused_mut)]
    let mut scope_131 = writer.prefix("NetworkType");
    if let Some(var_132) = &input.network_type {
        scope_131.string(var_132.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_133 = writer.prefix("IpDiscovery");
    if let Some(var_134) = &input.ip_discovery {
        scope_133.string(var_134.as_str());
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_create_cache_parameter_group(
    input: &crate::input::CreateCacheParameterGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "CreateCacheParameterGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_135 = writer.prefix("CacheParameterGroupName");
    if let Some(var_136) = &input.cache_parameter_group_name {
        scope_135.string(var_136);
    }
    #[allow(unused_mut)]
    let mut scope_137 = writer.prefix("CacheParameterGroupFamily");
    if let Some(var_138) = &input.cache_parameter_group_family {
        scope_137.string(var_138);
    }
    #[allow(unused_mut)]
    let mut scope_139 = writer.prefix("Description");
    if let Some(var_140) = &input.description {
        scope_139.string(var_140);
    }
    #[allow(unused_mut)]
    let mut scope_141 = writer.prefix("Tags");
    if let Some(var_142) = &input.tags {
        let mut list_144 = scope_141.start_list(false, Some("Tag"));
        for item_143 in var_142 {
            #[allow(unused_mut)]
            let mut entry_145 = list_144.entry();
            crate::query_ser::serialize_structure_crate_model_tag(entry_145, item_143)?;
        }
        list_144.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_create_cache_security_group(
    input: &crate::input::CreateCacheSecurityGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "CreateCacheSecurityGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_146 = writer.prefix("CacheSecurityGroupName");
    if let Some(var_147) = &input.cache_security_group_name {
        scope_146.string(var_147);
    }
    #[allow(unused_mut)]
    let mut scope_148 = writer.prefix("Description");
    if let Some(var_149) = &input.description {
        scope_148.string(var_149);
    }
    #[allow(unused_mut)]
    let mut scope_150 = writer.prefix("Tags");
    if let Some(var_151) = &input.tags {
        let mut list_153 = scope_150.start_list(false, Some("Tag"));
        for item_152 in var_151 {
            #[allow(unused_mut)]
            let mut entry_154 = list_153.entry();
            crate::query_ser::serialize_structure_crate_model_tag(entry_154, item_152)?;
        }
        list_153.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_create_cache_subnet_group(
    input: &crate::input::CreateCacheSubnetGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "CreateCacheSubnetGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_155 = writer.prefix("CacheSubnetGroupName");
    if let Some(var_156) = &input.cache_subnet_group_name {
        scope_155.string(var_156);
    }
    #[allow(unused_mut)]
    let mut scope_157 = writer.prefix("CacheSubnetGroupDescription");
    if let Some(var_158) = &input.cache_subnet_group_description {
        scope_157.string(var_158);
    }
    #[allow(unused_mut)]
    let mut scope_159 = writer.prefix("SubnetIds");
    if let Some(var_160) = &input.subnet_ids {
        let mut list_162 = scope_159.start_list(false, Some("SubnetIdentifier"));
        for item_161 in var_160 {
            #[allow(unused_mut)]
            let mut entry_163 = list_162.entry();
            entry_163.string(item_161);
        }
        list_162.finish();
    }
    #[allow(unused_mut)]
    let mut scope_164 = writer.prefix("Tags");
    if let Some(var_165) = &input.tags {
        let mut list_167 = scope_164.start_list(false, Some("Tag"));
        for item_166 in var_165 {
            #[allow(unused_mut)]
            let mut entry_168 = list_167.entry();
            crate::query_ser::serialize_structure_crate_model_tag(entry_168, item_166)?;
        }
        list_167.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_create_global_replication_group(
    input: &crate::input::CreateGlobalReplicationGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "CreateGlobalReplicationGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_169 = writer.prefix("GlobalReplicationGroupIdSuffix");
    if let Some(var_170) = &input.global_replication_group_id_suffix {
        scope_169.string(var_170);
    }
    #[allow(unused_mut)]
    let mut scope_171 = writer.prefix("GlobalReplicationGroupDescription");
    if let Some(var_172) = &input.global_replication_group_description {
        scope_171.string(var_172);
    }
    #[allow(unused_mut)]
    let mut scope_173 = writer.prefix("PrimaryReplicationGroupId");
    if let Some(var_174) = &input.primary_replication_group_id {
        scope_173.string(var_174);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_create_replication_group(
    input: &crate::input::CreateReplicationGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "CreateReplicationGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_175 = writer.prefix("ReplicationGroupId");
    if let Some(var_176) = &input.replication_group_id {
        scope_175.string(var_176);
    }
    #[allow(unused_mut)]
    let mut scope_177 = writer.prefix("ReplicationGroupDescription");
    if let Some(var_178) = &input.replication_group_description {
        scope_177.string(var_178);
    }
    #[allow(unused_mut)]
    let mut scope_179 = writer.prefix("GlobalReplicationGroupId");
    if let Some(var_180) = &input.global_replication_group_id {
        scope_179.string(var_180);
    }
    #[allow(unused_mut)]
    let mut scope_181 = writer.prefix("PrimaryClusterId");
    if let Some(var_182) = &input.primary_cluster_id {
        scope_181.string(var_182);
    }
    #[allow(unused_mut)]
    let mut scope_183 = writer.prefix("AutomaticFailoverEnabled");
    if let Some(var_184) = &input.automatic_failover_enabled {
        scope_183.boolean(*var_184);
    }
    #[allow(unused_mut)]
    let mut scope_185 = writer.prefix("MultiAZEnabled");
    if let Some(var_186) = &input.multi_az_enabled {
        scope_185.boolean(*var_186);
    }
    #[allow(unused_mut)]
    let mut scope_187 = writer.prefix("NumCacheClusters");
    if let Some(var_188) = &input.num_cache_clusters {
        scope_187.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_188).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_189 = writer.prefix("PreferredCacheClusterAZs");
    if let Some(var_190) = &input.preferred_cache_cluster_a_zs {
        let mut list_192 = scope_189.start_list(false, Some("AvailabilityZone"));
        for item_191 in var_190 {
            #[allow(unused_mut)]
            let mut entry_193 = list_192.entry();
            entry_193.string(item_191);
        }
        list_192.finish();
    }
    #[allow(unused_mut)]
    let mut scope_194 = writer.prefix("NumNodeGroups");
    if let Some(var_195) = &input.num_node_groups {
        scope_194.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_195).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_196 = writer.prefix("ReplicasPerNodeGroup");
    if let Some(var_197) = &input.replicas_per_node_group {
        scope_196.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_197).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_198 = writer.prefix("NodeGroupConfiguration");
    if let Some(var_199) = &input.node_group_configuration {
        let mut list_201 = scope_198.start_list(false, Some("NodeGroupConfiguration"));
        for item_200 in var_199 {
            #[allow(unused_mut)]
            let mut entry_202 = list_201.entry();
            crate::query_ser::serialize_structure_crate_model_node_group_configuration(
                entry_202, item_200,
            )?;
        }
        list_201.finish();
    }
    #[allow(unused_mut)]
    let mut scope_203 = writer.prefix("CacheNodeType");
    if let Some(var_204) = &input.cache_node_type {
        scope_203.string(var_204);
    }
    #[allow(unused_mut)]
    let mut scope_205 = writer.prefix("Engine");
    if let Some(var_206) = &input.engine {
        scope_205.string(var_206);
    }
    #[allow(unused_mut)]
    let mut scope_207 = writer.prefix("EngineVersion");
    if let Some(var_208) = &input.engine_version {
        scope_207.string(var_208);
    }
    #[allow(unused_mut)]
    let mut scope_209 = writer.prefix("CacheParameterGroupName");
    if let Some(var_210) = &input.cache_parameter_group_name {
        scope_209.string(var_210);
    }
    #[allow(unused_mut)]
    let mut scope_211 = writer.prefix("CacheSubnetGroupName");
    if let Some(var_212) = &input.cache_subnet_group_name {
        scope_211.string(var_212);
    }
    #[allow(unused_mut)]
    let mut scope_213 = writer.prefix("CacheSecurityGroupNames");
    if let Some(var_214) = &input.cache_security_group_names {
        let mut list_216 = scope_213.start_list(false, Some("CacheSecurityGroupName"));
        for item_215 in var_214 {
            #[allow(unused_mut)]
            let mut entry_217 = list_216.entry();
            entry_217.string(item_215);
        }
        list_216.finish();
    }
    #[allow(unused_mut)]
    let mut scope_218 = writer.prefix("SecurityGroupIds");
    if let Some(var_219) = &input.security_group_ids {
        let mut list_221 = scope_218.start_list(false, Some("SecurityGroupId"));
        for item_220 in var_219 {
            #[allow(unused_mut)]
            let mut entry_222 = list_221.entry();
            entry_222.string(item_220);
        }
        list_221.finish();
    }
    #[allow(unused_mut)]
    let mut scope_223 = writer.prefix("Tags");
    if let Some(var_224) = &input.tags {
        let mut list_226 = scope_223.start_list(false, Some("Tag"));
        for item_225 in var_224 {
            #[allow(unused_mut)]
            let mut entry_227 = list_226.entry();
            crate::query_ser::serialize_structure_crate_model_tag(entry_227, item_225)?;
        }
        list_226.finish();
    }
    #[allow(unused_mut)]
    let mut scope_228 = writer.prefix("SnapshotArns");
    if let Some(var_229) = &input.snapshot_arns {
        let mut list_231 = scope_228.start_list(false, Some("SnapshotArn"));
        for item_230 in var_229 {
            #[allow(unused_mut)]
            let mut entry_232 = list_231.entry();
            entry_232.string(item_230);
        }
        list_231.finish();
    }
    #[allow(unused_mut)]
    let mut scope_233 = writer.prefix("SnapshotName");
    if let Some(var_234) = &input.snapshot_name {
        scope_233.string(var_234);
    }
    #[allow(unused_mut)]
    let mut scope_235 = writer.prefix("PreferredMaintenanceWindow");
    if let Some(var_236) = &input.preferred_maintenance_window {
        scope_235.string(var_236);
    }
    #[allow(unused_mut)]
    let mut scope_237 = writer.prefix("Port");
    if let Some(var_238) = &input.port {
        scope_237.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_238).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_239 = writer.prefix("NotificationTopicArn");
    if let Some(var_240) = &input.notification_topic_arn {
        scope_239.string(var_240);
    }
    #[allow(unused_mut)]
    let mut scope_241 = writer.prefix("AutoMinorVersionUpgrade");
    if let Some(var_242) = &input.auto_minor_version_upgrade {
        scope_241.boolean(*var_242);
    }
    #[allow(unused_mut)]
    let mut scope_243 = writer.prefix("SnapshotRetentionLimit");
    if let Some(var_244) = &input.snapshot_retention_limit {
        scope_243.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_244).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_245 = writer.prefix("SnapshotWindow");
    if let Some(var_246) = &input.snapshot_window {
        scope_245.string(var_246);
    }
    #[allow(unused_mut)]
    let mut scope_247 = writer.prefix("AuthToken");
    if let Some(var_248) = &input.auth_token {
        scope_247.string(var_248);
    }
    #[allow(unused_mut)]
    let mut scope_249 = writer.prefix("TransitEncryptionEnabled");
    if let Some(var_250) = &input.transit_encryption_enabled {
        scope_249.boolean(*var_250);
    }
    #[allow(unused_mut)]
    let mut scope_251 = writer.prefix("AtRestEncryptionEnabled");
    if let Some(var_252) = &input.at_rest_encryption_enabled {
        scope_251.boolean(*var_252);
    }
    #[allow(unused_mut)]
    let mut scope_253 = writer.prefix("KmsKeyId");
    if let Some(var_254) = &input.kms_key_id {
        scope_253.string(var_254);
    }
    #[allow(unused_mut)]
    let mut scope_255 = writer.prefix("UserGroupIds");
    if let Some(var_256) = &input.user_group_ids {
        let mut list_258 = scope_255.start_list(false, None);
        for item_257 in var_256 {
            #[allow(unused_mut)]
            let mut entry_259 = list_258.entry();
            entry_259.string(item_257);
        }
        list_258.finish();
    }
    #[allow(unused_mut)]
    let mut scope_260 = writer.prefix("LogDeliveryConfigurations");
    if let Some(var_261) = &input.log_delivery_configurations {
        let mut list_263 = scope_260.start_list(false, Some("LogDeliveryConfigurationRequest"));
        for item_262 in var_261 {
            #[allow(unused_mut)]
            let mut entry_264 = list_263.entry();
            crate::query_ser::serialize_structure_crate_model_log_delivery_configuration_request(
                entry_264, item_262,
            )?;
        }
        list_263.finish();
    }
    #[allow(unused_mut)]
    let mut scope_265 = writer.prefix("DataTieringEnabled");
    if let Some(var_266) = &input.data_tiering_enabled {
        scope_265.boolean(*var_266);
    }
    #[allow(unused_mut)]
    let mut scope_267 = writer.prefix("NetworkType");
    if let Some(var_268) = &input.network_type {
        scope_267.string(var_268.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_269 = writer.prefix("IpDiscovery");
    if let Some(var_270) = &input.ip_discovery {
        scope_269.string(var_270.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_271 = writer.prefix("TransitEncryptionMode");
    if let Some(var_272) = &input.transit_encryption_mode {
        scope_271.string(var_272.as_str());
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_create_snapshot(
    input: &crate::input::CreateSnapshotInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateSnapshot", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_273 = writer.prefix("ReplicationGroupId");
    if let Some(var_274) = &input.replication_group_id {
        scope_273.string(var_274);
    }
    #[allow(unused_mut)]
    let mut scope_275 = writer.prefix("CacheClusterId");
    if let Some(var_276) = &input.cache_cluster_id {
        scope_275.string(var_276);
    }
    #[allow(unused_mut)]
    let mut scope_277 = writer.prefix("SnapshotName");
    if let Some(var_278) = &input.snapshot_name {
        scope_277.string(var_278);
    }
    #[allow(unused_mut)]
    let mut scope_279 = writer.prefix("KmsKeyId");
    if let Some(var_280) = &input.kms_key_id {
        scope_279.string(var_280);
    }
    #[allow(unused_mut)]
    let mut scope_281 = writer.prefix("Tags");
    if let Some(var_282) = &input.tags {
        let mut list_284 = scope_281.start_list(false, Some("Tag"));
        for item_283 in var_282 {
            #[allow(unused_mut)]
            let mut entry_285 = list_284.entry();
            crate::query_ser::serialize_structure_crate_model_tag(entry_285, item_283)?;
        }
        list_284.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_create_user(
    input: &crate::input::CreateUserInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateUser", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_286 = writer.prefix("UserId");
    if let Some(var_287) = &input.user_id {
        scope_286.string(var_287);
    }
    #[allow(unused_mut)]
    let mut scope_288 = writer.prefix("UserName");
    if let Some(var_289) = &input.user_name {
        scope_288.string(var_289);
    }
    #[allow(unused_mut)]
    let mut scope_290 = writer.prefix("Engine");
    if let Some(var_291) = &input.engine {
        scope_290.string(var_291);
    }
    #[allow(unused_mut)]
    let mut scope_292 = writer.prefix("Passwords");
    if let Some(var_293) = &input.passwords {
        let mut list_295 = scope_292.start_list(false, None);
        for item_294 in var_293 {
            #[allow(unused_mut)]
            let mut entry_296 = list_295.entry();
            entry_296.string(item_294);
        }
        list_295.finish();
    }
    #[allow(unused_mut)]
    let mut scope_297 = writer.prefix("AccessString");
    if let Some(var_298) = &input.access_string {
        scope_297.string(var_298);
    }
    #[allow(unused_mut)]
    let mut scope_299 = writer.prefix("NoPasswordRequired");
    if let Some(var_300) = &input.no_password_required {
        scope_299.boolean(*var_300);
    }
    #[allow(unused_mut)]
    let mut scope_301 = writer.prefix("Tags");
    if let Some(var_302) = &input.tags {
        let mut list_304 = scope_301.start_list(false, Some("Tag"));
        for item_303 in var_302 {
            #[allow(unused_mut)]
            let mut entry_305 = list_304.entry();
            crate::query_ser::serialize_structure_crate_model_tag(entry_305, item_303)?;
        }
        list_304.finish();
    }
    #[allow(unused_mut)]
    let mut scope_306 = writer.prefix("AuthenticationMode");
    if let Some(var_307) = &input.authentication_mode {
        crate::query_ser::serialize_structure_crate_model_authentication_mode(scope_306, var_307)?;
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_create_user_group(
    input: &crate::input::CreateUserGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateUserGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_308 = writer.prefix("UserGroupId");
    if let Some(var_309) = &input.user_group_id {
        scope_308.string(var_309);
    }
    #[allow(unused_mut)]
    let mut scope_310 = writer.prefix("Engine");
    if let Some(var_311) = &input.engine {
        scope_310.string(var_311);
    }
    #[allow(unused_mut)]
    let mut scope_312 = writer.prefix("UserIds");
    if let Some(var_313) = &input.user_ids {
        let mut list_315 = scope_312.start_list(false, None);
        for item_314 in var_313 {
            #[allow(unused_mut)]
            let mut entry_316 = list_315.entry();
            entry_316.string(item_314);
        }
        list_315.finish();
    }
    #[allow(unused_mut)]
    let mut scope_317 = writer.prefix("Tags");
    if let Some(var_318) = &input.tags {
        let mut list_320 = scope_317.start_list(false, Some("Tag"));
        for item_319 in var_318 {
            #[allow(unused_mut)]
            let mut entry_321 = list_320.entry();
            crate::query_ser::serialize_structure_crate_model_tag(entry_321, item_319)?;
        }
        list_320.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_decrease_node_groups_in_global_replication_group(
    input: &crate::input::DecreaseNodeGroupsInGlobalReplicationGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(
        &mut out,
        "DecreaseNodeGroupsInGlobalReplicationGroup",
        "2015-02-02",
    );
    #[allow(unused_mut)]
    let mut scope_322 = writer.prefix("GlobalReplicationGroupId");
    if let Some(var_323) = &input.global_replication_group_id {
        scope_322.string(var_323);
    }
    #[allow(unused_mut)]
    let mut scope_324 = writer.prefix("NodeGroupCount");
    {
        scope_324.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.node_group_count).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_325 = writer.prefix("GlobalNodeGroupsToRemove");
    if let Some(var_326) = &input.global_node_groups_to_remove {
        let mut list_328 = scope_325.start_list(false, Some("GlobalNodeGroupId"));
        for item_327 in var_326 {
            #[allow(unused_mut)]
            let mut entry_329 = list_328.entry();
            entry_329.string(item_327);
        }
        list_328.finish();
    }
    #[allow(unused_mut)]
    let mut scope_330 = writer.prefix("GlobalNodeGroupsToRetain");
    if let Some(var_331) = &input.global_node_groups_to_retain {
        let mut list_333 = scope_330.start_list(false, Some("GlobalNodeGroupId"));
        for item_332 in var_331 {
            #[allow(unused_mut)]
            let mut entry_334 = list_333.entry();
            entry_334.string(item_332);
        }
        list_333.finish();
    }
    #[allow(unused_mut)]
    let mut scope_335 = writer.prefix("ApplyImmediately");
    {
        scope_335.boolean(input.apply_immediately);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_decrease_replica_count(
    input: &crate::input::DecreaseReplicaCountInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DecreaseReplicaCount", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_336 = writer.prefix("ReplicationGroupId");
    if let Some(var_337) = &input.replication_group_id {
        scope_336.string(var_337);
    }
    #[allow(unused_mut)]
    let mut scope_338 = writer.prefix("NewReplicaCount");
    if let Some(var_339) = &input.new_replica_count {
        scope_338.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_339).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_340 = writer.prefix("ReplicaConfiguration");
    if let Some(var_341) = &input.replica_configuration {
        let mut list_343 = scope_340.start_list(false, Some("ConfigureShard"));
        for item_342 in var_341 {
            #[allow(unused_mut)]
            let mut entry_344 = list_343.entry();
            crate::query_ser::serialize_structure_crate_model_configure_shard(entry_344, item_342)?;
        }
        list_343.finish();
    }
    #[allow(unused_mut)]
    let mut scope_345 = writer.prefix("ReplicasToRemove");
    if let Some(var_346) = &input.replicas_to_remove {
        let mut list_348 = scope_345.start_list(false, None);
        for item_347 in var_346 {
            #[allow(unused_mut)]
            let mut entry_349 = list_348.entry();
            entry_349.string(item_347);
        }
        list_348.finish();
    }
    #[allow(unused_mut)]
    let mut scope_350 = writer.prefix("ApplyImmediately");
    {
        scope_350.boolean(input.apply_immediately);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_delete_cache_cluster(
    input: &crate::input::DeleteCacheClusterInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DeleteCacheCluster", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_351 = writer.prefix("CacheClusterId");
    if let Some(var_352) = &input.cache_cluster_id {
        scope_351.string(var_352);
    }
    #[allow(unused_mut)]
    let mut scope_353 = writer.prefix("FinalSnapshotIdentifier");
    if let Some(var_354) = &input.final_snapshot_identifier {
        scope_353.string(var_354);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_delete_cache_parameter_group(
    input: &crate::input::DeleteCacheParameterGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DeleteCacheParameterGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_355 = writer.prefix("CacheParameterGroupName");
    if let Some(var_356) = &input.cache_parameter_group_name {
        scope_355.string(var_356);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_delete_cache_security_group(
    input: &crate::input::DeleteCacheSecurityGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DeleteCacheSecurityGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_357 = writer.prefix("CacheSecurityGroupName");
    if let Some(var_358) = &input.cache_security_group_name {
        scope_357.string(var_358);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_delete_cache_subnet_group(
    input: &crate::input::DeleteCacheSubnetGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DeleteCacheSubnetGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_359 = writer.prefix("CacheSubnetGroupName");
    if let Some(var_360) = &input.cache_subnet_group_name {
        scope_359.string(var_360);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_delete_global_replication_group(
    input: &crate::input::DeleteGlobalReplicationGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DeleteGlobalReplicationGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_361 = writer.prefix("GlobalReplicationGroupId");
    if let Some(var_362) = &input.global_replication_group_id {
        scope_361.string(var_362);
    }
    #[allow(unused_mut)]
    let mut scope_363 = writer.prefix("RetainPrimaryReplicationGroup");
    {
        scope_363.boolean(input.retain_primary_replication_group);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_delete_replication_group(
    input: &crate::input::DeleteReplicationGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DeleteReplicationGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_364 = writer.prefix("ReplicationGroupId");
    if let Some(var_365) = &input.replication_group_id {
        scope_364.string(var_365);
    }
    #[allow(unused_mut)]
    let mut scope_366 = writer.prefix("RetainPrimaryCluster");
    if let Some(var_367) = &input.retain_primary_cluster {
        scope_366.boolean(*var_367);
    }
    #[allow(unused_mut)]
    let mut scope_368 = writer.prefix("FinalSnapshotIdentifier");
    if let Some(var_369) = &input.final_snapshot_identifier {
        scope_368.string(var_369);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_delete_snapshot(
    input: &crate::input::DeleteSnapshotInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "DeleteSnapshot", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_370 = writer.prefix("SnapshotName");
    if let Some(var_371) = &input.snapshot_name {
        scope_370.string(var_371);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_delete_user(
    input: &crate::input::DeleteUserInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "DeleteUser", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_372 = writer.prefix("UserId");
    if let Some(var_373) = &input.user_id {
        scope_372.string(var_373);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_delete_user_group(
    input: &crate::input::DeleteUserGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "DeleteUserGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_374 = writer.prefix("UserGroupId");
    if let Some(var_375) = &input.user_group_id {
        scope_374.string(var_375);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_cache_clusters(
    input: &crate::input::DescribeCacheClustersInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DescribeCacheClusters", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_376 = writer.prefix("CacheClusterId");
    if let Some(var_377) = &input.cache_cluster_id {
        scope_376.string(var_377);
    }
    #[allow(unused_mut)]
    let mut scope_378 = writer.prefix("MaxRecords");
    if let Some(var_379) = &input.max_records {
        scope_378.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_379).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_380 = writer.prefix("Marker");
    if let Some(var_381) = &input.marker {
        scope_380.string(var_381);
    }
    #[allow(unused_mut)]
    let mut scope_382 = writer.prefix("ShowCacheNodeInfo");
    if let Some(var_383) = &input.show_cache_node_info {
        scope_382.boolean(*var_383);
    }
    #[allow(unused_mut)]
    let mut scope_384 = writer.prefix("ShowCacheClustersNotInReplicationGroups");
    if let Some(var_385) = &input.show_cache_clusters_not_in_replication_groups {
        scope_384.boolean(*var_385);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_cache_engine_versions(
    input: &crate::input::DescribeCacheEngineVersionsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DescribeCacheEngineVersions", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_386 = writer.prefix("Engine");
    if let Some(var_387) = &input.engine {
        scope_386.string(var_387);
    }
    #[allow(unused_mut)]
    let mut scope_388 = writer.prefix("EngineVersion");
    if let Some(var_389) = &input.engine_version {
        scope_388.string(var_389);
    }
    #[allow(unused_mut)]
    let mut scope_390 = writer.prefix("CacheParameterGroupFamily");
    if let Some(var_391) = &input.cache_parameter_group_family {
        scope_390.string(var_391);
    }
    #[allow(unused_mut)]
    let mut scope_392 = writer.prefix("MaxRecords");
    if let Some(var_393) = &input.max_records {
        scope_392.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_393).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_394 = writer.prefix("Marker");
    if let Some(var_395) = &input.marker {
        scope_394.string(var_395);
    }
    #[allow(unused_mut)]
    let mut scope_396 = writer.prefix("DefaultOnly");
    if input.default_only {
        scope_396.boolean(input.default_only);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_cache_parameter_groups(
    input: &crate::input::DescribeCacheParameterGroupsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DescribeCacheParameterGroups", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_397 = writer.prefix("CacheParameterGroupName");
    if let Some(var_398) = &input.cache_parameter_group_name {
        scope_397.string(var_398);
    }
    #[allow(unused_mut)]
    let mut scope_399 = writer.prefix("MaxRecords");
    if let Some(var_400) = &input.max_records {
        scope_399.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_400).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_401 = writer.prefix("Marker");
    if let Some(var_402) = &input.marker {
        scope_401.string(var_402);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_cache_parameters(
    input: &crate::input::DescribeCacheParametersInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DescribeCacheParameters", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_403 = writer.prefix("CacheParameterGroupName");
    if let Some(var_404) = &input.cache_parameter_group_name {
        scope_403.string(var_404);
    }
    #[allow(unused_mut)]
    let mut scope_405 = writer.prefix("Source");
    if let Some(var_406) = &input.source {
        scope_405.string(var_406);
    }
    #[allow(unused_mut)]
    let mut scope_407 = writer.prefix("MaxRecords");
    if let Some(var_408) = &input.max_records {
        scope_407.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_408).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_409 = writer.prefix("Marker");
    if let Some(var_410) = &input.marker {
        scope_409.string(var_410);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_cache_security_groups(
    input: &crate::input::DescribeCacheSecurityGroupsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DescribeCacheSecurityGroups", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_411 = writer.prefix("CacheSecurityGroupName");
    if let Some(var_412) = &input.cache_security_group_name {
        scope_411.string(var_412);
    }
    #[allow(unused_mut)]
    let mut scope_413 = writer.prefix("MaxRecords");
    if let Some(var_414) = &input.max_records {
        scope_413.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_414).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_415 = writer.prefix("Marker");
    if let Some(var_416) = &input.marker {
        scope_415.string(var_416);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_cache_subnet_groups(
    input: &crate::input::DescribeCacheSubnetGroupsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DescribeCacheSubnetGroups", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_417 = writer.prefix("CacheSubnetGroupName");
    if let Some(var_418) = &input.cache_subnet_group_name {
        scope_417.string(var_418);
    }
    #[allow(unused_mut)]
    let mut scope_419 = writer.prefix("MaxRecords");
    if let Some(var_420) = &input.max_records {
        scope_419.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_420).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_421 = writer.prefix("Marker");
    if let Some(var_422) = &input.marker {
        scope_421.string(var_422);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_engine_default_parameters(
    input: &crate::input::DescribeEngineDefaultParametersInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(
        &mut out,
        "DescribeEngineDefaultParameters",
        "2015-02-02",
    );
    #[allow(unused_mut)]
    let mut scope_423 = writer.prefix("CacheParameterGroupFamily");
    if let Some(var_424) = &input.cache_parameter_group_family {
        scope_423.string(var_424);
    }
    #[allow(unused_mut)]
    let mut scope_425 = writer.prefix("MaxRecords");
    if let Some(var_426) = &input.max_records {
        scope_425.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_426).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_427 = writer.prefix("Marker");
    if let Some(var_428) = &input.marker {
        scope_427.string(var_428);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_events(
    input: &crate::input::DescribeEventsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "DescribeEvents", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_429 = writer.prefix("SourceIdentifier");
    if let Some(var_430) = &input.source_identifier {
        scope_429.string(var_430);
    }
    #[allow(unused_mut)]
    let mut scope_431 = writer.prefix("SourceType");
    if let Some(var_432) = &input.source_type {
        scope_431.string(var_432.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_433 = writer.prefix("StartTime");
    if let Some(var_434) = &input.start_time {
        scope_433.date_time(var_434, aws_smithy_types::date_time::Format::DateTime)?;
    }
    #[allow(unused_mut)]
    let mut scope_435 = writer.prefix("EndTime");
    if let Some(var_436) = &input.end_time {
        scope_435.date_time(var_436, aws_smithy_types::date_time::Format::DateTime)?;
    }
    #[allow(unused_mut)]
    let mut scope_437 = writer.prefix("Duration");
    if let Some(var_438) = &input.duration {
        scope_437.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_438).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_439 = writer.prefix("MaxRecords");
    if let Some(var_440) = &input.max_records {
        scope_439.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_440).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_441 = writer.prefix("Marker");
    if let Some(var_442) = &input.marker {
        scope_441.string(var_442);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_global_replication_groups(
    input: &crate::input::DescribeGlobalReplicationGroupsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(
        &mut out,
        "DescribeGlobalReplicationGroups",
        "2015-02-02",
    );
    #[allow(unused_mut)]
    let mut scope_443 = writer.prefix("GlobalReplicationGroupId");
    if let Some(var_444) = &input.global_replication_group_id {
        scope_443.string(var_444);
    }
    #[allow(unused_mut)]
    let mut scope_445 = writer.prefix("MaxRecords");
    if let Some(var_446) = &input.max_records {
        scope_445.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_446).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_447 = writer.prefix("Marker");
    if let Some(var_448) = &input.marker {
        scope_447.string(var_448);
    }
    #[allow(unused_mut)]
    let mut scope_449 = writer.prefix("ShowMemberInfo");
    if let Some(var_450) = &input.show_member_info {
        scope_449.boolean(*var_450);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_replication_groups(
    input: &crate::input::DescribeReplicationGroupsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DescribeReplicationGroups", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_451 = writer.prefix("ReplicationGroupId");
    if let Some(var_452) = &input.replication_group_id {
        scope_451.string(var_452);
    }
    #[allow(unused_mut)]
    let mut scope_453 = writer.prefix("MaxRecords");
    if let Some(var_454) = &input.max_records {
        scope_453.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_454).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_455 = writer.prefix("Marker");
    if let Some(var_456) = &input.marker {
        scope_455.string(var_456);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_reserved_cache_nodes(
    input: &crate::input::DescribeReservedCacheNodesInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DescribeReservedCacheNodes", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_457 = writer.prefix("ReservedCacheNodeId");
    if let Some(var_458) = &input.reserved_cache_node_id {
        scope_457.string(var_458);
    }
    #[allow(unused_mut)]
    let mut scope_459 = writer.prefix("ReservedCacheNodesOfferingId");
    if let Some(var_460) = &input.reserved_cache_nodes_offering_id {
        scope_459.string(var_460);
    }
    #[allow(unused_mut)]
    let mut scope_461 = writer.prefix("CacheNodeType");
    if let Some(var_462) = &input.cache_node_type {
        scope_461.string(var_462);
    }
    #[allow(unused_mut)]
    let mut scope_463 = writer.prefix("Duration");
    if let Some(var_464) = &input.duration {
        scope_463.string(var_464);
    }
    #[allow(unused_mut)]
    let mut scope_465 = writer.prefix("ProductDescription");
    if let Some(var_466) = &input.product_description {
        scope_465.string(var_466);
    }
    #[allow(unused_mut)]
    let mut scope_467 = writer.prefix("OfferingType");
    if let Some(var_468) = &input.offering_type {
        scope_467.string(var_468);
    }
    #[allow(unused_mut)]
    let mut scope_469 = writer.prefix("MaxRecords");
    if let Some(var_470) = &input.max_records {
        scope_469.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_470).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_471 = writer.prefix("Marker");
    if let Some(var_472) = &input.marker {
        scope_471.string(var_472);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_reserved_cache_nodes_offerings(
    input: &crate::input::DescribeReservedCacheNodesOfferingsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(
        &mut out,
        "DescribeReservedCacheNodesOfferings",
        "2015-02-02",
    );
    #[allow(unused_mut)]
    let mut scope_473 = writer.prefix("ReservedCacheNodesOfferingId");
    if let Some(var_474) = &input.reserved_cache_nodes_offering_id {
        scope_473.string(var_474);
    }
    #[allow(unused_mut)]
    let mut scope_475 = writer.prefix("CacheNodeType");
    if let Some(var_476) = &input.cache_node_type {
        scope_475.string(var_476);
    }
    #[allow(unused_mut)]
    let mut scope_477 = writer.prefix("Duration");
    if let Some(var_478) = &input.duration {
        scope_477.string(var_478);
    }
    #[allow(unused_mut)]
    let mut scope_479 = writer.prefix("ProductDescription");
    if let Some(var_480) = &input.product_description {
        scope_479.string(var_480);
    }
    #[allow(unused_mut)]
    let mut scope_481 = writer.prefix("OfferingType");
    if let Some(var_482) = &input.offering_type {
        scope_481.string(var_482);
    }
    #[allow(unused_mut)]
    let mut scope_483 = writer.prefix("MaxRecords");
    if let Some(var_484) = &input.max_records {
        scope_483.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_484).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_485 = writer.prefix("Marker");
    if let Some(var_486) = &input.marker {
        scope_485.string(var_486);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_service_updates(
    input: &crate::input::DescribeServiceUpdatesInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DescribeServiceUpdates", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_487 = writer.prefix("ServiceUpdateName");
    if let Some(var_488) = &input.service_update_name {
        scope_487.string(var_488);
    }
    #[allow(unused_mut)]
    let mut scope_489 = writer.prefix("ServiceUpdateStatus");
    if let Some(var_490) = &input.service_update_status {
        let mut list_492 = scope_489.start_list(false, None);
        for item_491 in var_490 {
            #[allow(unused_mut)]
            let mut entry_493 = list_492.entry();
            entry_493.string(item_491.as_str());
        }
        list_492.finish();
    }
    #[allow(unused_mut)]
    let mut scope_494 = writer.prefix("MaxRecords");
    if let Some(var_495) = &input.max_records {
        scope_494.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_495).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_496 = writer.prefix("Marker");
    if let Some(var_497) = &input.marker {
        scope_496.string(var_497);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_snapshots(
    input: &crate::input::DescribeSnapshotsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DescribeSnapshots", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_498 = writer.prefix("ReplicationGroupId");
    if let Some(var_499) = &input.replication_group_id {
        scope_498.string(var_499);
    }
    #[allow(unused_mut)]
    let mut scope_500 = writer.prefix("CacheClusterId");
    if let Some(var_501) = &input.cache_cluster_id {
        scope_500.string(var_501);
    }
    #[allow(unused_mut)]
    let mut scope_502 = writer.prefix("SnapshotName");
    if let Some(var_503) = &input.snapshot_name {
        scope_502.string(var_503);
    }
    #[allow(unused_mut)]
    let mut scope_504 = writer.prefix("SnapshotSource");
    if let Some(var_505) = &input.snapshot_source {
        scope_504.string(var_505);
    }
    #[allow(unused_mut)]
    let mut scope_506 = writer.prefix("Marker");
    if let Some(var_507) = &input.marker {
        scope_506.string(var_507);
    }
    #[allow(unused_mut)]
    let mut scope_508 = writer.prefix("MaxRecords");
    if let Some(var_509) = &input.max_records {
        scope_508.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_509).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_510 = writer.prefix("ShowNodeGroupConfig");
    if let Some(var_511) = &input.show_node_group_config {
        scope_510.boolean(*var_511);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_update_actions(
    input: &crate::input::DescribeUpdateActionsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DescribeUpdateActions", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_512 = writer.prefix("ServiceUpdateName");
    if let Some(var_513) = &input.service_update_name {
        scope_512.string(var_513);
    }
    #[allow(unused_mut)]
    let mut scope_514 = writer.prefix("ReplicationGroupIds");
    if let Some(var_515) = &input.replication_group_ids {
        let mut list_517 = scope_514.start_list(false, None);
        for item_516 in var_515 {
            #[allow(unused_mut)]
            let mut entry_518 = list_517.entry();
            entry_518.string(item_516);
        }
        list_517.finish();
    }
    #[allow(unused_mut)]
    let mut scope_519 = writer.prefix("CacheClusterIds");
    if let Some(var_520) = &input.cache_cluster_ids {
        let mut list_522 = scope_519.start_list(false, None);
        for item_521 in var_520 {
            #[allow(unused_mut)]
            let mut entry_523 = list_522.entry();
            entry_523.string(item_521);
        }
        list_522.finish();
    }
    #[allow(unused_mut)]
    let mut scope_524 = writer.prefix("Engine");
    if let Some(var_525) = &input.engine {
        scope_524.string(var_525);
    }
    #[allow(unused_mut)]
    let mut scope_526 = writer.prefix("ServiceUpdateStatus");
    if let Some(var_527) = &input.service_update_status {
        let mut list_529 = scope_526.start_list(false, None);
        for item_528 in var_527 {
            #[allow(unused_mut)]
            let mut entry_530 = list_529.entry();
            entry_530.string(item_528.as_str());
        }
        list_529.finish();
    }
    #[allow(unused_mut)]
    let mut scope_531 = writer.prefix("ServiceUpdateTimeRange");
    if let Some(var_532) = &input.service_update_time_range {
        crate::query_ser::serialize_structure_crate_model_time_range_filter(scope_531, var_532)?;
    }
    #[allow(unused_mut)]
    let mut scope_533 = writer.prefix("UpdateActionStatus");
    if let Some(var_534) = &input.update_action_status {
        let mut list_536 = scope_533.start_list(false, None);
        for item_535 in var_534 {
            #[allow(unused_mut)]
            let mut entry_537 = list_536.entry();
            entry_537.string(item_535.as_str());
        }
        list_536.finish();
    }
    #[allow(unused_mut)]
    let mut scope_538 = writer.prefix("ShowNodeLevelUpdateStatus");
    if let Some(var_539) = &input.show_node_level_update_status {
        scope_538.boolean(*var_539);
    }
    #[allow(unused_mut)]
    let mut scope_540 = writer.prefix("MaxRecords");
    if let Some(var_541) = &input.max_records {
        scope_540.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_541).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_542 = writer.prefix("Marker");
    if let Some(var_543) = &input.marker {
        scope_542.string(var_543);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_user_groups(
    input: &crate::input::DescribeUserGroupsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "DescribeUserGroups", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_544 = writer.prefix("UserGroupId");
    if let Some(var_545) = &input.user_group_id {
        scope_544.string(var_545);
    }
    #[allow(unused_mut)]
    let mut scope_546 = writer.prefix("MaxRecords");
    if let Some(var_547) = &input.max_records {
        scope_546.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_547).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_548 = writer.prefix("Marker");
    if let Some(var_549) = &input.marker {
        scope_548.string(var_549);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_describe_users(
    input: &crate::input::DescribeUsersInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "DescribeUsers", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_550 = writer.prefix("Engine");
    if let Some(var_551) = &input.engine {
        scope_550.string(var_551);
    }
    #[allow(unused_mut)]
    let mut scope_552 = writer.prefix("UserId");
    if let Some(var_553) = &input.user_id {
        scope_552.string(var_553);
    }
    #[allow(unused_mut)]
    let mut scope_554 = writer.prefix("Filters");
    if let Some(var_555) = &input.filters {
        let mut list_557 = scope_554.start_list(false, None);
        for item_556 in var_555 {
            #[allow(unused_mut)]
            let mut entry_558 = list_557.entry();
            crate::query_ser::serialize_structure_crate_model_filter(entry_558, item_556)?;
        }
        list_557.finish();
    }
    #[allow(unused_mut)]
    let mut scope_559 = writer.prefix("MaxRecords");
    if let Some(var_560) = &input.max_records {
        scope_559.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_560).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_561 = writer.prefix("Marker");
    if let Some(var_562) = &input.marker {
        scope_561.string(var_562);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_disassociate_global_replication_group(
    input: &crate::input::DisassociateGlobalReplicationGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(
        &mut out,
        "DisassociateGlobalReplicationGroup",
        "2015-02-02",
    );
    #[allow(unused_mut)]
    let mut scope_563 = writer.prefix("GlobalReplicationGroupId");
    if let Some(var_564) = &input.global_replication_group_id {
        scope_563.string(var_564);
    }
    #[allow(unused_mut)]
    let mut scope_565 = writer.prefix("ReplicationGroupId");
    if let Some(var_566) = &input.replication_group_id {
        scope_565.string(var_566);
    }
    #[allow(unused_mut)]
    let mut scope_567 = writer.prefix("ReplicationGroupRegion");
    if let Some(var_568) = &input.replication_group_region {
        scope_567.string(var_568);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_failover_global_replication_group(
    input: &crate::input::FailoverGlobalReplicationGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(
        &mut out,
        "FailoverGlobalReplicationGroup",
        "2015-02-02",
    );
    #[allow(unused_mut)]
    let mut scope_569 = writer.prefix("GlobalReplicationGroupId");
    if let Some(var_570) = &input.global_replication_group_id {
        scope_569.string(var_570);
    }
    #[allow(unused_mut)]
    let mut scope_571 = writer.prefix("PrimaryRegion");
    if let Some(var_572) = &input.primary_region {
        scope_571.string(var_572);
    }
    #[allow(unused_mut)]
    let mut scope_573 = writer.prefix("PrimaryReplicationGroupId");
    if let Some(var_574) = &input.primary_replication_group_id {
        scope_573.string(var_574);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_increase_node_groups_in_global_replication_group(
    input: &crate::input::IncreaseNodeGroupsInGlobalReplicationGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(
        &mut out,
        "IncreaseNodeGroupsInGlobalReplicationGroup",
        "2015-02-02",
    );
    #[allow(unused_mut)]
    let mut scope_575 = writer.prefix("GlobalReplicationGroupId");
    if let Some(var_576) = &input.global_replication_group_id {
        scope_575.string(var_576);
    }
    #[allow(unused_mut)]
    let mut scope_577 = writer.prefix("NodeGroupCount");
    {
        scope_577.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.node_group_count).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_578 = writer.prefix("RegionalConfigurations");
    if let Some(var_579) = &input.regional_configurations {
        let mut list_581 = scope_578.start_list(false, Some("RegionalConfiguration"));
        for item_580 in var_579 {
            #[allow(unused_mut)]
            let mut entry_582 = list_581.entry();
            crate::query_ser::serialize_structure_crate_model_regional_configuration(
                entry_582, item_580,
            )?;
        }
        list_581.finish();
    }
    #[allow(unused_mut)]
    let mut scope_583 = writer.prefix("ApplyImmediately");
    {
        scope_583.boolean(input.apply_immediately);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_increase_replica_count(
    input: &crate::input::IncreaseReplicaCountInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "IncreaseReplicaCount", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_584 = writer.prefix("ReplicationGroupId");
    if let Some(var_585) = &input.replication_group_id {
        scope_584.string(var_585);
    }
    #[allow(unused_mut)]
    let mut scope_586 = writer.prefix("NewReplicaCount");
    if let Some(var_587) = &input.new_replica_count {
        scope_586.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_587).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_588 = writer.prefix("ReplicaConfiguration");
    if let Some(var_589) = &input.replica_configuration {
        let mut list_591 = scope_588.start_list(false, Some("ConfigureShard"));
        for item_590 in var_589 {
            #[allow(unused_mut)]
            let mut entry_592 = list_591.entry();
            crate::query_ser::serialize_structure_crate_model_configure_shard(entry_592, item_590)?;
        }
        list_591.finish();
    }
    #[allow(unused_mut)]
    let mut scope_593 = writer.prefix("ApplyImmediately");
    {
        scope_593.boolean(input.apply_immediately);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_list_allowed_node_type_modifications(
    input: &crate::input::ListAllowedNodeTypeModificationsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(
        &mut out,
        "ListAllowedNodeTypeModifications",
        "2015-02-02",
    );
    #[allow(unused_mut)]
    let mut scope_594 = writer.prefix("CacheClusterId");
    if let Some(var_595) = &input.cache_cluster_id {
        scope_594.string(var_595);
    }
    #[allow(unused_mut)]
    let mut scope_596 = writer.prefix("ReplicationGroupId");
    if let Some(var_597) = &input.replication_group_id {
        scope_596.string(var_597);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_list_tags_for_resource(
    input: &crate::input::ListTagsForResourceInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ListTagsForResource", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_598 = writer.prefix("ResourceName");
    if let Some(var_599) = &input.resource_name {
        scope_598.string(var_599);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_cache_cluster(
    input: &crate::input::ModifyCacheClusterInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ModifyCacheCluster", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_600 = writer.prefix("CacheClusterId");
    if let Some(var_601) = &input.cache_cluster_id {
        scope_600.string(var_601);
    }
    #[allow(unused_mut)]
    let mut scope_602 = writer.prefix("NumCacheNodes");
    if let Some(var_603) = &input.num_cache_nodes {
        scope_602.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_603).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_604 = writer.prefix("CacheNodeIdsToRemove");
    if let Some(var_605) = &input.cache_node_ids_to_remove {
        let mut list_607 = scope_604.start_list(false, Some("CacheNodeId"));
        for item_606 in var_605 {
            #[allow(unused_mut)]
            let mut entry_608 = list_607.entry();
            entry_608.string(item_606);
        }
        list_607.finish();
    }
    #[allow(unused_mut)]
    let mut scope_609 = writer.prefix("AZMode");
    if let Some(var_610) = &input.az_mode {
        scope_609.string(var_610.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_611 = writer.prefix("NewAvailabilityZones");
    if let Some(var_612) = &input.new_availability_zones {
        let mut list_614 = scope_611.start_list(false, Some("PreferredAvailabilityZone"));
        for item_613 in var_612 {
            #[allow(unused_mut)]
            let mut entry_615 = list_614.entry();
            entry_615.string(item_613);
        }
        list_614.finish();
    }
    #[allow(unused_mut)]
    let mut scope_616 = writer.prefix("CacheSecurityGroupNames");
    if let Some(var_617) = &input.cache_security_group_names {
        let mut list_619 = scope_616.start_list(false, Some("CacheSecurityGroupName"));
        for item_618 in var_617 {
            #[allow(unused_mut)]
            let mut entry_620 = list_619.entry();
            entry_620.string(item_618);
        }
        list_619.finish();
    }
    #[allow(unused_mut)]
    let mut scope_621 = writer.prefix("SecurityGroupIds");
    if let Some(var_622) = &input.security_group_ids {
        let mut list_624 = scope_621.start_list(false, Some("SecurityGroupId"));
        for item_623 in var_622 {
            #[allow(unused_mut)]
            let mut entry_625 = list_624.entry();
            entry_625.string(item_623);
        }
        list_624.finish();
    }
    #[allow(unused_mut)]
    let mut scope_626 = writer.prefix("PreferredMaintenanceWindow");
    if let Some(var_627) = &input.preferred_maintenance_window {
        scope_626.string(var_627);
    }
    #[allow(unused_mut)]
    let mut scope_628 = writer.prefix("NotificationTopicArn");
    if let Some(var_629) = &input.notification_topic_arn {
        scope_628.string(var_629);
    }
    #[allow(unused_mut)]
    let mut scope_630 = writer.prefix("CacheParameterGroupName");
    if let Some(var_631) = &input.cache_parameter_group_name {
        scope_630.string(var_631);
    }
    #[allow(unused_mut)]
    let mut scope_632 = writer.prefix("NotificationTopicStatus");
    if let Some(var_633) = &input.notification_topic_status {
        scope_632.string(var_633);
    }
    #[allow(unused_mut)]
    let mut scope_634 = writer.prefix("ApplyImmediately");
    if input.apply_immediately {
        scope_634.boolean(input.apply_immediately);
    }
    #[allow(unused_mut)]
    let mut scope_635 = writer.prefix("EngineVersion");
    if let Some(var_636) = &input.engine_version {
        scope_635.string(var_636);
    }
    #[allow(unused_mut)]
    let mut scope_637 = writer.prefix("AutoMinorVersionUpgrade");
    if let Some(var_638) = &input.auto_minor_version_upgrade {
        scope_637.boolean(*var_638);
    }
    #[allow(unused_mut)]
    let mut scope_639 = writer.prefix("SnapshotRetentionLimit");
    if let Some(var_640) = &input.snapshot_retention_limit {
        scope_639.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_640).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_641 = writer.prefix("SnapshotWindow");
    if let Some(var_642) = &input.snapshot_window {
        scope_641.string(var_642);
    }
    #[allow(unused_mut)]
    let mut scope_643 = writer.prefix("CacheNodeType");
    if let Some(var_644) = &input.cache_node_type {
        scope_643.string(var_644);
    }
    #[allow(unused_mut)]
    let mut scope_645 = writer.prefix("AuthToken");
    if let Some(var_646) = &input.auth_token {
        scope_645.string(var_646);
    }
    #[allow(unused_mut)]
    let mut scope_647 = writer.prefix("AuthTokenUpdateStrategy");
    if let Some(var_648) = &input.auth_token_update_strategy {
        scope_647.string(var_648.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_649 = writer.prefix("LogDeliveryConfigurations");
    if let Some(var_650) = &input.log_delivery_configurations {
        let mut list_652 = scope_649.start_list(false, Some("LogDeliveryConfigurationRequest"));
        for item_651 in var_650 {
            #[allow(unused_mut)]
            let mut entry_653 = list_652.entry();
            crate::query_ser::serialize_structure_crate_model_log_delivery_configuration_request(
                entry_653, item_651,
            )?;
        }
        list_652.finish();
    }
    #[allow(unused_mut)]
    let mut scope_654 = writer.prefix("IpDiscovery");
    if let Some(var_655) = &input.ip_discovery {
        scope_654.string(var_655.as_str());
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_cache_parameter_group(
    input: &crate::input::ModifyCacheParameterGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ModifyCacheParameterGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_656 = writer.prefix("CacheParameterGroupName");
    if let Some(var_657) = &input.cache_parameter_group_name {
        scope_656.string(var_657);
    }
    #[allow(unused_mut)]
    let mut scope_658 = writer.prefix("ParameterNameValues");
    if let Some(var_659) = &input.parameter_name_values {
        let mut list_661 = scope_658.start_list(false, Some("ParameterNameValue"));
        for item_660 in var_659 {
            #[allow(unused_mut)]
            let mut entry_662 = list_661.entry();
            crate::query_ser::serialize_structure_crate_model_parameter_name_value(
                entry_662, item_660,
            )?;
        }
        list_661.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_cache_subnet_group(
    input: &crate::input::ModifyCacheSubnetGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ModifyCacheSubnetGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_663 = writer.prefix("CacheSubnetGroupName");
    if let Some(var_664) = &input.cache_subnet_group_name {
        scope_663.string(var_664);
    }
    #[allow(unused_mut)]
    let mut scope_665 = writer.prefix("CacheSubnetGroupDescription");
    if let Some(var_666) = &input.cache_subnet_group_description {
        scope_665.string(var_666);
    }
    #[allow(unused_mut)]
    let mut scope_667 = writer.prefix("SubnetIds");
    if let Some(var_668) = &input.subnet_ids {
        let mut list_670 = scope_667.start_list(false, Some("SubnetIdentifier"));
        for item_669 in var_668 {
            #[allow(unused_mut)]
            let mut entry_671 = list_670.entry();
            entry_671.string(item_669);
        }
        list_670.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_global_replication_group(
    input: &crate::input::ModifyGlobalReplicationGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ModifyGlobalReplicationGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_672 = writer.prefix("GlobalReplicationGroupId");
    if let Some(var_673) = &input.global_replication_group_id {
        scope_672.string(var_673);
    }
    #[allow(unused_mut)]
    let mut scope_674 = writer.prefix("ApplyImmediately");
    {
        scope_674.boolean(input.apply_immediately);
    }
    #[allow(unused_mut)]
    let mut scope_675 = writer.prefix("CacheNodeType");
    if let Some(var_676) = &input.cache_node_type {
        scope_675.string(var_676);
    }
    #[allow(unused_mut)]
    let mut scope_677 = writer.prefix("EngineVersion");
    if let Some(var_678) = &input.engine_version {
        scope_677.string(var_678);
    }
    #[allow(unused_mut)]
    let mut scope_679 = writer.prefix("CacheParameterGroupName");
    if let Some(var_680) = &input.cache_parameter_group_name {
        scope_679.string(var_680);
    }
    #[allow(unused_mut)]
    let mut scope_681 = writer.prefix("GlobalReplicationGroupDescription");
    if let Some(var_682) = &input.global_replication_group_description {
        scope_681.string(var_682);
    }
    #[allow(unused_mut)]
    let mut scope_683 = writer.prefix("AutomaticFailoverEnabled");
    if let Some(var_684) = &input.automatic_failover_enabled {
        scope_683.boolean(*var_684);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_replication_group(
    input: &crate::input::ModifyReplicationGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ModifyReplicationGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_685 = writer.prefix("ReplicationGroupId");
    if let Some(var_686) = &input.replication_group_id {
        scope_685.string(var_686);
    }
    #[allow(unused_mut)]
    let mut scope_687 = writer.prefix("ReplicationGroupDescription");
    if let Some(var_688) = &input.replication_group_description {
        scope_687.string(var_688);
    }
    #[allow(unused_mut)]
    let mut scope_689 = writer.prefix("PrimaryClusterId");
    if let Some(var_690) = &input.primary_cluster_id {
        scope_689.string(var_690);
    }
    #[allow(unused_mut)]
    let mut scope_691 = writer.prefix("SnapshottingClusterId");
    if let Some(var_692) = &input.snapshotting_cluster_id {
        scope_691.string(var_692);
    }
    #[allow(unused_mut)]
    let mut scope_693 = writer.prefix("AutomaticFailoverEnabled");
    if let Some(var_694) = &input.automatic_failover_enabled {
        scope_693.boolean(*var_694);
    }
    #[allow(unused_mut)]
    let mut scope_695 = writer.prefix("MultiAZEnabled");
    if let Some(var_696) = &input.multi_az_enabled {
        scope_695.boolean(*var_696);
    }
    #[allow(unused_mut)]
    let mut scope_697 = writer.prefix("NodeGroupId");
    if let Some(var_698) = &input.node_group_id {
        scope_697.string(var_698);
    }
    #[allow(unused_mut)]
    let mut scope_699 = writer.prefix("CacheSecurityGroupNames");
    if let Some(var_700) = &input.cache_security_group_names {
        let mut list_702 = scope_699.start_list(false, Some("CacheSecurityGroupName"));
        for item_701 in var_700 {
            #[allow(unused_mut)]
            let mut entry_703 = list_702.entry();
            entry_703.string(item_701);
        }
        list_702.finish();
    }
    #[allow(unused_mut)]
    let mut scope_704 = writer.prefix("SecurityGroupIds");
    if let Some(var_705) = &input.security_group_ids {
        let mut list_707 = scope_704.start_list(false, Some("SecurityGroupId"));
        for item_706 in var_705 {
            #[allow(unused_mut)]
            let mut entry_708 = list_707.entry();
            entry_708.string(item_706);
        }
        list_707.finish();
    }
    #[allow(unused_mut)]
    let mut scope_709 = writer.prefix("PreferredMaintenanceWindow");
    if let Some(var_710) = &input.preferred_maintenance_window {
        scope_709.string(var_710);
    }
    #[allow(unused_mut)]
    let mut scope_711 = writer.prefix("NotificationTopicArn");
    if let Some(var_712) = &input.notification_topic_arn {
        scope_711.string(var_712);
    }
    #[allow(unused_mut)]
    let mut scope_713 = writer.prefix("CacheParameterGroupName");
    if let Some(var_714) = &input.cache_parameter_group_name {
        scope_713.string(var_714);
    }
    #[allow(unused_mut)]
    let mut scope_715 = writer.prefix("NotificationTopicStatus");
    if let Some(var_716) = &input.notification_topic_status {
        scope_715.string(var_716);
    }
    #[allow(unused_mut)]
    let mut scope_717 = writer.prefix("ApplyImmediately");
    if input.apply_immediately {
        scope_717.boolean(input.apply_immediately);
    }
    #[allow(unused_mut)]
    let mut scope_718 = writer.prefix("EngineVersion");
    if let Some(var_719) = &input.engine_version {
        scope_718.string(var_719);
    }
    #[allow(unused_mut)]
    let mut scope_720 = writer.prefix("AutoMinorVersionUpgrade");
    if let Some(var_721) = &input.auto_minor_version_upgrade {
        scope_720.boolean(*var_721);
    }
    #[allow(unused_mut)]
    let mut scope_722 = writer.prefix("SnapshotRetentionLimit");
    if let Some(var_723) = &input.snapshot_retention_limit {
        scope_722.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_723).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_724 = writer.prefix("SnapshotWindow");
    if let Some(var_725) = &input.snapshot_window {
        scope_724.string(var_725);
    }
    #[allow(unused_mut)]
    let mut scope_726 = writer.prefix("CacheNodeType");
    if let Some(var_727) = &input.cache_node_type {
        scope_726.string(var_727);
    }
    #[allow(unused_mut)]
    let mut scope_728 = writer.prefix("AuthToken");
    if let Some(var_729) = &input.auth_token {
        scope_728.string(var_729);
    }
    #[allow(unused_mut)]
    let mut scope_730 = writer.prefix("AuthTokenUpdateStrategy");
    if let Some(var_731) = &input.auth_token_update_strategy {
        scope_730.string(var_731.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_732 = writer.prefix("UserGroupIdsToAdd");
    if let Some(var_733) = &input.user_group_ids_to_add {
        let mut list_735 = scope_732.start_list(false, None);
        for item_734 in var_733 {
            #[allow(unused_mut)]
            let mut entry_736 = list_735.entry();
            entry_736.string(item_734);
        }
        list_735.finish();
    }
    #[allow(unused_mut)]
    let mut scope_737 = writer.prefix("UserGroupIdsToRemove");
    if let Some(var_738) = &input.user_group_ids_to_remove {
        let mut list_740 = scope_737.start_list(false, None);
        for item_739 in var_738 {
            #[allow(unused_mut)]
            let mut entry_741 = list_740.entry();
            entry_741.string(item_739);
        }
        list_740.finish();
    }
    #[allow(unused_mut)]
    let mut scope_742 = writer.prefix("RemoveUserGroups");
    if let Some(var_743) = &input.remove_user_groups {
        scope_742.boolean(*var_743);
    }
    #[allow(unused_mut)]
    let mut scope_744 = writer.prefix("LogDeliveryConfigurations");
    if let Some(var_745) = &input.log_delivery_configurations {
        let mut list_747 = scope_744.start_list(false, Some("LogDeliveryConfigurationRequest"));
        for item_746 in var_745 {
            #[allow(unused_mut)]
            let mut entry_748 = list_747.entry();
            crate::query_ser::serialize_structure_crate_model_log_delivery_configuration_request(
                entry_748, item_746,
            )?;
        }
        list_747.finish();
    }
    #[allow(unused_mut)]
    let mut scope_749 = writer.prefix("IpDiscovery");
    if let Some(var_750) = &input.ip_discovery {
        scope_749.string(var_750.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_751 = writer.prefix("TransitEncryptionEnabled");
    if let Some(var_752) = &input.transit_encryption_enabled {
        scope_751.boolean(*var_752);
    }
    #[allow(unused_mut)]
    let mut scope_753 = writer.prefix("TransitEncryptionMode");
    if let Some(var_754) = &input.transit_encryption_mode {
        scope_753.string(var_754.as_str());
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_replication_group_shard_configuration(
    input: &crate::input::ModifyReplicationGroupShardConfigurationInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(
        &mut out,
        "ModifyReplicationGroupShardConfiguration",
        "2015-02-02",
    );
    #[allow(unused_mut)]
    let mut scope_755 = writer.prefix("ReplicationGroupId");
    if let Some(var_756) = &input.replication_group_id {
        scope_755.string(var_756);
    }
    #[allow(unused_mut)]
    let mut scope_757 = writer.prefix("NodeGroupCount");
    {
        scope_757.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.node_group_count).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_758 = writer.prefix("ApplyImmediately");
    {
        scope_758.boolean(input.apply_immediately);
    }
    #[allow(unused_mut)]
    let mut scope_759 = writer.prefix("ReshardingConfiguration");
    if let Some(var_760) = &input.resharding_configuration {
        let mut list_762 = scope_759.start_list(false, Some("ReshardingConfiguration"));
        for item_761 in var_760 {
            #[allow(unused_mut)]
            let mut entry_763 = list_762.entry();
            crate::query_ser::serialize_structure_crate_model_resharding_configuration(
                entry_763, item_761,
            )?;
        }
        list_762.finish();
    }
    #[allow(unused_mut)]
    let mut scope_764 = writer.prefix("NodeGroupsToRemove");
    if let Some(var_765) = &input.node_groups_to_remove {
        let mut list_767 = scope_764.start_list(false, Some("NodeGroupToRemove"));
        for item_766 in var_765 {
            #[allow(unused_mut)]
            let mut entry_768 = list_767.entry();
            entry_768.string(item_766);
        }
        list_767.finish();
    }
    #[allow(unused_mut)]
    let mut scope_769 = writer.prefix("NodeGroupsToRetain");
    if let Some(var_770) = &input.node_groups_to_retain {
        let mut list_772 = scope_769.start_list(false, Some("NodeGroupToRetain"));
        for item_771 in var_770 {
            #[allow(unused_mut)]
            let mut entry_773 = list_772.entry();
            entry_773.string(item_771);
        }
        list_772.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_user(
    input: &crate::input::ModifyUserInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "ModifyUser", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_774 = writer.prefix("UserId");
    if let Some(var_775) = &input.user_id {
        scope_774.string(var_775);
    }
    #[allow(unused_mut)]
    let mut scope_776 = writer.prefix("AccessString");
    if let Some(var_777) = &input.access_string {
        scope_776.string(var_777);
    }
    #[allow(unused_mut)]
    let mut scope_778 = writer.prefix("AppendAccessString");
    if let Some(var_779) = &input.append_access_string {
        scope_778.string(var_779);
    }
    #[allow(unused_mut)]
    let mut scope_780 = writer.prefix("Passwords");
    if let Some(var_781) = &input.passwords {
        let mut list_783 = scope_780.start_list(false, None);
        for item_782 in var_781 {
            #[allow(unused_mut)]
            let mut entry_784 = list_783.entry();
            entry_784.string(item_782);
        }
        list_783.finish();
    }
    #[allow(unused_mut)]
    let mut scope_785 = writer.prefix("NoPasswordRequired");
    if let Some(var_786) = &input.no_password_required {
        scope_785.boolean(*var_786);
    }
    #[allow(unused_mut)]
    let mut scope_787 = writer.prefix("AuthenticationMode");
    if let Some(var_788) = &input.authentication_mode {
        crate::query_ser::serialize_structure_crate_model_authentication_mode(scope_787, var_788)?;
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_user_group(
    input: &crate::input::ModifyUserGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "ModifyUserGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_789 = writer.prefix("UserGroupId");
    if let Some(var_790) = &input.user_group_id {
        scope_789.string(var_790);
    }
    #[allow(unused_mut)]
    let mut scope_791 = writer.prefix("UserIdsToAdd");
    if let Some(var_792) = &input.user_ids_to_add {
        let mut list_794 = scope_791.start_list(false, None);
        for item_793 in var_792 {
            #[allow(unused_mut)]
            let mut entry_795 = list_794.entry();
            entry_795.string(item_793);
        }
        list_794.finish();
    }
    #[allow(unused_mut)]
    let mut scope_796 = writer.prefix("UserIdsToRemove");
    if let Some(var_797) = &input.user_ids_to_remove {
        let mut list_799 = scope_796.start_list(false, None);
        for item_798 in var_797 {
            #[allow(unused_mut)]
            let mut entry_800 = list_799.entry();
            entry_800.string(item_798);
        }
        list_799.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_purchase_reserved_cache_nodes_offering(
    input: &crate::input::PurchaseReservedCacheNodesOfferingInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(
        &mut out,
        "PurchaseReservedCacheNodesOffering",
        "2015-02-02",
    );
    #[allow(unused_mut)]
    let mut scope_801 = writer.prefix("ReservedCacheNodesOfferingId");
    if let Some(var_802) = &input.reserved_cache_nodes_offering_id {
        scope_801.string(var_802);
    }
    #[allow(unused_mut)]
    let mut scope_803 = writer.prefix("ReservedCacheNodeId");
    if let Some(var_804) = &input.reserved_cache_node_id {
        scope_803.string(var_804);
    }
    #[allow(unused_mut)]
    let mut scope_805 = writer.prefix("CacheNodeCount");
    if let Some(var_806) = &input.cache_node_count {
        scope_805.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_806).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_807 = writer.prefix("Tags");
    if let Some(var_808) = &input.tags {
        let mut list_810 = scope_807.start_list(false, Some("Tag"));
        for item_809 in var_808 {
            #[allow(unused_mut)]
            let mut entry_811 = list_810.entry();
            crate::query_ser::serialize_structure_crate_model_tag(entry_811, item_809)?;
        }
        list_810.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_rebalance_slots_in_global_replication_group(
    input: &crate::input::RebalanceSlotsInGlobalReplicationGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(
        &mut out,
        "RebalanceSlotsInGlobalReplicationGroup",
        "2015-02-02",
    );
    #[allow(unused_mut)]
    let mut scope_812 = writer.prefix("GlobalReplicationGroupId");
    if let Some(var_813) = &input.global_replication_group_id {
        scope_812.string(var_813);
    }
    #[allow(unused_mut)]
    let mut scope_814 = writer.prefix("ApplyImmediately");
    {
        scope_814.boolean(input.apply_immediately);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_reboot_cache_cluster(
    input: &crate::input::RebootCacheClusterInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "RebootCacheCluster", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_815 = writer.prefix("CacheClusterId");
    if let Some(var_816) = &input.cache_cluster_id {
        scope_815.string(var_816);
    }
    #[allow(unused_mut)]
    let mut scope_817 = writer.prefix("CacheNodeIdsToReboot");
    if let Some(var_818) = &input.cache_node_ids_to_reboot {
        let mut list_820 = scope_817.start_list(false, Some("CacheNodeId"));
        for item_819 in var_818 {
            #[allow(unused_mut)]
            let mut entry_821 = list_820.entry();
            entry_821.string(item_819);
        }
        list_820.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_remove_tags_from_resource(
    input: &crate::input::RemoveTagsFromResourceInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "RemoveTagsFromResource", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_822 = writer.prefix("ResourceName");
    if let Some(var_823) = &input.resource_name {
        scope_822.string(var_823);
    }
    #[allow(unused_mut)]
    let mut scope_824 = writer.prefix("TagKeys");
    if let Some(var_825) = &input.tag_keys {
        let mut list_827 = scope_824.start_list(false, None);
        for item_826 in var_825 {
            #[allow(unused_mut)]
            let mut entry_828 = list_827.entry();
            entry_828.string(item_826);
        }
        list_827.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_reset_cache_parameter_group(
    input: &crate::input::ResetCacheParameterGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ResetCacheParameterGroup", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_829 = writer.prefix("CacheParameterGroupName");
    if let Some(var_830) = &input.cache_parameter_group_name {
        scope_829.string(var_830);
    }
    #[allow(unused_mut)]
    let mut scope_831 = writer.prefix("ResetAllParameters");
    if input.reset_all_parameters {
        scope_831.boolean(input.reset_all_parameters);
    }
    #[allow(unused_mut)]
    let mut scope_832 = writer.prefix("ParameterNameValues");
    if let Some(var_833) = &input.parameter_name_values {
        let mut list_835 = scope_832.start_list(false, Some("ParameterNameValue"));
        for item_834 in var_833 {
            #[allow(unused_mut)]
            let mut entry_836 = list_835.entry();
            crate::query_ser::serialize_structure_crate_model_parameter_name_value(
                entry_836, item_834,
            )?;
        }
        list_835.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_revoke_cache_security_group_ingress(
    input: &crate::input::RevokeCacheSecurityGroupIngressInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(
        &mut out,
        "RevokeCacheSecurityGroupIngress",
        "2015-02-02",
    );
    #[allow(unused_mut)]
    let mut scope_837 = writer.prefix("CacheSecurityGroupName");
    if let Some(var_838) = &input.cache_security_group_name {
        scope_837.string(var_838);
    }
    #[allow(unused_mut)]
    let mut scope_839 = writer.prefix("EC2SecurityGroupName");
    if let Some(var_840) = &input.ec2_security_group_name {
        scope_839.string(var_840);
    }
    #[allow(unused_mut)]
    let mut scope_841 = writer.prefix("EC2SecurityGroupOwnerId");
    if let Some(var_842) = &input.ec2_security_group_owner_id {
        scope_841.string(var_842);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_start_migration(
    input: &crate::input::StartMigrationInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "StartMigration", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_843 = writer.prefix("ReplicationGroupId");
    if let Some(var_844) = &input.replication_group_id {
        scope_843.string(var_844);
    }
    #[allow(unused_mut)]
    let mut scope_845 = writer.prefix("CustomerNodeEndpointList");
    if let Some(var_846) = &input.customer_node_endpoint_list {
        let mut list_848 = scope_845.start_list(false, None);
        for item_847 in var_846 {
            #[allow(unused_mut)]
            let mut entry_849 = list_848.entry();
            crate::query_ser::serialize_structure_crate_model_customer_node_endpoint(
                entry_849, item_847,
            )?;
        }
        list_848.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_test_failover(
    input: &crate::input::TestFailoverInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "TestFailover", "2015-02-02");
    #[allow(unused_mut)]
    let mut scope_850 = writer.prefix("ReplicationGroupId");
    if let Some(var_851) = &input.replication_group_id {
        scope_850.string(var_851);
    }
    #[allow(unused_mut)]
    let mut scope_852 = writer.prefix("NodeGroupId");
    if let Some(var_853) = &input.node_group_id {
        scope_852.string(var_853);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}