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
(* 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.simpledbv2
let apiVersion = "2025-09-26"
let endpointPrefix = "sdb"
let serviceFullName = "Amazon SimpleDB 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 DomainName =
  struct
    type nonrec t = string[@@ocaml.doc
                            "The domain name that uniquely identifies a SimpleDB domain within your account."]
    let context_ = "DomainName"
    let make i =
      let open Result in ok_or_failwith (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:"DomainName" j
    let to_json = simple_to_json to_value
  end[@@ocaml.doc
       "The domain name that uniquely identifies a SimpleDB domain within your account."]
module ExportArn =
  struct
    type nonrec t = string[@@ocaml.doc
                            "A unique ARN identifier for the export."]
    let context_ = "ExportArn"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:2048) >>=
             (fun () -> check_string_min i ~min:20));
        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:"ExportArn" j
    let to_json = simple_to_json to_value
  end[@@ocaml.doc "A unique ARN identifier for the export."]
module ExportStatus =
  struct
    type nonrec t =
      | PENDING 
      | IN_PROGRESS 
      | SUCCEEDED 
      | FAILED 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function
      | PENDING -> "PENDING"
      | IN_PROGRESS -> "IN_PROGRESS"
      | SUCCEEDED -> "SUCCEEDED"
      | FAILED -> "FAILED"
      | Non_static_id s -> s
    let of_string =
      function
      | "PENDING" -> PENDING
      | "IN_PROGRESS" -> IN_PROGRESS
      | "SUCCEEDED" -> SUCCEEDED
      | "FAILED" -> FAILED
      | x -> Non_static_id x
    let to_value x = `Enum (to_string x)
    let to_query v = to_query to_value v
    let to_header x = to_string x
    let of_xml xml_arg0 =
      of_string (string_of_xml ~kind:"enumeration ExportStatus" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"ExportStatus" j)
    let to_json = simple_to_json to_value
  end
module RequestedAt =
  struct
    type nonrec t = string[@@ocaml.doc
                            "Timestamp when the export (or any other operation) was requested."]
    let make i = i
    let of_string x = x
    let to_value x = `Timestamp x
    let to_query v = to_query to_value v
    let to_header x = x
    let of_xml = string_of_xml ~kind:"a timestamp"
    let of_json = timestamp_of_json
    let to_json = simple_to_json to_value
  end[@@ocaml.doc
       "Timestamp when the export (or any other operation) was requested."]
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 ExportSummary =
  struct
    type nonrec t =
      {
      exportArn: ExportArn.t option
        [@ocaml.doc "Unique ARN identifier of the export."];
      exportStatus: ExportStatus.t option
        [@ocaml.doc
          "The current state of the export. Current possible values include : PENDING - export request received, IN_PROGRESS - export is being processed, SUCCEEDED - export completed successfully, and FAILED - export encountered an error."];
      requestedAt: RequestedAt.t option
        [@ocaml.doc
          "Timestamp when the export request was received by the service"];
      domainName: DomainName.t option
        [@ocaml.doc
          "The name of the domain for which the export was created."]}
    let make ?exportArn =
      fun ?exportStatus ->
        fun ?requestedAt ->
          fun ?domainName ->
            fun () -> { exportArn; exportStatus; requestedAt; domainName }
    let to_value x =
      structure_to_value
        [("exportArn", (Option.map x.exportArn ~f:ExportArn.to_value));
        ("exportStatus",
          (Option.map x.exportStatus ~f:ExportStatus.to_value));
        ("requestedAt", (Option.map x.requestedAt ~f:RequestedAt.to_value));
        ("domainName", (Option.map x.domainName ~f:DomainName.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let domainName =
        (Option.map ~f:DomainName.of_xml) (Xml.child xml_arg0 "domainName") in
      let requestedAt =
        (Option.map ~f:RequestedAt.of_xml) (Xml.child xml_arg0 "requestedAt") in
      let exportStatus =
        (Option.map ~f:ExportStatus.of_xml)
          (Xml.child xml_arg0 "exportStatus") in
      let exportArn =
        (Option.map ~f:ExportArn.of_xml) (Xml.child xml_arg0 "exportArn") in
      make ?domainName ?requestedAt ?exportStatus ?exportArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let domainName = field_map json__ "domainName" DomainName.of_json in
      let requestedAt = field_map json__ "requestedAt" RequestedAt.of_json in
      let exportStatus = field_map json__ "exportStatus" ExportStatus.of_json in
      let exportArn = field_map json__ "exportArn" ExportArn.of_json in
      make ?domainName ?requestedAt ?exportStatus ?exportArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Summary information about an export, including its unique identifier, current status, creation time, and the domain being exported."]
module ConflictException =
  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
       "Indicates a conflict with one or more parameters of the request."]
module IdempotencyToken =
  struct
    type nonrec t = string
    let context_ = "IdempotencyToken"
    let make i =
      let open Result in ok_or_failwith (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:"IdempotencyToken" j
    let to_json = simple_to_json to_value
  end
module InvalidParameterCombinationException =
  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
       "Parameters that must not be used together were used together in the request."]
module InvalidParameterValueException =
  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 specified parameter value is not valid."]
module NoSuchDomainException =
  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 specified domain does not exist."]
module NumberExportsLimitExceeded =
  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 "Cannot start export as export quota limit was exceeded"]
module AwsAccountId =
  struct
    type nonrec t = string
    let context_ = "AwsAccountId"
    let make i =
      let open Result in
        ok_or_failwith (check_pattern i ~pattern:"[0-9]{12}"); 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:"AwsAccountId" j
    let to_json = simple_to_json to_value
  end
module S3BucketName =
  struct
    type nonrec t = string
    let context_ = "S3BucketName"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_min i ~min:3) >>=
             (fun () ->
                (check_string_max i ~max:255) >>=
                  (fun () ->
                     check_pattern i
                       ~pattern:"[a-z0-9A-Z]+[\\.\\-\\w]*[a-z0-9A-Z]+")));
        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:"S3BucketName" j
    let to_json = simple_to_json to_value
  end
