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
(* 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.geo_maps
let apiVersion = "2020-11-19"
let endpointPrefix = "geo-maps"
let serviceFullName = "Amazon Location Service Maps V2"
let signatureVersion = "v4"
let protocol = "rest_json"
let globalEndpoint = endpointPrefix ^ ".amazonaws.com"
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 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 ValidationExceptionField =
  struct
    type nonrec t =
      {
      name: String_.t option [@ocaml.doc "The name of the resource."];
      message: String_.t option [@ocaml.doc "The error message."]}
    let make ?name = fun ?message -> fun () -> { name; message }
    let to_value x =
      structure_to_value
        [("name", (Option.map x.name ~f:String_.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
      let name = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "name") in
      make ?message ?name ()
    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
      let name = field_map json__ "Name" String_.of_json in
      make ?message ?name ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The input fails to satisfy the constraints specified by the Amazon Location service."]
module ValidationExceptionFieldList =
  struct
    type nonrec t = ValidationExceptionField.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:ValidationExceptionField.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:ValidationExceptionField.of_xml)
    let of_json j =
      list_of_json ~kind:"ValidationExceptionFieldList"
        ~of_json:ValidationExceptionField.of_json j
    let to_json v = composed_to_json to_value v
  end
module ValidationExceptionReason =
  struct
    type nonrec t =
      | UnknownOperation 
      | Missing 
      | CannotParse 
      | FieldValidationFailed 
      | Other 
      | UnknownField 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | UnknownOperation -> "UnknownOperation"
      | Missing -> "Missing"
      | CannotParse -> "CannotParse"
      | FieldValidationFailed -> "FieldValidationFailed"
      | Other -> "Other"
      | UnknownField -> "UnknownField"
      | Non_static_id s -> s
    let of_string =
      function
      | "UnknownOperation" -> UnknownOperation
      | "Missing" -> Missing
      | "CannotParse" -> CannotParse
      | "FieldValidationFailed" -> FieldValidationFailed
      | "Other" -> Other
      | "UnknownField" -> UnknownField
      | 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 ValidationExceptionReason" xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"ValidationExceptionReason" j)
    let to_json = simple_to_json to_value
  end
module TileAdditionalFeature =
  struct
    type nonrec t =
      | ContourLines 
      | Hillshade 
      | Logistics 
      | Transit 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | ContourLines -> "ContourLines"
      | Hillshade -> "Hillshade"
      | Logistics -> "Logistics"
      | Transit -> "Transit"
      | Non_static_id s -> s
    let of_string =
      function
      | "ContourLines" -> ContourLines
      | "Hillshade" -> Hillshade
      | "Logistics" -> Logistics
      | "Transit" -> Transit
      | 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 TileAdditionalFeature" xml_arg0)
    let of_json j =
      of_string (string_of_json ~kind:"TileAdditionalFeature" j)
    let to_json = simple_to_json to_value
  end
module TravelMode =
  struct
    type nonrec t =
      | Transit 
      | Truck 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | Transit -> "Transit"
      | Truck -> "Truck"
      | Non_static_id s -> s
    let of_string =
      function
      | "Transit" -> Transit
      | "Truck" -> Truck
      | 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 TravelMode" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"TravelMode" j)
    let to_json = simple_to_json to_value
  end
module AccessDeniedException =
  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
       "The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions."]
module Blob =
  struct
    type nonrec t = string
    let make i = i
    let of_string x = x
    let to_value x = `Blob x
    let to_query v = to_query to_value v
    let to_header x = x
    let of_xml xml_arg0 = string_of_xml ~kind:"a blob" xml_arg0
    let of_json j = string_of_json ~kind:"a blob" j
    let to_json = simple_to_json to_value
  end
module InternalServerException =
  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
       "The request processing has failed because of an unknown error, exception or failure."]
module ResourceNotFoundException =
  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
       "Exception thrown when the associated resource could not be found."]
module ThrottlingException =
  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 "The request was denied due to request throttling."]
module ValidationException =
  struct
    type nonrec t =
      {
      message: String_.t option ;
      reason: ValidationExceptionReason.t option
        [@ocaml.doc "The field where the invalid entry was detected."];
      fieldList: ValidationExceptionFieldList.t option
        [@ocaml.doc
          "A message with the reason for the validation exception error."]}
    let make ?message =
      fun ?reason ->
        fun ?fieldList -> fun () -> { message; reason; fieldList }
    let to_value x =
      structure_to_value
        [("message", (Option.map x.message ~f:String_.to_value));
        ("reason",
          (Option.map x.reason ~f:ValidationExceptionReason.to_value));
        ("fieldList",
          (Option.map x.fieldList ~f:ValidationExceptionFieldList.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let fieldList =
        (Option.map ~f:ValidationExceptionFieldList.of_xml)
          (Xml.child xml_arg0 "fieldList") in
      let reason =
        (Option.map ~f:ValidationExceptionReason.of_xml)
          (Xml.child xml_arg0 "reason") in
      let message =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "message") in
      make ?fieldList ?reason ?message ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let fieldList =
        field_map json__ "FieldList" ValidationExceptionFieldList.of_json in
      let reason =
        field_map json__ "Reason" ValidationExceptionReason.of_json in
      let message = field_map json__ "Message" String_.of_json in
      make ?fieldList ?reason ?message ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "The input fails to satisfy the constraints specified by an AWS service."]
module ApiKey =
  struct
    type nonrec t = string
    let context_ = "ApiKey"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:1000) >>=
             (fun () -> check_string_min i ~min:0));
        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:"ApiKey" j
    let to_json = simple_to_json to_value
  end
module GetTileRequestXString =
  struct
    type nonrec t = string
    let context_ = "GetTileRequestXString"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_min i ~min:0) >>=
             (fun () ->
                (check_string_max i ~max:7) >>=
                  (fun () -> check_pattern i ~pattern:".*\\d+.*")));
        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:"GetTileRequestXString" j
    let to_json = simple_to_json to_value
  end
module GetTileRequestYString =
  struct
    type nonrec t = string
    let context_ = "GetTileRequestYString"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_min i ~min:0) >>=
             (fun () ->
                (check_string_max i ~max:7) >>=
                  (fun () -> check_pattern i ~pattern:".*\\d+.*")));
        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:"GetTileRequestYString" j
    let to_json = simple_to_json to_value
  end
module GetTileRequestZString =
  struct
    type nonrec t = string
    let context_ = "GetTileRequestZString"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_min i ~min:0) >>=
             (fun () ->
                (check_string_max i ~max:2) >>=
                  (fun () -> check_pattern i ~pattern:".*\\d+.*")));
        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:"GetTileRequestZString" j
    let to_json = simple_to_json to_value
  end
module TileAdditionalFeatureList =
  struct
    type nonrec t = TileAdditionalFeature.t list
    let make i =
      let open Result in
        ok_or_failwith
          ((check_list_max i ~max:4) >>= (fun () -> check_list_min i ~min:0));
        i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:TileAdditionalFeature.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:TileAdditionalFeature.of_xml)
    let of_json j =
      list_of_json ~kind:"TileAdditionalFeatureList"
        ~of_json:TileAdditionalFeature.of_json j
    let to_json v = composed_to_json to_value v
  end
module Tileset =
  struct
    type nonrec t = string
    let context_ = "Tileset"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_min i ~min:1) >>=
             (fun () ->
                (check_string_max i ~max:100) >>=
                  (fun () -> check_pattern i ~pattern:"[-.\\w]+")));
        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:"Tileset" j
    let to_json = simple_to_json to_value
  end
module Buildings =
  struct
    type nonrec t =
      | Buildings3D 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function | Buildings3D -> "Buildings3D" | Non_static_id s -> s
    let of_string =
      function | "Buildings3D" -> Buildings3D | 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 Buildings" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"Buildings" j)
    let to_json = simple_to_json to_value
  end
module ColorScheme =
  struct
    type nonrec t =
      | Light 
      | Dark 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function | Light -> "Light" | Dark -> "Dark" | Non_static_id s -> s
    let of_string =
      function | "Light" -> Light | "Dark" -> Dark | 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 ColorScheme" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"ColorScheme" j)
    let to_json = simple_to_json to_value
  end
module ContourDensity =
  struct
    type nonrec t =
      | Low 
      | Medium 
      | High 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | Low -> "Low"
      | Medium -> "Medium"
      | High -> "High"
      | Non_static_id s -> s
    let of_string =
      function
      | "Low" -> Low
      | "Medium" -> Medium
      | "High" -> High
      | 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 ContourDensity" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"ContourDensity" j)
    let to_json = simple_to_json to_value
  end
module CountryCode =
  struct
    type nonrec t = string
    let context_ = "CountryCode"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_min i ~min:2) >>=
             (fun () ->
                (check_string_max i ~max:3) >>=
                  (fun () -> check_pattern i ~pattern:"([A-Z]{2}|[A-Z]{3})")));
        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:"CountryCode" j
    let to_json = simple_to_json to_value
  end
module MapStyle =
  struct
    type nonrec t =
      | Standard 
      | Monochrome 
      | Hybrid 
      | Satellite 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | Standard -> "Standard"
      | Monochrome -> "Monochrome"
      | Hybrid -> "Hybrid"
      | Satellite -> "Satellite"
      | Non_static_id s -> s
    let of_string =
      function
      | "Standard" -> Standard
      | "Monochrome" -> Monochrome
      | "Hybrid" -> Hybrid
      | "Satellite" -> Satellite
      | 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 MapStyle" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"MapStyle" j)
    let to_json = simple_to_json to_value
  end
module Terrain =
  struct
    type nonrec t =
      | Hillshade 
      | Terrain3D 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | Hillshade -> "Hillshade"
      | Terrain3D -> "Terrain3D"
      | Non_static_id s -> s
    let of_string =
      function
      | "Hillshade" -> Hillshade
      | "Terrain3D" -> Terrain3D
      | 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 Terrain" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"Terrain" j)
    let to_json = simple_to_json to_value
  end
module Traffic =
  struct
    type nonrec t =
      | All 
      | Congestion 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | All -> "All"
      | Congestion -> "Congestion"
      | Non_static_id s -> s
    let of_string =
      function
      | "All" -> All
      | "Congestion" -> Congestion
      | 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 Traffic" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"Traffic" j)
    let to_json = simple_to_json to_value
  end
module TravelModeList =
  struct
    type nonrec t = TravelMode.t list
    let make i =
      let open Result in
        ok_or_failwith
          ((check_list_max i ~max:2) >>= (fun () -> check_list_min i ~min:0));
        i
    let of_string _ =
      failwithf "of_string is not implemented for List_shape objects" ()
      [@@warning "-32"]
    let to_value xs =
      (xs |> (List.map ~f:TravelMode.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:TravelMode.of_xml)
    let of_json j =
      list_of_json ~kind:"TravelModeList" ~of_json:TravelMode.of_json j
    let to_json v = composed_to_json to_value v
  end
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 CompactOverlay =
  struct
    type nonrec t = string
    let context_ = "CompactOverlay"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:5000) >>=
             (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:"CompactOverlay" j
    let to_json = simple_to_json to_value
  end
module DistanceMeters =
  struct
    type nonrec t = Int64.t
    let make i =
      let open Result in
        ok_or_failwith
          ((check_int64_max i ~max:4294967295L) >>=
             (fun () -> check_int64_min i ~min:0L));
        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 GeoJsonOverlay =
  struct
    type nonrec t = string
    let context_ = "GeoJsonOverlay"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:4200) >>=
             (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:"GeoJsonOverlay" j
    let to_json = simple_to_json to_value
  end
module GetStaticMapRequestBoundedPositionsString =
  struct
    type nonrec t = string
    let context_ = "GetStaticMapRequestBoundedPositionsString"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_min i ~min:0) >>=
             (fun () ->
                (check_string_max i ~max:5000) >>=
                  (fun () ->
                     check_pattern i
                       ~pattern:"(-?\\d{1,3}(\\.\\d{1,14})?,-?\\d{1,2}(\\.\\d{1,14})?)(,(-?\\d{1,3}(\\.\\d{1,14})?,-?\\d{1,2}(\\.\\d{1,14})?))*")));
        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:"GetStaticMapRequestBoundedPositionsString" j
    let to_json = simple_to_json to_value
  end
module GetStaticMapRequestBoundingBoxString =
  struct
    type nonrec t = string
    let context_ = "GetStaticMapRequestBoundingBoxString"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_min i ~min:0) >>=
             (fun () ->
                (check_string_max i ~max:100) >>=
                  (fun () ->
                     check_pattern i
                       ~pattern:"(-?\\d{1,3}(\\.\\d{1,14})?,-?\\d{1,2}(\\.\\d{1,14})?)(,(-?\\d{1,3}(\\.\\d{1,14})?,-?\\d{1,2}(\\.\\d{1,14})?))*")));
        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:"GetStaticMapRequestBoundingBoxString" j
    let to_json = simple_to_json to_value
  end
module GetStaticMapRequestFileNameString =
  struct
    type nonrec t = string
    let context_ = "GetStaticMapRequestFileNameString"
    let make i =
      let open Result in
        ok_or_failwith (check_pattern i ~pattern:"map(@2x)?"); 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:"GetStaticMapRequestFileNameString" j
    let to_json = simple_to_json to_value
  end
module GetStaticMapRequestHeightInteger =
  struct
    type nonrec t = int
    let make i =
      let open Result in
        ok_or_failwith
          ((check_int_max i ~max:1400) >>=
             (fun () -> check_int_min i ~min:64));
        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 GetStaticMapRequestHeightInteger" 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 GetStaticMapRequestPaddingInteger =
  struct
    type nonrec t = int
    let make i =
      let open Result in
        ok_or_failwith
          ((check_int_max i ~max:350) >>= (fun () -> check_int_min i ~min:0));
        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 GetStaticMapRequestPaddingInteger" 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 GetStaticMapRequestWidthInteger =
  struct
    type nonrec t = int
    let make i =
      let open Result in
        ok_or_failwith
          ((check_int_max i ~max:1400) >>=
             (fun () -> check_int_min i ~min:64));
        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 GetStaticMapRequestWidthInteger"
           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 GetStaticMapRequestZoomFloat =
  struct
    type nonrec t = float
    let make i =
      let open Result in
        ok_or_failwith
          ((check_float_min i ~min:20.) >>=
             (fun () -> check_float_min i ~min:0.));
        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 LabelSize =
  struct
    type nonrec t =
      | Small 
      | Large 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function | Small -> "Small" | Large -> "Large" | Non_static_id s -> s
    let of_string =
      function | "Small" -> Small | "Large" -> Large | 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 LabelSize" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"LabelSize" j)
    let to_json = simple_to_json to_value
  end
module LanguageTag =
  struct
    type nonrec t = string
    let context_ = "LanguageTag"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:35) >>=
             (fun () -> check_string_min i ~min:2));
        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:"LanguageTag" j
    let to_json = simple_to_json to_value
  end
module MapFeatureMode =
  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 MapFeatureMode" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"MapFeatureMode" j)
    let to_json = simple_to_json to_value
  end
module PositionString =
  struct
    type nonrec t = string
    let context_ = "PositionString"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_min i ~min:3) >>=
             (fun () ->
                (check_string_max i ~max:36) >>=
                  (fun () ->
                     check_pattern i
                       ~pattern:"-?\\d{1,3}(\\.\\d{1,14})?,-?\\d{1,2}(\\.\\d{1,14})?")));
        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:"PositionString" j
    let to_json = simple_to_json to_value
  end
module ScaleBarUnit =
  struct
    type nonrec t =
      | Kilometers 
      | KilometersMiles 
      | Miles 
      | MilesKilometers 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | Kilometers -> "Kilometers"
      | KilometersMiles -> "KilometersMiles"
      | Miles -> "Miles"
      | MilesKilometers -> "MilesKilometers"
      | Non_static_id s -> s
    let of_string =
      function
      | "Kilometers" -> Kilometers
      | "KilometersMiles" -> KilometersMiles
      | "Miles" -> Miles
      | "MilesKilometers" -> MilesKilometers
      | 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 ScaleBarUnit" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"ScaleBarUnit" j)
    let to_json = simple_to_json to_value
  end
module StaticMapStyle =
  struct
    type nonrec t =
      | Satellite 
      | Standard 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | Satellite -> "Satellite"
      | Standard -> "Standard"
      | Non_static_id s -> s
    let of_string =
      function
      | "Satellite" -> Satellite
      | "Standard" -> Standard
      | 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 StaticMapStyle" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"StaticMapStyle" j)
    let to_json = simple_to_json to_value
  end
module GetSpritesRequestFileNameString =
  struct
    type nonrec t = string
    let context_ = "GetSpritesRequestFileNameString"
    let make i =
      let open Result in
        ok_or_failwith
          (check_pattern i ~pattern:"sprites(@2x)?\\.(png|json)");
        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:"GetSpritesRequestFileNameString" j
    let to_json = simple_to_json to_value
  end
module Variant =
  struct
    type nonrec t =
      | Default 
      | Non_static_id of string 
    let make i = i
    let to_string = function | Default -> "Default" | Non_static_id s -> s
    let of_string = function | "Default" -> Default | 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 Variant" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"Variant" j)
    let to_json = simple_to_json to_value
  end
module GetGlyphsRequestFontStackString =
  struct
    type nonrec t = string
    let context_ = "GetGlyphsRequestFontStackString"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:1000) >>=
             (fun () -> check_string_min i ~min:0));
        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:"GetGlyphsRequestFontStackString" j
    let to_json = simple_to_json to_value
  end
module GetGlyphsRequestFontUnicodeRangeString =
  struct
    type nonrec t = string
    let context_ = "GetGlyphsRequestFontUnicodeRangeString"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_min i ~min:0) >>=
             (fun () ->
                (check_string_max i ~max:50) >>=
                  (fun () -> check_pattern i ~pattern:"[0-9]+-[0-9]+\\.pbf")));
        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:"GetGlyphsRequestFontUnicodeRangeString" j
    let to_json = simple_to_json to_value
  end
module GetTileResponse =
  struct
    type nonrec t =
      {
      blob: Blob.t option
        [@ocaml.doc
          "The blob represents a vector tile in mvt or a raster tile in an image format."];
      contentType: String_.t option
        [@ocaml.doc
          "Header that represents the format of the response. The response returns the following as the HTTP body."];
      cacheControl: String_.t option
        [@ocaml.doc
          "Header that instructs caching configuration for the client."];
      eTag: String_.t option
        [@ocaml.doc
          "The pricing bucket for which the request is charged at."];
      pricingBucket: String_.t option
        [@ocaml.doc
          "The pricing bucket for which the request is charged at."]}
    type nonrec error =
      [ `AccessDeniedException of AccessDeniedException.t 
      | `InternalServerException of InternalServerException.t 
      | `ResourceNotFoundException of ResourceNotFoundException.t 
      | `ThrottlingException of ThrottlingException.t 
      | `ValidationException of ValidationException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?blob =
      fun ?contentType ->
        fun ?cacheControl ->
          fun ?eTag ->
            fun ?pricingBucket ->
              fun () ->
                { blob; contentType; cacheControl; eTag; pricingBucket }
    let error_of_json name json =
      match name with
      | "AccessDeniedException" ->
          `AccessDeniedException (AccessDeniedException.of_json json)
      | "InternalServerException" ->
          `InternalServerException (InternalServerException.of_json json)
      | "ResourceNotFoundException" ->
          `ResourceNotFoundException (ResourceNotFoundException.of_json json)
      | "ThrottlingException" ->
          `ThrottlingException (ThrottlingException.of_json json)
      | "ValidationException" ->
          `ValidationException (ValidationException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "AccessDeniedException" ->
          `AccessDeniedException (AccessDeniedException.of_xml xml)
      | "InternalServerException" ->
          `InternalServerException (InternalServerException.of_xml xml)
      | "ResourceNotFoundException" ->
          `ResourceNotFoundException (ResourceNotFoundException.of_xml xml)
      | "ThrottlingException" ->
          `ThrottlingException (ThrottlingException.of_xml xml)
      | "ValidationException" ->
          `ValidationException (ValidationException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `AccessDeniedException e ->
          `Assoc
            [("error", (`String "AccessDeniedException"));
            ("details", (AccessDeniedException.to_json e))]
      | `InternalServerException e ->
          `Assoc
            [("error", (`String "InternalServerException"));
            ("details", (InternalServerException.to_json e))]
      | `ResourceNotFoundException e ->
          `Assoc
            [("error", (`String "ResourceNotFoundException"));
            ("details", (ResourceNotFoundException.to_json e))]
      | `ThrottlingException e ->
          `Assoc
            [("error", (`String "ThrottlingException"));
            ("details", (ThrottlingException.to_json e))]
      | `ValidationException e ->
          `Assoc
            [("error", (`String "ValidationException"));
            ("details", (ValidationException.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 ?blob:(Some pipe)
            ?contentType:(Option.map
                            ((List.Assoc.find ~equal:String.Caseless.equal)
                               xs "Content-Type") ~f:String_.of_string)
            ?cacheControl:(Option.map
                             ((List.Assoc.find ~equal:String.Caseless.equal)
                                xs "Cache-Control") ~f:String_.of_string)
            ?eTag:(Option.map
                     ((List.Assoc.find ~equal:String.Caseless.equal) xs
                        "ETag") ~f:String_.of_string)
            ?pricingBucket:(Option.map
                              ((List.Assoc.find ~equal:String.Caseless.equal)
                                 xs "x-amz-geo-pricing-bucket")
                              ~f:String_.of_string) ())
      [@warning "-27"])
    let to_value x =
      structure_to_value
        [("Blob", (Option.map x.blob ~f:Blob.to_value));
        ("Content-Type", (Option.map x.contentType ~f:String_.to_value));
        ("Cache-Control", (Option.map x.cacheControl ~f:String_.to_value));
        ("ETag", (Option.map x.eTag ~f:String_.to_value));
        ("x-amz-geo-pricing-bucket",
          (Option.map x.pricingBucket ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let pricingBucket =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "x-amz-geo-pricing-bucket") in
      let eTag = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "ETag") in
      let cacheControl =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "Cache-Control") in
      let contentType =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "Content-Type") in
      let blob = (Option.map ~f:Blob.of_xml) (Xml.child xml_arg0 "Blob") in
      make ?pricingBucket ?eTag ?cacheControl ?contentType ?blob ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let pricingBucket = field_map json__ "PricingBucket" String_.of_json in
      let eTag = field_map json__ "ETag" String_.of_json in
      let cacheControl = field_map json__ "CacheControl" String_.of_json in
      let contentType = field_map json__ "ContentType" String_.of_json in
      let blob = field_map json__ "Blob" Blob.of_json in
      make ?pricingBucket ?eTag ?cacheControl ?contentType ?blob ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "GetTile returns a tile. Map tiles are used by clients to render a map. They're addressed using a grid arrangement with an X coordinate, Y coordinate, and Z (zoom) level. For more information, see Tiles in the Amazon Location Service Developer Guide."]
module GetTileRequest =
  struct
    type nonrec t =
      {
      additionalFeatures: TileAdditionalFeatureList.t option
        [@ocaml.doc
          "A list of optional additional parameters such as map styles that can be requested for each result. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers."];
      tileset: Tileset.t
        [@ocaml.doc
          "Specifies the desired tile set. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions support only the vector.basemap value. Valid Values: raster.satellite | vector.basemap | vector.traffic | raster.dem"];
      z: GetTileRequestZString.t
        [@ocaml.doc "The zoom value for the map tile."];
      x: GetTileRequestXString.t
        [@ocaml.doc "The X axis value for the map tile."];
      y: GetTileRequestYString.t
        [@ocaml.doc "The Y axis value for the map tile."];
      key: ApiKey.t option
        [@ocaml.doc
          "Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request."]}
    let context_ = "GetTileRequest"
    let make ?additionalFeatures =
      fun ?key ->
        fun ~tileset ->
          fun ~z ->
            fun ~x ->
              fun ~y ->
                fun () -> { additionalFeatures; key; tileset; z; x; y }
    let to_value x =
      structure_to_value
        [("additional-features",
           (Option.map x.additionalFeatures
              ~f:TileAdditionalFeatureList.to_value));
        ("Tileset", (Some (Tileset.to_value x.tileset)));
        ("Z", (Some (GetTileRequestZString.to_value x.z)));
        ("X", (Some (GetTileRequestXString.to_value x.x)));
        ("Y", (Some (GetTileRequestYString.to_value x.y)));
        ("key", (Option.map x.key ~f:ApiKey.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let key = (Option.map ~f:ApiKey.of_xml) (Xml.child xml_arg0 "key") in
      let y =
        GetTileRequestYString.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "Y") in
      let x =
        GetTileRequestXString.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "X") in
      let z =
        GetTileRequestZString.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "Z") in
      let tileset =
        Tileset.of_xml (Xml.child_exn ~context:context_ xml_arg0 "Tileset") in
      let additionalFeatures =
        (Option.map ~f:TileAdditionalFeatureList.of_xml)
          (Xml.child xml_arg0 "additional-features") in
      make ?key ~y ~x ~z ~tileset ?additionalFeatures ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let key = field_map json__ "Key" ApiKey.of_json in
      let y = field_map_exn json__ "Y" GetTileRequestYString.of_json in
      let x = field_map_exn json__ "X" GetTileRequestXString.of_json in
      let z = field_map_exn json__ "Z" GetTileRequestZString.of_json in
      let tileset = field_map_exn json__ "Tileset" Tileset.of_json in
      let additionalFeatures =
        field_map json__ "AdditionalFeatures"
          TileAdditionalFeatureList.of_json in
      make ?key ~y ~x ~z ~tileset ?additionalFeatures ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "GetTile returns a tile. Map tiles are used by clients to render a map. They're addressed using a grid arrangement with an X coordinate, Y coordinate, and Z (zoom) level. For more information, see Tiles in the Amazon Location Service Developer Guide."]
module GetStyleDescriptorResponse =
  struct
    type nonrec t =
      {
      blob: Blob.t option
        [@ocaml.doc
          "This Blob contains the body of the style descriptor which is in application/json format."];
      contentType: String_.t option
        [@ocaml.doc
          "Header that represents the format of the response. The response returns the following as the HTTP body."];
      cacheControl: String_.t option
        [@ocaml.doc
          "Header that instructs caching configuration for the client."];
      eTag: String_.t option [@ocaml.doc "The style descriptor's Etag."]}
    type nonrec error =
      [ `Unknown_operation_error of (string * string option) ]
    let make ?blob =
      fun ?contentType ->
        fun ?cacheControl ->
          fun ?eTag -> fun () -> { blob; contentType; cacheControl; eTag }
    let error_of_json name json =
      match name with
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `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 ?blob:(Some pipe)
            ?contentType:(Option.map
                            ((List.Assoc.find ~equal:String.Caseless.equal)
                               xs "Content-Type") ~f:String_.of_string)
            ?cacheControl:(Option.map
                             ((List.Assoc.find ~equal:String.Caseless.equal)
                                xs "Cache-Control") ~f:String_.of_string)
            ?eTag:(Option.map
                     ((List.Assoc.find ~equal:String.Caseless.equal) xs
                        "ETag") ~f:String_.of_string) ())
      [@warning "-27"])
    let to_value x =
      structure_to_value
        [("Blob", (Option.map x.blob ~f:Blob.to_value));
        ("Content-Type", (Option.map x.contentType ~f:String_.to_value));
        ("Cache-Control", (Option.map x.cacheControl ~f:String_.to_value));
        ("ETag", (Option.map x.eTag ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let eTag = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "ETag") in
      let cacheControl =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "Cache-Control") in
      let contentType =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "Content-Type") in
      let blob = (Option.map ~f:Blob.of_xml) (Xml.child xml_arg0 "Blob") in
      make ?eTag ?cacheControl ?contentType ?blob ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let eTag = field_map json__ "ETag" String_.of_json in
      let cacheControl = field_map json__ "CacheControl" String_.of_json in
      let contentType = field_map json__ "ContentType" String_.of_json in
      let blob = field_map json__ "Blob" Blob.of_json in
      make ?eTag ?cacheControl ?contentType ?blob ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "GetStyleDescriptor returns information about the style. For more information, see Style dynamic maps in the Amazon Location Service Developer Guide."]
module GetStyleDescriptorRequest =
  struct
    type nonrec t =
      {
      style: MapStyle.t
        [@ocaml.doc
          "Style specifies the desired map style. For GrabMaps customers, ap-southeast-1 and ap-southeast-5 regions support only the Standard and Monochrome values."];
      colorScheme: ColorScheme.t option
        [@ocaml.doc
          "Sets the color tone for the map, such as dark and light. Example: Light Default value: Light Valid values for ColorScheme are case sensitive."];
      politicalView: CountryCode.t option
        [@ocaml.doc
          "Specifies the political view using ISO 3166-2 or ISO 3166-3 country code format. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers. The following political views are currently supported: ARG: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands EGY: Egypt's view on Bir Tawil IND: India's view on Gilgit-Baltistan KEN: Kenya's view on the Ilemi Triangle MAR: Morocco's view on Western Sahara RUS: Russia's view on Crimea SDN: Sudan's view on the Halaib Triangle SRB: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands SUR: Suriname's view on the Courantyne Headwaters and Lawa Headwaters SYR: Syria's view on the Golan Heights TUR: Turkey's view on Cyprus and Northern Cyprus TZA: Tanzania's view on Lake Malawi URY: Uruguay's view on Rincon de Artigas VNM: Vietnam's view on the Paracel Islands and Spratly Islands"];
      terrain: Terrain.t option
        [@ocaml.doc
          "Adjusts how physical terrain details are rendered on the map. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers. The following terrain styles are currently supported: Hillshade: Displays the physical terrain details through shading and highlighting of elevation change and geographic features. Terrain3D: Displays physical terrain details and elevations as a three-dimensional model. Hillshade is valid only for the Standard and Monochrome map styles."];
      contourDensity: ContourDensity.t option
        [@ocaml.doc
          "Displays the shape and steepness of terrain features using elevation lines. The density value controls how densely the available contour line information is rendered on the map. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers. This parameter is valid for all map styles except Satellite."];
      traffic: Traffic.t option
        [@ocaml.doc
          "Displays real-time traffic information overlay on map, such as incident events and flow events. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers. This parameter is valid for all map styles except Satellite."];
      travelModes: TravelModeList.t option
        [@ocaml.doc
          "Renders additional map information relevant to selected travel modes. Information for multiple travel modes can be displayed simultaneously, although this increases the overall information density rendered on the map. Not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers. This parameter is valid for all map styles except Satellite."];
      buildings: Buildings.t option
        [@ocaml.doc
          "Adjusts how building details are rendered on the map. The following building styles are currently supported: Buildings3D: Displays buildings as three-dimensional extrusions on the map. Buildings3D is valid only for the Standard and Monochrome map styles."];
      key: ApiKey.t option
        [@ocaml.doc
          "Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request."]}
    let context_ = "GetStyleDescriptorRequest"
    let make ?colorScheme =
      fun ?politicalView ->
        fun ?terrain ->
          fun ?contourDensity ->
            fun ?traffic ->
              fun ?travelModes ->
                fun ?buildings ->
                  fun ?key ->
                    fun ~style ->
                      fun () ->
                        {
                          colorScheme;
                          politicalView;
                          terrain;
                          contourDensity;
                          traffic;
                          travelModes;
                          buildings;
                          key;
                          style
                        }
    let to_value x =
      structure_to_value
        [("Style", (Some (MapStyle.to_value x.style)));
        ("color-scheme", (Option.map x.colorScheme ~f:ColorScheme.to_value));
        ("political-view",
          (Option.map x.politicalView ~f:CountryCode.to_value));
        ("terrain", (Option.map x.terrain ~f:Terrain.to_value));
        ("contour-density",
          (Option.map x.contourDensity ~f:ContourDensity.to_value));
        ("traffic", (Option.map x.traffic ~f:Traffic.to_value));
        ("travel-modes",
          (Option.map x.travelModes ~f:TravelModeList.to_value));
        ("buildings", (Option.map x.buildings ~f:Buildings.to_value));
        ("key", (Option.map x.key ~f:ApiKey.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let key = (Option.map ~f:ApiKey.of_xml) (Xml.child xml_arg0 "key") in
      let buildings =
        (Option.map ~f:Buildings.of_xml) (Xml.child xml_arg0 "buildings") in
      let travelModes =
        (Option.map ~f:TravelModeList.of_xml)
          (Xml.child xml_arg0 "travel-modes") in
      let traffic =
        (Option.map ~f:Traffic.of_xml) (Xml.child xml_arg0 "traffic") in
      let contourDensity =
        (Option.map ~f:ContourDensity.of_xml)
          (Xml.child xml_arg0 "contour-density") in
      let terrain =
        (Option.map ~f:Terrain.of_xml) (Xml.child xml_arg0 "terrain") in
      let politicalView =
        (Option.map ~f:CountryCode.of_xml)
          (Xml.child xml_arg0 "political-view") in
      let colorScheme =
        (Option.map ~f:ColorScheme.of_xml)
          (Xml.child xml_arg0 "color-scheme") in
      let style =
        MapStyle.of_xml (Xml.child_exn ~context:context_ xml_arg0 "Style") in
      make ?key ?buildings ?travelModes ?traffic ?contourDensity ?terrain
        ?politicalView ?colorScheme ~style ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let key = field_map json__ "Key" ApiKey.of_json in
      let buildings = field_map json__ "Buildings" Buildings.of_json in
      let travelModes = field_map json__ "TravelModes" TravelModeList.of_json in
      let traffic = field_map json__ "Traffic" Traffic.of_json in
      let contourDensity =
        field_map json__ "ContourDensity" ContourDensity.of_json in
      let terrain = field_map json__ "Terrain" Terrain.of_json in
      let politicalView =
        field_map json__ "PoliticalView" CountryCode.of_json in
      let colorScheme = field_map json__ "ColorScheme" ColorScheme.of_json in
      let style = field_map_exn json__ "Style" MapStyle.of_json in
      make ?key ?buildings ?travelModes ?traffic ?contourDensity ?terrain
        ?politicalView ?colorScheme ~style ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "GetStyleDescriptor returns information about the style. For more information, see Style dynamic maps in the Amazon Location Service Developer Guide."]
module GetStaticMapResponse =
  struct
    type nonrec t =
      {
      blob: Blob.t option
        [@ocaml.doc
          "The blob represents a map image as a jpeg for the GetStaticMap API."];
      contentType: String_.t option
        [@ocaml.doc
          "Header that represents the format of the response. The response returns the following as the HTTP body."];
      cacheControl: String_.t option
        [@ocaml.doc
          "Header that instructs caching configuration for the client."];
      eTag: String_.t option [@ocaml.doc "The static map's Etag."];
      pricingBucket: String_.t option
        [@ocaml.doc
          "The pricing bucket for which the request is charged at."]}
    type nonrec error =
      [ `AccessDeniedException of AccessDeniedException.t 
      | `InternalServerException of InternalServerException.t 
      | `ThrottlingException of ThrottlingException.t 
      | `ValidationException of ValidationException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?blob =
      fun ?contentType ->
        fun ?cacheControl ->
          fun ?eTag ->
            fun ?pricingBucket ->
              fun () ->
                { blob; contentType; cacheControl; eTag; pricingBucket }
    let error_of_json name json =
      match name with
      | "AccessDeniedException" ->
          `AccessDeniedException (AccessDeniedException.of_json json)
      | "InternalServerException" ->
          `InternalServerException (InternalServerException.of_json json)
      | "ThrottlingException" ->
          `ThrottlingException (ThrottlingException.of_json json)
      | "ValidationException" ->
          `ValidationException (ValidationException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "AccessDeniedException" ->
          `AccessDeniedException (AccessDeniedException.of_xml xml)
      | "InternalServerException" ->
          `InternalServerException (InternalServerException.of_xml xml)
      | "ThrottlingException" ->
          `ThrottlingException (ThrottlingException.of_xml xml)
      | "ValidationException" ->
          `ValidationException (ValidationException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `AccessDeniedException e ->
          `Assoc
            [("error", (`String "AccessDeniedException"));
            ("details", (AccessDeniedException.to_json e))]
      | `InternalServerException e ->
          `Assoc
            [("error", (`String "InternalServerException"));
            ("details", (InternalServerException.to_json e))]
      | `ThrottlingException e ->
          `Assoc
            [("error", (`String "ThrottlingException"));
            ("details", (ThrottlingException.to_json e))]
      | `ValidationException e ->
          `Assoc
            [("error", (`String "ValidationException"));
            ("details", (ValidationException.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 ?blob:(Some pipe)
            ?contentType:(Option.map
                            ((List.Assoc.find ~equal:String.Caseless.equal)
                               xs "Content-Type") ~f:String_.of_string)
            ?cacheControl:(Option.map
                             ((List.Assoc.find ~equal:String.Caseless.equal)
                                xs "Cache-Control") ~f:String_.of_string)
            ?eTag:(Option.map
                     ((List.Assoc.find ~equal:String.Caseless.equal) xs
                        "ETag") ~f:String_.of_string)
            ?pricingBucket:(Option.map
                              ((List.Assoc.find ~equal:String.Caseless.equal)
                                 xs "x-amz-geo-pricing-bucket")
                              ~f:String_.of_string) ())
      [@warning "-27"])
    let to_value x =
      structure_to_value
        [("Blob", (Option.map x.blob ~f:Blob.to_value));
        ("Content-Type", (Option.map x.contentType ~f:String_.to_value));
        ("Cache-Control", (Option.map x.cacheControl ~f:String_.to_value));
        ("ETag", (Option.map x.eTag ~f:String_.to_value));
        ("x-amz-geo-pricing-bucket",
          (Option.map x.pricingBucket ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let pricingBucket =
        (Option.map ~f:String_.of_xml)
          (Xml.child xml_arg0 "x-amz-geo-pricing-bucket") in
      let eTag = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "ETag") in
      let cacheControl =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "Cache-Control") in
      let contentType =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "Content-Type") in
      let blob = (Option.map ~f:Blob.of_xml) (Xml.child xml_arg0 "Blob") in
      make ?pricingBucket ?eTag ?cacheControl ?contentType ?blob ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let pricingBucket = field_map json__ "PricingBucket" String_.of_json in
      let eTag = field_map json__ "ETag" String_.of_json in
      let cacheControl = field_map json__ "CacheControl" String_.of_json in
      let contentType = field_map json__ "ContentType" String_.of_json in
      let blob = field_map json__ "Blob" Blob.of_json in
      make ?pricingBucket ?eTag ?cacheControl ?contentType ?blob ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "This operation is not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers. GetStaticMap provides high-quality static map images with customizable options. You can modify the map's appearance and overlay additional information. It's an ideal solution for applications requiring tailored static map snapshots. For more information, see the following topics in the Amazon Location Service Developer Guide: Static maps Customize static maps Overlay on the static map"]
module GetStaticMapRequest =
  struct
    type nonrec t =
      {
      boundingBox: GetStaticMapRequestBoundingBoxString.t option
        [@ocaml.doc
          "Takes in two pairs of coordinates in World Geodetic System (WGS 84) format: \\[longitude, latitude\\], denoting south-westerly and north-easterly edges of the image. The underlying area becomes the view of the image. Example: -123.17075,49.26959,-123.08125,49.31429"];
      boundedPositions: GetStaticMapRequestBoundedPositionsString.t option
        [@ocaml.doc
          "Takes in two or more pair of coordinates in World Geodetic System (WGS 84) format: \\[longitude, latitude\\], with each coordinate separated by a comma. The API will generate an image to encompass all of the provided coordinates. Cannot be used with Zoom and or Radius Example: 97.170451,78.039098,99.045536,27.176178"];
      center: PositionString.t option
        [@ocaml.doc
          "Takes in a pair of coordinates in World Geodetic System (WGS 84) format: \\[longitude, latitude\\], which becomes the center point of the image. This parameter requires that either zoom or radius is set. Cannot be used with Zoom and or Radius Example: 49.295,-123.108"];
      colorScheme: ColorScheme.t option
        [@ocaml.doc
          "Sets the color tone for the map, such as dark and light. Example: Light Default value: Light Valid values for ColorScheme are case sensitive."];
      compactOverlay: CompactOverlay.t option
        [@ocaml.doc
          "Takes in a string to draw geometries on the image. The input is a comma separated format as follows format: \\[Lon, Lat\\] Example: line:-122.407653,37.798557,-122.413291,37.802443;color=%23DD0000;width=7;outline-color=#00DD00;outline-width=5yd|point:-122.40572,37.80004;label=Fog Hill Market;size=large;text-color=%23DD0000;color=#EE4B2B Currently it supports the following geometry types: point, line and polygon. It does not support multiPoint , multiLine and multiPolgyon."];
      cropLabels: Boolean.t option
        [@ocaml.doc
          "It is a flag that takes in true or false. It prevents the labels that are on the edge of the image from being cut or obscured."];
      geoJsonOverlay: GeoJsonOverlay.t option
        [@ocaml.doc
          "Takes in a string to draw geometries on the image. The input is a valid GeoJSON collection object. Example: \\{\"type\":\"FeatureCollection\",\"features\": \\[\\{\"type\":\"Feature\",\"geometry\":\\{\"type\":\"MultiPoint\",\"coordinates\": \\[\\[-90.076345,51.504107\\],\\[-0.074451,51.506892\\]\\]\\},\"properties\": \\{\"color\":\"#00DD00\"\\}\\}\\]\\}"];
      height: GetStaticMapRequestHeightInteger.t
        [@ocaml.doc "Specifies the height of the map image."];
      key: ApiKey.t option
        [@ocaml.doc
          "Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request."];
      labelSize: LabelSize.t option
        [@ocaml.doc
          "Overrides the label size auto-calculated by FileName. Takes in one of the values - Small or Large."];
      language: LanguageTag.t option
        [@ocaml.doc
          "Specifies the language on the map labels using the BCP 47 language tag, limited to ISO 639-1 two-letter language codes. If the specified language data isn't available for the map image, the labels will default to the regional primary language. Supported codes: ar as az be bg bn bs ca cs cy da de el en es et eu fi fo fr ga gl gn gu he hi hr hu hy id is it ja ka kk km kn ko ky lt lv mk ml mr ms mt my nl no or pa pl pt ro ru sk sl sq sr sv ta te th tr uk uz vi zh"];
      padding: GetStaticMapRequestPaddingInteger.t option
        [@ocaml.doc
          "Applies additional space (in pixels) around overlay feature to prevent them from being cut or obscured. Value for max and min is determined by: Min: 1 Max: min(height, width)/4 Example: 100"];
      politicalView: CountryCode.t option
        [@ocaml.doc
          "Specifies the political view, using ISO 3166-2 or ISO 3166-3 country code format. The following political views are currently supported: ARG: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands EGY: Egypt's view on Bir Tawil IND: India's view on Gilgit-Baltistan KEN: Kenya's view on the Ilemi Triangle MAR: Morocco's view on Western Sahara RUS: Russia's view on Crimea SDN: Sudan's view on the Halaib Triangle SRB: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands SUR: Suriname's view on the Courantyne Headwaters and Lawa Headwaters SYR: Syria's view on the Golan Heights TUR: Turkey's view on Cyprus and Northern Cyprus TZA: Tanzania's view on Lake Malawi URY: Uruguay's view on Rincon de Artigas VNM: Vietnam's view on the Paracel Islands and Spratly Islands"];
      pointsOfInterests: MapFeatureMode.t option
        [@ocaml.doc
          "Determines if the result image will display icons representing points of interest on the map."];
      radius: DistanceMeters.t option
        [@ocaml.doc
          "Used with center parameter, it specifies the zoom of the image where you can control it on a granular level. Takes in any value >= 1. Example: 1500 Cannot be used with Zoom. Unit: Meters"];
      fileName: GetStaticMapRequestFileNameString.t
        [@ocaml.doc
          "The map scaling parameter to size the image, icons, and labels. It follows the pattern of ^map(\\@2x)?$. Example: map, map\\@2x"];
      scaleBarUnit: ScaleBarUnit.t option
        [@ocaml.doc
          "Displays a scale on the bottom right of the map image with the unit specified in the input. Example: KilometersMiles, Miles, Kilometers, MilesKilometers"];
      style: StaticMapStyle.t option
        [@ocaml.doc "Style specifies the desired map style."];
      width: GetStaticMapRequestWidthInteger.t
        [@ocaml.doc "Specifies the width of the map image."];
      zoom: GetStaticMapRequestZoomFloat.t option
        [@ocaml.doc
          "Specifies the zoom level of the map image. Cannot be used with Radius."]}
    let context_ = "GetStaticMapRequest"
    let make ?boundingBox =
      fun ?boundedPositions ->
        fun ?center ->
          fun ?colorScheme ->
            fun ?compactOverlay ->
              fun ?cropLabels ->
                fun ?geoJsonOverlay ->
                  fun ?key ->
                    fun ?labelSize ->
                      fun ?language ->
                        fun ?padding ->
                          fun ?politicalView ->
                            fun ?pointsOfInterests ->
                              fun ?radius ->
                                fun ?scaleBarUnit ->
                                  fun ?style ->
                                    fun ?zoom ->
                                      fun ~height ->
                                        fun ~fileName ->
                                          fun ~width ->
                                            fun () ->
                                              {
                                                boundingBox;
                                                boundedPositions;
                                                center;
                                                colorScheme;
                                                compactOverlay;
                                                cropLabels;
                                                geoJsonOverlay;
                                                key;
                                                labelSize;
                                                language;
                                                padding;
                                                politicalView;
                                                pointsOfInterests;
                                                radius;
                                                scaleBarUnit;
                                                style;
                                                zoom;
                                                height;
                                                fileName;
                                                width
                                              }
    let to_value x =
      structure_to_value
        [("bounding-box",
           (Option.map x.boundingBox
              ~f:GetStaticMapRequestBoundingBoxString.to_value));
        ("bounded-positions",
          (Option.map x.boundedPositions
             ~f:GetStaticMapRequestBoundedPositionsString.to_value));
        ("center", (Option.map x.center ~f:PositionString.to_value));
        ("color-scheme", (Option.map x.colorScheme ~f:ColorScheme.to_value));
        ("compact-overlay",
          (Option.map x.compactOverlay ~f:CompactOverlay.to_value));
        ("crop-labels", (Option.map x.cropLabels ~f:Boolean.to_value));
        ("geojson-overlay",
          (Option.map x.geoJsonOverlay ~f:GeoJsonOverlay.to_value));
        ("height",
          (Some (GetStaticMapRequestHeightInteger.to_value x.height)));
        ("key", (Option.map x.key ~f:ApiKey.to_value));
        ("label-size", (Option.map x.labelSize ~f:LabelSize.to_value));
        ("lang", (Option.map x.language ~f:LanguageTag.to_value));
        ("padding",
          (Option.map x.padding ~f:GetStaticMapRequestPaddingInteger.to_value));
        ("political-view",
          (Option.map x.politicalView ~f:CountryCode.to_value));
        ("pois", (Option.map x.pointsOfInterests ~f:MapFeatureMode.to_value));
        ("radius", (Option.map x.radius ~f:DistanceMeters.to_value));
        ("FileName",
          (Some (GetStaticMapRequestFileNameString.to_value x.fileName)));
        ("scale-unit", (Option.map x.scaleBarUnit ~f:ScaleBarUnit.to_value));
        ("style", (Option.map x.style ~f:StaticMapStyle.to_value));
        ("width", (Some (GetStaticMapRequestWidthInteger.to_value x.width)));
        ("zoom",
          (Option.map x.zoom ~f:GetStaticMapRequestZoomFloat.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let zoom =
        (Option.map ~f:GetStaticMapRequestZoomFloat.of_xml)
          (Xml.child xml_arg0 "zoom") in
      let width =
        GetStaticMapRequestWidthInteger.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "width") in
      let style =
        (Option.map ~f:StaticMapStyle.of_xml) (Xml.child xml_arg0 "style") in
      let scaleBarUnit =
        (Option.map ~f:ScaleBarUnit.of_xml) (Xml.child xml_arg0 "scale-unit") in
      let fileName =
        GetStaticMapRequestFileNameString.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "FileName") in
      let radius =
        (Option.map ~f:DistanceMeters.of_xml) (Xml.child xml_arg0 "radius") in
      let pointsOfInterests =
        (Option.map ~f:MapFeatureMode.of_xml) (Xml.child xml_arg0 "pois") in
      let politicalView =
        (Option.map ~f:CountryCode.of_xml)
          (Xml.child xml_arg0 "political-view") in
      let padding =
        (Option.map ~f:GetStaticMapRequestPaddingInteger.of_xml)
          (Xml.child xml_arg0 "padding") in
      let language =
        (Option.map ~f:LanguageTag.of_xml) (Xml.child xml_arg0 "lang") in
      let labelSize =
        (Option.map ~f:LabelSize.of_xml) (Xml.child xml_arg0 "label-size") in
      let key = (Option.map ~f:ApiKey.of_xml) (Xml.child xml_arg0 "key") in
      let height =
        GetStaticMapRequestHeightInteger.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "height") in
      let geoJsonOverlay =
        (Option.map ~f:GeoJsonOverlay.of_xml)
          (Xml.child xml_arg0 "geojson-overlay") in
      let cropLabels =
        (Option.map ~f:Boolean.of_xml) (Xml.child xml_arg0 "crop-labels") in
      let compactOverlay =
        (Option.map ~f:CompactOverlay.of_xml)
          (Xml.child xml_arg0 "compact-overlay") in
      let colorScheme =
        (Option.map ~f:ColorScheme.of_xml)
          (Xml.child xml_arg0 "color-scheme") in
      let center =
        (Option.map ~f:PositionString.of_xml) (Xml.child xml_arg0 "center") in
      let boundedPositions =
        (Option.map ~f:GetStaticMapRequestBoundedPositionsString.of_xml)
          (Xml.child xml_arg0 "bounded-positions") in
      let boundingBox =
        (Option.map ~f:GetStaticMapRequestBoundingBoxString.of_xml)
          (Xml.child xml_arg0 "bounding-box") in
      make ?zoom ~width ?style ?scaleBarUnit ~fileName ?radius
        ?pointsOfInterests ?politicalView ?padding ?language ?labelSize ?key
        ~height ?geoJsonOverlay ?cropLabels ?compactOverlay ?colorScheme
        ?center ?boundedPositions ?boundingBox ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let zoom = field_map json__ "Zoom" GetStaticMapRequestZoomFloat.of_json in
      let width =
        field_map_exn json__ "Width" GetStaticMapRequestWidthInteger.of_json in
      let style = field_map json__ "Style" StaticMapStyle.of_json in
      let scaleBarUnit = field_map json__ "ScaleBarUnit" ScaleBarUnit.of_json in
      let fileName =
        field_map_exn json__ "FileName"
          GetStaticMapRequestFileNameString.of_json in
      let radius = field_map json__ "Radius" DistanceMeters.of_json in
      let pointsOfInterests =
        field_map json__ "PointsOfInterests" MapFeatureMode.of_json in
      let politicalView =
        field_map json__ "PoliticalView" CountryCode.of_json in
      let padding =
        field_map json__ "Padding" GetStaticMapRequestPaddingInteger.of_json in
      let language = field_map json__ "Language" LanguageTag.of_json in
      let labelSize = field_map json__ "LabelSize" LabelSize.of_json in
      let key = field_map json__ "Key" ApiKey.of_json in
      let height =
        field_map_exn json__ "Height"
          GetStaticMapRequestHeightInteger.of_json in
      let geoJsonOverlay =
        field_map json__ "GeoJsonOverlay" GeoJsonOverlay.of_json in
      let cropLabels = field_map json__ "CropLabels" Boolean.of_json in
      let compactOverlay =
        field_map json__ "CompactOverlay" CompactOverlay.of_json in
      let colorScheme = field_map json__ "ColorScheme" ColorScheme.of_json in
      let center = field_map json__ "Center" PositionString.of_json in
      let boundedPositions =
        field_map json__ "BoundedPositions"
          GetStaticMapRequestBoundedPositionsString.of_json in
      let boundingBox =
        field_map json__ "BoundingBox"
          GetStaticMapRequestBoundingBoxString.of_json in
      make ?zoom ~width ?style ?scaleBarUnit ~fileName ?radius
        ?pointsOfInterests ?politicalView ?padding ?language ?labelSize ?key
        ~height ?geoJsonOverlay ?cropLabels ?compactOverlay ?colorScheme
        ?center ?boundedPositions ?boundingBox ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "This operation is not supported in ap-southeast-1 and ap-southeast-5 regions for GrabMaps customers. GetStaticMap provides high-quality static map images with customizable options. You can modify the map's appearance and overlay additional information. It's an ideal solution for applications requiring tailored static map snapshots. For more information, see the following topics in the Amazon Location Service Developer Guide: Static maps Customize static maps Overlay on the static map"]
module GetSpritesResponse =
  struct
    type nonrec t =
      {
      blob: Blob.t option
        [@ocaml.doc
          "The body of the sprite sheet or JSON offset file (image/png or application/json, depending on input)."];
      contentType: String_.t option
        [@ocaml.doc
          "Header that represents the format of the response. The response returns the following as the HTTP body."];
      cacheControl: String_.t option
        [@ocaml.doc
          "Header that instructs caching configuration for the client."];
      eTag: String_.t option [@ocaml.doc "The sprite's Etag."]}
    type nonrec error =
      [ `Unknown_operation_error of (string * string option) ]
    let make ?blob =
      fun ?contentType ->
        fun ?cacheControl ->
          fun ?eTag -> fun () -> { blob; contentType; cacheControl; eTag }
    let error_of_json name json =
      match name with
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `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 ?blob:(Some pipe)
            ?contentType:(Option.map
                            ((List.Assoc.find ~equal:String.Caseless.equal)
                               xs "Content-Type") ~f:String_.of_string)
            ?cacheControl:(Option.map
                             ((List.Assoc.find ~equal:String.Caseless.equal)
                                xs "Cache-Control") ~f:String_.of_string)
            ?eTag:(Option.map
                     ((List.Assoc.find ~equal:String.Caseless.equal) xs
                        "ETag") ~f:String_.of_string) ())
      [@warning "-27"])
    let to_value x =
      structure_to_value
        [("Blob", (Option.map x.blob ~f:Blob.to_value));
        ("Content-Type", (Option.map x.contentType ~f:String_.to_value));
        ("Cache-Control", (Option.map x.cacheControl ~f:String_.to_value));
        ("ETag", (Option.map x.eTag ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let eTag = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "ETag") in
      let cacheControl =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "Cache-Control") in
      let contentType =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "Content-Type") in
      let blob = (Option.map ~f:Blob.of_xml) (Xml.child xml_arg0 "Blob") in
      make ?eTag ?cacheControl ?contentType ?blob ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let eTag = field_map json__ "ETag" String_.of_json in
      let cacheControl = field_map json__ "CacheControl" String_.of_json in
      let contentType = field_map json__ "ContentType" String_.of_json in
      let blob = field_map json__ "Blob" Blob.of_json in
      make ?eTag ?cacheControl ?contentType ?blob ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "GetSprites returns the map's sprites. For more information, see Style iconography with sprites in the Amazon Location Service Developer Guide."]
module GetSpritesRequest =
  struct
    type nonrec t =
      {
      fileName: GetSpritesRequestFileNameString.t
        [@ocaml.doc
          "Sprites API: The name of the sprite \239\172\129le to retrieve, following pattern sprites(\\@2x)?\\.(png|json). Example: sprites.png"];
      style: MapStyle.t
        [@ocaml.doc
          "Style specifies the desired map style for the Sprites APIs."];
      colorScheme: ColorScheme.t
        [@ocaml.doc
          "Sets the color tone for the map sprites, such as dark and light. Example: Light Default value: Light Valid values for ColorScheme are case sensitive."];
      variant: Variant.t
        [@ocaml.doc
          "Optimizes map styles for specific use case or industry. You can choose allowed variant only with Standard map style. Example: Default Valid values for Variant are case sensitive."]}
    let context_ = "GetSpritesRequest"
    let make ~fileName =
      fun ~style ->
        fun ~colorScheme ->
          fun ~variant -> fun () -> { fileName; style; colorScheme; variant }
    let to_value x =
      structure_to_value
        [("FileName",
           (Some (GetSpritesRequestFileNameString.to_value x.fileName)));
        ("Style", (Some (MapStyle.to_value x.style)));
        ("ColorScheme", (Some (ColorScheme.to_value x.colorScheme)));
        ("Variant", (Some (Variant.to_value x.variant)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let variant =
        Variant.of_xml (Xml.child_exn ~context:context_ xml_arg0 "Variant") in
      let colorScheme =
        ColorScheme.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "ColorScheme") in
      let style =
        MapStyle.of_xml (Xml.child_exn ~context:context_ xml_arg0 "Style") in
      let fileName =
        GetSpritesRequestFileNameString.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "FileName") in
      make ~variant ~colorScheme ~style ~fileName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let variant = field_map_exn json__ "Variant" Variant.of_json in
      let colorScheme =
        field_map_exn json__ "ColorScheme" ColorScheme.of_json in
      let style = field_map_exn json__ "Style" MapStyle.of_json in
      let fileName =
        field_map_exn json__ "FileName"
          GetSpritesRequestFileNameString.of_json in
      make ~variant ~colorScheme ~style ~fileName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "GetSprites returns the map's sprites. For more information, see Style iconography with sprites in the Amazon Location Service Developer Guide."]
module GetGlyphsResponse =
  struct
    type nonrec t =
      {
      blob: Blob.t option [@ocaml.doc "The Glyph, as a binary blob."];
      contentType: String_.t option
        [@ocaml.doc
          "Header that represents the format of the response. The response returns the following as the HTTP body."];
      cacheControl: String_.t option
        [@ocaml.doc
          "Header that instructs caching configuration for the client."];
      eTag: String_.t option [@ocaml.doc "The glyph's Etag."]}
    type nonrec error =
      [ `Unknown_operation_error of (string * string option) ]
    let make ?blob =
      fun ?contentType ->
        fun ?cacheControl ->
          fun ?eTag -> fun () -> { blob; contentType; cacheControl; eTag }
    let error_of_json name json =
      match name with
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `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 ?blob:(Some pipe)
            ?contentType:(Option.map
                            ((List.Assoc.find ~equal:String.Caseless.equal)
                               xs "Content-Type") ~f:String_.of_string)
            ?cacheControl:(Option.map
                             ((List.Assoc.find ~equal:String.Caseless.equal)
                                xs "Cache-Control") ~f:String_.of_string)
            ?eTag:(Option.map
                     ((List.Assoc.find ~equal:String.Caseless.equal) xs
                        "ETag") ~f:String_.of_string) ())
      [@warning "-27"])
    let to_value x =
      structure_to_value
        [("Blob", (Option.map x.blob ~f:Blob.to_value));
        ("Content-Type", (Option.map x.contentType ~f:String_.to_value));
        ("Cache-Control", (Option.map x.cacheControl ~f:String_.to_value));
        ("ETag", (Option.map x.eTag ~f:String_.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let eTag = (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "ETag") in
      let cacheControl =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "Cache-Control") in
      let contentType =
        (Option.map ~f:String_.of_xml) (Xml.child xml_arg0 "Content-Type") in
      let blob = (Option.map ~f:Blob.of_xml) (Xml.child xml_arg0 "Blob") in
      make ?eTag ?cacheControl ?contentType ?blob ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let eTag = field_map json__ "ETag" String_.of_json in
      let cacheControl = field_map json__ "CacheControl" String_.of_json in
      let contentType = field_map json__ "ContentType" String_.of_json in
      let blob = field_map json__ "Blob" Blob.of_json in
      make ?eTag ?cacheControl ?contentType ?blob ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "GetGlyphs returns the map's glyphs. For more information, see Style labels with glyphs in the Amazon Location Service Developer Guide."]
module GetGlyphsRequest =
  struct
    type nonrec t =
      {
      fontStack: GetGlyphsRequestFontStackString.t
        [@ocaml.doc
          "Name of the FontStack to retrieve. Example: Amazon Ember Bold,Noto Sans Bold. The supported font stacks are as follows: Amazon Ember Bold Amazon Ember Bold Italic Amazon Ember Bold,Noto Sans Bold Amazon Ember Bold,Noto Sans Bold,Noto Sans Arabic Bold Amazon Ember Condensed RC BdItalic Amazon Ember Condensed RC Bold Amazon Ember Condensed RC Bold Italic Amazon Ember Condensed RC Bold,Noto Sans Bold Amazon Ember Condensed RC Bold,Noto Sans Bold,Noto Sans Arabic Condensed Bold Amazon Ember Condensed RC Light Amazon Ember Condensed RC Light Italic Amazon Ember Condensed RC LtItalic Amazon Ember Condensed RC Regular Amazon Ember Condensed RC Regular Italic Amazon Ember Condensed RC Regular,Noto Sans Regular Amazon Ember Condensed RC Regular,Noto Sans Regular,Noto Sans Arabic Condensed Regular Amazon Ember Condensed RC RgItalic Amazon Ember Condensed RC ThItalic Amazon Ember Condensed RC Thin Amazon Ember Condensed RC Thin Italic Amazon Ember Heavy Amazon Ember Heavy Italic Amazon Ember Light Amazon Ember Light Italic Amazon Ember Medium Amazon Ember Medium Italic Amazon Ember Medium,Noto Sans Medium Amazon Ember Medium,Noto Sans Medium,Noto Sans Arabic Medium Amazon Ember Regular Amazon Ember Regular Italic Amazon Ember Regular Italic,Noto Sans Italic Amazon Ember Regular Italic,Noto Sans Italic,Noto Sans Arabic Regular Amazon Ember Regular,Noto Sans Regular Amazon Ember Regular,Noto Sans Regular,Noto Sans Arabic Regular Amazon Ember Thin Amazon Ember Thin Italic AmazonEmberCdRC_Bd AmazonEmberCdRC_BdIt AmazonEmberCdRC_Lt AmazonEmberCdRC_LtIt AmazonEmberCdRC_Rg AmazonEmberCdRC_RgIt AmazonEmberCdRC_Th AmazonEmberCdRC_ThIt AmazonEmber_Bd AmazonEmber_BdIt AmazonEmber_He AmazonEmber_HeIt AmazonEmber_Lt AmazonEmber_LtIt AmazonEmber_Md AmazonEmber_MdIt AmazonEmber_Rg AmazonEmber_RgIt AmazonEmber_Th AmazonEmber_ThIt Noto Sans Black Noto Sans Black Italic Noto Sans Bold Noto Sans Bold Italic Noto Sans Extra Bold Noto Sans Extra Bold Italic Noto Sans Extra Light Noto Sans Extra Light Italic Noto Sans Italic Noto Sans Light Noto Sans Light Italic Noto Sans Medium Noto Sans Medium Italic Noto Sans Regular Noto Sans Semi Bold Noto Sans Semi Bold Italic Noto Sans Thin Noto Sans Thin Italic NotoSans-Bold NotoSans-Italic NotoSans-Medium NotoSans-Regular Open Sans Regular,Arial Unicode MS Regular"];
      fontUnicodeRange: GetGlyphsRequestFontUnicodeRangeString.t
        [@ocaml.doc
          "A Unicode range of characters to download glyphs for. This must be aligned to multiples of 256. Example: 0-255.pbf"]}
    let context_ = "GetGlyphsRequest"
    let make ~fontStack =
      fun ~fontUnicodeRange -> fun () -> { fontStack; fontUnicodeRange }
    let to_value x =
      structure_to_value
        [("FontStack",
           (Some (GetGlyphsRequestFontStackString.to_value x.fontStack)));
        ("FontUnicodeRange",
          (Some
             (GetGlyphsRequestFontUnicodeRangeString.to_value
                x.fontUnicodeRange)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let fontUnicodeRange =
        GetGlyphsRequestFontUnicodeRangeString.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "FontUnicodeRange") in
      let fontStack =
        GetGlyphsRequestFontStackString.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "FontStack") in
      make ~fontUnicodeRange ~fontStack ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let fontUnicodeRange =
        field_map_exn json__ "FontUnicodeRange"
          GetGlyphsRequestFontUnicodeRangeString.of_json in
      let fontStack =
        field_map_exn json__ "FontStack"
          GetGlyphsRequestFontStackString.of_json in
      make ~fontUnicodeRange ~fontStack ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "GetGlyphs returns the map's glyphs. For more information, see Style labels with glyphs in the Amazon Location Service Developer Guide."]