Source file values.ml

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
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
(* generated by: awso-codegen generate-all --botocore-data vendor/botocore/botocore/data -o aws --runtime-dir lib/runtime/awso --cli-dir awso-cli *)
open Awso
open! Import
[@@@warning "-32"]
let service = Service.batch
let apiVersion = "2016-08-10"
let endpointPrefix = "batch"
let serviceFullName = "AWS Batch"
let signatureVersion = "v4"
let protocol = "rest_json"
let globalEndpoint = endpointPrefix ^ ".amazonaws.com"
let serviceAbbreviation = "AWS Batch"
let simple_to_json to_value x =
  Botodata.Json.value_to_json_scalar (to_value x)
let composed_to_json to_value x = Botodata.Json.value_to_json (to_value x)
let to_query to_value x = Client.Query.of_value (to_value x)
let structure_to_value_aux st ~f =
  let filter = function | (k, Some v) -> Some (k, v) | _ -> None in
  let pair k v = (k, v) in
  let defer_value (k, dv) = pair k dv in
  ((List.filter_map st ~f:filter) |> (List.map ~f:defer_value)) |>
    (fun x -> `Structure (f x))
let structure_to_value = structure_to_value_aux ~f:Fn.id
let structure_to_wrapped_value ~wrapper ~response =
  structure_to_value_aux
    ~f:(fun x -> [(wrapper, (`Structure x)); (response, (`Structure []))])
module DeviceCgroupPermission =
  struct
    type nonrec t =
      | READ 
      | WRITE 
      | MKNOD 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | READ -> "READ"
      | WRITE -> "WRITE"
      | MKNOD -> "MKNOD"
      | Non_static_id s -> s
    let of_string =
      function
      | "READ" -> READ
      | "WRITE" -> WRITE
      | "MKNOD" -> MKNOD
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration DeviceCgroupPermission" xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"DeviceCgroupPermission" j)
    let to_json = simple_to_json to_value
  end
module String_ =
  struct
    type nonrec t = string
    let context_ = "String"
    let make i = i
    let of_string x = x
    let to_value x = `String x
    let to_query v = to_query to_value v
    let to_header x = x
    let of_xml = Xml.string_data_exn ~context:context_
    let of_json j = string_of_json ~kind:"String" j
    let to_json = simple_to_json to_value
  end
module DeviceCgroupPermissions =
  struct
    type nonrec t = DeviceCgroupPermission.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:DeviceCgroupPermission.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:DeviceCgroupPermission.of_xml)
    let of_json j =
      list_of_json ~kind:"DeviceCgroupPermissions"
        ~of_json:DeviceCgroupPermission.of_json j
    let to_json v = composed_to_json to_value v
  end
module Integer =
  struct
    type nonrec t = int
    let make i = i
    let of_string = Int.of_string
    let to_value x = `Integer x
    let to_query v = to_query to_value v
    let to_header x = Int.to_string x
    let of_xml xml_arg0 =
      Int.of_string (string_of_xml ~kind:"an integer for Integer" xml_arg0)
    let of_json j = Int.of_float (float_of_json ~kind:"an integer" j)
    let to_json = simple_to_json to_value
  end
module StringList =
  struct
    type nonrec t = String_.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:String_.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:String_.of_xml)
    let of_json j =
      list_of_json ~kind:"StringList" ~of_json:String_.of_json j
    let to_json v = composed_to_json to_value v
  end
module Device =
  struct
    type nonrec t =
      {
      hostPath: String_.t
        [@ocaml.doc
          "The path for the device on the host container instance."];
      containerPath: String_.t option
        [@ocaml.doc
          "The path inside the container that's used to expose the host device. By default, the hostPath value is used."];
      permissions: DeviceCgroupPermissions.t option
        [@ocaml.doc
          "The explicit permissions to provide to the container for the device. By default, the container has permissions for read, write, and mknod for the device."]}
    let context_ = "Device"
    let make ?containerPath =
      fun ?permissions ->
        fun ~hostPath -> fun () -> { containerPath; permissions; hostPath }
    let to_value x =
      structure_to_value
        [("hostPath", (Some (String_.to_value x.hostPath)));
        ("containerPath", (Option.map x.containerPath ~f:String_.to_value));
        ("permissions",
          (Option.map x.permissions ~f:DeviceCgroupPermissions.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let permissions =
        (Option.map ~f:DeviceCgroupPermissions.of_xml)
          (Xml.child xml_arg0 "permissions") in
      let containerPath =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "containerPath") in
      let hostPath =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "hostPath") in
      make ?permissions ?containerPath ~hostPath ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let permissions =
        field_map json__ "permissions" DeviceCgroupPermissions.of_json in
      let containerPath = field_map json__ "containerPath" String_.of_json in
      let hostPath = field_map_exn json__ "hostPath" String_.of_json in
      make ?permissions ?containerPath ~hostPath ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents a container instance host device. This object isn't applicable to jobs that are running on Fargate resources and shouldn't be provided."]
module Tmpfs =
  struct
    type nonrec t =
      {
      containerPath: String_.t
        [@ocaml.doc
          "The absolute file path in the container where the tmpfs volume is mounted."];
      size: Integer.t [@ocaml.doc "The size (in MiB) of the tmpfs volume."];
      mountOptions: StringList.t option
        [@ocaml.doc
          "The list of tmpfs volume mount options. Valid values: \"defaults\" | \"ro\" | \"rw\" | \"suid\" | \"nosuid\" | \"dev\" | \"nodev\" | \"exec\" | \"noexec\" | \"sync\" | \"async\" | \"dirsync\" | \"remount\" | \"mand\" | \"nomand\" | \"atime\" | \"noatime\" | \"diratime\" | \"nodiratime\" | \"bind\" | \"rbind\" | \"unbindable\" | \"runbindable\" | \"private\" | \"rprivate\" | \"shared\" | \"rshared\" | \"slave\" | \"rslave\" | \"relatime\" | \"norelatime\" | \"strictatime\" | \"nostrictatime\" | \"mode\" | \"uid\" | \"gid\" | \"nr_inodes\" | \"nr_blocks\" | \"mpol\""]}
    let context_ = "Tmpfs"
    let make ?mountOptions =
      fun ~containerPath ->
        fun ~size -> fun () -> { mountOptions; containerPath; size }
    let to_value x =
      structure_to_value
        [("containerPath", (Some (String_.to_value x.containerPath)));
        ("size", (Some (Integer.to_value x.size)));
        ("mountOptions", (Option.map x.mountOptions ~f:StringList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let mountOptions =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "mountOptions") in
      let size =
        Integer.of_xml (Xml.child_exn ~context:context_ xml_arg0 "size") in
      let containerPath =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "containerPath") in
      make ?mountOptions ~size ~containerPath ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let mountOptions = field_map json__ "mountOptions" StringList.of_json in
      let size = field_map_exn json__ "size" Integer.of_json in
      let containerPath =
        field_map_exn json__ "containerPath" String_.of_json in
      make ?mountOptions ~size ~containerPath ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The container path, mount options, and size of the tmpfs mount. This object isn't applicable to jobs that are running on Fargate resources."]
module Secret =
  struct
    type nonrec t =
      {
      name: String_.t [@ocaml.doc "The name of the secret."];
      valueFrom: String_.t
        [@ocaml.doc
          "The secret to expose to the container. The supported values are either the full Amazon Resource Name (ARN) of the Secrets Manager secret or the full ARN of the parameter in the Amazon Web Services Systems Manager Parameter Store. If the Amazon Web Services Systems Manager Parameter Store parameter exists in the same Region as the job you're launching, then you can use either the full Amazon Resource Name (ARN) or name of the parameter. If the parameter exists in a different Region, then the full ARN must be specified."]}
    let context_ = "Secret"
    let make ~name = fun ~valueFrom -> fun () -> { name; valueFrom }
    let to_value x =
      structure_to_value
        [("name", (Some (String_.to_value x.name)));
        ("valueFrom", (Some (String_.to_value x.valueFrom)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let valueFrom =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "valueFrom") in
      let name =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "name") in
      make ~valueFrom ~name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let valueFrom = field_map_exn json__ "valueFrom" String_.of_json in
      let name = field_map_exn json__ "name" String_.of_json in
      make ~valueFrom ~name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the secret to expose to your container. Secrets can be exposed to a container in the following ways: To inject sensitive data into your containers as environment variables, use the secrets container definition parameter. To reference sensitive information in the log configuration of a container, use the secretOptions container definition parameter. For more information, see Specifying sensitive data in the Batch User Guide."]
module Boolean =
  struct
    type nonrec t = bool
    let make i = i
    let of_string = Bool.of_string
    let to_value x = `Boolean x
    let to_query v = to_query to_value v
    let to_header x = Bool.to_string x
    let of_xml xml_arg0 =
      Bool.of_string (string_of_xml ~kind:"a boolean" xml_arg0)
    let of_json = bool_of_json
    let to_json = simple_to_json to_value
  end
module ResourceType =
  struct
    type nonrec t =
      | GPU 
      | VCPU 
      | MEMORY 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | GPU -> "GPU"
      | VCPU -> "VCPU"
      | MEMORY -> "MEMORY"
      | Non_static_id s -> s
    let of_string =
      function
      | "GPU" -> GPU
      | "VCPU" -> VCPU
      | "MEMORY" -> MEMORY
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration ResourceType" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"ResourceType" j)
    let to_json = simple_to_json to_value
  end
module EFSAuthorizationConfigIAM =
  struct
    type nonrec t =
      | ENABLED 
      | DISABLED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | ENABLED -> "ENABLED"
      | DISABLED -> "DISABLED"
      | Non_static_id s -> s
    let of_string =
      function
      | "ENABLED" -> ENABLED
      | "DISABLED" -> DISABLED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration EFSAuthorizationConfigIAM" xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"EFSAuthorizationConfigIAM" j)
    let to_json = simple_to_json to_value
  end
module KeyValuePair =
  struct
    type nonrec t =
      {
      name: String_.t option
        [@ocaml.doc
          "The name of the key-value pair. For environment variables, this is the name of the environment variable."];
      value: String_.t option
        [@ocaml.doc
          "The value of the key-value pair. For environment variables, this is the value of the environment variable."]}
    let make ?name = fun ?value -> fun () -> { name; value }
    let to_value x =
      structure_to_value
        [("name", (Option.map x.name ~f:String_.to_value));
        ("value", (Option.map x.value ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let value = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "value") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      make ?value ?name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let value = field_map json__ "value" String_.of_json in
      let name = field_map json__ "name" String_.of_json in
      make ?value ?name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "A key-value pair object."]
module FirelensConfigurationOptionsMap =
  struct
    type nonrec t = (String_.t * String_.t) list
    let make i = i
    let of_header xs =
      make
        (List.filter_map xs
           ~f:(fun (k, v) ->
                 (Base.String.chop_prefix k ~prefix:"x-amz-meta-") |>
                   (Option.map
                      ~f:(fun chopped ->
                            ((String_.of_string chopped),
                              (String_.of_string v))))))
    let to_value xs =
      (xs |>
         (List.map
            ~f:(fun (x, y) ->
                  (String_.to_value x) |>
                    (fun x -> (String_.to_value y) |> (fun y -> (x, y))))))
        |> (fun x -> `Map x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for Map_shape objects" ()
    let of_xml _ =
      failwith "of_xml_converter_of_shape: Map_shape case not implemented"
    let of_json j =
      object_of_json ~key_of_string:String_.of_string
        ~of_json:String_.of_json j
    let to_json v = composed_to_json to_value v
  end
module FirelensConfigurationType =
  struct
    type nonrec t =
      | Fluentd 
      | Fluentbit 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | Fluentd -> "fluentd"
      | Fluentbit -> "fluentbit"
      | Non_static_id s -> s
    let of_string =
      function
      | "fluentd" -> Fluentd
      | "fluentbit" -> Fluentbit
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration FirelensConfigurationType" xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"FirelensConfigurationType" j)
    let to_json = simple_to_json to_value
  end
module DevicesList =
  struct
    type nonrec t = Device.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:Device.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:Device.of_xml)
    let of_json j =
      list_of_json ~kind:"DevicesList" ~of_json:Device.of_json j
    let to_json v = composed_to_json to_value v
  end
module TmpfsList =
  struct
    type nonrec t = Tmpfs.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:Tmpfs.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:Tmpfs.of_xml)
    let of_json j = list_of_json ~kind:"TmpfsList" ~of_json:Tmpfs.of_json j
    let to_json v = composed_to_json to_value v
  end
module LogConfigurationOptionsMap =
  struct
    type nonrec t = (String_.t * String_.t) list
    let make i = i
    let of_header xs =
      make
        (List.filter_map xs
           ~f:(fun (k, v) ->
                 (Base.String.chop_prefix k ~prefix:"x-amz-meta-") |>
                   (Option.map
                      ~f:(fun chopped ->
                            ((String_.of_string chopped),
                              (String_.of_string v))))))
    let to_value xs =
      (xs |>
         (List.map
            ~f:(fun (x, y) ->
                  (String_.to_value x) |>
                    (fun x -> (String_.to_value y) |> (fun y -> (x, y))))))
        |> (fun x -> `Map x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for Map_shape objects" ()
    let of_xml _ =
      failwith "of_xml_converter_of_shape: Map_shape case not implemented"
    let of_json j =
      object_of_json ~key_of_string:String_.of_string
        ~of_json:String_.of_json j
    let to_json v = composed_to_json to_value v
  end
module LogDriver =
  struct
    type nonrec t =
      | Json_file 
      | Syslog 
      | Journald 
      | Gelf 
      | Fluentd 
      | Awslogs 
      | Splunk 
      | Awsfirelens 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | Json_file -> "json-file"
      | Syslog -> "syslog"
      | Journald -> "journald"
      | Gelf -> "gelf"
      | Fluentd -> "fluentd"
      | Awslogs -> "awslogs"
      | Splunk -> "splunk"
      | Awsfirelens -> "awsfirelens"
      | Non_static_id s -> s
    let of_string =
      function
      | "json-file" -> Json_file
      | "syslog" -> Syslog
      | "journald" -> Journald
      | "gelf" -> Gelf
      | "fluentd" -> Fluentd
      | "awslogs" -> Awslogs
      | "splunk" -> Splunk
      | "awsfirelens" -> Awsfirelens
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration LogDriver" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"LogDriver" j)
    let to_json = simple_to_json to_value
  end
module SecretList =
  struct
    type nonrec t = Secret.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:Secret.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:Secret.of_xml)
    let of_json j = list_of_json ~kind:"SecretList" ~of_json:Secret.of_json j
    let to_json v = composed_to_json to_value v
  end
module MountPoint =
  struct
    type nonrec t =
      {
      containerPath: String_.t option
        [@ocaml.doc
          "The path on the container where the host volume is mounted."];
      readOnly: Boolean.t option
        [@ocaml.doc
          "If this value is true, the container has read-only access to the volume. Otherwise, the container can write to the volume. The default value is false."];
      sourceVolume: String_.t option
        [@ocaml.doc "The name of the volume to mount."]}
    let make ?containerPath =
      fun ?readOnly ->
        fun ?sourceVolume ->
          fun () -> { containerPath; readOnly; sourceVolume }
    let to_value x =
      structure_to_value
        [("containerPath", (Option.map x.containerPath ~f:String_.to_value));
        ("readOnly", (Option.map x.readOnly ~f:Boolean.to_value));
        ("sourceVolume", (Option.map x.sourceVolume ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let sourceVolume =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "sourceVolume") in
      let readOnly =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "readOnly") in
      let containerPath =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "containerPath") in
      make ?sourceVolume ?readOnly ?containerPath ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let sourceVolume = field_map json__ "sourceVolume" String_.of_json in
      let readOnly = field_map json__ "readOnly" Boolean.of_json in
      let containerPath = field_map json__ "containerPath" String_.of_json in
      make ?sourceVolume ?readOnly ?containerPath ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Details for a Docker volume mount point that's used in a job's container properties. This parameter maps to Volumes in the Create a container section of the Docker Remote API and the --volume option to docker run."]
module ResourceRequirement =
  struct
    type nonrec t =
      {
      value: String_.t
        [@ocaml.doc
          "The quantity of the specified resource to reserve for the container. The values vary based on the type specified. type=\"GPU\" The number of physical GPUs to reserve for the container. Make sure that the number of GPUs reserved for all containers in a job doesn't exceed the number of available GPUs on the compute resource that the job is launched on. GPUs aren't available for jobs that are running on Fargate resources. type=\"MEMORY\" The memory hard limit (in MiB) present to the container. This parameter is supported for jobs that are running on Amazon EC2 resources. If your container attempts to exceed the memory specified, the container is terminated. This parameter maps to Memory in the Create a container section of the Docker Remote API and the --memory option to docker run. You must specify at least 4 MiB of memory for a job. This is required but can be specified in several places for multi-node parallel (MNP) jobs. It must be specified for each node at least once. This parameter maps to Memory in the Create a container section of the Docker Remote API and the --memory option to docker run. If you're trying to maximize your resource utilization by providing your jobs as much memory as possible for a particular instance type, see Memory management in the Batch User Guide. For jobs that are running on Fargate resources, then value is the hard limit (in MiB), and must match one of the supported values and the VCPU values must be one of the values supported for that memory value. value = 512 VCPU = 0.25 value = 1024 VCPU = 0.25 or 0.5 value = 2048 VCPU = 0.25, 0.5, or 1 value = 3072 VCPU = 0.5, or 1 value = 4096 VCPU = 0.5, 1, or 2 value = 5120, 6144, or 7168 VCPU = 1 or 2 value = 8192 VCPU = 1, 2, or 4 value = 9216, 10240, 11264, 12288, 13312, 14336, or 15360 VCPU = 2 or 4 value = 16384 VCPU = 2, 4, or 8 value = 17408, 18432, 19456, 21504, 22528, 23552, 25600, 26624, 27648, 29696, or 30720 VCPU = 4 value = 20480, 24576, or 28672 VCPU = 4 or 8 value = 36864, 45056, 53248, or 61440 VCPU = 8 value = 32768, 40960, 49152, or 57344 VCPU = 8 or 16 value = 65536, 73728, 81920, 90112, 98304, 106496, 114688, or 122880 VCPU = 16 type=\"VCPU\" The number of vCPUs reserved for the container. This parameter maps to CpuShares in the Create a container section of the Docker Remote API and the --cpu-shares option to docker run. Each vCPU is equivalent to 1,024 CPU shares. For Amazon EC2 resources, you must specify at least one vCPU. This is required but can be specified in several places; it must be specified for each node at least once. The default for the Fargate On-Demand vCPU resource count quota is 6 vCPUs. For more information about Fargate quotas, see Fargate quotas in the Amazon Web Services General Reference. For jobs that are running on Fargate resources, then value must match one of the supported values and the MEMORY values must be one of the values supported for that VCPU value. The supported values are 0.25, 0.5, 1, 2, 4, 8, and 16 value = 0.25 MEMORY = 512, 1024, or 2048 value = 0.5 MEMORY = 1024, 2048, 3072, or 4096 value = 1 MEMORY = 2048, 3072, 4096, 5120, 6144, 7168, or 8192 value = 2 MEMORY = 4096, 5120, 6144, 7168, 8192, 9216, 10240, 11264, 12288, 13312, 14336, 15360, or 16384 value = 4 MEMORY = 8192, 9216, 10240, 11264, 12288, 13312, 14336, 15360, 16384, 17408, 18432, 19456, 20480, 21504, 22528, 23552, 24576, 25600, 26624, 27648, 28672, 29696, or 30720 value = 8 MEMORY = 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, or 61440 value = 16 MEMORY = 32768, 40960, 49152, 57344, 65536, 73728, 81920, 90112, 98304, 106496, 114688, or 122880"];
      type_: ResourceType.t
        [@ocaml.doc
          "The type of resource to assign to a container. The supported resources include GPU, MEMORY, and VCPU."]}
    let context_ = "ResourceRequirement"
    let make ~value = fun ~type_ -> fun () -> { value; type_ }
    let to_value x =
      structure_to_value
        [("value", (Some (String_.to_value x.value)));
        ("type", (Some (ResourceType.to_value x.type_)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let type_ =
        ResourceType.of_xml (Xml.child_exn ~context:context_ xml_arg0 "type") in
      let value =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "value") in
      make ~type_ ~value ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let type_ = field_map_exn json__ "type" ResourceType.of_json in
      let value = field_map_exn json__ "value" String_.of_json in
      make ~type_ ~value ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The type and amount of a resource to assign to a container. The supported resources include GPU, MEMORY, and VCPU."]
module TaskContainerDependency =
  struct
    type nonrec t =
      {
      containerName: String_.t option
        [@ocaml.doc "A unique identifier for the container."];
      condition: String_.t option
        [@ocaml.doc
          "The dependency condition of the container. The following are the available conditions and their behavior: START - This condition emulates the behavior of links and volumes today. It validates that a dependent container is started before permitting other containers to start. COMPLETE - This condition validates that a dependent container runs to completion (exits) before permitting other containers to start. This can be useful for nonessential containers that run a script and then exit. This condition can't be set on an essential container. SUCCESS - This condition is the same as COMPLETE, but it also requires that the container exits with a zero status. This condition can't be set on an essential container."]}
    let make ?containerName =
      fun ?condition -> fun () -> { containerName; condition }
    let to_value x =
      structure_to_value
        [("containerName", (Option.map x.containerName ~f:String_.to_value));
        ("condition", (Option.map x.condition ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let condition =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "condition") in
      let containerName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "containerName") in
      make ?condition ?containerName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let condition = field_map json__ "condition" String_.of_json in
      let containerName = field_map json__ "containerName" String_.of_json in
      make ?condition ?containerName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "A list of containers that this task depends on."]
module Ulimit =
  struct
    type nonrec t =
      {
      hardLimit: Integer.t [@ocaml.doc "The hard limit for the ulimit type."];
      name: String_.t
        [@ocaml.doc
          "The type of the ulimit. Valid values are: core | cpu | data | fsize | locks | memlock | msgqueue | nice | nofile | nproc | rss | rtprio | rttime | sigpending | stack."];
      softLimit: Integer.t [@ocaml.doc "The soft limit for the ulimit type."]}
    let context_ = "Ulimit"
    let make ~hardLimit =
      fun ~name -> fun ~softLimit -> fun () -> { hardLimit; name; softLimit }
    let to_value x =
      structure_to_value
        [("hardLimit", (Some (Integer.to_value x.hardLimit)));
        ("name", (Some (String_.to_value x.name)));
        ("softLimit", (Some (Integer.to_value x.softLimit)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let softLimit =
        Integer.of_xml (Xml.child_exn ~context:context_ xml_arg0 "softLimit") in
      let name =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "name") in
      let hardLimit =
        Integer.of_xml (Xml.child_exn ~context:context_ xml_arg0 "hardLimit") in
      make ~softLimit ~name ~hardLimit ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let softLimit = field_map_exn json__ "softLimit" Integer.of_json in
      let name = field_map_exn json__ "name" String_.of_json in
      let hardLimit = field_map_exn json__ "hardLimit" Integer.of_json in
      make ~softLimit ~name ~hardLimit ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The ulimit settings to pass to the container. For more information, see Ulimit. This object isn't applicable to jobs that are running on Fargate resources."]
module EFSAuthorizationConfig =
  struct
    type nonrec t =
      {
      accessPointId: String_.t option
        [@ocaml.doc
          "The Amazon EFS access point ID to use. If an access point is specified, the root directory value specified in the EFSVolumeConfiguration must either be omitted or set to / which enforces the path set on the EFS access point. If an access point is used, transit encryption must be enabled in the EFSVolumeConfiguration. For more information, see Working with Amazon EFS access points in the Amazon Elastic File System User Guide."];
      iam: EFSAuthorizationConfigIAM.t option
        [@ocaml.doc
          "Whether or not to use the Batch job IAM role defined in a job definition when mounting the Amazon EFS file system. If enabled, transit encryption must be enabled in the EFSVolumeConfiguration. If this parameter is omitted, the default value of DISABLED is used. For more information, see Using Amazon EFS access points in the Batch User Guide. EFS IAM authorization requires that TransitEncryption be ENABLED and that a JobRoleArn is specified."]}
    let make ?accessPointId = fun ?iam -> fun () -> { accessPointId; iam }
    let to_value x =
      structure_to_value
        [("accessPointId", (Option.map x.accessPointId ~f:String_.to_value));
        ("iam", (Option.map x.iam ~f:EFSAuthorizationConfigIAM.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let iam =
        (Option.map ~f:EFSAuthorizationConfigIAM.of_xml)
          (Xml.child xml_arg0 "iam") in
      let accessPointId =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "accessPointId") in
      make ?iam ?accessPointId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let iam = field_map json__ "iam" EFSAuthorizationConfigIAM.of_json in
      let accessPointId = field_map json__ "accessPointId" String_.of_json in
      make ?iam ?accessPointId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The authorization configuration details for the Amazon EFS file system."]
module EFSTransitEncryption =
  struct
    type nonrec t =
      | ENABLED 
      | DISABLED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | ENABLED -> "ENABLED"
      | DISABLED -> "DISABLED"
      | Non_static_id s -> s
    let of_string =
      function
      | "ENABLED" -> ENABLED
      | "DISABLED" -> DISABLED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration EFSTransitEncryption" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"EFSTransitEncryption" j)
    let to_json = simple_to_json to_value
  end
module Quantity =
  struct
    type nonrec t = string
    let context_ = "Quantity"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:256) >>=
             (fun () -> check_string_min i ~min:1));
        i
    let of_string x = x
    let to_value x = `String x
    let to_query v = to_query to_value v
    let to_header x = x
    let of_xml = Xml.string_data_exn ~context:context_
    let of_json j = string_of_json ~kind:"Quantity" j
    let to_json = simple_to_json to_value
  end
module EnvironmentVariables =
  struct
    type nonrec t = KeyValuePair.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:KeyValuePair.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:KeyValuePair.of_xml)
    let of_json j =
      list_of_json ~kind:"EnvironmentVariables" ~of_json:KeyValuePair.of_json
        j
    let to_json v = composed_to_json to_value v
  end
module FirelensConfiguration =
  struct
    type nonrec t =
      {
      type_: FirelensConfigurationType.t
        [@ocaml.doc
          "The log router to use. The valid values are fluentd or fluentbit."];
      options: FirelensConfigurationOptionsMap.t option
        [@ocaml.doc
          "The options to use when configuring the log router. This field is optional and can be used to specify a custom configuration file or to add additional metadata, such as the task, task definition, cluster, and container instance details to the log event. If specified, the syntax to use is \"options\":\\{\"enable-ecs-log-metadata\":\"true|false\",\"config-file-type:\"s3|file\",\"config-file-value\":\"arn:aws:s3:::mybucket/fluent.conf|filepath\"\\}. For more information, see Creating a task definition that uses a FireLens configuration in the Amazon Elastic Container Service Developer Guide."]}
    let context_ = "FirelensConfiguration"
    let make ?options = fun ~type_ -> fun () -> { options; type_ }
    let to_value x =
      structure_to_value
        [("type", (Some (FirelensConfigurationType.to_value x.type_)));
        ("options",
          (Option.map x.options ~f:FirelensConfigurationOptionsMap.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let options =
        (Option.map ~f:FirelensConfigurationOptionsMap.of_xml)
          (Xml.child xml_arg0 "options") in
      let type_ =
        FirelensConfigurationType.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "type") in
      make ?options ~type_ ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let options =
        field_map json__ "options" FirelensConfigurationOptionsMap.of_json in
      let type_ =
        field_map_exn json__ "type" FirelensConfigurationType.of_json in
      make ?options ~type_ ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more information, see Custom log routing in the Amazon Elastic Container Service Developer Guide."]
module LinuxParameters =
  struct
    type nonrec t =
      {
      devices: DevicesList.t option
        [@ocaml.doc
          "Any of the host devices to expose to the container. This parameter maps to Devices in the Create a container section of the Docker Remote API and the --device option to docker run. This parameter isn't applicable to jobs that are running on Fargate resources. Don't provide it for these jobs."];
      initProcessEnabled: Boolean.t option
        [@ocaml.doc
          "If true, run an init process inside the container that forwards signals and reaps processes. This parameter maps to the --init option to docker run. This parameter requires version 1.25 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version | grep \"Server API version\""];
      sharedMemorySize: Integer.t option
        [@ocaml.doc
          "The value for the size (in MiB) of the /dev/shm volume. This parameter maps to the --shm-size option to docker run. This parameter isn't applicable to jobs that are running on Fargate resources. Don't provide it for these jobs."];
      tmpfs: TmpfsList.t option
        [@ocaml.doc
          "The container path, mount options, and size (in MiB) of the tmpfs mount. This parameter maps to the --tmpfs option to docker run. This parameter isn't applicable to jobs that are running on Fargate resources. Don't provide this parameter for this resource type."];
      maxSwap: Integer.t option
        [@ocaml.doc
          "The total amount of swap memory (in MiB) a container can use. This parameter is translated to the --memory-swap option to docker run where the value is the sum of the container memory plus the maxSwap value. For more information, see --memory-swap details in the Docker documentation. If a maxSwap value of 0 is specified, the container doesn't use swap. Accepted values are 0 or any positive integer. If the maxSwap parameter is omitted, the container doesn't use the swap configuration for the container instance on which it runs. A maxSwap value must be set for the swappiness parameter to be used. This parameter isn't applicable to jobs that are running on Fargate resources. Don't provide it for these jobs."];
      swappiness: Integer.t option
        [@ocaml.doc
          "You can use this parameter to tune a container's memory swappiness behavior. A swappiness value of 0 causes swapping to not occur unless absolutely necessary. A swappiness value of 100 causes pages to be swapped aggressively. Valid values are whole numbers between 0 and 100. If the swappiness parameter isn't specified, a default value of 60 is used. If a value isn't specified for maxSwap, then this parameter is ignored. If maxSwap is set to 0, the container doesn't use swap. This parameter maps to the --memory-swappiness option to docker run. Consider the following when you use a per-container swap configuration. Swap space must be enabled and allocated on the container instance for the containers to use. By default, the Amazon ECS optimized AMIs don't have swap enabled. You must enable swap on the instance to use this feature. For more information, see Instance store swap volumes in the Amazon EC2 User Guide for Linux Instances or How do I allocate memory to work as swap space in an Amazon EC2 instance by using a swap file? The swap space parameters are only supported for job definitions using EC2 resources. If the maxSwap and swappiness parameters are omitted from a job definition, each container has a default swappiness value of 60. Moreover, the total swap usage is limited to two times the memory reservation of the container. This parameter isn't applicable to jobs that are running on Fargate resources. Don't provide it for these jobs."]}
    let make ?devices =
      fun ?initProcessEnabled ->
        fun ?sharedMemorySize ->
          fun ?tmpfs ->
            fun ?maxSwap ->
              fun ?swappiness ->
                fun () ->
                  {
                    devices;
                    initProcessEnabled;
                    sharedMemorySize;
                    tmpfs;
                    maxSwap;
                    swappiness
                  }
    let to_value x =
      structure_to_value
        [("devices", (Option.map x.devices ~f:DevicesList.to_value));
        ("initProcessEnabled",
          (Option.map x.initProcessEnabled ~f:Boolean.to_value));
        ("sharedMemorySize",
          (Option.map x.sharedMemorySize ~f:Integer.to_value));
        ("tmpfs", (Option.map x.tmpfs ~f:TmpfsList.to_value));
        ("maxSwap", (Option.map x.maxSwap ~f:Integer.to_value));
        ("swappiness", (Option.map x.swappiness ~f:Integer.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let swappiness =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "swappiness") in
      let maxSwap =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "maxSwap") in
      let tmpfs =
        (Option.map ~f:TmpfsList.of_xml) (Xml.child xml_arg0 "tmpfs") in
      let sharedMemorySize =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "sharedMemorySize") in
      let initProcessEnabled =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "initProcessEnabled") in
      let devices =
        (Option.map ~f:DevicesList.of_xml) (Xml.child xml_arg0 "devices") in
      make ?swappiness ?maxSwap ?tmpfs ?sharedMemorySize ?initProcessEnabled
        ?devices ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let swappiness = field_map json__ "swappiness" Integer.of_json in
      let maxSwap = field_map json__ "maxSwap" Integer.of_json in
      let tmpfs = field_map json__ "tmpfs" TmpfsList.of_json in
      let sharedMemorySize =
        field_map json__ "sharedMemorySize" Integer.of_json in
      let initProcessEnabled =
        field_map json__ "initProcessEnabled" Boolean.of_json in
      let devices = field_map json__ "devices" DevicesList.of_json in
      make ?swappiness ?maxSwap ?tmpfs ?sharedMemorySize ?initProcessEnabled
        ?devices ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Linux-specific modifications that are applied to the container, such as details for device mappings."]
module LogConfiguration =
  struct
    type nonrec t =
      {
      logDriver: LogDriver.t
        [@ocaml.doc
          "The log driver to use for the container. The valid values that are listed for this parameter are log drivers that the Amazon ECS container agent can communicate with by default. The supported log drivers are awsfirelens, awslogs, fluentd, gelf, json-file, journald, logentries, syslog, and splunk. Jobs that are running on Fargate resources are restricted to the awslogs and splunk log drivers. awsfirelens Specifies the firelens logging driver. For more information on configuring Firelens, see Send Amazon ECS logs to an Amazon Web Services service or Amazon Web Services Partner in the Amazon Elastic Container Service Developer Guide. awslogs Specifies the Amazon CloudWatch Logs logging driver. For more information, see Using the awslogs log driver in the Batch User Guide and Amazon CloudWatch Logs logging driver in the Docker documentation. fluentd Specifies the Fluentd logging driver. For more information including usage and options, see Fluentd logging driver in the Docker documentation. gelf Specifies the Graylog Extended Format (GELF) logging driver. For more information including usage and options, see Graylog Extended Format logging driver in the Docker documentation. journald Specifies the journald logging driver. For more information including usage and options, see Journald logging driver in the Docker documentation. json-file Specifies the JSON file logging driver. For more information including usage and options, see JSON File logging driver in the Docker documentation. splunk Specifies the Splunk logging driver. For more information including usage and options, see Splunk logging driver in the Docker documentation. syslog Specifies the syslog logging driver. For more information including usage and options, see Syslog logging driver in the Docker documentation. If you have a custom driver that's not listed earlier that you want to work with the Amazon ECS container agent, you can fork the Amazon ECS container agent project that's available on GitHub and customize it to work with that driver. We encourage you to submit pull requests for changes that you want to have included. However, Amazon Web Services doesn't currently support running modified copies of this software. This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version | grep \"Server API version\""];
      options: LogConfigurationOptionsMap.t option
        [@ocaml.doc
          "The configuration options to send to the log driver. This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version | grep \"Server API version\""];
      secretOptions: SecretList.t option
        [@ocaml.doc
          "The secrets to pass to the log configuration. For more information, see Specifying sensitive data in the Batch User Guide."]}
    let context_ = "LogConfiguration"
    let make ?options =
      fun ?secretOptions ->
        fun ~logDriver -> fun () -> { options; secretOptions; logDriver }
    let to_value x =
      structure_to_value
        [("logDriver", (Some (LogDriver.to_value x.logDriver)));
        ("options",
          (Option.map x.options ~f:LogConfigurationOptionsMap.to_value));
        ("secretOptions",
          (Option.map x.secretOptions ~f:SecretList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let secretOptions =
        (Option.map ~f:SecretList.of_xml)
          (Xml.child xml_arg0 "secretOptions") in
      let options =
        (Option.map ~f:LogConfigurationOptionsMap.of_xml)
          (Xml.child xml_arg0 "options") in
      let logDriver =
        LogDriver.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "logDriver") in
      make ?secretOptions ?options ~logDriver ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let secretOptions = field_map json__ "secretOptions" SecretList.of_json in
      let options =
        field_map json__ "options" LogConfigurationOptionsMap.of_json in
      let logDriver = field_map_exn json__ "logDriver" LogDriver.of_json in
      make ?secretOptions ?options ~logDriver ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Log configuration options to send to a custom log driver for the container."]
module MountPoints =
  struct
    type nonrec t = MountPoint.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:MountPoint.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:MountPoint.of_xml)
    let of_json j =
      list_of_json ~kind:"MountPoints" ~of_json:MountPoint.of_json j
    let to_json v = composed_to_json to_value v
  end
module RepositoryCredentials =
  struct
    type nonrec t =
      {
      credentialsParameter: String_.t
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the secret containing the private repository credentials."]}
    let context_ = "RepositoryCredentials"
    let make ~credentialsParameter = fun () -> { credentialsParameter }
    let to_value x =
      structure_to_value
        [("credentialsParameter",
           (Some (String_.to_value x.credentialsParameter)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let credentialsParameter =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "credentialsParameter") in
      make ~credentialsParameter ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let credentialsParameter =
        field_map_exn json__ "credentialsParameter" String_.of_json in
      make ~credentialsParameter ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The repository credentials for private registry authentication."]
module ResourceRequirements =
  struct
    type nonrec t = ResourceRequirement.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ResourceRequirement.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ResourceRequirement.of_xml)
    let of_json j =
      list_of_json ~kind:"ResourceRequirements"
        ~of_json:ResourceRequirement.of_json j
    let to_json v = composed_to_json to_value v
  end
module TaskContainerDependencyList =
  struct
    type nonrec t = TaskContainerDependency.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:TaskContainerDependency.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:TaskContainerDependency.of_xml)
    let of_json j =
      list_of_json ~kind:"TaskContainerDependencyList"
        ~of_json:TaskContainerDependency.of_json j
    let to_json v = composed_to_json to_value v
  end
module Ulimits =
  struct
    type nonrec t = Ulimit.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:Ulimit.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:Ulimit.of_xml)
    let of_json j = list_of_json ~kind:"Ulimits" ~of_json:Ulimit.of_json j
    let to_json v = composed_to_json to_value v
  end
module EFSVolumeConfiguration =
  struct
    type nonrec t =
      {
      fileSystemId: String_.t
        [@ocaml.doc "The Amazon EFS file system ID to use."];
      rootDirectory: String_.t option
        [@ocaml.doc
          "The directory within the Amazon EFS file system to mount as the root directory inside the host. If this parameter is omitted, the root of the Amazon EFS volume is used instead. Specifying / has the same effect as omitting this parameter. The maximum length is 4,096 characters. If an EFS access point is specified in the authorizationConfig, the root directory parameter must either be omitted or set to /, which enforces the path set on the Amazon EFS access point."];
      transitEncryption: EFSTransitEncryption.t option
        [@ocaml.doc
          "Determines whether to enable encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server. Transit encryption must be enabled if Amazon EFS IAM authorization is used. If this parameter is omitted, the default value of DISABLED is used. For more information, see Encrypting data in transit in the Amazon Elastic File System User Guide."];
      transitEncryptionPort: Integer.t option
        [@ocaml.doc
          "The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server. If you don't specify a transit encryption port, it uses the port selection strategy that the Amazon EFS mount helper uses. The value must be between 0 and 65,535. For more information, see EFS mount helper in the Amazon Elastic File System User Guide."];
      authorizationConfig: EFSAuthorizationConfig.t option
        [@ocaml.doc
          "The authorization configuration details for the Amazon EFS file system."]}
    let context_ = "EFSVolumeConfiguration"
    let make ?rootDirectory =
      fun ?transitEncryption ->
        fun ?transitEncryptionPort ->
          fun ?authorizationConfig ->
            fun ~fileSystemId ->
              fun () ->
                {
                  rootDirectory;
                  transitEncryption;
                  transitEncryptionPort;
                  authorizationConfig;
                  fileSystemId
                }
    let to_value x =
      structure_to_value
        [("fileSystemId", (Some (String_.to_value x.fileSystemId)));
        ("rootDirectory", (Option.map x.rootDirectory ~f:String_.to_value));
        ("transitEncryption",
          (Option.map x.transitEncryption ~f:EFSTransitEncryption.to_value));
        ("transitEncryptionPort",
          (Option.map x.transitEncryptionPort ~f:Integer.to_value));
        ("authorizationConfig",
          (Option.map x.authorizationConfig
             ~f:EFSAuthorizationConfig.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let authorizationConfig =
        (Option.map ~f:EFSAuthorizationConfig.of_xml)
          (Xml.child xml_arg0 "authorizationConfig") in
      let transitEncryptionPort =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "transitEncryptionPort") in
      let transitEncryption =
        (Option.map ~f:EFSTransitEncryption.of_xml)
          (Xml.child xml_arg0 "transitEncryption") in
      let rootDirectory =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "rootDirectory") in
      let fileSystemId =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "fileSystemId") in
      make ?authorizationConfig ?transitEncryptionPort ?transitEncryption
        ?rootDirectory ~fileSystemId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let authorizationConfig =
        field_map json__ "authorizationConfig" EFSAuthorizationConfig.of_json in
      let transitEncryptionPort =
        field_map json__ "transitEncryptionPort" Integer.of_json in
      let transitEncryption =
        field_map json__ "transitEncryption" EFSTransitEncryption.of_json in
      let rootDirectory = field_map json__ "rootDirectory" String_.of_json in
      let fileSystemId = field_map_exn json__ "fileSystemId" String_.of_json in
      make ?authorizationConfig ?transitEncryptionPort ?transitEncryption
        ?rootDirectory ~fileSystemId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "This is used when you're using an Amazon Elastic File System file system for job storage. For more information, see Amazon EFS Volumes in the Batch User Guide."]
module Host =
  struct
    type nonrec t =
      {
      sourcePath: String_.t option
        [@ocaml.doc
          "The path on the host container instance that's presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If this parameter contains a file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the source path location doesn't exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported. This parameter isn't applicable to jobs that run on Fargate resources. Don't provide this for these jobs."]}
    let make ?sourcePath = fun () -> { sourcePath }
    let to_value x =
      structure_to_value
        [("sourcePath", (Option.map x.sourcePath ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let sourcePath =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "sourcePath") in
      make ?sourcePath ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let sourcePath = field_map json__ "sourcePath" String_.of_json in
      make ?sourcePath ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Determine whether your data volume persists on the host container instance and where it's stored. If this parameter is empty, then the Docker daemon assigns a host path for your data volume. However, the data isn't guaranteed to persist after the containers that are associated with it stop running."]
module S3FilesVolumeConfiguration =
  struct
    type nonrec t =
      {
      fileSystemArn: String_.t
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the S3Files file system to use."];
      rootDirectory: String_.t option
        [@ocaml.doc
          "The directory within the S3Files file system to mount as the root directory."];
      transitEncryptionPort: Integer.t option
        [@ocaml.doc
          "The port to use when sending encrypted data between the Amazon ECS host and the S3Files file system server."];
      accessPointArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the S3Files access point to use."]}
    let context_ = "S3FilesVolumeConfiguration"
    let make ?rootDirectory =
      fun ?transitEncryptionPort ->
        fun ?accessPointArn ->
          fun ~fileSystemArn ->
            fun () ->
              {
                rootDirectory;
                transitEncryptionPort;
                accessPointArn;
                fileSystemArn
              }
    let to_value x =
      structure_to_value
        [("fileSystemArn", (Some (String_.to_value x.fileSystemArn)));
        ("rootDirectory", (Option.map x.rootDirectory ~f:String_.to_value));
        ("transitEncryptionPort",
          (Option.map x.transitEncryptionPort ~f:Integer.to_value));
        ("accessPointArn", (Option.map x.accessPointArn ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let accessPointArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "accessPointArn") in
      let transitEncryptionPort =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "transitEncryptionPort") in
      let rootDirectory =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "rootDirectory") in
      let fileSystemArn =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "fileSystemArn") in
      make ?accessPointArn ?transitEncryptionPort ?rootDirectory
        ~fileSystemArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let accessPointArn = field_map json__ "accessPointArn" String_.of_json in
      let transitEncryptionPort =
        field_map json__ "transitEncryptionPort" Integer.of_json in
      let rootDirectory = field_map json__ "rootDirectory" String_.of_json in
      let fileSystemArn =
        field_map_exn json__ "fileSystemArn" String_.of_json in
      make ?accessPointArn ?transitEncryptionPort ?rootDirectory
        ~fileSystemArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "This is used when you're using an S3Files file system for job storage."]
module EksContainerEnvironmentVariable =
  struct
    type nonrec t =
      {
      name: String_.t [@ocaml.doc "The name of the environment variable."];
      value: String_.t option
        [@ocaml.doc "The value of the environment variable."]}
    let context_ = "EksContainerEnvironmentVariable"
    let make ?value = fun ~name -> fun () -> { value; name }
    let to_value x =
      structure_to_value
        [("name", (Some (String_.to_value x.name)));
        ("value", (Option.map x.value ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let value = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "value") in
      let name =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "name") in
      make ?value ~name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let value = field_map json__ "value" String_.of_json in
      let name = field_map_exn json__ "name" String_.of_json in
      make ?value ~name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "An environment variable."]
module EksLimits =
  struct
    type nonrec t = (String_.t * Quantity.t) list
    let make i = i
    let of_header xs =
      make
        (List.filter_map xs
           ~f:(fun (k, v) ->
                 (Base.String.chop_prefix k ~prefix:"x-amz-meta-") |>
                   (Option.map
                      ~f:(fun chopped ->
                            ((String_.of_string chopped),
                              (Quantity.of_string v))))))
    let to_value xs =
      (xs |>
         (List.map
            ~f:(fun (x, y) ->
                  (String_.to_value x) |>
                    (fun x -> (Quantity.to_value y) |> (fun y -> (x, y))))))
        |> (fun x -> `Map x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for Map_shape objects" ()
    let of_xml _ =
      failwith "of_xml_converter_of_shape: Map_shape case not implemented"
    let of_json j =
      object_of_json ~key_of_string:String_.of_string
        ~of_json:Quantity.of_json j
    let to_json v = composed_to_json to_value v
  end
module EksRequests =
  struct
    type nonrec t = (String_.t * Quantity.t) list
    let make i = i
    let of_header xs =
      make
        (List.filter_map xs
           ~f:(fun (k, v) ->
                 (Base.String.chop_prefix k ~prefix:"x-amz-meta-") |>
                   (Option.map
                      ~f:(fun chopped ->
                            ((String_.of_string chopped),
                              (Quantity.of_string v))))))
    let to_value xs =
      (xs |>
         (List.map
            ~f:(fun (x, y) ->
                  (String_.to_value x) |>
                    (fun x -> (Quantity.to_value y) |> (fun y -> (x, y))))))
        |> (fun x -> `Map x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for Map_shape objects" ()
    let of_xml _ =
      failwith "of_xml_converter_of_shape: Map_shape case not implemented"
    let of_json j =
      object_of_json ~key_of_string:String_.of_string
        ~of_json:Quantity.of_json j
    let to_json v = composed_to_json to_value v
  end
module Long =
  struct
    type nonrec t = Int64.t
    let make i = i
    let of_string = Int64.of_string
    let to_value x = `Long x
    let to_query v = to_query to_value v
    let to_header x = Int64.to_string x
    let of_xml xml_arg0 =
      Int64.of_string (string_of_xml ~kind:"a long" xml_arg0)
    let of_json j = Int64.of_float (float_of_json ~kind:"a long" j)
    let to_json = simple_to_json to_value
  end
module EksContainerVolumeMount =
  struct
    type nonrec t =
      {
      name: String_.t option
        [@ocaml.doc
          "The name the volume mount. This must match the name of one of the volumes in the pod."];
      mountPath: String_.t option
        [@ocaml.doc "The path on the container where the volume is mounted."];
      subPath: String_.t option
        [@ocaml.doc
          "A sub-path inside the referenced volume instead of its root."];
      readOnly: Boolean.t option
        [@ocaml.doc
          "If this value is true, the container has read-only access to the volume. Otherwise, the container can write to the volume. The default value is false."]}
    let make ?name =
      fun ?mountPath ->
        fun ?subPath ->
          fun ?readOnly -> fun () -> { name; mountPath; subPath; readOnly }
    let to_value x =
      structure_to_value
        [("name", (Option.map x.name ~f:String_.to_value));
        ("mountPath", (Option.map x.mountPath ~f:String_.to_value));
        ("subPath", (Option.map x.subPath ~f:String_.to_value));
        ("readOnly", (Option.map x.readOnly ~f:Boolean.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let readOnly =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "readOnly") in
      let subPath =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "subPath") in
      let mountPath =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "mountPath") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      make ?readOnly ?subPath ?mountPath ?name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let readOnly = field_map json__ "readOnly" Boolean.of_json in
      let subPath = field_map json__ "subPath" String_.of_json in
      let mountPath = field_map json__ "mountPath" String_.of_json in
      let name = field_map json__ "name" String_.of_json in
      make ?readOnly ?subPath ?mountPath ?name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The volume mounts for a container for an Amazon EKS job. For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation."]
module NetworkInterface =
  struct
    type nonrec t =
      {
      attachmentId: String_.t option
        [@ocaml.doc "The attachment ID for the network interface."];
      ipv6Address: String_.t option
        [@ocaml.doc "The private IPv6 address for the network interface."];
      privateIpv4Address: String_.t option
        [@ocaml.doc "The private IPv4 address for the network interface."]}
    let make ?attachmentId =
      fun ?ipv6Address ->
        fun ?privateIpv4Address ->
          fun () -> { attachmentId; ipv6Address; privateIpv4Address }
    let to_value x =
      structure_to_value
        [("attachmentId", (Option.map x.attachmentId ~f:String_.to_value));
        ("ipv6Address", (Option.map x.ipv6Address ~f:String_.to_value));
        ("privateIpv4Address",
          (Option.map x.privateIpv4Address ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let privateIpv4Address =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "privateIpv4Address") in
      let ipv6Address =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "ipv6Address") in
      let attachmentId =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "attachmentId") in
      make ?privateIpv4Address ?ipv6Address ?attachmentId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let privateIpv4Address =
        field_map json__ "privateIpv4Address" String_.of_json in
      let ipv6Address = field_map json__ "ipv6Address" String_.of_json in
      let attachmentId = field_map json__ "attachmentId" String_.of_json in
      make ?privateIpv4Address ?ipv6Address ?attachmentId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the elastic network interface for a multi-node parallel job node."]
module TaskContainerProperties =
  struct
    type nonrec t =
      {
      command: StringList.t option
        [@ocaml.doc
          "The command that's passed to the container. This parameter maps to Cmd in the Create a container section of the Docker Remote API and the COMMAND parameter to docker run. For more information, see Dockerfile reference: CMD."];
      dependsOn: TaskContainerDependencyList.t option
        [@ocaml.doc "A list of containers that this container depends on."];
      environment: EnvironmentVariables.t option
        [@ocaml.doc
          "The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the Docker Remote API and the --env parameter to docker run. We don't recommend using plaintext environment variables for sensitive information, such as credential data. Environment variables cannot start with AWS_BATCH. This naming convention is reserved for variables that Batch sets."];
      essential: Boolean.t option
        [@ocaml.doc
          "If the essential parameter of a container is marked as true, and that container fails or stops for any reason, all other containers that are part of the task are stopped. If the essential parameter of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential. All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide."];
      firelensConfiguration: FirelensConfiguration.t option
        [@ocaml.doc
          "The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more information, see Custom log routing in the Amazon Elastic Container Service Developer Guide."];
      image: String_.t
        [@ocaml.doc
          "The image used to start a container. This string is passed directly to the Docker daemon. By default, images in the Docker Hub registry are available. Other repositories are specified with either repository-url/image:tag or repository-url/image\\@digest. Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps to Image in the Create a container section of the Docker Remote API and the IMAGE parameter of the docker run ."];
      linuxParameters: LinuxParameters.t option
        [@ocaml.doc
          "Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see KernelCapabilities."];
      logConfiguration: LogConfiguration.t option
        [@ocaml.doc
          "The log configuration specification for the container. This parameter maps to LogConfig in the Create a container section of the Docker Remote API and the --log-driver option to docker run. By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation. Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the LogConfiguration data type). Additional log drivers may be available in future releases of the Amazon ECS container agent. This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version --format '\\{\\{.Server.APIVersion\\}\\}' The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before containers placed on that instance can use these log configuration options. For more information, see Amazon ECS container agent configuration in the Amazon Elastic Container Service Developer Guide."];
      mountPoints: MountPoints.t option
        [@ocaml.doc
          "The mount points for data volumes in your container. This parameter maps to Volumes in the Create a container section of the Docker Remote API and the --volume option to docker run. Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows containers can't mount directories on a different drive, and mount point can't be across drives."];
      name: String_.t option
        [@ocaml.doc
          "The name of a container. The name can be used as a unique identifier to target your dependsOn and Overrides objects."];
      privileged: Boolean.t option
        [@ocaml.doc
          "When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). This parameter maps to Privileged in the Create a container section of the Docker Remote API and the --privileged option to docker run. This parameter is not supported for Windows containers or tasks run on Fargate."];
      readonlyRootFilesystem: Boolean.t option
        [@ocaml.doc
          "When this parameter is true, the container is given read-only access to its root file system. This parameter maps to ReadonlyRootfs in the Create a container section of the Docker Remote API and the --read-only option to docker run. This parameter is not supported for Windows containers."];
      repositoryCredentials: RepositoryCredentials.t option
        [@ocaml.doc
          "The private repository authentication credentials to use."];
      resourceRequirements: ResourceRequirements.t option
        [@ocaml.doc
          "The type and amount of a resource to assign to a container. The only supported resource is a GPU."];
      secrets: SecretList.t option
        [@ocaml.doc
          "The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide."];
      ulimits: Ulimits.t option
        [@ocaml.doc
          "A list of ulimits to set in the container. If a ulimit value is specified in a task definition, it overrides the default values set by Docker. This parameter maps to Ulimits in the Create a container section of the Docker Remote API and the --ulimit option to docker run. Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the exception of the nofile resource limit parameter which Fargate overrides. The nofile resource limit sets a restriction on the number of open files that a container can use. The default nofile soft limit is 1024 and the default hard limit is 65535. This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version --format '\\{\\{.Server.APIVersion\\}\\}' This parameter is not supported for Windows containers."];
      user: String_.t option
        [@ocaml.doc
          "The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run. When running tasks using the host network mode, don't run containers using the root user (UID 0). We recommend using a non-root user for better security. You can specify the user using the following formats. If specifying a UID or GID, you must specify it as a positive integer. user user:group uid uid:gid user:gi uid:group This parameter is not supported for Windows containers."];
      startTimeout: Integer.t option
        [@ocaml.doc
          "Time duration (in seconds) to wait before giving up on resolving dependencies for a container. The minimum value is 2 seconds and the maximum value for Fargate is 120 seconds."];
      stopTimeout: Integer.t option
        [@ocaml.doc
          "Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. The minimum value is 2 seconds and the maximum value for Fargate is 120 seconds. If the parameter is not specified, the default value of 30 seconds is used. For tasks that use the EC2 launch type, if the stopTimeout parameter isn't specified, the value set for the Amazon ECS container agent configuration variable ECS_CONTAINER_STOP_TIMEOUT is used. If neither the stopTimeout parameter nor the ECS_CONTAINER_STOP_TIMEOUT agent configuration variable are set, then the default value of 30 seconds is used."]}
    let context_ = "TaskContainerProperties"
    let make ?command =
      fun ?dependsOn ->
        fun ?environment ->
          fun ?essential ->
            fun ?firelensConfiguration ->
              fun ?linuxParameters ->
                fun ?logConfiguration ->
                  fun ?mountPoints ->
                    fun ?name ->
                      fun ?privileged ->
                        fun ?readonlyRootFilesystem ->
                          fun ?repositoryCredentials ->
                            fun ?resourceRequirements ->
                              fun ?secrets ->
                                fun ?ulimits ->
                                  fun ?user ->
                                    fun ?startTimeout ->
                                      fun ?stopTimeout ->
                                        fun ~image ->
                                          fun () ->
                                            {
                                              command;
                                              dependsOn;
                                              environment;
                                              essential;
                                              firelensConfiguration;
                                              linuxParameters;
                                              logConfiguration;
                                              mountPoints;
                                              name;
                                              privileged;
                                              readonlyRootFilesystem;
                                              repositoryCredentials;
                                              resourceRequirements;
                                              secrets;
                                              ulimits;
                                              user;
                                              startTimeout;
                                              stopTimeout;
                                              image
                                            }
    let to_value x =
      structure_to_value
        [("command", (Option.map x.command ~f:StringList.to_value));
        ("dependsOn",
          (Option.map x.dependsOn ~f:TaskContainerDependencyList.to_value));
        ("environment",
          (Option.map x.environment ~f:EnvironmentVariables.to_value));
        ("essential", (Option.map x.essential ~f:Boolean.to_value));
        ("firelensConfiguration",
          (Option.map x.firelensConfiguration
             ~f:FirelensConfiguration.to_value));
        ("image", (Some (String_.to_value x.image)));
        ("linuxParameters",
          (Option.map x.linuxParameters ~f:LinuxParameters.to_value));
        ("logConfiguration",
          (Option.map x.logConfiguration ~f:LogConfiguration.to_value));
        ("mountPoints", (Option.map x.mountPoints ~f:MountPoints.to_value));
        ("name", (Option.map x.name ~f:String_.to_value));
        ("privileged", (Option.map x.privileged ~f:Boolean.to_value));
        ("readonlyRootFilesystem",
          (Option.map x.readonlyRootFilesystem ~f:Boolean.to_value));
        ("repositoryCredentials",
          (Option.map x.repositoryCredentials
             ~f:RepositoryCredentials.to_value));
        ("resourceRequirements",
          (Option.map x.resourceRequirements ~f:ResourceRequirements.to_value));
        ("secrets", (Option.map x.secrets ~f:SecretList.to_value));
        ("ulimits", (Option.map x.ulimits ~f:Ulimits.to_value));
        ("user", (Option.map x.user ~f:String_.to_value));
        ("startTimeout", (Option.map x.startTimeout ~f:Integer.to_value));
        ("stopTimeout", (Option.map x.stopTimeout ~f:Integer.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let stopTimeout =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "stopTimeout") in
      let startTimeout =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "startTimeout") in
      let user = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "user") in
      let ulimits =
        (Option.map ~f:Ulimits.of_xml) (Xml.child xml_arg0 "ulimits") in
      let secrets =
        (Option.map ~f:SecretList.of_xml) (Xml.child xml_arg0 "secrets") in
      let resourceRequirements =
        (Option.map ~f:ResourceRequirements.of_xml)
          (Xml.child xml_arg0 "resourceRequirements") in
      let repositoryCredentials =
        (Option.map ~f:RepositoryCredentials.of_xml)
          (Xml.child xml_arg0 "repositoryCredentials") in
      let readonlyRootFilesystem =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "readonlyRootFilesystem") in
      let privileged =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "privileged") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      let mountPoints =
        (Option.map ~f:MountPoints.of_xml) (Xml.child xml_arg0 "mountPoints") in
      let logConfiguration =
        (Option.map ~f:LogConfiguration.of_xml)
          (Xml.child xml_arg0 "logConfiguration") in
      let linuxParameters =
        (Option.map ~f:LinuxParameters.of_xml)
          (Xml.child xml_arg0 "linuxParameters") in
      let image =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "image") in
      let firelensConfiguration =
        (Option.map ~f:FirelensConfiguration.of_xml)
          (Xml.child xml_arg0 "firelensConfiguration") in
      let essential =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "essential") in
      let environment =
        (Option.map ~f:EnvironmentVariables.of_xml)
          (Xml.child xml_arg0 "environment") in
      let dependsOn =
        (Option.map ~f:TaskContainerDependencyList.of_xml)
          (Xml.child xml_arg0 "dependsOn") in
      let command =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "command") in
      make ?stopTimeout ?startTimeout ?user ?ulimits ?secrets
        ?resourceRequirements ?repositoryCredentials ?readonlyRootFilesystem
        ?privileged ?name ?mountPoints ?logConfiguration ?linuxParameters
        ~image ?firelensConfiguration ?essential ?environment ?dependsOn
        ?command ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let stopTimeout = field_map json__ "stopTimeout" Integer.of_json in
      let startTimeout = field_map json__ "startTimeout" Integer.of_json in
      let user = field_map json__ "user" String_.of_json in
      let ulimits = field_map json__ "ulimits" Ulimits.of_json in
      let secrets = field_map json__ "secrets" SecretList.of_json in
      let resourceRequirements =
        field_map json__ "resourceRequirements" ResourceRequirements.of_json in
      let repositoryCredentials =
        field_map json__ "repositoryCredentials"
          RepositoryCredentials.of_json in
      let readonlyRootFilesystem =
        field_map json__ "readonlyRootFilesystem" Boolean.of_json in
      let privileged = field_map json__ "privileged" Boolean.of_json in
      let name = field_map json__ "name" String_.of_json in
      let mountPoints = field_map json__ "mountPoints" MountPoints.of_json in
      let logConfiguration =
        field_map json__ "logConfiguration" LogConfiguration.of_json in
      let linuxParameters =
        field_map json__ "linuxParameters" LinuxParameters.of_json in
      let image = field_map_exn json__ "image" String_.of_json in
      let firelensConfiguration =
        field_map json__ "firelensConfiguration"
          FirelensConfiguration.of_json in
      let essential = field_map json__ "essential" Boolean.of_json in
      let environment =
        field_map json__ "environment" EnvironmentVariables.of_json in
      let dependsOn =
        field_map json__ "dependsOn" TaskContainerDependencyList.of_json in
      let command = field_map json__ "command" StringList.of_json in
      make ?stopTimeout ?startTimeout ?user ?ulimits ?secrets
        ?resourceRequirements ?repositoryCredentials ?readonlyRootFilesystem
        ?privileged ?name ?mountPoints ?logConfiguration ?linuxParameters
        ~image ?firelensConfiguration ?essential ?environment ?dependsOn
        ?command ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Container properties are used for Amazon ECS-based job definitions. These properties to describe the container that's launched as part of a job."]
module AssignPublicIp =
  struct
    type nonrec t =
      | ENABLED 
      | DISABLED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | ENABLED -> "ENABLED"
      | DISABLED -> "DISABLED"
      | Non_static_id s -> s
    let of_string =
      function
      | "ENABLED" -> ENABLED
      | "DISABLED" -> DISABLED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration AssignPublicIp" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"AssignPublicIp" j)
    let to_json = simple_to_json to_value
  end
module Volume =
  struct
    type nonrec t =
      {
      host: Host.t option
        [@ocaml.doc
          "The contents of the host parameter determine whether your data volume persists on the host container instance and where it's stored. If the host parameter is empty, then the Docker daemon assigns a host path for your data volume. However, the data isn't guaranteed to persist after the containers that are associated with it stop running. This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided."];
      name: String_.t option
        [@ocaml.doc
          "The name of the volume. It can be up to 255 characters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_). This name is referenced in the sourceVolume parameter of container definition mountPoints."];
      efsVolumeConfiguration: EFSVolumeConfiguration.t option
        [@ocaml.doc
          "This parameter is specified when you're using an Amazon Elastic File System file system for job storage. Jobs that are running on Fargate resources must specify a platformVersion of at least 1.4.0."];
      s3filesVolumeConfiguration: S3FilesVolumeConfiguration.t option
        [@ocaml.doc
          "This parameter is specified when you're using an S3Files file system for job storage."]}
    let make ?host =
      fun ?name ->
        fun ?efsVolumeConfiguration ->
          fun ?s3filesVolumeConfiguration ->
            fun () ->
              {
                host;
                name;
                efsVolumeConfiguration;
                s3filesVolumeConfiguration
              }
    let to_value x =
      structure_to_value
        [("host", (Option.map x.host ~f:Host.to_value));
        ("name", (Option.map x.name ~f:String_.to_value));
        ("efsVolumeConfiguration",
          (Option.map x.efsVolumeConfiguration
             ~f:EFSVolumeConfiguration.to_value));
        ("s3filesVolumeConfiguration",
          (Option.map x.s3filesVolumeConfiguration
             ~f:S3FilesVolumeConfiguration.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let s3filesVolumeConfiguration =
        (Option.map ~f:S3FilesVolumeConfiguration.of_xml)
          (Xml.child xml_arg0 "s3filesVolumeConfiguration") in
      let efsVolumeConfiguration =
        (Option.map ~f:EFSVolumeConfiguration.of_xml)
          (Xml.child xml_arg0 "efsVolumeConfiguration") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      let host = (Option.map ~f:Host.of_xml) (Xml.child xml_arg0 "host") in
      make ?s3filesVolumeConfiguration ?efsVolumeConfiguration ?name ?host ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let s3filesVolumeConfiguration =
        field_map json__ "s3filesVolumeConfiguration"
          S3FilesVolumeConfiguration.of_json in
      let efsVolumeConfiguration =
        field_map json__ "efsVolumeConfiguration"
          EFSVolumeConfiguration.of_json in
      let name = field_map json__ "name" String_.of_json in
      let host = field_map json__ "host" Host.of_json in
      make ?s3filesVolumeConfiguration ?efsVolumeConfiguration ?name ?host ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "A data volume that's used in a job's container properties."]
module EksContainerEnvironmentVariables =
  struct
    type nonrec t = EksContainerEnvironmentVariable.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:EksContainerEnvironmentVariable.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:EksContainerEnvironmentVariable.of_xml)
    let of_json j =
      list_of_json ~kind:"EksContainerEnvironmentVariables"
        ~of_json:EksContainerEnvironmentVariable.of_json j
    let to_json v = composed_to_json to_value v
  end
module EksContainerResourceRequirements =
  struct
    type nonrec t =
      {
      limits: EksLimits.t option
        [@ocaml.doc
          "The type and quantity of the resources to reserve for the container. The values vary based on the name that's specified. Resources can be requested using either the limits or the requests objects. memory The memory hard limit (in MiB) for the container, using whole integers, with a \"Mi\" suffix. If your container attempts to exceed the memory specified, the container is terminated. You must specify at least 4 MiB of memory for a job. memory can be specified in limits, requests, or both. If memory is specified in both places, then the value that's specified in limits must be equal to the value that's specified in requests. To maximize your resource utilization, provide your jobs with as much memory as possible for the specific instance type that you are using. To learn how, see Memory management in the Batch User Guide. cpu The number of CPUs that's reserved for the container. Values must be an even multiple of 0.25. cpu can be specified in limits, requests, or both. If cpu is specified in both places, then the value that's specified in limits must be at least as large as the value that's specified in requests. nvidia.com/gpu The number of GPUs that's reserved for the container. Values must be a whole integer. memory can be specified in limits, requests, or both. If memory is specified in both places, then the value that's specified in limits must be equal to the value that's specified in requests."];
      requests: EksRequests.t option
        [@ocaml.doc
          "The type and quantity of the resources to request for the container. The values vary based on the name that's specified. Resources can be requested by using either the limits or the requests objects. memory The memory hard limit (in MiB) for the container, using whole integers, with a \"Mi\" suffix. If your container attempts to exceed the memory specified, the container is terminated. You must specify at least 4 MiB of memory for a job. memory can be specified in limits, requests, or both. If memory is specified in both, then the value that's specified in limits must be equal to the value that's specified in requests. If you're trying to maximize your resource utilization by providing your jobs as much memory as possible for a particular instance type, see Memory management in the Batch User Guide. cpu The number of CPUs that are reserved for the container. Values must be an even multiple of 0.25. cpu can be specified in limits, requests, or both. If cpu is specified in both, then the value that's specified in limits must be at least as large as the value that's specified in requests. nvidia.com/gpu The number of GPUs that are reserved for the container. Values must be a whole integer. nvidia.com/gpu can be specified in limits, requests, or both. If nvidia.com/gpu is specified in both, then the value that's specified in limits must be equal to the value that's specified in requests."]}
    let make ?limits = fun ?requests -> fun () -> { limits; requests }
    let to_value x =
      structure_to_value
        [("limits", (Option.map x.limits ~f:EksLimits.to_value));
        ("requests", (Option.map x.requests ~f:EksRequests.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let requests =
        (Option.map ~f:EksRequests.of_xml) (Xml.child xml_arg0 "requests") in
      let limits =
        (Option.map ~f:EksLimits.of_xml) (Xml.child xml_arg0 "limits") in
      make ?requests ?limits ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let requests = field_map json__ "requests" EksRequests.of_json in
      let limits = field_map json__ "limits" EksLimits.of_json in
      make ?requests ?limits ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The type and amount of resources to assign to a container. The supported resources include memory, cpu, and nvidia.com/gpu. For more information, see Resource management for pods and containers in the Kubernetes documentation."]
module EksContainerSecurityContext =
  struct
    type nonrec t =
      {
      runAsUser: Long.t option
        [@ocaml.doc
          "When this parameter is specified, the container is run as the specified user ID (uid). If this parameter isn't specified, the default is the user that's specified in the image metadata. This parameter maps to RunAsUser and MustRanAs policy in the Users and groups pod security policies in the Kubernetes documentation."];
      runAsGroup: Long.t option
        [@ocaml.doc
          "When this parameter is specified, the container is run as the specified group ID (gid). If this parameter isn't specified, the default is the group that's specified in the image metadata. This parameter maps to RunAsGroup and MustRunAs policy in the Users and groups pod security policies in the Kubernetes documentation."];
      privileged: Boolean.t option
        [@ocaml.doc
          "When this parameter is true, the container is given elevated permissions on the host container instance. The level of permissions are similar to the root user permissions. The default value is false. This parameter maps to privileged policy in the Privileged pod security policies in the Kubernetes documentation."];
      allowPrivilegeEscalation: Boolean.t option
        [@ocaml.doc
          "Whether or not a container or a Kubernetes pod is allowed to gain more privileges than its parent process. The default value is false."];
      readOnlyRootFilesystem: Boolean.t option
        [@ocaml.doc
          "When this parameter is true, the container is given read-only access to its root file system. The default value is false. This parameter maps to ReadOnlyRootFilesystem policy in the Volumes and file systems pod security policies in the Kubernetes documentation."];
      runAsNonRoot: Boolean.t option
        [@ocaml.doc
          "When this parameter is specified, the container is run as a user with a uid other than 0. If this parameter isn't specified, so such rule is enforced. This parameter maps to RunAsUser and MustRunAsNonRoot policy in the Users and groups pod security policies in the Kubernetes documentation."]}
    let make ?runAsUser =
      fun ?runAsGroup ->
        fun ?privileged ->
          fun ?allowPrivilegeEscalation ->
            fun ?readOnlyRootFilesystem ->
              fun ?runAsNonRoot ->
                fun () ->
                  {
                    runAsUser;
                    runAsGroup;
                    privileged;
                    allowPrivilegeEscalation;
                    readOnlyRootFilesystem;
                    runAsNonRoot
                  }
    let to_value x =
      structure_to_value
        [("runAsUser", (Option.map x.runAsUser ~f:Long.to_value));
        ("runAsGroup", (Option.map x.runAsGroup ~f:Long.to_value));
        ("privileged", (Option.map x.privileged ~f:Boolean.to_value));
        ("allowPrivilegeEscalation",
          (Option.map x.allowPrivilegeEscalation ~f:Boolean.to_value));
        ("readOnlyRootFilesystem",
          (Option.map x.readOnlyRootFilesystem ~f:Boolean.to_value));
        ("runAsNonRoot", (Option.map x.runAsNonRoot ~f:Boolean.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let runAsNonRoot =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "runAsNonRoot") in
      let readOnlyRootFilesystem =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "readOnlyRootFilesystem") in
      let allowPrivilegeEscalation =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "allowPrivilegeEscalation") in
      let privileged =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "privileged") in
      let runAsGroup =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "runAsGroup") in
      let runAsUser =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "runAsUser") in
      make ?runAsNonRoot ?readOnlyRootFilesystem ?allowPrivilegeEscalation
        ?privileged ?runAsGroup ?runAsUser ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let runAsNonRoot = field_map json__ "runAsNonRoot" Boolean.of_json in
      let readOnlyRootFilesystem =
        field_map json__ "readOnlyRootFilesystem" Boolean.of_json in
      let allowPrivilegeEscalation =
        field_map json__ "allowPrivilegeEscalation" Boolean.of_json in
      let privileged = field_map json__ "privileged" Boolean.of_json in
      let runAsGroup = field_map json__ "runAsGroup" Long.of_json in
      let runAsUser = field_map json__ "runAsUser" Long.of_json in
      make ?runAsNonRoot ?readOnlyRootFilesystem ?allowPrivilegeEscalation
        ?privileged ?runAsGroup ?runAsUser ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The security context for a job. For more information, see Configure a security context for a pod or container in the Kubernetes documentation."]
module EksContainerVolumeMounts =
  struct
    type nonrec t = EksContainerVolumeMount.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:EksContainerVolumeMount.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:EksContainerVolumeMount.of_xml)
    let of_json j =
      list_of_json ~kind:"EksContainerVolumeMounts"
        ~of_json:EksContainerVolumeMount.of_json j
    let to_json v = composed_to_json to_value v
  end
module EksEmptyDir =
  struct
    type nonrec t =
      {
      medium: String_.t option
        [@ocaml.doc
          "The medium to store the volume. The default value is an empty string, which uses the storage of the node. \"\" (Default) Use the disk storage of the node. \"Memory\" Use the tmpfs volume that's backed by the RAM of the node. Contents of the volume are lost when the node reboots, and any storage on the volume counts against the container's memory limit."];
      sizeLimit: Quantity.t option
        [@ocaml.doc
          "The maximum size of the volume. By default, there's no maximum size defined."]}
    let make ?medium = fun ?sizeLimit -> fun () -> { medium; sizeLimit }
    let to_value x =
      structure_to_value
        [("medium", (Option.map x.medium ~f:String_.to_value));
        ("sizeLimit", (Option.map x.sizeLimit ~f:Quantity.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let sizeLimit =
        (Option.map ~f:Quantity.of_xml) (Xml.child xml_arg0 "sizeLimit") in
      let medium =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "medium") in
      make ?sizeLimit ?medium ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let sizeLimit = field_map json__ "sizeLimit" Quantity.of_json in
      let medium = field_map json__ "medium" String_.of_json in
      make ?sizeLimit ?medium ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Specifies the configuration of a Kubernetes emptyDir volume. An emptyDir volume is first created when a pod is assigned to a node. It exists as long as that pod is running on that node. The emptyDir volume is initially empty. All containers in the pod can read and write the files in the emptyDir volume. However, the emptyDir volume can be mounted at the same or different paths in each container. When a pod is removed from a node for any reason, the data in the emptyDir is deleted permanently. For more information, see emptyDir in the Kubernetes documentation."]
module EksHostPath =
  struct
    type nonrec t =
      {
      path: String_.t option
        [@ocaml.doc
          "The path of the file or directory on the host to mount into containers on the pod."]}
    let make ?path = fun () -> { path }
    let to_value x =
      structure_to_value [("path", (Option.map x.path ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let path = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "path") in
      make ?path ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let path = field_map json__ "path" String_.of_json in make ?path ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Specifies the configuration of a Kubernetes hostPath volume. A hostPath volume mounts an existing file or directory from the host node's filesystem into your pod. For more information, see hostPath in the Kubernetes documentation."]
module EksPersistentVolumeClaim =
  struct
    type nonrec t =
      {
      claimName: String_.t
        [@ocaml.doc
          "The name of the persistentVolumeClaim bounded to a persistentVolume. For more information, see Persistent Volume Claims in the Kubernetes documentation."];
      readOnly: Boolean.t option
        [@ocaml.doc
          "An optional boolean value indicating if the mount is read only. Default is false. For more information, see Read Only Mounts in the Kubernetes documentation."]}
    let context_ = "EksPersistentVolumeClaim"
    let make ?readOnly = fun ~claimName -> fun () -> { readOnly; claimName }
    let to_value x =
      structure_to_value
        [("claimName", (Some (String_.to_value x.claimName)));
        ("readOnly", (Option.map x.readOnly ~f:Boolean.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let readOnly =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "readOnly") in
      let claimName =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "claimName") in
      make ?readOnly ~claimName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let readOnly = field_map json__ "readOnly" Boolean.of_json in
      let claimName = field_map_exn json__ "claimName" String_.of_json in
      make ?readOnly ~claimName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "A persistentVolumeClaim volume is used to mount a PersistentVolume into a Pod. PersistentVolumeClaims are a way for users to \"claim\" durable storage without knowing the details of the particular cloud environment. See the information about PersistentVolumes in the Kubernetes documentation."]
module EksSecret =
  struct
    type nonrec t =
      {
      secretName: String_.t
        [@ocaml.doc
          "The name of the secret. The name must be allowed as a DNS subdomain name. For more information, see DNS subdomain names in the Kubernetes documentation."];
      optional: Boolean.t option
        [@ocaml.doc
          "Specifies whether the secret or the secret's keys must be defined."]}
    let context_ = "EksSecret"
    let make ?optional =
      fun ~secretName -> fun () -> { optional; secretName }
    let to_value x =
      structure_to_value
        [("secretName", (Some (String_.to_value x.secretName)));
        ("optional", (Option.map x.optional ~f:Boolean.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let optional =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "optional") in
      let secretName =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "secretName") in
      make ?optional ~secretName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let optional = field_map json__ "optional" Boolean.of_json in
      let secretName = field_map_exn json__ "secretName" String_.of_json in
      make ?optional ~secretName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Specifies the configuration of a Kubernetes secret volume. For more information, see secret in the Kubernetes documentation."]
module NetworkInterfaceList =
  struct
    type nonrec t = NetworkInterface.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:NetworkInterface.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:NetworkInterface.of_xml)
    let of_json j =
      list_of_json ~kind:"NetworkInterfaceList"
        ~of_json:NetworkInterface.of_json j
    let to_json v = composed_to_json to_value v
  end
module EphemeralStorage =
  struct
    type nonrec t =
      {
      sizeInGiB: Integer.t
        [@ocaml.doc
          "The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is 21 GiB and the maximum supported value is 200 GiB."]}
    let context_ = "EphemeralStorage"
    let make ~sizeInGiB = fun () -> { sizeInGiB }
    let to_value x =
      structure_to_value
        [("sizeInGiB", (Some (Integer.to_value x.sizeInGiB)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let sizeInGiB =
        Integer.of_xml (Xml.child_exn ~context:context_ xml_arg0 "sizeInGiB") in
      make ~sizeInGiB ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let sizeInGiB = field_map_exn json__ "sizeInGiB" Integer.of_json in
      make ~sizeInGiB ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate."]
module ListTaskContainerProperties =
  struct
    type nonrec t = TaskContainerProperties.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:TaskContainerProperties.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:TaskContainerProperties.of_xml)
    let of_json j =
      list_of_json ~kind:"ListTaskContainerProperties"
        ~of_json:TaskContainerProperties.of_json j
    let to_json v = composed_to_json to_value v
  end
module NetworkConfiguration =
  struct
    type nonrec t =
      {
      assignPublicIp: AssignPublicIp.t option
        [@ocaml.doc
          "Indicates whether the job has a public IP address. For a job that's running on Fargate resources in a private subnet to send outbound traffic to the internet (for example, to pull container images), the private subnet requires a NAT gateway be attached to route requests to the internet. For more information, see Amazon ECS task networking in the Amazon Elastic Container Service Developer Guide. The default value is \"DISABLED\"."]}
    let make ?assignPublicIp = fun () -> { assignPublicIp }
    let to_value x =
      structure_to_value
        [("assignPublicIp",
           (Option.map x.assignPublicIp ~f:AssignPublicIp.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let assignPublicIp =
        (Option.map ~f:AssignPublicIp.of_xml)
          (Xml.child xml_arg0 "assignPublicIp") in
      make ?assignPublicIp ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let assignPublicIp =
        field_map json__ "assignPublicIp" AssignPublicIp.of_json in
      make ?assignPublicIp ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The network configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon EC2 resources must not specify this parameter."]
module RuntimePlatform =
  struct
    type nonrec t =
      {
      operatingSystemFamily: String_.t option
        [@ocaml.doc
          "The operating system for the compute environment. Valid values are: LINUX (default), WINDOWS_SERVER_2019_CORE, WINDOWS_SERVER_2019_FULL, WINDOWS_SERVER_2022_CORE, and WINDOWS_SERVER_2022_FULL. The following parameters can\226\128\153t be set for Windows containers: linuxParameters, privileged, user, ulimits, readonlyRootFilesystem, and efsVolumeConfiguration. The Batch Scheduler checks the compute environments that are attached to the job queue before registering a task definition with Fargate. In this scenario, the job queue is where the job is submitted. If the job requires a Windows container and the first compute environment is LINUX, the compute environment is skipped and the next compute environment is checked until a Windows-based compute environment is found. Fargate Spot is not supported on Windows-based containers on Fargate. A job queue will be blocked if a Windows job is submitted to a job queue with only Fargate Spot compute environments. However, you can attach both FARGATE and FARGATE_SPOT compute environments to the same job queue."];
      cpuArchitecture: String_.t option
        [@ocaml.doc
          "The vCPU architecture. The default value is X86_64. Valid values are X86_64 and ARM64. This parameter must be set to X86_64 for Windows containers. Fargate Spot is not supported on Windows-based containers on Fargate. A job queue will be blocked if a Windows job is submitted to a job queue with only Fargate Spot compute environments. However, you can attach both FARGATE and FARGATE_SPOT compute environments to the same job queue."]}
    let make ?operatingSystemFamily =
      fun ?cpuArchitecture ->
        fun () -> { operatingSystemFamily; cpuArchitecture }
    let to_value x =
      structure_to_value
        [("operatingSystemFamily",
           (Option.map x.operatingSystemFamily ~f:String_.to_value));
        ("cpuArchitecture",
          (Option.map x.cpuArchitecture ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let cpuArchitecture =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "cpuArchitecture") in
      let operatingSystemFamily =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "operatingSystemFamily") in
      make ?cpuArchitecture ?operatingSystemFamily ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let cpuArchitecture =
        field_map json__ "cpuArchitecture" String_.of_json in
      let operatingSystemFamily =
        field_map json__ "operatingSystemFamily" String_.of_json in
      make ?cpuArchitecture ?operatingSystemFamily ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the compute environment architecture for Batch jobs on Fargate."]
module Volumes =
  struct
    type nonrec t = Volume.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:Volume.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:Volume.of_xml)
    let of_json j = list_of_json ~kind:"Volumes" ~of_json:Volume.of_json j
    let to_json v = composed_to_json to_value v
  end
module EksContainer =
  struct
    type nonrec t =
      {
      name: String_.t option
        [@ocaml.doc
          "The name of the container. If the name isn't specified, the default name \"Default\" is used. Each container in a pod must have a unique name."];
      image: String_.t
        [@ocaml.doc "The Docker image used to start the container."];
      imagePullPolicy: String_.t option
        [@ocaml.doc
          "The image pull policy for the container. Supported values are Always, IfNotPresent, and Never. This parameter defaults to IfNotPresent. However, if the :latest tag is specified, it defaults to Always. For more information, see Updating images in the Kubernetes documentation."];
      command: StringList.t option
        [@ocaml.doc
          "The entrypoint for the container. This isn't run within a shell. If this isn't specified, the ENTRYPOINT of the container image is used. Environment variable references are expanded using the container's environment. If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if the reference is to \"$(NAME1)\" and the NAME1 environment variable doesn't exist, the command string will remain \"$(NAME1).\" $$ is replaced with $ and the resulting string isn't expanded. For example, $$(VAR_NAME) will be passed as $(VAR_NAME) whether or not the VAR_NAME environment variable exists. The entrypoint can't be updated. For more information, see ENTRYPOINT in the Dockerfile reference and Define a command and arguments for a container and Entrypoint in the Kubernetes documentation."];
      args: StringList.t option
        [@ocaml.doc
          "An array of arguments to the entrypoint. If this isn't specified, the CMD of the container image is used. This corresponds to the args member in the Entrypoint portion of the Pod in Kubernetes. Environment variable references are expanded using the container's environment. If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if the reference is to \"$(NAME1)\" and the NAME1 environment variable doesn't exist, the command string will remain \"$(NAME1).\" $$ is replaced with $, and the resulting string isn't expanded. For example, $$(VAR_NAME) is passed as $(VAR_NAME) whether or not the VAR_NAME environment variable exists. For more information, see Dockerfile reference: CMD and Define a command and arguments for a pod in the Kubernetes documentation."];
      env: EksContainerEnvironmentVariables.t option
        [@ocaml.doc
          "The environment variables to pass to a container. Environment variables cannot start with \"AWS_BATCH\". This naming convention is reserved for variables that Batch sets."];
      resources: EksContainerResourceRequirements.t option
        [@ocaml.doc
          "The type and amount of resources to assign to a container. The supported resources include memory, cpu, and nvidia.com/gpu. For more information, see Resource management for pods and containers in the Kubernetes documentation."];
      volumeMounts: EksContainerVolumeMounts.t option
        [@ocaml.doc
          "The volume mounts for the container. Batch supports emptyDir, hostPath, and secret volume types. For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation."];
      securityContext: EksContainerSecurityContext.t option
        [@ocaml.doc
          "The security context for a job. For more information, see Configure a security context for a pod or container in the Kubernetes documentation."]}
    let context_ = "EksContainer"
    let make ?name =
      fun ?imagePullPolicy ->
        fun ?command ->
          fun ?args ->
            fun ?env ->
              fun ?resources ->
                fun ?volumeMounts ->
                  fun ?securityContext ->
                    fun ~image ->
                      fun () ->
                        {
                          name;
                          imagePullPolicy;
                          command;
                          args;
                          env;
                          resources;
                          volumeMounts;
                          securityContext;
                          image
                        }
    let to_value x =
      structure_to_value
        [("name", (Option.map x.name ~f:String_.to_value));
        ("image", (Some (String_.to_value x.image)));
        ("imagePullPolicy",
          (Option.map x.imagePullPolicy ~f:String_.to_value));
        ("command", (Option.map x.command ~f:StringList.to_value));
        ("args", (Option.map x.args ~f:StringList.to_value));
        ("env",
          (Option.map x.env ~f:EksContainerEnvironmentVariables.to_value));
        ("resources",
          (Option.map x.resources
             ~f:EksContainerResourceRequirements.to_value));
        ("volumeMounts",
          (Option.map x.volumeMounts ~f:EksContainerVolumeMounts.to_value));
        ("securityContext",
          (Option.map x.securityContext
             ~f:EksContainerSecurityContext.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let securityContext =
        (Option.map ~f:EksContainerSecurityContext.of_xml)
          (Xml.child xml_arg0 "securityContext") in
      let volumeMounts =
        (Option.map ~f:EksContainerVolumeMounts.of_xml)
          (Xml.child xml_arg0 "volumeMounts") in
      let resources =
        (Option.map ~f:EksContainerResourceRequirements.of_xml)
          (Xml.child xml_arg0 "resources") in
      let env =
        (Option.map ~f:EksContainerEnvironmentVariables.of_xml)
          (Xml.child xml_arg0 "env") in
      let args =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "args") in
      let command =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "command") in
      let imagePullPolicy =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "imagePullPolicy") in
      let image =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "image") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      make ?securityContext ?volumeMounts ?resources ?env ?args ?command
        ?imagePullPolicy ~image ?name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let securityContext =
        field_map json__ "securityContext"
          EksContainerSecurityContext.of_json in
      let volumeMounts =
        field_map json__ "volumeMounts" EksContainerVolumeMounts.of_json in
      let resources =
        field_map json__ "resources" EksContainerResourceRequirements.of_json in
      let env =
        field_map json__ "env" EksContainerEnvironmentVariables.of_json in
      let args = field_map json__ "args" StringList.of_json in
      let command = field_map json__ "command" StringList.of_json in
      let imagePullPolicy =
        field_map json__ "imagePullPolicy" String_.of_json in
      let image = field_map_exn json__ "image" String_.of_json in
      let name = field_map json__ "name" String_.of_json in
      make ?securityContext ?volumeMounts ?resources ?env ?args ?command
        ?imagePullPolicy ~image ?name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "EKS container properties are used in job definitions for Amazon EKS based job definitions to describe the properties for a container node in the pod that's launched as part of a job. This can't be specified for Amazon ECS based job definitions."]
module EksAnnotationsMap =
  struct
    type nonrec t = (String_.t * String_.t) list
    let make i = i
    let of_header xs =
      make
        (List.filter_map xs
           ~f:(fun (k, v) ->
                 (Base.String.chop_prefix k ~prefix:"x-amz-meta-") |>
                   (Option.map
                      ~f:(fun chopped ->
                            ((String_.of_string chopped),
                              (String_.of_string v))))))
    let to_value xs =
      (xs |>
         (List.map
            ~f:(fun (x, y) ->
                  (String_.to_value x) |>
                    (fun x -> (String_.to_value y) |> (fun y -> (x, y))))))
        |> (fun x -> `Map x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for Map_shape objects" ()
    let of_xml _ =
      failwith "of_xml_converter_of_shape: Map_shape case not implemented"
    let of_json j =
      object_of_json ~key_of_string:String_.of_string
        ~of_json:String_.of_json j
    let to_json v = composed_to_json to_value v
  end
module EksLabelsMap =
  struct
    type nonrec t = (String_.t * String_.t) list
    let make i = i
    let of_header xs =
      make
        (List.filter_map xs
           ~f:(fun (k, v) ->
                 (Base.String.chop_prefix k ~prefix:"x-amz-meta-") |>
                   (Option.map
                      ~f:(fun chopped ->
                            ((String_.of_string chopped),
                              (String_.of_string v))))))
    let to_value xs =
      (xs |>
         (List.map
            ~f:(fun (x, y) ->
                  (String_.to_value x) |>
                    (fun x -> (String_.to_value y) |> (fun y -> (x, y))))))
        |> (fun x -> `Map x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for Map_shape objects" ()
    let of_xml _ =
      failwith "of_xml_converter_of_shape: Map_shape case not implemented"
    let of_json j =
      object_of_json ~key_of_string:String_.of_string
        ~of_json:String_.of_json j
    let to_json v = composed_to_json to_value v
  end
module EksVolume =
  struct
    type nonrec t =
      {
      name: String_.t
        [@ocaml.doc
          "The name of the volume. The name must be allowed as a DNS subdomain name. For more information, see DNS subdomain names in the Kubernetes documentation."];
      hostPath: EksHostPath.t option
        [@ocaml.doc
          "Specifies the configuration of a Kubernetes hostPath volume. For more information, see hostPath in the Kubernetes documentation."];
      emptyDir: EksEmptyDir.t option
        [@ocaml.doc
          "Specifies the configuration of a Kubernetes emptyDir volume. For more information, see emptyDir in the Kubernetes documentation."];
      secret: EksSecret.t option
        [@ocaml.doc
          "Specifies the configuration of a Kubernetes secret volume. For more information, see secret in the Kubernetes documentation."];
      persistentVolumeClaim: EksPersistentVolumeClaim.t option
        [@ocaml.doc
          "Specifies the configuration of a Kubernetes persistentVolumeClaim bounded to a persistentVolume. For more information, see Persistent Volume Claims in the Kubernetes documentation."]}
    let context_ = "EksVolume"
    let make ?hostPath =
      fun ?emptyDir ->
        fun ?secret ->
          fun ?persistentVolumeClaim ->
            fun ~name ->
              fun () ->
                { hostPath; emptyDir; secret; persistentVolumeClaim; name }
    let to_value x =
      structure_to_value
        [("name", (Some (String_.to_value x.name)));
        ("hostPath", (Option.map x.hostPath ~f:EksHostPath.to_value));
        ("emptyDir", (Option.map x.emptyDir ~f:EksEmptyDir.to_value));
        ("secret", (Option.map x.secret ~f:EksSecret.to_value));
        ("persistentVolumeClaim",
          (Option.map x.persistentVolumeClaim
             ~f:EksPersistentVolumeClaim.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let persistentVolumeClaim =
        (Option.map ~f:EksPersistentVolumeClaim.of_xml)
          (Xml.child xml_arg0 "persistentVolumeClaim") in
      let secret =
        (Option.map ~f:EksSecret.of_xml) (Xml.child xml_arg0 "secret") in
      let emptyDir =
        (Option.map ~f:EksEmptyDir.of_xml) (Xml.child xml_arg0 "emptyDir") in
      let hostPath =
        (Option.map ~f:EksHostPath.of_xml) (Xml.child xml_arg0 "hostPath") in
      let name =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "name") in
      make ?persistentVolumeClaim ?secret ?emptyDir ?hostPath ~name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let persistentVolumeClaim =
        field_map json__ "persistentVolumeClaim"
          EksPersistentVolumeClaim.of_json in
      let secret = field_map json__ "secret" EksSecret.of_json in
      let emptyDir = field_map json__ "emptyDir" EksEmptyDir.of_json in
      let hostPath = field_map json__ "hostPath" EksHostPath.of_json in
      let name = field_map_exn json__ "name" String_.of_json in
      make ?persistentVolumeClaim ?secret ?emptyDir ?hostPath ~name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Specifies an Amazon EKS volume for a job definition."]
module ImagePullSecret =
  struct
    type nonrec t =
      {
      name: String_.t
        [@ocaml.doc
          "Provides a unique identifier for the ImagePullSecret. This object is required when EksPodProperties$imagePullSecrets is used."]}
    let context_ = "ImagePullSecret"
    let make ~name = fun () -> { name }
    let to_value x =
      structure_to_value [("name", (Some (String_.to_value x.name)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let name =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "name") in
      make ~name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let name = field_map_exn json__ "name" String_.of_json in make ~name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "References a Kubernetes secret resource. This name of the secret must start and end with an alphanumeric character, is required to be lowercase, can include periods (.) and hyphens (-), and can't contain more than 253 characters."]
module TaskContainerOverrides =
  struct
    type nonrec t =
      {
      command: StringList.t option
        [@ocaml.doc
          "The command to send to the container that overrides the default command from the Docker image or the job definition. This parameter can't contain an empty string."];
      environment: EnvironmentVariables.t option
        [@ocaml.doc
          "The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the job definition. Environment variables cannot start with AWS_BATCH. This naming convention is reserved for variables that Batch sets."];
      name: String_.t option
        [@ocaml.doc
          "A pointer to the container that you want to override. The container's name provides a unique identifier for the container being used."];
      resourceRequirements: ResourceRequirements.t option
        [@ocaml.doc
          "The type and amount of resources to assign to a container. This overrides the settings in the job definition. The supported resources include GPU, MEMORY, and VCPU."]}
    let make ?command =
      fun ?environment ->
        fun ?name ->
          fun ?resourceRequirements ->
            fun () -> { command; environment; name; resourceRequirements }
    let to_value x =
      structure_to_value
        [("command", (Option.map x.command ~f:StringList.to_value));
        ("environment",
          (Option.map x.environment ~f:EnvironmentVariables.to_value));
        ("name", (Option.map x.name ~f:String_.to_value));
        ("resourceRequirements",
          (Option.map x.resourceRequirements ~f:ResourceRequirements.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let resourceRequirements =
        (Option.map ~f:ResourceRequirements.of_xml)
          (Xml.child xml_arg0 "resourceRequirements") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      let environment =
        (Option.map ~f:EnvironmentVariables.of_xml)
          (Xml.child xml_arg0 "environment") in
      let command =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "command") in
      make ?resourceRequirements ?name ?environment ?command ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let resourceRequirements =
        field_map json__ "resourceRequirements" ResourceRequirements.of_json in
      let name = field_map json__ "name" String_.of_json in
      let environment =
        field_map json__ "environment" EnvironmentVariables.of_json in
      let command = field_map json__ "command" StringList.of_json in
      make ?resourceRequirements ?name ?environment ?command ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The overrides that should be sent to a container. For information about using Batch overrides when you connect event sources to targets, see BatchContainerOverrides."]
module AttemptTaskContainerDetails =
  struct
    type nonrec t =
      {
      exitCode: Integer.t option
        [@ocaml.doc
          "The exit code for the container\226\128\153s attempt. A non-zero exit code is considered failed."];
      name: String_.t option [@ocaml.doc "The name of a container."];
      reason: String_.t option
        [@ocaml.doc
          "A short (255 max characters) string that's easy to understand and provides additional details for a running or stopped container."];
      logStreamName: String_.t option
        [@ocaml.doc
          "The name of the Amazon CloudWatch Logs log stream that's associated with the container. The log group for Batch jobs is /aws/batch/job. Each container attempt receives a log stream name when they reach the RUNNING status."];
      networkInterfaces: NetworkInterfaceList.t option
        [@ocaml.doc
          "The network interfaces that are associated with the job attempt."]}
    let make ?exitCode =
      fun ?name ->
        fun ?reason ->
          fun ?logStreamName ->
            fun ?networkInterfaces ->
              fun () ->
                { exitCode; name; reason; logStreamName; networkInterfaces }
    let to_value x =
      structure_to_value
        [("exitCode", (Option.map x.exitCode ~f:Integer.to_value));
        ("name", (Option.map x.name ~f:String_.to_value));
        ("reason", (Option.map x.reason ~f:String_.to_value));
        ("logStreamName", (Option.map x.logStreamName ~f:String_.to_value));
        ("networkInterfaces",
          (Option.map x.networkInterfaces ~f:NetworkInterfaceList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let networkInterfaces =
        (Option.map ~f:NetworkInterfaceList.of_xml)
          (Xml.child xml_arg0 "networkInterfaces") in
      let logStreamName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "logStreamName") in
      let reason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "reason") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      let exitCode =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "exitCode") in
      make ?networkInterfaces ?logStreamName ?reason ?name ?exitCode ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let networkInterfaces =
        field_map json__ "networkInterfaces" NetworkInterfaceList.of_json in
      let logStreamName = field_map json__ "logStreamName" String_.of_json in
      let reason = field_map json__ "reason" String_.of_json in
      let name = field_map json__ "name" String_.of_json in
      let exitCode = field_map json__ "exitCode" Integer.of_json in
      make ?networkInterfaces ?logStreamName ?reason ?name ?exitCode ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the details of a container that's part of a job attempt."]
module ConsumableResourceRequirement =
  struct
    type nonrec t =
      {
      consumableResource: String_.t option
        [@ocaml.doc "The name or ARN of the consumable resource."];
      quantity: Long.t option
        [@ocaml.doc
          "The quantity of the consumable resource that is needed."]}
    let make ?consumableResource =
      fun ?quantity -> fun () -> { consumableResource; quantity }
    let to_value x =
      structure_to_value
        [("consumableResource",
           (Option.map x.consumableResource ~f:String_.to_value));
        ("quantity", (Option.map x.quantity ~f:Long.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let quantity =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "quantity") in
      let consumableResource =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "consumableResource") in
      make ?quantity ?consumableResource ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let quantity = field_map json__ "quantity" Long.of_json in
      let consumableResource =
        field_map json__ "consumableResource" String_.of_json in
      make ?quantity ?consumableResource ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Information about a consumable resource required to run a job."]
module EcsTaskProperties =
  struct
    type nonrec t =
      {
      containers: ListTaskContainerProperties.t
        [@ocaml.doc "This object is a list of containers."];
      ephemeralStorage: EphemeralStorage.t option
        [@ocaml.doc
          "The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate."];
      executionRoleArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the execution role that Batch can assume. For jobs that run on Fargate resources, you must provide an execution role. For more information, see Batch execution IAM role in the Batch User Guide."];
      platformVersion: String_.t option
        [@ocaml.doc
          "The Fargate platform version where the jobs are running. A platform version is specified only for jobs that are running on Fargate resources. If one isn't specified, the LATEST platform version is used by default. This uses a recent, approved version of the Fargate platform for compute resources. For more information, see Fargate platform versions in the Amazon Elastic Container Service Developer Guide."];
      ipcMode: String_.t option
        [@ocaml.doc
          "The IPC resource namespace to use for the containers in the task. The valid values are host, task, or none. If host is specified, all containers within the tasks that specified the host IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If task is specified, all containers within the specified task share the same IPC resources. If none is specified, the IPC resources within the containers of a task are private, and are not shared with other containers in a task or on the container instance. If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance. For more information, see IPC settings in the Docker run reference."];
      taskRoleArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) that's associated with the Amazon ECS task. This is object is comparable to ContainerProperties:jobRoleArn."];
      pidMode: String_.t option
        [@ocaml.doc
          "The process namespace to use for the containers in the task. The valid values are host or task. For example, monitoring sidecars might need pidMode to access information about other containers running in the same task. If host is specified, all containers within the tasks that specified the host PID mode on the same container instance share the process namespace with the host Amazon EC2 instance. If task is specified, all containers within the specified task share the same process namespace. If no value is specified, the default is a private namespace for each container. For more information, see PID settings in the Docker run reference."];
      networkConfiguration: NetworkConfiguration.t option
        [@ocaml.doc
          "The network configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon EC2 resources must not specify this parameter."];
      runtimePlatform: RuntimePlatform.t option
        [@ocaml.doc
          "An object that represents the compute environment architecture for Batch jobs on Fargate."];
      volumes: Volumes.t option
        [@ocaml.doc "A list of volumes that are associated with the job."];
      enableExecuteCommand: Boolean.t option
        [@ocaml.doc
          "Determines whether execute command functionality is turned on for this task. If true, execute command functionality is turned on all the containers in the task."]}
    let context_ = "EcsTaskProperties"
    let make ?ephemeralStorage =
      fun ?executionRoleArn ->
        fun ?platformVersion ->
          fun ?ipcMode ->
            fun ?taskRoleArn ->
              fun ?pidMode ->
                fun ?networkConfiguration ->
                  fun ?runtimePlatform ->
                    fun ?volumes ->
                      fun ?enableExecuteCommand ->
                        fun ~containers ->
                          fun () ->
                            {
                              ephemeralStorage;
                              executionRoleArn;
                              platformVersion;
                              ipcMode;
                              taskRoleArn;
                              pidMode;
                              networkConfiguration;
                              runtimePlatform;
                              volumes;
                              enableExecuteCommand;
                              containers
                            }
    let to_value x =
      structure_to_value
        [("containers",
           (Some (ListTaskContainerProperties.to_value x.containers)));
        ("ephemeralStorage",
          (Option.map x.ephemeralStorage ~f:EphemeralStorage.to_value));
        ("executionRoleArn",
          (Option.map x.executionRoleArn ~f:String_.to_value));
        ("platformVersion",
          (Option.map x.platformVersion ~f:String_.to_value));
        ("ipcMode", (Option.map x.ipcMode ~f:String_.to_value));
        ("taskRoleArn", (Option.map x.taskRoleArn ~f:String_.to_value));
        ("pidMode", (Option.map x.pidMode ~f:String_.to_value));
        ("networkConfiguration",
          (Option.map x.networkConfiguration ~f:NetworkConfiguration.to_value));
        ("runtimePlatform",
          (Option.map x.runtimePlatform ~f:RuntimePlatform.to_value));
        ("volumes", (Option.map x.volumes ~f:Volumes.to_value));
        ("enableExecuteCommand",
          (Option.map x.enableExecuteCommand ~f:Boolean.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let enableExecuteCommand =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "enableExecuteCommand") in
      let volumes =
        (Option.map ~f:Volumes.of_xml) (Xml.child xml_arg0 "volumes") in
      let runtimePlatform =
        (Option.map ~f:RuntimePlatform.of_xml)
          (Xml.child xml_arg0 "runtimePlatform") in
      let networkConfiguration =
        (Option.map ~f:NetworkConfiguration.of_xml)
          (Xml.child xml_arg0 "networkConfiguration") in
      let pidMode =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "pidMode") in
      let taskRoleArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "taskRoleArn") in
      let ipcMode =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "ipcMode") in
      let platformVersion =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "platformVersion") in
      let executionRoleArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "executionRoleArn") in
      let ephemeralStorage =
        (Option.map ~f:EphemeralStorage.of_xml)
          (Xml.child xml_arg0 "ephemeralStorage") in
      let containers =
        ListTaskContainerProperties.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "containers") in
      make ?enableExecuteCommand ?volumes ?runtimePlatform
        ?networkConfiguration ?pidMode ?taskRoleArn ?ipcMode ?platformVersion
        ?executionRoleArn ?ephemeralStorage ~containers ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let enableExecuteCommand =
        field_map json__ "enableExecuteCommand" Boolean.of_json in
      let volumes = field_map json__ "volumes" Volumes.of_json in
      let runtimePlatform =
        field_map json__ "runtimePlatform" RuntimePlatform.of_json in
      let networkConfiguration =
        field_map json__ "networkConfiguration" NetworkConfiguration.of_json in
      let pidMode = field_map json__ "pidMode" String_.of_json in
      let taskRoleArn = field_map json__ "taskRoleArn" String_.of_json in
      let ipcMode = field_map json__ "ipcMode" String_.of_json in
      let platformVersion =
        field_map json__ "platformVersion" String_.of_json in
      let executionRoleArn =
        field_map json__ "executionRoleArn" String_.of_json in
      let ephemeralStorage =
        field_map json__ "ephemeralStorage" EphemeralStorage.of_json in
      let containers =
        field_map_exn json__ "containers" ListTaskContainerProperties.of_json in
      make ?enableExecuteCommand ?volumes ?runtimePlatform
        ?networkConfiguration ?pidMode ?taskRoleArn ?ipcMode ?platformVersion
        ?executionRoleArn ?ephemeralStorage ~containers ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The properties for a task definition that describes the container and volume definitions of an Amazon ECS task. You can specify which Docker images to use, the required resources, and other configurations related to launching the task definition through an Amazon ECS service or task."]
module EksContainers =
  struct
    type nonrec t = EksContainer.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:EksContainer.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:EksContainer.of_xml)
    let of_json j =
      list_of_json ~kind:"EksContainers" ~of_json:EksContainer.of_json j
    let to_json v = composed_to_json to_value v
  end
module EksMetadata =
  struct
    type nonrec t =
      {
      labels: EksLabelsMap.t option
        [@ocaml.doc
          "Key-value pairs used to identify, sort, and organize cube resources. Can contain up to 63 uppercase letters, lowercase letters, numbers, hyphens (-), and underscores (_). Labels can be added or modified at any time. Each resource can have multiple labels, but each key must be unique for a given object."];
      annotations: EksAnnotationsMap.t option
        [@ocaml.doc
          "Key-value pairs used to attach arbitrary, non-identifying metadata to Kubernetes objects. Valid annotation keys have two segments: an optional prefix and a name, separated by a slash (/). The prefix is optional and must be 253 characters or less. If specified, the prefix must be a DNS subdomain\226\136\146 a series of DNS labels separated by dots (.), and it must end with a slash (/). The name segment is required and must be 63 characters or less. It can include alphanumeric characters (\\[a-z0-9A-Z\\]), dashes (-), underscores (_), and dots (.), but must begin and end with an alphanumeric character. Annotation values must be 255 characters or less. Annotations can be added or modified at any time. Each resource can have multiple annotations."];
      namespace: String_.t option
        [@ocaml.doc
          "The namespace of the Amazon EKS cluster. In Kubernetes, namespaces provide a mechanism for isolating groups of resources within a single cluster. Names of resources need to be unique within a namespace, but not across namespaces. Batch places Batch Job pods in this namespace. If this field is provided, the value can't be empty or null. It must meet the following requirements: 1-63 characters long Can't be set to default Can't start with kube Must match the following regular expression: ^\\[a-z0-9\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?$ For more information, see Namespaces in the Kubernetes documentation. This namespace can be different from the kubernetesNamespace set in the compute environment's EksConfiguration, but must have identical role-based access control (RBAC) roles as the compute environment's kubernetesNamespace. For multi-node parallel jobs, the same value must be provided across all the node ranges."]}
    let make ?labels =
      fun ?annotations ->
        fun ?namespace -> fun () -> { labels; annotations; namespace }
    let to_value x =
      structure_to_value
        [("labels", (Option.map x.labels ~f:EksLabelsMap.to_value));
        ("annotations",
          (Option.map x.annotations ~f:EksAnnotationsMap.to_value));
        ("namespace", (Option.map x.namespace ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let namespace =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "namespace") in
      let annotations =
        (Option.map ~f:EksAnnotationsMap.of_xml)
          (Xml.child xml_arg0 "annotations") in
      let labels =
        (Option.map ~f:EksLabelsMap.of_xml) (Xml.child xml_arg0 "labels") in
      make ?namespace ?annotations ?labels ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let namespace = field_map json__ "namespace" String_.of_json in
      let annotations =
        field_map json__ "annotations" EksAnnotationsMap.of_json in
      let labels = field_map json__ "labels" EksLabelsMap.of_json in
      make ?namespace ?annotations ?labels ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Describes and uniquely identifies Kubernetes resources. For example, the compute environment that a pod runs in or the jobID for a job running in the pod. For more information, see Understanding Kubernetes Objects in the Kubernetes documentation."]
module EksVolumes =
  struct
    type nonrec t = EksVolume.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:EksVolume.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:EksVolume.of_xml)
    let of_json j =
      list_of_json ~kind:"EksVolumes" ~of_json:EksVolume.of_json j
    let to_json v = composed_to_json to_value v
  end
module ImagePullSecrets =
  struct
    type nonrec t = ImagePullSecret.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ImagePullSecret.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ImagePullSecret.of_xml)
    let of_json j =
      list_of_json ~kind:"ImagePullSecrets" ~of_json:ImagePullSecret.of_json
        j
    let to_json v = composed_to_json to_value v
  end
module ListTaskContainerOverrides =
  struct
    type nonrec t = TaskContainerOverrides.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:TaskContainerOverrides.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:TaskContainerOverrides.of_xml)
    let of_json j =
      list_of_json ~kind:"ListTaskContainerOverrides"
        ~of_json:TaskContainerOverrides.of_json j
    let to_json v = composed_to_json to_value v
  end
module EksContainerOverride =
  struct
    type nonrec t =
      {
      name: String_.t option
        [@ocaml.doc
          "A pointer to the container that you want to override. The name must match a unique container name that you wish to override."];
      image: String_.t option
        [@ocaml.doc
          "The override of the Docker image that's used to start the container."];
      command: StringList.t option
        [@ocaml.doc
          "The command to send to the container that overrides the default command from the Docker image or the job definition."];
      args: StringList.t option
        [@ocaml.doc
          "The arguments to the entrypoint to send to the container that overrides the default arguments from the Docker image or the job definition. For more information, see Dockerfile reference: CMD and Define a command an arguments for a pod in the Kubernetes documentation."];
      env: EksContainerEnvironmentVariables.t option
        [@ocaml.doc
          "The environment variables to send to the container. You can add new environment variables, which are added to the container at launch. Or, you can override the existing environment variables from the Docker image or the job definition. Environment variables cannot start with \"AWS_BATCH\". This naming convention is reserved for variables that Batch sets."];
      resources: EksContainerResourceRequirements.t option
        [@ocaml.doc
          "The type and amount of resources to assign to a container. These override the settings in the job definition. The supported resources include memory, cpu, and nvidia.com/gpu. For more information, see Resource management for pods and containers in the Kubernetes documentation."]}
    let make ?name =
      fun ?image ->
        fun ?command ->
          fun ?args ->
            fun ?env ->
              fun ?resources ->
                fun () -> { name; image; command; args; env; resources }
    let to_value x =
      structure_to_value
        [("name", (Option.map x.name ~f:String_.to_value));
        ("image", (Option.map x.image ~f:String_.to_value));
        ("command", (Option.map x.command ~f:StringList.to_value));
        ("args", (Option.map x.args ~f:StringList.to_value));
        ("env",
          (Option.map x.env ~f:EksContainerEnvironmentVariables.to_value));
        ("resources",
          (Option.map x.resources
             ~f:EksContainerResourceRequirements.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let resources =
        (Option.map ~f:EksContainerResourceRequirements.of_xml)
          (Xml.child xml_arg0 "resources") in
      let env =
        (Option.map ~f:EksContainerEnvironmentVariables.of_xml)
          (Xml.child xml_arg0 "env") in
      let args =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "args") in
      let command =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "command") in
      let image = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "image") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      make ?resources ?env ?args ?command ?image ?name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let resources =
        field_map json__ "resources" EksContainerResourceRequirements.of_json in
      let env =
        field_map json__ "env" EksContainerEnvironmentVariables.of_json in
      let args = field_map json__ "args" StringList.of_json in
      let command = field_map json__ "command" StringList.of_json in
      let image = field_map json__ "image" String_.of_json in
      let name = field_map json__ "name" String_.of_json in
      make ?resources ?env ?args ?command ?image ?name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Object representing any Kubernetes overrides to a job definition that's used in a SubmitJob API operation."]
module Double =
  struct
    type nonrec t = float
    let make i = i
    let of_string = Float.of_string
    let to_value x = `Double x
    let to_query v = to_query to_value v
    let to_header x = Stdlib.Float.to_string x
    let of_xml xml_arg0 =
      Float.of_string (string_of_xml ~kind:"a double" xml_arg0)
    let of_json j = float_of_json ~kind:"a double" j
    let to_json = simple_to_json to_value
  end
module ListAttemptTaskContainerDetails =
  struct
    type nonrec t = AttemptTaskContainerDetails.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:AttemptTaskContainerDetails.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:AttemptTaskContainerDetails.of_xml)
    let of_json j =
      list_of_json ~kind:"ListAttemptTaskContainerDetails"
        ~of_json:AttemptTaskContainerDetails.of_json j
    let to_json v = composed_to_json to_value v
  end
module TaskContainerDetails =
  struct
    type nonrec t =
      {
      command: StringList.t option
        [@ocaml.doc
          "The command that's passed to the container. This parameter maps to Cmd in the Create a container section of the Docker Remote API and the COMMAND parameter to docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd."];
      dependsOn: TaskContainerDependencyList.t option
        [@ocaml.doc "A list of containers that this container depends on."];
      environment: EnvironmentVariables.t option
        [@ocaml.doc
          "The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the Docker Remote API and the --env option to docker run. We don't recommend using plaintext environment variables for sensitive information, such as credential data."];
      essential: Boolean.t option
        [@ocaml.doc
          "If the essential parameter of a container is marked as true, and that container fails or stops for any reason, all other containers that are part of the task are stopped. If the essential parameter of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential. All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide."];
      firelensConfiguration: FirelensConfiguration.t option
        [@ocaml.doc
          "The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more information, see Custom log routing in the Amazon Elastic Container Service Developer Guide."];
      image: String_.t option
        [@ocaml.doc
          "The image used to start a container. This string is passed directly to the Docker daemon. By default, images in the Docker Hub registry are available. Other repositories are specified with either repository-url/image:tag or repository-url/image\\@digest. Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps to Image in the Create a container section of the Docker Remote API and the IMAGE parameter of the docker run ."];
      linuxParameters: LinuxParameters.t option
        [@ocaml.doc
          "Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see KernelCapabilities. This parameter is not supported for Windows containers."];
      logConfiguration: LogConfiguration.t option
        [@ocaml.doc
          "The log configuration specification for the container. This parameter maps to LogConfig in the Create a container section of the Docker Remote API and the --log-driver option to docker run. By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation. Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the LogConfiguration data type). Additional log drivers may be available in future releases of the Amazon ECS container agent. This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version --format '\\{\\{.Server.APIVersion\\}\\}' The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before containers placed on that instance can use these log configuration options. For more information, see Amazon ECS container agent configuration in the Amazon Elastic Container Service Developer Guide."];
      mountPoints: MountPoints.t option
        [@ocaml.doc
          "The mount points for data volumes in your container. This parameter maps to Volumes in the Create a container section of the Docker Remote API and the --volume option to docker run. Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows containers can't mount directories on a different drive, and mount point can't be across drives."];
      name: String_.t option [@ocaml.doc "The name of a container."];
      privileged: Boolean.t option
        [@ocaml.doc
          "When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). This parameter maps to Privileged in the Create a container section of the Docker Remote API and the --privileged option to docker run. This parameter is not supported for Windows containers or tasks run on Fargate."];
      readonlyRootFilesystem: Boolean.t option
        [@ocaml.doc
          "When this parameter is true, the container is given read-only access to its root file system. This parameter maps to ReadonlyRootfs in the Create a container section of the Docker Remote API and the --read-only option to docker run. This parameter is not supported for Windows containers."];
      repositoryCredentials: RepositoryCredentials.t option
        [@ocaml.doc
          "The private repository authentication credentials to use."];
      resourceRequirements: ResourceRequirements.t option
        [@ocaml.doc
          "The type and amount of a resource to assign to a container. The only supported resource is a GPU."];
      secrets: SecretList.t option
        [@ocaml.doc
          "The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide."];
      ulimits: Ulimits.t option
        [@ocaml.doc
          "A list of ulimits to set in the container. If a ulimit value is specified in a task definition, it overrides the default values set by Docker. This parameter maps to Ulimits in the Create a container section of the Docker Remote API and the --ulimit option to docker run. Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the exception of the nofile resource limit parameter which Fargate overrides. The nofile resource limit sets a restriction on the number of open files that a container can use. The default nofile soft limit is 1024 and the default hard limit is 65535. This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version --format '\\{\\{.Server.APIVersion\\}\\}' This parameter is not supported for Windows containers."];
      user: String_.t option
        [@ocaml.doc
          "The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run. When running tasks using the host network mode, don't run containers using the root user (UID 0). We recommend using a non-root user for better security. You can specify the user using the following formats. If specifying a UID or GID, you must specify it as a positive integer. user user:group uid uid:gid user:gi uid:group This parameter is not supported for Windows containers."];
      startTimeout: Integer.t option
        [@ocaml.doc
          "Time duration (in seconds) to wait before giving up on resolving dependencies for a container. The minimum value is 2 seconds and the maximum value for Fargate is 120 seconds."];
      stopTimeout: Integer.t option
        [@ocaml.doc
          "Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. The minimum value is 2 seconds and the maximum value for Fargate is 120 seconds. If the parameter is not specified, the default value of 30 seconds is used. For tasks that use the EC2 launch type, if the stopTimeout parameter isn't specified, the value set for the Amazon ECS container agent configuration variable ECS_CONTAINER_STOP_TIMEOUT is used. If neither the stopTimeout parameter nor the ECS_CONTAINER_STOP_TIMEOUT agent configuration variable are set, then the default value of 30 seconds is used."];
      exitCode: Integer.t option
        [@ocaml.doc "The exit code returned upon completion."];
      reason: String_.t option
        [@ocaml.doc
          "A short (255 max characters) human-readable string to provide additional details for a running or stopped container."];
      logStreamName: String_.t option
        [@ocaml.doc
          "The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch jobs is /aws/batch/job. Each container attempt receives a log stream name when they reach the RUNNING status."];
      networkInterfaces: NetworkInterfaceList.t option
        [@ocaml.doc
          "The network interfaces that are associated with the job."]}
    let make ?command =
      fun ?dependsOn ->
        fun ?environment ->
          fun ?essential ->
            fun ?firelensConfiguration ->
              fun ?image ->
                fun ?linuxParameters ->
                  fun ?logConfiguration ->
                    fun ?mountPoints ->
                      fun ?name ->
                        fun ?privileged ->
                          fun ?readonlyRootFilesystem ->
                            fun ?repositoryCredentials ->
                              fun ?resourceRequirements ->
                                fun ?secrets ->
                                  fun ?ulimits ->
                                    fun ?user ->
                                      fun ?startTimeout ->
                                        fun ?stopTimeout ->
                                          fun ?exitCode ->
                                            fun ?reason ->
                                              fun ?logStreamName ->
                                                fun ?networkInterfaces ->
                                                  fun () ->
                                                    {
                                                      command;
                                                      dependsOn;
                                                      environment;
                                                      essential;
                                                      firelensConfiguration;
                                                      image;
                                                      linuxParameters;
                                                      logConfiguration;
                                                      mountPoints;
                                                      name;
                                                      privileged;
                                                      readonlyRootFilesystem;
                                                      repositoryCredentials;
                                                      resourceRequirements;
                                                      secrets;
                                                      ulimits;
                                                      user;
                                                      startTimeout;
                                                      stopTimeout;
                                                      exitCode;
                                                      reason;
                                                      logStreamName;
                                                      networkInterfaces
                                                    }
    let to_value x =
      structure_to_value
        [("command", (Option.map x.command ~f:StringList.to_value));
        ("dependsOn",
          (Option.map x.dependsOn ~f:TaskContainerDependencyList.to_value));
        ("environment",
          (Option.map x.environment ~f:EnvironmentVariables.to_value));
        ("essential", (Option.map x.essential ~f:Boolean.to_value));
        ("firelensConfiguration",
          (Option.map x.firelensConfiguration
             ~f:FirelensConfiguration.to_value));
        ("image", (Option.map x.image ~f:String_.to_value));
        ("linuxParameters",
          (Option.map x.linuxParameters ~f:LinuxParameters.to_value));
        ("logConfiguration",
          (Option.map x.logConfiguration ~f:LogConfiguration.to_value));
        ("mountPoints", (Option.map x.mountPoints ~f:MountPoints.to_value));
        ("name", (Option.map x.name ~f:String_.to_value));
        ("privileged", (Option.map x.privileged ~f:Boolean.to_value));
        ("readonlyRootFilesystem",
          (Option.map x.readonlyRootFilesystem ~f:Boolean.to_value));
        ("repositoryCredentials",
          (Option.map x.repositoryCredentials
             ~f:RepositoryCredentials.to_value));
        ("resourceRequirements",
          (Option.map x.resourceRequirements ~f:ResourceRequirements.to_value));
        ("secrets", (Option.map x.secrets ~f:SecretList.to_value));
        ("ulimits", (Option.map x.ulimits ~f:Ulimits.to_value));
        ("user", (Option.map x.user ~f:String_.to_value));
        ("startTimeout", (Option.map x.startTimeout ~f:Integer.to_value));
        ("stopTimeout", (Option.map x.stopTimeout ~f:Integer.to_value));
        ("exitCode", (Option.map x.exitCode ~f:Integer.to_value));
        ("reason", (Option.map x.reason ~f:String_.to_value));
        ("logStreamName", (Option.map x.logStreamName ~f:String_.to_value));
        ("networkInterfaces",
          (Option.map x.networkInterfaces ~f:NetworkInterfaceList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let networkInterfaces =
        (Option.map ~f:NetworkInterfaceList.of_xml)
          (Xml.child xml_arg0 "networkInterfaces") in
      let logStreamName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "logStreamName") in
      let reason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "reason") in
      let exitCode =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "exitCode") in
      let stopTimeout =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "stopTimeout") in
      let startTimeout =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "startTimeout") in
      let user = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "user") in
      let ulimits =
        (Option.map ~f:Ulimits.of_xml) (Xml.child xml_arg0 "ulimits") in
      let secrets =
        (Option.map ~f:SecretList.of_xml) (Xml.child xml_arg0 "secrets") in
      let resourceRequirements =
        (Option.map ~f:ResourceRequirements.of_xml)
          (Xml.child xml_arg0 "resourceRequirements") in
      let repositoryCredentials =
        (Option.map ~f:RepositoryCredentials.of_xml)
          (Xml.child xml_arg0 "repositoryCredentials") in
      let readonlyRootFilesystem =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "readonlyRootFilesystem") in
      let privileged =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "privileged") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      let mountPoints =
        (Option.map ~f:MountPoints.of_xml) (Xml.child xml_arg0 "mountPoints") in
      let logConfiguration =
        (Option.map ~f:LogConfiguration.of_xml)
          (Xml.child xml_arg0 "logConfiguration") in
      let linuxParameters =
        (Option.map ~f:LinuxParameters.of_xml)
          (Xml.child xml_arg0 "linuxParameters") in
      let image = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "image") in
      let firelensConfiguration =
        (Option.map ~f:FirelensConfiguration.of_xml)
          (Xml.child xml_arg0 "firelensConfiguration") in
      let essential =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "essential") in
      let environment =
        (Option.map ~f:EnvironmentVariables.of_xml)
          (Xml.child xml_arg0 "environment") in
      let dependsOn =
        (Option.map ~f:TaskContainerDependencyList.of_xml)
          (Xml.child xml_arg0 "dependsOn") in
      let command =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "command") in
      make ?networkInterfaces ?logStreamName ?reason ?exitCode ?stopTimeout
        ?startTimeout ?user ?ulimits ?secrets ?resourceRequirements
        ?repositoryCredentials ?readonlyRootFilesystem ?privileged ?name
        ?mountPoints ?logConfiguration ?linuxParameters ?image
        ?firelensConfiguration ?essential ?environment ?dependsOn ?command ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let networkInterfaces =
        field_map json__ "networkInterfaces" NetworkInterfaceList.of_json in
      let logStreamName = field_map json__ "logStreamName" String_.of_json in
      let reason = field_map json__ "reason" String_.of_json in
      let exitCode = field_map json__ "exitCode" Integer.of_json in
      let stopTimeout = field_map json__ "stopTimeout" Integer.of_json in
      let startTimeout = field_map json__ "startTimeout" Integer.of_json in
      let user = field_map json__ "user" String_.of_json in
      let ulimits = field_map json__ "ulimits" Ulimits.of_json in
      let secrets = field_map json__ "secrets" SecretList.of_json in
      let resourceRequirements =
        field_map json__ "resourceRequirements" ResourceRequirements.of_json in
      let repositoryCredentials =
        field_map json__ "repositoryCredentials"
          RepositoryCredentials.of_json in
      let readonlyRootFilesystem =
        field_map json__ "readonlyRootFilesystem" Boolean.of_json in
      let privileged = field_map json__ "privileged" Boolean.of_json in
      let name = field_map json__ "name" String_.of_json in
      let mountPoints = field_map json__ "mountPoints" MountPoints.of_json in
      let logConfiguration =
        field_map json__ "logConfiguration" LogConfiguration.of_json in
      let linuxParameters =
        field_map json__ "linuxParameters" LinuxParameters.of_json in
      let image = field_map json__ "image" String_.of_json in
      let firelensConfiguration =
        field_map json__ "firelensConfiguration"
          FirelensConfiguration.of_json in
      let essential = field_map json__ "essential" Boolean.of_json in
      let environment =
        field_map json__ "environment" EnvironmentVariables.of_json in
      let dependsOn =
        field_map json__ "dependsOn" TaskContainerDependencyList.of_json in
      let command = field_map json__ "command" StringList.of_json in
      make ?networkInterfaces ?logStreamName ?reason ?exitCode ?stopTimeout
        ?startTimeout ?user ?ulimits ?secrets ?resourceRequirements
        ?repositoryCredentials ?readonlyRootFilesystem ?privileged ?name
        ?mountPoints ?logConfiguration ?linuxParameters ?image
        ?firelensConfiguration ?essential ?environment ?dependsOn ?command ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "The details for the container in this task attempt."]
module ConsumableResourceList =
  struct
    type nonrec t = ConsumableResourceRequirement.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ConsumableResourceRequirement.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ConsumableResourceRequirement.of_xml)
    let of_json j =
      list_of_json ~kind:"ConsumableResourceList"
        ~of_json:ConsumableResourceRequirement.of_json j
    let to_json v = composed_to_json to_value v
  end
module FargatePlatformConfiguration =
  struct
    type nonrec t =
      {
      platformVersion: String_.t option
        [@ocaml.doc
          "The Fargate platform version where the jobs are running. A platform version is specified only for jobs that are running on Fargate resources. If one isn't specified, the LATEST platform version is used by default. This uses a recent, approved version of the Fargate platform for compute resources. For more information, see Fargate platform versions in the Amazon Elastic Container Service Developer Guide."]}
    let make ?platformVersion = fun () -> { platformVersion }
    let to_value x =
      structure_to_value
        [("platformVersion",
           (Option.map x.platformVersion ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let platformVersion =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "platformVersion") in
      make ?platformVersion ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let platformVersion =
        field_map json__ "platformVersion" String_.of_json in
      make ?platformVersion ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The platform configuration for jobs that are running on Fargate resources. Jobs that run on Amazon EC2 resources must not specify this parameter."]
module ListEcsTaskProperties =
  struct
    type nonrec t = EcsTaskProperties.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:EcsTaskProperties.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:EcsTaskProperties.of_xml)
    let of_json j =
      list_of_json ~kind:"ListEcsTaskProperties"
        ~of_json:EcsTaskProperties.of_json j
    let to_json v = composed_to_json to_value v
  end
module EksPodProperties =
  struct
    type nonrec t =
      {
      serviceAccountName: String_.t option
        [@ocaml.doc
          "The name of the service account that's used to run the pod. For more information, see Kubernetes service accounts and Configure a Kubernetes service account to assume an IAM role in the Amazon EKS User Guide and Configure service accounts for pods in the Kubernetes documentation."];
      hostNetwork: Boolean.t option
        [@ocaml.doc
          "Indicates if the pod uses the hosts' network IP address. The default value is true. Setting this to false enables the Kubernetes pod networking model. Most Batch workloads are egress-only and don't require the overhead of IP allocation for each pod for incoming connections. For more information, see Host namespaces and Pod networking in the Kubernetes documentation."];
      dnsPolicy: String_.t option
        [@ocaml.doc
          "The DNS policy for the pod. The default value is ClusterFirst. If the hostNetwork parameter is not specified, the default is ClusterFirstWithHostNet. ClusterFirst indicates that any DNS query that does not match the configured cluster domain suffix is forwarded to the upstream nameserver inherited from the node. For more information, see Pod's DNS policy in the Kubernetes documentation. Valid values: Default | ClusterFirst | ClusterFirstWithHostNet"];
      imagePullSecrets: ImagePullSecrets.t option
        [@ocaml.doc
          "References a Kubernetes secret resource. It holds a list of secrets. These secrets help to gain access to pull an images from a private registry. ImagePullSecret$name is required when this object is used."];
      containers: EksContainers.t option
        [@ocaml.doc
          "The properties of the container that's used on the Amazon EKS pod. This object is limited to 10 elements."];
      initContainers: EksContainers.t option
        [@ocaml.doc
          "These containers run before application containers, always runs to completion, and must complete successfully before the next container starts. These containers are registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store. For more information, see Init Containers in the Kubernetes documentation. This object is limited to 10 elements."];
      volumes: EksVolumes.t option
        [@ocaml.doc
          "Specifies the volumes for a job definition that uses Amazon EKS resources."];
      metadata: EksMetadata.t option
        [@ocaml.doc
          "Metadata about the Kubernetes pod. For more information, see Understanding Kubernetes Objects in the Kubernetes documentation."];
      shareProcessNamespace: Boolean.t option
        [@ocaml.doc
          "Indicates if the processes in a container are shared, or visible, to other containers in the same pod. For more information, see Share Process Namespace between Containers in a Pod."]}
    let make ?serviceAccountName =
      fun ?hostNetwork ->
        fun ?dnsPolicy ->
          fun ?imagePullSecrets ->
            fun ?containers ->
              fun ?initContainers ->
                fun ?volumes ->
                  fun ?metadata ->
                    fun ?shareProcessNamespace ->
                      fun () ->
                        {
                          serviceAccountName;
                          hostNetwork;
                          dnsPolicy;
                          imagePullSecrets;
                          containers;
                          initContainers;
                          volumes;
                          metadata;
                          shareProcessNamespace
                        }
    let to_value x =
      structure_to_value
        [("serviceAccountName",
           (Option.map x.serviceAccountName ~f:String_.to_value));
        ("hostNetwork", (Option.map x.hostNetwork ~f:Boolean.to_value));
        ("dnsPolicy", (Option.map x.dnsPolicy ~f:String_.to_value));
        ("imagePullSecrets",
          (Option.map x.imagePullSecrets ~f:ImagePullSecrets.to_value));
        ("containers", (Option.map x.containers ~f:EksContainers.to_value));
        ("initContainers",
          (Option.map x.initContainers ~f:EksContainers.to_value));
        ("volumes", (Option.map x.volumes ~f:EksVolumes.to_value));
        ("metadata", (Option.map x.metadata ~f:EksMetadata.to_value));
        ("shareProcessNamespace",
          (Option.map x.shareProcessNamespace ~f:Boolean.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let shareProcessNamespace =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "shareProcessNamespace") in
      let metadata =
        (Option.map ~f:EksMetadata.of_xml) (Xml.child xml_arg0 "metadata") in
      let volumes =
        (Option.map ~f:EksVolumes.of_xml) (Xml.child xml_arg0 "volumes") in
      let initContainers =
        (Option.map ~f:EksContainers.of_xml)
          (Xml.child xml_arg0 "initContainers") in
      let containers =
        (Option.map ~f:EksContainers.of_xml)
          (Xml.child xml_arg0 "containers") in
      let imagePullSecrets =
        (Option.map ~f:ImagePullSecrets.of_xml)
          (Xml.child xml_arg0 "imagePullSecrets") in
      let dnsPolicy =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "dnsPolicy") in
      let hostNetwork =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "hostNetwork") in
      let serviceAccountName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "serviceAccountName") in
      make ?shareProcessNamespace ?metadata ?volumes ?initContainers
        ?containers ?imagePullSecrets ?dnsPolicy ?hostNetwork
        ?serviceAccountName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let shareProcessNamespace =
        field_map json__ "shareProcessNamespace" Boolean.of_json in
      let metadata = field_map json__ "metadata" EksMetadata.of_json in
      let volumes = field_map json__ "volumes" EksVolumes.of_json in
      let initContainers =
        field_map json__ "initContainers" EksContainers.of_json in
      let containers = field_map json__ "containers" EksContainers.of_json in
      let imagePullSecrets =
        field_map json__ "imagePullSecrets" ImagePullSecrets.of_json in
      let dnsPolicy = field_map json__ "dnsPolicy" String_.of_json in
      let hostNetwork = field_map json__ "hostNetwork" Boolean.of_json in
      let serviceAccountName =
        field_map json__ "serviceAccountName" String_.of_json in
      make ?shareProcessNamespace ?metadata ?volumes ?initContainers
        ?containers ?imagePullSecrets ?dnsPolicy ?hostNetwork
        ?serviceAccountName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "The properties for the pod."]
module UserdataType =
  struct
    type nonrec t =
      | EKS_BOOTSTRAP_SH 
      | EKS_NODEADM 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | EKS_BOOTSTRAP_SH -> "EKS_BOOTSTRAP_SH"
      | EKS_NODEADM -> "EKS_NODEADM"
      | Non_static_id s -> s
    let of_string =
      function
      | "EKS_BOOTSTRAP_SH" -> EKS_BOOTSTRAP_SH
      | "EKS_NODEADM" -> EKS_NODEADM
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration UserdataType" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"UserdataType" j)
    let to_json = simple_to_json to_value
  end
module TaskPropertiesOverride =
  struct
    type nonrec t =
      {
      containers: ListTaskContainerOverrides.t option
        [@ocaml.doc "The overrides for the container definition of a job."]}
    let make ?containers = fun () -> { containers }
    let to_value x =
      structure_to_value
        [("containers",
           (Option.map x.containers ~f:ListTaskContainerOverrides.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let containers =
        (Option.map ~f:ListTaskContainerOverrides.of_xml)
          (Xml.child xml_arg0 "containers") in
      make ?containers ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let containers =
        field_map json__ "containers" ListTaskContainerOverrides.of_json in
      make ?containers ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that contains overrides for the task definition of a job."]
module EksContainerOverrideList =
  struct
    type nonrec t = EksContainerOverride.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:EksContainerOverride.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:EksContainerOverride.of_xml)
    let of_json j =
      list_of_json ~kind:"EksContainerOverrideList"
        ~of_json:EksContainerOverride.of_json j
    let to_json v = composed_to_json to_value v
  end
module FairshareCapacityUsage =
  struct
    type nonrec t =
      {
      capacityUnit: String_.t option
        [@ocaml.doc
          "The unit of measure for the capacity usage. For compute jobs, this is VCPU for Amazon EC2 and cpu for Amazon EKS. For service jobs, this is the instance type."];
      quantity: Double.t option
        [@ocaml.doc
          "The quantity of capacity being used, measured in the units specified by capacityUnit."]}
    let make ?capacityUnit =
      fun ?quantity -> fun () -> { capacityUnit; quantity }
    let to_value x =
      structure_to_value
        [("capacityUnit", (Option.map x.capacityUnit ~f:String_.to_value));
        ("quantity", (Option.map x.quantity ~f:Double.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let quantity =
        (Option.map ~f:Double.of_xml) (Xml.child xml_arg0 "quantity") in
      let capacityUnit =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "capacityUnit") in
      make ?quantity ?capacityUnit ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let quantity = field_map json__ "quantity" Double.of_json in
      let capacityUnit = field_map json__ "capacityUnit" String_.of_json in
      make ?quantity ?capacityUnit ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "The capacity usage for a fairshare scheduling job queue."]
module QuotaShareCapacityUsage =
  struct
    type nonrec t =
      {
      capacityUnit: String_.t option
        [@ocaml.doc "The unit of compute capacity for the capacity usage."];
      quantity: Double.t option
        [@ocaml.doc "The quantity of capacity being used."]}
    let make ?capacityUnit =
      fun ?quantity -> fun () -> { capacityUnit; quantity }
    let to_value x =
      structure_to_value
        [("capacityUnit", (Option.map x.capacityUnit ~f:String_.to_value));
        ("quantity", (Option.map x.quantity ~f:Double.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let quantity =
        (Option.map ~f:Double.of_xml) (Xml.child xml_arg0 "quantity") in
      let capacityUnit =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "capacityUnit") in
      make ?quantity ?capacityUnit ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let quantity = field_map json__ "quantity" Double.of_json in
      let capacityUnit = field_map json__ "capacityUnit" String_.of_json in
      make ?quantity ?capacityUnit ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The capacity usage for a quota share, including units of compute capacity and quantity of resources being used."]
module Float_ =
  struct
    type nonrec t = float
    let make i = i
    let of_string = Float.of_string
    let to_value x = `Float x
    let to_query v = to_query to_value v
    let to_header x = Stdlib.Float.to_string x
    let of_xml xml_arg0 =
      Float.of_string (string_of_xml ~kind:"a float" xml_arg0)
    let of_json j = float_of_json ~kind:"a float" j
    let to_json = simple_to_json to_value
  end
module AttemptEcsTaskDetails =
  struct
    type nonrec t =
      {
      containerInstanceArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the container instance that hosts the task."];
      taskArn: String_.t option
        [@ocaml.doc "The ARN of the Amazon ECS task."];
      containers: ListAttemptTaskContainerDetails.t option
        [@ocaml.doc
          "A list of containers that are included in the taskProperties list."]}
    let make ?containerInstanceArn =
      fun ?taskArn ->
        fun ?containers ->
          fun () -> { containerInstanceArn; taskArn; containers }
    let to_value x =
      structure_to_value
        [("containerInstanceArn",
           (Option.map x.containerInstanceArn ~f:String_.to_value));
        ("taskArn", (Option.map x.taskArn ~f:String_.to_value));
        ("containers",
          (Option.map x.containers
             ~f:ListAttemptTaskContainerDetails.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let containers =
        (Option.map ~f:ListAttemptTaskContainerDetails.of_xml)
          (Xml.child xml_arg0 "containers") in
      let taskArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "taskArn") in
      let containerInstanceArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "containerInstanceArn") in
      make ?containers ?taskArn ?containerInstanceArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let containers =
        field_map json__ "containers" ListAttemptTaskContainerDetails.of_json in
      let taskArn = field_map json__ "taskArn" String_.of_json in
      let containerInstanceArn =
        field_map json__ "containerInstanceArn" String_.of_json in
      make ?containers ?taskArn ?containerInstanceArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "An object that represents the details of a task."]
module ListTaskContainerDetails =
  struct
    type nonrec t = TaskContainerDetails.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:TaskContainerDetails.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:TaskContainerDetails.of_xml)
    let of_json j =
      list_of_json ~kind:"ListTaskContainerDetails"
        ~of_json:TaskContainerDetails.of_json j
    let to_json v = composed_to_json to_value v
  end
module EksAttemptContainerDetail =
  struct
    type nonrec t =
      {
      name: String_.t option [@ocaml.doc "The name of a container."];
      containerID: String_.t option [@ocaml.doc "The ID for the container."];
      exitCode: Integer.t option
        [@ocaml.doc
          "The exit code returned for the job attempt. A non-zero exit code is considered failed."];
      reason: String_.t option
        [@ocaml.doc
          "A short (255 max characters) human-readable string to provide additional details for a running or stopped container."]}
    let make ?name =
      fun ?containerID ->
        fun ?exitCode ->
          fun ?reason -> fun () -> { name; containerID; exitCode; reason }
    let to_value x =
      structure_to_value
        [("name", (Option.map x.name ~f:String_.to_value));
        ("containerID", (Option.map x.containerID ~f:String_.to_value));
        ("exitCode", (Option.map x.exitCode ~f:Integer.to_value));
        ("reason", (Option.map x.reason ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let reason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "reason") in
      let exitCode =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "exitCode") in
      let containerID =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "containerID") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      make ?reason ?exitCode ?containerID ?name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let reason = field_map json__ "reason" String_.of_json in
      let exitCode = field_map json__ "exitCode" Integer.of_json in
      let containerID = field_map json__ "containerID" String_.of_json in
      let name = field_map json__ "name" String_.of_json in
      make ?reason ?exitCode ?containerID ?name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the details for an attempt for a job attempt that an Amazon EKS container runs."]
module EksContainerDetail =
  struct
    type nonrec t =
      {
      name: String_.t option
        [@ocaml.doc
          "The name of the container. If the name isn't specified, the default name \"Default\" is used. Each container in a pod must have a unique name."];
      image: String_.t option
        [@ocaml.doc "The Docker image used to start the container."];
      imagePullPolicy: String_.t option
        [@ocaml.doc
          "The image pull policy for the container. Supported values are Always, IfNotPresent, and Never. This parameter defaults to Always if the :latest tag is specified, IfNotPresent otherwise. For more information, see Updating images in the Kubernetes documentation."];
      command: StringList.t option
        [@ocaml.doc
          "The entrypoint for the container. For more information, see Entrypoint in the Kubernetes documentation."];
      args: StringList.t option
        [@ocaml.doc
          "An array of arguments to the entrypoint. If this isn't specified, the CMD of the container image is used. This corresponds to the args member in the Entrypoint portion of the Pod in Kubernetes. Environment variable references are expanded using the container's environment. If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if the reference is to \"$(NAME1)\" and the NAME1 environment variable doesn't exist, the command string will remain \"$(NAME1)\". $$ is replaced with $ and the resulting string isn't expanded. For example, $$(VAR_NAME) is passed as $(VAR_NAME) whether or not the VAR_NAME environment variable exists. For more information, see Dockerfile reference: CMD and Define a command and arguments for a pod in the Kubernetes documentation."];
      env: EksContainerEnvironmentVariables.t option
        [@ocaml.doc
          "The environment variables to pass to a container. Environment variables cannot start with \"AWS_BATCH\". This naming convention is reserved for variables that Batch sets."];
      resources: EksContainerResourceRequirements.t option
        [@ocaml.doc
          "The type and amount of resources to assign to a container. The supported resources include memory, cpu, and nvidia.com/gpu. For more information, see Resource management for pods and containers in the Kubernetes documentation."];
      exitCode: Integer.t option
        [@ocaml.doc
          "The exit code returned for the job attempt. A non-zero exit code is considered failed."];
      reason: String_.t option
        [@ocaml.doc
          "A short human-readable string to provide additional details for a running or stopped container. It can be up to 255 characters long."];
      volumeMounts: EksContainerVolumeMounts.t option
        [@ocaml.doc
          "The volume mounts for the container. Batch supports emptyDir, hostPath, and secret volume types. For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation."];
      securityContext: EksContainerSecurityContext.t option
        [@ocaml.doc
          "The security context for a job. For more information, see Configure a security context for a pod or container in the Kubernetes documentation."]}
    let make ?name =
      fun ?image ->
        fun ?imagePullPolicy ->
          fun ?command ->
            fun ?args ->
              fun ?env ->
                fun ?resources ->
                  fun ?exitCode ->
                    fun ?reason ->
                      fun ?volumeMounts ->
                        fun ?securityContext ->
                          fun () ->
                            {
                              name;
                              image;
                              imagePullPolicy;
                              command;
                              args;
                              env;
                              resources;
                              exitCode;
                              reason;
                              volumeMounts;
                              securityContext
                            }
    let to_value x =
      structure_to_value
        [("name", (Option.map x.name ~f:String_.to_value));
        ("image", (Option.map x.image ~f:String_.to_value));
        ("imagePullPolicy",
          (Option.map x.imagePullPolicy ~f:String_.to_value));
        ("command", (Option.map x.command ~f:StringList.to_value));
        ("args", (Option.map x.args ~f:StringList.to_value));
        ("env",
          (Option.map x.env ~f:EksContainerEnvironmentVariables.to_value));
        ("resources",
          (Option.map x.resources
             ~f:EksContainerResourceRequirements.to_value));
        ("exitCode", (Option.map x.exitCode ~f:Integer.to_value));
        ("reason", (Option.map x.reason ~f:String_.to_value));
        ("volumeMounts",
          (Option.map x.volumeMounts ~f:EksContainerVolumeMounts.to_value));
        ("securityContext",
          (Option.map x.securityContext
             ~f:EksContainerSecurityContext.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let securityContext =
        (Option.map ~f:EksContainerSecurityContext.of_xml)
          (Xml.child xml_arg0 "securityContext") in
      let volumeMounts =
        (Option.map ~f:EksContainerVolumeMounts.of_xml)
          (Xml.child xml_arg0 "volumeMounts") in
      let reason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "reason") in
      let exitCode =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "exitCode") in
      let resources =
        (Option.map ~f:EksContainerResourceRequirements.of_xml)
          (Xml.child xml_arg0 "resources") in
      let env =
        (Option.map ~f:EksContainerEnvironmentVariables.of_xml)
          (Xml.child xml_arg0 "env") in
      let args =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "args") in
      let command =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "command") in
      let imagePullPolicy =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "imagePullPolicy") in
      let image = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "image") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      make ?securityContext ?volumeMounts ?reason ?exitCode ?resources ?env
        ?args ?command ?imagePullPolicy ?image ?name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let securityContext =
        field_map json__ "securityContext"
          EksContainerSecurityContext.of_json in
      let volumeMounts =
        field_map json__ "volumeMounts" EksContainerVolumeMounts.of_json in
      let reason = field_map json__ "reason" String_.of_json in
      let exitCode = field_map json__ "exitCode" Integer.of_json in
      let resources =
        field_map json__ "resources" EksContainerResourceRequirements.of_json in
      let env =
        field_map json__ "env" EksContainerEnvironmentVariables.of_json in
      let args = field_map json__ "args" StringList.of_json in
      let command = field_map json__ "command" StringList.of_json in
      let imagePullPolicy =
        field_map json__ "imagePullPolicy" String_.of_json in
      let image = field_map json__ "image" String_.of_json in
      let name = field_map json__ "name" String_.of_json in
      make ?securityContext ?volumeMounts ?reason ?exitCode ?resources ?env
        ?args ?command ?imagePullPolicy ?image ?name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The details for container properties that are returned by DescribeJobs for jobs that use Amazon EKS."]
module ConsumableResourceProperties =
  struct
    type nonrec t =
      {
      consumableResourceList: ConsumableResourceList.t option
        [@ocaml.doc "The list of consumable resources required by a job."]}
    let make ?consumableResourceList = fun () -> { consumableResourceList }
    let to_value x =
      structure_to_value
        [("consumableResourceList",
           (Option.map x.consumableResourceList
              ~f:ConsumableResourceList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let consumableResourceList =
        (Option.map ~f:ConsumableResourceList.of_xml)
          (Xml.child xml_arg0 "consumableResourceList") in
      make ?consumableResourceList ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let consumableResourceList =
        field_map json__ "consumableResourceList"
          ConsumableResourceList.of_json in
      make ?consumableResourceList ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Contains a list of consumable resources required by a job."]
module ContainerProperties =
  struct
    type nonrec t =
      {
      image: String_.t option
        [@ocaml.doc
          "Required. The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with repository-url/image:tag . It can be 255 characters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), underscores (_), colons (:), periods (.), forward slashes (/), and number signs (#). This parameter maps to Image in the Create a container section of the Docker Remote API and the IMAGE parameter of docker run. Docker image architecture must match the processor architecture of the compute resources that they're scheduled on. For example, ARM-based Docker images can only run on ARM-based compute resources. Images in Amazon ECR Public repositories use the full registry/repository\\[:tag\\] or registry/repository\\[\\@digest\\] naming conventions. For example, public.ecr.aws/registry_alias/my-web-app:latest . Images in Amazon ECR repositories use the full registry and repository URI (for example, 123456789012.dkr.ecr.<region-name>.amazonaws.com/<repository-name>). Images in official repositories on Docker Hub use a single name (for example, ubuntu or mongo). Images in other repositories on Docker Hub are qualified with an organization name (for example, amazon/amazon-ecs-agent). Images in other online repositories are qualified further by a domain name (for example, quay.io/assemblyline/ubuntu)."];
      vcpus: Integer.t option
        [@ocaml.doc
          "This parameter is deprecated, use resourceRequirements to specify the vCPU requirements for the job definition. It's not supported for jobs running on Fargate resources. For jobs running on Amazon EC2 resources, it specifies the number of vCPUs reserved for the job. Each vCPU is equivalent to 1,024 CPU shares. This parameter maps to CpuShares in the Create a container section of the Docker Remote API and the --cpu-shares option to docker run. The number of vCPUs must be specified but can be specified in several places. You must specify it at least once for each node."];
      memory: Integer.t option
        [@ocaml.doc
          "This parameter is deprecated, use resourceRequirements to specify the memory requirements for the job definition. It's not supported for jobs running on Fargate resources. For jobs that run on Amazon EC2 resources, it specifies the memory hard limit (in MiB) for a container. If your container attempts to exceed the specified number, it's terminated. You must specify at least 4 MiB of memory for a job using this parameter. The memory hard limit can be specified in several places. It must be specified for each node at least once."];
      command: StringList.t option
        [@ocaml.doc
          "The command that's passed to the container. This parameter maps to Cmd in the Create a container section of the Docker Remote API and the COMMAND parameter to docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd."];
      jobRoleArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the IAM role that the container can assume for Amazon Web Services permissions. For more information, see IAM roles for tasks in the Amazon Elastic Container Service Developer Guide."];
      executionRoleArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the execution role that Batch can assume. For jobs that run on Fargate resources, you must provide an execution role. For more information, see Batch execution IAM role in the Batch User Guide."];
      volumes: Volumes.t option
        [@ocaml.doc "A list of data volumes used in a job."];
      environment: EnvironmentVariables.t option
        [@ocaml.doc
          "The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the Docker Remote API and the --env option to docker run. We don't recommend using plaintext environment variables for sensitive information, such as credential data. Environment variables cannot start with \"AWS_BATCH\". This naming convention is reserved for variables that Batch sets."];
      mountPoints: MountPoints.t option
        [@ocaml.doc
          "The mount points for data volumes in your container. This parameter maps to Volumes in the Create a container section of the Docker Remote API and the --volume option to docker run."];
      readonlyRootFilesystem: Boolean.t option
        [@ocaml.doc
          "When this parameter is true, the container is given read-only access to its root file system. This parameter maps to ReadonlyRootfs in the Create a container section of the Docker Remote API and the --read-only option to docker run."];
      privileged: Boolean.t option
        [@ocaml.doc
          "When this parameter is true, the container is given elevated permissions on the host container instance (similar to the root user). This parameter maps to Privileged in the Create a container section of the Docker Remote API and the --privileged option to docker run. The default value is false. This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, or specified as false."];
      ulimits: Ulimits.t option
        [@ocaml.doc
          "A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a container section of the Docker Remote API and the --ulimit option to docker run. This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided."];
      user: String_.t option
        [@ocaml.doc
          "The user name to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run."];
      instanceType: String_.t option
        [@ocaml.doc
          "The instance type to use for a multi-node parallel job. All node groups in a multi-node parallel job must use the same instance type. This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and shouldn't be provided."];
      resourceRequirements: ResourceRequirements.t option
        [@ocaml.doc
          "The type and amount of resources to assign to a container. The supported resources include GPU, MEMORY, and VCPU."];
      linuxParameters: LinuxParameters.t option
        [@ocaml.doc
          "Linux-specific modifications that are applied to the container, such as details for device mappings."];
      logConfiguration: LogConfiguration.t option
        [@ocaml.doc
          "The log configuration specification for the container. This parameter maps to LogConfig in the Create a container section of the Docker Remote API and the --log-driver option to docker run. By default, containers use the same logging driver that the Docker daemon uses. However the container might use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information on the options for different supported log drivers, see Configure logging drivers in the Docker documentation. Batch currently supports a subset of the logging drivers available to the Docker daemon (shown in the LogConfiguration data type). This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version | grep \"Server API version\" The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before containers placed on that instance can use these log configuration options. For more information, see Amazon ECS container agent configuration in the Amazon Elastic Container Service Developer Guide."];
      secrets: SecretList.t option
        [@ocaml.doc
          "The secrets for the container. For more information, see Specifying sensitive data in the Batch User Guide."];
      networkConfiguration: NetworkConfiguration.t option
        [@ocaml.doc
          "The network configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon EC2 resources must not specify this parameter."];
      fargatePlatformConfiguration: FargatePlatformConfiguration.t option
        [@ocaml.doc
          "The platform configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon EC2 resources must not specify this parameter."];
      enableExecuteCommand: Boolean.t option
        [@ocaml.doc
          "Determines whether execute command functionality is turned on for this task. If true, execute command functionality is turned on all the containers in the task."];
      ephemeralStorage: EphemeralStorage.t option
        [@ocaml.doc
          "The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate."];
      runtimePlatform: RuntimePlatform.t option
        [@ocaml.doc
          "An object that represents the compute environment architecture for Batch jobs on Fargate."];
      repositoryCredentials: RepositoryCredentials.t option
        [@ocaml.doc
          "The private repository authentication credentials to use."]}
    let make ?image =
      fun ?vcpus ->
        fun ?memory ->
          fun ?command ->
            fun ?jobRoleArn ->
              fun ?executionRoleArn ->
                fun ?volumes ->
                  fun ?environment ->
                    fun ?mountPoints ->
                      fun ?readonlyRootFilesystem ->
                        fun ?privileged ->
                          fun ?ulimits ->
                            fun ?user ->
                              fun ?instanceType ->
                                fun ?resourceRequirements ->
                                  fun ?linuxParameters ->
                                    fun ?logConfiguration ->
                                      fun ?secrets ->
                                        fun ?networkConfiguration ->
                                          fun ?fargatePlatformConfiguration
                                            ->
                                            fun ?enableExecuteCommand ->
                                              fun ?ephemeralStorage ->
                                                fun ?runtimePlatform ->
                                                  fun ?repositoryCredentials
                                                    ->
                                                    fun () ->
                                                      {
                                                        image;
                                                        vcpus;
                                                        memory;
                                                        command;
                                                        jobRoleArn;
                                                        executionRoleArn;
                                                        volumes;
                                                        environment;
                                                        mountPoints;
                                                        readonlyRootFilesystem;
                                                        privileged;
                                                        ulimits;
                                                        user;
                                                        instanceType;
                                                        resourceRequirements;
                                                        linuxParameters;
                                                        logConfiguration;
                                                        secrets;
                                                        networkConfiguration;
                                                        fargatePlatformConfiguration;
                                                        enableExecuteCommand;
                                                        ephemeralStorage;
                                                        runtimePlatform;
                                                        repositoryCredentials
                                                      }
    let to_value x =
      structure_to_value
        [("image", (Option.map x.image ~f:String_.to_value));
        ("vcpus", (Option.map x.vcpus ~f:Integer.to_value));
        ("memory", (Option.map x.memory ~f:Integer.to_value));
        ("command", (Option.map x.command ~f:StringList.to_value));
        ("jobRoleArn", (Option.map x.jobRoleArn ~f:String_.to_value));
        ("executionRoleArn",
          (Option.map x.executionRoleArn ~f:String_.to_value));
        ("volumes", (Option.map x.volumes ~f:Volumes.to_value));
        ("environment",
          (Option.map x.environment ~f:EnvironmentVariables.to_value));
        ("mountPoints", (Option.map x.mountPoints ~f:MountPoints.to_value));
        ("readonlyRootFilesystem",
          (Option.map x.readonlyRootFilesystem ~f:Boolean.to_value));
        ("privileged", (Option.map x.privileged ~f:Boolean.to_value));
        ("ulimits", (Option.map x.ulimits ~f:Ulimits.to_value));
        ("user", (Option.map x.user ~f:String_.to_value));
        ("instanceType", (Option.map x.instanceType ~f:String_.to_value));
        ("resourceRequirements",
          (Option.map x.resourceRequirements ~f:ResourceRequirements.to_value));
        ("linuxParameters",
          (Option.map x.linuxParameters ~f:LinuxParameters.to_value));
        ("logConfiguration",
          (Option.map x.logConfiguration ~f:LogConfiguration.to_value));
        ("secrets", (Option.map x.secrets ~f:SecretList.to_value));
        ("networkConfiguration",
          (Option.map x.networkConfiguration ~f:NetworkConfiguration.to_value));
        ("fargatePlatformConfiguration",
          (Option.map x.fargatePlatformConfiguration
             ~f:FargatePlatformConfiguration.to_value));
        ("enableExecuteCommand",
          (Option.map x.enableExecuteCommand ~f:Boolean.to_value));
        ("ephemeralStorage",
          (Option.map x.ephemeralStorage ~f:EphemeralStorage.to_value));
        ("runtimePlatform",
          (Option.map x.runtimePlatform ~f:RuntimePlatform.to_value));
        ("repositoryCredentials",
          (Option.map x.repositoryCredentials
             ~f:RepositoryCredentials.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let repositoryCredentials =
        (Option.map ~f:RepositoryCredentials.of_xml)
          (Xml.child xml_arg0 "repositoryCredentials") in
      let runtimePlatform =
        (Option.map ~f:RuntimePlatform.of_xml)
          (Xml.child xml_arg0 "runtimePlatform") in
      let ephemeralStorage =
        (Option.map ~f:EphemeralStorage.of_xml)
          (Xml.child xml_arg0 "ephemeralStorage") in
      let enableExecuteCommand =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "enableExecuteCommand") in
      let fargatePlatformConfiguration =
        (Option.map ~f:FargatePlatformConfiguration.of_xml)
          (Xml.child xml_arg0 "fargatePlatformConfiguration") in
      let networkConfiguration =
        (Option.map ~f:NetworkConfiguration.of_xml)
          (Xml.child xml_arg0 "networkConfiguration") in
      let secrets =
        (Option.map ~f:SecretList.of_xml) (Xml.child xml_arg0 "secrets") in
      let logConfiguration =
        (Option.map ~f:LogConfiguration.of_xml)
          (Xml.child xml_arg0 "logConfiguration") in
      let linuxParameters =
        (Option.map ~f:LinuxParameters.of_xml)
          (Xml.child xml_arg0 "linuxParameters") in
      let resourceRequirements =
        (Option.map ~f:ResourceRequirements.of_xml)
          (Xml.child xml_arg0 "resourceRequirements") in
      let instanceType =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "instanceType") in
      let user = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "user") in
      let ulimits =
        (Option.map ~f:Ulimits.of_xml) (Xml.child xml_arg0 "ulimits") in
      let privileged =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "privileged") in
      let readonlyRootFilesystem =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "readonlyRootFilesystem") in
      let mountPoints =
        (Option.map ~f:MountPoints.of_xml) (Xml.child xml_arg0 "mountPoints") in
      let environment =
        (Option.map ~f:EnvironmentVariables.of_xml)
          (Xml.child xml_arg0 "environment") in
      let volumes =
        (Option.map ~f:Volumes.of_xml) (Xml.child xml_arg0 "volumes") in
      let executionRoleArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "executionRoleArn") in
      let jobRoleArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobRoleArn") in
      let command =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "command") in
      let memory =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "memory") in
      let vcpus = (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "vcpus") in
      let image = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "image") in
      make ?repositoryCredentials ?runtimePlatform ?ephemeralStorage
        ?enableExecuteCommand ?fargatePlatformConfiguration
        ?networkConfiguration ?secrets ?logConfiguration ?linuxParameters
        ?resourceRequirements ?instanceType ?user ?ulimits ?privileged
        ?readonlyRootFilesystem ?mountPoints ?environment ?volumes
        ?executionRoleArn ?jobRoleArn ?command ?memory ?vcpus ?image ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let repositoryCredentials =
        field_map json__ "repositoryCredentials"
          RepositoryCredentials.of_json in
      let runtimePlatform =
        field_map json__ "runtimePlatform" RuntimePlatform.of_json in
      let ephemeralStorage =
        field_map json__ "ephemeralStorage" EphemeralStorage.of_json in
      let enableExecuteCommand =
        field_map json__ "enableExecuteCommand" Boolean.of_json in
      let fargatePlatformConfiguration =
        field_map json__ "fargatePlatformConfiguration"
          FargatePlatformConfiguration.of_json in
      let networkConfiguration =
        field_map json__ "networkConfiguration" NetworkConfiguration.of_json in
      let secrets = field_map json__ "secrets" SecretList.of_json in
      let logConfiguration =
        field_map json__ "logConfiguration" LogConfiguration.of_json in
      let linuxParameters =
        field_map json__ "linuxParameters" LinuxParameters.of_json in
      let resourceRequirements =
        field_map json__ "resourceRequirements" ResourceRequirements.of_json in
      let instanceType = field_map json__ "instanceType" String_.of_json in
      let user = field_map json__ "user" String_.of_json in
      let ulimits = field_map json__ "ulimits" Ulimits.of_json in
      let privileged = field_map json__ "privileged" Boolean.of_json in
      let readonlyRootFilesystem =
        field_map json__ "readonlyRootFilesystem" Boolean.of_json in
      let mountPoints = field_map json__ "mountPoints" MountPoints.of_json in
      let environment =
        field_map json__ "environment" EnvironmentVariables.of_json in
      let volumes = field_map json__ "volumes" Volumes.of_json in
      let executionRoleArn =
        field_map json__ "executionRoleArn" String_.of_json in
      let jobRoleArn = field_map json__ "jobRoleArn" String_.of_json in
      let command = field_map json__ "command" StringList.of_json in
      let memory = field_map json__ "memory" Integer.of_json in
      let vcpus = field_map json__ "vcpus" Integer.of_json in
      let image = field_map json__ "image" String_.of_json in
      make ?repositoryCredentials ?runtimePlatform ?ephemeralStorage
        ?enableExecuteCommand ?fargatePlatformConfiguration
        ?networkConfiguration ?secrets ?logConfiguration ?linuxParameters
        ?resourceRequirements ?instanceType ?user ?ulimits ?privileged
        ?readonlyRootFilesystem ?mountPoints ?environment ?volumes
        ?executionRoleArn ?jobRoleArn ?command ?memory ?vcpus ?image ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Container properties are used for Amazon ECS based job definitions. These properties to describe the container that's launched as part of a job."]
module EcsProperties =
  struct
    type nonrec t =
      {
      taskProperties: ListEcsTaskProperties.t
        [@ocaml.doc
          "An object that contains the properties for the Amazon ECS task definition of a job. This object is currently limited to one task element. However, the task element can run up to 10 containers."]}
    let context_ = "EcsProperties"
    let make ~taskProperties = fun () -> { taskProperties }
    let to_value x =
      structure_to_value
        [("taskProperties",
           (Some (ListEcsTaskProperties.to_value x.taskProperties)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let taskProperties =
        ListEcsTaskProperties.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "taskProperties") in
      make ~taskProperties ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let taskProperties =
        field_map_exn json__ "taskProperties" ListEcsTaskProperties.of_json in
      make ~taskProperties ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that contains the properties for the Amazon ECS resources of a job."]
module EksProperties =
  struct
    type nonrec t =
      {
      podProperties: EksPodProperties.t option
        [@ocaml.doc
          "The properties for the Kubernetes pod resources of a job."]}
    let make ?podProperties = fun () -> { podProperties }
    let to_value x =
      structure_to_value
        [("podProperties",
           (Option.map x.podProperties ~f:EksPodProperties.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let podProperties =
        (Option.map ~f:EksPodProperties.of_xml)
          (Xml.child xml_arg0 "podProperties") in
      make ?podProperties ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let podProperties =
        field_map json__ "podProperties" EksPodProperties.of_json in
      make ?podProperties ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that contains the properties for the Kubernetes resources of a job."]
module RetryAction =
  struct
    type nonrec t =
      | RETRY 
      | EXIT 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function | RETRY -> "RETRY" | EXIT -> "EXIT" | Non_static_id s -> s
    let of_string =
      function | "RETRY" -> RETRY | "EXIT" -> EXIT | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration RetryAction" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"RetryAction" j)
    let to_json = simple_to_json to_value
  end
module ImageIdOverride =
  struct
    type nonrec t = string
    let context_ = "ImageIdOverride"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:256) >>=
             (fun () -> check_string_min i ~min:1));
        i
    let of_string x = x
    let to_value x = `String x
    let to_query v = to_query to_value v
    let to_header x = x
    let of_xml = Xml.string_data_exn ~context:context_
    let of_json j = string_of_json ~kind:"ImageIdOverride" j
    let to_json = simple_to_json to_value
  end
module ImageType =
  struct
    type nonrec t = string
    let context_ = "ImageType"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:256) >>=
             (fun () -> check_string_min i ~min:1));
        i
    let of_string x = x
    let to_value x = `String x
    let to_query v = to_query to_value v
    let to_header x = x
    let of_xml = Xml.string_data_exn ~context:context_
    let of_json j = string_of_json ~kind:"ImageType" j
    let to_json = simple_to_json to_value
  end
module KubernetesVersion =
  struct
    type nonrec t = string
    let context_ = "KubernetesVersion"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:256) >>=
             (fun () -> check_string_min i ~min:1));
        i
    let of_string x = x
    let to_value x = `String x
    let to_query v = to_query to_value v
    let to_header x = x
    let of_xml = Xml.string_data_exn ~context:context_
    let of_json j = string_of_json ~kind:"KubernetesVersion" j
    let to_json = simple_to_json to_value
  end
module LaunchTemplateSpecificationOverride =
  struct
    type nonrec t =
      {
      launchTemplateId: String_.t option
        [@ocaml.doc
          "The ID of the launch template. Note: If you specify the launchTemplateId you can't specify the launchTemplateName as well."];
      launchTemplateName: String_.t option
        [@ocaml.doc
          "The name of the launch template. Note: If you specify the launchTemplateName you can't specify the launchTemplateId as well."];
      version: String_.t option
        [@ocaml.doc
          "The version number of the launch template, $Default, or $Latest. If the value is $Default, the default version of the launch template is used. If the value is $Latest, the latest version of the launch template is used. If the AMI ID that's used in a compute environment is from the launch template, the AMI isn't changed when the compute environment is updated. It's only changed if the updateToLatestImageVersion parameter for the compute environment is set to true. During an infrastructure update, if either $Default or $Latest is specified, Batch re-evaluates the launch template version, and it might use a different version of the launch template. This is the case even if the launch template isn't specified in the update. When updating a compute environment, changing the launch template requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide. Default: $Default Latest: $Latest"];
      targetInstanceTypes: StringList.t option
        [@ocaml.doc
          "The instance type or family that this override launch template should be applied to. This parameter is required when defining a launch template override. Information included in this parameter must meet the following requirements: Must be a valid Amazon EC2 instance type or family. The following Batch InstanceTypes are not allowed: optimal, default_x86_64, and default_arm64. targetInstanceTypes can target only instance types and families that are included within the ComputeResource.instanceTypes set. targetInstanceTypes doesn't need to include all of the instances from the instanceType set, but at least a subset. For example, if ComputeResource.instanceTypes includes \\[m5, g5\\], targetInstanceTypes can include \\[m5.2xlarge\\] and \\[m5.large\\] but not \\[c5.large\\]. targetInstanceTypes included within the same launch template override or across launch template overrides can't overlap for the same compute environment. For example, you can't define one launch template override to target an instance family and another define an instance type within this same family."];
      userdataType: UserdataType.t option
        [@ocaml.doc
          "The EKS node initialization process to use. You only need to specify this value if you are using a custom AMI. The default value is EKS_BOOTSTRAP_SH. If imageType is a custom AMI based on EKS_AL2023 or EKS_AL2023_NVIDIA then you must choose EKS_NODEADM."]}
    let make ?launchTemplateId =
      fun ?launchTemplateName ->
        fun ?version ->
          fun ?targetInstanceTypes ->
            fun ?userdataType ->
              fun () ->
                {
                  launchTemplateId;
                  launchTemplateName;
                  version;
                  targetInstanceTypes;
                  userdataType
                }
    let to_value x =
      structure_to_value
        [("launchTemplateId",
           (Option.map x.launchTemplateId ~f:String_.to_value));
        ("launchTemplateName",
          (Option.map x.launchTemplateName ~f:String_.to_value));
        ("version", (Option.map x.version ~f:String_.to_value));
        ("targetInstanceTypes",
          (Option.map x.targetInstanceTypes ~f:StringList.to_value));
        ("userdataType",
          (Option.map x.userdataType ~f:UserdataType.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let userdataType =
        (Option.map ~f:UserdataType.of_xml)
          (Xml.child xml_arg0 "userdataType") in
      let targetInstanceTypes =
        (Option.map ~f:StringList.of_xml)
          (Xml.child xml_arg0 "targetInstanceTypes") in
      let version =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "version") in
      let launchTemplateName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "launchTemplateName") in
      let launchTemplateId =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "launchTemplateId") in
      make ?userdataType ?targetInstanceTypes ?version ?launchTemplateName
        ?launchTemplateId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let userdataType = field_map json__ "userdataType" UserdataType.of_json in
      let targetInstanceTypes =
        field_map json__ "targetInstanceTypes" StringList.of_json in
      let version = field_map json__ "version" String_.of_json in
      let launchTemplateName =
        field_map json__ "launchTemplateName" String_.of_json in
      let launchTemplateId =
        field_map json__ "launchTemplateId" String_.of_json in
      make ?userdataType ?targetInstanceTypes ?version ?launchTemplateName
        ?launchTemplateId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents a launch template to use in place of the default launch template. You must specify either the launch template ID or launch template name in the request, but not both. If security groups are specified using both the securityGroupIds parameter of CreateComputeEnvironment and the launch template, the values in the securityGroupIds parameter of CreateComputeEnvironment will be used. You can define up to ten (10) overrides for each compute environment. This object isn't applicable to jobs that are running on Fargate resources. To unset all override templates for a compute environment, you can pass an empty array to the UpdateComputeEnvironment.overrides parameter, or not include the overrides parameter when submitting the UpdateComputeEnvironment API operation."]
module ListTaskPropertiesOverride =
  struct
    type nonrec t = TaskPropertiesOverride.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:TaskPropertiesOverride.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:TaskPropertiesOverride.of_xml)
    let of_json j =
      list_of_json ~kind:"ListTaskPropertiesOverride"
        ~of_json:TaskPropertiesOverride.of_json j
    let to_json v = composed_to_json to_value v
  end
module EksPodPropertiesOverride =
  struct
    type nonrec t =
      {
      containers: EksContainerOverrideList.t option
        [@ocaml.doc
          "The overrides for the container that's used on the Amazon EKS pod."];
      initContainers: EksContainerOverrideList.t option
        [@ocaml.doc
          "The overrides for the initContainers defined in the Amazon EKS pod. These containers run before application containers, always run to completion, and must complete successfully before the next container starts. These containers are registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store. For more information, see Init Containers in the Kubernetes documentation."];
      metadata: EksMetadata.t option
        [@ocaml.doc
          "Metadata about the overrides for the container that's used on the Amazon EKS pod."]}
    let make ?containers =
      fun ?initContainers ->
        fun ?metadata -> fun () -> { containers; initContainers; metadata }
    let to_value x =
      structure_to_value
        [("containers",
           (Option.map x.containers ~f:EksContainerOverrideList.to_value));
        ("initContainers",
          (Option.map x.initContainers ~f:EksContainerOverrideList.to_value));
        ("metadata", (Option.map x.metadata ~f:EksMetadata.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let metadata =
        (Option.map ~f:EksMetadata.of_xml) (Xml.child xml_arg0 "metadata") in
      let initContainers =
        (Option.map ~f:EksContainerOverrideList.of_xml)
          (Xml.child xml_arg0 "initContainers") in
      let containers =
        (Option.map ~f:EksContainerOverrideList.of_xml)
          (Xml.child xml_arg0 "containers") in
      make ?metadata ?initContainers ?containers ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let metadata = field_map json__ "metadata" EksMetadata.of_json in
      let initContainers =
        field_map json__ "initContainers" EksContainerOverrideList.of_json in
      let containers =
        field_map json__ "containers" EksContainerOverrideList.of_json in
      make ?metadata ?initContainers ?containers ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that contains overrides for the Kubernetes pod properties of a job."]
module ServiceResourceIdName =
  struct
    type nonrec t =
      | TrainingJobArn 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function | TrainingJobArn -> "TrainingJobArn" | Non_static_id s -> s
    let of_string =
      function | "TrainingJobArn" -> TrainingJobArn | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration ServiceResourceIdName" xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"ServiceResourceIdName" j)
    let to_json = simple_to_json to_value
  end
module FairshareCapacityUsageList =
  struct
    type nonrec t = FairshareCapacityUsage.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:FairshareCapacityUsage.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:FairshareCapacityUsage.of_xml)
    let of_json j =
      list_of_json ~kind:"FairshareCapacityUsageList"
        ~of_json:FairshareCapacityUsage.of_json j
    let to_json v = composed_to_json to_value v
  end
module QuotaShareCapacityUsageList =
  struct
    type nonrec t = QuotaShareCapacityUsage.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:QuotaShareCapacityUsage.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:QuotaShareCapacityUsage.of_xml)
    let of_json j =
      list_of_json ~kind:"QuotaShareCapacityUsageList"
        ~of_json:QuotaShareCapacityUsage.of_json j
    let to_json v = composed_to_json to_value v
  end
module ShareAttributes =
  struct
    type nonrec t =
      {
      shareIdentifier: String_.t
        [@ocaml.doc
          "A share identifier or share identifier prefix. If the string ends with an asterisk (*), this entry specifies the weight factor to use for share identifiers that start with that prefix. The list of share identifiers in a fair-share policy can't overlap. For example, you can't have one that specifies a shareIdentifier of UserA* and another that specifies a shareIdentifier of UserA1. There can be no more than 500 share identifiers active in a job queue. The string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*)."];
      weightFactor: Float_.t option
        [@ocaml.doc
          "The weight factor for the share identifier. The default value is 1.0. A lower value has a higher priority for compute resources. For example, jobs that use a share identifier with a weight factor of 0.125 (1/8) get 8 times the compute resources of jobs that use a share identifier with a weight factor of 1. The smallest supported value is 0.0001, and the largest supported value is 999.9999."]}
    let context_ = "ShareAttributes"
    let make ?weightFactor =
      fun ~shareIdentifier -> fun () -> { weightFactor; shareIdentifier }
    let to_value x =
      structure_to_value
        [("shareIdentifier", (Some (String_.to_value x.shareIdentifier)));
        ("weightFactor", (Option.map x.weightFactor ~f:Float_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let weightFactor =
        (Option.map ~f:Float_.of_xml) (Xml.child xml_arg0 "weightFactor") in
      let shareIdentifier =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "shareIdentifier") in
      make ?weightFactor ~shareIdentifier ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let weightFactor = field_map json__ "weightFactor" Float_.of_json in
      let shareIdentifier =
        field_map_exn json__ "shareIdentifier" String_.of_json in
      make ?weightFactor ~shareIdentifier ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Specifies the weights for the share identifiers for the fair-share policy. Share identifiers that aren't included have a default weight of 1.0."]
module AttemptContainerDetail =
  struct
    type nonrec t =
      {
      containerInstanceArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the Amazon ECS container instance that hosts the job attempt."];
      taskArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with the job attempt. Each container attempt receives a task ARN when they reach the STARTING status."];
      exitCode: Integer.t option
        [@ocaml.doc
          "The exit code for the job attempt. A non-zero exit code is considered failed."];
      reason: String_.t option
        [@ocaml.doc
          "A short (255 max characters) human-readable string to provide additional details for a running or stopped container."];
      logStreamName: String_.t option
        [@ocaml.doc
          "The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch jobs is /aws/batch/job. Each container attempt receives a log stream name when they reach the RUNNING status."];
      networkInterfaces: NetworkInterfaceList.t option
        [@ocaml.doc
          "The network interfaces that are associated with the job attempt."]}
    let make ?containerInstanceArn =
      fun ?taskArn ->
        fun ?exitCode ->
          fun ?reason ->
            fun ?logStreamName ->
              fun ?networkInterfaces ->
                fun () ->
                  {
                    containerInstanceArn;
                    taskArn;
                    exitCode;
                    reason;
                    logStreamName;
                    networkInterfaces
                  }
    let to_value x =
      structure_to_value
        [("containerInstanceArn",
           (Option.map x.containerInstanceArn ~f:String_.to_value));
        ("taskArn", (Option.map x.taskArn ~f:String_.to_value));
        ("exitCode", (Option.map x.exitCode ~f:Integer.to_value));
        ("reason", (Option.map x.reason ~f:String_.to_value));
        ("logStreamName", (Option.map x.logStreamName ~f:String_.to_value));
        ("networkInterfaces",
          (Option.map x.networkInterfaces ~f:NetworkInterfaceList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let networkInterfaces =
        (Option.map ~f:NetworkInterfaceList.of_xml)
          (Xml.child xml_arg0 "networkInterfaces") in
      let logStreamName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "logStreamName") in
      let reason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "reason") in
      let exitCode =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "exitCode") in
      let taskArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "taskArn") in
      let containerInstanceArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "containerInstanceArn") in
      make ?networkInterfaces ?logStreamName ?reason ?exitCode ?taskArn
        ?containerInstanceArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let networkInterfaces =
        field_map json__ "networkInterfaces" NetworkInterfaceList.of_json in
      let logStreamName = field_map json__ "logStreamName" String_.of_json in
      let reason = field_map json__ "reason" String_.of_json in
      let exitCode = field_map json__ "exitCode" Integer.of_json in
      let taskArn = field_map json__ "taskArn" String_.of_json in
      let containerInstanceArn =
        field_map json__ "containerInstanceArn" String_.of_json in
      make ?networkInterfaces ?logStreamName ?reason ?exitCode ?taskArn
        ?containerInstanceArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the details of a container that's part of a job attempt."]
module ListAttemptEcsTaskDetails =
  struct
    type nonrec t = AttemptEcsTaskDetails.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:AttemptEcsTaskDetails.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:AttemptEcsTaskDetails.of_xml)
    let of_json j =
      list_of_json ~kind:"ListAttemptEcsTaskDetails"
        ~of_json:AttemptEcsTaskDetails.of_json j
    let to_json v = composed_to_json to_value v
  end
module EcsTaskDetails =
  struct
    type nonrec t =
      {
      containers: ListTaskContainerDetails.t option
        [@ocaml.doc
          "A list of containers that are included in the taskProperties list."];
      containerInstanceArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the container instance that hosts the task."];
      taskArn: String_.t option
        [@ocaml.doc "The ARN of the Amazon ECS task."];
      ephemeralStorage: EphemeralStorage.t option
        [@ocaml.doc
          "The amount of ephemeral storage allocated for the task."];
      executionRoleArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the execution role that Batch can assume. For more information, see Batch execution IAM role in the Batch User Guide."];
      platformVersion: String_.t option
        [@ocaml.doc
          "The Fargate platform version where the jobs are running."];
      ipcMode: String_.t option
        [@ocaml.doc
          "The IPC resource namespace to use for the containers in the task. The valid values are host, task, or none. For more information see ipcMode in EcsTaskProperties."];
      taskRoleArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the IAM role that the container can assume for Amazon Web Services permissions. For more information, see IAM roles for tasks in the Amazon Elastic Container Service Developer Guide. This is object is comparable to ContainerProperties:jobRoleArn."];
      pidMode: String_.t option
        [@ocaml.doc
          "The process namespace to use for the containers in the task. The valid values are host, or task. For more information see pidMode in EcsTaskProperties."];
      networkConfiguration: NetworkConfiguration.t option
        [@ocaml.doc
          "The network configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon EC2 resources must not specify this parameter."];
      runtimePlatform: RuntimePlatform.t option
        [@ocaml.doc
          "An object that represents the compute environment architecture for Batch jobs on Fargate."];
      volumes: Volumes.t option
        [@ocaml.doc "A list of data volumes used in a job."];
      enableExecuteCommand: Boolean.t option
        [@ocaml.doc
          "Determines whether execute command functionality is turned on for this task. If true, execute command functionality is turned on all the containers in the task."]}
    let make ?containers =
      fun ?containerInstanceArn ->
        fun ?taskArn ->
          fun ?ephemeralStorage ->
            fun ?executionRoleArn ->
              fun ?platformVersion ->
                fun ?ipcMode ->
                  fun ?taskRoleArn ->
                    fun ?pidMode ->
                      fun ?networkConfiguration ->
                        fun ?runtimePlatform ->
                          fun ?volumes ->
                            fun ?enableExecuteCommand ->
                              fun () ->
                                {
                                  containers;
                                  containerInstanceArn;
                                  taskArn;
                                  ephemeralStorage;
                                  executionRoleArn;
                                  platformVersion;
                                  ipcMode;
                                  taskRoleArn;
                                  pidMode;
                                  networkConfiguration;
                                  runtimePlatform;
                                  volumes;
                                  enableExecuteCommand
                                }
    let to_value x =
      structure_to_value
        [("containers",
           (Option.map x.containers ~f:ListTaskContainerDetails.to_value));
        ("containerInstanceArn",
          (Option.map x.containerInstanceArn ~f:String_.to_value));
        ("taskArn", (Option.map x.taskArn ~f:String_.to_value));
        ("ephemeralStorage",
          (Option.map x.ephemeralStorage ~f:EphemeralStorage.to_value));
        ("executionRoleArn",
          (Option.map x.executionRoleArn ~f:String_.to_value));
        ("platformVersion",
          (Option.map x.platformVersion ~f:String_.to_value));
        ("ipcMode", (Option.map x.ipcMode ~f:String_.to_value));
        ("taskRoleArn", (Option.map x.taskRoleArn ~f:String_.to_value));
        ("pidMode", (Option.map x.pidMode ~f:String_.to_value));
        ("networkConfiguration",
          (Option.map x.networkConfiguration ~f:NetworkConfiguration.to_value));
        ("runtimePlatform",
          (Option.map x.runtimePlatform ~f:RuntimePlatform.to_value));
        ("volumes", (Option.map x.volumes ~f:Volumes.to_value));
        ("enableExecuteCommand",
          (Option.map x.enableExecuteCommand ~f:Boolean.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let enableExecuteCommand =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "enableExecuteCommand") in
      let volumes =
        (Option.map ~f:Volumes.of_xml) (Xml.child xml_arg0 "volumes") in
      let runtimePlatform =
        (Option.map ~f:RuntimePlatform.of_xml)
          (Xml.child xml_arg0 "runtimePlatform") in
      let networkConfiguration =
        (Option.map ~f:NetworkConfiguration.of_xml)
          (Xml.child xml_arg0 "networkConfiguration") in
      let pidMode =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "pidMode") in
      let taskRoleArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "taskRoleArn") in
      let ipcMode =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "ipcMode") in
      let platformVersion =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "platformVersion") in
      let executionRoleArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "executionRoleArn") in
      let ephemeralStorage =
        (Option.map ~f:EphemeralStorage.of_xml)
          (Xml.child xml_arg0 "ephemeralStorage") in
      let taskArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "taskArn") in
      let containerInstanceArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "containerInstanceArn") in
      let containers =
        (Option.map ~f:ListTaskContainerDetails.of_xml)
          (Xml.child xml_arg0 "containers") in
      make ?enableExecuteCommand ?volumes ?runtimePlatform
        ?networkConfiguration ?pidMode ?taskRoleArn ?ipcMode ?platformVersion
        ?executionRoleArn ?ephemeralStorage ?taskArn ?containerInstanceArn
        ?containers ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let enableExecuteCommand =
        field_map json__ "enableExecuteCommand" Boolean.of_json in
      let volumes = field_map json__ "volumes" Volumes.of_json in
      let runtimePlatform =
        field_map json__ "runtimePlatform" RuntimePlatform.of_json in
      let networkConfiguration =
        field_map json__ "networkConfiguration" NetworkConfiguration.of_json in
      let pidMode = field_map json__ "pidMode" String_.of_json in
      let taskRoleArn = field_map json__ "taskRoleArn" String_.of_json in
      let ipcMode = field_map json__ "ipcMode" String_.of_json in
      let platformVersion =
        field_map json__ "platformVersion" String_.of_json in
      let executionRoleArn =
        field_map json__ "executionRoleArn" String_.of_json in
      let ephemeralStorage =
        field_map json__ "ephemeralStorage" EphemeralStorage.of_json in
      let taskArn = field_map json__ "taskArn" String_.of_json in
      let containerInstanceArn =
        field_map json__ "containerInstanceArn" String_.of_json in
      let containers =
        field_map json__ "containers" ListTaskContainerDetails.of_json in
      make ?enableExecuteCommand ?volumes ?runtimePlatform
        ?networkConfiguration ?pidMode ?taskRoleArn ?ipcMode ?platformVersion
        ?executionRoleArn ?ephemeralStorage ?taskArn ?containerInstanceArn
        ?containers ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The details of a task definition that describes the container and volume definitions of an Amazon ECS task."]
module EksAttemptContainerDetails =
  struct
    type nonrec t = EksAttemptContainerDetail.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:EksAttemptContainerDetail.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:EksAttemptContainerDetail.of_xml)
    let of_json j =
      list_of_json ~kind:"EksAttemptContainerDetails"
        ~of_json:EksAttemptContainerDetail.of_json j
    let to_json v = composed_to_json to_value v
  end
module EksContainerDetails =
  struct
    type nonrec t = EksContainerDetail.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:EksContainerDetail.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:EksContainerDetail.of_xml)
    let of_json j =
      list_of_json ~kind:"EksContainerDetails"
        ~of_json:EksContainerDetail.of_json j
    let to_json v = composed_to_json to_value v
  end
module ArrayJobDependency =
  struct
    type nonrec t =
      | N_TO_N 
      | SEQUENTIAL 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | N_TO_N -> "N_TO_N"
      | SEQUENTIAL -> "SEQUENTIAL"
      | Non_static_id s -> s
    let of_string =
      function
      | "N_TO_N" -> N_TO_N
      | "SEQUENTIAL" -> SEQUENTIAL
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration ArrayJobDependency" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"ArrayJobDependency" j)
    let to_json = simple_to_json to_value
  end
module NodeRangeProperty =
  struct
    type nonrec t =
      {
      targetNodes: String_.t
        [@ocaml.doc
          "The range of nodes, using node index values. A range of 0:3 indicates nodes with index values of 0 through 3. If the starting range value is omitted (:n), then 0 is used to start the range. If the ending range value is omitted (n:), then the highest possible node index is used to end the range. Your accumulative node ranges must account for all nodes (0:n). You can nest node ranges (for example, 0:10 and 4:5). In this case, the 4:5 range properties override the 0:10 properties."];
      container: ContainerProperties.t option
        [@ocaml.doc "The container details for the node range."];
      instanceTypes: StringList.t option
        [@ocaml.doc
          "The instance types of the underlying host infrastructure of a multi-node parallel job. This parameter isn't applicable to jobs that are running on Fargate resources. In addition, this list object is currently limited to one element."];
      ecsProperties: EcsProperties.t option
        [@ocaml.doc
          "This is an object that represents the properties of the node range for a multi-node parallel job."];
      eksProperties: EksProperties.t option
        [@ocaml.doc
          "This is an object that represents the properties of the node range for a multi-node parallel job."];
      consumableResourceProperties: ConsumableResourceProperties.t option
        [@ocaml.doc
          "Contains a list of consumable resources required by a job."]}
    let context_ = "NodeRangeProperty"
    let make ?container =
      fun ?instanceTypes ->
        fun ?ecsProperties ->
          fun ?eksProperties ->
            fun ?consumableResourceProperties ->
              fun ~targetNodes ->
                fun () ->
                  {
                    container;
                    instanceTypes;
                    ecsProperties;
                    eksProperties;
                    consumableResourceProperties;
                    targetNodes
                  }
    let to_value x =
      structure_to_value
        [("targetNodes", (Some (String_.to_value x.targetNodes)));
        ("container",
          (Option.map x.container ~f:ContainerProperties.to_value));
        ("instanceTypes",
          (Option.map x.instanceTypes ~f:StringList.to_value));
        ("ecsProperties",
          (Option.map x.ecsProperties ~f:EcsProperties.to_value));
        ("eksProperties",
          (Option.map x.eksProperties ~f:EksProperties.to_value));
        ("consumableResourceProperties",
          (Option.map x.consumableResourceProperties
             ~f:ConsumableResourceProperties.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let consumableResourceProperties =
        (Option.map ~f:ConsumableResourceProperties.of_xml)
          (Xml.child xml_arg0 "consumableResourceProperties") in
      let eksProperties =
        (Option.map ~f:EksProperties.of_xml)
          (Xml.child xml_arg0 "eksProperties") in
      let ecsProperties =
        (Option.map ~f:EcsProperties.of_xml)
          (Xml.child xml_arg0 "ecsProperties") in
      let instanceTypes =
        (Option.map ~f:StringList.of_xml)
          (Xml.child xml_arg0 "instanceTypes") in
      let container =
        (Option.map ~f:ContainerProperties.of_xml)
          (Xml.child xml_arg0 "container") in
      let targetNodes =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "targetNodes") in
      make ?consumableResourceProperties ?eksProperties ?ecsProperties
        ?instanceTypes ?container ~targetNodes ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let consumableResourceProperties =
        field_map json__ "consumableResourceProperties"
          ConsumableResourceProperties.of_json in
      let eksProperties =
        field_map json__ "eksProperties" EksProperties.of_json in
      let ecsProperties =
        field_map json__ "ecsProperties" EcsProperties.of_json in
      let instanceTypes = field_map json__ "instanceTypes" StringList.of_json in
      let container =
        field_map json__ "container" ContainerProperties.of_json in
      let targetNodes = field_map_exn json__ "targetNodes" String_.of_json in
      make ?consumableResourceProperties ?eksProperties ?ecsProperties
        ?instanceTypes ?container ~targetNodes ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "This is an object that represents the properties of the node range for a multi-node parallel job."]
module EvaluateOnExit =
  struct
    type nonrec t =
      {
      onStatusReason: String_.t option
        [@ocaml.doc
          "Contains a glob pattern to match against the StatusReason returned for a job. The pattern can contain up to 512 characters. It can contain letters, numbers, periods (.), colons (:), and white spaces (including spaces or tabs). It can optionally end with an asterisk (*) so that only the start of the string needs to be an exact match."];
      onReason: String_.t option
        [@ocaml.doc
          "Contains a glob pattern to match against the Reason returned for a job. The pattern can contain up to 512 characters. It can contain letters, numbers, periods (.), colons (:), and white space (including spaces and tabs). It can optionally end with an asterisk (*) so that only the start of the string needs to be an exact match."];
      onExitCode: String_.t option
        [@ocaml.doc
          "Contains a glob pattern to match against the decimal representation of the ExitCode returned for a job. The pattern can be up to 512 characters long. It can contain only numbers, and can end with an asterisk (*) so that only the start of the string needs to be an exact match. The string can contain up to 512 characters."];
      action: RetryAction.t
        [@ocaml.doc
          "Specifies the action to take if all of the specified conditions (onStatusReason, onReason, and onExitCode) are met. The values aren't case sensitive."]}
    let context_ = "EvaluateOnExit"
    let make ?onStatusReason =
      fun ?onReason ->
        fun ?onExitCode ->
          fun ~action ->
            fun () -> { onStatusReason; onReason; onExitCode; action }
    let to_value x =
      structure_to_value
        [("onStatusReason",
           (Option.map x.onStatusReason ~f:String_.to_value));
        ("onReason", (Option.map x.onReason ~f:String_.to_value));
        ("onExitCode", (Option.map x.onExitCode ~f:String_.to_value));
        ("action", (Some (RetryAction.to_value x.action)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let action =
        RetryAction.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "action") in
      let onExitCode =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "onExitCode") in
      let onReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "onReason") in
      let onStatusReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "onStatusReason") in
      make ~action ?onExitCode ?onReason ?onStatusReason ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let action = field_map_exn json__ "action" RetryAction.of_json in
      let onExitCode = field_map json__ "onExitCode" String_.of_json in
      let onReason = field_map json__ "onReason" String_.of_json in
      let onStatusReason = field_map json__ "onStatusReason" String_.of_json in
      make ~action ?onExitCode ?onReason ?onStatusReason ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Specifies an array of up to 5 conditions to be met, and an action to take (RETRY or EXIT) if all conditions are met. If none of the EvaluateOnExit conditions in a RetryStrategy match, then the job is retried."]
module JobStateTimeLimitActionsAction =
  struct
    type nonrec t =
      | CANCEL 
      | TERMINATE 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | CANCEL -> "CANCEL"
      | TERMINATE -> "TERMINATE"
      | Non_static_id s -> s
    let of_string =
      function
      | "CANCEL" -> CANCEL
      | "TERMINATE" -> TERMINATE
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration JobStateTimeLimitActionsAction"
           xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"JobStateTimeLimitActionsAction" j)
    let to_json = simple_to_json to_value
  end
module JobStateTimeLimitActionsState =
  struct
    type nonrec t =
      | RUNNABLE 
      | Non_static_id of string 
    let make i = i
    let to_string = function | RUNNABLE -> "RUNNABLE" | Non_static_id s -> s
    let of_string = function | "RUNNABLE" -> RUNNABLE | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration JobStateTimeLimitActionsState"
           xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"JobStateTimeLimitActionsState" j)
    let to_json = simple_to_json to_value
  end
module Ec2Configuration =
  struct
    type nonrec t =
      {
      imageType: ImageType.t
        [@ocaml.doc
          "The image type to match with the instance type to select an AMI. The supported values are different for ECS and EKS resources. ECS If the imageIdOverride parameter isn't specified, then a recent Amazon ECS-optimized Amazon Linux 2023 AMI (ECS_AL2023) is used. If a new image type is specified in an update, but neither an imageId nor a imageIdOverride parameter is specified, then the latest Amazon ECS optimized AMI for that image type that's supported by Batch is used. Amazon Web Services is ending support for Amazon ECS Amazon Linux 2-optimized and accelerated AMIs on June 30, 2026. On January 12, 2026, Batch changed the default AMI for new Amazon ECS compute environments from Amazon Linux 2 to Amazon Linux 2023. Effective June 30, 2026, Batch will block creation of new Amazon ECS compute environments using Batch-provided Amazon Linux 2 AMIs. We strongly recommend migrating your existing Batch Amazon ECS compute environments to Amazon Linux 2023 prior to June 30, 2026. For more information on upgrading from AL2 to AL2023, see How to migrate from ECS AL2 to ECS AL2023 in the Batch User Guide. ECS_AL2 Amazon Linux 2: Used for non-GPU instance families. ECS_AL2_NVIDIA Amazon Linux 2 (GPU): Used for GPU instance families (for example P4 and G4) and non Amazon Web Services Graviton-based instance types. ECS_AL2023 Amazon Linux 2023: Default for all non-GPU instance families. Amazon Linux 2023 does not support A1 instances. ECS_AL2023_NVIDIA Amazon Linux 2023 (GPU): Default for all GPU instance families and can be used for all non Amazon Web Services Graviton-based instance types. ECS_AL2023_NVIDIA doesn't support p3 and g3 instance types. EKS If the imageIdOverride parameter isn't specified, then a recent Amazon EKS-optimized Amazon Linux 2023 AMI (EKS_AL2023) is used. If a new image type is specified in an update, but neither an imageId nor a imageIdOverride parameter is specified, then the latest Amazon EKS optimized AMI for that image type that Batch supports is used. Amazon Linux 2023 AMIs are the default on Batch for Amazon EKS. Amazon Web Services ended support for Amazon EKS AL2-optimized and AL2-accelerated AMIs on November 26, 2025. Batch Amazon EKS compute environments using Amazon Linux 2 will no longer receive software updates, security patches, or bug fixes from Amazon Web Services. We recommend migrating to Amazon Linux 2023. For more information on upgrading from AL2 to AL2023, see How to upgrade from EKS AL2 to EKS AL2023 in the Batch User Guide. EKS_AL2 Amazon Linux 2: Used for non-GPU instance families. EKS_AL2_NVIDIA Amazon Linux 2 (accelerated): Used for GPU instance families (for example, P4 and G4) and can be used for all non Amazon Web Services Graviton-based instance types. EKS_AL2023 Amazon Linux 2023: Default for non-GPU instance families. Amazon Linux 2023 does not support A1 instances. EKS_AL2023_NVIDIA Amazon Linux 2023 (accelerated): Default for GPU instance families and can be used for all non Amazon Web Services Graviton-based instance types."];
      imageIdOverride: ImageIdOverride.t option
        [@ocaml.doc
          "The AMI ID used for instances launched in the compute environment that match the image type. This setting overrides the imageId set in the computeResource object. The AMI that you choose for a compute environment must match the architecture of the instance types that you intend to use for that compute environment. For example, if your compute environment uses A1 instance types, the compute resource AMI that you choose must support ARM instances. Amazon ECS vends both x86 and ARM versions of the Amazon ECS-optimized Amazon Linux 2023 AMI. For more information, see Amazon ECS-optimized Amazon Linux 2023 AMI in the Amazon Elastic Container Service Developer Guide."];
      batchImageStatus: String_.t option
        [@ocaml.doc
          "The status of the Batch-provided default AMIs associated with the imageType. The field only appears after the compute environment has begun scaling instances using the imageType. The field is not present when an image is specified in ComputeResources.imageId (deprecated), the default launch template, or Ec2Configuration.imageIdOverride. The field is also not present when the compute environment has a launch template override. For more information on image selection, see AMI selection order. This field is read-only and only appears in the DescribeComputeEnvironments response. LATEST \226\136\146 Using the most recent AMI supported UPDATE_AVAILABLE \226\136\146 An updated AMI is available If a compute environment has multiple AMIs for the imageType and any one AMI has UPDATE_AVAILABLE, the status shows UPDATE_AVAILABLE. For compute environments that use BEST_FIT as their allocation strategy, you can perform a blue/green update to update the AMI. For all other compute environments, you can perform an AMI version update to update the AMI to the latest version."];
      imageKubernetesVersion: KubernetesVersion.t option
        [@ocaml.doc
          "The Kubernetes version for the compute environment. If you don't specify a value, the latest version that Batch supports is used."]}
    let context_ = "Ec2Configuration"
    let make ?imageIdOverride =
      fun ?batchImageStatus ->
        fun ?imageKubernetesVersion ->
          fun ~imageType ->
            fun () ->
              {
                imageIdOverride;
                batchImageStatus;
                imageKubernetesVersion;
                imageType
              }
    let to_value x =
      structure_to_value
        [("imageType", (Some (ImageType.to_value x.imageType)));
        ("imageIdOverride",
          (Option.map x.imageIdOverride ~f:ImageIdOverride.to_value));
        ("batchImageStatus",
          (Option.map x.batchImageStatus ~f:String_.to_value));
        ("imageKubernetesVersion",
          (Option.map x.imageKubernetesVersion ~f:KubernetesVersion.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let imageKubernetesVersion =
        (Option.map ~f:KubernetesVersion.of_xml)
          (Xml.child xml_arg0 "imageKubernetesVersion") in
      let batchImageStatus =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "batchImageStatus") in
      let imageIdOverride =
        (Option.map ~f:ImageIdOverride.of_xml)
          (Xml.child xml_arg0 "imageIdOverride") in
      let imageType =
        ImageType.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "imageType") in
      make ?imageKubernetesVersion ?batchImageStatus ?imageIdOverride
        ~imageType ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let imageKubernetesVersion =
        field_map json__ "imageKubernetesVersion" KubernetesVersion.of_json in
      let batchImageStatus =
        field_map json__ "batchImageStatus" String_.of_json in
      let imageIdOverride =
        field_map json__ "imageIdOverride" ImageIdOverride.of_json in
      let imageType = field_map_exn json__ "imageType" ImageType.of_json in
      make ?imageKubernetesVersion ?batchImageStatus ?imageIdOverride
        ~imageType ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Provides information used to select Amazon Machine Images (AMIs) for instances in the compute environment. If Ec2Configuration isn't specified, the default is ECS_AL2023 (Amazon ECS-optimized Amazon Linux 2023) for EC2 (ECS) compute environments and EKS_AL2023 (Amazon EKS-optimized Amazon Linux 2023 AMI) for EKS compute environments. This object isn't applicable to jobs that are running on Fargate resources."]
module LaunchTemplateSpecificationOverrideList =
  struct
    type nonrec t = LaunchTemplateSpecificationOverride.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:LaunchTemplateSpecificationOverride.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true)))
           ~f:LaunchTemplateSpecificationOverride.of_xml)
    let of_json j =
      list_of_json ~kind:"LaunchTemplateSpecificationOverrideList"
        ~of_json:LaunchTemplateSpecificationOverride.of_json j
    let to_json v = composed_to_json to_value v
  end
module ServiceJobRetryAction =
  struct
    type nonrec t =
      | RETRY 
      | EXIT 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function | RETRY -> "RETRY" | EXIT -> "EXIT" | Non_static_id s -> s
    let of_string =
      function | "RETRY" -> RETRY | "EXIT" -> EXIT | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration ServiceJobRetryAction" xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"ServiceJobRetryAction" j)
    let to_json = simple_to_json to_value
  end
module ContainerOverrides =
  struct
    type nonrec t =
      {
      vcpus: Integer.t option
        [@ocaml.doc
          "This parameter is deprecated, use resourceRequirements to override the vcpus parameter that's set in the job definition. It's not supported for jobs running on Fargate resources. For jobs that run on Amazon EC2 resources, it overrides the vcpus parameter set in the job definition, but doesn't override any vCPU requirement specified in the resourceRequirements structure in the job definition. To override vCPU requirements that are specified in the resourceRequirements structure in the job definition, resourceRequirements must be specified in the SubmitJob request, with type set to VCPU and value set to the new value. For more information, see Can't override job definition resource requirements in the Batch User Guide."];
      memory: Integer.t option
        [@ocaml.doc
          "This parameter is deprecated, use resourceRequirements to override the memory requirements specified in the job definition. It's not supported for jobs running on Fargate resources. For jobs that run on Amazon EC2 resources, it overrides the memory parameter set in the job definition, but doesn't override any memory requirement that's specified in the resourceRequirements structure in the job definition. To override memory requirements that are specified in the resourceRequirements structure in the job definition, resourceRequirements must be specified in the SubmitJob request, with type set to MEMORY and value set to the new value. For more information, see Can't override job definition resource requirements in the Batch User Guide."];
      command: StringList.t option
        [@ocaml.doc
          "The command to send to the container that overrides the default command from the Docker image or the job definition. This parameter can't contain an empty string."];
      instanceType: String_.t option
        [@ocaml.doc
          "The instance type to use for a multi-node parallel job. This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and shouldn't be provided."];
      environment: EnvironmentVariables.t option
        [@ocaml.doc
          "The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the job definition. Environment variables cannot start with \"AWS_BATCH\". This naming convention is reserved for variables that Batch sets."];
      resourceRequirements: ResourceRequirements.t option
        [@ocaml.doc
          "The type and amount of resources to assign to a container. This overrides the settings in the job definition. The supported resources include GPU, MEMORY, and VCPU."]}
    let make ?vcpus =
      fun ?memory ->
        fun ?command ->
          fun ?instanceType ->
            fun ?environment ->
              fun ?resourceRequirements ->
                fun () ->
                  {
                    vcpus;
                    memory;
                    command;
                    instanceType;
                    environment;
                    resourceRequirements
                  }
    let to_value x =
      structure_to_value
        [("vcpus", (Option.map x.vcpus ~f:Integer.to_value));
        ("memory", (Option.map x.memory ~f:Integer.to_value));
        ("command", (Option.map x.command ~f:StringList.to_value));
        ("instanceType", (Option.map x.instanceType ~f:String_.to_value));
        ("environment",
          (Option.map x.environment ~f:EnvironmentVariables.to_value));
        ("resourceRequirements",
          (Option.map x.resourceRequirements ~f:ResourceRequirements.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let resourceRequirements =
        (Option.map ~f:ResourceRequirements.of_xml)
          (Xml.child xml_arg0 "resourceRequirements") in
      let environment =
        (Option.map ~f:EnvironmentVariables.of_xml)
          (Xml.child xml_arg0 "environment") in
      let instanceType =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "instanceType") in
      let command =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "command") in
      let memory =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "memory") in
      let vcpus = (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "vcpus") in
      make ?resourceRequirements ?environment ?instanceType ?command ?memory
        ?vcpus ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let resourceRequirements =
        field_map json__ "resourceRequirements" ResourceRequirements.of_json in
      let environment =
        field_map json__ "environment" EnvironmentVariables.of_json in
      let instanceType = field_map json__ "instanceType" String_.of_json in
      let command = field_map json__ "command" StringList.of_json in
      let memory = field_map json__ "memory" Integer.of_json in
      let vcpus = field_map json__ "vcpus" Integer.of_json in
      make ?resourceRequirements ?environment ?instanceType ?command ?memory
        ?vcpus ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The overrides that should be sent to a container. For information about using Batch overrides when you connect event sources to targets, see BatchContainerOverrides."]
module EcsPropertiesOverride =
  struct
    type nonrec t =
      {
      taskProperties: ListTaskPropertiesOverride.t option
        [@ocaml.doc
          "The overrides for the Amazon ECS task definition of a job. This object is currently limited to one element."]}
    let make ?taskProperties = fun () -> { taskProperties }
    let to_value x =
      structure_to_value
        [("taskProperties",
           (Option.map x.taskProperties
              ~f:ListTaskPropertiesOverride.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let taskProperties =
        (Option.map ~f:ListTaskPropertiesOverride.of_xml)
          (Xml.child xml_arg0 "taskProperties") in
      make ?taskProperties ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let taskProperties =
        field_map json__ "taskProperties" ListTaskPropertiesOverride.of_json in
      make ?taskProperties ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that contains overrides for the Amazon ECS task definition of a job."]
module EksPropertiesOverride =
  struct
    type nonrec t =
      {
      podProperties: EksPodPropertiesOverride.t option
        [@ocaml.doc
          "The overrides for the Kubernetes pod resources of a job."]}
    let make ?podProperties = fun () -> { podProperties }
    let to_value x =
      structure_to_value
        [("podProperties",
           (Option.map x.podProperties ~f:EksPodPropertiesOverride.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let podProperties =
        (Option.map ~f:EksPodPropertiesOverride.of_xml)
          (Xml.child xml_arg0 "podProperties") in
      make ?podProperties ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let podProperties =
        field_map json__ "podProperties" EksPodPropertiesOverride.of_json in
      make ?podProperties ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that contains overrides for the Kubernetes resources of a job."]
module ServiceResourceId =
  struct
    type nonrec t =
      {
      name: ServiceResourceIdName.t option
        [@ocaml.doc "The name of the resource identifier."];
      value: String_.t option
        [@ocaml.doc "The value of the resource identifier."]}
    let make ?name = fun ?value -> fun () -> { name; value }
    let to_value x =
      structure_to_value
        [("name", (Option.map x.name ~f:ServiceResourceIdName.to_value));
        ("value", (Option.map x.value ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let value = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "value") in
      let name =
        (Option.map ~f:ServiceResourceIdName.of_xml)
          (Xml.child xml_arg0 "name") in
      make ?value ?name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let value = field_map json__ "value" String_.of_json in
      let name = field_map json__ "name" ServiceResourceIdName.of_json in
      make ?value ?name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "The Batch unique identifier."]
module ServiceJobCapacityUsageSummary =
  struct
    type nonrec t =
      {
      capacityUnit: String_.t option
        [@ocaml.doc
          "The unit of measure for the service job capacity usage. For service jobs, this is the instance type."];
      quantity: Double.t option
        [@ocaml.doc
          "The quantity of capacity being used by the service job, measured in the units specified by capacityUnit."]}
    let make ?capacityUnit =
      fun ?quantity -> fun () -> { capacityUnit; quantity }
    let to_value x =
      structure_to_value
        [("capacityUnit", (Option.map x.capacityUnit ~f:String_.to_value));
        ("quantity", (Option.map x.quantity ~f:Double.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let quantity =
        (Option.map ~f:Double.of_xml) (Xml.child xml_arg0 "quantity") in
      let capacityUnit =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "capacityUnit") in
      make ?quantity ?capacityUnit ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let quantity = field_map json__ "quantity" Double.of_json in
      let capacityUnit = field_map json__ "capacityUnit" String_.of_json in
      make ?quantity ?capacityUnit ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The capacity usage for a service job, including the unit of measure and quantity of resources being used."]
module QuotaShareCapacityLimit =
  struct
    type nonrec t =
      {
      maxCapacity: Integer.t
        [@ocaml.doc
          "The maximum capacity available for the quota share. This value represents the maximum quantity of a resource that can be allocated to jobs in the quota share without borrowing."];
      capacityUnit: String_.t
        [@ocaml.doc
          "The unit of compute capacity for the capacityLimit. For example, ml.m5.large."]}
    let context_ = "QuotaShareCapacityLimit"
    let make ~maxCapacity =
      fun ~capacityUnit -> fun () -> { maxCapacity; capacityUnit }
    let to_value x =
      structure_to_value
        [("maxCapacity", (Some (Integer.to_value x.maxCapacity)));
        ("capacityUnit", (Some (String_.to_value x.capacityUnit)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let capacityUnit =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "capacityUnit") in
      let maxCapacity =
        Integer.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "maxCapacity") in
      make ~capacityUnit ~maxCapacity ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let capacityUnit = field_map_exn json__ "capacityUnit" String_.of_json in
      let maxCapacity = field_map_exn json__ "maxCapacity" Integer.of_json in
      make ~capacityUnit ~maxCapacity ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Defines the capacity limit for a quota share, or the type and maximum quantity of a particular resource that can be allocated to jobs in the quota share without borrowing."]
module QuotaShareInSharePreemptionState =
  struct
    type nonrec t =
      | ENABLED 
      | DISABLED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | ENABLED -> "ENABLED"
      | DISABLED -> "DISABLED"
      | Non_static_id s -> s
    let of_string =
      function
      | "ENABLED" -> ENABLED
      | "DISABLED" -> DISABLED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration QuotaShareInSharePreemptionState"
           xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"QuotaShareInSharePreemptionState" j)
    let to_json = simple_to_json to_value
  end
module QuotaShareResourceSharingStrategy =
  struct
    type nonrec t =
      | RESERVE 
      | LEND 
      | LEND_AND_BORROW 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | RESERVE -> "RESERVE"
      | LEND -> "LEND"
      | LEND_AND_BORROW -> "LEND_AND_BORROW"
      | Non_static_id s -> s
    let of_string =
      function
      | "RESERVE" -> RESERVE
      | "LEND" -> LEND
      | "LEND_AND_BORROW" -> LEND_AND_BORROW
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration QuotaShareResourceSharingStrategy"
           xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"QuotaShareResourceSharingStrategy" j)
    let to_json = simple_to_json to_value
  end
module ArrayJobStatusSummary =
  struct
    type nonrec t = (String_.t * Integer.t) list
    let make i = i
    let of_header xs =
      make
        (List.filter_map xs
           ~f:(fun (k, v) ->
                 (Base.String.chop_prefix k ~prefix:"x-amz-meta-") |>
                   (Option.map
                      ~f:(fun chopped ->
                            ((String_.of_string chopped),
                              (Integer.of_string v))))))
    let to_value xs =
      (xs |>
         (List.map
            ~f:(fun (x, y) ->
                  (String_.to_value x) |>
                    (fun x -> (Integer.to_value y) |> (fun y -> (x, y))))))
        |> (fun x -> `Map x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for Map_shape objects" ()
    let of_xml _ =
      failwith "of_xml_converter_of_shape: Map_shape case not implemented"
    let of_json j =
      object_of_json ~key_of_string:String_.of_string
        ~of_json:Integer.of_json j
    let to_json v = composed_to_json to_value v
  end
module JobCapacityUsageSummary =
  struct
    type nonrec t =
      {
      capacityUnit: String_.t option
        [@ocaml.doc
          "The unit of measure for the capacity usage. This is VCPU for Amazon EC2 and cpu for Amazon EKS."];
      quantity: Double.t option
        [@ocaml.doc
          "The quantity of capacity being used by the job, measured in the units specified by capacityUnit."]}
    let make ?capacityUnit =
      fun ?quantity -> fun () -> { capacityUnit; quantity }
    let to_value x =
      structure_to_value
        [("capacityUnit", (Option.map x.capacityUnit ~f:String_.to_value));
        ("quantity", (Option.map x.quantity ~f:Double.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let quantity =
        (Option.map ~f:Double.of_xml) (Xml.child xml_arg0 "quantity") in
      let capacityUnit =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "capacityUnit") in
      make ?quantity ?capacityUnit ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let quantity = field_map json__ "quantity" Double.of_json in
      let capacityUnit = field_map json__ "capacityUnit" String_.of_json in
      make ?quantity ?capacityUnit ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The capacity usage for a job, including the unit of measure and quantity of resources being used."]
module FrontOfQuotaShareJobSummary =
  struct
    type nonrec t =
      {
      jobArn: String_.t option
        [@ocaml.doc "The ARN for a job in a named quota share."];
      earliestTimeAtPosition: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the job transitioned to its current position in the quota share."]}
    let make ?jobArn =
      fun ?earliestTimeAtPosition ->
        fun () -> { jobArn; earliestTimeAtPosition }
    let to_value x =
      structure_to_value
        [("jobArn", (Option.map x.jobArn ~f:String_.to_value));
        ("earliestTimeAtPosition",
          (Option.map x.earliestTimeAtPosition ~f:Long.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let earliestTimeAtPosition =
        (Option.map ~f:Long.of_xml)
          (Xml.child xml_arg0 "earliestTimeAtPosition") in
      let jobArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobArn") in
      make ?earliestTimeAtPosition ?jobArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let earliestTimeAtPosition =
        field_map json__ "earliestTimeAtPosition" Long.of_json in
      let jobArn = field_map json__ "jobArn" String_.of_json in
      make ?earliestTimeAtPosition ?jobArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents summary details for the first RUNNABLE job in a quota share."]
module FairshareCapacityUtilization =
  struct
    type nonrec t =
      {
      shareIdentifier: String_.t option
        [@ocaml.doc
          "The share identifier for the fairshare scheduling job queue."];
      capacityUsage: FairshareCapacityUsageList.t option
        [@ocaml.doc
          "The capacity usage information for this share, including the unit of measure and quantity being used. This is VCPU for Amazon EC2 and cpu for Amazon EKS."]}
    let make ?shareIdentifier =
      fun ?capacityUsage -> fun () -> { shareIdentifier; capacityUsage }
    let to_value x =
      structure_to_value
        [("shareIdentifier",
           (Option.map x.shareIdentifier ~f:String_.to_value));
        ("capacityUsage",
          (Option.map x.capacityUsage ~f:FairshareCapacityUsageList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let capacityUsage =
        (Option.map ~f:FairshareCapacityUsageList.of_xml)
          (Xml.child xml_arg0 "capacityUsage") in
      let shareIdentifier =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "shareIdentifier") in
      make ?capacityUsage ?shareIdentifier ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let capacityUsage =
        field_map json__ "capacityUsage" FairshareCapacityUsageList.of_json in
      let shareIdentifier =
        field_map json__ "shareIdentifier" String_.of_json in
      make ?capacityUsage ?shareIdentifier ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The capacity utilization for a specific share in a fairshare scheduling job queue, including the share identifier and its current usage."]
module QuotaShareCapacityUtilization =
  struct
    type nonrec t =
      {
      quotaShareName: String_.t option
        [@ocaml.doc "The name of the quota share."];
      capacityUsage: QuotaShareCapacityUsageList.t option
        [@ocaml.doc
          "The capacity usage information for this quota share, including the units of compute capacity and quantity being used."]}
    let make ?quotaShareName =
      fun ?capacityUsage -> fun () -> { quotaShareName; capacityUsage }
    let to_value x =
      structure_to_value
        [("quotaShareName",
           (Option.map x.quotaShareName ~f:String_.to_value));
        ("capacityUsage",
          (Option.map x.capacityUsage ~f:QuotaShareCapacityUsageList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let capacityUsage =
        (Option.map ~f:QuotaShareCapacityUsageList.of_xml)
          (Xml.child xml_arg0 "capacityUsage") in
      let quotaShareName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "quotaShareName") in
      make ?capacityUsage ?quotaShareName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let capacityUsage =
        field_map json__ "capacityUsage" QuotaShareCapacityUsageList.of_json in
      let quotaShareName = field_map json__ "quotaShareName" String_.of_json in
      make ?capacityUsage ?quotaShareName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The capacity utilization for a specific quota share, including the quota share name and its current usage."]
module CapacityLimit =
  struct
    type nonrec t =
      {
      maxCapacity: Integer.t option
        [@ocaml.doc
          "The maximum capacity available for the service environment. For a quota management enabled service environment, this value represents the maximum quantity of a particular resource type (specified by capacityUnit) that can be allocated to service jobs. For other service environments, this value represents the maximum quantity of all resources that can be allocated to service jobs. For example, if maxCapacity=50 and capacityUnit=NUM_INSTANCES, you can run up to 50 instances concurrently. If you run 5 SageMaker Training jobs that each use 10 instances, a subsequent job requiring 10 instances waits in the queue until capacity is available. In a quota management enabled service environment with capacityUnit=ml.m5.large, only ml.m5.large instances count against this limit, and jobs requiring other instance types wait until a matching capacity limit is configured."];
      capacityUnit: String_.t option
        [@ocaml.doc
          "The unit of measure for the capacity limit, which defines how maxCapacity is interpreted. For SAGEMAKER_TRAINING jobs in a quota management enabled service environment, specify the instance type (for example, ml.m5.large). Otherwise, use NUM_INSTANCES."]}
    let make ?maxCapacity =
      fun ?capacityUnit -> fun () -> { maxCapacity; capacityUnit }
    let to_value x =
      structure_to_value
        [("maxCapacity", (Option.map x.maxCapacity ~f:Integer.to_value));
        ("capacityUnit", (Option.map x.capacityUnit ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let capacityUnit =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "capacityUnit") in
      let maxCapacity =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "maxCapacity") in
      make ?capacityUnit ?maxCapacity ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let capacityUnit = field_map json__ "capacityUnit" String_.of_json in
      let maxCapacity = field_map json__ "maxCapacity" Integer.of_json in
      make ?capacityUnit ?maxCapacity ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Defines the type and maximum quantity of resources that can be allocated to service jobs in a service environment."]
module TagKey =
  struct
    type nonrec t = string
    let context_ = "TagKey"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:128) >>=
             (fun () -> check_string_min i ~min:1));
        i
    let of_string x = x
    let to_value x = `String x
    let to_query v = to_query to_value v
    let to_header x = x
    let of_xml = Xml.string_data_exn ~context:context_
    let of_json j = string_of_json ~kind:"TagKey" j
    let to_json = simple_to_json to_value
  end
module TagValue =
  struct
    type nonrec t = string
    let context_ = "TagValue"
    let make i =
      let open Result in ok_or_failwith (check_string_max i ~max:256); i
    let of_string x = x
    let to_value x = `String x
    let to_query v = to_query to_value v
    let to_header x = x
    let of_xml = Xml.string_data_exn ~context:context_
    let of_json j = string_of_json ~kind:"TagValue" j
    let to_json = simple_to_json to_value
  end
module ShareAttributesList =
  struct
    type nonrec t = ShareAttributes.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ShareAttributes.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ShareAttributes.of_xml)
    let of_json j =
      list_of_json ~kind:"ShareAttributesList"
        ~of_json:ShareAttributes.of_json j
    let to_json v = composed_to_json to_value v
  end
module QuotaShareIdleResourceAssignmentStrategy =
  struct
    type nonrec t =
      | FIFO 
      | Non_static_id of string 
    let make i = i
    let to_string = function | FIFO -> "FIFO" | Non_static_id s -> s
    let of_string = function | "FIFO" -> FIFO | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml
           ~kind:"enumeration QuotaShareIdleResourceAssignmentStrategy"
           xml_arg0)
    let of_json j =
      of_string
        (string_of_json ~kind:"QuotaShareIdleResourceAssignmentStrategy" j)
    let to_json = simple_to_json to_value
  end
module AttemptDetail =
  struct
    type nonrec t =
      {
      container: AttemptContainerDetail.t option
        [@ocaml.doc "The details for the container in this job attempt."];
      startedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the attempt was started (when the attempt transitioned from the STARTING state to the RUNNING state)."];
      stoppedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the attempt was stopped (when the attempt transitioned from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED)."];
      statusReason: String_.t option
        [@ocaml.doc
          "A short, human-readable string to provide additional details for the current status of the job attempt."];
      taskProperties: ListAttemptEcsTaskDetails.t option
        [@ocaml.doc
          "The properties for a task definition that describes the container and volume definitions of an Amazon ECS task."]}
    let make ?container =
      fun ?startedAt ->
        fun ?stoppedAt ->
          fun ?statusReason ->
            fun ?taskProperties ->
              fun () ->
                {
                  container;
                  startedAt;
                  stoppedAt;
                  statusReason;
                  taskProperties
                }
    let to_value x =
      structure_to_value
        [("container",
           (Option.map x.container ~f:AttemptContainerDetail.to_value));
        ("startedAt", (Option.map x.startedAt ~f:Long.to_value));
        ("stoppedAt", (Option.map x.stoppedAt ~f:Long.to_value));
        ("statusReason", (Option.map x.statusReason ~f:String_.to_value));
        ("taskProperties",
          (Option.map x.taskProperties ~f:ListAttemptEcsTaskDetails.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let taskProperties =
        (Option.map ~f:ListAttemptEcsTaskDetails.of_xml)
          (Xml.child xml_arg0 "taskProperties") in
      let statusReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "statusReason") in
      let stoppedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "stoppedAt") in
      let startedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "startedAt") in
      let container =
        (Option.map ~f:AttemptContainerDetail.of_xml)
          (Xml.child xml_arg0 "container") in
      make ?taskProperties ?statusReason ?stoppedAt ?startedAt ?container ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let taskProperties =
        field_map json__ "taskProperties" ListAttemptEcsTaskDetails.of_json in
      let statusReason = field_map json__ "statusReason" String_.of_json in
      let stoppedAt = field_map json__ "stoppedAt" Long.of_json in
      let startedAt = field_map json__ "startedAt" Long.of_json in
      let container =
        field_map json__ "container" AttemptContainerDetail.of_json in
      make ?taskProperties ?statusReason ?stoppedAt ?startedAt ?container ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "An object that represents a job attempt."]
module ListEcsTaskDetails =
  struct
    type nonrec t = EcsTaskDetails.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:EcsTaskDetails.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:EcsTaskDetails.of_xml)
    let of_json j =
      list_of_json ~kind:"ListEcsTaskDetails" ~of_json:EcsTaskDetails.of_json
        j
    let to_json v = composed_to_json to_value v
  end
module EksAttemptDetail =
  struct
    type nonrec t =
      {
      containers: EksAttemptContainerDetails.t option
        [@ocaml.doc
          "The details for the final status of the containers for this job attempt."];
      initContainers: EksAttemptContainerDetails.t option
        [@ocaml.doc "The details for the init containers."];
      eksClusterArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the Amazon EKS cluster."];
      podName: String_.t option
        [@ocaml.doc "The name of the pod for this job attempt."];
      podNamespace: String_.t option
        [@ocaml.doc
          "The namespace of the Amazon EKS cluster that the pod exists in."];
      nodeName: String_.t option
        [@ocaml.doc "The name of the node for this job attempt."];
      startedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the attempt was started (when the attempt transitioned from the STARTING state to the RUNNING state)."];
      stoppedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the attempt was stopped. This happens when the attempt transitioned from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED."];
      statusReason: String_.t option
        [@ocaml.doc
          "A short, human-readable string to provide additional details for the current status of the job attempt."]}
    let make ?containers =
      fun ?initContainers ->
        fun ?eksClusterArn ->
          fun ?podName ->
            fun ?podNamespace ->
              fun ?nodeName ->
                fun ?startedAt ->
                  fun ?stoppedAt ->
                    fun ?statusReason ->
                      fun () ->
                        {
                          containers;
                          initContainers;
                          eksClusterArn;
                          podName;
                          podNamespace;
                          nodeName;
                          startedAt;
                          stoppedAt;
                          statusReason
                        }
    let to_value x =
      structure_to_value
        [("containers",
           (Option.map x.containers ~f:EksAttemptContainerDetails.to_value));
        ("initContainers",
          (Option.map x.initContainers ~f:EksAttemptContainerDetails.to_value));
        ("eksClusterArn", (Option.map x.eksClusterArn ~f:String_.to_value));
        ("podName", (Option.map x.podName ~f:String_.to_value));
        ("podNamespace", (Option.map x.podNamespace ~f:String_.to_value));
        ("nodeName", (Option.map x.nodeName ~f:String_.to_value));
        ("startedAt", (Option.map x.startedAt ~f:Long.to_value));
        ("stoppedAt", (Option.map x.stoppedAt ~f:Long.to_value));
        ("statusReason", (Option.map x.statusReason ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let statusReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "statusReason") in
      let stoppedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "stoppedAt") in
      let startedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "startedAt") in
      let nodeName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nodeName") in
      let podNamespace =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "podNamespace") in
      let podName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "podName") in
      let eksClusterArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "eksClusterArn") in
      let initContainers =
        (Option.map ~f:EksAttemptContainerDetails.of_xml)
          (Xml.child xml_arg0 "initContainers") in
      let containers =
        (Option.map ~f:EksAttemptContainerDetails.of_xml)
          (Xml.child xml_arg0 "containers") in
      make ?statusReason ?stoppedAt ?startedAt ?nodeName ?podNamespace
        ?podName ?eksClusterArn ?initContainers ?containers ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let statusReason = field_map json__ "statusReason" String_.of_json in
      let stoppedAt = field_map json__ "stoppedAt" Long.of_json in
      let startedAt = field_map json__ "startedAt" Long.of_json in
      let nodeName = field_map json__ "nodeName" String_.of_json in
      let podNamespace = field_map json__ "podNamespace" String_.of_json in
      let podName = field_map json__ "podName" String_.of_json in
      let eksClusterArn = field_map json__ "eksClusterArn" String_.of_json in
      let initContainers =
        field_map json__ "initContainers" EksAttemptContainerDetails.of_json in
      let containers =
        field_map json__ "containers" EksAttemptContainerDetails.of_json in
      make ?statusReason ?stoppedAt ?startedAt ?nodeName ?podNamespace
        ?podName ?eksClusterArn ?initContainers ?containers ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the details of a job attempt for a job attempt by an Amazon EKS container."]
module EksPodPropertiesDetail =
  struct
    type nonrec t =
      {
      serviceAccountName: String_.t option
        [@ocaml.doc
          "The name of the service account that's used to run the pod. For more information, see Kubernetes service accounts and Configure a Kubernetes service account to assume an IAM role in the Amazon EKS User Guide and Configure service accounts for pods in the Kubernetes documentation."];
      hostNetwork: Boolean.t option
        [@ocaml.doc
          "Indicates if the pod uses the hosts' network IP address. The default value is true. Setting this to false enables the Kubernetes pod networking model. Most Batch workloads are egress-only and don't require the overhead of IP allocation for each pod for incoming connections. For more information, see Host namespaces and Pod networking in the Kubernetes documentation."];
      dnsPolicy: String_.t option
        [@ocaml.doc
          "The DNS policy for the pod. The default value is ClusterFirst. If the hostNetwork parameter is not specified, the default is ClusterFirstWithHostNet. ClusterFirst indicates that any DNS query that does not match the configured cluster domain suffix is forwarded to the upstream nameserver inherited from the node. If no value was specified for dnsPolicy in the RegisterJobDefinition API operation, then no value will be returned for dnsPolicy by either of DescribeJobDefinitions or DescribeJobs API operations. The pod spec setting will contain either ClusterFirst or ClusterFirstWithHostNet, depending on the value of the hostNetwork parameter. For more information, see Pod's DNS policy in the Kubernetes documentation. Valid values: Default | ClusterFirst | ClusterFirstWithHostNet"];
      imagePullSecrets: ImagePullSecrets.t option
        [@ocaml.doc
          "Displays the reference pointer to the Kubernetes secret resource. These secrets help to gain access to pull an images from a private registry."];
      containers: EksContainerDetails.t option
        [@ocaml.doc
          "The properties of the container that's used on the Amazon EKS pod."];
      initContainers: EksContainerDetails.t option
        [@ocaml.doc
          "The container registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store."];
      volumes: EksVolumes.t option
        [@ocaml.doc
          "Specifies the volumes for a job definition using Amazon EKS resources."];
      podName: String_.t option
        [@ocaml.doc "The name of the pod for this job."];
      nodeName: String_.t option
        [@ocaml.doc "The name of the node for this job."];
      metadata: EksMetadata.t option
        [@ocaml.doc
          "Describes and uniquely identifies Kubernetes resources. For example, the compute environment that a pod runs in or the jobID for a job running in the pod. For more information, see Understanding Kubernetes Objects in the Kubernetes documentation."];
      shareProcessNamespace: Boolean.t option
        [@ocaml.doc
          "Indicates if the processes in a container are shared, or visible, to other containers in the same pod. For more information, see Share Process Namespace between Containers in a Pod."]}
    let make ?serviceAccountName =
      fun ?hostNetwork ->
        fun ?dnsPolicy ->
          fun ?imagePullSecrets ->
            fun ?containers ->
              fun ?initContainers ->
                fun ?volumes ->
                  fun ?podName ->
                    fun ?nodeName ->
                      fun ?metadata ->
                        fun ?shareProcessNamespace ->
                          fun () ->
                            {
                              serviceAccountName;
                              hostNetwork;
                              dnsPolicy;
                              imagePullSecrets;
                              containers;
                              initContainers;
                              volumes;
                              podName;
                              nodeName;
                              metadata;
                              shareProcessNamespace
                            }
    let to_value x =
      structure_to_value
        [("serviceAccountName",
           (Option.map x.serviceAccountName ~f:String_.to_value));
        ("hostNetwork", (Option.map x.hostNetwork ~f:Boolean.to_value));
        ("dnsPolicy", (Option.map x.dnsPolicy ~f:String_.to_value));
        ("imagePullSecrets",
          (Option.map x.imagePullSecrets ~f:ImagePullSecrets.to_value));
        ("containers",
          (Option.map x.containers ~f:EksContainerDetails.to_value));
        ("initContainers",
          (Option.map x.initContainers ~f:EksContainerDetails.to_value));
        ("volumes", (Option.map x.volumes ~f:EksVolumes.to_value));
        ("podName", (Option.map x.podName ~f:String_.to_value));
        ("nodeName", (Option.map x.nodeName ~f:String_.to_value));
        ("metadata", (Option.map x.metadata ~f:EksMetadata.to_value));
        ("shareProcessNamespace",
          (Option.map x.shareProcessNamespace ~f:Boolean.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let shareProcessNamespace =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "shareProcessNamespace") in
      let metadata =
        (Option.map ~f:EksMetadata.of_xml) (Xml.child xml_arg0 "metadata") in
      let nodeName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nodeName") in
      let podName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "podName") in
      let volumes =
        (Option.map ~f:EksVolumes.of_xml) (Xml.child xml_arg0 "volumes") in
      let initContainers =
        (Option.map ~f:EksContainerDetails.of_xml)
          (Xml.child xml_arg0 "initContainers") in
      let containers =
        (Option.map ~f:EksContainerDetails.of_xml)
          (Xml.child xml_arg0 "containers") in
      let imagePullSecrets =
        (Option.map ~f:ImagePullSecrets.of_xml)
          (Xml.child xml_arg0 "imagePullSecrets") in
      let dnsPolicy =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "dnsPolicy") in
      let hostNetwork =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "hostNetwork") in
      let serviceAccountName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "serviceAccountName") in
      make ?shareProcessNamespace ?metadata ?nodeName ?podName ?volumes
        ?initContainers ?containers ?imagePullSecrets ?dnsPolicy ?hostNetwork
        ?serviceAccountName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let shareProcessNamespace =
        field_map json__ "shareProcessNamespace" Boolean.of_json in
      let metadata = field_map json__ "metadata" EksMetadata.of_json in
      let nodeName = field_map json__ "nodeName" String_.of_json in
      let podName = field_map json__ "podName" String_.of_json in
      let volumes = field_map json__ "volumes" EksVolumes.of_json in
      let initContainers =
        field_map json__ "initContainers" EksContainerDetails.of_json in
      let containers =
        field_map json__ "containers" EksContainerDetails.of_json in
      let imagePullSecrets =
        field_map json__ "imagePullSecrets" ImagePullSecrets.of_json in
      let dnsPolicy = field_map json__ "dnsPolicy" String_.of_json in
      let hostNetwork = field_map json__ "hostNetwork" Boolean.of_json in
      let serviceAccountName =
        field_map json__ "serviceAccountName" String_.of_json in
      make ?shareProcessNamespace ?metadata ?nodeName ?podName ?volumes
        ?initContainers ?containers ?imagePullSecrets ?dnsPolicy ?hostNetwork
        ?serviceAccountName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "The details for the pod."]
module JobDependency =
  struct
    type nonrec t =
      {
      jobId: String_.t option
        [@ocaml.doc
          "The job ID of the Batch job that's associated with this dependency."];
      type_: ArrayJobDependency.t option
        [@ocaml.doc "The type of the job dependency."]}
    let make ?jobId = fun ?type_ -> fun () -> { jobId; type_ }
    let to_value x =
      structure_to_value
        [("jobId", (Option.map x.jobId ~f:String_.to_value));
        ("type", (Option.map x.type_ ~f:ArrayJobDependency.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let type_ =
        (Option.map ~f:ArrayJobDependency.of_xml) (Xml.child xml_arg0 "type") in
      let jobId = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobId") in
      make ?type_ ?jobId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let type_ = field_map json__ "type" ArrayJobDependency.of_json in
      let jobId = field_map json__ "jobId" String_.of_json in
      make ?type_ ?jobId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "An object that represents an Batch job dependency."]
module NodeRangeProperties =
  struct
    type nonrec t = NodeRangeProperty.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:NodeRangeProperty.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:NodeRangeProperty.of_xml)
    let of_json j =
      list_of_json ~kind:"NodeRangeProperties"
        ~of_json:NodeRangeProperty.of_json j
    let to_json v = composed_to_json to_value v
  end
module PlatformCapability =
  struct
    type nonrec t =
      | EC2 
      | FARGATE 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function | EC2 -> "EC2" | FARGATE -> "FARGATE" | Non_static_id s -> s
    let of_string =
      function | "EC2" -> EC2 | "FARGATE" -> FARGATE | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration PlatformCapability" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"PlatformCapability" j)
    let to_json = simple_to_json to_value
  end
module EvaluateOnExitList =
  struct
    type nonrec t = EvaluateOnExit.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:EvaluateOnExit.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:EvaluateOnExit.of_xml)
    let of_json j =
      list_of_json ~kind:"EvaluateOnExitList" ~of_json:EvaluateOnExit.of_json
        j
    let to_json v = composed_to_json to_value v
  end
module ComputeEnvironmentOrder =
  struct
    type nonrec t =
      {
      order: Integer.t
        [@ocaml.doc
          "The order of the compute environment. Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order integer value is tried for job placement first."];
      computeEnvironment: String_.t
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the compute environment."]}
    let context_ = "ComputeEnvironmentOrder"
    let make ~order =
      fun ~computeEnvironment -> fun () -> { order; computeEnvironment }
    let to_value x =
      structure_to_value
        [("order", (Some (Integer.to_value x.order)));
        ("computeEnvironment",
          (Some (String_.to_value x.computeEnvironment)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let computeEnvironment =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "computeEnvironment") in
      let order =
        Integer.of_xml (Xml.child_exn ~context:context_ xml_arg0 "order") in
      make ~computeEnvironment ~order ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let computeEnvironment =
        field_map_exn json__ "computeEnvironment" String_.of_json in
      let order = field_map_exn json__ "order" Integer.of_json in
      make ~computeEnvironment ~order ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The order that compute environments are tried in for job placement within a queue. Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order integer value is tried for job placement first. Compute environments must be in the VALID state before you can associate them with a job queue. All of the compute environments must be either EC2 (EC2 or SPOT) or Fargate (FARGATE or FARGATE_SPOT); Amazon EC2 and Fargate compute environments can't be mixed. All compute environments that are associated with a job queue must share the same architecture. Batch doesn't support mixing compute environment architecture types in a single job queue."]
module JobStateTimeLimitAction =
  struct
    type nonrec t =
      {
      reason: String_.t
        [@ocaml.doc "The reason to log for the action being taken."];
      state: JobStateTimeLimitActionsState.t
        [@ocaml.doc
          "The state of the job needed to trigger the action. The only supported value is RUNNABLE."];
      maxTimeSeconds: Integer.t
        [@ocaml.doc
          "The approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken. The minimum value is 600 (10 minutes) and the maximum value is 86,400 (24 hours)."];
      action: JobStateTimeLimitActionsAction.t
        [@ocaml.doc
          "The action to take when a job is at the head of the job queue in the specified state for the specified period of time. For job queues connected to a ECS, FARGATE or EKS compute environment, the only supported value is CANCEL, which will cancel the job. For job queues connected to a SAGEMAKER_TRAINING service environment, the only supported value is TERMINATE, which will terminate the job."]}
    let context_ = "JobStateTimeLimitAction"
    let make ~reason =
      fun ~state ->
        fun ~maxTimeSeconds ->
          fun ~action -> fun () -> { reason; state; maxTimeSeconds; action }
    let to_value x =
      structure_to_value
        [("reason", (Some (String_.to_value x.reason)));
        ("state", (Some (JobStateTimeLimitActionsState.to_value x.state)));
        ("maxTimeSeconds", (Some (Integer.to_value x.maxTimeSeconds)));
        ("action", (Some (JobStateTimeLimitActionsAction.to_value x.action)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let action =
        JobStateTimeLimitActionsAction.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "action") in
      let maxTimeSeconds =
        Integer.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "maxTimeSeconds") in
      let state =
        JobStateTimeLimitActionsState.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "state") in
      let reason =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "reason") in
      make ~action ~maxTimeSeconds ~state ~reason ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let action =
        field_map_exn json__ "action" JobStateTimeLimitActionsAction.of_json in
      let maxTimeSeconds =
        field_map_exn json__ "maxTimeSeconds" Integer.of_json in
      let state =
        field_map_exn json__ "state" JobStateTimeLimitActionsState.of_json in
      let reason = field_map_exn json__ "reason" String_.of_json in
      make ~action ~maxTimeSeconds ~state ~reason ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Specifies an action that Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time."]
module ServiceEnvironmentOrder =
  struct
    type nonrec t =
      {
      order: Integer.t
        [@ocaml.doc
          "The order of the service environment. Job queues with a higher priority are evaluated first when associated with the same service environment."];
      serviceEnvironment: String_.t
        [@ocaml.doc "The name or ARN of the service environment."]}
    let context_ = "ServiceEnvironmentOrder"
    let make ~order =
      fun ~serviceEnvironment -> fun () -> { order; serviceEnvironment }
    let to_value x =
      structure_to_value
        [("order", (Some (Integer.to_value x.order)));
        ("serviceEnvironment",
          (Some (String_.to_value x.serviceEnvironment)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let serviceEnvironment =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "serviceEnvironment") in
      let order =
        Integer.of_xml (Xml.child_exn ~context:context_ xml_arg0 "order") in
      make ~serviceEnvironment ~order ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let serviceEnvironment =
        field_map_exn json__ "serviceEnvironment" String_.of_json in
      let order = field_map_exn json__ "order" Integer.of_json in
      make ~serviceEnvironment ~order ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Specifies the order of a service environment for a job queue. This determines the priority order when multiple service environments are associated with the same job queue."]
module CRAllocationStrategy =
  struct
    type nonrec t =
      | BEST_FIT 
      | BEST_FIT_PROGRESSIVE 
      | SPOT_CAPACITY_OPTIMIZED 
      | SPOT_PRICE_CAPACITY_OPTIMIZED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | BEST_FIT -> "BEST_FIT"
      | BEST_FIT_PROGRESSIVE -> "BEST_FIT_PROGRESSIVE"
      | SPOT_CAPACITY_OPTIMIZED -> "SPOT_CAPACITY_OPTIMIZED"
      | SPOT_PRICE_CAPACITY_OPTIMIZED -> "SPOT_PRICE_CAPACITY_OPTIMIZED"
      | Non_static_id s -> s
    let of_string =
      function
      | "BEST_FIT" -> BEST_FIT
      | "BEST_FIT_PROGRESSIVE" -> BEST_FIT_PROGRESSIVE
      | "SPOT_CAPACITY_OPTIMIZED" -> SPOT_CAPACITY_OPTIMIZED
      | "SPOT_PRICE_CAPACITY_OPTIMIZED" -> SPOT_PRICE_CAPACITY_OPTIMIZED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration CRAllocationStrategy" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"CRAllocationStrategy" j)
    let to_json = simple_to_json to_value
  end
module CRType =
  struct
    type nonrec t =
      | EC2 
      | SPOT 
      | FARGATE 
      | FARGATE_SPOT 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | EC2 -> "EC2"
      | SPOT -> "SPOT"
      | FARGATE -> "FARGATE"
      | FARGATE_SPOT -> "FARGATE_SPOT"
      | Non_static_id s -> s
    let of_string =
      function
      | "EC2" -> EC2
      | "SPOT" -> SPOT
      | "FARGATE" -> FARGATE
      | "FARGATE_SPOT" -> FARGATE_SPOT
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration CRType" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"CRType" j)
    let to_json = simple_to_json to_value
  end
module ComputeScalingPolicy =
  struct
    type nonrec t =
      {
      minScaleDownDelayMinutes: Integer.t option
        [@ocaml.doc
          "The minimum time (in minutes) that Batch keeps instances running in the compute environment after their jobs complete. For each instance, the delay period begins when the last job finishes. If no new jobs are placed on the instance during this delay, Batch terminates the instance once the delay expires. Valid Range: Minimum value of 20. Maximum value of 10080. Use 0 to unset and disable the scale down delay. Idle instances retained during the scale-down delay period are billable at standard EC2 pricing. The scale down delay does not apply to: Instances being replaced during infrastructure updates Newly launched instances that have not yet run any jobs Spot instances reclaimed due to interruption"]}
    let make ?minScaleDownDelayMinutes =
      fun () -> { minScaleDownDelayMinutes }
    let to_value x =
      structure_to_value
        [("minScaleDownDelayMinutes",
           (Option.map x.minScaleDownDelayMinutes ~f:Integer.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let minScaleDownDelayMinutes =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "minScaleDownDelayMinutes") in
      make ?minScaleDownDelayMinutes ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let minScaleDownDelayMinutes =
        field_map json__ "minScaleDownDelayMinutes" Integer.of_json in
      make ?minScaleDownDelayMinutes ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents a scaling policy for a compute environment."]
module Ec2ConfigurationList =
  struct
    type nonrec t = Ec2Configuration.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:Ec2Configuration.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:Ec2Configuration.of_xml)
    let of_json j =
      list_of_json ~kind:"Ec2ConfigurationList"
        ~of_json:Ec2Configuration.of_json j
    let to_json v = composed_to_json to_value v
  end
module LaunchTemplateSpecification =
  struct
    type nonrec t =
      {
      launchTemplateId: String_.t option
        [@ocaml.doc "The ID of the launch template."];
      launchTemplateName: String_.t option
        [@ocaml.doc "The name of the launch template."];
      version: String_.t option
        [@ocaml.doc
          "The version number of the launch template, $Default, or $Latest. If the value is $Default, the default version of the launch template is used. If the value is $Latest, the latest version of the launch template is used. If the AMI ID that's used in a compute environment is from the launch template, the AMI isn't changed when the compute environment is updated. It's only changed if the updateToLatestImageVersion parameter for the compute environment is set to true. During an infrastructure update, if either $Default or $Latest is specified, Batch re-evaluates the launch template version, and it might use a different version of the launch template. This is the case even if the launch template isn't specified in the update. When updating a compute environment, changing the launch template requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide. Default: $Default Latest: $Latest"];
      overrides: LaunchTemplateSpecificationOverrideList.t option
        [@ocaml.doc
          "A launch template to use in place of the default launch template. You must specify either the launch template ID or launch template name in the request, but not both. You can specify up to ten (10) launch template overrides that are associated to unique instance types or families for each compute environment. To unset all override templates for a compute environment, you can pass an empty array to the UpdateComputeEnvironment.overrides parameter, or not include the overrides parameter when submitting the UpdateComputeEnvironment API operation."];
      userdataType: UserdataType.t option
        [@ocaml.doc
          "The EKS node initialization process to use. You only need to specify this value if you are using a custom AMI. The default value is EKS_BOOTSTRAP_SH. If imageType is a custom AMI based on EKS_AL2023 or EKS_AL2023_NVIDIA then you must choose EKS_NODEADM."]}
    let make ?launchTemplateId =
      fun ?launchTemplateName ->
        fun ?version ->
          fun ?overrides ->
            fun ?userdataType ->
              fun () ->
                {
                  launchTemplateId;
                  launchTemplateName;
                  version;
                  overrides;
                  userdataType
                }
    let to_value x =
      structure_to_value
        [("launchTemplateId",
           (Option.map x.launchTemplateId ~f:String_.to_value));
        ("launchTemplateName",
          (Option.map x.launchTemplateName ~f:String_.to_value));
        ("version", (Option.map x.version ~f:String_.to_value));
        ("overrides",
          (Option.map x.overrides
             ~f:LaunchTemplateSpecificationOverrideList.to_value));
        ("userdataType",
          (Option.map x.userdataType ~f:UserdataType.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let userdataType =
        (Option.map ~f:UserdataType.of_xml)
          (Xml.child xml_arg0 "userdataType") in
      let overrides =
        (Option.map ~f:LaunchTemplateSpecificationOverrideList.of_xml)
          (Xml.child xml_arg0 "overrides") in
      let version =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "version") in
      let launchTemplateName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "launchTemplateName") in
      let launchTemplateId =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "launchTemplateId") in
      make ?userdataType ?overrides ?version ?launchTemplateName
        ?launchTemplateId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let userdataType = field_map json__ "userdataType" UserdataType.of_json in
      let overrides =
        field_map json__ "overrides"
          LaunchTemplateSpecificationOverrideList.of_json in
      let version = field_map json__ "version" String_.of_json in
      let launchTemplateName =
        field_map json__ "launchTemplateName" String_.of_json in
      let launchTemplateId =
        field_map json__ "launchTemplateId" String_.of_json in
      make ?userdataType ?overrides ?version ?launchTemplateName
        ?launchTemplateId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents a launch template that's associated with a compute resource. You must specify either the launch template ID or launch template name in the request, but not both. If security groups are specified using both the securityGroupIds parameter of CreateComputeEnvironment and the launch template, the values in the securityGroupIds parameter of CreateComputeEnvironment will be used. This object isn't applicable to jobs that are running on Fargate resources."]
module TagsMap =
  struct
    type nonrec t = (String_.t * String_.t) list
    let make i = i
    let of_header xs =
      make
        (List.filter_map xs
           ~f:(fun (k, v) ->
                 (Base.String.chop_prefix k ~prefix:"x-amz-meta-") |>
                   (Option.map
                      ~f:(fun chopped ->
                            ((String_.of_string chopped),
                              (String_.of_string v))))))
    let to_value xs =
      (xs |>
         (List.map
            ~f:(fun (x, y) ->
                  (String_.to_value x) |>
                    (fun x -> (String_.to_value y) |> (fun y -> (x, y))))))
        |> (fun x -> `Map x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for Map_shape objects" ()
    let of_xml _ =
      failwith "of_xml_converter_of_shape: Map_shape case not implemented"
    let of_json j =
      object_of_json ~key_of_string:String_.of_string
        ~of_json:String_.of_json j
    let to_json v = composed_to_json to_value v
  end
module JobExecutionTimeoutMinutes =
  struct
    type nonrec t = Int64.t
    let make i =
      let open Result in
        ok_or_failwith
          ((check_int64_max i ~max:360L) >>=
             (fun () -> check_int64_min i ~min:1L));
        i
    let of_string = Int64.of_string
    let to_value x = `Long x
    let to_query v = to_query to_value v
    let to_header x = Int64.to_string x
    let of_xml xml_arg0 =
      Int64.of_string (string_of_xml ~kind:"a long" xml_arg0)
    let of_json j = Int64.of_float (float_of_json ~kind:"a long" j)
    let to_json = simple_to_json to_value
  end
module ServiceJobEvaluateOnExit =
  struct
    type nonrec t =
      {
      action: ServiceJobRetryAction.t option
        [@ocaml.doc
          "The action to take if the service job exits with the specified condition. Valid values are RETRY and EXIT."];
      onStatusReason: String_.t option
        [@ocaml.doc
          "Contains a glob pattern to match against the StatusReason returned for a job. The pattern can contain up to 512 characters and can contain all printable characters. It can optionally end with an asterisk (*) so that only the start of the string needs to be an exact match."]}
    let make ?action =
      fun ?onStatusReason -> fun () -> { action; onStatusReason }
    let to_value x =
      structure_to_value
        [("action", (Option.map x.action ~f:ServiceJobRetryAction.to_value));
        ("onStatusReason", (Option.map x.onStatusReason ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let onStatusReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "onStatusReason") in
      let action =
        (Option.map ~f:ServiceJobRetryAction.of_xml)
          (Xml.child xml_arg0 "action") in
      make ?onStatusReason ?action ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let onStatusReason = field_map json__ "onStatusReason" String_.of_json in
      let action = field_map json__ "action" ServiceJobRetryAction.of_json in
      make ?onStatusReason ?action ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Specifies conditions for when to exit or retry a service job based on the exit status or status reason."]
module NodePropertyOverride =
  struct
    type nonrec t =
      {
      targetNodes: String_.t
        [@ocaml.doc
          "The range of nodes, using node index values, that's used to override. A range of 0:3 indicates nodes with index values of 0 through 3. If the starting range value is omitted (:n), then 0 is used to start the range. If the ending range value is omitted (n:), then the highest possible node index is used to end the range."];
      containerOverrides: ContainerOverrides.t option
        [@ocaml.doc "The overrides that are sent to a node range."];
      ecsPropertiesOverride: EcsPropertiesOverride.t option
        [@ocaml.doc
          "An object that contains the properties that you want to replace for the existing Amazon ECS resources of a job."];
      instanceTypes: StringList.t option
        [@ocaml.doc
          "An object that contains the instance types that you want to replace for the existing resources of a job."];
      eksPropertiesOverride: EksPropertiesOverride.t option
        [@ocaml.doc
          "An object that contains the properties that you want to replace for the existing Amazon EKS resources of a job."];
      consumableResourcePropertiesOverride:
        ConsumableResourceProperties.t option
        [@ocaml.doc
          "An object that contains overrides for the consumable resources of a job."]}
    let context_ = "NodePropertyOverride"
    let make ?containerOverrides =
      fun ?ecsPropertiesOverride ->
        fun ?instanceTypes ->
          fun ?eksPropertiesOverride ->
            fun ?consumableResourcePropertiesOverride ->
              fun ~targetNodes ->
                fun () ->
                  {
                    containerOverrides;
                    ecsPropertiesOverride;
                    instanceTypes;
                    eksPropertiesOverride;
                    consumableResourcePropertiesOverride;
                    targetNodes
                  }
    let to_value x =
      structure_to_value
        [("targetNodes", (Some (String_.to_value x.targetNodes)));
        ("containerOverrides",
          (Option.map x.containerOverrides ~f:ContainerOverrides.to_value));
        ("ecsPropertiesOverride",
          (Option.map x.ecsPropertiesOverride
             ~f:EcsPropertiesOverride.to_value));
        ("instanceTypes",
          (Option.map x.instanceTypes ~f:StringList.to_value));
        ("eksPropertiesOverride",
          (Option.map x.eksPropertiesOverride
             ~f:EksPropertiesOverride.to_value));
        ("consumableResourcePropertiesOverride",
          (Option.map x.consumableResourcePropertiesOverride
             ~f:ConsumableResourceProperties.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let consumableResourcePropertiesOverride =
        (Option.map ~f:ConsumableResourceProperties.of_xml)
          (Xml.child xml_arg0 "consumableResourcePropertiesOverride") in
      let eksPropertiesOverride =
        (Option.map ~f:EksPropertiesOverride.of_xml)
          (Xml.child xml_arg0 "eksPropertiesOverride") in
      let instanceTypes =
        (Option.map ~f:StringList.of_xml)
          (Xml.child xml_arg0 "instanceTypes") in
      let ecsPropertiesOverride =
        (Option.map ~f:EcsPropertiesOverride.of_xml)
          (Xml.child xml_arg0 "ecsPropertiesOverride") in
      let containerOverrides =
        (Option.map ~f:ContainerOverrides.of_xml)
          (Xml.child xml_arg0 "containerOverrides") in
      let targetNodes =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "targetNodes") in
      make ?consumableResourcePropertiesOverride ?eksPropertiesOverride
        ?instanceTypes ?ecsPropertiesOverride ?containerOverrides
        ~targetNodes ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let consumableResourcePropertiesOverride =
        field_map json__ "consumableResourcePropertiesOverride"
          ConsumableResourceProperties.of_json in
      let eksPropertiesOverride =
        field_map json__ "eksPropertiesOverride"
          EksPropertiesOverride.of_json in
      let instanceTypes = field_map json__ "instanceTypes" StringList.of_json in
      let ecsPropertiesOverride =
        field_map json__ "ecsPropertiesOverride"
          EcsPropertiesOverride.of_json in
      let containerOverrides =
        field_map json__ "containerOverrides" ContainerOverrides.of_json in
      let targetNodes = field_map_exn json__ "targetNodes" String_.of_json in
      make ?consumableResourcePropertiesOverride ?eksPropertiesOverride
        ?instanceTypes ?ecsPropertiesOverride ?containerOverrides
        ~targetNodes ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The object that represents any node overrides to a job definition that's used in a SubmitJob API operation."]
module LatestServiceJobAttempt =
  struct
    type nonrec t =
      {
      serviceResourceId: ServiceResourceId.t option
        [@ocaml.doc
          "The service resource identifier associated with the service job attempt."]}
    let make ?serviceResourceId = fun () -> { serviceResourceId }
    let to_value x =
      structure_to_value
        [("serviceResourceId",
           (Option.map x.serviceResourceId ~f:ServiceResourceId.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let serviceResourceId =
        (Option.map ~f:ServiceResourceId.of_xml)
          (Xml.child xml_arg0 "serviceResourceId") in
      make ?serviceResourceId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let serviceResourceId =
        field_map json__ "serviceResourceId" ServiceResourceId.of_json in
      make ?serviceResourceId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Information about the latest attempt of a service job. A Service job can transition from SCHEDULED back to RUNNABLE state when they encounter capacity constraints."]
module ServiceJobCapacityUsageSummaryList =
  struct
    type nonrec t = ServiceJobCapacityUsageSummary.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ServiceJobCapacityUsageSummary.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ServiceJobCapacityUsageSummary.of_xml)
    let of_json j =
      list_of_json ~kind:"ServiceJobCapacityUsageSummaryList"
        ~of_json:ServiceJobCapacityUsageSummary.of_json j
    let to_json v = composed_to_json to_value v
  end
module ServiceJobStatus =
  struct
    type nonrec t =
      | SUBMITTED 
      | PENDING 
      | RUNNABLE 
      | SCHEDULED 
      | STARTING 
      | RUNNING 
      | SUCCEEDED 
      | FAILED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | SUBMITTED -> "SUBMITTED"
      | PENDING -> "PENDING"
      | RUNNABLE -> "RUNNABLE"
      | SCHEDULED -> "SCHEDULED"
      | STARTING -> "STARTING"
      | RUNNING -> "RUNNING"
      | SUCCEEDED -> "SUCCEEDED"
      | FAILED -> "FAILED"
      | Non_static_id s -> s
    let of_string =
      function
      | "SUBMITTED" -> SUBMITTED
      | "PENDING" -> PENDING
      | "RUNNABLE" -> RUNNABLE
      | "SCHEDULED" -> SCHEDULED
      | "STARTING" -> STARTING
      | "RUNNING" -> RUNNING
      | "SUCCEEDED" -> SUCCEEDED
      | "FAILED" -> FAILED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration ServiceJobStatus" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"ServiceJobStatus" j)
    let to_json = simple_to_json to_value
  end
module ServiceJobType =
  struct
    type nonrec t =
      | SAGEMAKER_TRAINING 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | SAGEMAKER_TRAINING -> "SAGEMAKER_TRAINING"
      | Non_static_id s -> s
    let of_string =
      function
      | "SAGEMAKER_TRAINING" -> SAGEMAKER_TRAINING
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration ServiceJobType" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"ServiceJobType" j)
    let to_json = simple_to_json to_value
  end
module QuotaShareCapacityLimits =
  struct
    type nonrec t = QuotaShareCapacityLimit.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:QuotaShareCapacityLimit.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:QuotaShareCapacityLimit.of_xml)
    let of_json j =
      list_of_json ~kind:"QuotaShareCapacityLimits"
        ~of_json:QuotaShareCapacityLimit.of_json j
    let to_json v = composed_to_json to_value v
  end
module QuotaSharePreemptionConfiguration =
  struct
    type nonrec t =
      {
      inSharePreemption: QuotaShareInSharePreemptionState.t
        [@ocaml.doc
          "Specifies whether jobs within a quota share can be preempted by another, higher priority job in the same quota share."]}
    let context_ = "QuotaSharePreemptionConfiguration"
    let make ~inSharePreemption = fun () -> { inSharePreemption }
    let to_value x =
      structure_to_value
        [("inSharePreemption",
           (Some
              (QuotaShareInSharePreemptionState.to_value x.inSharePreemption)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let inSharePreemption =
        QuotaShareInSharePreemptionState.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "inSharePreemption") in
      make ~inSharePreemption ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let inSharePreemption =
        field_map_exn json__ "inSharePreemption"
          QuotaShareInSharePreemptionState.of_json in
      make ~inSharePreemption ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Specifies the preemption behavior for jobs in a quota share."]
module QuotaShareResourceSharingConfiguration =
  struct
    type nonrec t =
      {
      strategy: QuotaShareResourceSharingStrategy.t
        [@ocaml.doc
          "The resource sharing strategy for the quota share. The RESERVE strategy allows a quota share to reserve idle capacity for itself. LEND configures the share to lend its idle capacity to another share in need of capacity. The LEND_AND_BORROW strategy configures the share to borrow idle capacity from an underutilized share, as well as lend to another share."];
      borrowLimit: Integer.t option
        [@ocaml.doc
          "The maximum percentage of additional capacity that the quota share can borrow from other shares. borrowLimit can only be applied to quota shares with a strategy of LEND_AND_BORROW. This value is expressed as a percentage of the quota share's configured CapacityLimits. The borrowLimit is applied uniformly across all capacity units. For example, if the borrowLimit is 200, the quota share can borrow up to 200% of its configured maxCapacity for each capacity unit. The default borrowLimit is -1, which indicates unlimited borrowing."]}
    let context_ = "QuotaShareResourceSharingConfiguration"
    let make ?borrowLimit =
      fun ~strategy -> fun () -> { borrowLimit; strategy }
    let to_value x =
      structure_to_value
        [("strategy",
           (Some (QuotaShareResourceSharingStrategy.to_value x.strategy)));
        ("borrowLimit", (Option.map x.borrowLimit ~f:Integer.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let borrowLimit =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "borrowLimit") in
      let strategy =
        QuotaShareResourceSharingStrategy.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "strategy") in
      make ?borrowLimit ~strategy ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let borrowLimit = field_map json__ "borrowLimit" Integer.of_json in
      let strategy =
        field_map_exn json__ "strategy"
          QuotaShareResourceSharingStrategy.of_json in
      make ?borrowLimit ~strategy ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Specifies whether a quota share reserves, lends, or both lends and borrows idle compute capacity."]
module QuotaShareState =
  struct
    type nonrec t =
      | ENABLED 
      | DISABLED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | ENABLED -> "ENABLED"
      | DISABLED -> "DISABLED"
      | Non_static_id s -> s
    let of_string =
      function
      | "ENABLED" -> ENABLED
      | "DISABLED" -> DISABLED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration QuotaShareState" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"QuotaShareState" j)
    let to_json = simple_to_json to_value
  end
module QuotaShareStatus =
  struct
    type nonrec t =
      | CREATING 
      | VALID 
      | INVALID 
      | UPDATING 
      | DELETING 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | CREATING -> "CREATING"
      | VALID -> "VALID"
      | INVALID -> "INVALID"
      | UPDATING -> "UPDATING"
      | DELETING -> "DELETING"
      | Non_static_id s -> s
    let of_string =
      function
      | "CREATING" -> CREATING
      | "VALID" -> VALID
      | "INVALID" -> INVALID
      | "UPDATING" -> UPDATING
      | "DELETING" -> DELETING
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration QuotaShareStatus" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"QuotaShareStatus" j)
    let to_json = simple_to_json to_value
  end
module ArrayPropertiesSummary =
  struct
    type nonrec t =
      {
      size: Integer.t option
        [@ocaml.doc
          "The size of the array job. This parameter is returned for parent array jobs."];
      index: Integer.t option
        [@ocaml.doc
          "The job index within the array that's associated with this job. This parameter is returned for children of array jobs."];
      statusSummary: ArrayJobStatusSummary.t option
        [@ocaml.doc
          "A summary of the number of array job children in each available job status. This parameter is returned for parent array jobs."];
      statusSummaryLastUpdatedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the statusSummary was last updated."]}
    let make ?size =
      fun ?index ->
        fun ?statusSummary ->
          fun ?statusSummaryLastUpdatedAt ->
            fun () ->
              { size; index; statusSummary; statusSummaryLastUpdatedAt }
    let to_value x =
      structure_to_value
        [("size", (Option.map x.size ~f:Integer.to_value));
        ("index", (Option.map x.index ~f:Integer.to_value));
        ("statusSummary",
          (Option.map x.statusSummary ~f:ArrayJobStatusSummary.to_value));
        ("statusSummaryLastUpdatedAt",
          (Option.map x.statusSummaryLastUpdatedAt ~f:Long.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let statusSummaryLastUpdatedAt =
        (Option.map ~f:Long.of_xml)
          (Xml.child xml_arg0 "statusSummaryLastUpdatedAt") in
      let statusSummary =
        (Option.map ~f:ArrayJobStatusSummary.of_xml)
          (Xml.child xml_arg0 "statusSummary") in
      let index = (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "index") in
      let size = (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "size") in
      make ?statusSummaryLastUpdatedAt ?statusSummary ?index ?size ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let statusSummaryLastUpdatedAt =
        field_map json__ "statusSummaryLastUpdatedAt" Long.of_json in
      let statusSummary =
        field_map json__ "statusSummary" ArrayJobStatusSummary.of_json in
      let index = field_map json__ "index" Integer.of_json in
      let size = field_map json__ "size" Integer.of_json in
      make ?statusSummaryLastUpdatedAt ?statusSummary ?index ?size ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "An object that represents the array properties of a job."]
module ContainerSummary =
  struct
    type nonrec t =
      {
      exitCode: Integer.t option
        [@ocaml.doc "The exit code to return upon completion."];
      reason: String_.t option
        [@ocaml.doc
          "A short (255 max characters) human-readable string to provide additional details for a running or stopped container."]}
    let make ?exitCode = fun ?reason -> fun () -> { exitCode; reason }
    let to_value x =
      structure_to_value
        [("exitCode", (Option.map x.exitCode ~f:Integer.to_value));
        ("reason", (Option.map x.reason ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let reason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "reason") in
      let exitCode =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "exitCode") in
      make ?reason ?exitCode ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let reason = field_map json__ "reason" String_.of_json in
      let exitCode = field_map json__ "exitCode" Integer.of_json in
      make ?reason ?exitCode ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents summary details of a container within a job."]
module JobCapacityUsageSummaryList =
  struct
    type nonrec t = JobCapacityUsageSummary.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:JobCapacityUsageSummary.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:JobCapacityUsageSummary.of_xml)
    let of_json j =
      list_of_json ~kind:"JobCapacityUsageSummaryList"
        ~of_json:JobCapacityUsageSummary.of_json j
    let to_json v = composed_to_json to_value v
  end
module JobStatus =
  struct
    type nonrec t =
      | SUBMITTED 
      | PENDING 
      | RUNNABLE 
      | STARTING 
      | RUNNING 
      | SUCCEEDED 
      | FAILED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | SUBMITTED -> "SUBMITTED"
      | PENDING -> "PENDING"
      | RUNNABLE -> "RUNNABLE"
      | STARTING -> "STARTING"
      | RUNNING -> "RUNNING"
      | SUCCEEDED -> "SUCCEEDED"
      | FAILED -> "FAILED"
      | Non_static_id s -> s
    let of_string =
      function
      | "SUBMITTED" -> SUBMITTED
      | "PENDING" -> PENDING
      | "RUNNABLE" -> RUNNABLE
      | "STARTING" -> STARTING
      | "RUNNING" -> RUNNING
      | "SUCCEEDED" -> SUCCEEDED
      | "FAILED" -> FAILED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration JobStatus" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"JobStatus" j)
    let to_json = simple_to_json to_value
  end
module NodePropertiesSummary =
  struct
    type nonrec t =
      {
      isMainNode: Boolean.t option
        [@ocaml.doc
          "Specifies whether the current node is the main node for a multi-node parallel job."];
      numNodes: Integer.t option
        [@ocaml.doc
          "The number of nodes that are associated with a multi-node parallel job."];
      nodeIndex: Integer.t option
        [@ocaml.doc
          "The node index for the node. Node index numbering begins at zero. This index is also available on the node with the AWS_BATCH_JOB_NODE_INDEX environment variable."]}
    let make ?isMainNode =
      fun ?numNodes ->
        fun ?nodeIndex -> fun () -> { isMainNode; numNodes; nodeIndex }
    let to_value x =
      structure_to_value
        [("isMainNode", (Option.map x.isMainNode ~f:Boolean.to_value));
        ("numNodes", (Option.map x.numNodes ~f:Integer.to_value));
        ("nodeIndex", (Option.map x.nodeIndex ~f:Integer.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nodeIndex =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "nodeIndex") in
      let numNodes =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "numNodes") in
      let isMainNode =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "isMainNode") in
      make ?nodeIndex ?numNodes ?isMainNode ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nodeIndex = field_map json__ "nodeIndex" Integer.of_json in
      let numNodes = field_map json__ "numNodes" Integer.of_json in
      let isMainNode = field_map json__ "isMainNode" Boolean.of_json in
      make ?nodeIndex ?numNodes ?isMainNode ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the properties of a node that's associated with a multi-node parallel job."]
module FrontOfQueueJobSummary =
  struct
    type nonrec t =
      {
      jobArn: String_.t option
        [@ocaml.doc "The ARN for a job in a named job queue."];
      earliestTimeAtPosition: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the job transitioned to its current position in the job queue."]}
    let make ?jobArn =
      fun ?earliestTimeAtPosition ->
        fun () -> { jobArn; earliestTimeAtPosition }
    let to_value x =
      structure_to_value
        [("jobArn", (Option.map x.jobArn ~f:String_.to_value));
        ("earliestTimeAtPosition",
          (Option.map x.earliestTimeAtPosition ~f:Long.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let earliestTimeAtPosition =
        (Option.map ~f:Long.of_xml)
          (Xml.child xml_arg0 "earliestTimeAtPosition") in
      let jobArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobArn") in
      make ?earliestTimeAtPosition ?jobArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let earliestTimeAtPosition =
        field_map json__ "earliestTimeAtPosition" Long.of_json in
      let jobArn = field_map json__ "jobArn" String_.of_json in
      make ?earliestTimeAtPosition ?jobArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents summary details for the first 100 RUNNABLE jobs in a job queue."]
module FrontOfQuotaShareJobSummaryList =
  struct
    type nonrec t = FrontOfQuotaShareJobSummary.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:FrontOfQuotaShareJobSummary.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:FrontOfQuotaShareJobSummary.of_xml)
    let of_json j =
      list_of_json ~kind:"FrontOfQuotaShareJobSummaryList"
        ~of_json:FrontOfQuotaShareJobSummary.of_json j
    let to_json v = composed_to_json to_value v
  end
module FairshareCapacityUtilizationList =
  struct
    type nonrec t = FairshareCapacityUtilization.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:FairshareCapacityUtilization.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:FairshareCapacityUtilization.of_xml)
    let of_json j =
      list_of_json ~kind:"FairshareCapacityUtilizationList"
        ~of_json:FairshareCapacityUtilization.of_json j
    let to_json v = composed_to_json to_value v
  end
module QueueSnapshotCapacityUsage =
  struct
    type nonrec t =
      {
      capacityUnit: String_.t option
        [@ocaml.doc
          "The unit of measure for the capacity usage. For compute jobs, this is VCPU for Amazon EC2 and cpu for Amazon EKS. For service jobs, this is the instance type."];
      quantity: Double.t option
        [@ocaml.doc
          "The quantity of capacity being used in the queue snapshot, measured in the units specified by capacityUnit."]}
    let make ?capacityUnit =
      fun ?quantity -> fun () -> { capacityUnit; quantity }
    let to_value x =
      structure_to_value
        [("capacityUnit", (Option.map x.capacityUnit ~f:String_.to_value));
        ("quantity", (Option.map x.quantity ~f:Double.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let quantity =
        (Option.map ~f:Double.of_xml) (Xml.child xml_arg0 "quantity") in
      let capacityUnit =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "capacityUnit") in
      make ?quantity ?capacityUnit ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let quantity = field_map json__ "quantity" Double.of_json in
      let capacityUnit = field_map json__ "capacityUnit" String_.of_json in
      make ?quantity ?capacityUnit ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The configured capacity usage for a job queue snapshot, including the unit of measure and quantity of resources being used."]
module QuotaShareCapacityUtilizationList =
  struct
    type nonrec t = QuotaShareCapacityUtilization.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:QuotaShareCapacityUtilization.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:QuotaShareCapacityUtilization.of_xml)
    let of_json j =
      list_of_json ~kind:"QuotaShareCapacityUtilizationList"
        ~of_json:QuotaShareCapacityUtilization.of_json j
    let to_json v = composed_to_json to_value v
  end
module ServiceJobPreemptedAttempt =
  struct
    type nonrec t =
      {
      serviceResourceId: ServiceResourceId.t option
        [@ocaml.doc
          "The service resource identifier associated with the service job attempt."];
      startedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the service job attempt was started."];
      stoppedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the service job attempt stopped running."];
      statusReason: String_.t option
        [@ocaml.doc
          "A string that provides additional details for the current status of the service job attempt."]}
    let make ?serviceResourceId =
      fun ?startedAt ->
        fun ?stoppedAt ->
          fun ?statusReason ->
            fun () ->
              { serviceResourceId; startedAt; stoppedAt; statusReason }
    let to_value x =
      structure_to_value
        [("serviceResourceId",
           (Option.map x.serviceResourceId ~f:ServiceResourceId.to_value));
        ("startedAt", (Option.map x.startedAt ~f:Long.to_value));
        ("stoppedAt", (Option.map x.stoppedAt ~f:Long.to_value));
        ("statusReason", (Option.map x.statusReason ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let statusReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "statusReason") in
      let stoppedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "stoppedAt") in
      let startedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "startedAt") in
      let serviceResourceId =
        (Option.map ~f:ServiceResourceId.of_xml)
          (Xml.child xml_arg0 "serviceResourceId") in
      make ?statusReason ?stoppedAt ?startedAt ?serviceResourceId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let statusReason = field_map json__ "statusReason" String_.of_json in
      let stoppedAt = field_map json__ "stoppedAt" Long.of_json in
      let startedAt = field_map json__ "startedAt" Long.of_json in
      let serviceResourceId =
        field_map json__ "serviceResourceId" ServiceResourceId.of_json in
      make ?statusReason ?stoppedAt ?startedAt ?serviceResourceId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Detailed information about a preempted attempt of a service job."]
module CapacityLimits =
  struct
    type nonrec t = CapacityLimit.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:CapacityLimit.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:CapacityLimit.of_xml)
    let of_json j =
      list_of_json ~kind:"CapacityLimits" ~of_json:CapacityLimit.of_json j
    let to_json v = composed_to_json to_value v
  end
module ServiceEnvironmentState =
  struct
    type nonrec t =
      | ENABLED 
      | DISABLED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | ENABLED -> "ENABLED"
      | DISABLED -> "DISABLED"
      | Non_static_id s -> s
    let of_string =
      function
      | "ENABLED" -> ENABLED
      | "DISABLED" -> DISABLED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration ServiceEnvironmentState" xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"ServiceEnvironmentState" j)
    let to_json = simple_to_json to_value
  end
module ServiceEnvironmentStatus =
  struct
    type nonrec t =
      | CREATING 
      | UPDATING 
      | DELETING 
      | DELETED 
      | VALID 
      | INVALID 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | CREATING -> "CREATING"
      | UPDATING -> "UPDATING"
      | DELETING -> "DELETING"
      | DELETED -> "DELETED"
      | VALID -> "VALID"
      | INVALID -> "INVALID"
      | Non_static_id s -> s
    let of_string =
      function
      | "CREATING" -> CREATING
      | "UPDATING" -> UPDATING
      | "DELETING" -> DELETING
      | "DELETED" -> DELETED
      | "VALID" -> VALID
      | "INVALID" -> INVALID
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration ServiceEnvironmentStatus" xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"ServiceEnvironmentStatus" j)
    let to_json = simple_to_json to_value
  end
module ServiceEnvironmentType =
  struct
    type nonrec t =
      | SAGEMAKER_TRAINING 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | SAGEMAKER_TRAINING -> "SAGEMAKER_TRAINING"
      | Non_static_id s -> s
    let of_string =
      function
      | "SAGEMAKER_TRAINING" -> SAGEMAKER_TRAINING
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration ServiceEnvironmentType" xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"ServiceEnvironmentType" j)
    let to_json = simple_to_json to_value
  end
module TagrisTagsMap =
  struct
    type nonrec t = (TagKey.t * TagValue.t) list
    let make i =
      let open Result in
        ok_or_failwith
          ((check_list_max i ~max:50) >>= (fun () -> check_list_min i ~min:1));
        i
    let of_header xs =
      make
        (List.filter_map xs
           ~f:(fun (k, v) ->
                 (Base.String.chop_prefix k ~prefix:"x-amz-meta-") |>
                   (Option.map
                      ~f:(fun chopped ->
                            ((TagKey.of_string chopped),
                              (TagValue.of_string v))))))
    let to_value xs =
      (xs |>
         (List.map
            ~f:(fun (x, y) ->
                  (TagKey.to_value x) |>
                    (fun x -> (TagValue.to_value y) |> (fun y -> (x, y))))))
        |> (fun x -> `Map x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for Map_shape objects" ()
    let of_xml _ =
      failwith "of_xml_converter_of_shape: Map_shape case not implemented"
    let of_json j =
      object_of_json ~key_of_string:TagKey.of_string
        ~of_json:TagValue.of_json j
    let to_json v = composed_to_json to_value v
  end
module FairsharePolicy =
  struct
    type nonrec t =
      {
      shareDecaySeconds: Integer.t option
        [@ocaml.doc
          "The amount of time (in seconds) to use to calculate a fair-share percentage for each share identifier in use. A value of zero (0) indicates the default minimum time window (600 seconds). The maximum supported value is 604800 (1 week). The decay allows for more recently run jobs to have more weight than jobs that ran earlier. Consider adjusting this number if you have jobs that (on average) run longer than ten minutes, or a large difference in job count or job run times between share identifiers, and the allocation of resources doesn't meet your needs."];
      computeReservation: Integer.t option
        [@ocaml.doc
          "A value used to reserve some of the available maximum vCPU for share identifiers that aren't already used. The reserved ratio is (computeReservation/100)^ActiveFairShares where ActiveFairShares is the number of active share identifiers. For example, a computeReservation value of 50 indicates that Batch reserves 50% of the maximum available vCPU if there's only one share identifier. It reserves 25% if there are two share identifiers. It reserves 12.5% if there are three share identifiers. A computeReservation value of 25 indicates that Batch should reserve 25% of the maximum available vCPU if there's only one share identifier, 6.25% if there are two fair share identifiers, and 1.56% if there are three share identifiers. The minimum value is 0 and the maximum value is 99."];
      shareDistribution: ShareAttributesList.t option
        [@ocaml.doc
          "An array of SharedIdentifier objects that contain the weights for the share identifiers for the fair-share policy. Share identifiers that aren't included have a default weight of 1.0."]}
    let make ?shareDecaySeconds =
      fun ?computeReservation ->
        fun ?shareDistribution ->
          fun () ->
            { shareDecaySeconds; computeReservation; shareDistribution }
    let to_value x =
      structure_to_value
        [("shareDecaySeconds",
           (Option.map x.shareDecaySeconds ~f:Integer.to_value));
        ("computeReservation",
          (Option.map x.computeReservation ~f:Integer.to_value));
        ("shareDistribution",
          (Option.map x.shareDistribution ~f:ShareAttributesList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let shareDistribution =
        (Option.map ~f:ShareAttributesList.of_xml)
          (Xml.child xml_arg0 "shareDistribution") in
      let computeReservation =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "computeReservation") in
      let shareDecaySeconds =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "shareDecaySeconds") in
      make ?shareDistribution ?computeReservation ?shareDecaySeconds ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let shareDistribution =
        field_map json__ "shareDistribution" ShareAttributesList.of_json in
      let computeReservation =
        field_map json__ "computeReservation" Integer.of_json in
      let shareDecaySeconds =
        field_map json__ "shareDecaySeconds" Integer.of_json in
      make ?shareDistribution ?computeReservation ?shareDecaySeconds ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "The fair-share scheduling policy details."]
module QuotaSharePolicy =
  struct
    type nonrec t =
      {
      idleResourceAssignmentStrategy:
        QuotaShareIdleResourceAssignmentStrategy.t
        [@ocaml.doc
          "The strategy that determines how idle resources are assigned to quota shares that are borrowing capacity. Currently, only FIFO is supported."]}
    let context_ = "QuotaSharePolicy"
    let make ~idleResourceAssignmentStrategy =
      fun () -> { idleResourceAssignmentStrategy }
    let to_value x =
      structure_to_value
        [("idleResourceAssignmentStrategy",
           (Some
              (QuotaShareIdleResourceAssignmentStrategy.to_value
                 x.idleResourceAssignmentStrategy)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let idleResourceAssignmentStrategy =
        QuotaShareIdleResourceAssignmentStrategy.of_xml
          (Xml.child_exn ~context:context_ xml_arg0
             "idleResourceAssignmentStrategy") in
      make ~idleResourceAssignmentStrategy ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let idleResourceAssignmentStrategy =
        field_map_exn json__ "idleResourceAssignmentStrategy"
          QuotaShareIdleResourceAssignmentStrategy.of_json in
      make ~idleResourceAssignmentStrategy ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The quota share scheduling policy details for a job queue."]
module ArrayPropertiesDetail =
  struct
    type nonrec t =
      {
      statusSummary: ArrayJobStatusSummary.t option
        [@ocaml.doc
          "A summary of the number of array job children in each available job status. This parameter is returned for parent array jobs."];
      statusSummaryLastUpdatedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the statusSummary was last updated."];
      size: Integer.t option
        [@ocaml.doc
          "The size of the array job. This parameter is returned for parent array jobs."];
      index: Integer.t option
        [@ocaml.doc
          "The job index within the array that's associated with this job. This parameter is returned for array job children."]}
    let make ?statusSummary =
      fun ?statusSummaryLastUpdatedAt ->
        fun ?size ->
          fun ?index ->
            fun () ->
              { statusSummary; statusSummaryLastUpdatedAt; size; index }
    let to_value x =
      structure_to_value
        [("statusSummary",
           (Option.map x.statusSummary ~f:ArrayJobStatusSummary.to_value));
        ("statusSummaryLastUpdatedAt",
          (Option.map x.statusSummaryLastUpdatedAt ~f:Long.to_value));
        ("size", (Option.map x.size ~f:Integer.to_value));
        ("index", (Option.map x.index ~f:Integer.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let index = (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "index") in
      let size = (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "size") in
      let statusSummaryLastUpdatedAt =
        (Option.map ~f:Long.of_xml)
          (Xml.child xml_arg0 "statusSummaryLastUpdatedAt") in
      let statusSummary =
        (Option.map ~f:ArrayJobStatusSummary.of_xml)
          (Xml.child xml_arg0 "statusSummary") in
      make ?index ?size ?statusSummaryLastUpdatedAt ?statusSummary ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let index = field_map json__ "index" Integer.of_json in
      let size = field_map json__ "size" Integer.of_json in
      let statusSummaryLastUpdatedAt =
        field_map json__ "statusSummaryLastUpdatedAt" Long.of_json in
      let statusSummary =
        field_map json__ "statusSummary" ArrayJobStatusSummary.of_json in
      make ?index ?size ?statusSummaryLastUpdatedAt ?statusSummary ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "An object that represents the array properties of a job."]
module AttemptDetails =
  struct
    type nonrec t = AttemptDetail.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:AttemptDetail.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:AttemptDetail.of_xml)
    let of_json j =
      list_of_json ~kind:"AttemptDetails" ~of_json:AttemptDetail.of_json j
    let to_json v = composed_to_json to_value v
  end
module ContainerDetail =
  struct
    type nonrec t =
      {
      image: String_.t option
        [@ocaml.doc "The image used to start the container."];
      vcpus: Integer.t option
        [@ocaml.doc
          "The number of vCPUs reserved for the container. For jobs that run on Amazon EC2 resources, you can specify the vCPU requirement for the job using resourceRequirements, but you can't specify the vCPU requirements in both the vcpus and resourceRequirements object. This parameter maps to CpuShares in the Create a container section of the Docker Remote API and the --cpu-shares option to docker run. Each vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU. This is required but can be specified in several places. It must be specified for each node at least once. This parameter isn't applicable to jobs that run on Fargate resources. For jobs that run on Fargate resources, you must specify the vCPU requirement for the job using resourceRequirements."];
      memory: Integer.t option
        [@ocaml.doc
          "For jobs running on Amazon EC2 resources that didn't specify memory requirements using resourceRequirements, the number of MiB of memory reserved for the job. For other jobs, including all run on Fargate resources, see resourceRequirements."];
      command: StringList.t option
        [@ocaml.doc "The command that's passed to the container."];
      jobRoleArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) that's associated with the job when run."];
      executionRoleArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the execution role that Batch can assume. For more information, see Batch execution IAM role in the Batch User Guide."];
      volumes: Volumes.t option
        [@ocaml.doc "A list of volumes that are associated with the job."];
      environment: EnvironmentVariables.t option
        [@ocaml.doc
          "The environment variables to pass to a container. Environment variables cannot start with \"AWS_BATCH\". This naming convention is reserved for variables that Batch sets."];
      mountPoints: MountPoints.t option
        [@ocaml.doc "The mount points for data volumes in your container."];
      readonlyRootFilesystem: Boolean.t option
        [@ocaml.doc
          "When this parameter is true, the container is given read-only access to its root file system. This parameter maps to ReadonlyRootfs in the Create a container section of the Docker Remote API and the --read-only option to docker run ."];
      ulimits: Ulimits.t option
        [@ocaml.doc
          "A list of ulimit values to set in the container. This parameter maps to Ulimits in the Create a container section of the Docker Remote API and the --ulimit option to docker run. This parameter isn't applicable to jobs that are running on Fargate resources."];
      privileged: Boolean.t option
        [@ocaml.doc
          "When this parameter is true, the container is given elevated permissions on the host container instance (similar to the root user). The default value is false. This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, or specified as false."];
      user: String_.t option
        [@ocaml.doc
          "The user name to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run."];
      exitCode: Integer.t option
        [@ocaml.doc "The exit code returned upon completion."];
      reason: String_.t option
        [@ocaml.doc
          "A short (255 max characters) human-readable string to provide additional details for a running or stopped container."];
      containerInstanceArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the container instance that the container is running on."];
      taskArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with the container job. Each container attempt receives a task ARN when they reach the STARTING status."];
      logStreamName: String_.t option
        [@ocaml.doc
          "The name of the Amazon CloudWatch Logs log stream that's associated with the container. The log group for Batch jobs is /aws/batch/job. Each container attempt receives a log stream name when they reach the RUNNING status."];
      instanceType: String_.t option
        [@ocaml.doc
          "The instance type of the underlying host infrastructure of a multi-node parallel job. This parameter isn't applicable to jobs that are running on Fargate resources."];
      networkInterfaces: NetworkInterfaceList.t option
        [@ocaml.doc
          "The network interfaces that are associated with the job."];
      resourceRequirements: ResourceRequirements.t option
        [@ocaml.doc
          "The type and amount of resources to assign to a container. The supported resources include GPU, MEMORY, and VCPU."];
      linuxParameters: LinuxParameters.t option
        [@ocaml.doc
          "Linux-specific modifications that are applied to the container, such as details for device mappings."];
      logConfiguration: LogConfiguration.t option
        [@ocaml.doc
          "The log configuration specification for the container. This parameter maps to LogConfig in the Create a container section of the Docker Remote API and the --log-driver option to docker run. By default, containers use the same logging driver that the Docker daemon uses. However, the container might use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance. Or, alternatively, it must be configured on a different log server for remote logging options. For more information on the options for different supported log drivers, see Configure logging drivers in the Docker documentation. Batch currently supports a subset of the logging drivers available to the Docker daemon (shown in the LogConfiguration data type). Additional log drivers might be available in future releases of the Amazon ECS container agent. This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version | grep \"Server API version\" The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before containers placed on that instance can use these log configuration options. For more information, see Amazon ECS container agent configuration in the Amazon Elastic Container Service Developer Guide."];
      secrets: SecretList.t option
        [@ocaml.doc
          "The secrets to pass to the container. For more information, see Specifying sensitive data in the Batch User Guide."];
      networkConfiguration: NetworkConfiguration.t option
        [@ocaml.doc
          "The network configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon EC2 resources must not specify this parameter."];
      fargatePlatformConfiguration: FargatePlatformConfiguration.t option
        [@ocaml.doc
          "The platform configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon EC2 resources must not specify this parameter."];
      ephemeralStorage: EphemeralStorage.t option
        [@ocaml.doc
          "The amount of ephemeral storage allocated for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate."];
      runtimePlatform: RuntimePlatform.t option
        [@ocaml.doc
          "An object that represents the compute environment architecture for Batch jobs on Fargate."];
      repositoryCredentials: RepositoryCredentials.t option
        [@ocaml.doc
          "The private repository authentication credentials to use."];
      enableExecuteCommand: Boolean.t option
        [@ocaml.doc
          "Determines whether execute command functionality is turned on for this task. If true, execute command functionality is turned on all the containers in the task."]}
    let make ?image =
      fun ?vcpus ->
        fun ?memory ->
          fun ?command ->
            fun ?jobRoleArn ->
              fun ?executionRoleArn ->
                fun ?volumes ->
                  fun ?environment ->
                    fun ?mountPoints ->
                      fun ?readonlyRootFilesystem ->
                        fun ?ulimits ->
                          fun ?privileged ->
                            fun ?user ->
                              fun ?exitCode ->
                                fun ?reason ->
                                  fun ?containerInstanceArn ->
                                    fun ?taskArn ->
                                      fun ?logStreamName ->
                                        fun ?instanceType ->
                                          fun ?networkInterfaces ->
                                            fun ?resourceRequirements ->
                                              fun ?linuxParameters ->
                                                fun ?logConfiguration ->
                                                  fun ?secrets ->
                                                    fun ?networkConfiguration
                                                      ->
                                                      fun
                                                        ?fargatePlatformConfiguration
                                                        ->
                                                        fun ?ephemeralStorage
                                                          ->
                                                          fun
                                                            ?runtimePlatform
                                                            ->
                                                            fun
                                                              ?repositoryCredentials
                                                              ->
                                                              fun
                                                                ?enableExecuteCommand
                                                                ->
                                                                fun () ->
                                                                  {
                                                                    image;
                                                                    vcpus;
                                                                    memory;
                                                                    command;
                                                                    jobRoleArn;
                                                                    executionRoleArn;
                                                                    volumes;
                                                                    environment;
                                                                    mountPoints;
                                                                    readonlyRootFilesystem;
                                                                    ulimits;
                                                                    privileged;
                                                                    user;
                                                                    exitCode;
                                                                    reason;
                                                                    containerInstanceArn;
                                                                    taskArn;
                                                                    logStreamName;
                                                                    instanceType;
                                                                    networkInterfaces;
                                                                    resourceRequirements;
                                                                    linuxParameters;
                                                                    logConfiguration;
                                                                    secrets;
                                                                    networkConfiguration;
                                                                    fargatePlatformConfiguration;
                                                                    ephemeralStorage;
                                                                    runtimePlatform;
                                                                    repositoryCredentials;
                                                                    enableExecuteCommand
                                                                  }
    let to_value x =
      structure_to_value
        [("image", (Option.map x.image ~f:String_.to_value));
        ("vcpus", (Option.map x.vcpus ~f:Integer.to_value));
        ("memory", (Option.map x.memory ~f:Integer.to_value));
        ("command", (Option.map x.command ~f:StringList.to_value));
        ("jobRoleArn", (Option.map x.jobRoleArn ~f:String_.to_value));
        ("executionRoleArn",
          (Option.map x.executionRoleArn ~f:String_.to_value));
        ("volumes", (Option.map x.volumes ~f:Volumes.to_value));
        ("environment",
          (Option.map x.environment ~f:EnvironmentVariables.to_value));
        ("mountPoints", (Option.map x.mountPoints ~f:MountPoints.to_value));
        ("readonlyRootFilesystem",
          (Option.map x.readonlyRootFilesystem ~f:Boolean.to_value));
        ("ulimits", (Option.map x.ulimits ~f:Ulimits.to_value));
        ("privileged", (Option.map x.privileged ~f:Boolean.to_value));
        ("user", (Option.map x.user ~f:String_.to_value));
        ("exitCode", (Option.map x.exitCode ~f:Integer.to_value));
        ("reason", (Option.map x.reason ~f:String_.to_value));
        ("containerInstanceArn",
          (Option.map x.containerInstanceArn ~f:String_.to_value));
        ("taskArn", (Option.map x.taskArn ~f:String_.to_value));
        ("logStreamName", (Option.map x.logStreamName ~f:String_.to_value));
        ("instanceType", (Option.map x.instanceType ~f:String_.to_value));
        ("networkInterfaces",
          (Option.map x.networkInterfaces ~f:NetworkInterfaceList.to_value));
        ("resourceRequirements",
          (Option.map x.resourceRequirements ~f:ResourceRequirements.to_value));
        ("linuxParameters",
          (Option.map x.linuxParameters ~f:LinuxParameters.to_value));
        ("logConfiguration",
          (Option.map x.logConfiguration ~f:LogConfiguration.to_value));
        ("secrets", (Option.map x.secrets ~f:SecretList.to_value));
        ("networkConfiguration",
          (Option.map x.networkConfiguration ~f:NetworkConfiguration.to_value));
        ("fargatePlatformConfiguration",
          (Option.map x.fargatePlatformConfiguration
             ~f:FargatePlatformConfiguration.to_value));
        ("ephemeralStorage",
          (Option.map x.ephemeralStorage ~f:EphemeralStorage.to_value));
        ("runtimePlatform",
          (Option.map x.runtimePlatform ~f:RuntimePlatform.to_value));
        ("repositoryCredentials",
          (Option.map x.repositoryCredentials
             ~f:RepositoryCredentials.to_value));
        ("enableExecuteCommand",
          (Option.map x.enableExecuteCommand ~f:Boolean.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let enableExecuteCommand =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "enableExecuteCommand") in
      let repositoryCredentials =
        (Option.map ~f:RepositoryCredentials.of_xml)
          (Xml.child xml_arg0 "repositoryCredentials") in
      let runtimePlatform =
        (Option.map ~f:RuntimePlatform.of_xml)
          (Xml.child xml_arg0 "runtimePlatform") in
      let ephemeralStorage =
        (Option.map ~f:EphemeralStorage.of_xml)
          (Xml.child xml_arg0 "ephemeralStorage") in
      let fargatePlatformConfiguration =
        (Option.map ~f:FargatePlatformConfiguration.of_xml)
          (Xml.child xml_arg0 "fargatePlatformConfiguration") in
      let networkConfiguration =
        (Option.map ~f:NetworkConfiguration.of_xml)
          (Xml.child xml_arg0 "networkConfiguration") in
      let secrets =
        (Option.map ~f:SecretList.of_xml) (Xml.child xml_arg0 "secrets") in
      let logConfiguration =
        (Option.map ~f:LogConfiguration.of_xml)
          (Xml.child xml_arg0 "logConfiguration") in
      let linuxParameters =
        (Option.map ~f:LinuxParameters.of_xml)
          (Xml.child xml_arg0 "linuxParameters") in
      let resourceRequirements =
        (Option.map ~f:ResourceRequirements.of_xml)
          (Xml.child xml_arg0 "resourceRequirements") in
      let networkInterfaces =
        (Option.map ~f:NetworkInterfaceList.of_xml)
          (Xml.child xml_arg0 "networkInterfaces") in
      let instanceType =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "instanceType") in
      let logStreamName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "logStreamName") in
      let taskArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "taskArn") in
      let containerInstanceArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "containerInstanceArn") in
      let reason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "reason") in
      let exitCode =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "exitCode") in
      let user = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "user") in
      let privileged =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "privileged") in
      let ulimits =
        (Option.map ~f:Ulimits.of_xml) (Xml.child xml_arg0 "ulimits") in
      let readonlyRootFilesystem =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "readonlyRootFilesystem") in
      let mountPoints =
        (Option.map ~f:MountPoints.of_xml) (Xml.child xml_arg0 "mountPoints") in
      let environment =
        (Option.map ~f:EnvironmentVariables.of_xml)
          (Xml.child xml_arg0 "environment") in
      let volumes =
        (Option.map ~f:Volumes.of_xml) (Xml.child xml_arg0 "volumes") in
      let executionRoleArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "executionRoleArn") in
      let jobRoleArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobRoleArn") in
      let command =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "command") in
      let memory =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "memory") in
      let vcpus = (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "vcpus") in
      let image = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "image") in
      make ?enableExecuteCommand ?repositoryCredentials ?runtimePlatform
        ?ephemeralStorage ?fargatePlatformConfiguration ?networkConfiguration
        ?secrets ?logConfiguration ?linuxParameters ?resourceRequirements
        ?networkInterfaces ?instanceType ?logStreamName ?taskArn
        ?containerInstanceArn ?reason ?exitCode ?user ?privileged ?ulimits
        ?readonlyRootFilesystem ?mountPoints ?environment ?volumes
        ?executionRoleArn ?jobRoleArn ?command ?memory ?vcpus ?image ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let enableExecuteCommand =
        field_map json__ "enableExecuteCommand" Boolean.of_json in
      let repositoryCredentials =
        field_map json__ "repositoryCredentials"
          RepositoryCredentials.of_json in
      let runtimePlatform =
        field_map json__ "runtimePlatform" RuntimePlatform.of_json in
      let ephemeralStorage =
        field_map json__ "ephemeralStorage" EphemeralStorage.of_json in
      let fargatePlatformConfiguration =
        field_map json__ "fargatePlatformConfiguration"
          FargatePlatformConfiguration.of_json in
      let networkConfiguration =
        field_map json__ "networkConfiguration" NetworkConfiguration.of_json in
      let secrets = field_map json__ "secrets" SecretList.of_json in
      let logConfiguration =
        field_map json__ "logConfiguration" LogConfiguration.of_json in
      let linuxParameters =
        field_map json__ "linuxParameters" LinuxParameters.of_json in
      let resourceRequirements =
        field_map json__ "resourceRequirements" ResourceRequirements.of_json in
      let networkInterfaces =
        field_map json__ "networkInterfaces" NetworkInterfaceList.of_json in
      let instanceType = field_map json__ "instanceType" String_.of_json in
      let logStreamName = field_map json__ "logStreamName" String_.of_json in
      let taskArn = field_map json__ "taskArn" String_.of_json in
      let containerInstanceArn =
        field_map json__ "containerInstanceArn" String_.of_json in
      let reason = field_map json__ "reason" String_.of_json in
      let exitCode = field_map json__ "exitCode" Integer.of_json in
      let user = field_map json__ "user" String_.of_json in
      let privileged = field_map json__ "privileged" Boolean.of_json in
      let ulimits = field_map json__ "ulimits" Ulimits.of_json in
      let readonlyRootFilesystem =
        field_map json__ "readonlyRootFilesystem" Boolean.of_json in
      let mountPoints = field_map json__ "mountPoints" MountPoints.of_json in
      let environment =
        field_map json__ "environment" EnvironmentVariables.of_json in
      let volumes = field_map json__ "volumes" Volumes.of_json in
      let executionRoleArn =
        field_map json__ "executionRoleArn" String_.of_json in
      let jobRoleArn = field_map json__ "jobRoleArn" String_.of_json in
      let command = field_map json__ "command" StringList.of_json in
      let memory = field_map json__ "memory" Integer.of_json in
      let vcpus = field_map json__ "vcpus" Integer.of_json in
      let image = field_map json__ "image" String_.of_json in
      make ?enableExecuteCommand ?repositoryCredentials ?runtimePlatform
        ?ephemeralStorage ?fargatePlatformConfiguration ?networkConfiguration
        ?secrets ?logConfiguration ?linuxParameters ?resourceRequirements
        ?networkInterfaces ?instanceType ?logStreamName ?taskArn
        ?containerInstanceArn ?reason ?exitCode ?user ?privileged ?ulimits
        ?readonlyRootFilesystem ?mountPoints ?environment ?volumes
        ?executionRoleArn ?jobRoleArn ?command ?memory ?vcpus ?image ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the details of a container that's part of a job."]
module EcsPropertiesDetail =
  struct
    type nonrec t =
      {
      taskProperties: ListEcsTaskDetails.t option
        [@ocaml.doc
          "The properties for the Amazon ECS task definition of a job."]}
    let make ?taskProperties = fun () -> { taskProperties }
    let to_value x =
      structure_to_value
        [("taskProperties",
           (Option.map x.taskProperties ~f:ListEcsTaskDetails.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let taskProperties =
        (Option.map ~f:ListEcsTaskDetails.of_xml)
          (Xml.child xml_arg0 "taskProperties") in
      make ?taskProperties ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let taskProperties =
        field_map json__ "taskProperties" ListEcsTaskDetails.of_json in
      make ?taskProperties ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that contains the details for the Amazon ECS resources of a job."]
module EksAttemptDetails =
  struct
    type nonrec t = EksAttemptDetail.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:EksAttemptDetail.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:EksAttemptDetail.of_xml)
    let of_json j =
      list_of_json ~kind:"EksAttemptDetails"
        ~of_json:EksAttemptDetail.of_json j
    let to_json v = composed_to_json to_value v
  end
module EksPropertiesDetail =
  struct
    type nonrec t =
      {
      podProperties: EksPodPropertiesDetail.t option
        [@ocaml.doc
          "The properties for the Kubernetes pod resources of a job."]}
    let make ?podProperties = fun () -> { podProperties }
    let to_value x =
      structure_to_value
        [("podProperties",
           (Option.map x.podProperties ~f:EksPodPropertiesDetail.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let podProperties =
        (Option.map ~f:EksPodPropertiesDetail.of_xml)
          (Xml.child xml_arg0 "podProperties") in
      make ?podProperties ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let podProperties =
        field_map json__ "podProperties" EksPodPropertiesDetail.of_json in
      make ?podProperties ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that contains the details for the Kubernetes resources of a job."]
module JobDependencyList =
  struct
    type nonrec t = JobDependency.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:JobDependency.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:JobDependency.of_xml)
    let of_json j =
      list_of_json ~kind:"JobDependencyList" ~of_json:JobDependency.of_json j
    let to_json v = composed_to_json to_value v
  end
module JobTimeout =
  struct
    type nonrec t =
      {
      attemptDurationSeconds: Integer.t option
        [@ocaml.doc
          "The job timeout time (in seconds) that's measured from the job attempt's startedAt timestamp. After this time passes, Batch terminates your jobs if they aren't finished. The minimum value for the timeout is 60 seconds. For array jobs, the timeout applies to the child jobs, not to the parent array job. For multi-node parallel (MNP) jobs, the timeout applies to the whole job, not to the individual nodes."]}
    let make ?attemptDurationSeconds = fun () -> { attemptDurationSeconds }
    let to_value x =
      structure_to_value
        [("attemptDurationSeconds",
           (Option.map x.attemptDurationSeconds ~f:Integer.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let attemptDurationSeconds =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "attemptDurationSeconds") in
      make ?attemptDurationSeconds ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let attemptDurationSeconds =
        field_map json__ "attemptDurationSeconds" Integer.of_json in
      make ?attemptDurationSeconds ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "An object that represents a job timeout configuration."]
module NodeDetails =
  struct
    type nonrec t =
      {
      nodeIndex: Integer.t option
        [@ocaml.doc
          "The node index for the node. Node index numbering starts at zero. This index is also available on the node with the AWS_BATCH_JOB_NODE_INDEX environment variable."];
      isMainNode: Boolean.t option
        [@ocaml.doc
          "Specifies whether the current node is the main node for a multi-node parallel job."]}
    let make ?nodeIndex =
      fun ?isMainNode -> fun () -> { nodeIndex; isMainNode }
    let to_value x =
      structure_to_value
        [("nodeIndex", (Option.map x.nodeIndex ~f:Integer.to_value));
        ("isMainNode", (Option.map x.isMainNode ~f:Boolean.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let isMainNode =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "isMainNode") in
      let nodeIndex =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "nodeIndex") in
      make ?isMainNode ?nodeIndex ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let isMainNode = field_map json__ "isMainNode" Boolean.of_json in
      let nodeIndex = field_map json__ "nodeIndex" Integer.of_json in
      make ?isMainNode ?nodeIndex ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the details of a multi-node parallel job node."]
module NodeProperties =
  struct
    type nonrec t =
      {
      numNodes: Integer.t
        [@ocaml.doc
          "The number of nodes that are associated with a multi-node parallel job."];
      mainNode: Integer.t
        [@ocaml.doc
          "Specifies the node index for the main node of a multi-node parallel job. This node index value must be fewer than the number of nodes."];
      nodeRangeProperties: NodeRangeProperties.t
        [@ocaml.doc
          "A list of node ranges and their properties that are associated with a multi-node parallel job."]}
    let context_ = "NodeProperties"
    let make ~numNodes =
      fun ~mainNode ->
        fun ~nodeRangeProperties ->
          fun () -> { numNodes; mainNode; nodeRangeProperties }
    let to_value x =
      structure_to_value
        [("numNodes", (Some (Integer.to_value x.numNodes)));
        ("mainNode", (Some (Integer.to_value x.mainNode)));
        ("nodeRangeProperties",
          (Some (NodeRangeProperties.to_value x.nodeRangeProperties)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nodeRangeProperties =
        NodeRangeProperties.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "nodeRangeProperties") in
      let mainNode =
        Integer.of_xml (Xml.child_exn ~context:context_ xml_arg0 "mainNode") in
      let numNodes =
        Integer.of_xml (Xml.child_exn ~context:context_ xml_arg0 "numNodes") in
      make ~nodeRangeProperties ~mainNode ~numNodes ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nodeRangeProperties =
        field_map_exn json__ "nodeRangeProperties"
          NodeRangeProperties.of_json in
      let mainNode = field_map_exn json__ "mainNode" Integer.of_json in
      let numNodes = field_map_exn json__ "numNodes" Integer.of_json in
      make ~nodeRangeProperties ~mainNode ~numNodes ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the node properties of a multi-node parallel job. Node properties can't be specified for Amazon EKS based job definitions."]
module ParametersMap =
  struct
    type nonrec t = (String_.t * String_.t) list
    let make i = i
    let of_header xs =
      make
        (List.filter_map xs
           ~f:(fun (k, v) ->
                 (Base.String.chop_prefix k ~prefix:"x-amz-meta-") |>
                   (Option.map
                      ~f:(fun chopped ->
                            ((String_.of_string chopped),
                              (String_.of_string v))))))
    let to_value xs =
      (xs |>
         (List.map
            ~f:(fun (x, y) ->
                  (String_.to_value x) |>
                    (fun x -> (String_.to_value y) |> (fun y -> (x, y))))))
        |> (fun x -> `Map x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for Map_shape objects" ()
    let of_xml _ =
      failwith "of_xml_converter_of_shape: Map_shape case not implemented"
    let of_json j =
      object_of_json ~key_of_string:String_.of_string
        ~of_json:String_.of_json j
    let to_json v = composed_to_json to_value v
  end
module PlatformCapabilityList =
  struct
    type nonrec t = PlatformCapability.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:PlatformCapability.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:PlatformCapability.of_xml)
    let of_json j =
      list_of_json ~kind:"PlatformCapabilityList"
        ~of_json:PlatformCapability.of_json j
    let to_json v = composed_to_json to_value v
  end
module RetryStrategy =
  struct
    type nonrec t =
      {
      attempts: Integer.t option
        [@ocaml.doc
          "The number of times to move a job to the RUNNABLE status. You can specify between 1 and 10 attempts. If the value of attempts is greater than one, the job is retried on failure the same number of attempts as the value."];
      evaluateOnExit: EvaluateOnExitList.t option
        [@ocaml.doc
          "Array of up to 5 objects that specify the conditions where jobs are retried or failed. If this parameter is specified, then the attempts parameter must also be specified. If none of the listed conditions match, then the job is retried."]}
    let make ?attempts =
      fun ?evaluateOnExit -> fun () -> { attempts; evaluateOnExit }
    let to_value x =
      structure_to_value
        [("attempts", (Option.map x.attempts ~f:Integer.to_value));
        ("evaluateOnExit",
          (Option.map x.evaluateOnExit ~f:EvaluateOnExitList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let evaluateOnExit =
        (Option.map ~f:EvaluateOnExitList.of_xml)
          (Xml.child xml_arg0 "evaluateOnExit") in
      let attempts =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "attempts") in
      make ?evaluateOnExit ?attempts ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let evaluateOnExit =
        field_map json__ "evaluateOnExit" EvaluateOnExitList.of_json in
      let attempts = field_map json__ "attempts" Integer.of_json in
      make ?evaluateOnExit ?attempts ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The retry strategy that's associated with a job. For more information, see Automated job retries in the Batch User Guide."]
module ComputeEnvironmentOrders =
  struct
    type nonrec t = ComputeEnvironmentOrder.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ComputeEnvironmentOrder.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ComputeEnvironmentOrder.of_xml)
    let of_json j =
      list_of_json ~kind:"ComputeEnvironmentOrders"
        ~of_json:ComputeEnvironmentOrder.of_json j
    let to_json v = composed_to_json to_value v
  end
module JQState =
  struct
    type nonrec t =
      | ENABLED 
      | DISABLED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | ENABLED -> "ENABLED"
      | DISABLED -> "DISABLED"
      | Non_static_id s -> s
    let of_string =
      function
      | "ENABLED" -> ENABLED
      | "DISABLED" -> DISABLED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration JQState" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"JQState" j)
    let to_json = simple_to_json to_value
  end
module JQStatus =
  struct
    type nonrec t =
      | CREATING 
      | UPDATING 
      | DELETING 
      | DELETED 
      | VALID 
      | INVALID 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | CREATING -> "CREATING"
      | UPDATING -> "UPDATING"
      | DELETING -> "DELETING"
      | DELETED -> "DELETED"
      | VALID -> "VALID"
      | INVALID -> "INVALID"
      | Non_static_id s -> s
    let of_string =
      function
      | "CREATING" -> CREATING
      | "UPDATING" -> UPDATING
      | "DELETING" -> DELETING
      | "DELETED" -> DELETED
      | "VALID" -> VALID
      | "INVALID" -> INVALID
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration JQStatus" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"JQStatus" j)
    let to_json = simple_to_json to_value
  end
module JobQueueType =
  struct
    type nonrec t =
      | EKS 
      | ECS 
      | ECS_FARGATE 
      | SAGEMAKER_TRAINING 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | EKS -> "EKS"
      | ECS -> "ECS"
      | ECS_FARGATE -> "ECS_FARGATE"
      | SAGEMAKER_TRAINING -> "SAGEMAKER_TRAINING"
      | Non_static_id s -> s
    let of_string =
      function
      | "EKS" -> EKS
      | "ECS" -> ECS
      | "ECS_FARGATE" -> ECS_FARGATE
      | "SAGEMAKER_TRAINING" -> SAGEMAKER_TRAINING
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration JobQueueType" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"JobQueueType" j)
    let to_json = simple_to_json to_value
  end
module JobStateTimeLimitActions =
  struct
    type nonrec t = JobStateTimeLimitAction.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:JobStateTimeLimitAction.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:JobStateTimeLimitAction.of_xml)
    let of_json j =
      list_of_json ~kind:"JobStateTimeLimitActions"
        ~of_json:JobStateTimeLimitAction.of_json j
    let to_json v = composed_to_json to_value v
  end
module ServiceEnvironmentOrders =
  struct
    type nonrec t = ServiceEnvironmentOrder.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ServiceEnvironmentOrder.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ServiceEnvironmentOrder.of_xml)
    let of_json j =
      list_of_json ~kind:"ServiceEnvironmentOrders"
        ~of_json:ServiceEnvironmentOrder.of_json j
    let to_json v = composed_to_json to_value v
  end
module OrchestrationType =
  struct
    type nonrec t =
      | ECS 
      | EKS 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function | ECS -> "ECS" | EKS -> "EKS" | Non_static_id s -> s
    let of_string =
      function | "ECS" -> ECS | "EKS" -> EKS | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration OrchestrationType" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"OrchestrationType" j)
    let to_json = simple_to_json to_value
  end
module CEState =
  struct
    type nonrec t =
      | ENABLED 
      | DISABLED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | ENABLED -> "ENABLED"
      | DISABLED -> "DISABLED"
      | Non_static_id s -> s
    let of_string =
      function
      | "ENABLED" -> ENABLED
      | "DISABLED" -> DISABLED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration CEState" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"CEState" j)
    let to_json = simple_to_json to_value
  end
module CEStatus =
  struct
    type nonrec t =
      | CREATING 
      | UPDATING 
      | DELETING 
      | DELETED 
      | VALID 
      | INVALID 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | CREATING -> "CREATING"
      | UPDATING -> "UPDATING"
      | DELETING -> "DELETING"
      | DELETED -> "DELETED"
      | VALID -> "VALID"
      | INVALID -> "INVALID"
      | Non_static_id s -> s
    let of_string =
      function
      | "CREATING" -> CREATING
      | "UPDATING" -> UPDATING
      | "DELETING" -> DELETING
      | "DELETED" -> DELETED
      | "VALID" -> VALID
      | "INVALID" -> INVALID
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration CEStatus" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"CEStatus" j)
    let to_json = simple_to_json to_value
  end
module CEType =
  struct
    type nonrec t =
      | MANAGED 
      | UNMANAGED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | MANAGED -> "MANAGED"
      | UNMANAGED -> "UNMANAGED"
      | Non_static_id s -> s
    let of_string =
      function
      | "MANAGED" -> MANAGED
      | "UNMANAGED" -> UNMANAGED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration CEType" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"CEType" j)
    let to_json = simple_to_json to_value
  end
module ComputeResource =
  struct
    type nonrec t =
      {
      type_: CRType.t
        [@ocaml.doc
          "The type of compute environment: EC2, SPOT, FARGATE, or FARGATE_SPOT. For more information, see Compute environments in the Batch User Guide. If you choose SPOT, you must also specify an Amazon EC2 Spot Fleet role with the spotIamFleetRole parameter. For more information, see Amazon EC2 spot fleet role in the Batch User Guide. Multi-node parallel jobs aren't supported on Spot Instances."];
      allocationStrategy: CRAllocationStrategy.t option
        [@ocaml.doc
          "The allocation strategy to use for the compute resource if not enough instances of the best fitting instance type can be allocated. This might be because of availability of the instance type in the Region or Amazon EC2 service limits. For more information, see Allocation strategies in the Batch User Guide. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it. BEST_FIT (default) Batch selects an instance type that best fits the needs of the jobs with a preference for the lowest-cost instance type. If additional instances of the selected instance type aren't available, Batch waits for the additional instances to be available. If there aren't enough instances available or the user is reaching Amazon EC2 service limits, additional jobs aren't run until the currently running jobs are completed. This allocation strategy keeps costs lower but can limit scaling. If you're using Spot Fleets with BEST_FIT, the Spot Fleet IAM Role must be specified. Compute resources that use a BEST_FIT allocation strategy don't support infrastructure updates and can't update some parameters. For more information, see Updating compute environments in the Batch User Guide. BEST_FIT_PROGRESSIVE Batch selects additional instance types that are large enough to meet the requirements of the jobs in the queue. Its preference is for instance types with lower cost vCPUs. If additional instances of the previously selected instance types aren't available, Batch selects new instance types. SPOT_CAPACITY_OPTIMIZED Batch selects one or more instance types that are large enough to meet the requirements of the jobs in the queue. Its preference is for instance types that are less likely to be interrupted. This allocation strategy is only available for Spot Instance compute resources. SPOT_PRICE_CAPACITY_OPTIMIZED The price and capacity optimized allocation strategy looks at both price and capacity to select the Spot Instance pools that are the least likely to be interrupted and have the lowest possible price. This allocation strategy is only available for Spot Instance compute resources. With BEST_FIT_PROGRESSIVE,SPOT_CAPACITY_OPTIMIZED and SPOT_PRICE_CAPACITY_OPTIMIZED (recommended) strategies using On-Demand or Spot Instances, and the BEST_FIT strategy using Spot Instances, Batch might need to exceed maxvCpus to meet your capacity requirements. In this event, Batch never exceeds maxvCpus by more than a single instance."];
      minvCpus: Integer.t option
        [@ocaml.doc
          "The minimum number of vCPUs that a compute environment should maintain (even if the compute environment is DISABLED). This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      maxvCpus: Integer.t
        [@ocaml.doc
          "The maximum number of vCPUs that a compute environment can support. With BEST_FIT_PROGRESSIVE,SPOT_CAPACITY_OPTIMIZED and SPOT_PRICE_CAPACITY_OPTIMIZED (recommended) strategies using On-Demand or Spot Instances, and the BEST_FIT strategy using Spot Instances, Batch might need to exceed maxvCpus to meet your capacity requirements. In this event, Batch never exceeds maxvCpus by more than a single instance."];
      desiredvCpus: Integer.t option
        [@ocaml.doc
          "The desired number of vCPUS in the compute environment. Batch modifies this value between the minimum and maximum values based on job queue demand. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      instanceTypes: StringList.t option
        [@ocaml.doc
          "The instances types that can be launched. You can specify instance families to launch any instance type within those families (for example, c5 or p3), or you can specify specific sizes within a family (such as c5.8xlarge). Batch can select the instance type for you if you choose one of the following: optimal to select instance types (from the c4, m4, r4, c5, m5, and r5 instance families) that match the demand of your job queues. default_x86_64 to choose x86 based instance types (from the m6i, c6i, r6i, and c7i instance families) that matches the resource demands of the job queue. default_arm64 to choose ARM based instance types (from the m6g, c6g, r6g, and c7g instance families) that matches the resource demands of the job queue. Starting on 11/01/2025 the behavior of optimal is going to be changed to match default_x86_64. During the change your instance families could be updated to a newer generation. You do not need to perform any actions for the upgrade to happen. For more information about change, see Optimal instance type configuration to receive automatic instance family updates. Instance family availability varies by Amazon Web Services Region. For example, some Amazon Web Services Regions may not have any fourth generation instance families but have fifth and sixth generation instance families. When using default_x86_64 or default_arm64 instance bundles, Batch selects instance families based on a balance of cost-effectiveness and performance. While newer generation instances often provide better price-performance, Batch may choose an earlier generation instance family if it provides the optimal combination of availability, cost, and performance for your workload. For example, in an Amazon Web Services Region where both c6i and c7i instances are available, Batch might select c6i instances if they offer better cost-effectiveness for your specific job requirements. For more information on Batch instance types and Amazon Web Services Region availability, see Instance type compute table in the Batch User Guide. Batch periodically updates your instances in default bundles to newer, more cost-effective options. Updates happen automatically without requiring any action from you. Your workloads continue running during updates with no interruption This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it. When you create a compute environment, the instance types that you select for the compute environment must share the same architecture. For example, you can't mix x86 and ARM instances in the same compute environment."];
      imageId: String_.t option
        [@ocaml.doc
          "The Amazon Machine Image (AMI) ID used for instances launched in the compute environment. This parameter is overridden by the imageIdOverride member of the Ec2Configuration structure. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it. The AMI that you choose for a compute environment must match the architecture of the instance types that you intend to use for that compute environment. For example, if your compute environment uses A1 instance types, the compute resource AMI that you choose must support ARM instances. Amazon ECS vends both x86 and ARM versions of the Amazon ECS-optimized Amazon Linux 2023 AMI. For more information, see Amazon ECS-optimized Amazon Linux 2023 AMI in the Amazon Elastic Container Service Developer Guide."];
      subnets: StringList.t
        [@ocaml.doc
          "The VPC subnets where the compute resources are launched. These subnets must be within the same VPC. Fargate compute resources can contain up to 16 subnets. For more information, see VPCs and subnets in the Amazon VPC User Guide. Batch on Amazon EC2 and Batch on Amazon EKS support Local Zones. For more information, see Local Zones in the Amazon EC2 User Guide for Linux Instances, Amazon EKS and Amazon Web Services Local Zones in the Amazon EKS User Guide and Amazon ECS clusters in Local Zones, Wavelength Zones, and Amazon Web Services Outposts in the Amazon ECS Developer Guide. Batch on Fargate doesn't currently support Local Zones."];
      securityGroupIds: StringList.t option
        [@ocaml.doc
          "The Amazon EC2 security groups that are associated with instances launched in the compute environment. One or more security groups must be specified, either in securityGroupIds or using a launch template referenced in launchTemplate. This parameter is required for jobs that are running on Fargate resources and must contain at least one security group. Fargate doesn't support launch templates. If security groups are specified using both securityGroupIds and launchTemplate, the values in securityGroupIds are used."];
      ec2KeyPair: String_.t option
        [@ocaml.doc
          "The Amazon EC2 key pair that's used for instances launched in the compute environment. You can use this key pair to log in to your instances with SSH. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      instanceRole: String_.t option
        [@ocaml.doc
          "The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment. This parameter is required for Amazon EC2 instances types. You can specify the short name or full Amazon Resource Name (ARN) of an instance profile. For example, ecsInstanceRole or arn:aws:iam::<aws_account_id>:instance-profile/ecsInstanceRole . For more information, see Amazon ECS instance role in the Batch User Guide. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      tags: TagsMap.t option
        [@ocaml.doc
          "Key-value pair tags to be applied to Amazon EC2 resources that are launched in the compute environment. For Batch, these take the form of \"String1\": \"String2\", where String1 is the tag key and String2 is the tag value (for example, \\{ \"Name\": \"Batch Instance - C4OnDemand\" \\}). This is helpful for recognizing your Batch instances in the Amazon EC2 console. Updating these tags requires an infrastructure update to the compute environment. For more information, see Updating compute environments in the Batch User Guide. These tags aren't seen when using the Batch ListTagsForResource API operation. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      placementGroup: String_.t option
        [@ocaml.doc
          "The Amazon EC2 placement group to associate with your compute resources. If you intend to submit multi-node parallel jobs to your compute environment, you should consider creating a cluster placement group and associate it with your compute resources. This keeps your multi-node parallel job on a logical grouping of instances within a single Availability Zone with high network flow potential. For more information, see Placement groups in the Amazon EC2 User Guide for Linux Instances. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      bidPercentage: Integer.t option
        [@ocaml.doc
          "The maximum percentage that a Spot Instance price can be when compared with the On-Demand price for that instance type before instances are launched. For example, if your maximum percentage is 20%, then the Spot price must be less than 20% of the current On-Demand price for that Amazon EC2 instance. You always pay the lowest (market) price and never more than your maximum percentage. If you leave this field empty, the default value is 100% of the On-Demand price. For most use cases, we recommend leaving this field empty. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      spotIamFleetRole: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT compute environment. This role is required if the allocation strategy set to BEST_FIT or if the allocation strategy isn't specified. For more information, see Amazon EC2 spot fleet role in the Batch User Guide. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it. To tag your Spot Instances on creation, the Spot Fleet IAM role specified here must use the newer AmazonEC2SpotFleetTaggingRole managed policy. The previously recommended AmazonEC2SpotFleetRole managed policy doesn't have the required permissions to tag Spot Instances. For more information, see Spot instances not tagged on creation in the Batch User Guide."];
      launchTemplate: LaunchTemplateSpecification.t option
        [@ocaml.doc
          "The launch template to use for your compute resources. Any other compute resource parameters that you specify in a CreateComputeEnvironment API operation override the same parameters in the launch template. You must specify either the launch template ID or launch template name in the request, but not both. For more information, see Launch template support in the Batch User Guide. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      ec2Configuration: Ec2ConfigurationList.t option
        [@ocaml.doc
          "Provides information that's used to select Amazon Machine Images (AMIs) for Amazon EC2 instances in the compute environment. If Ec2Configuration isn't specified, the default is ECS_AL2023 for EC2 (ECS) compute environments and EKS_AL2023 for EKS compute environments. One or two values can be provided. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      scalingPolicy: ComputeScalingPolicy.t option
        [@ocaml.doc
          "The scaling policy configuration for the compute environment. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."]}
    let context_ = "ComputeResource"
    let make ?allocationStrategy =
      fun ?minvCpus ->
        fun ?desiredvCpus ->
          fun ?instanceTypes ->
            fun ?imageId ->
              fun ?securityGroupIds ->
                fun ?ec2KeyPair ->
                  fun ?instanceRole ->
                    fun ?tags ->
                      fun ?placementGroup ->
                        fun ?bidPercentage ->
                          fun ?spotIamFleetRole ->
                            fun ?launchTemplate ->
                              fun ?ec2Configuration ->
                                fun ?scalingPolicy ->
                                  fun ~type_ ->
                                    fun ~maxvCpus ->
                                      fun ~subnets ->
                                        fun () ->
                                          {
                                            allocationStrategy;
                                            minvCpus;
                                            desiredvCpus;
                                            instanceTypes;
                                            imageId;
                                            securityGroupIds;
                                            ec2KeyPair;
                                            instanceRole;
                                            tags;
                                            placementGroup;
                                            bidPercentage;
                                            spotIamFleetRole;
                                            launchTemplate;
                                            ec2Configuration;
                                            scalingPolicy;
                                            type_;
                                            maxvCpus;
                                            subnets
                                          }
    let to_value x =
      structure_to_value
        [("type", (Some (CRType.to_value x.type_)));
        ("allocationStrategy",
          (Option.map x.allocationStrategy ~f:CRAllocationStrategy.to_value));
        ("minvCpus", (Option.map x.minvCpus ~f:Integer.to_value));
        ("maxvCpus", (Some (Integer.to_value x.maxvCpus)));
        ("desiredvCpus", (Option.map x.desiredvCpus ~f:Integer.to_value));
        ("instanceTypes",
          (Option.map x.instanceTypes ~f:StringList.to_value));
        ("imageId", (Option.map x.imageId ~f:String_.to_value));
        ("subnets", (Some (StringList.to_value x.subnets)));
        ("securityGroupIds",
          (Option.map x.securityGroupIds ~f:StringList.to_value));
        ("ec2KeyPair", (Option.map x.ec2KeyPair ~f:String_.to_value));
        ("instanceRole", (Option.map x.instanceRole ~f:String_.to_value));
        ("tags", (Option.map x.tags ~f:TagsMap.to_value));
        ("placementGroup", (Option.map x.placementGroup ~f:String_.to_value));
        ("bidPercentage", (Option.map x.bidPercentage ~f:Integer.to_value));
        ("spotIamFleetRole",
          (Option.map x.spotIamFleetRole ~f:String_.to_value));
        ("launchTemplate",
          (Option.map x.launchTemplate
             ~f:LaunchTemplateSpecification.to_value));
        ("ec2Configuration",
          (Option.map x.ec2Configuration ~f:Ec2ConfigurationList.to_value));
        ("scalingPolicy",
          (Option.map x.scalingPolicy ~f:ComputeScalingPolicy.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let scalingPolicy =
        (Option.map ~f:ComputeScalingPolicy.of_xml)
          (Xml.child xml_arg0 "scalingPolicy") in
      let ec2Configuration =
        (Option.map ~f:Ec2ConfigurationList.of_xml)
          (Xml.child xml_arg0 "ec2Configuration") in
      let launchTemplate =
        (Option.map ~f:LaunchTemplateSpecification.of_xml)
          (Xml.child xml_arg0 "launchTemplate") in
      let spotIamFleetRole =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "spotIamFleetRole") in
      let bidPercentage =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "bidPercentage") in
      let placementGroup =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "placementGroup") in
      let tags = (Option.map ~f:TagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let instanceRole =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "instanceRole") in
      let ec2KeyPair =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "ec2KeyPair") in
      let securityGroupIds =
        (Option.map ~f:StringList.of_xml)
          (Xml.child xml_arg0 "securityGroupIds") in
      let subnets =
        StringList.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "subnets") in
      let imageId =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "imageId") in
      let instanceTypes =
        (Option.map ~f:StringList.of_xml)
          (Xml.child xml_arg0 "instanceTypes") in
      let desiredvCpus =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "desiredvCpus") in
      let maxvCpus =
        Integer.of_xml (Xml.child_exn ~context:context_ xml_arg0 "maxvCpus") in
      let minvCpus =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "minvCpus") in
      let allocationStrategy =
        (Option.map ~f:CRAllocationStrategy.of_xml)
          (Xml.child xml_arg0 "allocationStrategy") in
      let type_ =
        CRType.of_xml (Xml.child_exn ~context:context_ xml_arg0 "type") in
      make ?scalingPolicy ?ec2Configuration ?launchTemplate ?spotIamFleetRole
        ?bidPercentage ?placementGroup ?tags ?instanceRole ?ec2KeyPair
        ?securityGroupIds ~subnets ?imageId ?instanceTypes ?desiredvCpus
        ~maxvCpus ?minvCpus ?allocationStrategy ~type_ ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let scalingPolicy =
        field_map json__ "scalingPolicy" ComputeScalingPolicy.of_json in
      let ec2Configuration =
        field_map json__ "ec2Configuration" Ec2ConfigurationList.of_json in
      let launchTemplate =
        field_map json__ "launchTemplate" LaunchTemplateSpecification.of_json in
      let spotIamFleetRole =
        field_map json__ "spotIamFleetRole" String_.of_json in
      let bidPercentage = field_map json__ "bidPercentage" Integer.of_json in
      let placementGroup = field_map json__ "placementGroup" String_.of_json in
      let tags = field_map json__ "tags" TagsMap.of_json in
      let instanceRole = field_map json__ "instanceRole" String_.of_json in
      let ec2KeyPair = field_map json__ "ec2KeyPair" String_.of_json in
      let securityGroupIds =
        field_map json__ "securityGroupIds" StringList.of_json in
      let subnets = field_map_exn json__ "subnets" StringList.of_json in
      let imageId = field_map json__ "imageId" String_.of_json in
      let instanceTypes = field_map json__ "instanceTypes" StringList.of_json in
      let desiredvCpus = field_map json__ "desiredvCpus" Integer.of_json in
      let maxvCpus = field_map_exn json__ "maxvCpus" Integer.of_json in
      let minvCpus = field_map json__ "minvCpus" Integer.of_json in
      let allocationStrategy =
        field_map json__ "allocationStrategy" CRAllocationStrategy.of_json in
      let type_ = field_map_exn json__ "type" CRType.of_json in
      make ?scalingPolicy ?ec2Configuration ?launchTemplate ?spotIamFleetRole
        ?bidPercentage ?placementGroup ?tags ?instanceRole ?ec2KeyPair
        ?securityGroupIds ~subnets ?imageId ?instanceTypes ?desiredvCpus
        ~maxvCpus ?minvCpus ?allocationStrategy ~type_ ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents an Batch compute resource. For more information, see Compute environments in the Batch User Guide."]
module EksConfiguration =
  struct
    type nonrec t =
      {
      eksClusterArn: String_.t
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the Amazon EKS cluster. An example is arn:aws:eks:us-east-1:123456789012:cluster/ClusterForBatch ."];
      kubernetesNamespace: String_.t
        [@ocaml.doc
          "The namespace of the Amazon EKS cluster. Batch manages pods in this namespace. The value can't left empty or null. It must be fewer than 64 characters long, can't be set to default, can't start with \"kube-,\" and must match this regular expression: ^\\[a-z0-9\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?$. For more information, see Namespaces in the Kubernetes documentation."]}
    let context_ = "EksConfiguration"
    let make ~eksClusterArn =
      fun ~kubernetesNamespace ->
        fun () -> { eksClusterArn; kubernetesNamespace }
    let to_value x =
      structure_to_value
        [("eksClusterArn", (Some (String_.to_value x.eksClusterArn)));
        ("kubernetesNamespace",
          (Some (String_.to_value x.kubernetesNamespace)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let kubernetesNamespace =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "kubernetesNamespace") in
      let eksClusterArn =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "eksClusterArn") in
      make ~kubernetesNamespace ~eksClusterArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let kubernetesNamespace =
        field_map_exn json__ "kubernetesNamespace" String_.of_json in
      let eksClusterArn =
        field_map_exn json__ "eksClusterArn" String_.of_json in
      make ~kubernetesNamespace ~eksClusterArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Configuration for the Amazon EKS cluster that supports the Batch compute environment. The cluster must exist before the compute environment can be created."]
module UpdatePolicy =
  struct
    type nonrec t =
      {
      terminateJobsOnUpdate: Boolean.t option
        [@ocaml.doc
          "Specifies whether jobs are automatically terminated when the compute environment infrastructure is updated. The default value is false."];
      jobExecutionTimeoutMinutes: JobExecutionTimeoutMinutes.t option
        [@ocaml.doc
          "Specifies the job timeout (in minutes) when the compute environment infrastructure is updated. The default value is 30."]}
    let make ?terminateJobsOnUpdate =
      fun ?jobExecutionTimeoutMinutes ->
        fun () -> { terminateJobsOnUpdate; jobExecutionTimeoutMinutes }
    let to_value x =
      structure_to_value
        [("terminateJobsOnUpdate",
           (Option.map x.terminateJobsOnUpdate ~f:Boolean.to_value));
        ("jobExecutionTimeoutMinutes",
          (Option.map x.jobExecutionTimeoutMinutes
             ~f:JobExecutionTimeoutMinutes.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobExecutionTimeoutMinutes =
        (Option.map ~f:JobExecutionTimeoutMinutes.of_xml)
          (Xml.child xml_arg0 "jobExecutionTimeoutMinutes") in
      let terminateJobsOnUpdate =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "terminateJobsOnUpdate") in
      make ?jobExecutionTimeoutMinutes ?terminateJobsOnUpdate ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobExecutionTimeoutMinutes =
        field_map json__ "jobExecutionTimeoutMinutes"
          JobExecutionTimeoutMinutes.of_json in
      let terminateJobsOnUpdate =
        field_map json__ "terminateJobsOnUpdate" Boolean.of_json in
      make ?jobExecutionTimeoutMinutes ?terminateJobsOnUpdate ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Specifies the infrastructure update policy for the Amazon EC2 compute environment. For more information about infrastructure updates, see Updating compute environments in the Batch User Guide."]
module CRUpdateAllocationStrategy =
  struct
    type nonrec t =
      | BEST_FIT_PROGRESSIVE 
      | SPOT_CAPACITY_OPTIMIZED 
      | SPOT_PRICE_CAPACITY_OPTIMIZED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | BEST_FIT_PROGRESSIVE -> "BEST_FIT_PROGRESSIVE"
      | SPOT_CAPACITY_OPTIMIZED -> "SPOT_CAPACITY_OPTIMIZED"
      | SPOT_PRICE_CAPACITY_OPTIMIZED -> "SPOT_PRICE_CAPACITY_OPTIMIZED"
      | Non_static_id s -> s
    let of_string =
      function
      | "BEST_FIT_PROGRESSIVE" -> BEST_FIT_PROGRESSIVE
      | "SPOT_CAPACITY_OPTIMIZED" -> SPOT_CAPACITY_OPTIMIZED
      | "SPOT_PRICE_CAPACITY_OPTIMIZED" -> SPOT_PRICE_CAPACITY_OPTIMIZED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration CRUpdateAllocationStrategy"
           xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"CRUpdateAllocationStrategy" j)
    let to_json = simple_to_json to_value
  end
module ServiceJobEvaluateOnExitList =
  struct
    type nonrec t = ServiceJobEvaluateOnExit.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ServiceJobEvaluateOnExit.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ServiceJobEvaluateOnExit.of_xml)
    let of_json j =
      list_of_json ~kind:"ServiceJobEvaluateOnExitList"
        ~of_json:ServiceJobEvaluateOnExit.of_json j
    let to_json v = composed_to_json to_value v
  end
module NodePropertyOverrides =
  struct
    type nonrec t = NodePropertyOverride.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:NodePropertyOverride.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:NodePropertyOverride.of_xml)
    let of_json j =
      list_of_json ~kind:"NodePropertyOverrides"
        ~of_json:NodePropertyOverride.of_json j
    let to_json v = composed_to_json to_value v
  end
module ServiceJobSummary =
  struct
    type nonrec t =
      {
      latestAttempt: LatestServiceJobAttempt.t option
        [@ocaml.doc
          "Information about the latest attempt for the service job."];
      capacityUsage: ServiceJobCapacityUsageSummaryList.t option
        [@ocaml.doc
          "The capacity usage information for this service job, including the unit of measure and quantity of resources being used."];
      createdAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the service job was created."];
      jobArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the service job."];
      jobId: String_.t option [@ocaml.doc "The job ID for the service job."];
      jobName: String_.t option [@ocaml.doc "The name of the service job."];
      scheduledAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the service job was scheduled for execution."];
      serviceJobType: ServiceJobType.t option
        [@ocaml.doc
          "The type of service job. For SageMaker Training jobs, this value is SAGEMAKER_TRAINING."];
      shareIdentifier: String_.t option
        [@ocaml.doc "The share identifier for the job."];
      quotaShareName: String_.t option
        [@ocaml.doc "The quota share for the service job."];
      status: ServiceJobStatus.t option
        [@ocaml.doc "The current status of the service job."];
      statusReason: String_.t option
        [@ocaml.doc
          "A short string to provide more details on the current status of the service job."];
      startedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the service job was started."];
      stoppedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the service job stopped running."]}
    let make ?latestAttempt =
      fun ?capacityUsage ->
        fun ?createdAt ->
          fun ?jobArn ->
            fun ?jobId ->
              fun ?jobName ->
                fun ?scheduledAt ->
                  fun ?serviceJobType ->
                    fun ?shareIdentifier ->
                      fun ?quotaShareName ->
                        fun ?status ->
                          fun ?statusReason ->
                            fun ?startedAt ->
                              fun ?stoppedAt ->
                                fun () ->
                                  {
                                    latestAttempt;
                                    capacityUsage;
                                    createdAt;
                                    jobArn;
                                    jobId;
                                    jobName;
                                    scheduledAt;
                                    serviceJobType;
                                    shareIdentifier;
                                    quotaShareName;
                                    status;
                                    statusReason;
                                    startedAt;
                                    stoppedAt
                                  }
    let to_value x =
      structure_to_value
        [("latestAttempt",
           (Option.map x.latestAttempt ~f:LatestServiceJobAttempt.to_value));
        ("capacityUsage",
          (Option.map x.capacityUsage
             ~f:ServiceJobCapacityUsageSummaryList.to_value));
        ("createdAt", (Option.map x.createdAt ~f:Long.to_value));
        ("jobArn", (Option.map x.jobArn ~f:String_.to_value));
        ("jobId", (Option.map x.jobId ~f:String_.to_value));
        ("jobName", (Option.map x.jobName ~f:String_.to_value));
        ("scheduledAt", (Option.map x.scheduledAt ~f:Long.to_value));
        ("serviceJobType",
          (Option.map x.serviceJobType ~f:ServiceJobType.to_value));
        ("shareIdentifier",
          (Option.map x.shareIdentifier ~f:String_.to_value));
        ("quotaShareName", (Option.map x.quotaShareName ~f:String_.to_value));
        ("status", (Option.map x.status ~f:ServiceJobStatus.to_value));
        ("statusReason", (Option.map x.statusReason ~f:String_.to_value));
        ("startedAt", (Option.map x.startedAt ~f:Long.to_value));
        ("stoppedAt", (Option.map x.stoppedAt ~f:Long.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let stoppedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "stoppedAt") in
      let startedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "startedAt") in
      let statusReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "statusReason") in
      let status =
        (Option.map ~f:ServiceJobStatus.of_xml) (Xml.child xml_arg0 "status") in
      let quotaShareName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "quotaShareName") in
      let shareIdentifier =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "shareIdentifier") in
      let serviceJobType =
        (Option.map ~f:ServiceJobType.of_xml)
          (Xml.child xml_arg0 "serviceJobType") in
      let scheduledAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "scheduledAt") in
      let jobName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobName") in
      let jobId = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobId") in
      let jobArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobArn") in
      let createdAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "createdAt") in
      let capacityUsage =
        (Option.map ~f:ServiceJobCapacityUsageSummaryList.of_xml)
          (Xml.child xml_arg0 "capacityUsage") in
      let latestAttempt =
        (Option.map ~f:LatestServiceJobAttempt.of_xml)
          (Xml.child xml_arg0 "latestAttempt") in
      make ?stoppedAt ?startedAt ?statusReason ?status ?quotaShareName
        ?shareIdentifier ?serviceJobType ?scheduledAt ?jobName ?jobId ?jobArn
        ?createdAt ?capacityUsage ?latestAttempt ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let stoppedAt = field_map json__ "stoppedAt" Long.of_json in
      let startedAt = field_map json__ "startedAt" Long.of_json in
      let statusReason = field_map json__ "statusReason" String_.of_json in
      let status = field_map json__ "status" ServiceJobStatus.of_json in
      let quotaShareName = field_map json__ "quotaShareName" String_.of_json in
      let shareIdentifier =
        field_map json__ "shareIdentifier" String_.of_json in
      let serviceJobType =
        field_map json__ "serviceJobType" ServiceJobType.of_json in
      let scheduledAt = field_map json__ "scheduledAt" Long.of_json in
      let jobName = field_map json__ "jobName" String_.of_json in
      let jobId = field_map json__ "jobId" String_.of_json in
      let jobArn = field_map json__ "jobArn" String_.of_json in
      let createdAt = field_map json__ "createdAt" Long.of_json in
      let capacityUsage =
        field_map json__ "capacityUsage"
          ServiceJobCapacityUsageSummaryList.of_json in
      let latestAttempt =
        field_map json__ "latestAttempt" LatestServiceJobAttempt.of_json in
      make ?stoppedAt ?startedAt ?statusReason ?status ?quotaShareName
        ?shareIdentifier ?serviceJobType ?scheduledAt ?jobName ?jobId ?jobArn
        ?createdAt ?capacityUsage ?latestAttempt ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Summary information about a service job."]
module KeyValuesPair =
  struct
    type nonrec t =
      {
      name: String_.t option
        [@ocaml.doc
          "The name of the filter. Filter names are case sensitive."];
      values: StringList.t option [@ocaml.doc "The filter values."]}
    let make ?name = fun ?values -> fun () -> { name; values }
    let to_value x =
      structure_to_value
        [("name", (Option.map x.name ~f:String_.to_value));
        ("values", (Option.map x.values ~f:StringList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let values =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "values") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      make ?values ?name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let values = field_map json__ "values" StringList.of_json in
      let name = field_map json__ "name" String_.of_json in
      make ?values ?name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "A filter name and value pair that's used to return a more specific list of results from a ListJobs or ListJobsByConsumableResource API operation."]
module SchedulingPolicyListingDetail =
  struct
    type nonrec t =
      {
      arn: String_.t option
        [@ocaml.doc "Amazon Resource Name (ARN) of the scheduling policy."]}
    let make ?arn = fun () -> { arn }
    let to_value x =
      structure_to_value [("arn", (Option.map x.arn ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let arn = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "arn") in
      make ?arn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let arn = field_map json__ "arn" String_.of_json in make ?arn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that contains the details of a scheduling policy that's returned in a ListSchedulingPolicy action."]
module QuotaShareDetail =
  struct
    type nonrec t =
      {
      quotaShareName: String_.t option
        [@ocaml.doc "The name of the quota share."];
      quotaShareArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the quota share."];
      jobQueueArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the job queue associated with the quota share."];
      capacityLimits: QuotaShareCapacityLimits.t option
        [@ocaml.doc
          "A list that specifies the quantity and type of compute capacity allocated to the quota share."];
      resourceSharingConfiguration:
        QuotaShareResourceSharingConfiguration.t option
        [@ocaml.doc
          "Specifies whether a quota share reserves, lends, or both lends and borrows idle compute capacity."];
      preemptionConfiguration: QuotaSharePreemptionConfiguration.t option
        [@ocaml.doc
          "Specifies the preemption behavior for jobs in a quota share."];
      state: QuotaShareState.t option
        [@ocaml.doc "The state of the quota share."];
      status: QuotaShareStatus.t option
        [@ocaml.doc "The current status of the quota share."]}
    let make ?quotaShareName =
      fun ?quotaShareArn ->
        fun ?jobQueueArn ->
          fun ?capacityLimits ->
            fun ?resourceSharingConfiguration ->
              fun ?preemptionConfiguration ->
                fun ?state ->
                  fun ?status ->
                    fun () ->
                      {
                        quotaShareName;
                        quotaShareArn;
                        jobQueueArn;
                        capacityLimits;
                        resourceSharingConfiguration;
                        preemptionConfiguration;
                        state;
                        status
                      }
    let to_value x =
      structure_to_value
        [("quotaShareName",
           (Option.map x.quotaShareName ~f:String_.to_value));
        ("quotaShareArn", (Option.map x.quotaShareArn ~f:String_.to_value));
        ("jobQueueArn", (Option.map x.jobQueueArn ~f:String_.to_value));
        ("capacityLimits",
          (Option.map x.capacityLimits ~f:QuotaShareCapacityLimits.to_value));
        ("resourceSharingConfiguration",
          (Option.map x.resourceSharingConfiguration
             ~f:QuotaShareResourceSharingConfiguration.to_value));
        ("preemptionConfiguration",
          (Option.map x.preemptionConfiguration
             ~f:QuotaSharePreemptionConfiguration.to_value));
        ("state", (Option.map x.state ~f:QuotaShareState.to_value));
        ("status", (Option.map x.status ~f:QuotaShareStatus.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let status =
        (Option.map ~f:QuotaShareStatus.of_xml) (Xml.child xml_arg0 "status") in
      let state =
        (Option.map ~f:QuotaShareState.of_xml) (Xml.child xml_arg0 "state") in
      let preemptionConfiguration =
        (Option.map ~f:QuotaSharePreemptionConfiguration.of_xml)
          (Xml.child xml_arg0 "preemptionConfiguration") in
      let resourceSharingConfiguration =
        (Option.map ~f:QuotaShareResourceSharingConfiguration.of_xml)
          (Xml.child xml_arg0 "resourceSharingConfiguration") in
      let capacityLimits =
        (Option.map ~f:QuotaShareCapacityLimits.of_xml)
          (Xml.child xml_arg0 "capacityLimits") in
      let jobQueueArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobQueueArn") in
      let quotaShareArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "quotaShareArn") in
      let quotaShareName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "quotaShareName") in
      make ?status ?state ?preemptionConfiguration
        ?resourceSharingConfiguration ?capacityLimits ?jobQueueArn
        ?quotaShareArn ?quotaShareName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let status = field_map json__ "status" QuotaShareStatus.of_json in
      let state = field_map json__ "state" QuotaShareState.of_json in
      let preemptionConfiguration =
        field_map json__ "preemptionConfiguration"
          QuotaSharePreemptionConfiguration.of_json in
      let resourceSharingConfiguration =
        field_map json__ "resourceSharingConfiguration"
          QuotaShareResourceSharingConfiguration.of_json in
      let capacityLimits =
        field_map json__ "capacityLimits" QuotaShareCapacityLimits.of_json in
      let jobQueueArn = field_map json__ "jobQueueArn" String_.of_json in
      let quotaShareArn = field_map json__ "quotaShareArn" String_.of_json in
      let quotaShareName = field_map json__ "quotaShareName" String_.of_json in
      make ?status ?state ?preemptionConfiguration
        ?resourceSharingConfiguration ?capacityLimits ?jobQueueArn
        ?quotaShareArn ?quotaShareName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Detailed information about a quota share, including its configuration, state, and capacity limits."]
module JobSummary =
  struct
    type nonrec t =
      {
      jobArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the job."];
      jobId: String_.t option [@ocaml.doc "The job ID."];
      jobName: String_.t option [@ocaml.doc "The job name."];
      capacityUsage: JobCapacityUsageSummaryList.t option
        [@ocaml.doc
          "The configured capacity usage information for this job, including the unit of measure and quantity of resources."];
      createdAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the job was created. For non-array jobs and parent array jobs, this is when the job entered the SUBMITTED state (at the time SubmitJob was called). For array child jobs, this is when the child job was spawned by its parent and entered the PENDING state."];
      scheduledAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the job was scheduled for execution. For more information on job statues, see Service job status in the Batch User Guide."];
      shareIdentifier: String_.t option
        [@ocaml.doc
          "The share identifier for the fairshare scheduling queue that this job is associated with."];
      status: JobStatus.t option
        [@ocaml.doc "The current status for the job."];
      statusReason: String_.t option
        [@ocaml.doc
          "A short, human-readable string to provide more details for the current status of the job."];
      startedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp for when the job was started. More specifically, it's when the job transitioned from the STARTING state to the RUNNING state."];
      stoppedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp for when the job was stopped. More specifically, it's when the job transitioned from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED."];
      container: ContainerSummary.t option
        [@ocaml.doc
          "An object that represents the details of the container that's associated with the job."];
      arrayProperties: ArrayPropertiesSummary.t option
        [@ocaml.doc "The array properties of the job, if it's an array job."];
      nodeProperties: NodePropertiesSummary.t option
        [@ocaml.doc
          "The node properties for a single node in a job summary list. This isn't applicable to jobs that are running on Fargate resources."];
      jobDefinition: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the job definition."]}
    let make ?jobArn =
      fun ?jobId ->
        fun ?jobName ->
          fun ?capacityUsage ->
            fun ?createdAt ->
              fun ?scheduledAt ->
                fun ?shareIdentifier ->
                  fun ?status ->
                    fun ?statusReason ->
                      fun ?startedAt ->
                        fun ?stoppedAt ->
                          fun ?container ->
                            fun ?arrayProperties ->
                              fun ?nodeProperties ->
                                fun ?jobDefinition ->
                                  fun () ->
                                    {
                                      jobArn;
                                      jobId;
                                      jobName;
                                      capacityUsage;
                                      createdAt;
                                      scheduledAt;
                                      shareIdentifier;
                                      status;
                                      statusReason;
                                      startedAt;
                                      stoppedAt;
                                      container;
                                      arrayProperties;
                                      nodeProperties;
                                      jobDefinition
                                    }
    let to_value x =
      structure_to_value
        [("jobArn", (Option.map x.jobArn ~f:String_.to_value));
        ("jobId", (Option.map x.jobId ~f:String_.to_value));
        ("jobName", (Option.map x.jobName ~f:String_.to_value));
        ("capacityUsage",
          (Option.map x.capacityUsage ~f:JobCapacityUsageSummaryList.to_value));
        ("createdAt", (Option.map x.createdAt ~f:Long.to_value));
        ("scheduledAt", (Option.map x.scheduledAt ~f:Long.to_value));
        ("shareIdentifier",
          (Option.map x.shareIdentifier ~f:String_.to_value));
        ("status", (Option.map x.status ~f:JobStatus.to_value));
        ("statusReason", (Option.map x.statusReason ~f:String_.to_value));
        ("startedAt", (Option.map x.startedAt ~f:Long.to_value));
        ("stoppedAt", (Option.map x.stoppedAt ~f:Long.to_value));
        ("container", (Option.map x.container ~f:ContainerSummary.to_value));
        ("arrayProperties",
          (Option.map x.arrayProperties ~f:ArrayPropertiesSummary.to_value));
        ("nodeProperties",
          (Option.map x.nodeProperties ~f:NodePropertiesSummary.to_value));
        ("jobDefinition", (Option.map x.jobDefinition ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobDefinition =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobDefinition") in
      let nodeProperties =
        (Option.map ~f:NodePropertiesSummary.of_xml)
          (Xml.child xml_arg0 "nodeProperties") in
      let arrayProperties =
        (Option.map ~f:ArrayPropertiesSummary.of_xml)
          (Xml.child xml_arg0 "arrayProperties") in
      let container =
        (Option.map ~f:ContainerSummary.of_xml)
          (Xml.child xml_arg0 "container") in
      let stoppedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "stoppedAt") in
      let startedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "startedAt") in
      let statusReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "statusReason") in
      let status =
        (Option.map ~f:JobStatus.of_xml) (Xml.child xml_arg0 "status") in
      let shareIdentifier =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "shareIdentifier") in
      let scheduledAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "scheduledAt") in
      let createdAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "createdAt") in
      let capacityUsage =
        (Option.map ~f:JobCapacityUsageSummaryList.of_xml)
          (Xml.child xml_arg0 "capacityUsage") in
      let jobName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobName") in
      let jobId = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobId") in
      let jobArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobArn") in
      make ?jobDefinition ?nodeProperties ?arrayProperties ?container
        ?stoppedAt ?startedAt ?statusReason ?status ?shareIdentifier
        ?scheduledAt ?createdAt ?capacityUsage ?jobName ?jobId ?jobArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobDefinition = field_map json__ "jobDefinition" String_.of_json in
      let nodeProperties =
        field_map json__ "nodeProperties" NodePropertiesSummary.of_json in
      let arrayProperties =
        field_map json__ "arrayProperties" ArrayPropertiesSummary.of_json in
      let container = field_map json__ "container" ContainerSummary.of_json in
      let stoppedAt = field_map json__ "stoppedAt" Long.of_json in
      let startedAt = field_map json__ "startedAt" Long.of_json in
      let statusReason = field_map json__ "statusReason" String_.of_json in
      let status = field_map json__ "status" JobStatus.of_json in
      let shareIdentifier =
        field_map json__ "shareIdentifier" String_.of_json in
      let scheduledAt = field_map json__ "scheduledAt" Long.of_json in
      let createdAt = field_map json__ "createdAt" Long.of_json in
      let capacityUsage =
        field_map json__ "capacityUsage" JobCapacityUsageSummaryList.of_json in
      let jobName = field_map json__ "jobName" String_.of_json in
      let jobId = field_map json__ "jobId" String_.of_json in
      let jobArn = field_map json__ "jobArn" String_.of_json in
      make ?jobDefinition ?nodeProperties ?arrayProperties ?container
        ?stoppedAt ?startedAt ?statusReason ?status ?shareIdentifier
        ?scheduledAt ?createdAt ?capacityUsage ?jobName ?jobId ?jobArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "An object that represents summary details of a job."]
module ListJobsByConsumableResourceSummary =
  struct
    type nonrec t =
      {
      jobArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the job."];
      jobQueueArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the job queue."];
      jobName: String_.t option [@ocaml.doc "The name of the job."];
      jobDefinitionArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the job definition."];
      shareIdentifier: String_.t option
        [@ocaml.doc "The fair-share scheduling identifier for the job."];
      jobStatus: String_.t option
        [@ocaml.doc
          "The status of the job. Can be one of: SUBMITTED PENDING RUNNABLE STARTING RUNNING SUCCEEDED FAILED"];
      quantity: Long.t option
        [@ocaml.doc
          "The total amount of the consumable resource that is available."];
      statusReason: String_.t option
        [@ocaml.doc
          "A short, human-readable string to provide more details for the current status of the job."];
      startedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp for when the job was started. More specifically, it's when the job transitioned from the STARTING state to the RUNNING state."];
      createdAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the consumable resource was created."];
      consumableResourceProperties: ConsumableResourceProperties.t option
        [@ocaml.doc
          "Contains a list of consumable resources required by the job."]}
    let make ?jobArn =
      fun ?jobQueueArn ->
        fun ?jobName ->
          fun ?jobDefinitionArn ->
            fun ?shareIdentifier ->
              fun ?jobStatus ->
                fun ?quantity ->
                  fun ?statusReason ->
                    fun ?startedAt ->
                      fun ?createdAt ->
                        fun ?consumableResourceProperties ->
                          fun () ->
                            {
                              jobArn;
                              jobQueueArn;
                              jobName;
                              jobDefinitionArn;
                              shareIdentifier;
                              jobStatus;
                              quantity;
                              statusReason;
                              startedAt;
                              createdAt;
                              consumableResourceProperties
                            }
    let to_value x =
      structure_to_value
        [("jobArn", (Option.map x.jobArn ~f:String_.to_value));
        ("jobQueueArn", (Option.map x.jobQueueArn ~f:String_.to_value));
        ("jobName", (Option.map x.jobName ~f:String_.to_value));
        ("jobDefinitionArn",
          (Option.map x.jobDefinitionArn ~f:String_.to_value));
        ("shareIdentifier",
          (Option.map x.shareIdentifier ~f:String_.to_value));
        ("jobStatus", (Option.map x.jobStatus ~f:String_.to_value));
        ("quantity", (Option.map x.quantity ~f:Long.to_value));
        ("statusReason", (Option.map x.statusReason ~f:String_.to_value));
        ("startedAt", (Option.map x.startedAt ~f:Long.to_value));
        ("createdAt", (Option.map x.createdAt ~f:Long.to_value));
        ("consumableResourceProperties",
          (Option.map x.consumableResourceProperties
             ~f:ConsumableResourceProperties.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let consumableResourceProperties =
        (Option.map ~f:ConsumableResourceProperties.of_xml)
          (Xml.child xml_arg0 "consumableResourceProperties") in
      let createdAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "createdAt") in
      let startedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "startedAt") in
      let statusReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "statusReason") in
      let quantity =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "quantity") in
      let jobStatus =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobStatus") in
      let shareIdentifier =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "shareIdentifier") in
      let jobDefinitionArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "jobDefinitionArn") in
      let jobName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobName") in
      let jobQueueArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobQueueArn") in
      let jobArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobArn") in
      make ?consumableResourceProperties ?createdAt ?startedAt ?statusReason
        ?quantity ?jobStatus ?shareIdentifier ?jobDefinitionArn ?jobName
        ?jobQueueArn ?jobArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let consumableResourceProperties =
        field_map json__ "consumableResourceProperties"
          ConsumableResourceProperties.of_json in
      let createdAt = field_map json__ "createdAt" Long.of_json in
      let startedAt = field_map json__ "startedAt" Long.of_json in
      let statusReason = field_map json__ "statusReason" String_.of_json in
      let quantity = field_map json__ "quantity" Long.of_json in
      let jobStatus = field_map json__ "jobStatus" String_.of_json in
      let shareIdentifier =
        field_map json__ "shareIdentifier" String_.of_json in
      let jobDefinitionArn =
        field_map json__ "jobDefinitionArn" String_.of_json in
      let jobName = field_map json__ "jobName" String_.of_json in
      let jobQueueArn = field_map json__ "jobQueueArn" String_.of_json in
      let jobArn = field_map json__ "jobArn" String_.of_json in
      make ?consumableResourceProperties ?createdAt ?startedAt ?statusReason
        ?quantity ?jobStatus ?shareIdentifier ?jobDefinitionArn ?jobName
        ?jobQueueArn ?jobArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Current information about a consumable resource required by a job."]
module ConsumableResourceSummary =
  struct
    type nonrec t =
      {
      consumableResourceArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the consumable resource."];
      consumableResourceName: String_.t option
        [@ocaml.doc "The name of the consumable resource."];
      totalQuantity: Long.t option
        [@ocaml.doc
          "The total amount of the consumable resource that is available."];
      inUseQuantity: Long.t option
        [@ocaml.doc
          "The amount of the consumable resource that is currently in use."];
      resourceType: String_.t option
        [@ocaml.doc
          "Indicates whether the resource is available to be re-used after a job completes. Can be one of: REPLENISHABLE NON_REPLENISHABLE"]}
    let make ?consumableResourceArn =
      fun ?consumableResourceName ->
        fun ?totalQuantity ->
          fun ?inUseQuantity ->
            fun ?resourceType ->
              fun () ->
                {
                  consumableResourceArn;
                  consumableResourceName;
                  totalQuantity;
                  inUseQuantity;
                  resourceType
                }
    let to_value x =
      structure_to_value
        [("consumableResourceArn",
           (Option.map x.consumableResourceArn ~f:String_.to_value));
        ("consumableResourceName",
          (Option.map x.consumableResourceName ~f:String_.to_value));
        ("totalQuantity", (Option.map x.totalQuantity ~f:Long.to_value));
        ("inUseQuantity", (Option.map x.inUseQuantity ~f:Long.to_value));
        ("resourceType", (Option.map x.resourceType ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let resourceType =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "resourceType") in
      let inUseQuantity =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "inUseQuantity") in
      let totalQuantity =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "totalQuantity") in
      let consumableResourceName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "consumableResourceName") in
      let consumableResourceArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "consumableResourceArn") in
      make ?resourceType ?inUseQuantity ?totalQuantity
        ?consumableResourceName ?consumableResourceArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let resourceType = field_map json__ "resourceType" String_.of_json in
      let inUseQuantity = field_map json__ "inUseQuantity" Long.of_json in
      let totalQuantity = field_map json__ "totalQuantity" Long.of_json in
      let consumableResourceName =
        field_map json__ "consumableResourceName" String_.of_json in
      let consumableResourceArn =
        field_map json__ "consumableResourceArn" String_.of_json in
      make ?resourceType ?inUseQuantity ?totalQuantity
        ?consumableResourceName ?consumableResourceArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Current information about a consumable resource."]
module FrontOfQueueJobSummaryList =
  struct
    type nonrec t = FrontOfQueueJobSummary.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:FrontOfQueueJobSummary.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:FrontOfQueueJobSummary.of_xml)
    let of_json j =
      list_of_json ~kind:"FrontOfQueueJobSummaryList"
        ~of_json:FrontOfQueueJobSummary.of_json j
    let to_json v = composed_to_json to_value v
  end
module FrontOfQuotaSharesJobSummaryMap =
  struct
    type nonrec t = (String_.t * FrontOfQuotaShareJobSummaryList.t) list
    let make i = i
    let of_header xs =
      make
        (List.filter_map xs
           ~f:(fun (k, v) ->
                 (Base.String.chop_prefix k ~prefix:"x-amz-meta-") |>
                   (Option.map
                      ~f:(fun chopped ->
                            let (_ : string) = v in
                            let (_ : string) = chopped in
                            failwith
                              "no of_header for complex types String FrontOfQuotaShareJobSummaryList"))))
    let to_value xs =
      (xs |>
         (List.map
            ~f:(fun (x, y) ->
                  (String_.to_value x) |>
                    (fun x ->
                       (FrontOfQuotaShareJobSummaryList.to_value y) |>
                         (fun y -> (x, y))))))
        |> (fun x -> `Map x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for Map_shape objects" ()
    let of_xml _ =
      failwith "of_xml_converter_of_shape: Map_shape case not implemented"
    let of_json j =
      object_of_json ~key_of_string:String_.of_string
        ~of_json:FrontOfQuotaShareJobSummaryList.of_json j
    let to_json v = composed_to_json to_value v
  end
module FairshareUtilizationDetail =
  struct
    type nonrec t =
      {
      activeShareCount: Long.t option
        [@ocaml.doc
          "The total number of active shares in the fairshare scheduling job queue that are currently utilizing capacity."];
      topCapacityUtilization: FairshareCapacityUtilizationList.t option
        [@ocaml.doc
          "A list of the top 20 shares with the highest capacity utilization, ordered by usage amount."]}
    let make ?activeShareCount =
      fun ?topCapacityUtilization ->
        fun () -> { activeShareCount; topCapacityUtilization }
    let to_value x =
      structure_to_value
        [("activeShareCount",
           (Option.map x.activeShareCount ~f:Long.to_value));
        ("topCapacityUtilization",
          (Option.map x.topCapacityUtilization
             ~f:FairshareCapacityUtilizationList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let topCapacityUtilization =
        (Option.map ~f:FairshareCapacityUtilizationList.of_xml)
          (Xml.child xml_arg0 "topCapacityUtilization") in
      let activeShareCount =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "activeShareCount") in
      make ?topCapacityUtilization ?activeShareCount ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let topCapacityUtilization =
        field_map json__ "topCapacityUtilization"
          FairshareCapacityUtilizationList.of_json in
      let activeShareCount = field_map json__ "activeShareCount" Long.of_json in
      make ?topCapacityUtilization ?activeShareCount ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The fairshare utilization for a job queue, including the number of active shares and top capacity utilization."]
module QueueSnapshotCapacityUsageList =
  struct
    type nonrec t = QueueSnapshotCapacityUsage.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:QueueSnapshotCapacityUsage.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:QueueSnapshotCapacityUsage.of_xml)
    let of_json j =
      list_of_json ~kind:"QueueSnapshotCapacityUsageList"
        ~of_json:QueueSnapshotCapacityUsage.of_json j
    let to_json v = composed_to_json to_value v
  end
module QuotaShareUtilizationDetail =
  struct
    type nonrec t =
      {
      topCapacityUtilization: QuotaShareCapacityUtilizationList.t option
        [@ocaml.doc
          "A list of the top capacity utilizations across quota shares associated with a job queue."]}
    let make ?topCapacityUtilization = fun () -> { topCapacityUtilization }
    let to_value x =
      structure_to_value
        [("topCapacityUtilization",
           (Option.map x.topCapacityUtilization
              ~f:QuotaShareCapacityUtilizationList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let topCapacityUtilization =
        (Option.map ~f:QuotaShareCapacityUtilizationList.of_xml)
          (Xml.child xml_arg0 "topCapacityUtilization") in
      make ?topCapacityUtilization ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let topCapacityUtilization =
        field_map json__ "topCapacityUtilization"
          QuotaShareCapacityUtilizationList.of_json in
      make ?topCapacityUtilization ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the capacity utilization details of all quota shares associated with a single job queue."]
module ServiceJobAttemptDetail =
  struct
    type nonrec t =
      {
      serviceResourceId: ServiceResourceId.t option
        [@ocaml.doc
          "The service resource identifier associated with the service job attempt."];
      startedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the service job attempt was started."];
      stoppedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the service job attempt stopped running."];
      statusReason: String_.t option
        [@ocaml.doc
          "A string that provides additional details for the current status of the service job attempt."]}
    let make ?serviceResourceId =
      fun ?startedAt ->
        fun ?stoppedAt ->
          fun ?statusReason ->
            fun () ->
              { serviceResourceId; startedAt; stoppedAt; statusReason }
    let to_value x =
      structure_to_value
        [("serviceResourceId",
           (Option.map x.serviceResourceId ~f:ServiceResourceId.to_value));
        ("startedAt", (Option.map x.startedAt ~f:Long.to_value));
        ("stoppedAt", (Option.map x.stoppedAt ~f:Long.to_value));
        ("statusReason", (Option.map x.statusReason ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let statusReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "statusReason") in
      let stoppedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "stoppedAt") in
      let startedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "startedAt") in
      let serviceResourceId =
        (Option.map ~f:ServiceResourceId.of_xml)
          (Xml.child xml_arg0 "serviceResourceId") in
      make ?statusReason ?stoppedAt ?startedAt ?serviceResourceId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let statusReason = field_map json__ "statusReason" String_.of_json in
      let stoppedAt = field_map json__ "stoppedAt" Long.of_json in
      let startedAt = field_map json__ "startedAt" Long.of_json in
      let serviceResourceId =
        field_map json__ "serviceResourceId" ServiceResourceId.of_json in
      make ?statusReason ?stoppedAt ?startedAt ?serviceResourceId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Detailed information about an attempt to run a service job."]
module ServiceJobCapacityUsageDetail =
  struct
    type nonrec t =
      {
      capacityUnit: String_.t option
        [@ocaml.doc
          "The unit of measure for the service job capacity usage. For service jobs, this is the instance type."];
      quantity: Double.t option
        [@ocaml.doc
          "The quantity of capacity being used by the service job, measured in the units specified by capacityUnit."]}
    let make ?capacityUnit =
      fun ?quantity -> fun () -> { capacityUnit; quantity }
    let to_value x =
      structure_to_value
        [("capacityUnit", (Option.map x.capacityUnit ~f:String_.to_value));
        ("quantity", (Option.map x.quantity ~f:Double.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let quantity =
        (Option.map ~f:Double.of_xml) (Xml.child xml_arg0 "quantity") in
      let capacityUnit =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "capacityUnit") in
      make ?quantity ?capacityUnit ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let quantity = field_map json__ "quantity" Double.of_json in
      let capacityUnit = field_map json__ "capacityUnit" String_.of_json in
      make ?quantity ?capacityUnit ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The capacity usage for a service job, including the unit of measure and quantity of resources being consumed."]
module ServiceJobRecentPreemptedAttemptList =
  struct
    type nonrec t = ServiceJobPreemptedAttempt.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ServiceJobPreemptedAttempt.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ServiceJobPreemptedAttempt.of_xml)
    let of_json j =
      list_of_json ~kind:"ServiceJobRecentPreemptedAttemptList"
        ~of_json:ServiceJobPreemptedAttempt.of_json j
    let to_json v = composed_to_json to_value v
  end
module ServiceEnvironmentDetail =
  struct
    type nonrec t =
      {
      serviceEnvironmentName: String_.t option
        [@ocaml.doc "The name of the service environment."];
      serviceEnvironmentArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the service environment."];
      serviceEnvironmentType: ServiceEnvironmentType.t option
        [@ocaml.doc
          "The type of service environment. For SageMaker Training jobs, this value is SAGEMAKER_TRAINING."];
      state: ServiceEnvironmentState.t option
        [@ocaml.doc
          "The state of the service environment. Valid values are ENABLED and DISABLED."];
      status: ServiceEnvironmentStatus.t option
        [@ocaml.doc "The current status of the service environment."];
      capacityLimits: CapacityLimits.t option
        [@ocaml.doc
          "The capacity limits for the service environment. This defines the maximum resources that can be used by service jobs in this environment."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags associated with the service environment. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources."]}
    let make ?serviceEnvironmentName =
      fun ?serviceEnvironmentArn ->
        fun ?serviceEnvironmentType ->
          fun ?state ->
            fun ?status ->
              fun ?capacityLimits ->
                fun ?tags ->
                  fun () ->
                    {
                      serviceEnvironmentName;
                      serviceEnvironmentArn;
                      serviceEnvironmentType;
                      state;
                      status;
                      capacityLimits;
                      tags
                    }
    let to_value x =
      structure_to_value
        [("serviceEnvironmentName",
           (Option.map x.serviceEnvironmentName ~f:String_.to_value));
        ("serviceEnvironmentArn",
          (Option.map x.serviceEnvironmentArn ~f:String_.to_value));
        ("serviceEnvironmentType",
          (Option.map x.serviceEnvironmentType
             ~f:ServiceEnvironmentType.to_value));
        ("state", (Option.map x.state ~f:ServiceEnvironmentState.to_value));
        ("status",
          (Option.map x.status ~f:ServiceEnvironmentStatus.to_value));
        ("capacityLimits",
          (Option.map x.capacityLimits ~f:CapacityLimits.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let capacityLimits =
        (Option.map ~f:CapacityLimits.of_xml)
          (Xml.child xml_arg0 "capacityLimits") in
      let status =
        (Option.map ~f:ServiceEnvironmentStatus.of_xml)
          (Xml.child xml_arg0 "status") in
      let state =
        (Option.map ~f:ServiceEnvironmentState.of_xml)
          (Xml.child xml_arg0 "state") in
      let serviceEnvironmentType =
        (Option.map ~f:ServiceEnvironmentType.of_xml)
          (Xml.child xml_arg0 "serviceEnvironmentType") in
      let serviceEnvironmentArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "serviceEnvironmentArn") in
      let serviceEnvironmentName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "serviceEnvironmentName") in
      make ?tags ?capacityLimits ?status ?state ?serviceEnvironmentType
        ?serviceEnvironmentArn ?serviceEnvironmentName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let capacityLimits =
        field_map json__ "capacityLimits" CapacityLimits.of_json in
      let status = field_map json__ "status" ServiceEnvironmentStatus.of_json in
      let state = field_map json__ "state" ServiceEnvironmentState.of_json in
      let serviceEnvironmentType =
        field_map json__ "serviceEnvironmentType"
          ServiceEnvironmentType.of_json in
      let serviceEnvironmentArn =
        field_map json__ "serviceEnvironmentArn" String_.of_json in
      let serviceEnvironmentName =
        field_map json__ "serviceEnvironmentName" String_.of_json in
      make ?tags ?capacityLimits ?status ?state ?serviceEnvironmentType
        ?serviceEnvironmentArn ?serviceEnvironmentName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Detailed information about a service environment, including its configuration, state, and capacity limits."]
module SchedulingPolicyDetail =
  struct
    type nonrec t =
      {
      name: String_.t option
        [@ocaml.doc "The name of the fair-share scheduling policy."];
      arn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the scheduling policy. An example is arn:aws:batch:us-east-1:123456789012:scheduling-policy/HighPriority ."];
      quotaSharePolicy: QuotaSharePolicy.t option
        [@ocaml.doc "The quota share scheduling policy details."];
      fairsharePolicy: FairsharePolicy.t option
        [@ocaml.doc "The fair-share scheduling policy details."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags that you apply to the fair-share scheduling policy to categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging Amazon Web Services resources in Amazon Web Services General Reference."]}
    let make ?name =
      fun ?arn ->
        fun ?quotaSharePolicy ->
          fun ?fairsharePolicy ->
            fun ?tags ->
              fun () ->
                { name; arn; quotaSharePolicy; fairsharePolicy; tags }
    let to_value x =
      structure_to_value
        [("name", (Option.map x.name ~f:String_.to_value));
        ("arn", (Option.map x.arn ~f:String_.to_value));
        ("quotaSharePolicy",
          (Option.map x.quotaSharePolicy ~f:QuotaSharePolicy.to_value));
        ("fairsharePolicy",
          (Option.map x.fairsharePolicy ~f:FairsharePolicy.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let fairsharePolicy =
        (Option.map ~f:FairsharePolicy.of_xml)
          (Xml.child xml_arg0 "fairsharePolicy") in
      let quotaSharePolicy =
        (Option.map ~f:QuotaSharePolicy.of_xml)
          (Xml.child xml_arg0 "quotaSharePolicy") in
      let arn = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "arn") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      make ?tags ?fairsharePolicy ?quotaSharePolicy ?arn ?name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let fairsharePolicy =
        field_map json__ "fairsharePolicy" FairsharePolicy.of_json in
      let quotaSharePolicy =
        field_map json__ "quotaSharePolicy" QuotaSharePolicy.of_json in
      let arn = field_map json__ "arn" String_.of_json in
      let name = field_map json__ "name" String_.of_json in
      make ?tags ?fairsharePolicy ?quotaSharePolicy ?arn ?name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "An object that represents a scheduling policy."]
module JobDetail =
  struct
    type nonrec t =
      {
      jobArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the job."];
      jobName: String_.t option [@ocaml.doc "The job name."];
      jobId: String_.t option [@ocaml.doc "The job ID."];
      jobQueue: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the job queue that the job is associated with."];
      status: JobStatus.t option
        [@ocaml.doc
          "The current status for the job. If your jobs don't progress to STARTING, see Jobs stuck in RUNNABLE status in the troubleshooting section of the Batch User Guide."];
      shareIdentifier: String_.t option
        [@ocaml.doc "The share identifier for the job."];
      schedulingPriority: Integer.t option
        [@ocaml.doc
          "The scheduling policy of the job definition. This only affects jobs in job queues with a fair-share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority."];
      attempts: AttemptDetails.t option
        [@ocaml.doc
          "A list of job attempts that are associated with this job."];
      statusReason: String_.t option
        [@ocaml.doc
          "A short, human-readable string to provide more details for the current status of the job. CAPACITY:INSUFFICIENT_INSTANCE_CAPACITY - All compute environments have insufficient capacity to service the job. MISCONFIGURATION:COMPUTE_ENVIRONMENT_MAX_RESOURCE - All compute environments have a maxVcpu setting that is smaller than the job requirements. MISCONFIGURATION:JOB_RESOURCE_REQUIREMENT - All compute environments have no connected instances that meet the job requirements. MISCONFIGURATION:SERVICE_ROLE_PERMISSIONS - All compute environments have problems with the service role permissions."];
      createdAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the job was created. For non-array jobs and parent array jobs, this is when the job entered the SUBMITTED state. This is specifically at the time SubmitJob was called. For array child jobs, this is when the child job was spawned by its parent and entered the PENDING state."];
      retryStrategy: RetryStrategy.t option
        [@ocaml.doc
          "The retry strategy to use for this job if an attempt fails."];
      startedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the job was started. More specifically, it's when the job transitioned from the STARTING state to the RUNNING state."];
      stoppedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the job was stopped. More specifically, it's when the job transitioned from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED."];
      dependsOn: JobDependencyList.t option
        [@ocaml.doc "A list of job IDs that this job depends on."];
      jobDefinition: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the job definition that this job uses."];
      parameters: ParametersMap.t option
        [@ocaml.doc
          "Additional parameters that are passed to the job that replace parameter substitution placeholders or override any corresponding parameter defaults from the job definition."];
      container: ContainerDetail.t option
        [@ocaml.doc
          "An object that represents the details for the container that's associated with the job. If the details are for a multiple-container job, this object will be empty."];
      nodeDetails: NodeDetails.t option
        [@ocaml.doc
          "An object that represents the details of a node that's associated with a multi-node parallel job."];
      nodeProperties: NodeProperties.t option
        [@ocaml.doc
          "An object that represents the node properties of a multi-node parallel job. This isn't applicable to jobs that are running on Fargate resources."];
      arrayProperties: ArrayPropertiesDetail.t option
        [@ocaml.doc "The array properties of the job, if it's an array job."];
      timeout: JobTimeout.t option
        [@ocaml.doc "The timeout configuration for the job."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc "The tags that are applied to the job."];
      propagateTags: Boolean.t option
        [@ocaml.doc
          "Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks when the tasks are created. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the FAILED state."];
      platformCapabilities: PlatformCapabilityList.t option
        [@ocaml.doc
          "The platform capabilities required by the job definition. If no value is specified, it defaults to EC2. Jobs run on Fargate resources specify FARGATE."];
      eksProperties: EksPropertiesDetail.t option
        [@ocaml.doc
          "An object with various properties that are specific to Amazon EKS based jobs."];
      eksAttempts: EksAttemptDetails.t option
        [@ocaml.doc
          "A list of job attempts that are associated with this job."];
      ecsProperties: EcsPropertiesDetail.t option
        [@ocaml.doc
          "An object with properties that are specific to Amazon ECS-based jobs."];
      isCancelled: Boolean.t option
        [@ocaml.doc "Indicates whether the job is canceled."];
      isTerminated: Boolean.t option
        [@ocaml.doc "Indicates whether the job is terminated."];
      consumableResourceProperties: ConsumableResourceProperties.t option
        [@ocaml.doc
          "Contains a list of consumable resources required by the job."]}
    let make ?jobArn =
      fun ?jobName ->
        fun ?jobId ->
          fun ?jobQueue ->
            fun ?status ->
              fun ?shareIdentifier ->
                fun ?schedulingPriority ->
                  fun ?attempts ->
                    fun ?statusReason ->
                      fun ?createdAt ->
                        fun ?retryStrategy ->
                          fun ?startedAt ->
                            fun ?stoppedAt ->
                              fun ?dependsOn ->
                                fun ?jobDefinition ->
                                  fun ?parameters ->
                                    fun ?container ->
                                      fun ?nodeDetails ->
                                        fun ?nodeProperties ->
                                          fun ?arrayProperties ->
                                            fun ?timeout ->
                                              fun ?tags ->
                                                fun ?propagateTags ->
                                                  fun ?platformCapabilities
                                                    ->
                                                    fun ?eksProperties ->
                                                      fun ?eksAttempts ->
                                                        fun ?ecsProperties ->
                                                          fun ?isCancelled ->
                                                            fun ?isTerminated
                                                              ->
                                                              fun
                                                                ?consumableResourceProperties
                                                                ->
                                                                fun () ->
                                                                  {
                                                                    jobArn;
                                                                    jobName;
                                                                    jobId;
                                                                    jobQueue;
                                                                    status;
                                                                    shareIdentifier;
                                                                    schedulingPriority;
                                                                    attempts;
                                                                    statusReason;
                                                                    createdAt;
                                                                    retryStrategy;
                                                                    startedAt;
                                                                    stoppedAt;
                                                                    dependsOn;
                                                                    jobDefinition;
                                                                    parameters;
                                                                    container;
                                                                    nodeDetails;
                                                                    nodeProperties;
                                                                    arrayProperties;
                                                                    timeout;
                                                                    tags;
                                                                    propagateTags;
                                                                    platformCapabilities;
                                                                    eksProperties;
                                                                    eksAttempts;
                                                                    ecsProperties;
                                                                    isCancelled;
                                                                    isTerminated;
                                                                    consumableResourceProperties
                                                                  }
    let to_value x =
      structure_to_value
        [("jobArn", (Option.map x.jobArn ~f:String_.to_value));
        ("jobName", (Option.map x.jobName ~f:String_.to_value));
        ("jobId", (Option.map x.jobId ~f:String_.to_value));
        ("jobQueue", (Option.map x.jobQueue ~f:String_.to_value));
        ("status", (Option.map x.status ~f:JobStatus.to_value));
        ("shareIdentifier",
          (Option.map x.shareIdentifier ~f:String_.to_value));
        ("schedulingPriority",
          (Option.map x.schedulingPriority ~f:Integer.to_value));
        ("attempts", (Option.map x.attempts ~f:AttemptDetails.to_value));
        ("statusReason", (Option.map x.statusReason ~f:String_.to_value));
        ("createdAt", (Option.map x.createdAt ~f:Long.to_value));
        ("retryStrategy",
          (Option.map x.retryStrategy ~f:RetryStrategy.to_value));
        ("startedAt", (Option.map x.startedAt ~f:Long.to_value));
        ("stoppedAt", (Option.map x.stoppedAt ~f:Long.to_value));
        ("dependsOn", (Option.map x.dependsOn ~f:JobDependencyList.to_value));
        ("jobDefinition", (Option.map x.jobDefinition ~f:String_.to_value));
        ("parameters", (Option.map x.parameters ~f:ParametersMap.to_value));
        ("container", (Option.map x.container ~f:ContainerDetail.to_value));
        ("nodeDetails", (Option.map x.nodeDetails ~f:NodeDetails.to_value));
        ("nodeProperties",
          (Option.map x.nodeProperties ~f:NodeProperties.to_value));
        ("arrayProperties",
          (Option.map x.arrayProperties ~f:ArrayPropertiesDetail.to_value));
        ("timeout", (Option.map x.timeout ~f:JobTimeout.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value));
        ("propagateTags", (Option.map x.propagateTags ~f:Boolean.to_value));
        ("platformCapabilities",
          (Option.map x.platformCapabilities
             ~f:PlatformCapabilityList.to_value));
        ("eksProperties",
          (Option.map x.eksProperties ~f:EksPropertiesDetail.to_value));
        ("eksAttempts",
          (Option.map x.eksAttempts ~f:EksAttemptDetails.to_value));
        ("ecsProperties",
          (Option.map x.ecsProperties ~f:EcsPropertiesDetail.to_value));
        ("isCancelled", (Option.map x.isCancelled ~f:Boolean.to_value));
        ("isTerminated", (Option.map x.isTerminated ~f:Boolean.to_value));
        ("consumableResourceProperties",
          (Option.map x.consumableResourceProperties
             ~f:ConsumableResourceProperties.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let consumableResourceProperties =
        (Option.map ~f:ConsumableResourceProperties.of_xml)
          (Xml.child xml_arg0 "consumableResourceProperties") in
      let isTerminated =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "isTerminated") in
      let isCancelled =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "isCancelled") in
      let ecsProperties =
        (Option.map ~f:EcsPropertiesDetail.of_xml)
          (Xml.child xml_arg0 "ecsProperties") in
      let eksAttempts =
        (Option.map ~f:EksAttemptDetails.of_xml)
          (Xml.child xml_arg0 "eksAttempts") in
      let eksProperties =
        (Option.map ~f:EksPropertiesDetail.of_xml)
          (Xml.child xml_arg0 "eksProperties") in
      let platformCapabilities =
        (Option.map ~f:PlatformCapabilityList.of_xml)
          (Xml.child xml_arg0 "platformCapabilities") in
      let propagateTags =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "propagateTags") in
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let timeout =
        (Option.map ~f:JobTimeout.of_xml) (Xml.child xml_arg0 "timeout") in
      let arrayProperties =
        (Option.map ~f:ArrayPropertiesDetail.of_xml)
          (Xml.child xml_arg0 "arrayProperties") in
      let nodeProperties =
        (Option.map ~f:NodeProperties.of_xml)
          (Xml.child xml_arg0 "nodeProperties") in
      let nodeDetails =
        (Option.map ~f:NodeDetails.of_xml) (Xml.child xml_arg0 "nodeDetails") in
      let container =
        (Option.map ~f:ContainerDetail.of_xml)
          (Xml.child xml_arg0 "container") in
      let parameters =
        (Option.map ~f:ParametersMap.of_xml)
          (Xml.child xml_arg0 "parameters") in
      let jobDefinition =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobDefinition") in
      let dependsOn =
        (Option.map ~f:JobDependencyList.of_xml)
          (Xml.child xml_arg0 "dependsOn") in
      let stoppedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "stoppedAt") in
      let startedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "startedAt") in
      let retryStrategy =
        (Option.map ~f:RetryStrategy.of_xml)
          (Xml.child xml_arg0 "retryStrategy") in
      let createdAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "createdAt") in
      let statusReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "statusReason") in
      let attempts =
        (Option.map ~f:AttemptDetails.of_xml) (Xml.child xml_arg0 "attempts") in
      let schedulingPriority =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "schedulingPriority") in
      let shareIdentifier =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "shareIdentifier") in
      let status =
        (Option.map ~f:JobStatus.of_xml) (Xml.child xml_arg0 "status") in
      let jobQueue =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobQueue") in
      let jobId = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobId") in
      let jobName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobName") in
      let jobArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobArn") in
      make ?consumableResourceProperties ?isTerminated ?isCancelled
        ?ecsProperties ?eksAttempts ?eksProperties ?platformCapabilities
        ?propagateTags ?tags ?timeout ?arrayProperties ?nodeProperties
        ?nodeDetails ?container ?parameters ?jobDefinition ?dependsOn
        ?stoppedAt ?startedAt ?retryStrategy ?createdAt ?statusReason
        ?attempts ?schedulingPriority ?shareIdentifier ?status ?jobQueue
        ?jobId ?jobName ?jobArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let consumableResourceProperties =
        field_map json__ "consumableResourceProperties"
          ConsumableResourceProperties.of_json in
      let isTerminated = field_map json__ "isTerminated" Boolean.of_json in
      let isCancelled = field_map json__ "isCancelled" Boolean.of_json in
      let ecsProperties =
        field_map json__ "ecsProperties" EcsPropertiesDetail.of_json in
      let eksAttempts =
        field_map json__ "eksAttempts" EksAttemptDetails.of_json in
      let eksProperties =
        field_map json__ "eksProperties" EksPropertiesDetail.of_json in
      let platformCapabilities =
        field_map json__ "platformCapabilities"
          PlatformCapabilityList.of_json in
      let propagateTags = field_map json__ "propagateTags" Boolean.of_json in
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let timeout = field_map json__ "timeout" JobTimeout.of_json in
      let arrayProperties =
        field_map json__ "arrayProperties" ArrayPropertiesDetail.of_json in
      let nodeProperties =
        field_map json__ "nodeProperties" NodeProperties.of_json in
      let nodeDetails = field_map json__ "nodeDetails" NodeDetails.of_json in
      let container = field_map json__ "container" ContainerDetail.of_json in
      let parameters = field_map json__ "parameters" ParametersMap.of_json in
      let jobDefinition = field_map json__ "jobDefinition" String_.of_json in
      let dependsOn = field_map json__ "dependsOn" JobDependencyList.of_json in
      let stoppedAt = field_map json__ "stoppedAt" Long.of_json in
      let startedAt = field_map json__ "startedAt" Long.of_json in
      let retryStrategy =
        field_map json__ "retryStrategy" RetryStrategy.of_json in
      let createdAt = field_map json__ "createdAt" Long.of_json in
      let statusReason = field_map json__ "statusReason" String_.of_json in
      let attempts = field_map json__ "attempts" AttemptDetails.of_json in
      let schedulingPriority =
        field_map json__ "schedulingPriority" Integer.of_json in
      let shareIdentifier =
        field_map json__ "shareIdentifier" String_.of_json in
      let status = field_map json__ "status" JobStatus.of_json in
      let jobQueue = field_map json__ "jobQueue" String_.of_json in
      let jobId = field_map json__ "jobId" String_.of_json in
      let jobName = field_map json__ "jobName" String_.of_json in
      let jobArn = field_map json__ "jobArn" String_.of_json in
      make ?consumableResourceProperties ?isTerminated ?isCancelled
        ?ecsProperties ?eksAttempts ?eksProperties ?platformCapabilities
        ?propagateTags ?tags ?timeout ?arrayProperties ?nodeProperties
        ?nodeDetails ?container ?parameters ?jobDefinition ?dependsOn
        ?stoppedAt ?startedAt ?retryStrategy ?createdAt ?statusReason
        ?attempts ?schedulingPriority ?shareIdentifier ?status ?jobQueue
        ?jobId ?jobName ?jobArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "An object that represents an Batch job."]
module JobQueueDetail =
  struct
    type nonrec t =
      {
      jobQueueName: String_.t option [@ocaml.doc "The job queue name."];
      jobQueueArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the job queue."];
      state: JQState.t option
        [@ocaml.doc
          "Describes the ability of the queue to accept new jobs. If the job queue state is ENABLED, it can accept jobs. If the job queue state is DISABLED, new jobs can't be added to the queue, but jobs already in the queue can finish."];
      schedulingPolicyArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the scheduling policy. The format is aws:Partition:batch:Region:Account:scheduling-policy/Name . For example, aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy."];
      status: JQStatus.t option
        [@ocaml.doc
          "The status of the job queue (for example, CREATING or VALID)."];
      statusReason: String_.t option
        [@ocaml.doc
          "A short, human-readable string to provide additional details for the current status of the job queue."];
      priority: Integer.t option
        [@ocaml.doc
          "The priority of the job queue. Job queue priority determines the order that job queues are evaluated when multiple queues dispatch jobs within a shared compute environment. A higher value for priority indicates a higher priority. Queues are evaluated in cycles, in descending order by priority. For example, a job queue with a priority value of 10 is evaluated before a queue with a priority value of 1. All of the compute environments must be either Amazon EC2 (EC2 or SPOT) or Fargate (FARGATE or FARGATE_SPOT). Amazon EC2 and Fargate compute environments can't be mixed. Job queue priority doesn't guarantee that a particular job executes before a job in a lower priority queue. Jobs added to higher priority queues during the queue evaluation cycle might not be evaluated until the next cycle. A job is dispatched from a queue only if resources are available when the queue is evaluated. If there are insufficient resources available at that time, the cycle proceeds to the next queue. This means that jobs added to higher priority queues might have to wait for jobs in multiple lower priority queues to complete before they are dispatched. You can use job dependencies to control the order for jobs from queues with different priorities. For more information, see Job Dependencies in the Batch User Guide."];
      computeEnvironmentOrder: ComputeEnvironmentOrders.t option
        [@ocaml.doc
          "The compute environments that are attached to the job queue and the order that job placement is preferred. Compute environments are selected for job placement in ascending order."];
      serviceEnvironmentOrder: ServiceEnvironmentOrders.t option
        [@ocaml.doc
          "The order of the service environment associated with the job queue. Job queues with a higher priority are evaluated first when associated with the same service environment."];
      jobQueueType: JobQueueType.t option
        [@ocaml.doc
          "The type of job queue. For service jobs that run on SageMaker Training, this value is SAGEMAKER_TRAINING. For regular container jobs, this value is EKS, ECS, or ECS_FARGATE depending on the compute environment."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags that are applied to the job queue. For more information, see Tagging your Batch resources in Batch User Guide."];
      jobStateTimeLimitActions: JobStateTimeLimitActions.t option
        [@ocaml.doc
          "The set of actions that Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. Batch will perform each action after maxTimeSeconds has passed."]}
    let make ?jobQueueName =
      fun ?jobQueueArn ->
        fun ?state ->
          fun ?schedulingPolicyArn ->
            fun ?status ->
              fun ?statusReason ->
                fun ?priority ->
                  fun ?computeEnvironmentOrder ->
                    fun ?serviceEnvironmentOrder ->
                      fun ?jobQueueType ->
                        fun ?tags ->
                          fun ?jobStateTimeLimitActions ->
                            fun () ->
                              {
                                jobQueueName;
                                jobQueueArn;
                                state;
                                schedulingPolicyArn;
                                status;
                                statusReason;
                                priority;
                                computeEnvironmentOrder;
                                serviceEnvironmentOrder;
                                jobQueueType;
                                tags;
                                jobStateTimeLimitActions
                              }
    let to_value x =
      structure_to_value
        [("jobQueueName", (Option.map x.jobQueueName ~f:String_.to_value));
        ("jobQueueArn", (Option.map x.jobQueueArn ~f:String_.to_value));
        ("state", (Option.map x.state ~f:JQState.to_value));
        ("schedulingPolicyArn",
          (Option.map x.schedulingPolicyArn ~f:String_.to_value));
        ("status", (Option.map x.status ~f:JQStatus.to_value));
        ("statusReason", (Option.map x.statusReason ~f:String_.to_value));
        ("priority", (Option.map x.priority ~f:Integer.to_value));
        ("computeEnvironmentOrder",
          (Option.map x.computeEnvironmentOrder
             ~f:ComputeEnvironmentOrders.to_value));
        ("serviceEnvironmentOrder",
          (Option.map x.serviceEnvironmentOrder
             ~f:ServiceEnvironmentOrders.to_value));
        ("jobQueueType",
          (Option.map x.jobQueueType ~f:JobQueueType.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value));
        ("jobStateTimeLimitActions",
          (Option.map x.jobStateTimeLimitActions
             ~f:JobStateTimeLimitActions.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobStateTimeLimitActions =
        (Option.map ~f:JobStateTimeLimitActions.of_xml)
          (Xml.child xml_arg0 "jobStateTimeLimitActions") in
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let jobQueueType =
        (Option.map ~f:JobQueueType.of_xml)
          (Xml.child xml_arg0 "jobQueueType") in
      let serviceEnvironmentOrder =
        (Option.map ~f:ServiceEnvironmentOrders.of_xml)
          (Xml.child xml_arg0 "serviceEnvironmentOrder") in
      let computeEnvironmentOrder =
        (Option.map ~f:ComputeEnvironmentOrders.of_xml)
          (Xml.child xml_arg0 "computeEnvironmentOrder") in
      let priority =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "priority") in
      let statusReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "statusReason") in
      let status =
        (Option.map ~f:JQStatus.of_xml) (Xml.child xml_arg0 "status") in
      let schedulingPolicyArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "schedulingPolicyArn") in
      let state = (Option.map ~f:JQState.of_xml) (Xml.child xml_arg0 "state") in
      let jobQueueArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobQueueArn") in
      let jobQueueName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobQueueName") in
      make ?jobStateTimeLimitActions ?tags ?jobQueueType
        ?serviceEnvironmentOrder ?computeEnvironmentOrder ?priority
        ?statusReason ?status ?schedulingPolicyArn ?state ?jobQueueArn
        ?jobQueueName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobStateTimeLimitActions =
        field_map json__ "jobStateTimeLimitActions"
          JobStateTimeLimitActions.of_json in
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let jobQueueType = field_map json__ "jobQueueType" JobQueueType.of_json in
      let serviceEnvironmentOrder =
        field_map json__ "serviceEnvironmentOrder"
          ServiceEnvironmentOrders.of_json in
      let computeEnvironmentOrder =
        field_map json__ "computeEnvironmentOrder"
          ComputeEnvironmentOrders.of_json in
      let priority = field_map json__ "priority" Integer.of_json in
      let statusReason = field_map json__ "statusReason" String_.of_json in
      let status = field_map json__ "status" JQStatus.of_json in
      let schedulingPolicyArn =
        field_map json__ "schedulingPolicyArn" String_.of_json in
      let state = field_map json__ "state" JQState.of_json in
      let jobQueueArn = field_map json__ "jobQueueArn" String_.of_json in
      let jobQueueName = field_map json__ "jobQueueName" String_.of_json in
      make ?jobStateTimeLimitActions ?tags ?jobQueueType
        ?serviceEnvironmentOrder ?computeEnvironmentOrder ?priority
        ?statusReason ?status ?schedulingPolicyArn ?state ?jobQueueArn
        ?jobQueueName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the details for an Batch job queue."]
module JobDefinition =
  struct
    type nonrec t =
      {
      jobDefinitionName: String_.t option
        [@ocaml.doc "The name of the job definition."];
      jobDefinitionArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) for the job definition."];
      revision: Integer.t option
        [@ocaml.doc "The revision of the job definition."];
      status: String_.t option
        [@ocaml.doc "The status of the job definition."];
      type_: String_.t option
        [@ocaml.doc
          "The type of job definition. It's either container or multinode. If the job is run on Fargate resources, then multinode isn't supported. For more information about multi-node parallel jobs, see Creating a multi-node parallel job definition in the Batch User Guide."];
      schedulingPriority: Integer.t option
        [@ocaml.doc
          "The scheduling priority of the job definition. This only affects jobs in job queues with a fair-share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority."];
      parameters: ParametersMap.t option
        [@ocaml.doc
          "Default parameters or parameter substitution placeholders that are set in the job definition. Parameters are specified as a key-value pair mapping. Parameters in a SubmitJob request override any corresponding parameter defaults from the job definition. For more information about specifying parameters, see Job definition parameters in the Batch User Guide."];
      retryStrategy: RetryStrategy.t option
        [@ocaml.doc
          "The retry strategy to use for failed jobs that are submitted with this job definition."];
      containerProperties: ContainerProperties.t option
        [@ocaml.doc
          "An object with properties specific to Amazon ECS-based jobs. When containerProperties is used in the job definition, it can't be used in addition to eksProperties, ecsProperties, or nodeProperties."];
      timeout: JobTimeout.t option
        [@ocaml.doc
          "The timeout time for jobs that are submitted with this job definition. After the amount of time you specify passes, Batch terminates your jobs if they aren't finished."];
      nodeProperties: NodeProperties.t option
        [@ocaml.doc
          "An object with properties that are specific to multi-node parallel jobs. When nodeProperties is used in the job definition, it can't be used in addition to containerProperties, ecsProperties, or eksProperties. If the job runs on Fargate resources, don't specify nodeProperties. Use containerProperties instead."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc "The tags that are applied to the job definition."];
      propagateTags: Boolean.t option
        [@ocaml.doc
          "Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks when the tasks are created. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the FAILED state."];
      platformCapabilities: PlatformCapabilityList.t option
        [@ocaml.doc
          "The platform capabilities required by the job definition. If no value is specified, it defaults to EC2. Jobs run on Fargate resources specify FARGATE."];
      ecsProperties: EcsProperties.t option
        [@ocaml.doc
          "An object that contains the properties for the Amazon ECS resources of a job.When ecsProperties is used in the job definition, it can't be used in addition to containerProperties, eksProperties, or nodeProperties."];
      eksProperties: EksProperties.t option
        [@ocaml.doc
          "An object with properties that are specific to Amazon EKS-based jobs. When eksProperties is used in the job definition, it can't be used in addition to containerProperties, ecsProperties, or nodeProperties."];
      containerOrchestrationType: OrchestrationType.t option
        [@ocaml.doc
          "The orchestration type of the compute environment. The valid values are ECS (default) or EKS."];
      consumableResourceProperties: ConsumableResourceProperties.t option
        [@ocaml.doc
          "Contains a list of consumable resources required by the job."]}
    let make ?jobDefinitionName =
      fun ?jobDefinitionArn ->
        fun ?revision ->
          fun ?status ->
            fun ?type_ ->
              fun ?schedulingPriority ->
                fun ?parameters ->
                  fun ?retryStrategy ->
                    fun ?containerProperties ->
                      fun ?timeout ->
                        fun ?nodeProperties ->
                          fun ?tags ->
                            fun ?propagateTags ->
                              fun ?platformCapabilities ->
                                fun ?ecsProperties ->
                                  fun ?eksProperties ->
                                    fun ?containerOrchestrationType ->
                                      fun ?consumableResourceProperties ->
                                        fun () ->
                                          {
                                            jobDefinitionName;
                                            jobDefinitionArn;
                                            revision;
                                            status;
                                            type_;
                                            schedulingPriority;
                                            parameters;
                                            retryStrategy;
                                            containerProperties;
                                            timeout;
                                            nodeProperties;
                                            tags;
                                            propagateTags;
                                            platformCapabilities;
                                            ecsProperties;
                                            eksProperties;
                                            containerOrchestrationType;
                                            consumableResourceProperties
                                          }
    let to_value x =
      structure_to_value
        [("jobDefinitionName",
           (Option.map x.jobDefinitionName ~f:String_.to_value));
        ("jobDefinitionArn",
          (Option.map x.jobDefinitionArn ~f:String_.to_value));
        ("revision", (Option.map x.revision ~f:Integer.to_value));
        ("status", (Option.map x.status ~f:String_.to_value));
        ("type", (Option.map x.type_ ~f:String_.to_value));
        ("schedulingPriority",
          (Option.map x.schedulingPriority ~f:Integer.to_value));
        ("parameters", (Option.map x.parameters ~f:ParametersMap.to_value));
        ("retryStrategy",
          (Option.map x.retryStrategy ~f:RetryStrategy.to_value));
        ("containerProperties",
          (Option.map x.containerProperties ~f:ContainerProperties.to_value));
        ("timeout", (Option.map x.timeout ~f:JobTimeout.to_value));
        ("nodeProperties",
          (Option.map x.nodeProperties ~f:NodeProperties.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value));
        ("propagateTags", (Option.map x.propagateTags ~f:Boolean.to_value));
        ("platformCapabilities",
          (Option.map x.platformCapabilities
             ~f:PlatformCapabilityList.to_value));
        ("ecsProperties",
          (Option.map x.ecsProperties ~f:EcsProperties.to_value));
        ("eksProperties",
          (Option.map x.eksProperties ~f:EksProperties.to_value));
        ("containerOrchestrationType",
          (Option.map x.containerOrchestrationType
             ~f:OrchestrationType.to_value));
        ("consumableResourceProperties",
          (Option.map x.consumableResourceProperties
             ~f:ConsumableResourceProperties.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let consumableResourceProperties =
        (Option.map ~f:ConsumableResourceProperties.of_xml)
          (Xml.child xml_arg0 "consumableResourceProperties") in
      let containerOrchestrationType =
        (Option.map ~f:OrchestrationType.of_xml)
          (Xml.child xml_arg0 "containerOrchestrationType") in
      let eksProperties =
        (Option.map ~f:EksProperties.of_xml)
          (Xml.child xml_arg0 "eksProperties") in
      let ecsProperties =
        (Option.map ~f:EcsProperties.of_xml)
          (Xml.child xml_arg0 "ecsProperties") in
      let platformCapabilities =
        (Option.map ~f:PlatformCapabilityList.of_xml)
          (Xml.child xml_arg0 "platformCapabilities") in
      let propagateTags =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "propagateTags") in
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let nodeProperties =
        (Option.map ~f:NodeProperties.of_xml)
          (Xml.child xml_arg0 "nodeProperties") in
      let timeout =
        (Option.map ~f:JobTimeout.of_xml) (Xml.child xml_arg0 "timeout") in
      let containerProperties =
        (Option.map ~f:ContainerProperties.of_xml)
          (Xml.child xml_arg0 "containerProperties") in
      let retryStrategy =
        (Option.map ~f:RetryStrategy.of_xml)
          (Xml.child xml_arg0 "retryStrategy") in
      let parameters =
        (Option.map ~f:ParametersMap.of_xml)
          (Xml.child xml_arg0 "parameters") in
      let schedulingPriority =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "schedulingPriority") in
      let type_ = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "type") in
      let status =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "status") in
      let revision =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "revision") in
      let jobDefinitionArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "jobDefinitionArn") in
      let jobDefinitionName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "jobDefinitionName") in
      make ?consumableResourceProperties ?containerOrchestrationType
        ?eksProperties ?ecsProperties ?platformCapabilities ?propagateTags
        ?tags ?nodeProperties ?timeout ?containerProperties ?retryStrategy
        ?parameters ?schedulingPriority ?type_ ?status ?revision
        ?jobDefinitionArn ?jobDefinitionName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let consumableResourceProperties =
        field_map json__ "consumableResourceProperties"
          ConsumableResourceProperties.of_json in
      let containerOrchestrationType =
        field_map json__ "containerOrchestrationType"
          OrchestrationType.of_json in
      let eksProperties =
        field_map json__ "eksProperties" EksProperties.of_json in
      let ecsProperties =
        field_map json__ "ecsProperties" EcsProperties.of_json in
      let platformCapabilities =
        field_map json__ "platformCapabilities"
          PlatformCapabilityList.of_json in
      let propagateTags = field_map json__ "propagateTags" Boolean.of_json in
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let nodeProperties =
        field_map json__ "nodeProperties" NodeProperties.of_json in
      let timeout = field_map json__ "timeout" JobTimeout.of_json in
      let containerProperties =
        field_map json__ "containerProperties" ContainerProperties.of_json in
      let retryStrategy =
        field_map json__ "retryStrategy" RetryStrategy.of_json in
      let parameters = field_map json__ "parameters" ParametersMap.of_json in
      let schedulingPriority =
        field_map json__ "schedulingPriority" Integer.of_json in
      let type_ = field_map json__ "type" String_.of_json in
      let status = field_map json__ "status" String_.of_json in
      let revision = field_map json__ "revision" Integer.of_json in
      let jobDefinitionArn =
        field_map json__ "jobDefinitionArn" String_.of_json in
      let jobDefinitionName =
        field_map json__ "jobDefinitionName" String_.of_json in
      make ?consumableResourceProperties ?containerOrchestrationType
        ?eksProperties ?ecsProperties ?platformCapabilities ?propagateTags
        ?tags ?nodeProperties ?timeout ?containerProperties ?retryStrategy
        ?parameters ?schedulingPriority ?type_ ?status ?revision
        ?jobDefinitionArn ?jobDefinitionName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "An object that represents an Batch job definition."]
module ComputeEnvironmentDetail =
  struct
    type nonrec t =
      {
      computeEnvironmentName: String_.t option
        [@ocaml.doc
          "The name of the compute environment. It can be up to 128 characters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_)."];
      computeEnvironmentArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the compute environment."];
      unmanagedvCpus: Integer.t option
        [@ocaml.doc
          "The maximum number of VCPUs expected to be used for an unmanaged compute environment."];
      ecsClusterArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster that the compute environment uses."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc "The tags applied to the compute environment."];
      type_: CEType.t option
        [@ocaml.doc
          "The type of the compute environment: MANAGED or UNMANAGED. For more information, see Compute environments in the Batch User Guide."];
      state: CEState.t option
        [@ocaml.doc
          "The state of the compute environment. The valid values are ENABLED or DISABLED. If the state is ENABLED, then the Batch scheduler can attempt to place jobs from an associated job queue on the compute resources within the environment. If the compute environment is managed, then it can scale its instances out or in automatically based on the job queue demand. If the state is DISABLED, then the Batch scheduler doesn't attempt to place jobs within the environment. Jobs in a STARTING or RUNNING state continue to progress normally. Managed compute environments in the DISABLED state don't scale out. Compute environments in a DISABLED state may continue to incur billing charges, for example, if they have running instances due to jobs that are still executing or a non-zero minvCpus setting. To prevent additional charges, disable and delete the compute environment. When an instance is idle, the instance scales down to the minvCpus value. However, the instance size doesn't change. For example, consider a c5.8xlarge instance with a minvCpus value of 4 and a desiredvCpus value of 36. This instance doesn't scale down to a c5.large instance."];
      status: CEStatus.t option
        [@ocaml.doc
          "The current status of the compute environment (for example, CREATING or VALID)."];
      statusReason: String_.t option
        [@ocaml.doc
          "A short, human-readable string to provide additional details for the current status of the compute environment."];
      computeResources: ComputeResource.t option
        [@ocaml.doc
          "The compute resources defined for the compute environment. For more information, see Compute environments in the Batch User Guide."];
      serviceRole: String_.t option
        [@ocaml.doc
          "The service role that's associated with the compute environment that allows Batch to make calls to Amazon Web Services API operations on your behalf. For more information, see Batch service IAM role in the Batch User Guide."];
      updatePolicy: UpdatePolicy.t option
        [@ocaml.doc
          "Specifies the infrastructure update policy for the compute environment. For more information about infrastructure updates, see Updating compute environments in the Batch User Guide."];
      eksConfiguration: EksConfiguration.t option
        [@ocaml.doc
          "The configuration for the Amazon EKS cluster that supports the Batch compute environment. Only specify this parameter if the containerOrchestrationType is EKS."];
      containerOrchestrationType: OrchestrationType.t option
        [@ocaml.doc
          "The orchestration type of the compute environment. The valid values are ECS (default) or EKS."];
      uuid: String_.t option
        [@ocaml.doc "Unique identifier for the compute environment."];
      context: String_.t option [@ocaml.doc "Reserved."]}
    let make ?computeEnvironmentName =
      fun ?computeEnvironmentArn ->
        fun ?unmanagedvCpus ->
          fun ?ecsClusterArn ->
            fun ?tags ->
              fun ?type_ ->
                fun ?state ->
                  fun ?status ->
                    fun ?statusReason ->
                      fun ?computeResources ->
                        fun ?serviceRole ->
                          fun ?updatePolicy ->
                            fun ?eksConfiguration ->
                              fun ?containerOrchestrationType ->
                                fun ?uuid ->
                                  fun ?context ->
                                    fun () ->
                                      {
                                        computeEnvironmentName;
                                        computeEnvironmentArn;
                                        unmanagedvCpus;
                                        ecsClusterArn;
                                        tags;
                                        type_;
                                        state;
                                        status;
                                        statusReason;
                                        computeResources;
                                        serviceRole;
                                        updatePolicy;
                                        eksConfiguration;
                                        containerOrchestrationType;
                                        uuid;
                                        context
                                      }
    let to_value x =
      structure_to_value
        [("computeEnvironmentName",
           (Option.map x.computeEnvironmentName ~f:String_.to_value));
        ("computeEnvironmentArn",
          (Option.map x.computeEnvironmentArn ~f:String_.to_value));
        ("unmanagedvCpus", (Option.map x.unmanagedvCpus ~f:Integer.to_value));
        ("ecsClusterArn", (Option.map x.ecsClusterArn ~f:String_.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value));
        ("type", (Option.map x.type_ ~f:CEType.to_value));
        ("state", (Option.map x.state ~f:CEState.to_value));
        ("status", (Option.map x.status ~f:CEStatus.to_value));
        ("statusReason", (Option.map x.statusReason ~f:String_.to_value));
        ("computeResources",
          (Option.map x.computeResources ~f:ComputeResource.to_value));
        ("serviceRole", (Option.map x.serviceRole ~f:String_.to_value));
        ("updatePolicy",
          (Option.map x.updatePolicy ~f:UpdatePolicy.to_value));
        ("eksConfiguration",
          (Option.map x.eksConfiguration ~f:EksConfiguration.to_value));
        ("containerOrchestrationType",
          (Option.map x.containerOrchestrationType
             ~f:OrchestrationType.to_value));
        ("uuid", (Option.map x.uuid ~f:String_.to_value));
        ("context", (Option.map x.context ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let context =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "context") in
      let uuid = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "uuid") in
      let containerOrchestrationType =
        (Option.map ~f:OrchestrationType.of_xml)
          (Xml.child xml_arg0 "containerOrchestrationType") in
      let eksConfiguration =
        (Option.map ~f:EksConfiguration.of_xml)
          (Xml.child xml_arg0 "eksConfiguration") in
      let updatePolicy =
        (Option.map ~f:UpdatePolicy.of_xml)
          (Xml.child xml_arg0 "updatePolicy") in
      let serviceRole =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "serviceRole") in
      let computeResources =
        (Option.map ~f:ComputeResource.of_xml)
          (Xml.child xml_arg0 "computeResources") in
      let statusReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "statusReason") in
      let status =
        (Option.map ~f:CEStatus.of_xml) (Xml.child xml_arg0 "status") in
      let state = (Option.map ~f:CEState.of_xml) (Xml.child xml_arg0 "state") in
      let type_ = (Option.map ~f:CEType.of_xml) (Xml.child xml_arg0 "type") in
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let ecsClusterArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "ecsClusterArn") in
      let unmanagedvCpus =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "unmanagedvCpus") in
      let computeEnvironmentArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "computeEnvironmentArn") in
      let computeEnvironmentName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "computeEnvironmentName") in
      make ?context ?uuid ?containerOrchestrationType ?eksConfiguration
        ?updatePolicy ?serviceRole ?computeResources ?statusReason ?status
        ?state ?type_ ?tags ?ecsClusterArn ?unmanagedvCpus
        ?computeEnvironmentArn ?computeEnvironmentName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let context = field_map json__ "context" String_.of_json in
      let uuid = field_map json__ "uuid" String_.of_json in
      let containerOrchestrationType =
        field_map json__ "containerOrchestrationType"
          OrchestrationType.of_json in
      let eksConfiguration =
        field_map json__ "eksConfiguration" EksConfiguration.of_json in
      let updatePolicy = field_map json__ "updatePolicy" UpdatePolicy.of_json in
      let serviceRole = field_map json__ "serviceRole" String_.of_json in
      let computeResources =
        field_map json__ "computeResources" ComputeResource.of_json in
      let statusReason = field_map json__ "statusReason" String_.of_json in
      let status = field_map json__ "status" CEStatus.of_json in
      let state = field_map json__ "state" CEState.of_json in
      let type_ = field_map json__ "type" CEType.of_json in
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let ecsClusterArn = field_map json__ "ecsClusterArn" String_.of_json in
      let unmanagedvCpus = field_map json__ "unmanagedvCpus" Integer.of_json in
      let computeEnvironmentArn =
        field_map json__ "computeEnvironmentArn" String_.of_json in
      let computeEnvironmentName =
        field_map json__ "computeEnvironmentName" String_.of_json in
      make ?context ?uuid ?containerOrchestrationType ?eksConfiguration
        ?updatePolicy ?serviceRole ?computeResources ?statusReason ?status
        ?state ?type_ ?tags ?ecsClusterArn ?unmanagedvCpus
        ?computeEnvironmentArn ?computeEnvironmentName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "An object that represents an Batch compute environment."]
module ClientException =
  struct
    type nonrec t = {
      message: String_.t option }
    let make ?message = fun () -> { message }
    let to_value x =
      structure_to_value
        [("message", (Option.map x.message ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let message =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "message") in
      make ?message ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let message = field_map json__ "message" String_.of_json in
      make ?message ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid."]
module ServerException =
  struct
    type nonrec t = {
      message: String_.t option }
    let make ?message = fun () -> { message }
    let to_value x =
      structure_to_value
        [("message", (Option.map x.message ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let message =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "message") in
      make ?message ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let message = field_map json__ "message" String_.of_json in
      make ?message ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "These errors are usually caused by a server issue."]
module ClientRequestToken =
  struct
    type nonrec t = string
    let context_ = "ClientRequestToken"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:64) >>=
             (fun () -> check_string_min i ~min:1));
        i
    let of_string x = x
    let to_value x = `String x
    let to_query v = to_query to_value v
    let to_header x = x
    let of_xml = Xml.string_data_exn ~context:context_
    let of_json j = string_of_json ~kind:"ClientRequestToken" j
    let to_json = simple_to_json to_value
  end
module ComputeResourceUpdate =
  struct
    type nonrec t =
      {
      minvCpus: Integer.t option
        [@ocaml.doc
          "The minimum number of vCPUs that an environment should maintain (even if the compute environment is DISABLED). This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      maxvCpus: Integer.t option
        [@ocaml.doc
          "The maximum number of Amazon EC2 vCPUs that an environment can reach. With BEST_FIT_PROGRESSIVE,SPOT_CAPACITY_OPTIMIZED and SPOT_PRICE_CAPACITY_OPTIMIZED (recommended) strategies using On-Demand or Spot Instances, and the BEST_FIT strategy using Spot Instances, Batch might need to exceed maxvCpus to meet your capacity requirements. In this event, Batch never exceeds maxvCpus by more than a single instance."];
      desiredvCpus: Integer.t option
        [@ocaml.doc
          "The desired number of vCPUS in the compute environment. Batch modifies this value between the minimum and maximum values based on job queue demand. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it. Batch doesn't support changing the desired number of vCPUs of an existing compute environment. Don't specify this parameter for compute environments using Amazon EKS clusters. When you update the desiredvCpus setting, the value must be between the minvCpus and maxvCpus values. Additionally, the updated desiredvCpus value must be greater than or equal to the current desiredvCpus value. For more information, see Troubleshooting Batch in the Batch User Guide."];
      subnets: StringList.t option
        [@ocaml.doc
          "The VPC subnets where the compute resources are launched. Fargate compute resources can contain up to 16 subnets. For Fargate compute resources, providing an empty list will be handled as if this parameter wasn't specified and no change is made. For Amazon EC2 compute resources, providing an empty list removes the VPC subnets from the compute resource. For more information, see VPCs and subnets in the Amazon VPC User Guide. When updating a compute environment, changing the VPC subnets requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide. Batch on Amazon EC2 and Batch on Amazon EKS support Local Zones. For more information, see Local Zones in the Amazon EC2 User Guide for Linux Instances, Amazon EKS and Amazon Web Services Local Zones in the Amazon EKS User Guide and Amazon ECS clusters in Local Zones, Wavelength Zones, and Amazon Web Services Outposts in the Amazon ECS Developer Guide. Batch on Fargate doesn't currently support Local Zones."];
      securityGroupIds: StringList.t option
        [@ocaml.doc
          "The Amazon EC2 security groups that are associated with instances launched in the compute environment. This parameter is required for Fargate compute resources, where it can contain up to 5 security groups. For Fargate compute resources, providing an empty list is handled as if this parameter wasn't specified and no change is made. For Amazon EC2 compute resources, providing an empty list removes the security groups from the compute resource. When updating a compute environment, changing the Amazon EC2 security groups requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide."];
      allocationStrategy: CRUpdateAllocationStrategy.t option
        [@ocaml.doc
          "The allocation strategy to use for the compute resource if there's not enough instances of the best fitting instance type that can be allocated. This might be because of availability of the instance type in the Region or Amazon EC2 service limits. For more information, see Allocation strategies in the Batch User Guide. When updating a compute environment, changing the allocation strategy requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide. BEST_FIT isn't supported when updating a compute environment. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it. BEST_FIT_PROGRESSIVE Batch selects additional instance types that are large enough to meet the requirements of the jobs in the queue. Its preference is for instance types with lower cost vCPUs. If additional instances of the previously selected instance types aren't available, Batch selects new instance types. SPOT_CAPACITY_OPTIMIZED Batch selects one or more instance types that are large enough to meet the requirements of the jobs in the queue. Its preference is for instance types that are less likely to be interrupted. This allocation strategy is only available for Spot Instance compute resources. SPOT_PRICE_CAPACITY_OPTIMIZED The price and capacity optimized allocation strategy looks at both price and capacity to select the Spot Instance pools that are the least likely to be interrupted and have the lowest possible price. This allocation strategy is only available for Spot Instance compute resources. With BEST_FIT_PROGRESSIVE,SPOT_CAPACITY_OPTIMIZED and SPOT_PRICE_CAPACITY_OPTIMIZED (recommended) strategies using On-Demand or Spot Instances, and the BEST_FIT strategy using Spot Instances, Batch might need to exceed maxvCpus to meet your capacity requirements. In this event, Batch never exceeds maxvCpus by more than a single instance."];
      instanceTypes: StringList.t option
        [@ocaml.doc
          "The instances types that can be launched. You can specify instance families to launch any instance type within those families (for example, c5 or p3), or you can specify specific sizes within a family (such as c5.8xlarge). Batch can select the instance type for you if you choose one of the following: optimal to select instance types (from the c4, m4, r4, c5, m5, and r5 instance families) that match the demand of your job queues. default_x86_64 to choose x86 based instance types (from the m6i, c6i, r6i, and c7i instance families) that matches the resource demands of the job queue. default_arm64 to choose x86 based instance types (from the m6g, c6g, r6g, and c7g instance families) that matches the resource demands of the job queue. Starting on 11/01/2025 the behavior of optimal is going to be changed to match default_x86_64. During the change your instance families could be updated to a newer generation. You do not need to perform any actions for the upgrade to happen. For more information about change, see Optimal instance type configuration to receive automatic instance family updates. Instance family availability varies by Amazon Web Services Region. For example, some Amazon Web Services Regions may not have any fourth generation instance families but have fifth and sixth generation instance families. When using default_x86_64 or default_arm64 instance bundles, Batch selects instance families based on a balance of cost-effectiveness and performance. While newer generation instances often provide better price-performance, Batch may choose an earlier generation instance family if it provides the optimal combination of availability, cost, and performance for your workload. For example, in an Amazon Web Services Region where both c6i and c7i instances are available, Batch might select c6i instances if they offer better cost-effectiveness for your specific job requirements. For more information on Batch instance types and Amazon Web Services Region availability, see Instance type compute table in the Batch User Guide. Batch periodically updates your instances in default bundles to newer, more cost-effective options. Updates happen automatically without requiring any action from you. Your workloads continue running during updates with no interruption This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it. When you create a compute environment, the instance types that you select for the compute environment must share the same architecture. For example, you can't mix x86 and ARM instances in the same compute environment."];
      ec2KeyPair: String_.t option
        [@ocaml.doc
          "The Amazon EC2 key pair that's used for instances launched in the compute environment. You can use this key pair to log in to your instances with SSH. To remove the Amazon EC2 key pair, set this value to an empty string. When updating a compute environment, changing the Amazon EC2 key pair requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      instanceRole: String_.t option
        [@ocaml.doc
          "The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment. Required for Amazon EC2 instances. You can specify the short name or full Amazon Resource Name (ARN) of an instance profile. For example, ecsInstanceRole or arn:aws:iam::<aws_account_id>:instance-profile/ecsInstanceRole . For more information, see Amazon ECS instance role in the Batch User Guide. When updating a compute environment, changing this setting requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      tags: TagsMap.t option
        [@ocaml.doc
          "Key-value pair tags to be applied to Amazon EC2 resources that are launched in the compute environment. For Batch, these take the form of \"String1\": \"String2\", where String1 is the tag key and String2 is the tag value (for example, \\{ \"Name\": \"Batch Instance - C4OnDemand\" \\}). This is helpful for recognizing your Batch instances in the Amazon EC2 console. These tags aren't seen when using the Batch ListTagsForResource API operation. When updating a compute environment, changing this setting requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      placementGroup: String_.t option
        [@ocaml.doc
          "The Amazon EC2 placement group to associate with your compute resources. If you intend to submit multi-node parallel jobs to your compute environment, you should consider creating a cluster placement group and associate it with your compute resources. This keeps your multi-node parallel job on a logical grouping of instances within a single Availability Zone with high network flow potential. For more information, see Placement groups in the Amazon EC2 User Guide for Linux Instances. When updating a compute environment, changing the placement group requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      bidPercentage: Integer.t option
        [@ocaml.doc
          "The maximum percentage that a Spot Instance price can be when compared with the On-Demand price for that instance type before instances are launched. For example, if your maximum percentage is 20%, the Spot price must be less than 20% of the current On-Demand price for that Amazon EC2 instance. You always pay the lowest (market) price and never more than your maximum percentage. For most use cases, we recommend leaving this field empty. When updating a compute environment, changing the bid percentage requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      launchTemplate: LaunchTemplateSpecification.t option
        [@ocaml.doc
          "The updated launch template to use for your compute resources. You must specify either the launch template ID or launch template name in the request, but not both. For more information, see Launch template support in the Batch User Guide. To remove the custom launch template and use the default launch template, set launchTemplateId or launchTemplateName member of the launch template specification to an empty string. Removing the launch template from a compute environment will not remove the AMI specified in the launch template. In order to update the AMI specified in a launch template, the updateToLatestImageVersion parameter must be set to true. When updating a compute environment, changing the launch template requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      ec2Configuration: Ec2ConfigurationList.t option
        [@ocaml.doc
          "Provides information used to select Amazon Machine Images (AMIs) for Amazon EC2 instances in the compute environment. If Ec2Configuration isn't specified, the default is ECS_AL2023 for EC2 (ECS) compute environments and EKS_AL2023 for EKS compute environments. When updating a compute environment, changing this setting requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide. To remove the Amazon EC2 configuration and any custom AMI ID specified in imageIdOverride, set this value to an empty string. One or two values can be provided. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."];
      updateToLatestImageVersion: Boolean.t option
        [@ocaml.doc
          "Specifies whether the AMI ID is updated to the latest one that's supported by Batch when the compute environment has an infrastructure update. The default value is false. An AMI ID can either be specified in the imageId or imageIdOverride parameters or be determined by the launch template that's specified in the launchTemplate parameter. If an AMI ID is specified any of these ways, this parameter is ignored. For more information about to update AMI IDs during an infrastructure update, see Updating the AMI ID in the Batch User Guide. When updating a compute environment, changing this setting requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide."];
      type_: CRType.t option
        [@ocaml.doc
          "The type of compute environment: EC2, SPOT, FARGATE, or FARGATE_SPOT. For more information, see Compute environments in the Batch User Guide. If you choose SPOT, you must also specify an Amazon EC2 Spot Fleet role with the spotIamFleetRole parameter. For more information, see Amazon EC2 spot fleet role in the Batch User Guide. When updating a compute environment, changing the type of a compute environment requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide."];
      imageId: String_.t option
        [@ocaml.doc
          "The Amazon Machine Image (AMI) ID used for instances launched in the compute environment. This parameter is overridden by the imageIdOverride member of the Ec2Configuration structure. To remove the custom AMI ID and use the default AMI ID, set this value to an empty string. When updating a compute environment, changing the AMI ID requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the Batch User Guide. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it. The AMI that you choose for a compute environment must match the architecture of the instance types that you intend to use for that compute environment. For example, if your compute environment uses A1 instance types, the compute resource AMI that you choose must support ARM instances. Amazon ECS vends both x86 and ARM versions of the Amazon ECS-optimized Amazon Linux 2023 AMI. For more information, see Amazon ECS-optimized Amazon Linux 2023 AMI in the Amazon Elastic Container Service Developer Guide."];
      scalingPolicy: ComputeScalingPolicy.t option
        [@ocaml.doc
          "The scaling policy configuration for the compute environment. This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it."]}
    let make ?minvCpus =
      fun ?maxvCpus ->
        fun ?desiredvCpus ->
          fun ?subnets ->
            fun ?securityGroupIds ->
              fun ?allocationStrategy ->
                fun ?instanceTypes ->
                  fun ?ec2KeyPair ->
                    fun ?instanceRole ->
                      fun ?tags ->
                        fun ?placementGroup ->
                          fun ?bidPercentage ->
                            fun ?launchTemplate ->
                              fun ?ec2Configuration ->
                                fun ?updateToLatestImageVersion ->
                                  fun ?type_ ->
                                    fun ?imageId ->
                                      fun ?scalingPolicy ->
                                        fun () ->
                                          {
                                            minvCpus;
                                            maxvCpus;
                                            desiredvCpus;
                                            subnets;
                                            securityGroupIds;
                                            allocationStrategy;
                                            instanceTypes;
                                            ec2KeyPair;
                                            instanceRole;
                                            tags;
                                            placementGroup;
                                            bidPercentage;
                                            launchTemplate;
                                            ec2Configuration;
                                            updateToLatestImageVersion;
                                            type_;
                                            imageId;
                                            scalingPolicy
                                          }
    let to_value x =
      structure_to_value
        [("minvCpus", (Option.map x.minvCpus ~f:Integer.to_value));
        ("maxvCpus", (Option.map x.maxvCpus ~f:Integer.to_value));
        ("desiredvCpus", (Option.map x.desiredvCpus ~f:Integer.to_value));
        ("subnets", (Option.map x.subnets ~f:StringList.to_value));
        ("securityGroupIds",
          (Option.map x.securityGroupIds ~f:StringList.to_value));
        ("allocationStrategy",
          (Option.map x.allocationStrategy
             ~f:CRUpdateAllocationStrategy.to_value));
        ("instanceTypes",
          (Option.map x.instanceTypes ~f:StringList.to_value));
        ("ec2KeyPair", (Option.map x.ec2KeyPair ~f:String_.to_value));
        ("instanceRole", (Option.map x.instanceRole ~f:String_.to_value));
        ("tags", (Option.map x.tags ~f:TagsMap.to_value));
        ("placementGroup", (Option.map x.placementGroup ~f:String_.to_value));
        ("bidPercentage", (Option.map x.bidPercentage ~f:Integer.to_value));
        ("launchTemplate",
          (Option.map x.launchTemplate
             ~f:LaunchTemplateSpecification.to_value));
        ("ec2Configuration",
          (Option.map x.ec2Configuration ~f:Ec2ConfigurationList.to_value));
        ("updateToLatestImageVersion",
          (Option.map x.updateToLatestImageVersion ~f:Boolean.to_value));
        ("type", (Option.map x.type_ ~f:CRType.to_value));
        ("imageId", (Option.map x.imageId ~f:String_.to_value));
        ("scalingPolicy",
          (Option.map x.scalingPolicy ~f:ComputeScalingPolicy.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let scalingPolicy =
        (Option.map ~f:ComputeScalingPolicy.of_xml)
          (Xml.child xml_arg0 "scalingPolicy") in
      let imageId =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "imageId") in
      let type_ = (Option.map ~f:CRType.of_xml) (Xml.child xml_arg0 "type") in
      let updateToLatestImageVersion =
        (Option.map ~f:Boolean.of_xml)
          (Xml.child xml_arg0 "updateToLatestImageVersion") in
      let ec2Configuration =
        (Option.map ~f:Ec2ConfigurationList.of_xml)
          (Xml.child xml_arg0 "ec2Configuration") in
      let launchTemplate =
        (Option.map ~f:LaunchTemplateSpecification.of_xml)
          (Xml.child xml_arg0 "launchTemplate") in
      let bidPercentage =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "bidPercentage") in
      let placementGroup =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "placementGroup") in
      let tags = (Option.map ~f:TagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let instanceRole =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "instanceRole") in
      let ec2KeyPair =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "ec2KeyPair") in
      let instanceTypes =
        (Option.map ~f:StringList.of_xml)
          (Xml.child xml_arg0 "instanceTypes") in
      let allocationStrategy =
        (Option.map ~f:CRUpdateAllocationStrategy.of_xml)
          (Xml.child xml_arg0 "allocationStrategy") in
      let securityGroupIds =
        (Option.map ~f:StringList.of_xml)
          (Xml.child xml_arg0 "securityGroupIds") in
      let subnets =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "subnets") in
      let desiredvCpus =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "desiredvCpus") in
      let maxvCpus =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "maxvCpus") in
      let minvCpus =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "minvCpus") in
      make ?scalingPolicy ?imageId ?type_ ?updateToLatestImageVersion
        ?ec2Configuration ?launchTemplate ?bidPercentage ?placementGroup
        ?tags ?instanceRole ?ec2KeyPair ?instanceTypes ?allocationStrategy
        ?securityGroupIds ?subnets ?desiredvCpus ?maxvCpus ?minvCpus ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let scalingPolicy =
        field_map json__ "scalingPolicy" ComputeScalingPolicy.of_json in
      let imageId = field_map json__ "imageId" String_.of_json in
      let type_ = field_map json__ "type" CRType.of_json in
      let updateToLatestImageVersion =
        field_map json__ "updateToLatestImageVersion" Boolean.of_json in
      let ec2Configuration =
        field_map json__ "ec2Configuration" Ec2ConfigurationList.of_json in
      let launchTemplate =
        field_map json__ "launchTemplate" LaunchTemplateSpecification.of_json in
      let bidPercentage = field_map json__ "bidPercentage" Integer.of_json in
      let placementGroup = field_map json__ "placementGroup" String_.of_json in
      let tags = field_map json__ "tags" TagsMap.of_json in
      let instanceRole = field_map json__ "instanceRole" String_.of_json in
      let ec2KeyPair = field_map json__ "ec2KeyPair" String_.of_json in
      let instanceTypes = field_map json__ "instanceTypes" StringList.of_json in
      let allocationStrategy =
        field_map json__ "allocationStrategy"
          CRUpdateAllocationStrategy.of_json in
      let securityGroupIds =
        field_map json__ "securityGroupIds" StringList.of_json in
      let subnets = field_map json__ "subnets" StringList.of_json in
      let desiredvCpus = field_map json__ "desiredvCpus" Integer.of_json in
      let maxvCpus = field_map json__ "maxvCpus" Integer.of_json in
      let minvCpus = field_map json__ "minvCpus" Integer.of_json in
      make ?scalingPolicy ?imageId ?type_ ?updateToLatestImageVersion
        ?ec2Configuration ?launchTemplate ?bidPercentage ?placementGroup
        ?tags ?instanceRole ?ec2KeyPair ?instanceTypes ?allocationStrategy
        ?securityGroupIds ?subnets ?desiredvCpus ?maxvCpus ?minvCpus ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the attributes of a compute environment that can be updated. For more information, see Updating compute environments in the Batch User Guide."]
module TagKeysList =
  struct
    type nonrec t = TagKey.t list
    let make i =
      let open Result in
        ok_or_failwith
          ((check_list_max i ~max:50) >>= (fun () -> check_list_min i ~min:1));
        i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:TagKey.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:TagKey.of_xml)
    let of_json j =
      list_of_json ~kind:"TagKeysList" ~of_json:TagKey.of_json j
    let to_json v = composed_to_json to_value v
  end
module ServiceJobPreemptionConfiguration =
  struct
    type nonrec t =
      {
      preemptionRetriesBeforeTermination: Integer.t option
        [@ocaml.doc
          "The number of times a service job can be retried after it is preempted. A job will be terminated when preemption retries have been exhausted. If this field is unset, preempted jobs will be requeued an unlimited number of times."]}
    let make ?preemptionRetriesBeforeTermination =
      fun () -> { preemptionRetriesBeforeTermination }
    let to_value x =
      structure_to_value
        [("preemptionRetriesBeforeTermination",
           (Option.map x.preemptionRetriesBeforeTermination
              ~f:Integer.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let preemptionRetriesBeforeTermination =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "preemptionRetriesBeforeTermination") in
      make ?preemptionRetriesBeforeTermination ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let preemptionRetriesBeforeTermination =
        field_map json__ "preemptionRetriesBeforeTermination" Integer.of_json in
      make ?preemptionRetriesBeforeTermination ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Specifies the service job behavior when preempted."]
module ServiceJobRetryStrategy =
  struct
    type nonrec t =
      {
      attempts: Integer.t
        [@ocaml.doc
          "The number of times to move a service job to RUNNABLE status. You can specify between 1 and 10 attempts."];
      evaluateOnExit: ServiceJobEvaluateOnExitList.t option
        [@ocaml.doc
          "Array of ServiceJobEvaluateOnExit objects that specify conditions under which the service job should be retried or failed."]}
    let context_ = "ServiceJobRetryStrategy"
    let make ?evaluateOnExit =
      fun ~attempts -> fun () -> { evaluateOnExit; attempts }
    let to_value x =
      structure_to_value
        [("attempts", (Some (Integer.to_value x.attempts)));
        ("evaluateOnExit",
          (Option.map x.evaluateOnExit
             ~f:ServiceJobEvaluateOnExitList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let evaluateOnExit =
        (Option.map ~f:ServiceJobEvaluateOnExitList.of_xml)
          (Xml.child xml_arg0 "evaluateOnExit") in
      let attempts =
        Integer.of_xml (Xml.child_exn ~context:context_ xml_arg0 "attempts") in
      make ?evaluateOnExit ~attempts ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let evaluateOnExit =
        field_map json__ "evaluateOnExit"
          ServiceJobEvaluateOnExitList.of_json in
      let attempts = field_map_exn json__ "attempts" Integer.of_json in
      make ?evaluateOnExit ~attempts ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The retry strategy for service jobs. This defines how many times to retry a failed service job and under what conditions. For more information, see Service job retry strategies in the Batch User Guide."]
module ServiceJobTimeout =
  struct
    type nonrec t =
      {
      attemptDurationSeconds: Integer.t option
        [@ocaml.doc
          "The maximum duration in seconds that a service job attempt can run. After this time is reached, Batch terminates the service job attempt."]}
    let make ?attemptDurationSeconds = fun () -> { attemptDurationSeconds }
    let to_value x =
      structure_to_value
        [("attemptDurationSeconds",
           (Option.map x.attemptDurationSeconds ~f:Integer.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let attemptDurationSeconds =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "attemptDurationSeconds") in
      make ?attemptDurationSeconds ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let attemptDurationSeconds =
        field_map json__ "attemptDurationSeconds" Integer.of_json in
      make ?attemptDurationSeconds ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "The timeout configuration for service jobs."]
module ArrayProperties =
  struct
    type nonrec t =
      {
      size: Integer.t option [@ocaml.doc "The size of the array job."]}
    let make ?size = fun () -> { size }
    let to_value x =
      structure_to_value [("size", (Option.map x.size ~f:Integer.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let size = (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "size") in
      make ?size ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let size = field_map json__ "size" Integer.of_json in make ?size ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "An object that represents an Batch array job."]
module NodeOverrides =
  struct
    type nonrec t =
      {
      numNodes: Integer.t option
        [@ocaml.doc
          "The number of nodes to use with a multi-node parallel job. This value overrides the number of nodes that are specified in the job definition. To use this override, you must meet the following conditions: There must be at least one node range in your job definition that has an open upper boundary, such as : or n:. The lower boundary of the node range that's specified in the job definition must be fewer than the number of nodes specified in the override. The main node index that's specified in the job definition must be fewer than the number of nodes specified in the override."];
      nodePropertyOverrides: NodePropertyOverrides.t option
        [@ocaml.doc "The node property overrides for the job."]}
    let make ?numNodes =
      fun ?nodePropertyOverrides ->
        fun () -> { numNodes; nodePropertyOverrides }
    let to_value x =
      structure_to_value
        [("numNodes", (Option.map x.numNodes ~f:Integer.to_value));
        ("nodePropertyOverrides",
          (Option.map x.nodePropertyOverrides
             ~f:NodePropertyOverrides.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nodePropertyOverrides =
        (Option.map ~f:NodePropertyOverrides.of_xml)
          (Xml.child xml_arg0 "nodePropertyOverrides") in
      let numNodes =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "numNodes") in
      make ?nodePropertyOverrides ?numNodes ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nodePropertyOverrides =
        field_map json__ "nodePropertyOverrides"
          NodePropertyOverrides.of_json in
      let numNodes = field_map json__ "numNodes" Integer.of_json in
      make ?nodePropertyOverrides ?numNodes ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents any node overrides to a job definition that's used in a SubmitJob API operation. This parameter isn't applicable to jobs that are running on Fargate resources. Don't provide it for these jobs. Rather, use containerOverrides instead."]
module JobDefinitionType =
  struct
    type nonrec t =
      | Container 
      | Multinode 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | Container -> "container"
      | Multinode -> "multinode"
      | Non_static_id s -> s
    let of_string =
      function
      | "container" -> Container
      | "multinode" -> Multinode
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string
        (string_of_xml ~kind:"enumeration JobDefinitionType" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"JobDefinitionType" j)
    let to_json = simple_to_json to_value
  end
module ServiceJobSummaryList =
  struct
    type nonrec t = ServiceJobSummary.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ServiceJobSummary.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ServiceJobSummary.of_xml)
    let of_json j =
      list_of_json ~kind:"ServiceJobSummaryList"
        ~of_json:ServiceJobSummary.of_json j
    let to_json v = composed_to_json to_value v
  end
module ListJobsFilterList =
  struct
    type nonrec t = KeyValuesPair.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:KeyValuesPair.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:KeyValuesPair.of_xml)
    let of_json j =
      list_of_json ~kind:"ListJobsFilterList" ~of_json:KeyValuesPair.of_json
        j
    let to_json v = composed_to_json to_value v
  end
module SchedulingPolicyListingDetailList =
  struct
    type nonrec t = SchedulingPolicyListingDetail.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:SchedulingPolicyListingDetail.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:SchedulingPolicyListingDetail.of_xml)
    let of_json j =
      list_of_json ~kind:"SchedulingPolicyListingDetailList"
        ~of_json:SchedulingPolicyListingDetail.of_json j
    let to_json v = composed_to_json to_value v
  end
module QuotaShareList =
  struct
    type nonrec t = QuotaShareDetail.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:QuotaShareDetail.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:QuotaShareDetail.of_xml)
    let of_json j =
      list_of_json ~kind:"QuotaShareList" ~of_json:QuotaShareDetail.of_json j
    let to_json v = composed_to_json to_value v
  end
module JobSummaryList =
  struct
    type nonrec t = JobSummary.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:JobSummary.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:JobSummary.of_xml)
    let of_json j =
      list_of_json ~kind:"JobSummaryList" ~of_json:JobSummary.of_json j
    let to_json v = composed_to_json to_value v
  end
module ListJobsByConsumableResourceSummaryList =
  struct
    type nonrec t = ListJobsByConsumableResourceSummary.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ListJobsByConsumableResourceSummary.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true)))
           ~f:ListJobsByConsumableResourceSummary.of_xml)
    let of_json j =
      list_of_json ~kind:"ListJobsByConsumableResourceSummaryList"
        ~of_json:ListJobsByConsumableResourceSummary.of_json j
    let to_json v = composed_to_json to_value v
  end
module ListJobsByConsumableResourceFilterList =
  struct
    type nonrec t = KeyValuesPair.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:KeyValuesPair.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:KeyValuesPair.of_xml)
    let of_json j =
      list_of_json ~kind:"ListJobsByConsumableResourceFilterList"
        ~of_json:KeyValuesPair.of_json j
    let to_json v = composed_to_json to_value v
  end
module ConsumableResourceSummaryList =
  struct
    type nonrec t = ConsumableResourceSummary.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ConsumableResourceSummary.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ConsumableResourceSummary.of_xml)
    let of_json j =
      list_of_json ~kind:"ConsumableResourceSummaryList"
        ~of_json:ConsumableResourceSummary.of_json j
    let to_json v = composed_to_json to_value v
  end
module ListConsumableResourcesFilterList =
  struct
    type nonrec t = KeyValuesPair.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:KeyValuesPair.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:KeyValuesPair.of_xml)
    let of_json j =
      list_of_json ~kind:"ListConsumableResourcesFilterList"
        ~of_json:KeyValuesPair.of_json j
    let to_json v = composed_to_json to_value v
  end
module FrontOfQueueDetail =
  struct
    type nonrec t =
      {
      jobs: FrontOfQueueJobSummaryList.t option
        [@ocaml.doc
          "The Amazon Resource Names (ARNs) of the first 100 RUNNABLE jobs in a named job queue. For first-in-first-out (FIFO) job queues, jobs are ordered based on their submission time. For fair-share scheduling (FSS) job queues, jobs are ordered based on their job priority and share usage."];
      lastUpdatedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when each of the first 100 RUNNABLE jobs were last updated."]}
    let make ?jobs = fun ?lastUpdatedAt -> fun () -> { jobs; lastUpdatedAt }
    let to_value x =
      structure_to_value
        [("jobs", (Option.map x.jobs ~f:FrontOfQueueJobSummaryList.to_value));
        ("lastUpdatedAt", (Option.map x.lastUpdatedAt ~f:Long.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let lastUpdatedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "lastUpdatedAt") in
      let jobs =
        (Option.map ~f:FrontOfQueueJobSummaryList.of_xml)
          (Xml.child xml_arg0 "jobs") in
      make ?lastUpdatedAt ?jobs ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let lastUpdatedAt = field_map json__ "lastUpdatedAt" Long.of_json in
      let jobs = field_map json__ "jobs" FrontOfQueueJobSummaryList.of_json in
      make ?lastUpdatedAt ?jobs ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Contains a list of the first 100 RUNNABLE jobs associated to a single job queue."]
module FrontOfQuotaSharesDetail =
  struct
    type nonrec t =
      {
      quotaShares: FrontOfQuotaSharesJobSummaryMap.t option
        [@ocaml.doc
          "Contains a list of the first RUNNABLE job in each named quota share."];
      lastUpdatedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the first RUNNABLE job per quota share were all last updated."]}
    let make ?quotaShares =
      fun ?lastUpdatedAt -> fun () -> { quotaShares; lastUpdatedAt }
    let to_value x =
      structure_to_value
        [("quotaShares",
           (Option.map x.quotaShares
              ~f:FrontOfQuotaSharesJobSummaryMap.to_value));
        ("lastUpdatedAt", (Option.map x.lastUpdatedAt ~f:Long.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let lastUpdatedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "lastUpdatedAt") in
      let quotaShares =
        (Option.map ~f:FrontOfQuotaSharesJobSummaryMap.of_xml)
          (Xml.child xml_arg0 "quotaShares") in
      make ?lastUpdatedAt ?quotaShares ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let lastUpdatedAt = field_map json__ "lastUpdatedAt" Long.of_json in
      let quotaShares =
        field_map json__ "quotaShares"
          FrontOfQuotaSharesJobSummaryMap.of_json in
      make ?lastUpdatedAt ?quotaShares ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "An object that represents the details of the first RUNNABLE job in each named quota share associated with a single job queue."]
module QueueSnapshotUtilizationDetail =
  struct
    type nonrec t =
      {
      totalCapacityUsage: QueueSnapshotCapacityUsageList.t option
        [@ocaml.doc "The total capacity usage for the entire job queue."];
      fairshareUtilization: FairshareUtilizationDetail.t option
        [@ocaml.doc
          "The utilization information for a fairshare scheduling job queues, including active share count and top capacity utilization by share."];
      quotaShareUtilization: QuotaShareUtilizationDetail.t option
        [@ocaml.doc
          "The utilization information for a job queue with a quota share scheduling policy."];
      lastUpdatedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the queue utilization information was last updated."]}
    let make ?totalCapacityUsage =
      fun ?fairshareUtilization ->
        fun ?quotaShareUtilization ->
          fun ?lastUpdatedAt ->
            fun () ->
              {
                totalCapacityUsage;
                fairshareUtilization;
                quotaShareUtilization;
                lastUpdatedAt
              }
    let to_value x =
      structure_to_value
        [("totalCapacityUsage",
           (Option.map x.totalCapacityUsage
              ~f:QueueSnapshotCapacityUsageList.to_value));
        ("fairshareUtilization",
          (Option.map x.fairshareUtilization
             ~f:FairshareUtilizationDetail.to_value));
        ("quotaShareUtilization",
          (Option.map x.quotaShareUtilization
             ~f:QuotaShareUtilizationDetail.to_value));
        ("lastUpdatedAt", (Option.map x.lastUpdatedAt ~f:Long.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let lastUpdatedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "lastUpdatedAt") in
      let quotaShareUtilization =
        (Option.map ~f:QuotaShareUtilizationDetail.of_xml)
          (Xml.child xml_arg0 "quotaShareUtilization") in
      let fairshareUtilization =
        (Option.map ~f:FairshareUtilizationDetail.of_xml)
          (Xml.child xml_arg0 "fairshareUtilization") in
      let totalCapacityUsage =
        (Option.map ~f:QueueSnapshotCapacityUsageList.of_xml)
          (Xml.child xml_arg0 "totalCapacityUsage") in
      make ?lastUpdatedAt ?quotaShareUtilization ?fairshareUtilization
        ?totalCapacityUsage ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let lastUpdatedAt = field_map json__ "lastUpdatedAt" Long.of_json in
      let quotaShareUtilization =
        field_map json__ "quotaShareUtilization"
          QuotaShareUtilizationDetail.of_json in
      let fairshareUtilization =
        field_map json__ "fairshareUtilization"
          FairshareUtilizationDetail.of_json in
      let totalCapacityUsage =
        field_map json__ "totalCapacityUsage"
          QueueSnapshotCapacityUsageList.of_json in
      make ?lastUpdatedAt ?quotaShareUtilization ?fairshareUtilization
        ?totalCapacityUsage ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The job queue utilization at a specific point in time, including total capacity usage, and quota share or fairshare utilization breakdown depending on the job queue scheduling policy."]
module ServiceJobAttemptDetails =
  struct
    type nonrec t = ServiceJobAttemptDetail.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ServiceJobAttemptDetail.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ServiceJobAttemptDetail.of_xml)
    let of_json j =
      list_of_json ~kind:"ServiceJobAttemptDetails"
        ~of_json:ServiceJobAttemptDetail.of_json j
    let to_json v = composed_to_json to_value v
  end
module ServiceJobCapacityUsageDetailList =
  struct
    type nonrec t = ServiceJobCapacityUsageDetail.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ServiceJobCapacityUsageDetail.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ServiceJobCapacityUsageDetail.of_xml)
    let of_json j =
      list_of_json ~kind:"ServiceJobCapacityUsageDetailList"
        ~of_json:ServiceJobCapacityUsageDetail.of_json j
    let to_json v = composed_to_json to_value v
  end
module ServiceJobPreemptionSummary =
  struct
    type nonrec t =
      {
      preemptedAttemptCount: Integer.t option
        [@ocaml.doc
          "The total number of times the service job has been preempted."];
      recentPreemptedAttempts: ServiceJobRecentPreemptedAttemptList.t option
        [@ocaml.doc
          "A list of the most recent preemption attempts for the service job."]}
    let make ?preemptedAttemptCount =
      fun ?recentPreemptedAttempts ->
        fun () -> { preemptedAttemptCount; recentPreemptedAttempts }
    let to_value x =
      structure_to_value
        [("preemptedAttemptCount",
           (Option.map x.preemptedAttemptCount ~f:Integer.to_value));
        ("recentPreemptedAttempts",
          (Option.map x.recentPreemptedAttempts
             ~f:ServiceJobRecentPreemptedAttemptList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let recentPreemptedAttempts =
        (Option.map ~f:ServiceJobRecentPreemptedAttemptList.of_xml)
          (Xml.child xml_arg0 "recentPreemptedAttempts") in
      let preemptedAttemptCount =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "preemptedAttemptCount") in
      make ?recentPreemptedAttempts ?preemptedAttemptCount ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let recentPreemptedAttempts =
        field_map json__ "recentPreemptedAttempts"
          ServiceJobRecentPreemptedAttemptList.of_json in
      let preemptedAttemptCount =
        field_map json__ "preemptedAttemptCount" Integer.of_json in
      make ?recentPreemptedAttempts ?preemptedAttemptCount ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Summarizes the preemptions of the service job. This field appears on a service job when it has been preempted."]
module ServiceEnvironmentDetailList =
  struct
    type nonrec t = ServiceEnvironmentDetail.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ServiceEnvironmentDetail.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ServiceEnvironmentDetail.of_xml)
    let of_json j =
      list_of_json ~kind:"ServiceEnvironmentDetailList"
        ~of_json:ServiceEnvironmentDetail.of_json j
    let to_json v = composed_to_json to_value v
  end
module SchedulingPolicyDetailList =
  struct
    type nonrec t = SchedulingPolicyDetail.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:SchedulingPolicyDetail.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:SchedulingPolicyDetail.of_xml)
    let of_json j =
      list_of_json ~kind:"SchedulingPolicyDetailList"
        ~of_json:SchedulingPolicyDetail.of_json j
    let to_json v = composed_to_json to_value v
  end
module JobDetailList =
  struct
    type nonrec t = JobDetail.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:JobDetail.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:JobDetail.of_xml)
    let of_json j =
      list_of_json ~kind:"JobDetailList" ~of_json:JobDetail.of_json j
    let to_json v = composed_to_json to_value v
  end
module JobQueueDetailList =
  struct
    type nonrec t = JobQueueDetail.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:JobQueueDetail.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:JobQueueDetail.of_xml)
    let of_json j =
      list_of_json ~kind:"JobQueueDetailList" ~of_json:JobQueueDetail.of_json
        j
    let to_json v = composed_to_json to_value v
  end
module JobDefinitionList =
  struct
    type nonrec t = JobDefinition.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:JobDefinition.to_value)) |> (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:JobDefinition.of_xml)
    let of_json j =
      list_of_json ~kind:"JobDefinitionList" ~of_json:JobDefinition.of_json j
    let to_json v = composed_to_json to_value v
  end
module ComputeEnvironmentDetailList =
  struct
    type nonrec t = ComputeEnvironmentDetail.t list
    let make i = i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:ComputeEnvironmentDetail.to_value)) |>
        (fun x -> `List x)
    let to_query v = to_query to_value v
    let to_header _ =
      failwithf "to_header is not implemented for List_shape objects" ()
    let of_xml x =
      make
        (List.map
           ((Xml.all_children x) |>
              (List.filter
                 ~f:(function
                     | `Data s ->
                         (match Stdlib.String.trim s with
                          | "" -> false
                          | _ -> true)
                     | _ -> true))) ~f:ComputeEnvironmentDetail.of_xml)
    let of_json j =
      list_of_json ~kind:"ComputeEnvironmentDetailList"
        ~of_json:ComputeEnvironmentDetail.of_json j
    let to_json v = composed_to_json to_value v
  end
module UpdateServiceJobResponse =
  struct
    type nonrec t =
      {
      jobArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) for the job."];
      jobName: String_.t option [@ocaml.doc "The name of the job."];
      jobId: String_.t option
        [@ocaml.doc "The unique identifier for the job."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?jobArn =
      fun ?jobName -> fun ?jobId -> fun () -> { jobArn; jobName; jobId }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("jobArn", (Option.map x.jobArn ~f:String_.to_value));
        ("jobName", (Option.map x.jobName ~f:String_.to_value));
        ("jobId", (Option.map x.jobId ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobId = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobId") in
      let jobName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobName") in
      let jobArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobArn") in
      make ?jobId ?jobName ?jobArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobId = field_map json__ "jobId" String_.of_json in
      let jobName = field_map json__ "jobName" String_.of_json in
      let jobArn = field_map json__ "jobArn" String_.of_json in
      make ?jobId ?jobName ?jobArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Updates the priority of a specified service job in an Batch job queue."]
module UpdateServiceJobRequest =
  struct
    type nonrec t =
      {
      jobId: String_.t [@ocaml.doc "The Batch job ID of the job to update."];
      schedulingPriority: Integer.t
        [@ocaml.doc
          "The scheduling priority for the job. This only affects jobs in job queues with a quota-share or fair-share scheduling policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority within a share. The minimum supported value is 0 and the maximum supported value is 9999."]}
    let context_ = "UpdateServiceJobRequest"
    let make ~jobId =
      fun ~schedulingPriority -> fun () -> { jobId; schedulingPriority }
    let to_value x =
      structure_to_value
        [("jobId", (Some (String_.to_value x.jobId)));
        ("schedulingPriority",
          (Some (Integer.to_value x.schedulingPriority)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let schedulingPriority =
        Integer.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "schedulingPriority") in
      let jobId =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobId") in
      make ~schedulingPriority ~jobId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let schedulingPriority =
        field_map_exn json__ "schedulingPriority" Integer.of_json in
      let jobId = field_map_exn json__ "jobId" String_.of_json in
      make ~schedulingPriority ~jobId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Updates the priority of a specified service job in an Batch job queue."]
module UpdateServiceEnvironmentResponse =
  struct
    type nonrec t =
      {
      serviceEnvironmentName: String_.t option
        [@ocaml.doc "The name of the service environment that was updated."];
      serviceEnvironmentArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the service environment that was updated."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?serviceEnvironmentName =
      fun ?serviceEnvironmentArn ->
        fun () -> { serviceEnvironmentName; serviceEnvironmentArn }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("serviceEnvironmentName",
           (Option.map x.serviceEnvironmentName ~f:String_.to_value));
        ("serviceEnvironmentArn",
          (Option.map x.serviceEnvironmentArn ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let serviceEnvironmentArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "serviceEnvironmentArn") in
      let serviceEnvironmentName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "serviceEnvironmentName") in
      make ?serviceEnvironmentArn ?serviceEnvironmentName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let serviceEnvironmentArn =
        field_map json__ "serviceEnvironmentArn" String_.of_json in
      let serviceEnvironmentName =
        field_map json__ "serviceEnvironmentName" String_.of_json in
      make ?serviceEnvironmentArn ?serviceEnvironmentName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Updates a service environment. You can update the state of a service environment from ENABLED to DISABLED to prevent new service jobs from being placed in the service environment."]
module UpdateServiceEnvironmentRequest =
  struct
    type nonrec t =
      {
      serviceEnvironment: String_.t
        [@ocaml.doc "The name or ARN of the service environment to update."];
      state: ServiceEnvironmentState.t option
        [@ocaml.doc "The state of the service environment."];
      capacityLimits: CapacityLimits.t option
        [@ocaml.doc
          "The capacity limits for the service environment. This defines the maximum resources that can be used by service jobs in this environment."]}
    let context_ = "UpdateServiceEnvironmentRequest"
    let make ?state =
      fun ?capacityLimits ->
        fun ~serviceEnvironment ->
          fun () -> { state; capacityLimits; serviceEnvironment }
    let to_value x =
      structure_to_value
        [("serviceEnvironment",
           (Some (String_.to_value x.serviceEnvironment)));
        ("state", (Option.map x.state ~f:ServiceEnvironmentState.to_value));
        ("capacityLimits",
          (Option.map x.capacityLimits ~f:CapacityLimits.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let capacityLimits =
        (Option.map ~f:CapacityLimits.of_xml)
          (Xml.child xml_arg0 "capacityLimits") in
      let state =
        (Option.map ~f:ServiceEnvironmentState.of_xml)
          (Xml.child xml_arg0 "state") in
      let serviceEnvironment =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "serviceEnvironment") in
      make ?capacityLimits ?state ~serviceEnvironment ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let capacityLimits =
        field_map json__ "capacityLimits" CapacityLimits.of_json in
      let state = field_map json__ "state" ServiceEnvironmentState.of_json in
      let serviceEnvironment =
        field_map_exn json__ "serviceEnvironment" String_.of_json in
      make ?capacityLimits ?state ~serviceEnvironment ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Updates a service environment. You can update the state of a service environment from ENABLED to DISABLED to prevent new service jobs from being placed in the service environment."]
module UpdateSchedulingPolicyResponse =
  struct
    type nonrec t = unit
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make () = ()
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let of_header_and_body = ((fun (xs, pipe) -> make ())[@warning "-27"])
    let to_value _ = `Structure []
    let to_query v = to_query to_value v
    let of_xml _ = make ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json _ = make ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Updates a scheduling policy."]
module UpdateSchedulingPolicyRequest =
  struct
    type nonrec t =
      {
      arn: String_.t
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the scheduling policy to update."];
      quotaSharePolicy: QuotaSharePolicy.t option
        [@ocaml.doc
          "The quota share scheduling policy details. Once set during creation, a quotaSharePolicy cannot be removed or changed to a fairsharePolicy."];
      fairsharePolicy: FairsharePolicy.t option
        [@ocaml.doc
          "The fair-share policy scheduling details. Once set during creation, a fairsharePolicy cannot be removed or changed to a quotaSharePolicy."]}
    let context_ = "UpdateSchedulingPolicyRequest"
    let make ?quotaSharePolicy =
      fun ?fairsharePolicy ->
        fun ~arn -> fun () -> { quotaSharePolicy; fairsharePolicy; arn }
    let to_value x =
      structure_to_value
        [("arn", (Some (String_.to_value x.arn)));
        ("quotaSharePolicy",
          (Option.map x.quotaSharePolicy ~f:QuotaSharePolicy.to_value));
        ("fairsharePolicy",
          (Option.map x.fairsharePolicy ~f:FairsharePolicy.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let fairsharePolicy =
        (Option.map ~f:FairsharePolicy.of_xml)
          (Xml.child xml_arg0 "fairsharePolicy") in
      let quotaSharePolicy =
        (Option.map ~f:QuotaSharePolicy.of_xml)
          (Xml.child xml_arg0 "quotaSharePolicy") in
      let arn =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "arn") in
      make ?fairsharePolicy ?quotaSharePolicy ~arn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let fairsharePolicy =
        field_map json__ "fairsharePolicy" FairsharePolicy.of_json in
      let quotaSharePolicy =
        field_map json__ "quotaSharePolicy" QuotaSharePolicy.of_json in
      let arn = field_map_exn json__ "arn" String_.of_json in
      make ?fairsharePolicy ?quotaSharePolicy ~arn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for UpdateSchedulingPolicy."]
module UpdateQuotaShareResponse =
  struct
    type nonrec t =
      {
      quotaShareName: String_.t option
        [@ocaml.doc "The name of the quota share."];
      quotaShareArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the quota share."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?quotaShareName =
      fun ?quotaShareArn -> fun () -> { quotaShareName; quotaShareArn }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("quotaShareName",
           (Option.map x.quotaShareName ~f:String_.to_value));
        ("quotaShareArn", (Option.map x.quotaShareArn ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let quotaShareArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "quotaShareArn") in
      let quotaShareName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "quotaShareName") in
      make ?quotaShareArn ?quotaShareName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let quotaShareArn = field_map json__ "quotaShareArn" String_.of_json in
      let quotaShareName = field_map json__ "quotaShareName" String_.of_json in
      make ?quotaShareArn ?quotaShareName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Updates a quota share."]
module UpdateQuotaShareRequest =
  struct
    type nonrec t =
      {
      quotaShareArn: String_.t
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the quota share to update."];
      capacityLimits: QuotaShareCapacityLimits.t option
        [@ocaml.doc
          "A list that specifies the quantity and type of compute capacity allocated to the quota share."];
      resourceSharingConfiguration:
        QuotaShareResourceSharingConfiguration.t option
        [@ocaml.doc
          "Specifies whether a quota share reserves, lends, or both lends and borrows idle compute capacity."];
      preemptionConfiguration: QuotaSharePreemptionConfiguration.t option
        [@ocaml.doc
          "Specifies the preemption behavior for jobs in a quota share."];
      state: QuotaShareState.t option
        [@ocaml.doc
          "The state of the quota share. If the quota share is ENABLED, it is able to accept jobs. If the quota share is DISABLED, new jobs won't be accepted but jobs already submitted can finish."]}
    let context_ = "UpdateQuotaShareRequest"
    let make ?capacityLimits =
      fun ?resourceSharingConfiguration ->
        fun ?preemptionConfiguration ->
          fun ?state ->
            fun ~quotaShareArn ->
              fun () ->
                {
                  capacityLimits;
                  resourceSharingConfiguration;
                  preemptionConfiguration;
                  state;
                  quotaShareArn
                }
    let to_value x =
      structure_to_value
        [("quotaShareArn", (Some (String_.to_value x.quotaShareArn)));
        ("capacityLimits",
          (Option.map x.capacityLimits ~f:QuotaShareCapacityLimits.to_value));
        ("resourceSharingConfiguration",
          (Option.map x.resourceSharingConfiguration
             ~f:QuotaShareResourceSharingConfiguration.to_value));
        ("preemptionConfiguration",
          (Option.map x.preemptionConfiguration
             ~f:QuotaSharePreemptionConfiguration.to_value));
        ("state", (Option.map x.state ~f:QuotaShareState.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let state =
        (Option.map ~f:QuotaShareState.of_xml) (Xml.child xml_arg0 "state") in
      let preemptionConfiguration =
        (Option.map ~f:QuotaSharePreemptionConfiguration.of_xml)
          (Xml.child xml_arg0 "preemptionConfiguration") in
      let resourceSharingConfiguration =
        (Option.map ~f:QuotaShareResourceSharingConfiguration.of_xml)
          (Xml.child xml_arg0 "resourceSharingConfiguration") in
      let capacityLimits =
        (Option.map ~f:QuotaShareCapacityLimits.of_xml)
          (Xml.child xml_arg0 "capacityLimits") in
      let quotaShareArn =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "quotaShareArn") in
      make ?state ?preemptionConfiguration ?resourceSharingConfiguration
        ?capacityLimits ~quotaShareArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let state = field_map json__ "state" QuotaShareState.of_json in
      let preemptionConfiguration =
        field_map json__ "preemptionConfiguration"
          QuotaSharePreemptionConfiguration.of_json in
      let resourceSharingConfiguration =
        field_map json__ "resourceSharingConfiguration"
          QuotaShareResourceSharingConfiguration.of_json in
      let capacityLimits =
        field_map json__ "capacityLimits" QuotaShareCapacityLimits.of_json in
      let quotaShareArn =
        field_map_exn json__ "quotaShareArn" String_.of_json in
      make ?state ?preemptionConfiguration ?resourceSharingConfiguration
        ?capacityLimits ~quotaShareArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Updates a quota share."]
module UpdateJobQueueResponse =
  struct
    type nonrec t =
      {
      jobQueueName: String_.t option
        [@ocaml.doc "The name of the job queue."];
      jobQueueArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the job queue."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?jobQueueName =
      fun ?jobQueueArn -> fun () -> { jobQueueName; jobQueueArn }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("jobQueueName", (Option.map x.jobQueueName ~f:String_.to_value));
        ("jobQueueArn", (Option.map x.jobQueueArn ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobQueueArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobQueueArn") in
      let jobQueueName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobQueueName") in
      make ?jobQueueArn ?jobQueueName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobQueueArn = field_map json__ "jobQueueArn" String_.of_json in
      let jobQueueName = field_map json__ "jobQueueName" String_.of_json in
      make ?jobQueueArn ?jobQueueName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Updates a job queue."]
module UpdateJobQueueRequest =
  struct
    type nonrec t =
      {
      jobQueue: String_.t
        [@ocaml.doc
          "The name or the Amazon Resource Name (ARN) of the job queue."];
      state: JQState.t option
        [@ocaml.doc
          "Describes the queue's ability to accept new jobs. If the job queue state is ENABLED, it can accept jobs. If the job queue state is DISABLED, new jobs can't be added to the queue, but jobs already in the queue can finish."];
      schedulingPolicyArn: String_.t option
        [@ocaml.doc
          "Amazon Resource Name (ARN) of the fair-share scheduling policy. Once a job queue is created, the fair-share scheduling policy can be replaced but not removed. The format is aws:Partition:batch:Region:Account:scheduling-policy/Name . For example, aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy."];
      priority: Integer.t option
        [@ocaml.doc
          "The priority of the job queue. Job queues with a higher priority (or a higher integer value for the priority parameter) are evaluated first when associated with the same compute environment. Priority is determined in descending order. For example, a job queue with a priority value of 10 is given scheduling preference over a job queue with a priority value of 1. All of the compute environments must be either EC2 (EC2 or SPOT) or Fargate (FARGATE or FARGATE_SPOT). EC2 and Fargate compute environments can't be mixed."];
      computeEnvironmentOrder: ComputeEnvironmentOrders.t option
        [@ocaml.doc
          "Details the set of compute environments mapped to a job queue and their order relative to each other. This is one of the parameters used by the job scheduler to determine which compute environment runs a given job. Compute environments must be in the VALID state before you can associate them with a job queue. All of the compute environments must be either EC2 (EC2 or SPOT) or Fargate (FARGATE or FARGATE_SPOT). EC2 and Fargate compute environments can't be mixed. All compute environments that are associated with a job queue must share the same architecture. Batch doesn't support mixing compute environment architecture types in a single job queue."];
      serviceEnvironmentOrder: ServiceEnvironmentOrders.t option
        [@ocaml.doc
          "The order of the service environment associated with the job queue. Job queues with a higher priority are evaluated first when associated with the same service environment."];
      jobStateTimeLimitActions: JobStateTimeLimitActions.t option
        [@ocaml.doc
          "The set of actions that Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. Batch will perform each action after maxTimeSeconds has passed. (Note: The minimum value for maxTimeSeconds is 600 (10 minutes) and its maximum value is 86,400 (24 hours).)"]}
    let context_ = "UpdateJobQueueRequest"
    let make ?state =
      fun ?schedulingPolicyArn ->
        fun ?priority ->
          fun ?computeEnvironmentOrder ->
            fun ?serviceEnvironmentOrder ->
              fun ?jobStateTimeLimitActions ->
                fun ~jobQueue ->
                  fun () ->
                    {
                      state;
                      schedulingPolicyArn;
                      priority;
                      computeEnvironmentOrder;
                      serviceEnvironmentOrder;
                      jobStateTimeLimitActions;
                      jobQueue
                    }
    let to_value x =
      structure_to_value
        [("jobQueue", (Some (String_.to_value x.jobQueue)));
        ("state", (Option.map x.state ~f:JQState.to_value));
        ("schedulingPolicyArn",
          (Option.map x.schedulingPolicyArn ~f:String_.to_value));
        ("priority", (Option.map x.priority ~f:Integer.to_value));
        ("computeEnvironmentOrder",
          (Option.map x.computeEnvironmentOrder
             ~f:ComputeEnvironmentOrders.to_value));
        ("serviceEnvironmentOrder",
          (Option.map x.serviceEnvironmentOrder
             ~f:ServiceEnvironmentOrders.to_value));
        ("jobStateTimeLimitActions",
          (Option.map x.jobStateTimeLimitActions
             ~f:JobStateTimeLimitActions.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobStateTimeLimitActions =
        (Option.map ~f:JobStateTimeLimitActions.of_xml)
          (Xml.child xml_arg0 "jobStateTimeLimitActions") in
      let serviceEnvironmentOrder =
        (Option.map ~f:ServiceEnvironmentOrders.of_xml)
          (Xml.child xml_arg0 "serviceEnvironmentOrder") in
      let computeEnvironmentOrder =
        (Option.map ~f:ComputeEnvironmentOrders.of_xml)
          (Xml.child xml_arg0 "computeEnvironmentOrder") in
      let priority =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "priority") in
      let schedulingPolicyArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "schedulingPolicyArn") in
      let state = (Option.map ~f:JQState.of_xml) (Xml.child xml_arg0 "state") in
      let jobQueue =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobQueue") in
      make ?jobStateTimeLimitActions ?serviceEnvironmentOrder
        ?computeEnvironmentOrder ?priority ?schedulingPolicyArn ?state
        ~jobQueue ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobStateTimeLimitActions =
        field_map json__ "jobStateTimeLimitActions"
          JobStateTimeLimitActions.of_json in
      let serviceEnvironmentOrder =
        field_map json__ "serviceEnvironmentOrder"
          ServiceEnvironmentOrders.of_json in
      let computeEnvironmentOrder =
        field_map json__ "computeEnvironmentOrder"
          ComputeEnvironmentOrders.of_json in
      let priority = field_map json__ "priority" Integer.of_json in
      let schedulingPolicyArn =
        field_map json__ "schedulingPolicyArn" String_.of_json in
      let state = field_map json__ "state" JQState.of_json in
      let jobQueue = field_map_exn json__ "jobQueue" String_.of_json in
      make ?jobStateTimeLimitActions ?serviceEnvironmentOrder
        ?computeEnvironmentOrder ?priority ?schedulingPolicyArn ?state
        ~jobQueue ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for UpdateJobQueue."]
module UpdateConsumableResourceResponse =
  struct
    type nonrec t =
      {
      consumableResourceName: String_.t option
        [@ocaml.doc "The name of the consumable resource to be updated."];
      consumableResourceArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the consumable resource."];
      totalQuantity: Long.t option
        [@ocaml.doc
          "The total amount of the consumable resource that is available."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?consumableResourceName =
      fun ?consumableResourceArn ->
        fun ?totalQuantity ->
          fun () ->
            { consumableResourceName; consumableResourceArn; totalQuantity }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("consumableResourceName",
           (Option.map x.consumableResourceName ~f:String_.to_value));
        ("consumableResourceArn",
          (Option.map x.consumableResourceArn ~f:String_.to_value));
        ("totalQuantity", (Option.map x.totalQuantity ~f:Long.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let totalQuantity =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "totalQuantity") in
      let consumableResourceArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "consumableResourceArn") in
      let consumableResourceName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "consumableResourceName") in
      make ?totalQuantity ?consumableResourceArn ?consumableResourceName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let totalQuantity = field_map json__ "totalQuantity" Long.of_json in
      let consumableResourceArn =
        field_map json__ "consumableResourceArn" String_.of_json in
      let consumableResourceName =
        field_map json__ "consumableResourceName" String_.of_json in
      make ?totalQuantity ?consumableResourceArn ?consumableResourceName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Updates a consumable resource."]
module UpdateConsumableResourceRequest =
  struct
    type nonrec t =
      {
      consumableResource: String_.t
        [@ocaml.doc
          "The name or ARN of the consumable resource to be updated."];
      operation: String_.t option
        [@ocaml.doc
          "Indicates how the quantity of the consumable resource will be updated. Must be one of: SET Sets the quantity of the resource to the value specified by the quantity parameter. ADD Increases the quantity of the resource by the value specified by the quantity parameter. REMOVE Reduces the quantity of the resource by the value specified by the quantity parameter."];
      quantity: Long.t option
        [@ocaml.doc
          "The change in the total quantity of the consumable resource. The operation parameter determines whether the value specified here will be the new total quantity, or the amount by which the total quantity will be increased or reduced. Must be a non-negative value."];
      clientToken: ClientRequestToken.t option
        [@ocaml.doc
          "If this parameter is specified and two update requests with identical payloads and clientTokens are received, these requests are considered the same request. Both requests will succeed, but the update will only happen once. A clientToken is valid for 8 hours."]}
    let context_ = "UpdateConsumableResourceRequest"
    let make ?operation =
      fun ?quantity ->
        fun ?clientToken ->
          fun ~consumableResource ->
            fun () ->
              { operation; quantity; clientToken; consumableResource }
    let to_value x =
      structure_to_value
        [("consumableResource",
           (Some (String_.to_value x.consumableResource)));
        ("operation", (Option.map x.operation ~f:String_.to_value));
        ("quantity", (Option.map x.quantity ~f:Long.to_value));
        ("clientToken",
          (Option.map x.clientToken ~f:ClientRequestToken.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let clientToken =
        (Option.map ~f:ClientRequestToken.of_xml)
          (Xml.child xml_arg0 "clientToken") in
      let quantity =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "quantity") in
      let operation =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "operation") in
      let consumableResource =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "consumableResource") in
      make ?clientToken ?quantity ?operation ~consumableResource ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let clientToken =
        field_map json__ "clientToken" ClientRequestToken.of_json in
      let quantity = field_map json__ "quantity" Long.of_json in
      let operation = field_map json__ "operation" String_.of_json in
      let consumableResource =
        field_map_exn json__ "consumableResource" String_.of_json in
      make ?clientToken ?quantity ?operation ~consumableResource ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Updates a consumable resource."]
module UpdateComputeEnvironmentResponse =
  struct
    type nonrec t =
      {
      computeEnvironmentName: String_.t option
        [@ocaml.doc
          "The name of the compute environment. It can be up to 128 characters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_)."];
      computeEnvironmentArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the compute environment."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?computeEnvironmentName =
      fun ?computeEnvironmentArn ->
        fun () -> { computeEnvironmentName; computeEnvironmentArn }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("computeEnvironmentName",
           (Option.map x.computeEnvironmentName ~f:String_.to_value));
        ("computeEnvironmentArn",
          (Option.map x.computeEnvironmentArn ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let computeEnvironmentArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "computeEnvironmentArn") in
      let computeEnvironmentName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "computeEnvironmentName") in
      make ?computeEnvironmentArn ?computeEnvironmentName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let computeEnvironmentArn =
        field_map json__ "computeEnvironmentArn" String_.of_json in
      let computeEnvironmentName =
        field_map json__ "computeEnvironmentName" String_.of_json in
      make ?computeEnvironmentArn ?computeEnvironmentName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Updates an Batch compute environment."]
module UpdateComputeEnvironmentRequest =
  struct
    type nonrec t =
      {
      computeEnvironment: String_.t
        [@ocaml.doc
          "The name or full Amazon Resource Name (ARN) of the compute environment to update."];
      state: CEState.t option
        [@ocaml.doc
          "The state of the compute environment. Compute environments in the ENABLED state can accept jobs from a queue and scale in or out automatically based on the workload demand of its associated queues. If the state is ENABLED, then the Batch scheduler can attempt to place jobs from an associated job queue on the compute resources within the environment. If the compute environment is managed, then it can scale its instances out or in automatically, based on the job queue demand. If the state is DISABLED, then the Batch scheduler doesn't attempt to place jobs within the environment. Jobs in a STARTING or RUNNING state continue to progress normally. Managed compute environments in the DISABLED state don't scale out. Compute environments in a DISABLED state may continue to incur billing charges, for example, if they have running instances due to jobs that are still executing or a non-zero minvCpus setting. To prevent additional charges, disable and delete the compute environment. When an instance is idle, the instance scales down to the minvCpus value. However, the instance size doesn't change. For example, consider a c5.8xlarge instance with a minvCpus value of 4 and a desiredvCpus value of 36. This instance doesn't scale down to a c5.large instance."];
      unmanagedvCpus: Integer.t option
        [@ocaml.doc
          "The maximum number of vCPUs expected to be used for an unmanaged compute environment. Don't specify this parameter for a managed compute environment. This parameter is only used for fair-share scheduling to reserve vCPU capacity for new share identifiers. If this parameter isn't provided for a fair-share job queue, no vCPU capacity is reserved."];
      computeResources: ComputeResourceUpdate.t option
        [@ocaml.doc
          "Details of the compute resources managed by the compute environment. Required for a managed compute environment. For more information, see Compute Environments in the Batch User Guide."];
      serviceRole: String_.t option
        [@ocaml.doc
          "The full Amazon Resource Name (ARN) of the IAM role that allows Batch to make calls to other Amazon Web Services services on your behalf. For more information, see Batch service IAM role in the Batch User Guide. If the compute environment has a service-linked role, it can't be changed to use a regular IAM role. Likewise, if the compute environment has a regular IAM role, it can't be changed to use a service-linked role. To update the parameters for the compute environment that require an infrastructure update to change, the AWSServiceRoleForBatch service-linked role must be used. For more information, see Updating compute environments in the Batch User Guide. If your specified role has a path other than /, then you must either specify the full role ARN (recommended) or prefix the role name with the path. Depending on how you created your Batch service role, its ARN might contain the service-role path prefix. When you only specify the name of the service role, Batch assumes that your ARN doesn't use the service-role path prefix. Because of this, we recommend that you specify the full ARN of your service role when you create compute environments."];
      updatePolicy: UpdatePolicy.t option
        [@ocaml.doc
          "Specifies the updated infrastructure update policy for the compute environment. For more information about infrastructure updates, see Updating compute environments in the Batch User Guide."];
      context: String_.t option [@ocaml.doc "Reserved."]}
    let context_ = "UpdateComputeEnvironmentRequest"
    let make ?state =
      fun ?unmanagedvCpus ->
        fun ?computeResources ->
          fun ?serviceRole ->
            fun ?updatePolicy ->
              fun ?context ->
                fun ~computeEnvironment ->
                  fun () ->
                    {
                      state;
                      unmanagedvCpus;
                      computeResources;
                      serviceRole;
                      updatePolicy;
                      context;
                      computeEnvironment
                    }
    let to_value x =
      structure_to_value
        [("computeEnvironment",
           (Some (String_.to_value x.computeEnvironment)));
        ("state", (Option.map x.state ~f:CEState.to_value));
        ("unmanagedvCpus", (Option.map x.unmanagedvCpus ~f:Integer.to_value));
        ("computeResources",
          (Option.map x.computeResources ~f:ComputeResourceUpdate.to_value));
        ("serviceRole", (Option.map x.serviceRole ~f:String_.to_value));
        ("updatePolicy",
          (Option.map x.updatePolicy ~f:UpdatePolicy.to_value));
        ("context", (Option.map x.context ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let context =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "context") in
      let updatePolicy =
        (Option.map ~f:UpdatePolicy.of_xml)
          (Xml.child xml_arg0 "updatePolicy") in
      let serviceRole =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "serviceRole") in
      let computeResources =
        (Option.map ~f:ComputeResourceUpdate.of_xml)
          (Xml.child xml_arg0 "computeResources") in
      let unmanagedvCpus =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "unmanagedvCpus") in
      let state = (Option.map ~f:CEState.of_xml) (Xml.child xml_arg0 "state") in
      let computeEnvironment =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "computeEnvironment") in
      make ?context ?updatePolicy ?serviceRole ?computeResources
        ?unmanagedvCpus ?state ~computeEnvironment ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let context = field_map json__ "context" String_.of_json in
      let updatePolicy = field_map json__ "updatePolicy" UpdatePolicy.of_json in
      let serviceRole = field_map json__ "serviceRole" String_.of_json in
      let computeResources =
        field_map json__ "computeResources" ComputeResourceUpdate.of_json in
      let unmanagedvCpus = field_map json__ "unmanagedvCpus" Integer.of_json in
      let state = field_map json__ "state" CEState.of_json in
      let computeEnvironment =
        field_map_exn json__ "computeEnvironment" String_.of_json in
      make ?context ?updatePolicy ?serviceRole ?computeResources
        ?unmanagedvCpus ?state ~computeEnvironment ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for UpdateComputeEnvironment."]
module UntagResourceResponse =
  struct
    type nonrec t = unit
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make () = ()
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let of_header_and_body = ((fun (xs, pipe) -> make ())[@warning "-27"])
    let to_value _ = `Structure []
    let to_query v = to_query to_value v
    let of_xml _ = make ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json _ = make ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Deletes specified tags from an Batch resource."]
module UntagResourceRequest =
  struct
    type nonrec t =
      {
      resourceArn: String_.t
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the resource from which to delete tags. Batch resources that support tags are compute environments, jobs, job definitions, job queues, and scheduling policies. ARNs for child jobs of array and multi-node parallel (MNP) jobs aren't supported."];
      tagKeys: TagKeysList.t
        [@ocaml.doc "The keys of the tags to be removed."]}
    let context_ = "UntagResourceRequest"
    let make ~resourceArn =
      fun ~tagKeys -> fun () -> { resourceArn; tagKeys }
    let to_value x =
      structure_to_value
        [("resourceArn", (Some (String_.to_value x.resourceArn)));
        ("tagKeys", (Some (TagKeysList.to_value x.tagKeys)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let tagKeys =
        TagKeysList.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "tagKeys") in
      let resourceArn =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "resourceArn") in
      make ~tagKeys ~resourceArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let tagKeys = field_map_exn json__ "tagKeys" TagKeysList.of_json in
      let resourceArn = field_map_exn json__ "resourceArn" String_.of_json in
      make ~tagKeys ~resourceArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for UntagResource."]
module TerminateServiceJobResponse =
  struct
    type nonrec t = unit
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make () = ()
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let of_header_and_body = ((fun (xs, pipe) -> make ())[@warning "-27"])
    let to_value _ = `Structure []
    let to_query v = to_query to_value v
    let of_xml _ = make ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json _ = make ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Terminates a service job in a job queue."]
module TerminateServiceJobRequest =
  struct
    type nonrec t =
      {
      jobId: String_.t
        [@ocaml.doc "The service job ID of the service job to terminate."];
      reason: String_.t
        [@ocaml.doc
          "A message to attach to the service job that explains the reason for canceling it. This message is returned by DescribeServiceJob operations on the service job."]}
    let context_ = "TerminateServiceJobRequest"
    let make ~jobId = fun ~reason -> fun () -> { jobId; reason }
    let to_value x =
      structure_to_value
        [("jobId", (Some (String_.to_value x.jobId)));
        ("reason", (Some (String_.to_value x.reason)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let reason =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "reason") in
      let jobId =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobId") in
      make ~reason ~jobId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let reason = field_map_exn json__ "reason" String_.of_json in
      let jobId = field_map_exn json__ "jobId" String_.of_json in
      make ~reason ~jobId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Terminates a service job in a job queue."]
module TerminateJobResponse =
  struct
    type nonrec t = unit
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make () = ()
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let of_header_and_body = ((fun (xs, pipe) -> make ())[@warning "-27"])
    let to_value _ = `Structure []
    let to_query v = to_query to_value v
    let of_xml _ = make ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json _ = make ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Terminates a job in a job queue. Jobs that are in the STARTING or RUNNING state are terminated, which causes them to transition to FAILED. Jobs that have not progressed to the STARTING state are cancelled."]
module TerminateJobRequest =
  struct
    type nonrec t =
      {
      jobId: String_.t
        [@ocaml.doc "The Batch job ID of the job to terminate."];
      reason: String_.t
        [@ocaml.doc
          "A message to attach to the job that explains the reason for canceling it. This message is returned by future DescribeJobs operations on the job. It is also recorded in the Batch activity logs. This parameter has as limit of 1024 characters."]}
    let context_ = "TerminateJobRequest"
    let make ~jobId = fun ~reason -> fun () -> { jobId; reason }
    let to_value x =
      structure_to_value
        [("jobId", (Some (String_.to_value x.jobId)));
        ("reason", (Some (String_.to_value x.reason)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let reason =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "reason") in
      let jobId =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobId") in
      make ~reason ~jobId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let reason = field_map_exn json__ "reason" String_.of_json in
      let jobId = field_map_exn json__ "jobId" String_.of_json in
      make ~reason ~jobId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for TerminateJob."]
module TagResourceResponse =
  struct
    type nonrec t = unit
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make () = ()
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let of_header_and_body = ((fun (xs, pipe) -> make ())[@warning "-27"])
    let to_value _ = `Structure []
    let to_query v = to_query to_value v
    let of_xml _ = make ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json _ = make ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Associates the specified tags to a resource with the specified resourceArn. If existing tags on a resource aren't specified in the request parameters, they aren't changed. When a resource is deleted, the tags that are associated with that resource are deleted as well. Batch resources that support tags are compute environments, jobs, job definitions, job queues, and scheduling policies. ARNs for child jobs of array and multi-node parallel (MNP) jobs aren't supported."]
module TagResourceRequest =
  struct
    type nonrec t =
      {
      resourceArn: String_.t
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the resource that tags are added to. Batch resources that support tags are compute environments, jobs, job definitions, job queues, and scheduling policies. ARNs for child jobs of array and multi-node parallel (MNP) jobs aren't supported."];
      tags: TagrisTagsMap.t
        [@ocaml.doc
          "The tags that you apply to the resource to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging Amazon Web Services Resources in Amazon Web Services General Reference."]}
    let context_ = "TagResourceRequest"
    let make ~resourceArn = fun ~tags -> fun () -> { resourceArn; tags }
    let to_value x =
      structure_to_value
        [("resourceArn", (Some (String_.to_value x.resourceArn)));
        ("tags", (Some (TagrisTagsMap.to_value x.tags)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let tags =
        TagrisTagsMap.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "tags") in
      let resourceArn =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "resourceArn") in
      make ~tags ~resourceArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let tags = field_map_exn json__ "tags" TagrisTagsMap.of_json in
      let resourceArn = field_map_exn json__ "resourceArn" String_.of_json in
      make ~tags ~resourceArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for TagResource."]
module SubmitServiceJobResponse =
  struct
    type nonrec t =
      {
      jobArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) for the service job."];
      jobName: String_.t option [@ocaml.doc "The name of the service job."];
      jobId: String_.t option
        [@ocaml.doc "The unique identifier for the service job."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?jobArn =
      fun ?jobName -> fun ?jobId -> fun () -> { jobArn; jobName; jobId }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("jobArn", (Option.map x.jobArn ~f:String_.to_value));
        ("jobName", (Option.map x.jobName ~f:String_.to_value));
        ("jobId", (Option.map x.jobId ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobId = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobId") in
      let jobName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobName") in
      let jobArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobArn") in
      make ?jobId ?jobName ?jobArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobId = field_map json__ "jobId" String_.of_json in
      let jobName = field_map json__ "jobName" String_.of_json in
      let jobArn = field_map json__ "jobArn" String_.of_json in
      make ?jobId ?jobName ?jobArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Submits a service job to a specified job queue to run on SageMaker AI. A service job is a unit of work that you submit to Batch for execution on SageMaker AI."]
module SubmitServiceJobRequest =
  struct
    type nonrec t =
      {
      jobName: String_.t
        [@ocaml.doc
          "The name of the service job. It can be up to 128 characters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_)."];
      jobQueue: String_.t
        [@ocaml.doc
          "The job queue into which the service job is submitted. You can specify either the name or the ARN of the queue. The job queue must have the type SAGEMAKER_TRAINING."];
      retryStrategy: ServiceJobRetryStrategy.t option
        [@ocaml.doc
          "The retry strategy to use for failed service jobs that are submitted with this service job request."];
      schedulingPriority: Integer.t option
        [@ocaml.doc
          "The scheduling priority of the service job. Valid values are integers between 0 and 9999."];
      serviceRequestPayload: String_.t
        [@ocaml.doc
          "The request, in JSON, for the service that the SubmitServiceJob operation is queueing."];
      serviceJobType: ServiceJobType.t
        [@ocaml.doc
          "The type of service job. For SageMaker Training jobs, specify SAGEMAKER_TRAINING."];
      shareIdentifier: String_.t option
        [@ocaml.doc
          "The share identifier for the service job. Don't specify this parameter if the job queue doesn't have a fair-share scheduling policy. If the job queue has a fair-share scheduling policy, then this parameter must be specified."];
      quotaShareName: String_.t option
        [@ocaml.doc
          "The quota share for the service job. Don't specify this parameter if the job queue doesn't have a quota share scheduling policy. If the job queue has a quota share scheduling policy, then this parameter must be specified."];
      preemptionConfiguration: ServiceJobPreemptionConfiguration.t option
        [@ocaml.doc "Specifies the service job behavior when preempted."];
      timeoutConfig: ServiceJobTimeout.t option
        [@ocaml.doc
          "The timeout configuration for the service job. If none is specified, Batch defers to the default timeout of the underlying service handling the job."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags that you apply to the service job request. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources."];
      clientToken: ClientRequestToken.t option
        [@ocaml.doc
          "A unique identifier for the request. This token is used to ensure idempotency of requests. If this parameter is specified and two submit requests with identical payloads and clientTokens are received, these requests are considered the same request and the second request is rejected."]}
    let context_ = "SubmitServiceJobRequest"
    let make ?retryStrategy =
      fun ?schedulingPriority ->
        fun ?shareIdentifier ->
          fun ?quotaShareName ->
            fun ?preemptionConfiguration ->
              fun ?timeoutConfig ->
                fun ?tags ->
                  fun ?clientToken ->
                    fun ~jobName ->
                      fun ~jobQueue ->
                        fun ~serviceRequestPayload ->
                          fun ~serviceJobType ->
                            fun () ->
                              {
                                retryStrategy;
                                schedulingPriority;
                                shareIdentifier;
                                quotaShareName;
                                preemptionConfiguration;
                                timeoutConfig;
                                tags;
                                clientToken;
                                jobName;
                                jobQueue;
                                serviceRequestPayload;
                                serviceJobType
                              }
    let to_value x =
      structure_to_value
        [("jobName", (Some (String_.to_value x.jobName)));
        ("jobQueue", (Some (String_.to_value x.jobQueue)));
        ("retryStrategy",
          (Option.map x.retryStrategy ~f:ServiceJobRetryStrategy.to_value));
        ("schedulingPriority",
          (Option.map x.schedulingPriority ~f:Integer.to_value));
        ("serviceRequestPayload",
          (Some (String_.to_value x.serviceRequestPayload)));
        ("serviceJobType", (Some (ServiceJobType.to_value x.serviceJobType)));
        ("shareIdentifier",
          (Option.map x.shareIdentifier ~f:String_.to_value));
        ("quotaShareName", (Option.map x.quotaShareName ~f:String_.to_value));
        ("preemptionConfiguration",
          (Option.map x.preemptionConfiguration
             ~f:ServiceJobPreemptionConfiguration.to_value));
        ("timeoutConfig",
          (Option.map x.timeoutConfig ~f:ServiceJobTimeout.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value));
        ("clientToken",
          (Option.map x.clientToken ~f:ClientRequestToken.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let clientToken =
        (Option.map ~f:ClientRequestToken.of_xml)
          (Xml.child xml_arg0 "clientToken") in
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let timeoutConfig =
        (Option.map ~f:ServiceJobTimeout.of_xml)
          (Xml.child xml_arg0 "timeoutConfig") in
      let preemptionConfiguration =
        (Option.map ~f:ServiceJobPreemptionConfiguration.of_xml)
          (Xml.child xml_arg0 "preemptionConfiguration") in
      let quotaShareName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "quotaShareName") in
      let shareIdentifier =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "shareIdentifier") in
      let serviceJobType =
        ServiceJobType.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "serviceJobType") in
      let serviceRequestPayload =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "serviceRequestPayload") in
      let schedulingPriority =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "schedulingPriority") in
      let retryStrategy =
        (Option.map ~f:ServiceJobRetryStrategy.of_xml)
          (Xml.child xml_arg0 "retryStrategy") in
      let jobQueue =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobQueue") in
      let jobName =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobName") in
      make ?clientToken ?tags ?timeoutConfig ?preemptionConfiguration
        ?quotaShareName ?shareIdentifier ~serviceJobType
        ~serviceRequestPayload ?schedulingPriority ?retryStrategy ~jobQueue
        ~jobName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let clientToken =
        field_map json__ "clientToken" ClientRequestToken.of_json in
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let timeoutConfig =
        field_map json__ "timeoutConfig" ServiceJobTimeout.of_json in
      let preemptionConfiguration =
        field_map json__ "preemptionConfiguration"
          ServiceJobPreemptionConfiguration.of_json in
      let quotaShareName = field_map json__ "quotaShareName" String_.of_json in
      let shareIdentifier =
        field_map json__ "shareIdentifier" String_.of_json in
      let serviceJobType =
        field_map_exn json__ "serviceJobType" ServiceJobType.of_json in
      let serviceRequestPayload =
        field_map_exn json__ "serviceRequestPayload" String_.of_json in
      let schedulingPriority =
        field_map json__ "schedulingPriority" Integer.of_json in
      let retryStrategy =
        field_map json__ "retryStrategy" ServiceJobRetryStrategy.of_json in
      let jobQueue = field_map_exn json__ "jobQueue" String_.of_json in
      let jobName = field_map_exn json__ "jobName" String_.of_json in
      make ?clientToken ?tags ?timeoutConfig ?preemptionConfiguration
        ?quotaShareName ?shareIdentifier ~serviceJobType
        ~serviceRequestPayload ?schedulingPriority ?retryStrategy ~jobQueue
        ~jobName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Submits a service job to a specified job queue to run on SageMaker AI. A service job is a unit of work that you submit to Batch for execution on SageMaker AI."]
module SubmitJobResponse =
  struct
    type nonrec t =
      {
      jobArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) for the job."];
      jobName: String_.t option [@ocaml.doc "The name of the job."];
      jobId: String_.t option
        [@ocaml.doc "The unique identifier for the job."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?jobArn =
      fun ?jobName -> fun ?jobId -> fun () -> { jobArn; jobName; jobId }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("jobArn", (Option.map x.jobArn ~f:String_.to_value));
        ("jobName", (Option.map x.jobName ~f:String_.to_value));
        ("jobId", (Option.map x.jobId ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobId = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobId") in
      let jobName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobName") in
      let jobArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobArn") in
      make ?jobId ?jobName ?jobArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobId = field_map json__ "jobId" String_.of_json in
      let jobName = field_map json__ "jobName" String_.of_json in
      let jobArn = field_map json__ "jobArn" String_.of_json in
      make ?jobId ?jobName ?jobArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Submits an Batch job from a job definition. Parameters that are specified during SubmitJob override parameters defined in the job definition. vCPU and memory requirements that are specified in the resourceRequirements objects in the job definition are the exception. They can't be overridden this way using the memory and vcpus parameters. Rather, you must specify updates to job definition parameters in a resourceRequirements object that's included in the containerOverrides parameter. Job queues with a scheduling policy are limited to 500 active share identifiers at a time. Jobs that run on Fargate resources can't be guaranteed to run for more than 14 days. This is because, after 14 days, Fargate resources might become unavailable and job might be terminated."]
module SubmitJobRequest =
  struct
    type nonrec t =
      {
      jobName: String_.t
        [@ocaml.doc
          "The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_)."];
      jobQueue: String_.t
        [@ocaml.doc
          "The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name (ARN) of the queue."];
      shareIdentifier: String_.t option
        [@ocaml.doc
          "The share identifier for the job. Don't specify this parameter if the job queue doesn't have a fair-share scheduling policy. If the job queue has a fair-share scheduling policy, then this parameter must be specified. This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*)."];
      schedulingPriorityOverride: Integer.t option
        [@ocaml.doc
          "The scheduling priority for the job. This only affects jobs in job queues with a fair-share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. This overrides any scheduling priority in the job definition and works only within a single share identifier. The minimum supported value is 0 and the maximum supported value is 9999."];
      arrayProperties: ArrayProperties.t option
        [@ocaml.doc
          "The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. For more information, see Array Jobs in the Batch User Guide."];
      dependsOn: JobDependencyList.t option
        [@ocaml.doc
          "A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a SEQUENTIAL type dependency without specifying a job ID for array jobs so that each child array job completes sequentially, starting at index 0. You can also specify an N_TO_N type dependency with a job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of each dependency to complete before it can begin."];
      jobDefinition: String_.t
        [@ocaml.doc
          "The job definition used by this job. This value can be one of definition-name, definition-name:revision, or the Amazon Resource Name (ARN) for the job definition, with or without the revision (arn:aws:batch:region:account:job-definition/definition-name:revision , or arn:aws:batch:region:account:job-definition/definition-name ). If the revision is not specified, then the latest active revision is used."];
      parameters: ParametersMap.t option
        [@ocaml.doc
          "Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job definition. Parameters are specified as a key and value pair mapping. Parameters in a SubmitJob request override any corresponding parameter defaults from the job definition."];
      containerOverrides: ContainerOverrides.t option
        [@ocaml.doc
          "An object with properties that override the defaults for the job definition that specify the name of a container in the specified job definition and the overrides it should receive. You can override the default command for a container, which is specified in the job definition or the Docker image, with a command override. You can also override existing environment variables on a container or add new environment variables to it with an environment override."];
      nodeOverrides: NodeOverrides.t option
        [@ocaml.doc
          "A list of node overrides in JSON format that specify the node range to target and the container overrides for that node range. This parameter isn't applicable to jobs that are running on Fargate resources; use containerOverrides instead."];
      retryStrategy: RetryStrategy.t option
        [@ocaml.doc
          "The retry strategy to use for failed jobs from this SubmitJob operation. When a retry strategy is specified here, it overrides the retry strategy defined in the job definition."];
      propagateTags: Boolean.t option
        [@ocaml.doc
          "Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks during task creation. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the FAILED state. When specified, this overrides the tag propagation setting in the job definition."];
      timeout: JobTimeout.t option
        [@ocaml.doc
          "The timeout configuration for this SubmitJob operation. You can specify a timeout duration after which Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it isn't retried. The minimum value for the timeout is 60 seconds. This configuration overrides any timeout configuration specified in the job definition. For array jobs, child jobs have the same timeout configuration as the parent job. For more information, see Job Timeouts in the Amazon Elastic Container Service Developer Guide."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags that you apply to the job request to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging Amazon Web Services Resources in Amazon Web Services General Reference."];
      eksPropertiesOverride: EksPropertiesOverride.t option
        [@ocaml.doc
          "An object, with properties that override defaults for the job definition, can only be specified for jobs that are run on Amazon EKS resources."];
      ecsPropertiesOverride: EcsPropertiesOverride.t option
        [@ocaml.doc
          "An object, with properties that override defaults for the job definition, can only be specified for jobs that are run on Amazon ECS resources."];
      consumableResourcePropertiesOverride:
        ConsumableResourceProperties.t option
        [@ocaml.doc
          "An object that contains overrides for the consumable resources of a job."]}
    let context_ = "SubmitJobRequest"
    let make ?shareIdentifier =
      fun ?schedulingPriorityOverride ->
        fun ?arrayProperties ->
          fun ?dependsOn ->
            fun ?parameters ->
              fun ?containerOverrides ->
                fun ?nodeOverrides ->
                  fun ?retryStrategy ->
                    fun ?propagateTags ->
                      fun ?timeout ->
                        fun ?tags ->
                          fun ?eksPropertiesOverride ->
                            fun ?ecsPropertiesOverride ->
                              fun ?consumableResourcePropertiesOverride ->
                                fun ~jobName ->
                                  fun ~jobQueue ->
                                    fun ~jobDefinition ->
                                      fun () ->
                                        {
                                          shareIdentifier;
                                          schedulingPriorityOverride;
                                          arrayProperties;
                                          dependsOn;
                                          parameters;
                                          containerOverrides;
                                          nodeOverrides;
                                          retryStrategy;
                                          propagateTags;
                                          timeout;
                                          tags;
                                          eksPropertiesOverride;
                                          ecsPropertiesOverride;
                                          consumableResourcePropertiesOverride;
                                          jobName;
                                          jobQueue;
                                          jobDefinition
                                        }
    let to_value x =
      structure_to_value
        [("jobName", (Some (String_.to_value x.jobName)));
        ("jobQueue", (Some (String_.to_value x.jobQueue)));
        ("shareIdentifier",
          (Option.map x.shareIdentifier ~f:String_.to_value));
        ("schedulingPriorityOverride",
          (Option.map x.schedulingPriorityOverride ~f:Integer.to_value));
        ("arrayProperties",
          (Option.map x.arrayProperties ~f:ArrayProperties.to_value));
        ("dependsOn", (Option.map x.dependsOn ~f:JobDependencyList.to_value));
        ("jobDefinition", (Some (String_.to_value x.jobDefinition)));
        ("parameters", (Option.map x.parameters ~f:ParametersMap.to_value));
        ("containerOverrides",
          (Option.map x.containerOverrides ~f:ContainerOverrides.to_value));
        ("nodeOverrides",
          (Option.map x.nodeOverrides ~f:NodeOverrides.to_value));
        ("retryStrategy",
          (Option.map x.retryStrategy ~f:RetryStrategy.to_value));
        ("propagateTags", (Option.map x.propagateTags ~f:Boolean.to_value));
        ("timeout", (Option.map x.timeout ~f:JobTimeout.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value));
        ("eksPropertiesOverride",
          (Option.map x.eksPropertiesOverride
             ~f:EksPropertiesOverride.to_value));
        ("ecsPropertiesOverride",
          (Option.map x.ecsPropertiesOverride
             ~f:EcsPropertiesOverride.to_value));
        ("consumableResourcePropertiesOverride",
          (Option.map x.consumableResourcePropertiesOverride
             ~f:ConsumableResourceProperties.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let consumableResourcePropertiesOverride =
        (Option.map ~f:ConsumableResourceProperties.of_xml)
          (Xml.child xml_arg0 "consumableResourcePropertiesOverride") in
      let ecsPropertiesOverride =
        (Option.map ~f:EcsPropertiesOverride.of_xml)
          (Xml.child xml_arg0 "ecsPropertiesOverride") in
      let eksPropertiesOverride =
        (Option.map ~f:EksPropertiesOverride.of_xml)
          (Xml.child xml_arg0 "eksPropertiesOverride") in
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let timeout =
        (Option.map ~f:JobTimeout.of_xml) (Xml.child xml_arg0 "timeout") in
      let propagateTags =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "propagateTags") in
      let retryStrategy =
        (Option.map ~f:RetryStrategy.of_xml)
          (Xml.child xml_arg0 "retryStrategy") in
      let nodeOverrides =
        (Option.map ~f:NodeOverrides.of_xml)
          (Xml.child xml_arg0 "nodeOverrides") in
      let containerOverrides =
        (Option.map ~f:ContainerOverrides.of_xml)
          (Xml.child xml_arg0 "containerOverrides") in
      let parameters =
        (Option.map ~f:ParametersMap.of_xml)
          (Xml.child xml_arg0 "parameters") in
      let jobDefinition =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "jobDefinition") in
      let dependsOn =
        (Option.map ~f:JobDependencyList.of_xml)
          (Xml.child xml_arg0 "dependsOn") in
      let arrayProperties =
        (Option.map ~f:ArrayProperties.of_xml)
          (Xml.child xml_arg0 "arrayProperties") in
      let schedulingPriorityOverride =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "schedulingPriorityOverride") in
      let shareIdentifier =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "shareIdentifier") in
      let jobQueue =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobQueue") in
      let jobName =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobName") in
      make ?consumableResourcePropertiesOverride ?ecsPropertiesOverride
        ?eksPropertiesOverride ?tags ?timeout ?propagateTags ?retryStrategy
        ?nodeOverrides ?containerOverrides ?parameters ~jobDefinition
        ?dependsOn ?arrayProperties ?schedulingPriorityOverride
        ?shareIdentifier ~jobQueue ~jobName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let consumableResourcePropertiesOverride =
        field_map json__ "consumableResourcePropertiesOverride"
          ConsumableResourceProperties.of_json in
      let ecsPropertiesOverride =
        field_map json__ "ecsPropertiesOverride"
          EcsPropertiesOverride.of_json in
      let eksPropertiesOverride =
        field_map json__ "eksPropertiesOverride"
          EksPropertiesOverride.of_json in
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let timeout = field_map json__ "timeout" JobTimeout.of_json in
      let propagateTags = field_map json__ "propagateTags" Boolean.of_json in
      let retryStrategy =
        field_map json__ "retryStrategy" RetryStrategy.of_json in
      let nodeOverrides =
        field_map json__ "nodeOverrides" NodeOverrides.of_json in
      let containerOverrides =
        field_map json__ "containerOverrides" ContainerOverrides.of_json in
      let parameters = field_map json__ "parameters" ParametersMap.of_json in
      let jobDefinition =
        field_map_exn json__ "jobDefinition" String_.of_json in
      let dependsOn = field_map json__ "dependsOn" JobDependencyList.of_json in
      let arrayProperties =
        field_map json__ "arrayProperties" ArrayProperties.of_json in
      let schedulingPriorityOverride =
        field_map json__ "schedulingPriorityOverride" Integer.of_json in
      let shareIdentifier =
        field_map json__ "shareIdentifier" String_.of_json in
      let jobQueue = field_map_exn json__ "jobQueue" String_.of_json in
      let jobName = field_map_exn json__ "jobName" String_.of_json in
      make ?consumableResourcePropertiesOverride ?ecsPropertiesOverride
        ?eksPropertiesOverride ?tags ?timeout ?propagateTags ?retryStrategy
        ?nodeOverrides ?containerOverrides ?parameters ~jobDefinition
        ?dependsOn ?arrayProperties ?schedulingPriorityOverride
        ?shareIdentifier ~jobQueue ~jobName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for SubmitJob."]
module RegisterJobDefinitionResponse =
  struct
    type nonrec t =
      {
      jobDefinitionName: String_.t option
        [@ocaml.doc "The name of the job definition."];
      jobDefinitionArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the job definition."];
      revision: Integer.t option
        [@ocaml.doc "The revision of the job definition."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?jobDefinitionName =
      fun ?jobDefinitionArn ->
        fun ?revision ->
          fun () -> { jobDefinitionName; jobDefinitionArn; revision }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("jobDefinitionName",
           (Option.map x.jobDefinitionName ~f:String_.to_value));
        ("jobDefinitionArn",
          (Option.map x.jobDefinitionArn ~f:String_.to_value));
        ("revision", (Option.map x.revision ~f:Integer.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let revision =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "revision") in
      let jobDefinitionArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "jobDefinitionArn") in
      let jobDefinitionName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "jobDefinitionName") in
      make ?revision ?jobDefinitionArn ?jobDefinitionName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let revision = field_map json__ "revision" Integer.of_json in
      let jobDefinitionArn =
        field_map json__ "jobDefinitionArn" String_.of_json in
      let jobDefinitionName =
        field_map json__ "jobDefinitionName" String_.of_json in
      make ?revision ?jobDefinitionArn ?jobDefinitionName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Registers an Batch job definition."]
module RegisterJobDefinitionRequest =
  struct
    type nonrec t =
      {
      jobDefinitionName: String_.t
        [@ocaml.doc
          "The name of the job definition to register. It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_)."];
      type_: JobDefinitionType.t
        [@ocaml.doc
          "The type of job definition. For more information about multi-node parallel jobs, see Creating a multi-node parallel job definition in the Batch User Guide. If the value is container, then one of the following is required: containerProperties, ecsProperties, or eksProperties. If the value is multinode, then nodeProperties is required. If the job is run on Fargate resources, then multinode isn't supported."];
      parameters: ParametersMap.t option
        [@ocaml.doc
          "Default parameter substitution placeholders to set in the job definition. Parameters are specified as a key-value pair mapping. Parameters in a SubmitJob request override any corresponding parameter defaults from the job definition."];
      schedulingPriority: Integer.t option
        [@ocaml.doc
          "The scheduling priority for jobs that are submitted with this job definition. This only affects jobs in job queues with a fair-share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. The minimum supported value is 0 and the maximum supported value is 9999."];
      containerProperties: ContainerProperties.t option
        [@ocaml.doc
          "An object with properties specific to Amazon ECS-based single-node container-based jobs. If the job definition's type parameter is container, then you must specify either containerProperties or nodeProperties. This must not be specified for Amazon EKS-based job definitions. If the job runs on Fargate resources, then you must not specify nodeProperties; use only containerProperties."];
      nodeProperties: NodeProperties.t option
        [@ocaml.doc
          "An object with properties specific to multi-node parallel jobs. If you specify node properties for a job, it becomes a multi-node parallel job. For more information, see Multi-node Parallel Jobs in the Batch User Guide. If the job runs on Fargate resources, then you must not specify nodeProperties; use containerProperties instead. If the job runs on Amazon EKS resources, then you must not specify nodeProperties."];
      retryStrategy: RetryStrategy.t option
        [@ocaml.doc
          "The retry strategy to use for failed jobs that are submitted with this job definition. Any retry strategy that's specified during a SubmitJob operation overrides the retry strategy defined here. If a job is terminated due to a timeout, it isn't retried."];
      propagateTags: Boolean.t option
        [@ocaml.doc
          "Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags are not propagated. Tags can only be propagated to the tasks during task creation. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the FAILED state. If the job runs on Amazon EKS resources, then you must not specify propagateTags."];
      timeout: JobTimeout.t option
        [@ocaml.doc
          "The timeout configuration for jobs that are submitted with this job definition, after which Batch terminates your jobs if they have not finished. If a job is terminated due to a timeout, it isn't retried. The minimum value for the timeout is 60 seconds. Any timeout configuration that's specified during a SubmitJob operation overrides the timeout configuration defined here. For more information, see Job Timeouts in the Batch User Guide."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags that you apply to the job definition to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging Amazon Web Services Resources in Batch User Guide."];
      platformCapabilities: PlatformCapabilityList.t option
        [@ocaml.doc
          "The platform capabilities required by the job definition. If no value is specified, it defaults to EC2. To run the job on Fargate resources, specify FARGATE. If the job runs on Amazon EKS resources, then you must not specify platformCapabilities."];
      eksProperties: EksProperties.t option
        [@ocaml.doc
          "An object with properties that are specific to Amazon EKS-based jobs. This must not be specified for Amazon ECS based job definitions."];
      ecsProperties: EcsProperties.t option
        [@ocaml.doc
          "An object with properties that are specific to Amazon ECS-based jobs. This must not be specified for Amazon EKS-based job definitions."];
      consumableResourceProperties: ConsumableResourceProperties.t option
        [@ocaml.doc
          "Contains a list of consumable resources required by the job."]}
    let context_ = "RegisterJobDefinitionRequest"
    let make ?parameters =
      fun ?schedulingPriority ->
        fun ?containerProperties ->
          fun ?nodeProperties ->
            fun ?retryStrategy ->
              fun ?propagateTags ->
                fun ?timeout ->
                  fun ?tags ->
                    fun ?platformCapabilities ->
                      fun ?eksProperties ->
                        fun ?ecsProperties ->
                          fun ?consumableResourceProperties ->
                            fun ~jobDefinitionName ->
                              fun ~type_ ->
                                fun () ->
                                  {
                                    parameters;
                                    schedulingPriority;
                                    containerProperties;
                                    nodeProperties;
                                    retryStrategy;
                                    propagateTags;
                                    timeout;
                                    tags;
                                    platformCapabilities;
                                    eksProperties;
                                    ecsProperties;
                                    consumableResourceProperties;
                                    jobDefinitionName;
                                    type_
                                  }
    let to_value x =
      structure_to_value
        [("jobDefinitionName", (Some (String_.to_value x.jobDefinitionName)));
        ("type", (Some (JobDefinitionType.to_value x.type_)));
        ("parameters", (Option.map x.parameters ~f:ParametersMap.to_value));
        ("schedulingPriority",
          (Option.map x.schedulingPriority ~f:Integer.to_value));
        ("containerProperties",
          (Option.map x.containerProperties ~f:ContainerProperties.to_value));
        ("nodeProperties",
          (Option.map x.nodeProperties ~f:NodeProperties.to_value));
        ("retryStrategy",
          (Option.map x.retryStrategy ~f:RetryStrategy.to_value));
        ("propagateTags", (Option.map x.propagateTags ~f:Boolean.to_value));
        ("timeout", (Option.map x.timeout ~f:JobTimeout.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value));
        ("platformCapabilities",
          (Option.map x.platformCapabilities
             ~f:PlatformCapabilityList.to_value));
        ("eksProperties",
          (Option.map x.eksProperties ~f:EksProperties.to_value));
        ("ecsProperties",
          (Option.map x.ecsProperties ~f:EcsProperties.to_value));
        ("consumableResourceProperties",
          (Option.map x.consumableResourceProperties
             ~f:ConsumableResourceProperties.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let consumableResourceProperties =
        (Option.map ~f:ConsumableResourceProperties.of_xml)
          (Xml.child xml_arg0 "consumableResourceProperties") in
      let ecsProperties =
        (Option.map ~f:EcsProperties.of_xml)
          (Xml.child xml_arg0 "ecsProperties") in
      let eksProperties =
        (Option.map ~f:EksProperties.of_xml)
          (Xml.child xml_arg0 "eksProperties") in
      let platformCapabilities =
        (Option.map ~f:PlatformCapabilityList.of_xml)
          (Xml.child xml_arg0 "platformCapabilities") in
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let timeout =
        (Option.map ~f:JobTimeout.of_xml) (Xml.child xml_arg0 "timeout") in
      let propagateTags =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "propagateTags") in
      let retryStrategy =
        (Option.map ~f:RetryStrategy.of_xml)
          (Xml.child xml_arg0 "retryStrategy") in
      let nodeProperties =
        (Option.map ~f:NodeProperties.of_xml)
          (Xml.child xml_arg0 "nodeProperties") in
      let containerProperties =
        (Option.map ~f:ContainerProperties.of_xml)
          (Xml.child xml_arg0 "containerProperties") in
      let schedulingPriority =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "schedulingPriority") in
      let parameters =
        (Option.map ~f:ParametersMap.of_xml)
          (Xml.child xml_arg0 "parameters") in
      let type_ =
        JobDefinitionType.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "type") in
      let jobDefinitionName =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "jobDefinitionName") in
      make ?consumableResourceProperties ?ecsProperties ?eksProperties
        ?platformCapabilities ?tags ?timeout ?propagateTags ?retryStrategy
        ?nodeProperties ?containerProperties ?schedulingPriority ?parameters
        ~type_ ~jobDefinitionName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let consumableResourceProperties =
        field_map json__ "consumableResourceProperties"
          ConsumableResourceProperties.of_json in
      let ecsProperties =
        field_map json__ "ecsProperties" EcsProperties.of_json in
      let eksProperties =
        field_map json__ "eksProperties" EksProperties.of_json in
      let platformCapabilities =
        field_map json__ "platformCapabilities"
          PlatformCapabilityList.of_json in
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let timeout = field_map json__ "timeout" JobTimeout.of_json in
      let propagateTags = field_map json__ "propagateTags" Boolean.of_json in
      let retryStrategy =
        field_map json__ "retryStrategy" RetryStrategy.of_json in
      let nodeProperties =
        field_map json__ "nodeProperties" NodeProperties.of_json in
      let containerProperties =
        field_map json__ "containerProperties" ContainerProperties.of_json in
      let schedulingPriority =
        field_map json__ "schedulingPriority" Integer.of_json in
      let parameters = field_map json__ "parameters" ParametersMap.of_json in
      let type_ = field_map_exn json__ "type" JobDefinitionType.of_json in
      let jobDefinitionName =
        field_map_exn json__ "jobDefinitionName" String_.of_json in
      make ?consumableResourceProperties ?ecsProperties ?eksProperties
        ?platformCapabilities ?tags ?timeout ?propagateTags ?retryStrategy
        ?nodeProperties ?containerProperties ?schedulingPriority ?parameters
        ~type_ ~jobDefinitionName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for RegisterJobDefinition."]
module ListTagsForResourceResponse =
  struct
    type nonrec t =
      {
      tags: TagrisTagsMap.t option [@ocaml.doc "The tags for the resource."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?tags = fun () -> { tags }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      make ?tags ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      make ?tags ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Lists the tags for an Batch resource. Batch resources that support tags are compute environments, jobs, job definitions, job queues, and scheduling policies. ARNs for child jobs of array and multi-node parallel (MNP) jobs aren't supported."]
module ListTagsForResourceRequest =
  struct
    type nonrec t =
      {
      resourceArn: String_.t
        [@ocaml.doc
          "The Amazon Resource Name (ARN) that identifies the resource that tags are listed for. Batch resources that support tags are compute environments, jobs, job definitions, job queues, and scheduling policies. ARNs for child jobs of array and multi-node parallel (MNP) jobs aren't supported."]}
    let context_ = "ListTagsForResourceRequest"
    let make ~resourceArn = fun () -> { resourceArn }
    let to_value x =
      structure_to_value
        [("resourceArn", (Some (String_.to_value x.resourceArn)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let resourceArn =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "resourceArn") in
      make ~resourceArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let resourceArn = field_map_exn json__ "resourceArn" String_.of_json in
      make ~resourceArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for ListTagsForResource."]
module ListServiceJobsResponse =
  struct
    type nonrec t =
      {
      jobSummaryList: ServiceJobSummaryList.t option
        [@ocaml.doc "A list of service job summaries."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value to include in a future ListServiceJobs request. When the results of a ListServiceJobs request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?jobSummaryList =
      fun ?nextToken -> fun () -> { jobSummaryList; nextToken }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("jobSummaryList",
           (Option.map x.jobSummaryList ~f:ServiceJobSummaryList.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let jobSummaryList =
        (Option.map ~f:ServiceJobSummaryList.of_xml)
          (Xml.child xml_arg0 "jobSummaryList") in
      make ?nextToken ?jobSummaryList ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let jobSummaryList =
        field_map json__ "jobSummaryList" ServiceJobSummaryList.of_json in
      make ?nextToken ?jobSummaryList ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Returns a list of service jobs for a specified job queue."]
module ListServiceJobsRequest =
  struct
    type nonrec t =
      {
      jobQueue: String_.t option
        [@ocaml.doc
          "The name or ARN of the job queue with which to list service jobs."];
      jobStatus: ServiceJobStatus.t option
        [@ocaml.doc
          "The job status used to filter service jobs in the specified queue. If the filters parameter is specified, the jobStatus parameter is ignored and jobs with any status are returned. The exceptions are the SHARE_IDENTIFIER filter and QUOTA_SHARE_NAME filter, which can be used with jobStatus. If you don't specify a status, only RUNNING jobs are returned. The SHARE_IDENTIFIER filter or QUOTA_SHARE_NAME filter can be used with the jobStatus field to filter results."];
      maxResults: Integer.t option
        [@ocaml.doc
          "The maximum number of results returned by ListServiceJobs in paginated output. When this parameter is used, ListServiceJobs only returns maxResults results in a single page and a nextToken response element. The remaining results of the initial request can be seen by sending another ListServiceJobs request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then ListServiceJobs returns up to 100 results and a nextToken value if applicable."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value returned from a previous paginated ListServiceJobs request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes."];
      filters: ListJobsFilterList.t option
        [@ocaml.doc
          "The filter to apply to the query. Only one filter can be used at a time. When the filter is used, jobStatus is ignored with the exception that SHARE_IDENTIFIER or QUOTA_SHARE_NAME and jobStatus can be used together. The results are sorted by the createdAt field, with the most recent jobs being first. The SHARE_IDENTIFIER or QUOTA_SHARE_NAME filter and the jobStatus field can be used together to filter results. JOB_NAME The value of the filter is a case-insensitive match for the job name. If the value ends with an asterisk (*), the filter matches any job name that begins with the string before the '*'. This corresponds to the jobName value. For example, test1 matches both Test1 and test1, and test1* matches both test1 and Test10. When the JOB_NAME filter is used, the results are grouped by the job name and version. BEFORE_CREATED_AT The value for the filter is the time that's before the job was created. This corresponds to the createdAt value. The value is a string representation of the number of milliseconds since 00:00:00 UTC (midnight) on January 1, 1970. AFTER_CREATED_AT The value for the filter is the time that's after the job was created. This corresponds to the createdAt value. The value is a string representation of the number of milliseconds since 00:00:00 UTC (midnight) on January 1, 1970. SHARE_IDENTIFIER The value for the filter is the fairshare scheduling share identifier. QUOTA_SHARE_NAME The value for the filter is the quota management share name."]}
    let make ?jobQueue =
      fun ?jobStatus ->
        fun ?maxResults ->
          fun ?nextToken ->
            fun ?filters ->
              fun () ->
                { jobQueue; jobStatus; maxResults; nextToken; filters }
    let to_value x =
      structure_to_value
        [("jobQueue", (Option.map x.jobQueue ~f:String_.to_value));
        ("jobStatus", (Option.map x.jobStatus ~f:ServiceJobStatus.to_value));
        ("maxResults", (Option.map x.maxResults ~f:Integer.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value));
        ("filters", (Option.map x.filters ~f:ListJobsFilterList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let filters =
        (Option.map ~f:ListJobsFilterList.of_xml)
          (Xml.child xml_arg0 "filters") in
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let maxResults =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "maxResults") in
      let jobStatus =
        (Option.map ~f:ServiceJobStatus.of_xml)
          (Xml.child xml_arg0 "jobStatus") in
      let jobQueue =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobQueue") in
      make ?filters ?nextToken ?maxResults ?jobStatus ?jobQueue ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let filters = field_map json__ "filters" ListJobsFilterList.of_json in
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let maxResults = field_map json__ "maxResults" Integer.of_json in
      let jobStatus = field_map json__ "jobStatus" ServiceJobStatus.of_json in
      let jobQueue = field_map json__ "jobQueue" String_.of_json in
      make ?filters ?nextToken ?maxResults ?jobStatus ?jobQueue ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Returns a list of service jobs for a specified job queue."]
module ListSchedulingPoliciesResponse =
  struct
    type nonrec t =
      {
      schedulingPolicies: SchedulingPolicyListingDetailList.t option
        [@ocaml.doc "A list of scheduling policies that match the request."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value to include in a future ListSchedulingPolicies request. When the results of a ListSchedulingPolicies request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?schedulingPolicies =
      fun ?nextToken -> fun () -> { schedulingPolicies; nextToken }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("schedulingPolicies",
           (Option.map x.schedulingPolicies
              ~f:SchedulingPolicyListingDetailList.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let schedulingPolicies =
        (Option.map ~f:SchedulingPolicyListingDetailList.of_xml)
          (Xml.child xml_arg0 "schedulingPolicies") in
      make ?nextToken ?schedulingPolicies ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let schedulingPolicies =
        field_map json__ "schedulingPolicies"
          SchedulingPolicyListingDetailList.of_json in
      make ?nextToken ?schedulingPolicies ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Returns a list of Batch scheduling policies."]
module ListSchedulingPoliciesRequest =
  struct
    type nonrec t =
      {
      maxResults: Integer.t option
        [@ocaml.doc
          "The maximum number of results that's returned by ListSchedulingPolicies in paginated output. When this parameter is used, ListSchedulingPolicies only returns maxResults results in a single page and a nextToken response element. You can see the remaining results of the initial request by sending another ListSchedulingPolicies request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, ListSchedulingPolicies returns up to 100 results and a nextToken value if applicable."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value that's returned from a previous paginated ListSchedulingPolicies request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes."]}
    let make ?maxResults =
      fun ?nextToken -> fun () -> { maxResults; nextToken }
    let to_value x =
      structure_to_value
        [("maxResults", (Option.map x.maxResults ~f:Integer.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let maxResults =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "maxResults") in
      make ?nextToken ?maxResults ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let maxResults = field_map json__ "maxResults" Integer.of_json in
      make ?nextToken ?maxResults ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for ListSchedulingPolicies."]
module ListQuotaSharesResponse =
  struct
    type nonrec t =
      {
      quotaShares: QuotaShareList.t option
        [@ocaml.doc "A list of quota shares that match the request."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value to include in a future ListQuotaShares request. When the results of a ListQuotaShares request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?quotaShares =
      fun ?nextToken -> fun () -> { quotaShares; nextToken }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("quotaShares",
           (Option.map x.quotaShares ~f:QuotaShareList.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let quotaShares =
        (Option.map ~f:QuotaShareList.of_xml)
          (Xml.child xml_arg0 "quotaShares") in
      make ?nextToken ?quotaShares ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let quotaShares = field_map json__ "quotaShares" QuotaShareList.of_json in
      make ?nextToken ?quotaShares ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Returns a list of Batch quota shares associated with a job queue."]
module ListQuotaSharesRequest =
  struct
    type nonrec t =
      {
      jobQueue: String_.t
        [@ocaml.doc
          "The name or full Amazon Resource Name (ARN) of the job queue used to list quota shares."];
      maxResults: Integer.t option
        [@ocaml.doc
          "The maximum number of results returned by ListQuotaShares in paginated output. When this parameter is used, ListQuotaShares only returns maxResults results in a single page and a nextToken response element. You can see the remaining results of the initial request by sending another ListQuotaShares request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, ListQuotaShares returns up to 100 results and a nextToken value if applicable."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value that's returned from a previous paginated ListQuotaShares request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes."]}
    let context_ = "ListQuotaSharesRequest"
    let make ?maxResults =
      fun ?nextToken ->
        fun ~jobQueue -> fun () -> { maxResults; nextToken; jobQueue }
    let to_value x =
      structure_to_value
        [("jobQueue", (Some (String_.to_value x.jobQueue)));
        ("maxResults", (Option.map x.maxResults ~f:Integer.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let maxResults =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "maxResults") in
      let jobQueue =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobQueue") in
      make ?nextToken ?maxResults ~jobQueue ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let maxResults = field_map json__ "maxResults" Integer.of_json in
      let jobQueue = field_map_exn json__ "jobQueue" String_.of_json in
      make ?nextToken ?maxResults ~jobQueue ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Returns a list of Batch quota shares associated with a job queue."]
module ListJobsResponse =
  struct
    type nonrec t =
      {
      jobSummaryList: JobSummaryList.t option
        [@ocaml.doc "A list of job summaries that match the request."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value to include in a future ListJobs request. When the results of a ListJobs request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?jobSummaryList =
      fun ?nextToken -> fun () -> { jobSummaryList; nextToken }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("jobSummaryList",
           (Option.map x.jobSummaryList ~f:JobSummaryList.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let jobSummaryList =
        (Option.map ~f:JobSummaryList.of_xml)
          (Xml.child xml_arg0 "jobSummaryList") in
      make ?nextToken ?jobSummaryList ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let jobSummaryList =
        field_map json__ "jobSummaryList" JobSummaryList.of_json in
      make ?nextToken ?jobSummaryList ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Returns a list of Batch jobs. You must specify only one of the following items: A job queue ID to return a list of jobs in that job queue A multi-node parallel job ID to return a list of nodes for that job An array job ID to return a list of the children for that job"]
module ListJobsRequest =
  struct
    type nonrec t =
      {
      jobQueue: String_.t option
        [@ocaml.doc
          "The name or full Amazon Resource Name (ARN) of the job queue used to list jobs."];
      arrayJobId: String_.t option
        [@ocaml.doc
          "The job ID for an array job. Specifying an array job ID with this parameter lists all child jobs from within the specified array."];
      multiNodeJobId: String_.t option
        [@ocaml.doc
          "The job ID for a multi-node parallel job. Specifying a multi-node parallel job ID with this parameter lists all nodes that are associated with the specified job."];
      jobStatus: JobStatus.t option
        [@ocaml.doc
          "The job status used to filter jobs in the specified queue. If the filters parameter is specified, the jobStatus parameter is ignored and jobs with any status are returned. The exception is the SHARE_IDENTIFIER filter and jobStatus can be used together. If you don't specify a status, only RUNNING jobs are returned. Array job parents are updated to PENDING when any child job is updated to RUNNABLE and remain in PENDING status while child jobs are running. To view these jobs, filter by PENDING status until all child jobs reach a terminal state."];
      maxResults: Integer.t option
        [@ocaml.doc
          "The maximum number of results returned by ListJobs in a paginated output. When this parameter is used, ListJobs returns up to maxResults results in a single page and a nextToken response element, if applicable. The remaining results of the initial request can be seen by sending another ListJobs request with the returned nextToken value. The following outlines key parameters and limitations: The minimum value is 1. When --job-status is used, Batch returns up to 1000 values. When --filters is used, Batch returns up to 100 values. If neither parameter is used, then ListJobs returns up to 1000 results (jobs that are in the RUNNING status) and a nextToken value, if applicable."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value returned from a previous paginated ListJobs request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes."];
      filters: ListJobsFilterList.t option
        [@ocaml.doc
          "The filter to apply to the query. Only one filter can be used at a time. When the filter is used, jobStatus is ignored with the exception that SHARE_IDENTIFIER and jobStatus can be used together. The filter doesn't apply to child jobs in an array or multi-node parallel (MNP) jobs. The results are sorted by the createdAt field, with the most recent jobs being first. The SHARE_IDENTIFIER filter and the jobStatus field can be used together to filter results. JOB_NAME The value of the filter is a case-insensitive match for the job name. If the value ends with an asterisk (*), the filter matches any job name that begins with the string before the '*'. This corresponds to the jobName value. For example, test1 matches both Test1 and test1, and test1* matches both test1 and Test10. When the JOB_NAME filter is used, the results are grouped by the job name and version. JOB_DEFINITION The value for the filter is the name or Amazon Resource Name (ARN) of the job definition. This corresponds to the jobDefinition value. The value is case sensitive. When the value for the filter is the job definition name, the results include all the jobs that used any revision of that job definition name. If the value ends with an asterisk (*), the filter matches any job definition name that begins with the string before the '*'. For example, jd1 matches only jd1, and jd1* matches both jd1 and jd1A. The version of the job definition that's used doesn't affect the sort order. When the JOB_DEFINITION filter is used and the ARN is used (which is in the form arn:$\\{Partition\\}:batch:$\\{Region\\}:$\\{Account\\}:job-definition/$\\{JobDefinitionName\\}:$\\{Revision\\}), the results include jobs that used the specified revision of the job definition. Asterisk (*) isn't supported when the ARN is used. BEFORE_CREATED_AT The value for the filter is the time that's before the job was created. This corresponds to the createdAt value. The value is a string representation of the number of milliseconds since 00:00:00 UTC (midnight) on January 1, 1970. AFTER_CREATED_AT The value for the filter is the time that's after the job was created. This corresponds to the createdAt value. The value is a string representation of the number of milliseconds since 00:00:00 UTC (midnight) on January 1, 1970. SHARE_IDENTIFIER The value for the filter is the fairshare scheduling share identifier."]}
    let make ?jobQueue =
      fun ?arrayJobId ->
        fun ?multiNodeJobId ->
          fun ?jobStatus ->
            fun ?maxResults ->
              fun ?nextToken ->
                fun ?filters ->
                  fun () ->
                    {
                      jobQueue;
                      arrayJobId;
                      multiNodeJobId;
                      jobStatus;
                      maxResults;
                      nextToken;
                      filters
                    }
    let to_value x =
      structure_to_value
        [("jobQueue", (Option.map x.jobQueue ~f:String_.to_value));
        ("arrayJobId", (Option.map x.arrayJobId ~f:String_.to_value));
        ("multiNodeJobId", (Option.map x.multiNodeJobId ~f:String_.to_value));
        ("jobStatus", (Option.map x.jobStatus ~f:JobStatus.to_value));
        ("maxResults", (Option.map x.maxResults ~f:Integer.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value));
        ("filters", (Option.map x.filters ~f:ListJobsFilterList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let filters =
        (Option.map ~f:ListJobsFilterList.of_xml)
          (Xml.child xml_arg0 "filters") in
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let maxResults =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "maxResults") in
      let jobStatus =
        (Option.map ~f:JobStatus.of_xml) (Xml.child xml_arg0 "jobStatus") in
      let multiNodeJobId =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "multiNodeJobId") in
      let arrayJobId =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "arrayJobId") in
      let jobQueue =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobQueue") in
      make ?filters ?nextToken ?maxResults ?jobStatus ?multiNodeJobId
        ?arrayJobId ?jobQueue ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let filters = field_map json__ "filters" ListJobsFilterList.of_json in
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let maxResults = field_map json__ "maxResults" Integer.of_json in
      let jobStatus = field_map json__ "jobStatus" JobStatus.of_json in
      let multiNodeJobId = field_map json__ "multiNodeJobId" String_.of_json in
      let arrayJobId = field_map json__ "arrayJobId" String_.of_json in
      let jobQueue = field_map json__ "jobQueue" String_.of_json in
      make ?filters ?nextToken ?maxResults ?jobStatus ?multiNodeJobId
        ?arrayJobId ?jobQueue ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for ListJobs."]
module ListJobsByConsumableResourceResponse =
  struct
    type nonrec t =
      {
      jobs: ListJobsByConsumableResourceSummaryList.t option
        [@ocaml.doc
          "The list of jobs that require the specified consumable resources."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value to include in a future ListJobsByConsumableResource request. When the results of a ListJobsByConsumableResource request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?jobs = fun ?nextToken -> fun () -> { jobs; nextToken }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("jobs",
           (Option.map x.jobs
              ~f:ListJobsByConsumableResourceSummaryList.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let jobs =
        (Option.map ~f:ListJobsByConsumableResourceSummaryList.of_xml)
          (Xml.child xml_arg0 "jobs") in
      make ?nextToken ?jobs ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let jobs =
        field_map json__ "jobs"
          ListJobsByConsumableResourceSummaryList.of_json in
      make ?nextToken ?jobs ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Returns a list of Batch jobs that require a specific consumable resource."]
module ListJobsByConsumableResourceRequest =
  struct
    type nonrec t =
      {
      consumableResource: String_.t
        [@ocaml.doc "The name or ARN of the consumable resource."];
      filters: ListJobsByConsumableResourceFilterList.t option
        [@ocaml.doc
          "The filters to apply to the job list query. If used, only those jobs requiring the specified consumable resource (consumableResource) and that match the value of the filters are listed. The filter names and values can be: name: JOB_STATUS values: SUBMITTED | PENDING | RUNNABLE | STARTING | RUNNING | SUCCEEDED | FAILED name: JOB_NAME The values are case-insensitive matches for the job name. If a filter value ends with an asterisk (*), it matches any job name that begins with the string before the '*'."];
      maxResults: Integer.t option
        [@ocaml.doc
          "The maximum number of results returned by ListJobsByConsumableResource in paginated output. When this parameter is used, ListJobsByConsumableResource only returns maxResults results in a single page and a nextToken response element. The remaining results of the initial request can be seen by sending another ListJobsByConsumableResource request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then ListJobsByConsumableResource returns up to 100 results and a nextToken value if applicable."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value returned from a previous paginated ListJobsByConsumableResource request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes."]}
    let context_ = "ListJobsByConsumableResourceRequest"
    let make ?filters =
      fun ?maxResults ->
        fun ?nextToken ->
          fun ~consumableResource ->
            fun () -> { filters; maxResults; nextToken; consumableResource }
    let to_value x =
      structure_to_value
        [("consumableResource",
           (Some (String_.to_value x.consumableResource)));
        ("filters",
          (Option.map x.filters
             ~f:ListJobsByConsumableResourceFilterList.to_value));
        ("maxResults", (Option.map x.maxResults ~f:Integer.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let maxResults =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "maxResults") in
      let filters =
        (Option.map ~f:ListJobsByConsumableResourceFilterList.of_xml)
          (Xml.child xml_arg0 "filters") in
      let consumableResource =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "consumableResource") in
      make ?nextToken ?maxResults ?filters ~consumableResource ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let maxResults = field_map json__ "maxResults" Integer.of_json in
      let filters =
        field_map json__ "filters"
          ListJobsByConsumableResourceFilterList.of_json in
      let consumableResource =
        field_map_exn json__ "consumableResource" String_.of_json in
      make ?nextToken ?maxResults ?filters ~consumableResource ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Returns a list of Batch jobs that require a specific consumable resource."]
module ListConsumableResourcesResponse =
  struct
    type nonrec t =
      {
      consumableResources: ConsumableResourceSummaryList.t option
        [@ocaml.doc "A list of consumable resources that match the request."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value to include in a future ListConsumableResources request. When the results of a ListConsumableResources request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?consumableResources =
      fun ?nextToken -> fun () -> { consumableResources; nextToken }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("consumableResources",
           (Option.map x.consumableResources
              ~f:ConsumableResourceSummaryList.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let consumableResources =
        (Option.map ~f:ConsumableResourceSummaryList.of_xml)
          (Xml.child xml_arg0 "consumableResources") in
      make ?nextToken ?consumableResources ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let consumableResources =
        field_map json__ "consumableResources"
          ConsumableResourceSummaryList.of_json in
      make ?nextToken ?consumableResources ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Returns a list of Batch consumable resources."]
module ListConsumableResourcesRequest =
  struct
    type nonrec t =
      {
      filters: ListConsumableResourcesFilterList.t option
        [@ocaml.doc
          "The filters to apply to the consumable resource list query. If used, only those consumable resources that match the filter are listed. Filter names and values can be: name: CONSUMABLE_RESOURCE_NAME values: case-insensitive matches for the consumable resource name. If a filter value ends with an asterisk (*), it matches any consumable resource name that begins with the string before the '*'."];
      maxResults: Integer.t option
        [@ocaml.doc
          "The maximum number of results returned by ListConsumableResources in paginated output. When this parameter is used, ListConsumableResources only returns maxResults results in a single page and a nextToken response element. The remaining results of the initial request can be seen by sending another ListConsumableResources request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then ListConsumableResources returns up to 100 results and a nextToken value if applicable."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value returned from a previous paginated ListConsumableResources request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes."]}
    let make ?filters =
      fun ?maxResults ->
        fun ?nextToken -> fun () -> { filters; maxResults; nextToken }
    let to_value x =
      structure_to_value
        [("filters",
           (Option.map x.filters
              ~f:ListConsumableResourcesFilterList.to_value));
        ("maxResults", (Option.map x.maxResults ~f:Integer.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let maxResults =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "maxResults") in
      let filters =
        (Option.map ~f:ListConsumableResourcesFilterList.of_xml)
          (Xml.child xml_arg0 "filters") in
      make ?nextToken ?maxResults ?filters ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let maxResults = field_map json__ "maxResults" Integer.of_json in
      let filters =
        field_map json__ "filters" ListConsumableResourcesFilterList.of_json in
      make ?nextToken ?maxResults ?filters ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Returns a list of Batch consumable resources."]
module GetJobQueueSnapshotResponse =
  struct
    type nonrec t =
      {
      frontOfQueue: FrontOfQueueDetail.t option
        [@ocaml.doc
          "The list of the first 100 RUNNABLE jobs in each job queue. For first-in-first-out (FIFO) job queues, jobs are ordered based on their submission time. For job queues with an attached fair-share scheduling (FSS) or quota-share policy, jobs are ordered based on their job priority and share usage."];
      frontOfQuotaShares: FrontOfQuotaSharesDetail.t option
        [@ocaml.doc
          "The first RUNNABLE job in each quota share. Jobs are ordered based on their job priority and share usage."];
      queueUtilization: QueueSnapshotUtilizationDetail.t option
        [@ocaml.doc
          "The job queue's capacity utilization, including total usage and breakdown per given share."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?frontOfQueue =
      fun ?frontOfQuotaShares ->
        fun ?queueUtilization ->
          fun () -> { frontOfQueue; frontOfQuotaShares; queueUtilization }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("frontOfQueue",
           (Option.map x.frontOfQueue ~f:FrontOfQueueDetail.to_value));
        ("frontOfQuotaShares",
          (Option.map x.frontOfQuotaShares
             ~f:FrontOfQuotaSharesDetail.to_value));
        ("queueUtilization",
          (Option.map x.queueUtilization
             ~f:QueueSnapshotUtilizationDetail.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let queueUtilization =
        (Option.map ~f:QueueSnapshotUtilizationDetail.of_xml)
          (Xml.child xml_arg0 "queueUtilization") in
      let frontOfQuotaShares =
        (Option.map ~f:FrontOfQuotaSharesDetail.of_xml)
          (Xml.child xml_arg0 "frontOfQuotaShares") in
      let frontOfQueue =
        (Option.map ~f:FrontOfQueueDetail.of_xml)
          (Xml.child xml_arg0 "frontOfQueue") in
      make ?queueUtilization ?frontOfQuotaShares ?frontOfQueue ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let queueUtilization =
        field_map json__ "queueUtilization"
          QueueSnapshotUtilizationDetail.of_json in
      let frontOfQuotaShares =
        field_map json__ "frontOfQuotaShares"
          FrontOfQuotaSharesDetail.of_json in
      let frontOfQueue =
        field_map json__ "frontOfQueue" FrontOfQueueDetail.of_json in
      make ?queueUtilization ?frontOfQuotaShares ?frontOfQueue ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Provides a snapshot of job queue state, including ordering of RUNNABLE jobs, as well as capacity utilization for already dispatched jobs. The first 100 RUNNABLE jobs in the job queue are listed in order of dispatch. For job queues with an attached quota-share policy, the first RUNNABLE job in each quota share is also listed. Capacity utilization for the job queue is provided, as well as break downs by share for job queues with attached fair-share or quota-share scheduling policies."]
module GetJobQueueSnapshotRequest =
  struct
    type nonrec t =
      {
      jobQueue: String_.t
        [@ocaml.doc
          "The job queue\226\128\153s name or full queue Amazon Resource Name (ARN)."]}
    let context_ = "GetJobQueueSnapshotRequest"
    let make ~jobQueue = fun () -> { jobQueue }
    let to_value x =
      structure_to_value [("jobQueue", (Some (String_.to_value x.jobQueue)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobQueue =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobQueue") in
      make ~jobQueue ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobQueue = field_map_exn json__ "jobQueue" String_.of_json in
      make ~jobQueue ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Provides a snapshot of job queue state, including ordering of RUNNABLE jobs, as well as capacity utilization for already dispatched jobs. The first 100 RUNNABLE jobs in the job queue are listed in order of dispatch. For job queues with an attached quota-share policy, the first RUNNABLE job in each quota share is also listed. Capacity utilization for the job queue is provided, as well as break downs by share for job queues with attached fair-share or quota-share scheduling policies."]
module DescribeServiceJobResponse =
  struct
    type nonrec t =
      {
      attempts: ServiceJobAttemptDetails.t option
        [@ocaml.doc
          "A list of job attempts associated with the service job."];
      capacityUsage: ServiceJobCapacityUsageDetailList.t option
        [@ocaml.doc
          "The configured capacity for the service job, such as the number of instances. The number of instances should be the same value as the serviceRequestPayload.InstanceCount field."];
      createdAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the service job was created."];
      isTerminated: Boolean.t option
        [@ocaml.doc "Indicates whether the service job has been terminated."];
      jobArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the service job."];
      jobId: String_.t option [@ocaml.doc "The job ID for the service job."];
      jobName: String_.t option [@ocaml.doc "The name of the service job."];
      jobQueue: String_.t option
        [@ocaml.doc
          "The ARN of the job queue that the service job is associated with."];
      latestAttempt: LatestServiceJobAttempt.t option
        [@ocaml.doc "The latest attempt associated with the service job."];
      retryStrategy: ServiceJobRetryStrategy.t option
        [@ocaml.doc
          "The retry strategy to use for failed service jobs that are submitted with this service job."];
      scheduledAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the service job was scheduled. This represents when the service job was dispatched to SageMaker and the service job transitioned to the SCHEDULED state."];
      schedulingPriority: Integer.t option
        [@ocaml.doc "The scheduling priority of the service job."];
      serviceRequestPayload: String_.t option
        [@ocaml.doc
          "The request, in JSON, for the service that the SubmitServiceJob operation is queueing."];
      serviceJobType: ServiceJobType.t option
        [@ocaml.doc
          "The type of service job. For SageMaker Training jobs, this value is SAGEMAKER_TRAINING."];
      shareIdentifier: String_.t option
        [@ocaml.doc
          "The share identifier for the service job. This is used for fair-share scheduling."];
      quotaShareName: String_.t option
        [@ocaml.doc
          "The name of the quota share that the service job is associated with."];
      preemptionConfiguration: ServiceJobPreemptionConfiguration.t option
        [@ocaml.doc "Specifies the service job behavior when preempted."];
      preemptionSummary: ServiceJobPreemptionSummary.t option
        [@ocaml.doc
          "Summarizes the preemptions of the service job. This field appears on a service job when it has been preempted."];
      startedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the service job was started."];
      status: ServiceJobStatus.t option
        [@ocaml.doc "The current status of the service job."];
      statusReason: String_.t option
        [@ocaml.doc
          "A short, human-readable string to provide more details for the current status of the service job."];
      stoppedAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the service job stopped running."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags that are associated with the service job. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources."];
      timeoutConfig: ServiceJobTimeout.t option
        [@ocaml.doc "The timeout configuration for the service job."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?attempts =
      fun ?capacityUsage ->
        fun ?createdAt ->
          fun ?isTerminated ->
            fun ?jobArn ->
              fun ?jobId ->
                fun ?jobName ->
                  fun ?jobQueue ->
                    fun ?latestAttempt ->
                      fun ?retryStrategy ->
                        fun ?scheduledAt ->
                          fun ?schedulingPriority ->
                            fun ?serviceRequestPayload ->
                              fun ?serviceJobType ->
                                fun ?shareIdentifier ->
                                  fun ?quotaShareName ->
                                    fun ?preemptionConfiguration ->
                                      fun ?preemptionSummary ->
                                        fun ?startedAt ->
                                          fun ?status ->
                                            fun ?statusReason ->
                                              fun ?stoppedAt ->
                                                fun ?tags ->
                                                  fun ?timeoutConfig ->
                                                    fun () ->
                                                      {
                                                        attempts;
                                                        capacityUsage;
                                                        createdAt;
                                                        isTerminated;
                                                        jobArn;
                                                        jobId;
                                                        jobName;
                                                        jobQueue;
                                                        latestAttempt;
                                                        retryStrategy;
                                                        scheduledAt;
                                                        schedulingPriority;
                                                        serviceRequestPayload;
                                                        serviceJobType;
                                                        shareIdentifier;
                                                        quotaShareName;
                                                        preemptionConfiguration;
                                                        preemptionSummary;
                                                        startedAt;
                                                        status;
                                                        statusReason;
                                                        stoppedAt;
                                                        tags;
                                                        timeoutConfig
                                                      }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("attempts",
           (Option.map x.attempts ~f:ServiceJobAttemptDetails.to_value));
        ("capacityUsage",
          (Option.map x.capacityUsage
             ~f:ServiceJobCapacityUsageDetailList.to_value));
        ("createdAt", (Option.map x.createdAt ~f:Long.to_value));
        ("isTerminated", (Option.map x.isTerminated ~f:Boolean.to_value));
        ("jobArn", (Option.map x.jobArn ~f:String_.to_value));
        ("jobId", (Option.map x.jobId ~f:String_.to_value));
        ("jobName", (Option.map x.jobName ~f:String_.to_value));
        ("jobQueue", (Option.map x.jobQueue ~f:String_.to_value));
        ("latestAttempt",
          (Option.map x.latestAttempt ~f:LatestServiceJobAttempt.to_value));
        ("retryStrategy",
          (Option.map x.retryStrategy ~f:ServiceJobRetryStrategy.to_value));
        ("scheduledAt", (Option.map x.scheduledAt ~f:Long.to_value));
        ("schedulingPriority",
          (Option.map x.schedulingPriority ~f:Integer.to_value));
        ("serviceRequestPayload",
          (Option.map x.serviceRequestPayload ~f:String_.to_value));
        ("serviceJobType",
          (Option.map x.serviceJobType ~f:ServiceJobType.to_value));
        ("shareIdentifier",
          (Option.map x.shareIdentifier ~f:String_.to_value));
        ("quotaShareName", (Option.map x.quotaShareName ~f:String_.to_value));
        ("preemptionConfiguration",
          (Option.map x.preemptionConfiguration
             ~f:ServiceJobPreemptionConfiguration.to_value));
        ("preemptionSummary",
          (Option.map x.preemptionSummary
             ~f:ServiceJobPreemptionSummary.to_value));
        ("startedAt", (Option.map x.startedAt ~f:Long.to_value));
        ("status", (Option.map x.status ~f:ServiceJobStatus.to_value));
        ("statusReason", (Option.map x.statusReason ~f:String_.to_value));
        ("stoppedAt", (Option.map x.stoppedAt ~f:Long.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value));
        ("timeoutConfig",
          (Option.map x.timeoutConfig ~f:ServiceJobTimeout.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let timeoutConfig =
        (Option.map ~f:ServiceJobTimeout.of_xml)
          (Xml.child xml_arg0 "timeoutConfig") in
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let stoppedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "stoppedAt") in
      let statusReason =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "statusReason") in
      let status =
        (Option.map ~f:ServiceJobStatus.of_xml) (Xml.child xml_arg0 "status") in
      let startedAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "startedAt") in
      let preemptionSummary =
        (Option.map ~f:ServiceJobPreemptionSummary.of_xml)
          (Xml.child xml_arg0 "preemptionSummary") in
      let preemptionConfiguration =
        (Option.map ~f:ServiceJobPreemptionConfiguration.of_xml)
          (Xml.child xml_arg0 "preemptionConfiguration") in
      let quotaShareName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "quotaShareName") in
      let shareIdentifier =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "shareIdentifier") in
      let serviceJobType =
        (Option.map ~f:ServiceJobType.of_xml)
          (Xml.child xml_arg0 "serviceJobType") in
      let serviceRequestPayload =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "serviceRequestPayload") in
      let schedulingPriority =
        (Option.map ~f:Integer.of_xml)
          (Xml.child xml_arg0 "schedulingPriority") in
      let scheduledAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "scheduledAt") in
      let retryStrategy =
        (Option.map ~f:ServiceJobRetryStrategy.of_xml)
          (Xml.child xml_arg0 "retryStrategy") in
      let latestAttempt =
        (Option.map ~f:LatestServiceJobAttempt.of_xml)
          (Xml.child xml_arg0 "latestAttempt") in
      let jobQueue =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobQueue") in
      let jobName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobName") in
      let jobId = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobId") in
      let jobArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobArn") in
      let isTerminated =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "isTerminated") in
      let createdAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "createdAt") in
      let capacityUsage =
        (Option.map ~f:ServiceJobCapacityUsageDetailList.of_xml)
          (Xml.child xml_arg0 "capacityUsage") in
      let attempts =
        (Option.map ~f:ServiceJobAttemptDetails.of_xml)
          (Xml.child xml_arg0 "attempts") in
      make ?timeoutConfig ?tags ?stoppedAt ?statusReason ?status ?startedAt
        ?preemptionSummary ?preemptionConfiguration ?quotaShareName
        ?shareIdentifier ?serviceJobType ?serviceRequestPayload
        ?schedulingPriority ?scheduledAt ?retryStrategy ?latestAttempt
        ?jobQueue ?jobName ?jobId ?jobArn ?isTerminated ?createdAt
        ?capacityUsage ?attempts ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let timeoutConfig =
        field_map json__ "timeoutConfig" ServiceJobTimeout.of_json in
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let stoppedAt = field_map json__ "stoppedAt" Long.of_json in
      let statusReason = field_map json__ "statusReason" String_.of_json in
      let status = field_map json__ "status" ServiceJobStatus.of_json in
      let startedAt = field_map json__ "startedAt" Long.of_json in
      let preemptionSummary =
        field_map json__ "preemptionSummary"
          ServiceJobPreemptionSummary.of_json in
      let preemptionConfiguration =
        field_map json__ "preemptionConfiguration"
          ServiceJobPreemptionConfiguration.of_json in
      let quotaShareName = field_map json__ "quotaShareName" String_.of_json in
      let shareIdentifier =
        field_map json__ "shareIdentifier" String_.of_json in
      let serviceJobType =
        field_map json__ "serviceJobType" ServiceJobType.of_json in
      let serviceRequestPayload =
        field_map json__ "serviceRequestPayload" String_.of_json in
      let schedulingPriority =
        field_map json__ "schedulingPriority" Integer.of_json in
      let scheduledAt = field_map json__ "scheduledAt" Long.of_json in
      let retryStrategy =
        field_map json__ "retryStrategy" ServiceJobRetryStrategy.of_json in
      let latestAttempt =
        field_map json__ "latestAttempt" LatestServiceJobAttempt.of_json in
      let jobQueue = field_map json__ "jobQueue" String_.of_json in
      let jobName = field_map json__ "jobName" String_.of_json in
      let jobId = field_map json__ "jobId" String_.of_json in
      let jobArn = field_map json__ "jobArn" String_.of_json in
      let isTerminated = field_map json__ "isTerminated" Boolean.of_json in
      let createdAt = field_map json__ "createdAt" Long.of_json in
      let capacityUsage =
        field_map json__ "capacityUsage"
          ServiceJobCapacityUsageDetailList.of_json in
      let attempts =
        field_map json__ "attempts" ServiceJobAttemptDetails.of_json in
      make ?timeoutConfig ?tags ?stoppedAt ?statusReason ?status ?startedAt
        ?preemptionSummary ?preemptionConfiguration ?quotaShareName
        ?shareIdentifier ?serviceJobType ?serviceRequestPayload
        ?schedulingPriority ?scheduledAt ?retryStrategy ?latestAttempt
        ?jobQueue ?jobName ?jobId ?jobArn ?isTerminated ?createdAt
        ?capacityUsage ?attempts ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "The details of a service job."]
module DescribeServiceJobRequest =
  struct
    type nonrec t =
      {
      jobId: String_.t
        [@ocaml.doc "The job ID for the service job to describe."]}
    let context_ = "DescribeServiceJobRequest"
    let make ~jobId = fun () -> { jobId }
    let to_value x =
      structure_to_value [("jobId", (Some (String_.to_value x.jobId)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobId =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobId") in
      make ~jobId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobId = field_map_exn json__ "jobId" String_.of_json in
      make ~jobId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "The details of a service job."]
module DescribeServiceEnvironmentsResponse =
  struct
    type nonrec t =
      {
      serviceEnvironments: ServiceEnvironmentDetailList.t option
        [@ocaml.doc
          "The list of service environments that match the request."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value to include in a future DescribeServiceEnvironments request. When the results of a DescribeServiceEnvironments request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?serviceEnvironments =
      fun ?nextToken -> fun () -> { serviceEnvironments; nextToken }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("serviceEnvironments",
           (Option.map x.serviceEnvironments
              ~f:ServiceEnvironmentDetailList.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let serviceEnvironments =
        (Option.map ~f:ServiceEnvironmentDetailList.of_xml)
          (Xml.child xml_arg0 "serviceEnvironments") in
      make ?nextToken ?serviceEnvironments ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let serviceEnvironments =
        field_map json__ "serviceEnvironments"
          ServiceEnvironmentDetailList.of_json in
      make ?nextToken ?serviceEnvironments ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Describes one or more of your service environments."]
module DescribeServiceEnvironmentsRequest =
  struct
    type nonrec t =
      {
      serviceEnvironments: StringList.t option
        [@ocaml.doc "An array of service environment names or ARN entries."];
      maxResults: Integer.t option
        [@ocaml.doc
          "The maximum number of results returned by DescribeServiceEnvironments in paginated output. When this parameter is used, DescribeServiceEnvironments only returns maxResults results in a single page and a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeServiceEnvironments request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then DescribeServiceEnvironments returns up to 100 results and a nextToken value if applicable."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value returned from a previous paginated DescribeServiceEnvironments request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes."]}
    let make ?serviceEnvironments =
      fun ?maxResults ->
        fun ?nextToken ->
          fun () -> { serviceEnvironments; maxResults; nextToken }
    let to_value x =
      structure_to_value
        [("serviceEnvironments",
           (Option.map x.serviceEnvironments ~f:StringList.to_value));
        ("maxResults", (Option.map x.maxResults ~f:Integer.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let maxResults =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "maxResults") in
      let serviceEnvironments =
        (Option.map ~f:StringList.of_xml)
          (Xml.child xml_arg0 "serviceEnvironments") in
      make ?nextToken ?maxResults ?serviceEnvironments ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let maxResults = field_map json__ "maxResults" Integer.of_json in
      let serviceEnvironments =
        field_map json__ "serviceEnvironments" StringList.of_json in
      make ?nextToken ?maxResults ?serviceEnvironments ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Describes one or more of your service environments."]
module DescribeSchedulingPoliciesResponse =
  struct
    type nonrec t =
      {
      schedulingPolicies: SchedulingPolicyDetailList.t option
        [@ocaml.doc "The list of scheduling policies."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?schedulingPolicies = fun () -> { schedulingPolicies }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("schedulingPolicies",
           (Option.map x.schedulingPolicies
              ~f:SchedulingPolicyDetailList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let schedulingPolicies =
        (Option.map ~f:SchedulingPolicyDetailList.of_xml)
          (Xml.child xml_arg0 "schedulingPolicies") in
      make ?schedulingPolicies ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let schedulingPolicies =
        field_map json__ "schedulingPolicies"
          SchedulingPolicyDetailList.of_json in
      make ?schedulingPolicies ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Describes one or more of your scheduling policies."]
module DescribeSchedulingPoliciesRequest =
  struct
    type nonrec t =
      {
      arns: StringList.t
        [@ocaml.doc
          "A list of up to 100 scheduling policy Amazon Resource Name (ARN) entries."]}
    let context_ = "DescribeSchedulingPoliciesRequest"
    let make ~arns = fun () -> { arns }
    let to_value x =
      structure_to_value [("arns", (Some (StringList.to_value x.arns)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let arns =
        StringList.of_xml (Xml.child_exn ~context:context_ xml_arg0 "arns") in
      make ~arns ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let arns = field_map_exn json__ "arns" StringList.of_json in
      make ~arns ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for DescribeSchedulingPolicies."]
module DescribeQuotaShareResponse =
  struct
    type nonrec t =
      {
      quotaShareName: String_.t option
        [@ocaml.doc "The name of the quota share."];
      quotaShareArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the quota share."];
      jobQueueArn: String_.t option
        [@ocaml.doc
          "The ARN of the job queue associated with the quota share."];
      capacityLimits: QuotaShareCapacityLimits.t option
        [@ocaml.doc
          "A list that specifies the quantity and type of compute capacity allocated to the quota share."];
      resourceSharingConfiguration:
        QuotaShareResourceSharingConfiguration.t option
        [@ocaml.doc
          "Specifies whether a quota share reserves, lends, or both lends and borrows idle compute capacity."];
      preemptionConfiguration: QuotaSharePreemptionConfiguration.t option
        [@ocaml.doc
          "Specifies the preemption behavior for jobs in a quota share."];
      state: QuotaShareState.t option
        [@ocaml.doc "The state of the quota share."];
      status: QuotaShareStatus.t option
        [@ocaml.doc "The current status of the quota share."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc "The tags applied to the quota share."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?quotaShareName =
      fun ?quotaShareArn ->
        fun ?jobQueueArn ->
          fun ?capacityLimits ->
            fun ?resourceSharingConfiguration ->
              fun ?preemptionConfiguration ->
                fun ?state ->
                  fun ?status ->
                    fun ?tags ->
                      fun () ->
                        {
                          quotaShareName;
                          quotaShareArn;
                          jobQueueArn;
                          capacityLimits;
                          resourceSharingConfiguration;
                          preemptionConfiguration;
                          state;
                          status;
                          tags
                        }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("quotaShareName",
           (Option.map x.quotaShareName ~f:String_.to_value));
        ("quotaShareArn", (Option.map x.quotaShareArn ~f:String_.to_value));
        ("jobQueueArn", (Option.map x.jobQueueArn ~f:String_.to_value));
        ("capacityLimits",
          (Option.map x.capacityLimits ~f:QuotaShareCapacityLimits.to_value));
        ("resourceSharingConfiguration",
          (Option.map x.resourceSharingConfiguration
             ~f:QuotaShareResourceSharingConfiguration.to_value));
        ("preemptionConfiguration",
          (Option.map x.preemptionConfiguration
             ~f:QuotaSharePreemptionConfiguration.to_value));
        ("state", (Option.map x.state ~f:QuotaShareState.to_value));
        ("status", (Option.map x.status ~f:QuotaShareStatus.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let status =
        (Option.map ~f:QuotaShareStatus.of_xml) (Xml.child xml_arg0 "status") in
      let state =
        (Option.map ~f:QuotaShareState.of_xml) (Xml.child xml_arg0 "state") in
      let preemptionConfiguration =
        (Option.map ~f:QuotaSharePreemptionConfiguration.of_xml)
          (Xml.child xml_arg0 "preemptionConfiguration") in
      let resourceSharingConfiguration =
        (Option.map ~f:QuotaShareResourceSharingConfiguration.of_xml)
          (Xml.child xml_arg0 "resourceSharingConfiguration") in
      let capacityLimits =
        (Option.map ~f:QuotaShareCapacityLimits.of_xml)
          (Xml.child xml_arg0 "capacityLimits") in
      let jobQueueArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobQueueArn") in
      let quotaShareArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "quotaShareArn") in
      let quotaShareName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "quotaShareName") in
      make ?tags ?status ?state ?preemptionConfiguration
        ?resourceSharingConfiguration ?capacityLimits ?jobQueueArn
        ?quotaShareArn ?quotaShareName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let status = field_map json__ "status" QuotaShareStatus.of_json in
      let state = field_map json__ "state" QuotaShareState.of_json in
      let preemptionConfiguration =
        field_map json__ "preemptionConfiguration"
          QuotaSharePreemptionConfiguration.of_json in
      let resourceSharingConfiguration =
        field_map json__ "resourceSharingConfiguration"
          QuotaShareResourceSharingConfiguration.of_json in
      let capacityLimits =
        field_map json__ "capacityLimits" QuotaShareCapacityLimits.of_json in
      let jobQueueArn = field_map json__ "jobQueueArn" String_.of_json in
      let quotaShareArn = field_map json__ "quotaShareArn" String_.of_json in
      let quotaShareName = field_map json__ "quotaShareName" String_.of_json in
      make ?tags ?status ?state ?preemptionConfiguration
        ?resourceSharingConfiguration ?capacityLimits ?jobQueueArn
        ?quotaShareArn ?quotaShareName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Returns a description of the specified quota share."]
module DescribeQuotaShareRequest =
  struct
    type nonrec t =
      {
      quotaShareArn: String_.t
        [@ocaml.doc "The Amazon Resource Name (ARN) of the quota share."]}
    let context_ = "DescribeQuotaShareRequest"
    let make ~quotaShareArn = fun () -> { quotaShareArn }
    let to_value x =
      structure_to_value
        [("quotaShareArn", (Some (String_.to_value x.quotaShareArn)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let quotaShareArn =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "quotaShareArn") in
      make ~quotaShareArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let quotaShareArn =
        field_map_exn json__ "quotaShareArn" String_.of_json in
      make ~quotaShareArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Returns a description of the specified quota share."]
module DescribeJobsResponse =
  struct
    type nonrec t =
      {
      jobs: JobDetailList.t option [@ocaml.doc "The list of jobs."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?jobs = fun () -> { jobs }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("jobs", (Option.map x.jobs ~f:JobDetailList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobs =
        (Option.map ~f:JobDetailList.of_xml) (Xml.child xml_arg0 "jobs") in
      make ?jobs ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobs = field_map json__ "jobs" JobDetailList.of_json in
      make ?jobs ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Describes a list of Batch jobs."]
module DescribeJobsRequest =
  struct
    type nonrec t =
      {
      jobs: StringList.t [@ocaml.doc "A list of up to 100 job IDs."]}
    let context_ = "DescribeJobsRequest"
    let make ~jobs = fun () -> { jobs }
    let to_value x =
      structure_to_value [("jobs", (Some (StringList.to_value x.jobs)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobs =
        StringList.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobs") in
      make ~jobs ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobs = field_map_exn json__ "jobs" StringList.of_json in
      make ~jobs ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for DescribeJobs."]
module DescribeJobQueuesResponse =
  struct
    type nonrec t =
      {
      jobQueues: JobQueueDetailList.t option
        [@ocaml.doc "The list of job queues."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value to include in a future DescribeJobQueues request. When the results of a DescribeJobQueues request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?jobQueues =
      fun ?nextToken -> fun () -> { jobQueues; nextToken }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("jobQueues",
           (Option.map x.jobQueues ~f:JobQueueDetailList.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let jobQueues =
        (Option.map ~f:JobQueueDetailList.of_xml)
          (Xml.child xml_arg0 "jobQueues") in
      make ?nextToken ?jobQueues ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let jobQueues = field_map json__ "jobQueues" JobQueueDetailList.of_json in
      make ?nextToken ?jobQueues ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Describes one or more of your job queues."]
module DescribeJobQueuesRequest =
  struct
    type nonrec t =
      {
      jobQueues: StringList.t option
        [@ocaml.doc
          "A list of up to 100 queue names or full queue Amazon Resource Name (ARN) entries."];
      maxResults: Integer.t option
        [@ocaml.doc
          "The maximum number of results returned by DescribeJobQueues in paginated output. When this parameter is used, DescribeJobQueues only returns maxResults results in a single page and a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeJobQueues request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then DescribeJobQueues returns up to 100 results and a nextToken value if applicable."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value returned from a previous paginated DescribeJobQueues request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes."]}
    let make ?jobQueues =
      fun ?maxResults ->
        fun ?nextToken -> fun () -> { jobQueues; maxResults; nextToken }
    let to_value x =
      structure_to_value
        [("jobQueues", (Option.map x.jobQueues ~f:StringList.to_value));
        ("maxResults", (Option.map x.maxResults ~f:Integer.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let maxResults =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "maxResults") in
      let jobQueues =
        (Option.map ~f:StringList.of_xml) (Xml.child xml_arg0 "jobQueues") in
      make ?nextToken ?maxResults ?jobQueues ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let maxResults = field_map json__ "maxResults" Integer.of_json in
      let jobQueues = field_map json__ "jobQueues" StringList.of_json in
      make ?nextToken ?maxResults ?jobQueues ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for DescribeJobQueues."]
module DescribeJobDefinitionsResponse =
  struct
    type nonrec t =
      {
      jobDefinitions: JobDefinitionList.t option
        [@ocaml.doc "The list of job definitions."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value to include in a future DescribeJobDefinitions request. When the results of a DescribeJobDefinitions request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?jobDefinitions =
      fun ?nextToken -> fun () -> { jobDefinitions; nextToken }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("jobDefinitions",
           (Option.map x.jobDefinitions ~f:JobDefinitionList.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let jobDefinitions =
        (Option.map ~f:JobDefinitionList.of_xml)
          (Xml.child xml_arg0 "jobDefinitions") in
      make ?nextToken ?jobDefinitions ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let jobDefinitions =
        field_map json__ "jobDefinitions" JobDefinitionList.of_json in
      make ?nextToken ?jobDefinitions ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Describes a list of job definitions. You can specify a status (such as ACTIVE) to only return job definitions that match that status."]
module DescribeJobDefinitionsRequest =
  struct
    type nonrec t =
      {
      jobDefinitions: StringList.t option
        [@ocaml.doc
          "A list of up to 100 job definitions. Each entry in the list can either be an ARN in the format arn:aws:batch:$\\{Region\\}:$\\{Account\\}:job-definition/$\\{JobDefinitionName\\}:$\\{Revision\\} or a short version using the form $\\{JobDefinitionName\\}:$\\{Revision\\}. This parameter can't be used with other parameters."];
      maxResults: Integer.t option
        [@ocaml.doc
          "The maximum number of results returned by DescribeJobDefinitions in paginated output. When this parameter is used, DescribeJobDefinitions only returns maxResults results in a single page and a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeJobDefinitions request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then DescribeJobDefinitions returns up to 100 results and a nextToken value if applicable."];
      jobDefinitionName: String_.t option
        [@ocaml.doc "The name of the job definition to describe."];
      status: String_.t option
        [@ocaml.doc "The status used to filter job definitions."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value returned from a previous paginated DescribeJobDefinitions request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes."]}
    let make ?jobDefinitions =
      fun ?maxResults ->
        fun ?jobDefinitionName ->
          fun ?status ->
            fun ?nextToken ->
              fun () ->
                {
                  jobDefinitions;
                  maxResults;
                  jobDefinitionName;
                  status;
                  nextToken
                }
    let to_value x =
      structure_to_value
        [("jobDefinitions",
           (Option.map x.jobDefinitions ~f:StringList.to_value));
        ("maxResults", (Option.map x.maxResults ~f:Integer.to_value));
        ("jobDefinitionName",
          (Option.map x.jobDefinitionName ~f:String_.to_value));
        ("status", (Option.map x.status ~f:String_.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let status =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "status") in
      let jobDefinitionName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "jobDefinitionName") in
      let maxResults =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "maxResults") in
      let jobDefinitions =
        (Option.map ~f:StringList.of_xml)
          (Xml.child xml_arg0 "jobDefinitions") in
      make ?nextToken ?status ?jobDefinitionName ?maxResults ?jobDefinitions
        ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let status = field_map json__ "status" String_.of_json in
      let jobDefinitionName =
        field_map json__ "jobDefinitionName" String_.of_json in
      let maxResults = field_map json__ "maxResults" Integer.of_json in
      let jobDefinitions =
        field_map json__ "jobDefinitions" StringList.of_json in
      make ?nextToken ?status ?jobDefinitionName ?maxResults ?jobDefinitions
        ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for DescribeJobDefinitions."]
module DescribeConsumableResourceResponse =
  struct
    type nonrec t =
      {
      consumableResourceName: String_.t option
        [@ocaml.doc "The name of the consumable resource."];
      consumableResourceArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the consumable resource."];
      totalQuantity: Long.t option
        [@ocaml.doc
          "The total amount of the consumable resource that is available."];
      inUseQuantity: Long.t option
        [@ocaml.doc
          "The amount of the consumable resource that is currently in use."];
      availableQuantity: Long.t option
        [@ocaml.doc
          "The amount of the consumable resource that is currently available to use."];
      resourceType: String_.t option
        [@ocaml.doc
          "Indicates whether the resource is available to be re-used after a job completes. Can be one of: REPLENISHABLE NON_REPLENISHABLE"];
      createdAt: Long.t option
        [@ocaml.doc
          "The Unix timestamp (in milliseconds) for when the consumable resource was created."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags that you apply to the consumable resource to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?consumableResourceName =
      fun ?consumableResourceArn ->
        fun ?totalQuantity ->
          fun ?inUseQuantity ->
            fun ?availableQuantity ->
              fun ?resourceType ->
                fun ?createdAt ->
                  fun ?tags ->
                    fun () ->
                      {
                        consumableResourceName;
                        consumableResourceArn;
                        totalQuantity;
                        inUseQuantity;
                        availableQuantity;
                        resourceType;
                        createdAt;
                        tags
                      }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("consumableResourceName",
           (Option.map x.consumableResourceName ~f:String_.to_value));
        ("consumableResourceArn",
          (Option.map x.consumableResourceArn ~f:String_.to_value));
        ("totalQuantity", (Option.map x.totalQuantity ~f:Long.to_value));
        ("inUseQuantity", (Option.map x.inUseQuantity ~f:Long.to_value));
        ("availableQuantity",
          (Option.map x.availableQuantity ~f:Long.to_value));
        ("resourceType", (Option.map x.resourceType ~f:String_.to_value));
        ("createdAt", (Option.map x.createdAt ~f:Long.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let createdAt =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "createdAt") in
      let resourceType =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "resourceType") in
      let availableQuantity =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "availableQuantity") in
      let inUseQuantity =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "inUseQuantity") in
      let totalQuantity =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "totalQuantity") in
      let consumableResourceArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "consumableResourceArn") in
      let consumableResourceName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "consumableResourceName") in
      make ?tags ?createdAt ?resourceType ?availableQuantity ?inUseQuantity
        ?totalQuantity ?consumableResourceArn ?consumableResourceName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let createdAt = field_map json__ "createdAt" Long.of_json in
      let resourceType = field_map json__ "resourceType" String_.of_json in
      let availableQuantity =
        field_map json__ "availableQuantity" Long.of_json in
      let inUseQuantity = field_map json__ "inUseQuantity" Long.of_json in
      let totalQuantity = field_map json__ "totalQuantity" Long.of_json in
      let consumableResourceArn =
        field_map json__ "consumableResourceArn" String_.of_json in
      let consumableResourceName =
        field_map json__ "consumableResourceName" String_.of_json in
      make ?tags ?createdAt ?resourceType ?availableQuantity ?inUseQuantity
        ?totalQuantity ?consumableResourceArn ?consumableResourceName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Returns a description of the specified consumable resource."]
module DescribeConsumableResourceRequest =
  struct
    type nonrec t =
      {
      consumableResource: String_.t
        [@ocaml.doc
          "The name or ARN of the consumable resource whose description will be returned."]}
    let context_ = "DescribeConsumableResourceRequest"
    let make ~consumableResource = fun () -> { consumableResource }
    let to_value x =
      structure_to_value
        [("consumableResource",
           (Some (String_.to_value x.consumableResource)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let consumableResource =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "consumableResource") in
      make ~consumableResource ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let consumableResource =
        field_map_exn json__ "consumableResource" String_.of_json in
      make ~consumableResource ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Returns a description of the specified consumable resource."]
module DescribeComputeEnvironmentsResponse =
  struct
    type nonrec t =
      {
      computeEnvironments: ComputeEnvironmentDetailList.t option
        [@ocaml.doc "The list of compute environments."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value to include in a future DescribeComputeEnvironments request. When the results of a DescribeComputeEnvironments request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?computeEnvironments =
      fun ?nextToken -> fun () -> { computeEnvironments; nextToken }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("computeEnvironments",
           (Option.map x.computeEnvironments
              ~f:ComputeEnvironmentDetailList.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let computeEnvironments =
        (Option.map ~f:ComputeEnvironmentDetailList.of_xml)
          (Xml.child xml_arg0 "computeEnvironments") in
      make ?nextToken ?computeEnvironments ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let computeEnvironments =
        field_map json__ "computeEnvironments"
          ComputeEnvironmentDetailList.of_json in
      make ?nextToken ?computeEnvironments ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Describes one or more of your compute environments. If you're using an unmanaged compute environment, you can use the DescribeComputeEnvironment operation to determine the ecsClusterArn that you launch your Amazon ECS container instances into."]
module DescribeComputeEnvironmentsRequest =
  struct
    type nonrec t =
      {
      computeEnvironments: StringList.t option
        [@ocaml.doc
          "A list of up to 100 compute environment names or full Amazon Resource Name (ARN) entries."];
      maxResults: Integer.t option
        [@ocaml.doc
          "The maximum number of cluster results returned by DescribeComputeEnvironments in paginated output. When this parameter is used, DescribeComputeEnvironments only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeComputeEnvironments request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then DescribeComputeEnvironments returns up to 100 results and a nextToken value if applicable."];
      nextToken: String_.t option
        [@ocaml.doc
          "The nextToken value returned from a previous paginated DescribeComputeEnvironments request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes."]}
    let make ?computeEnvironments =
      fun ?maxResults ->
        fun ?nextToken ->
          fun () -> { computeEnvironments; maxResults; nextToken }
    let to_value x =
      structure_to_value
        [("computeEnvironments",
           (Option.map x.computeEnvironments ~f:StringList.to_value));
        ("maxResults", (Option.map x.maxResults ~f:Integer.to_value));
        ("nextToken", (Option.map x.nextToken ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "nextToken") in
      let maxResults =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "maxResults") in
      let computeEnvironments =
        (Option.map ~f:StringList.of_xml)
          (Xml.child xml_arg0 "computeEnvironments") in
      make ?nextToken ?maxResults ?computeEnvironments ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" String_.of_json in
      let maxResults = field_map json__ "maxResults" Integer.of_json in
      let computeEnvironments =
        field_map json__ "computeEnvironments" StringList.of_json in
      make ?nextToken ?maxResults ?computeEnvironments ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for DescribeComputeEnvironments."]
module DeregisterJobDefinitionResponse =
  struct
    type nonrec t = unit
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make () = ()
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let of_header_and_body = ((fun (xs, pipe) -> make ())[@warning "-27"])
    let to_value _ = `Structure []
    let to_query v = to_query to_value v
    let of_xml _ = make ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json _ = make ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Deregisters an Batch job definition. Job definitions are permanently deleted after 180 days."]
module DeregisterJobDefinitionRequest =
  struct
    type nonrec t =
      {
      jobDefinition: String_.t
        [@ocaml.doc
          "The name and revision (name:revision) or full Amazon Resource Name (ARN) of the job definition to deregister."]}
    let context_ = "DeregisterJobDefinitionRequest"
    let make ~jobDefinition = fun () -> { jobDefinition }
    let to_value x =
      structure_to_value
        [("jobDefinition", (Some (String_.to_value x.jobDefinition)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobDefinition =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "jobDefinition") in
      make ~jobDefinition ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobDefinition =
        field_map_exn json__ "jobDefinition" String_.of_json in
      make ~jobDefinition ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Deregisters an Batch job definition. Job definitions are permanently deleted after 180 days."]
module DeleteServiceEnvironmentResponse =
  struct
    type nonrec t = unit
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make () = ()
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let of_header_and_body = ((fun (xs, pipe) -> make ())[@warning "-27"])
    let to_value _ = `Structure []
    let to_query v = to_query to_value v
    let of_xml _ = make ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json _ = make ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Deletes a Service environment. Before you can delete a service environment, you must first set its state to DISABLED with the UpdateServiceEnvironment API operation and disassociate it from any job queues with the UpdateJobQueue API operation."]
module DeleteServiceEnvironmentRequest =
  struct
    type nonrec t =
      {
      serviceEnvironment: String_.t
        [@ocaml.doc "The name or ARN of the service environment to delete."]}
    let context_ = "DeleteServiceEnvironmentRequest"
    let make ~serviceEnvironment = fun () -> { serviceEnvironment }
    let to_value x =
      structure_to_value
        [("serviceEnvironment",
           (Some (String_.to_value x.serviceEnvironment)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let serviceEnvironment =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "serviceEnvironment") in
      make ~serviceEnvironment ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let serviceEnvironment =
        field_map_exn json__ "serviceEnvironment" String_.of_json in
      make ~serviceEnvironment ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Deletes a Service environment. Before you can delete a service environment, you must first set its state to DISABLED with the UpdateServiceEnvironment API operation and disassociate it from any job queues with the UpdateJobQueue API operation."]
module DeleteSchedulingPolicyResponse =
  struct
    type nonrec t = unit
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make () = ()
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let of_header_and_body = ((fun (xs, pipe) -> make ())[@warning "-27"])
    let to_value _ = `Structure []
    let to_query v = to_query to_value v
    let of_xml _ = make ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json _ = make ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Deletes the specified scheduling policy. You can't delete a scheduling policy that's used in any job queues."]
module DeleteSchedulingPolicyRequest =
  struct
    type nonrec t =
      {
      arn: String_.t
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the scheduling policy to delete."]}
    let context_ = "DeleteSchedulingPolicyRequest"
    let make ~arn = fun () -> { arn }
    let to_value x =
      structure_to_value [("arn", (Some (String_.to_value x.arn)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let arn =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "arn") in
      make ~arn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let arn = field_map_exn json__ "arn" String_.of_json in make ~arn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for DeleteSchedulingPolicy."]
module DeleteQuotaShareResponse =
  struct
    type nonrec t = unit
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make () = ()
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let of_header_and_body = ((fun (xs, pipe) -> make ())[@warning "-27"])
    let to_value _ = `Structure []
    let to_query v = to_query to_value v
    let of_xml _ = make ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json _ = make ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Deletes the specified quota share. You must first disable submissions for the share by updating the state to DISABLED using the UpdateQuotaShare operation. All jobs in the share are eventually terminated when you delete a quota share."]
module DeleteQuotaShareRequest =
  struct
    type nonrec t =
      {
      quotaShareArn: String_.t
        [@ocaml.doc "The Amazon Resource Name (ARN) of the quota share."]}
    let context_ = "DeleteQuotaShareRequest"
    let make ~quotaShareArn = fun () -> { quotaShareArn }
    let to_value x =
      structure_to_value
        [("quotaShareArn", (Some (String_.to_value x.quotaShareArn)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let quotaShareArn =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "quotaShareArn") in
      make ~quotaShareArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let quotaShareArn =
        field_map_exn json__ "quotaShareArn" String_.of_json in
      make ~quotaShareArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Deletes the specified quota share. You must first disable submissions for the share by updating the state to DISABLED using the UpdateQuotaShare operation. All jobs in the share are eventually terminated when you delete a quota share."]
module DeleteJobQueueResponse =
  struct
    type nonrec t = unit
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make () = ()
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let of_header_and_body = ((fun (xs, pipe) -> make ())[@warning "-27"])
    let to_value _ = `Structure []
    let to_query v = to_query to_value v
    let of_xml _ = make ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json _ = make ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Deletes the specified job queue. You must first disable submissions for a queue with the UpdateJobQueue operation. All jobs in the queue are eventually terminated when you delete a job queue. It's not necessary to disassociate compute environments from a queue before submitting a DeleteJobQueue request."]
module DeleteJobQueueRequest =
  struct
    type nonrec t =
      {
      jobQueue: String_.t
        [@ocaml.doc
          "The short name or full Amazon Resource Name (ARN) of the queue to delete."]}
    let context_ = "DeleteJobQueueRequest"
    let make ~jobQueue = fun () -> { jobQueue }
    let to_value x =
      structure_to_value [("jobQueue", (Some (String_.to_value x.jobQueue)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobQueue =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobQueue") in
      make ~jobQueue ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobQueue = field_map_exn json__ "jobQueue" String_.of_json in
      make ~jobQueue ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for DeleteJobQueue."]
module DeleteConsumableResourceResponse =
  struct
    type nonrec t = unit
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make () = ()
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let of_header_and_body = ((fun (xs, pipe) -> make ())[@warning "-27"])
    let to_value _ = `Structure []
    let to_query v = to_query to_value v
    let of_xml _ = make ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json _ = make ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Deletes the specified consumable resource."]
module DeleteConsumableResourceRequest =
  struct
    type nonrec t =
      {
      consumableResource: String_.t
        [@ocaml.doc
          "The name or ARN of the consumable resource that will be deleted."]}
    let context_ = "DeleteConsumableResourceRequest"
    let make ~consumableResource = fun () -> { consumableResource }
    let to_value x =
      structure_to_value
        [("consumableResource",
           (Some (String_.to_value x.consumableResource)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let consumableResource =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "consumableResource") in
      make ~consumableResource ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let consumableResource =
        field_map_exn json__ "consumableResource" String_.of_json in
      make ~consumableResource ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Deletes the specified consumable resource."]
module DeleteComputeEnvironmentResponse =
  struct
    type nonrec t = unit
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make () = ()
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let of_header_and_body = ((fun (xs, pipe) -> make ())[@warning "-27"])
    let to_value _ = `Structure []
    let to_query v = to_query to_value v
    let of_xml _ = make ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json _ = make ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Deletes an Batch compute environment. Before you can delete a compute environment, you must set its state to DISABLED with the UpdateComputeEnvironment API operation and disassociate it from any job queues with the UpdateJobQueue API operation. Compute environments that use Fargate resources must terminate all active jobs on that compute environment before deleting the compute environment. If this isn't done, the compute environment enters an invalid state."]
module DeleteComputeEnvironmentRequest =
  struct
    type nonrec t =
      {
      computeEnvironment: String_.t
        [@ocaml.doc
          "The name or Amazon Resource Name (ARN) of the compute environment to delete."]}
    let context_ = "DeleteComputeEnvironmentRequest"
    let make ~computeEnvironment = fun () -> { computeEnvironment }
    let to_value x =
      structure_to_value
        [("computeEnvironment",
           (Some (String_.to_value x.computeEnvironment)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let computeEnvironment =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "computeEnvironment") in
      make ~computeEnvironment ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let computeEnvironment =
        field_map_exn json__ "computeEnvironment" String_.of_json in
      make ~computeEnvironment ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for DeleteComputeEnvironment."]
module CreateServiceEnvironmentResponse =
  struct
    type nonrec t =
      {
      serviceEnvironmentName: String_.t option
        [@ocaml.doc "The name of the service environment."];
      serviceEnvironmentArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the service environment."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?serviceEnvironmentName =
      fun ?serviceEnvironmentArn ->
        fun () -> { serviceEnvironmentName; serviceEnvironmentArn }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("serviceEnvironmentName",
           (Option.map x.serviceEnvironmentName ~f:String_.to_value));
        ("serviceEnvironmentArn",
          (Option.map x.serviceEnvironmentArn ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let serviceEnvironmentArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "serviceEnvironmentArn") in
      let serviceEnvironmentName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "serviceEnvironmentName") in
      make ?serviceEnvironmentArn ?serviceEnvironmentName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let serviceEnvironmentArn =
        field_map json__ "serviceEnvironmentArn" String_.of_json in
      let serviceEnvironmentName =
        field_map json__ "serviceEnvironmentName" String_.of_json in
      make ?serviceEnvironmentArn ?serviceEnvironmentName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Creates a service environment for running service jobs. Service environments define capacity limits for specific service types such as SageMaker Training jobs."]
module CreateServiceEnvironmentRequest =
  struct
    type nonrec t =
      {
      serviceEnvironmentName: String_.t
        [@ocaml.doc
          "The name for the service environment. It can be up to 128 characters long and can contain letters, numbers, hyphens (-), and underscores (_)."];
      serviceEnvironmentType: ServiceEnvironmentType.t
        [@ocaml.doc
          "The type of service environment. For SageMaker Training jobs, specify SAGEMAKER_TRAINING."];
      state: ServiceEnvironmentState.t option
        [@ocaml.doc
          "The state of the service environment. Valid values are ENABLED and DISABLED. The default value is ENABLED."];
      capacityLimits: CapacityLimits.t
        [@ocaml.doc
          "The capacity limits for the service environment. The number of instances a job consumes is the total number of instances requested in the submit training job request resource configuration."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags that you apply to the service environment to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources."]}
    let context_ = "CreateServiceEnvironmentRequest"
    let make ?state =
      fun ?tags ->
        fun ~serviceEnvironmentName ->
          fun ~serviceEnvironmentType ->
            fun ~capacityLimits ->
              fun () ->
                {
                  state;
                  tags;
                  serviceEnvironmentName;
                  serviceEnvironmentType;
                  capacityLimits
                }
    let to_value x =
      structure_to_value
        [("serviceEnvironmentName",
           (Some (String_.to_value x.serviceEnvironmentName)));
        ("serviceEnvironmentType",
          (Some (ServiceEnvironmentType.to_value x.serviceEnvironmentType)));
        ("state", (Option.map x.state ~f:ServiceEnvironmentState.to_value));
        ("capacityLimits", (Some (CapacityLimits.to_value x.capacityLimits)));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let capacityLimits =
        CapacityLimits.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "capacityLimits") in
      let state =
        (Option.map ~f:ServiceEnvironmentState.of_xml)
          (Xml.child xml_arg0 "state") in
      let serviceEnvironmentType =
        ServiceEnvironmentType.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "serviceEnvironmentType") in
      let serviceEnvironmentName =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "serviceEnvironmentName") in
      make ?tags ~capacityLimits ?state ~serviceEnvironmentType
        ~serviceEnvironmentName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let capacityLimits =
        field_map_exn json__ "capacityLimits" CapacityLimits.of_json in
      let state = field_map json__ "state" ServiceEnvironmentState.of_json in
      let serviceEnvironmentType =
        field_map_exn json__ "serviceEnvironmentType"
          ServiceEnvironmentType.of_json in
      let serviceEnvironmentName =
        field_map_exn json__ "serviceEnvironmentName" String_.of_json in
      make ?tags ~capacityLimits ?state ~serviceEnvironmentType
        ~serviceEnvironmentName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Creates a service environment for running service jobs. Service environments define capacity limits for specific service types such as SageMaker Training jobs."]
module CreateSchedulingPolicyResponse =
  struct
    type nonrec t =
      {
      name: String_.t option
        [@ocaml.doc "The name of the scheduling policy."];
      arn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the scheduling policy. The format is aws:Partition:batch:Region:Account:scheduling-policy/Name . For example, aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?name = fun ?arn -> fun () -> { name; arn }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("name", (Option.map x.name ~f:String_.to_value));
        ("arn", (Option.map x.arn ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let arn = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "arn") in
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      make ?arn ?name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let arn = field_map json__ "arn" String_.of_json in
      let name = field_map json__ "name" String_.of_json in
      make ?arn ?name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Creates an Batch scheduling policy."]
module CreateSchedulingPolicyRequest =
  struct
    type nonrec t =
      {
      name: String_.t
        [@ocaml.doc
          "The name of the fair-share scheduling policy. It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_)."];
      quotaSharePolicy: QuotaSharePolicy.t option
        [@ocaml.doc
          "The quota share scheduling policy details. Only one of fairsharePolicy or quotaSharePolicy can be set. Once set, this policy type cannot be removed or changed to a fairSharePolicy."];
      fairsharePolicy: FairsharePolicy.t option
        [@ocaml.doc
          "The fair-share scheduling policy details. Only one of fairsharePolicy or quotaSharePolicy can be set. Once set, this policy type cannot be removed or changed to a quotaSharePolicy."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags that you apply to the scheduling policy to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging Amazon Web Services Resources in Amazon Web Services General Reference. These tags can be updated or removed using the TagResource and UntagResource API operations."]}
    let context_ = "CreateSchedulingPolicyRequest"
    let make ?quotaSharePolicy =
      fun ?fairsharePolicy ->
        fun ?tags ->
          fun ~name ->
            fun () -> { quotaSharePolicy; fairsharePolicy; tags; name }
    let to_value x =
      structure_to_value
        [("name", (Some (String_.to_value x.name)));
        ("quotaSharePolicy",
          (Option.map x.quotaSharePolicy ~f:QuotaSharePolicy.to_value));
        ("fairsharePolicy",
          (Option.map x.fairsharePolicy ~f:FairsharePolicy.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let fairsharePolicy =
        (Option.map ~f:FairsharePolicy.of_xml)
          (Xml.child xml_arg0 "fairsharePolicy") in
      let quotaSharePolicy =
        (Option.map ~f:QuotaSharePolicy.of_xml)
          (Xml.child xml_arg0 "quotaSharePolicy") in
      let name =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "name") in
      make ?tags ?fairsharePolicy ?quotaSharePolicy ~name ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let fairsharePolicy =
        field_map json__ "fairsharePolicy" FairsharePolicy.of_json in
      let quotaSharePolicy =
        field_map json__ "quotaSharePolicy" QuotaSharePolicy.of_json in
      let name = field_map_exn json__ "name" String_.of_json in
      make ?tags ?fairsharePolicy ?quotaSharePolicy ~name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for CreateSchedulingPolicy."]
module CreateQuotaShareResponse =
  struct
    type nonrec t =
      {
      quotaShareName: String_.t option
        [@ocaml.doc "The name of the quota share."];
      quotaShareArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the quota share."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?quotaShareName =
      fun ?quotaShareArn -> fun () -> { quotaShareName; quotaShareArn }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("quotaShareName",
           (Option.map x.quotaShareName ~f:String_.to_value));
        ("quotaShareArn", (Option.map x.quotaShareArn ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let quotaShareArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "quotaShareArn") in
      let quotaShareName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "quotaShareName") in
      make ?quotaShareArn ?quotaShareName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let quotaShareArn = field_map json__ "quotaShareArn" String_.of_json in
      let quotaShareName = field_map json__ "quotaShareName" String_.of_json in
      make ?quotaShareArn ?quotaShareName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Creates an Batch quota share. Each quota share operates as a virtual queue with a configured compute capacity, resource sharing strategy, and borrow limits."]
module CreateQuotaShareRequest =
  struct
    type nonrec t =
      {
      quotaShareName: String_.t
        [@ocaml.doc
          "The name of the quota share. It can be up to 128 characters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_)."];
      jobQueue: String_.t
        [@ocaml.doc
          "The Batch job queue associated with the quota share. This can be the job queue name or ARN. A job queue must be in the VALID state before you can associate it with a quota share."];
      capacityLimits: QuotaShareCapacityLimits.t
        [@ocaml.doc
          "A list that specifies the quantity and type of compute capacity allocated to the quota share."];
      resourceSharingConfiguration: QuotaShareResourceSharingConfiguration.t
        [@ocaml.doc
          "Specifies whether a quota share reserves, lends, or both lends and borrows idle compute capacity."];
      preemptionConfiguration: QuotaSharePreemptionConfiguration.t
        [@ocaml.doc
          "Specifies the preemption behavior for jobs in a quota share."];
      state: QuotaShareState.t option
        [@ocaml.doc
          "The state of the quota share. If the quota share is ENABLED, it is able to accept jobs. If the quota share is DISABLED, new jobs won't be accepted but jobs already submitted can finish. The default state is ENABLED."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags that you apply to the quota share to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources in Batch User Guide."]}
    let context_ = "CreateQuotaShareRequest"
    let make ?state =
      fun ?tags ->
        fun ~quotaShareName ->
          fun ~jobQueue ->
            fun ~capacityLimits ->
              fun ~resourceSharingConfiguration ->
                fun ~preemptionConfiguration ->
                  fun () ->
                    {
                      state;
                      tags;
                      quotaShareName;
                      jobQueue;
                      capacityLimits;
                      resourceSharingConfiguration;
                      preemptionConfiguration
                    }
    let to_value x =
      structure_to_value
        [("quotaShareName", (Some (String_.to_value x.quotaShareName)));
        ("jobQueue", (Some (String_.to_value x.jobQueue)));
        ("capacityLimits",
          (Some (QuotaShareCapacityLimits.to_value x.capacityLimits)));
        ("resourceSharingConfiguration",
          (Some
             (QuotaShareResourceSharingConfiguration.to_value
                x.resourceSharingConfiguration)));
        ("preemptionConfiguration",
          (Some
             (QuotaSharePreemptionConfiguration.to_value
                x.preemptionConfiguration)));
        ("state", (Option.map x.state ~f:QuotaShareState.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let state =
        (Option.map ~f:QuotaShareState.of_xml) (Xml.child xml_arg0 "state") in
      let preemptionConfiguration =
        QuotaSharePreemptionConfiguration.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "preemptionConfiguration") in
      let resourceSharingConfiguration =
        QuotaShareResourceSharingConfiguration.of_xml
          (Xml.child_exn ~context:context_ xml_arg0
             "resourceSharingConfiguration") in
      let capacityLimits =
        QuotaShareCapacityLimits.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "capacityLimits") in
      let jobQueue =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobQueue") in
      let quotaShareName =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "quotaShareName") in
      make ?tags ?state ~preemptionConfiguration
        ~resourceSharingConfiguration ~capacityLimits ~jobQueue
        ~quotaShareName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let state = field_map json__ "state" QuotaShareState.of_json in
      let preemptionConfiguration =
        field_map_exn json__ "preemptionConfiguration"
          QuotaSharePreemptionConfiguration.of_json in
      let resourceSharingConfiguration =
        field_map_exn json__ "resourceSharingConfiguration"
          QuotaShareResourceSharingConfiguration.of_json in
      let capacityLimits =
        field_map_exn json__ "capacityLimits"
          QuotaShareCapacityLimits.of_json in
      let jobQueue = field_map_exn json__ "jobQueue" String_.of_json in
      let quotaShareName =
        field_map_exn json__ "quotaShareName" String_.of_json in
      make ?tags ?state ~preemptionConfiguration
        ~resourceSharingConfiguration ~capacityLimits ~jobQueue
        ~quotaShareName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Creates an Batch quota share. Each quota share operates as a virtual queue with a configured compute capacity, resource sharing strategy, and borrow limits."]
module CreateJobQueueResponse =
  struct
    type nonrec t =
      {
      jobQueueName: String_.t option
        [@ocaml.doc "The name of the job queue."];
      jobQueueArn: String_.t option
        [@ocaml.doc "The Amazon Resource Name (ARN) of the job queue."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?jobQueueName =
      fun ?jobQueueArn -> fun () -> { jobQueueName; jobQueueArn }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("jobQueueName", (Option.map x.jobQueueName ~f:String_.to_value));
        ("jobQueueArn", (Option.map x.jobQueueArn ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobQueueArn =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobQueueArn") in
      let jobQueueName =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "jobQueueName") in
      make ?jobQueueArn ?jobQueueName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobQueueArn = field_map json__ "jobQueueArn" String_.of_json in
      let jobQueueName = field_map json__ "jobQueueName" String_.of_json in
      make ?jobQueueArn ?jobQueueName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Creates an Batch job queue. When you create a job queue, you associate one or more compute environments to the queue and assign an order of preference for the compute environments. You also set a priority to the job queue that determines the order that the Batch scheduler places jobs onto its associated compute environments. For example, if a compute environment is associated with more than one job queue, the job queue with a higher priority is given preference for scheduling jobs to that compute environment."]
module CreateJobQueueRequest =
  struct
    type nonrec t =
      {
      jobQueueName: String_.t
        [@ocaml.doc
          "The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_)."];
      state: JQState.t option
        [@ocaml.doc
          "The state of the job queue. If the job queue state is ENABLED, it is able to accept jobs. If the job queue state is DISABLED, new jobs can't be added to the queue, but jobs already in the queue can finish."];
      schedulingPolicyArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the fair-share scheduling policy. Job queues that don't have a fair-share scheduling policy are scheduled in a first-in, first-out (FIFO) model. After a job queue has a fair-share scheduling policy, it can be replaced but can't be removed. The format is aws:Partition:batch:Region:Account:scheduling-policy/Name . An example is aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy. A job queue without a fair-share scheduling policy is scheduled as a FIFO job queue and can't have a fair-share scheduling policy added. Jobs queues with a fair-share scheduling policy can have a maximum of 500 active share identifiers. When the limit has been reached, submissions of any jobs that add a new share identifier fail."];
      priority: Integer.t
        [@ocaml.doc
          "The priority of the job queue. Job queues with a higher priority (or a higher integer value for the priority parameter) are evaluated first when associated with the same compute environment. Priority is determined in descending order. For example, a job queue with a priority value of 10 is given scheduling preference over a job queue with a priority value of 1. All of the compute environments must be either EC2 (EC2 or SPOT) or Fargate (FARGATE or FARGATE_SPOT); EC2 and Fargate compute environments can't be mixed."];
      computeEnvironmentOrder: ComputeEnvironmentOrders.t option
        [@ocaml.doc
          "The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 (EC2 or SPOT) or Fargate (FARGATE or FARGATE_SPOT); EC2 and Fargate compute environments can't be mixed. All compute environments that are associated with a job queue must share the same architecture. Batch doesn't support mixing compute environment architecture types in a single job queue."];
      serviceEnvironmentOrder: ServiceEnvironmentOrders.t option
        [@ocaml.doc
          "A list of service environments that this job queue can use to allocate jobs. All serviceEnvironments must have the same type. A job queue can't have both a serviceEnvironmentOrder and a computeEnvironmentOrder field."];
      jobQueueType: JobQueueType.t option
        [@ocaml.doc
          "The type of job queue. For service jobs that run on SageMaker Training, this value is SAGEMAKER_TRAINING. For regular container jobs, this value is EKS, ECS, or ECS_FARGATE depending on the compute environment."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags that you apply to the job queue to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources in Batch User Guide."];
      jobStateTimeLimitActions: JobStateTimeLimitActions.t option
        [@ocaml.doc
          "The set of actions that Batch performs on jobs that remain at the head of the job queue in the specified state longer than specified times. Batch will perform each action after maxTimeSeconds has passed. (Note: The minimum value for maxTimeSeconds is 600 (10 minutes) and its maximum value is 86,400 (24 hours).)"]}
    let context_ = "CreateJobQueueRequest"
    let make ?state =
      fun ?schedulingPolicyArn ->
        fun ?computeEnvironmentOrder ->
          fun ?serviceEnvironmentOrder ->
            fun ?jobQueueType ->
              fun ?tags ->
                fun ?jobStateTimeLimitActions ->
                  fun ~jobQueueName ->
                    fun ~priority ->
                      fun () ->
                        {
                          state;
                          schedulingPolicyArn;
                          computeEnvironmentOrder;
                          serviceEnvironmentOrder;
                          jobQueueType;
                          tags;
                          jobStateTimeLimitActions;
                          jobQueueName;
                          priority
                        }
    let to_value x =
      structure_to_value
        [("jobQueueName", (Some (String_.to_value x.jobQueueName)));
        ("state", (Option.map x.state ~f:JQState.to_value));
        ("schedulingPolicyArn",
          (Option.map x.schedulingPolicyArn ~f:String_.to_value));
        ("priority", (Some (Integer.to_value x.priority)));
        ("computeEnvironmentOrder",
          (Option.map x.computeEnvironmentOrder
             ~f:ComputeEnvironmentOrders.to_value));
        ("serviceEnvironmentOrder",
          (Option.map x.serviceEnvironmentOrder
             ~f:ServiceEnvironmentOrders.to_value));
        ("jobQueueType",
          (Option.map x.jobQueueType ~f:JobQueueType.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value));
        ("jobStateTimeLimitActions",
          (Option.map x.jobStateTimeLimitActions
             ~f:JobStateTimeLimitActions.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let jobStateTimeLimitActions =
        (Option.map ~f:JobStateTimeLimitActions.of_xml)
          (Xml.child xml_arg0 "jobStateTimeLimitActions") in
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let jobQueueType =
        (Option.map ~f:JobQueueType.of_xml)
          (Xml.child xml_arg0 "jobQueueType") in
      let serviceEnvironmentOrder =
        (Option.map ~f:ServiceEnvironmentOrders.of_xml)
          (Xml.child xml_arg0 "serviceEnvironmentOrder") in
      let computeEnvironmentOrder =
        (Option.map ~f:ComputeEnvironmentOrders.of_xml)
          (Xml.child xml_arg0 "computeEnvironmentOrder") in
      let priority =
        Integer.of_xml (Xml.child_exn ~context:context_ xml_arg0 "priority") in
      let schedulingPolicyArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "schedulingPolicyArn") in
      let state = (Option.map ~f:JQState.of_xml) (Xml.child xml_arg0 "state") in
      let jobQueueName =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "jobQueueName") in
      make ?jobStateTimeLimitActions ?tags ?jobQueueType
        ?serviceEnvironmentOrder ?computeEnvironmentOrder ~priority
        ?schedulingPolicyArn ?state ~jobQueueName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let jobStateTimeLimitActions =
        field_map json__ "jobStateTimeLimitActions"
          JobStateTimeLimitActions.of_json in
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let jobQueueType = field_map json__ "jobQueueType" JobQueueType.of_json in
      let serviceEnvironmentOrder =
        field_map json__ "serviceEnvironmentOrder"
          ServiceEnvironmentOrders.of_json in
      let computeEnvironmentOrder =
        field_map json__ "computeEnvironmentOrder"
          ComputeEnvironmentOrders.of_json in
      let priority = field_map_exn json__ "priority" Integer.of_json in
      let schedulingPolicyArn =
        field_map json__ "schedulingPolicyArn" String_.of_json in
      let state = field_map json__ "state" JQState.of_json in
      let jobQueueName = field_map_exn json__ "jobQueueName" String_.of_json in
      make ?jobStateTimeLimitActions ?tags ?jobQueueType
        ?serviceEnvironmentOrder ?computeEnvironmentOrder ~priority
        ?schedulingPolicyArn ?state ~jobQueueName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for CreateJobQueue."]
module CreateConsumableResourceResponse =
  struct
    type nonrec t =
      {
      consumableResourceName: String_.t option
        [@ocaml.doc "The name of the consumable resource."];
      consumableResourceArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the consumable resource."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?consumableResourceName =
      fun ?consumableResourceArn ->
        fun () -> { consumableResourceName; consumableResourceArn }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("consumableResourceName",
           (Option.map x.consumableResourceName ~f:String_.to_value));
        ("consumableResourceArn",
          (Option.map x.consumableResourceArn ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let consumableResourceArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "consumableResourceArn") in
      let consumableResourceName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "consumableResourceName") in
      make ?consumableResourceArn ?consumableResourceName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let consumableResourceArn =
        field_map json__ "consumableResourceArn" String_.of_json in
      let consumableResourceName =
        field_map json__ "consumableResourceName" String_.of_json in
      make ?consumableResourceArn ?consumableResourceName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Creates an Batch consumable resource."]
module CreateConsumableResourceRequest =
  struct
    type nonrec t =
      {
      consumableResourceName: String_.t
        [@ocaml.doc "The name of the consumable resource. Must be unique."];
      totalQuantity: Long.t option
        [@ocaml.doc
          "The total amount of the consumable resource that is available. Must be non-negative."];
      resourceType: String_.t option
        [@ocaml.doc
          "Indicates whether the resource is available to be re-used after a job completes. Can be one of: REPLENISHABLE (default) NON_REPLENISHABLE"];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags that you apply to the consumable resource to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources."]}
    let context_ = "CreateConsumableResourceRequest"
    let make ?totalQuantity =
      fun ?resourceType ->
        fun ?tags ->
          fun ~consumableResourceName ->
            fun () ->
              { totalQuantity; resourceType; tags; consumableResourceName }
    let to_value x =
      structure_to_value
        [("consumableResourceName",
           (Some (String_.to_value x.consumableResourceName)));
        ("totalQuantity", (Option.map x.totalQuantity ~f:Long.to_value));
        ("resourceType", (Option.map x.resourceType ~f:String_.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let resourceType =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "resourceType") in
      let totalQuantity =
        (Option.map ~f:Long.of_xml) (Xml.child xml_arg0 "totalQuantity") in
      let consumableResourceName =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "consumableResourceName") in
      make ?tags ?resourceType ?totalQuantity ~consumableResourceName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let resourceType = field_map json__ "resourceType" String_.of_json in
      let totalQuantity = field_map json__ "totalQuantity" Long.of_json in
      let consumableResourceName =
        field_map_exn json__ "consumableResourceName" String_.of_json in
      make ?tags ?resourceType ?totalQuantity ~consumableResourceName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Creates an Batch consumable resource."]
module CreateComputeEnvironmentResponse =
  struct
    type nonrec t =
      {
      computeEnvironmentName: String_.t option
        [@ocaml.doc
          "The name of the compute environment. It can be up to 128 characters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_)."];
      computeEnvironmentArn: String_.t option
        [@ocaml.doc
          "The Amazon Resource Name (ARN) of the compute environment."]}
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?computeEnvironmentName =
      fun ?computeEnvironmentArn ->
        fun () -> { computeEnvironmentName; computeEnvironmentArn }
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("computeEnvironmentName",
           (Option.map x.computeEnvironmentName ~f:String_.to_value));
        ("computeEnvironmentArn",
          (Option.map x.computeEnvironmentArn ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let computeEnvironmentArn =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "computeEnvironmentArn") in
      let computeEnvironmentName =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "computeEnvironmentName") in
      make ?computeEnvironmentArn ?computeEnvironmentName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let computeEnvironmentArn =
        field_map json__ "computeEnvironmentArn" String_.of_json in
      let computeEnvironmentName =
        field_map json__ "computeEnvironmentName" String_.of_json in
      make ?computeEnvironmentArn ?computeEnvironmentName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Creates an Batch compute environment. You can create MANAGED or UNMANAGED compute environments. MANAGED compute environments can use Amazon EC2 or Fargate resources. UNMANAGED compute environments can only use EC2 resources. In a managed compute environment, Batch manages the capacity and instance types of the compute resources within the environment. This is based on the compute resource specification that you define or the launch template that you specify when you create the compute environment. Either, you can choose to use EC2 On-Demand Instances and EC2 Spot Instances. Or, you can use Fargate and Fargate Spot capacity in your managed compute environment. You can optionally set a maximum price so that Spot Instances only launch when the Spot Instance price is less than a specified percentage of the On-Demand price. In an unmanaged compute environment, you can manage your own EC2 compute resources and have flexibility with how you configure your compute resources. For example, you can use custom AMIs. However, you must verify that each of your AMIs meet the Amazon ECS container instance AMI specification. For more information, see container instance AMIs in the Amazon Elastic Container Service Developer Guide. After you created your unmanaged compute environment, you can use the DescribeComputeEnvironments operation to find the Amazon ECS cluster that's associated with it. Then, launch your container instances into that Amazon ECS cluster. For more information, see Launching an Amazon ECS container instance in the Amazon Elastic Container Service Developer Guide. Batch doesn't automatically upgrade the AMIs in a compute environment after it's created. For more information on how to update a compute environment's AMI, see Updating compute environments in the Batch User Guide."]
module CreateComputeEnvironmentRequest =
  struct
    type nonrec t =
      {
      computeEnvironmentName: String_.t
        [@ocaml.doc
          "The name for your compute environment. It can be up to 128 characters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_)."];
      type_: CEType.t
        [@ocaml.doc
          "The type of the compute environment: MANAGED or UNMANAGED. For more information, see Compute Environments in the Batch User Guide."];
      state: CEState.t option
        [@ocaml.doc
          "The state of the compute environment. If the state is ENABLED, then the compute environment accepts jobs from a queue and can scale out automatically based on queues. If the state is ENABLED, then the Batch scheduler can attempt to place jobs from an associated job queue on the compute resources within the environment. If the compute environment is managed, then it can scale its instances out or in automatically, based on the job queue demand. If the state is DISABLED, then the Batch scheduler doesn't attempt to place jobs within the environment. Jobs in a STARTING or RUNNING state continue to progress normally. Managed compute environments in the DISABLED state don't scale out. Compute environments in a DISABLED state may continue to incur billing charges, for example, if they have running instances due to jobs that are still executing or a non-zero minvCpus setting. To prevent additional charges, disable and delete the compute environment. When an instance is idle, the instance scales down to the minvCpus value. However, the instance size doesn't change. For example, consider a c5.8xlarge instance with a minvCpus value of 4 and a desiredvCpus value of 36. This instance doesn't scale down to a c5.large instance."];
      unmanagedvCpus: Integer.t option
        [@ocaml.doc
          "The maximum number of vCPUs for an unmanaged compute environment. This parameter is only used for fair-share scheduling to reserve vCPU capacity for new share identifiers. If this parameter isn't provided for a fair-share job queue, no vCPU capacity is reserved. This parameter is only supported when the type parameter is set to UNMANAGED."];
      computeResources: ComputeResource.t option
        [@ocaml.doc
          "Details about the compute resources managed by the compute environment. This parameter is required for managed compute environments. For more information, see Compute Environments in the Batch User Guide."];
      serviceRole: String_.t option
        [@ocaml.doc
          "The full Amazon Resource Name (ARN) of the IAM role that allows Batch to make calls to other Amazon Web Services services on your behalf. For more information, see Batch service IAM role in the Batch User Guide. If your account already created the Batch service-linked role, that role is used by default for your compute environment unless you specify a different role here. If the Batch service-linked role doesn't exist in your account, and no role is specified here, the service attempts to create the Batch service-linked role in your account. If your specified role has a path other than /, then you must specify either the full role ARN (recommended) or prefix the role name with the path. For example, if a role with the name bar has a path of /foo/, specify /foo/bar as the role name. For more information, see Friendly names and paths in the IAM User Guide. Depending on how you created your Batch service role, its ARN might contain the service-role path prefix. When you only specify the name of the service role, Batch assumes that your ARN doesn't use the service-role path prefix. Because of this, we recommend that you specify the full ARN of your service role when you create compute environments."];
      tags: TagrisTagsMap.t option
        [@ocaml.doc
          "The tags that you apply to the compute environment to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging Amazon Web Services Resources in Amazon Web Services General Reference. These tags can be updated or removed using the TagResource and UntagResource API operations. These tags don't propagate to the underlying compute resources."];
      eksConfiguration: EksConfiguration.t option
        [@ocaml.doc
          "The details for the Amazon EKS cluster that supports the compute environment. To create a compute environment that uses EKS resources, the caller must have permissions to call eks:DescribeCluster."];
      context: String_.t option [@ocaml.doc "Reserved."]}
    let context_ = "CreateComputeEnvironmentRequest"
    let make ?state =
      fun ?unmanagedvCpus ->
        fun ?computeResources ->
          fun ?serviceRole ->
            fun ?tags ->
              fun ?eksConfiguration ->
                fun ?context ->
                  fun ~computeEnvironmentName ->
                    fun ~type_ ->
                      fun () ->
                        {
                          state;
                          unmanagedvCpus;
                          computeResources;
                          serviceRole;
                          tags;
                          eksConfiguration;
                          context;
                          computeEnvironmentName;
                          type_
                        }
    let to_value x =
      structure_to_value
        [("computeEnvironmentName",
           (Some (String_.to_value x.computeEnvironmentName)));
        ("type", (Some (CEType.to_value x.type_)));
        ("state", (Option.map x.state ~f:CEState.to_value));
        ("unmanagedvCpus", (Option.map x.unmanagedvCpus ~f:Integer.to_value));
        ("computeResources",
          (Option.map x.computeResources ~f:ComputeResource.to_value));
        ("serviceRole", (Option.map x.serviceRole ~f:String_.to_value));
        ("tags", (Option.map x.tags ~f:TagrisTagsMap.to_value));
        ("eksConfiguration",
          (Option.map x.eksConfiguration ~f:EksConfiguration.to_value));
        ("context", (Option.map x.context ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let context =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "context") in
      let eksConfiguration =
        (Option.map ~f:EksConfiguration.of_xml)
          (Xml.child xml_arg0 "eksConfiguration") in
      let tags =
        (Option.map ~f:TagrisTagsMap.of_xml) (Xml.child xml_arg0 "tags") in
      let serviceRole =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "serviceRole") in
      let computeResources =
        (Option.map ~f:ComputeResource.of_xml)
          (Xml.child xml_arg0 "computeResources") in
      let unmanagedvCpus =
        (Option.map ~f:Integer.of_xml) (Xml.child xml_arg0 "unmanagedvCpus") in
      let state = (Option.map ~f:CEState.of_xml) (Xml.child xml_arg0 "state") in
      let type_ =
        CEType.of_xml (Xml.child_exn ~context:context_ xml_arg0 "type") in
      let computeEnvironmentName =
        String_.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "computeEnvironmentName") in
      make ?context ?eksConfiguration ?tags ?serviceRole ?computeResources
        ?unmanagedvCpus ?state ~type_ ~computeEnvironmentName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let context = field_map json__ "context" String_.of_json in
      let eksConfiguration =
        field_map json__ "eksConfiguration" EksConfiguration.of_json in
      let tags = field_map json__ "tags" TagrisTagsMap.of_json in
      let serviceRole = field_map json__ "serviceRole" String_.of_json in
      let computeResources =
        field_map json__ "computeResources" ComputeResource.of_json in
      let unmanagedvCpus = field_map json__ "unmanagedvCpus" Integer.of_json in
      let state = field_map json__ "state" CEState.of_json in
      let type_ = field_map_exn json__ "type" CEType.of_json in
      let computeEnvironmentName =
        field_map_exn json__ "computeEnvironmentName" String_.of_json in
      make ?context ?eksConfiguration ?tags ?serviceRole ?computeResources
        ?unmanagedvCpus ?state ~type_ ~computeEnvironmentName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for CreateComputeEnvironment."]
module CancelJobResponse =
  struct
    type nonrec t = unit
    type nonrec error =
      [ `ClientException of ClientException.t 
      | `ServerException of ServerException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make () = ()
    let error_of_json name json =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_json json)
      | "ServerException" -> `ServerException (ServerException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ClientException" -> `ClientException (ClientException.of_xml xml)
      | "ServerException" -> `ServerException (ServerException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ClientException e ->
          `Assoc
            [("error", (`String "ClientException"));
            ("details", (ClientException.to_json e))]
      | `ServerException e ->
          `Assoc
            [("error", (`String "ServerException"));
            ("details", (ServerException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let of_header_and_body = ((fun (xs, pipe) -> make ())[@warning "-27"])
    let to_value _ = `Structure []
    let to_query v = to_query to_value v
    let of_xml _ = make ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json _ = make ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Cancels a job in an Batch job queue. Jobs that are in a SUBMITTED, PENDING, or RUNNABLE state are cancelled and the job status is updated to FAILED. A PENDING job is canceled after all dependency jobs are completed. Therefore, it may take longer than expected to cancel a job in PENDING status. When you try to cancel an array parent job in PENDING, Batch attempts to cancel all child jobs. The array parent job is canceled when all child jobs are completed. Jobs that progressed to the STARTING or RUNNING state aren't canceled. However, the API operation still succeeds, even if no job is canceled. These jobs must be terminated with the TerminateJob operation."]
module CancelJobRequest =
  struct
    type nonrec t =
      {
      jobId: String_.t [@ocaml.doc "The Batch job ID of the job to cancel."];
      reason: String_.t
        [@ocaml.doc
          "A message to attach to the job that explains the reason for canceling it. This message is returned by future DescribeJobs operations on the job. It is also recorded in the Batch activity logs. This parameter has as limit of 1024 characters."]}
    let context_ = "CancelJobRequest"
    let make ~jobId = fun ~reason -> fun () -> { jobId; reason }
    let to_value x =
      structure_to_value
        [("jobId", (Some (String_.to_value x.jobId)));
        ("reason", (Some (String_.to_value x.reason)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let reason =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "reason") in
      let jobId =
        String_.of_xml (Xml.child_exn ~context:context_ xml_arg0 "jobId") in
      make ~reason ~jobId ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let reason = field_map_exn json__ "reason" String_.of_json in
      let jobId = field_map_exn json__ "jobId" String_.of_json in
      make ~reason ~jobId ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Contains the parameters for CancelJob."]