module S3KeyPrefix =
  struct
    type nonrec t = string
    let context_ = "S3KeyPrefix"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:850) >>=
             (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:"S3KeyPrefix" j
    let to_json = simple_to_json to_value
  end
module S3SseAlgorithm =
  struct
    type nonrec t =
      | AES256 
      | KMS 
      | Non_static_id of string 
    let make i = i
    let to_string =
      function | AES256 -> "AES256" | KMS -> "KMS" | Non_static_id s -> s
    let of_string =
      function | "AES256" -> AES256 | "KMS" -> KMS | 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 S3SseAlgorithm" xml_arg0)
    let of_json j = of_string (string_of_json ~kind:"S3SseAlgorithm" j)
    let to_json = simple_to_json to_value
  end
module S3SseKmsKeyId =
  struct
    type nonrec t = string
    let context_ = "S3SseKmsKeyId"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:2048) >>=
             (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:"S3SseKmsKeyId" j
    let to_json = simple_to_json to_value
  end
module ExportSummaries =
  struct
    type nonrec t = ExportSummary.t list
    let make i =
      let open Result in ok_or_failwith (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:ExportSummary.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:ExportSummary.of_xml)
    let of_json j =
      list_of_json ~kind:"ExportSummaries" ~of_json:ExportSummary.of_json j
    let to_json v = composed_to_json to_value v
  end
module InvalidNextTokenException =
  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 specified next token is not valid."]
module NextToken =
  struct
    type nonrec t = string[@@ocaml.doc
                            "A pagination token used for retrieving subsequent pages of results."]
    let context_ = "NextToken"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_max i ~max:2048) >>=
             (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:"NextToken" j
    let to_json = simple_to_json to_value
  end[@@ocaml.doc
       "A pagination token used for retrieving subsequent pages of results."]
module MaxResults =
  struct
    type nonrec t = int[@@ocaml.doc
                         "The maximum number of results to return in a single response. Note: The actual number of results returned might be less than the specified maxResults."]
    let make i =
      let open Result in ok_or_failwith (check_int_min i ~min:1); 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 MaxResults" 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[@@ocaml.doc
       "The maximum number of results to return in a single response. Note: The actual number of results returned might be less than the specified maxResults."]
module ExportDataCutoffTime =
  struct
    type nonrec t = string
    let make i = i
    let of_string x = x
    let to_value x = `Timestamp x
    let to_query v = to_query to_value v
    let to_header x = x
    let of_xml = string_of_xml ~kind:"a timestamp"
    let of_json = timestamp_of_json
    let to_json = simple_to_json to_value
  end
module ExportManifestSummary =
  struct
    type nonrec t = string
    let context_ = "ExportManifestSummary"
    let make i =
      let open Result in ok_or_failwith (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:"ExportManifestSummary" j
    let to_json = simple_to_json to_value
  end
module FailureCode =
  struct
    type nonrec t = string
    let context_ = "FailureCode"
    let make i =
      let open Result in
        ok_or_failwith
          ((check_string_min i ~min:1) >>=
             (fun () -> check_pattern i ~pattern:"[a-zA-Z0-9]+"));
        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:"FailureCode" j
    let to_json = simple_to_json to_value
  end
module FailureMessage =
  struct
    type nonrec t = string
    let context_ = "FailureMessage"
    let make i =
      let open Result in ok_or_failwith (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:"FailureMessage" j
    let to_json = simple_to_json to_value
  end
module ItemsCount =
  struct
    type nonrec t = Int64.t
    let make i =
      let open Result in ok_or_failwith (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 NoSuchExportException =
  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 "Export with specified ARN does not exist."]
module StartDomainExportResponse =
  struct
    type nonrec t =
      {
      clientToken: IdempotencyToken.t option
        [@ocaml.doc "The client token that was provided in the request."];
      exportArn: ExportArn.t option
        [@ocaml.doc "Unique ARN identifier of the export."];
      requestedAt: RequestedAt.t option
        [@ocaml.doc
          "Timestamp when the export request was received by the service."]}
    type nonrec error =
      [ `ConflictException of ConflictException.t 
      | `InvalidParameterCombinationException of
          InvalidParameterCombinationException.t 
      | `InvalidParameterValueException of InvalidParameterValueException.t 
      | `NoSuchDomainException of NoSuchDomainException.t 
      | `NumberExportsLimitExceeded of NumberExportsLimitExceeded.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?clientToken =
      fun ?exportArn ->
        fun ?requestedAt -> fun () -> { clientToken; exportArn; requestedAt }
    let error_of_json name json =
      match name with
      | "ConflictException" ->
          `ConflictException (ConflictException.of_json json)
      | "InvalidParameterCombinationException" ->
          `InvalidParameterCombinationException
            (InvalidParameterCombinationException.of_json json)
      | "InvalidParameterValueException" ->
          `InvalidParameterValueException
            (InvalidParameterValueException.of_json json)
      | "NoSuchDomainException" ->
          `NoSuchDomainException (NoSuchDomainException.of_json json)
      | "NumberExportsLimitExceeded" ->
          `NumberExportsLimitExceeded
            (NumberExportsLimitExceeded.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "ConflictException" ->
          `ConflictException (ConflictException.of_xml xml)
      | "InvalidParameterCombinationException" ->
          `InvalidParameterCombinationException
            (InvalidParameterCombinationException.of_xml xml)
      | "InvalidParameterValueException" ->
          `InvalidParameterValueException
            (InvalidParameterValueException.of_xml xml)
      | "NoSuchDomainException" ->
          `NoSuchDomainException (NoSuchDomainException.of_xml xml)
      | "NumberExportsLimitExceeded" ->
          `NumberExportsLimitExceeded (NumberExportsLimitExceeded.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `ConflictException e ->
          `Assoc
            [("error", (`String "ConflictException"));
            ("details", (ConflictException.to_json e))]
      | `InvalidParameterCombinationException e ->
          `Assoc
            [("error", (`String "InvalidParameterCombinationException"));
            ("details", (InvalidParameterCombinationException.to_json e))]
      | `InvalidParameterValueException e ->
          `Assoc
            [("error", (`String "InvalidParameterValueException"));
            ("details", (InvalidParameterValueException.to_json e))]
      | `NoSuchDomainException e ->
          `Assoc
            [("error", (`String "NoSuchDomainException"));
            ("details", (NoSuchDomainException.to_json e))]
      | `NumberExportsLimitExceeded e ->
          `Assoc
            [("error", (`String "NumberExportsLimitExceeded"));
            ("details", (NumberExportsLimitExceeded.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("clientToken",
           (Option.map x.clientToken ~f:IdempotencyToken.to_value));
        ("exportArn", (Option.map x.exportArn ~f:ExportArn.to_value));
        ("requestedAt", (Option.map x.requestedAt ~f:RequestedAt.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let requestedAt =
        (Option.map ~f:RequestedAt.of_xml) (Xml.child xml_arg0 "requestedAt") in
      let exportArn =
        (Option.map ~f:ExportArn.of_xml) (Xml.child xml_arg0 "exportArn") in
      let clientToken =
        (Option.map ~f:IdempotencyToken.of_xml)
          (Xml.child xml_arg0 "clientToken") in
      make ?requestedAt ?exportArn ?clientToken ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let requestedAt = field_map json__ "requestedAt" RequestedAt.of_json in
      let exportArn = field_map json__ "exportArn" ExportArn.of_json in
      let clientToken =
        field_map json__ "clientToken" IdempotencyToken.of_json in
      make ?requestedAt ?exportArn ?clientToken ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Initiates the export of a SimpleDB domain to an S3 bucket."]
module StartDomainExportRequest =
  struct
    type nonrec t =
      {
      clientToken: IdempotencyToken.t option
        [@ocaml.doc
          "Providing a ClientToken makes the call to StartDomainExport API idempotent, meaning that multiple identical calls have the same effect as one single call. A client token is valid for 8 hours after the first request that uses it is completed. After 8 hours, any request with the same client token is treated as a new request. Do not resubmit the same request with the same client token for more than 8 hours, or the result might not be idempotent. If you submit a request with the same client token but a change in other parameters within the 8-hour idempotency window, a ConflictException will be returned."];
      domainName: DomainName.t
        [@ocaml.doc "The name of the domain to export."];
      s3Bucket: S3BucketName.t
        [@ocaml.doc
          "The name of the S3 bucket where the domain data will be exported."];
      s3KeyPrefix: S3KeyPrefix.t option
        [@ocaml.doc
          "The prefix string to be used to generate the S3 object keys for export artifacts."];
      s3SseAlgorithm: S3SseAlgorithm.t option
        [@ocaml.doc
          "The server-side encryption algorithm to use for the exported data in S3. Valid values are: AES256 (SSE-S3) and KMS (SSE-KMS). If not specified, bucket's default encryption will apply."];
      s3SseKmsKeyId: S3SseKmsKeyId.t option
        [@ocaml.doc
          "The KMS key ID to use for server-side encryption with AWS KMS-managed keys (SSE-KMS). This parameter is only expected with KMS as the S3 SSE algorithm."];
      s3BucketOwner: AwsAccountId.t option
        [@ocaml.doc
          "The ID of the AWS account that owns the bucket the export will be stored in."]}
    let context_ = "StartDomainExportRequest"
    let make ?clientToken =
      fun ?s3KeyPrefix ->
        fun ?s3SseAlgorithm ->
          fun ?s3SseKmsKeyId ->
            fun ?s3BucketOwner ->
              fun ~domainName ->
                fun ~s3Bucket ->
                  fun () ->
                    {
                      clientToken;
                      s3KeyPrefix;
                      s3SseAlgorithm;
                      s3SseKmsKeyId;
                      s3BucketOwner;
                      domainName;
                      s3Bucket
                    }
    let to_value x =
      structure_to_value
        [("clientToken",
           (Option.map x.clientToken ~f:IdempotencyToken.to_value));
        ("domainName", (Some (DomainName.to_value x.domainName)));
        ("s3Bucket", (Some (S3BucketName.to_value x.s3Bucket)));
        ("s3KeyPrefix", (Option.map x.s3KeyPrefix ~f:S3KeyPrefix.to_value));
        ("s3SseAlgorithm",
          (Option.map x.s3SseAlgorithm ~f:S3SseAlgorithm.to_value));
        ("s3SseKmsKeyId",
          (Option.map x.s3SseKmsKeyId ~f:S3SseKmsKeyId.to_value));
        ("s3BucketOwner",
          (Option.map x.s3BucketOwner ~f:AwsAccountId.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let s3BucketOwner =
        (Option.map ~f:AwsAccountId.of_xml)
          (Xml.child xml_arg0 "s3BucketOwner") in
      let s3SseKmsKeyId =
        (Option.map ~f:S3SseKmsKeyId.of_xml)
          (Xml.child xml_arg0 "s3SseKmsKeyId") in
      let s3SseAlgorithm =
        (Option.map ~f:S3SseAlgorithm.of_xml)
          (Xml.child xml_arg0 "s3SseAlgorithm") in
      let s3KeyPrefix =
        (Option.map ~f:S3KeyPrefix.of_xml) (Xml.child xml_arg0 "s3KeyPrefix") in
      let s3Bucket =
        S3BucketName.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "s3Bucket") in
      let domainName =
        DomainName.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "domainName") in
      let clientToken =
        (Option.map ~f:IdempotencyToken.of_xml)
          (Xml.child xml_arg0 "clientToken") in
      make ?s3BucketOwner ?s3SseKmsKeyId ?s3SseAlgorithm ?s3KeyPrefix
        ~s3Bucket ~domainName ?clientToken ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let s3BucketOwner =
        field_map json__ "s3BucketOwner" AwsAccountId.of_json in
      let s3SseKmsKeyId =
        field_map json__ "s3SseKmsKeyId" S3SseKmsKeyId.of_json in
      let s3SseAlgorithm =
        field_map json__ "s3SseAlgorithm" S3SseAlgorithm.of_json in
      let s3KeyPrefix = field_map json__ "s3KeyPrefix" S3KeyPrefix.of_json in
      let s3Bucket = field_map_exn json__ "s3Bucket" S3BucketName.of_json in
      let domainName = field_map_exn json__ "domainName" DomainName.of_json in
      let clientToken =
        field_map json__ "clientToken" IdempotencyToken.of_json in
      make ?s3BucketOwner ?s3SseKmsKeyId ?s3SseAlgorithm ?s3KeyPrefix
        ~s3Bucket ~domainName ?clientToken ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Initiates the export of a SimpleDB domain to an S3 bucket."]
module ListExportsResponse =
  struct
    type nonrec t =
      {
      exportSummaries: ExportSummaries.t option
        [@ocaml.doc
          "List of export summaries containing export ARN, status, request timestamp, and associated domain name."];
      nextToken: NextToken.t option
        [@ocaml.doc
          "A pagination token indicating that more results are available. To retrieve the next page of results, provide this token in a subsequent ListExports request. If null or empty, there are no more results to retrieve."]}
    type nonrec error =
      [ `InvalidNextTokenException of InvalidNextTokenException.t 
      | `InvalidParameterValueException of InvalidParameterValueException.t 
      | `NoSuchDomainException of NoSuchDomainException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?exportSummaries =
      fun ?nextToken -> fun () -> { exportSummaries; nextToken }
    let error_of_json name json =
      match name with
      | "InvalidNextTokenException" ->
          `InvalidNextTokenException (InvalidNextTokenException.of_json json)
      | "InvalidParameterValueException" ->
          `InvalidParameterValueException
            (InvalidParameterValueException.of_json json)
      | "NoSuchDomainException" ->
          `NoSuchDomainException (NoSuchDomainException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "InvalidNextTokenException" ->
          `InvalidNextTokenException (InvalidNextTokenException.of_xml xml)
      | "InvalidParameterValueException" ->
          `InvalidParameterValueException
            (InvalidParameterValueException.of_xml xml)
      | "NoSuchDomainException" ->
          `NoSuchDomainException (NoSuchDomainException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `InvalidNextTokenException e ->
          `Assoc
            [("error", (`String "InvalidNextTokenException"));
            ("details", (InvalidNextTokenException.to_json e))]
      | `InvalidParameterValueException e ->
          `Assoc
            [("error", (`String "InvalidParameterValueException"));
            ("details", (InvalidParameterValueException.to_json e))]
      | `NoSuchDomainException e ->
          `Assoc
            [("error", (`String "NoSuchDomainException"));
            ("details", (NoSuchDomainException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("exportSummaries",
           (Option.map x.exportSummaries ~f:ExportSummaries.to_value));
        ("nextToken", (Option.map x.nextToken ~f:NextToken.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:NextToken.of_xml) (Xml.child xml_arg0 "nextToken") in
      let exportSummaries =
        (Option.map ~f:ExportSummaries.of_xml)
          (Xml.child xml_arg0 "exportSummaries") in
      make ?nextToken ?exportSummaries ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" NextToken.of_json in
      let exportSummaries =
        field_map json__ "exportSummaries" ExportSummaries.of_json in
      make ?nextToken ?exportSummaries ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Lists all exports that were created. The results are paginated and can be filtered by domain name."]
module ListExportsRequest =
  struct
    type nonrec t =
      {
      domainName: DomainName.t option
        [@ocaml.doc
          "The name of the domain to filter exports. If not provided, exports for all the domains will be listed."];
      maxResults: MaxResults.t option
        [@ocaml.doc
          "The maximum number of exports to return in a single response."];
      nextToken: NextToken.t option
        [@ocaml.doc
          "A pagination token used to retrieve the next page of results. This token is obtained from the nextToken field in the previous ListExportsResponse. Leave empty for the first request."]}
    let make ?domainName =
      fun ?maxResults ->
        fun ?nextToken -> fun () -> { domainName; maxResults; nextToken }
    let to_value x =
      structure_to_value
        [("domainName", (Option.map x.domainName ~f:DomainName.to_value));
        ("maxResults", (Option.map x.maxResults ~f:MaxResults.to_value));
        ("nextToken", (Option.map x.nextToken ~f:NextToken.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let nextToken =
        (Option.map ~f:NextToken.of_xml) (Xml.child xml_arg0 "nextToken") in
      let maxResults =
        (Option.map ~f:MaxResults.of_xml) (Xml.child xml_arg0 "maxResults") in
      let domainName =
        (Option.map ~f:DomainName.of_xml) (Xml.child xml_arg0 "domainName") in
      make ?nextToken ?maxResults ?domainName ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let nextToken = field_map json__ "nextToken" NextToken.of_json in
      let maxResults = field_map json__ "maxResults" MaxResults.of_json in
      let domainName = field_map json__ "domainName" DomainName.of_json in
      make ?nextToken ?maxResults ?domainName ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc
       "Lists all exports that were created. The results are paginated and can be filtered by domain name."]
module GetExportResponse =
  struct
    type nonrec t =
      {
      exportArn: ExportArn.t option
        [@ocaml.doc "Unique ARN identifier of the export."];
      clientToken: IdempotencyToken.t option
        [@ocaml.doc "The client token provided for this export."];
      exportStatus: ExportStatus.t option
        [@ocaml.doc
          "The current state of the export. Current possible values include : PENDING - export request received, IN_PROGRESS - export is being processed, SUCCEEDED - export completed successfully, and FAILED - export encountered an error."];
      domainName: DomainName.t option
        [@ocaml.doc "The name of the domain that was exported."];
      requestedAt: RequestedAt.t option
        [@ocaml.doc
          "Timestamp when the export request was received by the service."];
      s3Bucket: S3BucketName.t option
        [@ocaml.doc "The name of the S3 bucket for this export."];
      s3KeyPrefix: S3KeyPrefix.t option
        [@ocaml.doc
          "The S3 key prefix provided in the corresponding StartDomainExport request."];
      s3SseAlgorithm: S3SseAlgorithm.t option
        [@ocaml.doc "The S3 SSE encryption algorithm for this export."];
      s3SseKmsKeyId: S3SseKmsKeyId.t option
        [@ocaml.doc "The KMS key ID for this export."];
      s3BucketOwner: AwsAccountId.t option
        [@ocaml.doc "The S3 bucket owner account ID for this export."];
      failureCode: FailureCode.t option
        [@ocaml.doc "Failure code for the result of the failed export."];
      failureMessage: FailureMessage.t option
        [@ocaml.doc "Export failure reason description."];
      exportManifest: ExportManifestSummary.t option
        [@ocaml.doc "The name of the manifest summary file for the export."];
      itemsCount: ItemsCount.t option
        [@ocaml.doc "Total number of exported items."];
      exportDataCutoffTime: ExportDataCutoffTime.t option
        [@ocaml.doc
          "The timestamp indicating the cutoff point for data inclusion in the export. All data inserted or modified before this time will be present in the exported data. Data insertions or modifications after this timestamp may or may not be present in the export."]}
    type nonrec error =
      [ `InvalidParameterValueException of InvalidParameterValueException.t 
      | `NoSuchExportException of NoSuchExportException.t 
      | `Unknown_operation_error of (string * string option) ]
    let make ?exportArn =
      fun ?clientToken ->
        fun ?exportStatus ->
          fun ?domainName ->
            fun ?requestedAt ->
              fun ?s3Bucket ->
                fun ?s3KeyPrefix ->
                  fun ?s3SseAlgorithm ->
                    fun ?s3SseKmsKeyId ->
                      fun ?s3BucketOwner ->
                        fun ?failureCode ->
                          fun ?failureMessage ->
                            fun ?exportManifest ->
                              fun ?itemsCount ->
                                fun ?exportDataCutoffTime ->
                                  fun () ->
                                    {
                                      exportArn;
                                      clientToken;
                                      exportStatus;
                                      domainName;
                                      requestedAt;
                                      s3Bucket;
                                      s3KeyPrefix;
                                      s3SseAlgorithm;
                                      s3SseKmsKeyId;
                                      s3BucketOwner;
                                      failureCode;
                                      failureMessage;
                                      exportManifest;
                                      itemsCount;
                                      exportDataCutoffTime
                                    }
    let error_of_json name json =
      match name with
      | "InvalidParameterValueException" ->
          `InvalidParameterValueException
            (InvalidParameterValueException.of_json json)
      | "NoSuchExportException" ->
          `NoSuchExportException (NoSuchExportException.of_json json)
      | name ->
          `Unknown_operation_error
            (name, (Some (Yojson.Safe.to_string json)))
    let error_of_xml name xml =
      match name with
      | "InvalidParameterValueException" ->
          `InvalidParameterValueException
            (InvalidParameterValueException.of_xml xml)
      | "NoSuchExportException" ->
          `NoSuchExportException (NoSuchExportException.of_xml xml)
      | name ->
          `Unknown_operation_error (name, (Some (Awso.Xml.to_string xml)))
    let error_to_json : error -> Yojson.Safe.t =
      function
      | `InvalidParameterValueException e ->
          `Assoc
            [("error", (`String "InvalidParameterValueException"));
            ("details", (InvalidParameterValueException.to_json e))]
      | `NoSuchExportException e ->
          `Assoc
            [("error", (`String "NoSuchExportException"));
            ("details", (NoSuchExportException.to_json e))]
      | `Unknown_operation_error (code, msg) ->
          `Assoc (("error", (`String code)) ::
            ((match msg with
              | None -> []
              | Some m -> [("message", (`String m))])))
    let to_value x =
      structure_to_value
        [("exportArn", (Option.map x.exportArn ~f:ExportArn.to_value));
        ("clientToken",
          (Option.map x.clientToken ~f:IdempotencyToken.to_value));
        ("exportStatus",
          (Option.map x.exportStatus ~f:ExportStatus.to_value));
        ("domainName", (Option.map x.domainName ~f:DomainName.to_value));
        ("requestedAt", (Option.map x.requestedAt ~f:RequestedAt.to_value));
        ("s3Bucket", (Option.map x.s3Bucket ~f:S3BucketName.to_value));
        ("s3KeyPrefix", (Option.map x.s3KeyPrefix ~f:S3KeyPrefix.to_value));
        ("s3SseAlgorithm",
          (Option.map x.s3SseAlgorithm ~f:S3SseAlgorithm.to_value));
        ("s3SseKmsKeyId",
          (Option.map x.s3SseKmsKeyId ~f:S3SseKmsKeyId.to_value));
        ("s3BucketOwner",
          (Option.map x.s3BucketOwner ~f:AwsAccountId.to_value));
        ("failureCode", (Option.map x.failureCode ~f:FailureCode.to_value));
        ("failureMessage",
          (Option.map x.failureMessage ~f:FailureMessage.to_value));
        ("exportManifest",
          (Option.map x.exportManifest ~f:ExportManifestSummary.to_value));
        ("itemsCount", (Option.map x.itemsCount ~f:ItemsCount.to_value));
        ("exportDataCutoffTime",
          (Option.map x.exportDataCutoffTime ~f:ExportDataCutoffTime.to_value))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let exportDataCutoffTime =
        (Option.map ~f:ExportDataCutoffTime.of_xml)
          (Xml.child xml_arg0 "exportDataCutoffTime") in
      let itemsCount =
        (Option.map ~f:ItemsCount.of_xml) (Xml.child xml_arg0 "itemsCount") in
      let exportManifest =
        (Option.map ~f:ExportManifestSummary.of_xml)
          (Xml.child xml_arg0 "exportManifest") in
      let failureMessage =
        (Option.map ~f:FailureMessage.of_xml)
          (Xml.child xml_arg0 "failureMessage") in
      let failureCode =
        (Option.map ~f:FailureCode.of_xml) (Xml.child xml_arg0 "failureCode") in
      let s3BucketOwner =
        (Option.map ~f:AwsAccountId.of_xml)
          (Xml.child xml_arg0 "s3BucketOwner") in
      let s3SseKmsKeyId =
        (Option.map ~f:S3SseKmsKeyId.of_xml)
          (Xml.child xml_arg0 "s3SseKmsKeyId") in
      let s3SseAlgorithm =
        (Option.map ~f:S3SseAlgorithm.of_xml)
          (Xml.child xml_arg0 "s3SseAlgorithm") in
      let s3KeyPrefix =
        (Option.map ~f:S3KeyPrefix.of_xml) (Xml.child xml_arg0 "s3KeyPrefix") in
      let s3Bucket =
        (Option.map ~f:S3BucketName.of_xml) (Xml.child xml_arg0 "s3Bucket") in
      let requestedAt =
        (Option.map ~f:RequestedAt.of_xml) (Xml.child xml_arg0 "requestedAt") in
      let domainName =
        (Option.map ~f:DomainName.of_xml) (Xml.child xml_arg0 "domainName") in
      let exportStatus =
        (Option.map ~f:ExportStatus.of_xml)
          (Xml.child xml_arg0 "exportStatus") in
      let clientToken =
        (Option.map ~f:IdempotencyToken.of_xml)
          (Xml.child xml_arg0 "clientToken") in
      let exportArn =
        (Option.map ~f:ExportArn.of_xml) (Xml.child xml_arg0 "exportArn") in
      make ?exportDataCutoffTime ?itemsCount ?exportManifest ?failureMessage
        ?failureCode ?s3BucketOwner ?s3SseKmsKeyId ?s3SseAlgorithm
        ?s3KeyPrefix ?s3Bucket ?requestedAt ?domainName ?exportStatus
        ?clientToken ?exportArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let exportDataCutoffTime =
        field_map json__ "exportDataCutoffTime" ExportDataCutoffTime.of_json in
      let itemsCount = field_map json__ "itemsCount" ItemsCount.of_json in
      let exportManifest =
        field_map json__ "exportManifest" ExportManifestSummary.of_json in
      let failureMessage =
        field_map json__ "failureMessage" FailureMessage.of_json in
      let failureCode = field_map json__ "failureCode" FailureCode.of_json in
      let s3BucketOwner =
        field_map json__ "s3BucketOwner" AwsAccountId.of_json in
      let s3SseKmsKeyId =
        field_map json__ "s3SseKmsKeyId" S3SseKmsKeyId.of_json in
      let s3SseAlgorithm =
        field_map json__ "s3SseAlgorithm" S3SseAlgorithm.of_json in
      let s3KeyPrefix = field_map json__ "s3KeyPrefix" S3KeyPrefix.of_json in
      let s3Bucket = field_map json__ "s3Bucket" S3BucketName.of_json in
      let requestedAt = field_map json__ "requestedAt" RequestedAt.of_json in
      let domainName = field_map json__ "domainName" DomainName.of_json in
      let exportStatus = field_map json__ "exportStatus" ExportStatus.of_json in
      let clientToken =
        field_map json__ "clientToken" IdempotencyToken.of_json in
      let exportArn = field_map json__ "exportArn" ExportArn.of_json in
      make ?exportDataCutoffTime ?itemsCount ?exportManifest ?failureMessage
        ?failureCode ?s3BucketOwner ?s3SseKmsKeyId ?s3SseAlgorithm
        ?s3KeyPrefix ?s3Bucket ?requestedAt ?domainName ?exportStatus
        ?clientToken ?exportArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Returns information for an existing domain export."]
module GetExportRequest =
  struct
    type nonrec t =
      {
      exportArn: ExportArn.t
        [@ocaml.doc "Unique ARN identifier of the export."]}
    let context_ = "GetExportRequest"
    let make ~exportArn = fun () -> { exportArn }
    let to_value x =
      structure_to_value
        [("exportArn", (Some (ExportArn.to_value x.exportArn)))]
    let to_query v = to_query to_value v
    let of_xml xml_arg0 =
      let exportArn =
        ExportArn.of_xml
          (Xml.child_exn ~context:context_ xml_arg0 "exportArn") in
      make ~exportArn ()
    let of_string s = of_xml (Awso.Xml.parse_response s)[@@warning "-32"]
    let of_json json__ =
      let exportArn = field_map_exn json__ "exportArn" ExportArn.of_json in
      make ~exportArn ()
    let to_json v = composed_to_json to_value v
  end[@@ocaml.doc "Returns information for an existing domain export."]