Source file cli.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
(* generated by: awso-codegen generate-all --botocore-data vendor/botocore/botocore/data -o aws --runtime-dir lib/runtime/awso --cli-dir awso-cli *)
open Core
open Async
let json_arg = Command.Arg_type.create Yojson.Safe.from_string
let call ?endpoint_url ?profile ?region f m result_to_json error_to_json =
  let region =
    match region with
    | Some region -> Some (Awso.Region.of_string region)
    | None -> None in
  (Awso_async.Cfg.get_exn ?profile ?region ()) >>=
    (fun cfg ->
       (f ?endpoint_url ?cfg:(Some cfg) m) >>=
         (fun result ->
            match result with
            | Error err ->
                (match error_to_json with
                 | None ->
                     failwithf
                       "endpoint error, but no error values defined in boto"
                       ()
                 | Some to_json ->
                     let s = (err |> to_json) |> Yojson.Safe.to_string in
                     failwithf "AWS error: %s" s ())
            | Ok result ->
                ((match result_to_json with
                  | None -> print_endline "ok response from endpoint"
                  | Some to_json ->
                      ((result |> to_json) |> Yojson.Safe.to_string) |>
                        print_endline);
                 return ())))
let create_bot_version =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and checksum = flag "checksum" (optional string) ~doc:"STRING String"
       and name = flag "name" (required string) ~doc:"STRING BotName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_bot_version
           (Values.CreateBotVersionRequest.make ?checksum ~name ())
           (Some Values.CreateBotVersionResponse.to_json)
           (Some Values.CreateBotVersionResponse.error_to_json)])
let create_intent_version =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and checksum = flag "checksum" (optional string) ~doc:"STRING String"
       and name = flag "name" (required string) ~doc:"STRING IntentName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_intent_version
           (Values.CreateIntentVersionRequest.make ?checksum ~name ())
           (Some Values.CreateIntentVersionResponse.to_json)
           (Some Values.CreateIntentVersionResponse.error_to_json)])
let create_slot_type_version =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and checksum = flag "checksum" (optional string) ~doc:"STRING String"
       and name = flag "name" (required string) ~doc:"STRING SlotTypeName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_slot_type_version
           (Values.CreateSlotTypeVersionRequest.make ?checksum ~name ())
           (Some Values.CreateSlotTypeVersionResponse.to_json)
           (Some Values.CreateSlotTypeVersionResponse.error_to_json)])
let delete_bot =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING BotName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_bot (Values.DeleteBotRequest.make ~name ()) None None])
let delete_bot_alias =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING AliasName"
       and botName = flag "bot-name" (required string) ~doc:"STRING BotName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_bot_alias
           (Values.DeleteBotAliasRequest.make ~name ~botName ()) None None])
let delete_bot_channel_association =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING BotChannelName"
       and botName = flag "bot-name" (required string) ~doc:"STRING BotName"
       and botAlias =
         flag "bot-alias" (required string) ~doc:"STRING AliasName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_bot_channel_association
           (Values.DeleteBotChannelAssociationRequest.make ~name ~botName
              ~botAlias ()) None None])
let delete_bot_version =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING BotName"
       and version =
         flag "version" (required string) ~doc:"STRING NumericalVersion" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_bot_version
           (Values.DeleteBotVersionRequest.make ~name ~version ()) None None])
let delete_intent =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING IntentName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_intent (Values.DeleteIntentRequest.make ~name ()) None
           None])
let delete_intent_version =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING IntentName"
       and version =
         flag "version" (required string) ~doc:"STRING NumericalVersion" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_intent_version
           (Values.DeleteIntentVersionRequest.make ~name ~version ()) None
           None])
let delete_slot_type =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING SlotTypeName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_slot_type (Values.DeleteSlotTypeRequest.make ~name ())
           None None])
let delete_slot_type_version =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING SlotTypeName"
       and version =
         flag "version" (required string) ~doc:"STRING NumericalVersion" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_slot_type_version
           (Values.DeleteSlotTypeVersionRequest.make ~name ~version ()) None
           None])
let delete_utterances =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and botName = flag "bot-name" (required string) ~doc:"STRING BotName"
       and userId = flag "user-id" (required string) ~doc:"STRING UserId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_utterances
           (Values.DeleteUtterancesRequest.make ~botName ~userId ()) None
           None])
let get_bot =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING BotName"
       and versionOrAlias =
         flag "version-or-alias" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_bot (Values.GetBotRequest.make ~name ~versionOrAlias ())
           (Some Values.GetBotResponse.to_json)
           (Some Values.GetBotResponse.error_to_json)])
let get_bot_alias =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING AliasName"
       and botName = flag "bot-name" (required string) ~doc:"STRING BotName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_bot_alias
           (Values.GetBotAliasRequest.make ~name ~botName ())
           (Some Values.GetBotAliasResponse.to_json)
           (Some Values.GetBotAliasResponse.error_to_json)])
let get_bot_aliases =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken"
       and maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nameContains =
         flag "name-contains" (optional string) ~doc:"STRING AliasName"
       and botName = flag "bot-name" (required string) ~doc:"STRING BotName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_bot_aliases
           (Values.GetBotAliasesRequest.make ?nextToken ?maxResults
              ?nameContains ~botName ())
           (Some Values.GetBotAliasesResponse.to_json)
           (Some Values.GetBotAliasesResponse.error_to_json)])
let get_bot_channel_association =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING BotChannelName"
       and botName = flag "bot-name" (required string) ~doc:"STRING BotName"
       and botAlias =
         flag "bot-alias" (required string) ~doc:"STRING AliasName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_bot_channel_association
           (Values.GetBotChannelAssociationRequest.make ~name ~botName
              ~botAlias ())
           (Some Values.GetBotChannelAssociationResponse.to_json)
           (Some Values.GetBotChannelAssociationResponse.error_to_json)])
let get_bot_channel_associations =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken"
       and maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nameContains =
         flag "name-contains" (optional string) ~doc:"STRING BotChannelName"
       and botName = flag "bot-name" (required string) ~doc:"STRING BotName"
       and botAlias =
         flag "bot-alias" (required string) ~doc:"STRING AliasNameOrListAll" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_bot_channel_associations
           (Values.GetBotChannelAssociationsRequest.make ?nextToken
              ?maxResults ?nameContains ~botName ~botAlias ())
           (Some Values.GetBotChannelAssociationsResponse.to_json)
           (Some Values.GetBotChannelAssociationsResponse.error_to_json)])
let get_bot_versions =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken"
       and maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and name = flag "name" (required string) ~doc:"STRING BotName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_bot_versions
           (Values.GetBotVersionsRequest.make ?nextToken ?maxResults ~name ())
           (Some Values.GetBotVersionsResponse.to_json)
           (Some Values.GetBotVersionsResponse.error_to_json)])
let get_bots =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken"
       and maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nameContains =
         flag "name-contains" (optional string) ~doc:"STRING BotName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_bots
           (Values.GetBotsRequest.make ?nextToken ?maxResults ?nameContains
              ()) (Some Values.GetBotsResponse.to_json)
           (Some Values.GetBotsResponse.error_to_json)])
let get_builtin_intent =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and signature =
         flag "signature" (required string)
           ~doc:"STRING BuiltinIntentSignature" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_builtin_intent
           (Values.GetBuiltinIntentRequest.make ~signature ())
           (Some Values.GetBuiltinIntentResponse.to_json)
           (Some Values.GetBuiltinIntentResponse.error_to_json)])
let get_builtin_intents =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and locale = flag "locale" (optional json_arg) ~doc:"JSON Locale"
       and signatureContains =
         flag "signature-contains" (optional string) ~doc:"STRING String"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken"
       and maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_builtin_intents
           (Values.GetBuiltinIntentsRequest.make
              ?locale:(Option.map ~f:Values.Locale.of_json locale)
              ?signatureContains ?nextToken ?maxResults ())
           (Some Values.GetBuiltinIntentsResponse.to_json)
           (Some Values.GetBuiltinIntentsResponse.error_to_json)])
let get_builtin_slot_types =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and locale = flag "locale" (optional json_arg) ~doc:"JSON Locale"
       and signatureContains =
         flag "signature-contains" (optional string) ~doc:"STRING String"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken"
       and maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_builtin_slot_types
           (Values.GetBuiltinSlotTypesRequest.make
              ?locale:(Option.map ~f:Values.Locale.of_json locale)
              ?signatureContains ?nextToken ?maxResults ())
           (Some Values.GetBuiltinSlotTypesResponse.to_json)
           (Some Values.GetBuiltinSlotTypesResponse.error_to_json)])
let get_export =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING Name"
       and version =
         flag "version" (required string) ~doc:"STRING NumericalVersion"
       and resourceType =
         flag "resource-type" (required json_arg) ~doc:"JSON ResourceType"
       and exportType =
         flag "export-type" (required json_arg) ~doc:"JSON ExportType" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_export
           (Values.GetExportRequest.make ~name ~version
              ~resourceType:(Values.ResourceType.of_json resourceType)
              ~exportType:(Values.ExportType.of_json exportType) ())
           (Some Values.GetExportResponse.to_json)
           (Some Values.GetExportResponse.error_to_json)])
let get_import =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and importId = flag "import-id" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_import (Values.GetImportRequest.make ~importId ())
           (Some Values.GetImportResponse.to_json)
           (Some Values.GetImportResponse.error_to_json)])
let get_intent =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING IntentName"
       and version = flag "version" (required string) ~doc:"STRING Version" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_intent (Values.GetIntentRequest.make ~name ~version ())
           (Some Values.GetIntentResponse.to_json)
           (Some Values.GetIntentResponse.error_to_json)])
let get_intent_versions =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken"
       and maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and name = flag "name" (required string) ~doc:"STRING IntentName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_intent_versions
           (Values.GetIntentVersionsRequest.make ?nextToken ?maxResults ~name
              ()) (Some Values.GetIntentVersionsResponse.to_json)
           (Some Values.GetIntentVersionsResponse.error_to_json)])
let get_intents =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken"
       and maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nameContains =
         flag "name-contains" (optional string) ~doc:"STRING IntentName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_intents
           (Values.GetIntentsRequest.make ?nextToken ?maxResults
              ?nameContains ()) (Some Values.GetIntentsResponse.to_json)
           (Some Values.GetIntentsResponse.error_to_json)])
let get_migration =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and migrationId =
         flag "migration-id" (required string) ~doc:"STRING MigrationId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_migration (Values.GetMigrationRequest.make ~migrationId ())
           (Some Values.GetMigrationResponse.to_json)
           (Some Values.GetMigrationResponse.error_to_json)])
let get_migrations =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and sortByAttribute =
         flag "sort-by-attribute" (optional json_arg)
           ~doc:"JSON MigrationSortAttribute"
       and sortByOrder =
         flag "sort-by-order" (optional json_arg) ~doc:"JSON SortOrder"
       and v1BotNameContains =
         flag "v1-bot-name-contains" (optional string) ~doc:"STRING BotName"
       and migrationStatusEquals =
         flag "migration-status-equals" (optional json_arg)
           ~doc:"JSON MigrationStatus"
       and maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_migrations
           (Values.GetMigrationsRequest.make
              ?sortByAttribute:(Option.map
                                  ~f:Values.MigrationSortAttribute.of_json
                                  sortByAttribute)
              ?sortByOrder:(Option.map ~f:Values.SortOrder.of_json
                              sortByOrder) ?v1BotNameContains
              ?migrationStatusEquals:(Option.map
                                        ~f:Values.MigrationStatus.of_json
                                        migrationStatusEquals) ?maxResults
              ?nextToken ()) (Some Values.GetMigrationsResponse.to_json)
           (Some Values.GetMigrationsResponse.error_to_json)])
let get_slot_type =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and name = flag "name" (required string) ~doc:"STRING SlotTypeName"
       and version = flag "version" (required string) ~doc:"STRING Version" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_slot_type
           (Values.GetSlotTypeRequest.make ~name ~version ())
           (Some Values.GetSlotTypeResponse.to_json)
           (Some Values.GetSlotTypeResponse.error_to_json)])
let get_slot_type_versions =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken"
       and maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and name = flag "name" (required string) ~doc:"STRING SlotTypeName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_slot_type_versions
           (Values.GetSlotTypeVersionsRequest.make ?nextToken ?maxResults
              ~name ()) (Some Values.GetSlotTypeVersionsResponse.to_json)
           (Some Values.GetSlotTypeVersionsResponse.error_to_json)])
let get_slot_types =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken"
       and maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nameContains =
         flag "name-contains" (optional string) ~doc:"STRING SlotTypeName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_slot_types
           (Values.GetSlotTypesRequest.make ?nextToken ?maxResults
              ?nameContains ()) (Some Values.GetSlotTypesResponse.to_json)
           (Some Values.GetSlotTypesResponse.error_to_json)])
let get_utterances_view =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and botName = flag "bot-name" (required string) ~doc:"STRING BotName"
       and botVersions =
         flag "bot-versions" (required json_arg) ~doc:"JSON BotVersions"
       and statusType =
         flag "status-type" (required json_arg) ~doc:"JSON StatusType" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_utterances_view
           (Values.GetUtterancesViewRequest.make ~botName
              ~botVersions:(Values.BotVersions.of_json botVersions)
              ~statusType:(Values.StatusType.of_json statusType) ())
           (Some Values.GetUtterancesViewResponse.to_json)
           (Some Values.GetUtterancesViewResponse.error_to_json)])
let list_tags_for_resource =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and resourceArn =
         flag "resource-arn" (required string)
           ~doc:"STRING AmazonResourceName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_tags_for_resource
           (Values.ListTagsForResourceRequest.make ~resourceArn ())
           (Some Values.ListTagsForResourceResponse.to_json)
           (Some Values.ListTagsForResourceResponse.error_to_json)])
let put_bot =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and description =
         flag "description" (optional string) ~doc:"STRING Description"
       and intents =
         flag "intents" (optional json_arg) ~doc:"JSON IntentList"
       and enableModelImprovements =
         flag "enable-model-improvements" (optional bool) ~doc:"BOOL Boolean"
       and nluIntentConfidenceThreshold =
         flag "nlu-intent-confidence-threshold" (optional float)
           ~doc:"FLOAT ConfidenceThreshold"
       and clarificationPrompt =
         flag "clarification-prompt" (optional json_arg) ~doc:"JSON Prompt"
       and abortStatement =
         flag "abort-statement" (optional json_arg) ~doc:"JSON Statement"
       and idleSessionTTLInSeconds =
         flag "idle-session-t-t-l-in-seconds" (optional int)
           ~doc:"INT SessionTTL"
       and voiceId = flag "voice-id" (optional string) ~doc:"STRING String"
       and checksum = flag "checksum" (optional string) ~doc:"STRING String"
       and processBehavior =
         flag "process-behavior" (optional json_arg)
           ~doc:"JSON ProcessBehavior"
       and detectSentiment =
         flag "detect-sentiment" (optional bool) ~doc:"BOOL Boolean"
       and createVersion =
         flag "create-version" (optional bool) ~doc:"BOOL Boolean"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and name = flag "name" (required string) ~doc:"STRING BotName"
       and locale = flag "locale" (required json_arg) ~doc:"JSON Locale"
       and childDirected =
         flag "child-directed" (required bool) ~doc:"BOOL Boolean" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.put_bot
           (Values.PutBotRequest.make ?description
              ?intents:(Option.map ~f:Values.IntentList.of_json intents)
              ?enableModelImprovements ?nluIntentConfidenceThreshold
              ?clarificationPrompt:(Option.map ~f:Values.Prompt.of_json
                                      clarificationPrompt)
              ?abortStatement:(Option.map ~f:Values.Statement.of_json
                                 abortStatement) ?idleSessionTTLInSeconds
              ?voiceId ?checksum
              ?processBehavior:(Option.map ~f:Values.ProcessBehavior.of_json
                                  processBehavior) ?detectSentiment
              ?createVersion
              ?tags:(Option.map ~f:Values.TagList.of_json tags) ~name
              ~locale:(Values.Locale.of_json locale) ~childDirected ())
           (Some Values.PutBotResponse.to_json)
           (Some Values.PutBotResponse.error_to_json)])
let put_bot_alias =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and description =
         flag "description" (optional string) ~doc:"STRING Description"
       and checksum = flag "checksum" (optional string) ~doc:"STRING String"
       and conversationLogs =
         flag "conversation-logs" (optional json_arg)
           ~doc:"JSON ConversationLogsRequest"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and name = flag "name" (required string) ~doc:"STRING AliasName"
       and botVersion =
         flag "bot-version" (required string) ~doc:"STRING Version"
       and botName = flag "bot-name" (required string) ~doc:"STRING BotName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.put_bot_alias
           (Values.PutBotAliasRequest.make ?description ?checksum
              ?conversationLogs:(Option.map
                                   ~f:Values.ConversationLogsRequest.of_json
                                   conversationLogs)
              ?tags:(Option.map ~f:Values.TagList.of_json tags) ~name
              ~botVersion ~botName ())
           (Some Values.PutBotAliasResponse.to_json)
           (Some Values.PutBotAliasResponse.error_to_json)])
let put_intent =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and description =
         flag "description" (optional string) ~doc:"STRING Description"
       and slots = flag "slots" (optional json_arg) ~doc:"JSON SlotList"
       and sampleUtterances =
         flag "sample-utterances" (optional json_arg)
           ~doc:"JSON IntentUtteranceList"
       and confirmationPrompt =
         flag "confirmation-prompt" (optional json_arg) ~doc:"JSON Prompt"
       and rejectionStatement =
         flag "rejection-statement" (optional json_arg) ~doc:"JSON Statement"
       and followUpPrompt =
         flag "follow-up-prompt" (optional json_arg)
           ~doc:"JSON FollowUpPrompt"
       and conclusionStatement =
         flag "conclusion-statement" (optional json_arg)
           ~doc:"JSON Statement"
       and dialogCodeHook =
         flag "dialog-code-hook" (optional json_arg) ~doc:"JSON CodeHook"
       and fulfillmentActivity =
         flag "fulfillment-activity" (optional json_arg)
           ~doc:"JSON FulfillmentActivity"
       and parentIntentSignature =
         flag "parent-intent-signature" (optional string)
           ~doc:"STRING BuiltinIntentSignature"
       and checksum = flag "checksum" (optional string) ~doc:"STRING String"
       and createVersion =
         flag "create-version" (optional bool) ~doc:"BOOL Boolean"
       and kendraConfiguration =
         flag "kendra-configuration" (optional json_arg)
           ~doc:"JSON KendraConfiguration"
       and inputContexts =
         flag "input-contexts" (optional json_arg)
           ~doc:"JSON InputContextList"
       and outputContexts =
         flag "output-contexts" (optional json_arg)
           ~doc:"JSON OutputContextList"
       and name = flag "name" (required string) ~doc:"STRING IntentName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.put_intent
           (Values.PutIntentRequest.make ?description
              ?slots:(Option.map ~f:Values.SlotList.of_json slots)
              ?sampleUtterances:(Option.map
                                   ~f:Values.IntentUtteranceList.of_json
                                   sampleUtterances)
              ?confirmationPrompt:(Option.map ~f:Values.Prompt.of_json
                                     confirmationPrompt)
              ?rejectionStatement:(Option.map ~f:Values.Statement.of_json
                                     rejectionStatement)
              ?followUpPrompt:(Option.map ~f:Values.FollowUpPrompt.of_json
                                 followUpPrompt)
              ?conclusionStatement:(Option.map ~f:Values.Statement.of_json
                                      conclusionStatement)
              ?dialogCodeHook:(Option.map ~f:Values.CodeHook.of_json
                                 dialogCodeHook)
              ?fulfillmentActivity:(Option.map
                                      ~f:Values.FulfillmentActivity.of_json
                                      fulfillmentActivity)
              ?parentIntentSignature ?checksum ?createVersion
              ?kendraConfiguration:(Option.map
                                      ~f:Values.KendraConfiguration.of_json
                                      kendraConfiguration)
              ?inputContexts:(Option.map ~f:Values.InputContextList.of_json
                                inputContexts)
              ?outputContexts:(Option.map ~f:Values.OutputContextList.of_json
                                 outputContexts) ~name ())
           (Some Values.PutIntentResponse.to_json)
           (Some Values.PutIntentResponse.error_to_json)])
let put_slot_type =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and description =
         flag "description" (optional string) ~doc:"STRING Description"
       and enumerationValues =
         flag "enumeration-values" (optional json_arg)
           ~doc:"JSON EnumerationValues"
       and checksum = flag "checksum" (optional string) ~doc:"STRING String"
       and valueSelectionStrategy =
         flag "value-selection-strategy" (optional json_arg)
           ~doc:"JSON SlotValueSelectionStrategy"
       and createVersion =
         flag "create-version" (optional bool) ~doc:"BOOL Boolean"
       and parentSlotTypeSignature =
         flag "parent-slot-type-signature" (optional string)
           ~doc:"STRING CustomOrBuiltinSlotTypeName"
       and slotTypeConfigurations =
         flag "slot-type-configurations" (optional json_arg)
           ~doc:"JSON SlotTypeConfigurations"
       and name = flag "name" (required string) ~doc:"STRING SlotTypeName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.put_slot_type
           (Values.PutSlotTypeRequest.make ?description
              ?enumerationValues:(Option.map
                                    ~f:Values.EnumerationValues.of_json
                                    enumerationValues) ?checksum
              ?valueSelectionStrategy:(Option.map
                                         ~f:Values.SlotValueSelectionStrategy.of_json
                                         valueSelectionStrategy)
              ?createVersion ?parentSlotTypeSignature
              ?slotTypeConfigurations:(Option.map
                                         ~f:Values.SlotTypeConfigurations.of_json
                                         slotTypeConfigurations) ~name ())
           (Some Values.PutSlotTypeResponse.to_json)
           (Some Values.PutSlotTypeResponse.error_to_json)])
let start_import =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and payload = flag "payload" (required json_arg) ~doc:"JSON Blob"
       and resourceType =
         flag "resource-type" (required json_arg) ~doc:"JSON ResourceType"
       and mergeStrategy =
         flag "merge-strategy" (required json_arg) ~doc:"JSON MergeStrategy" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.start_import
           (Values.StartImportRequest.make
              ?tags:(Option.map ~f:Values.TagList.of_json tags)
              ~payload:(Values.Blob.of_json payload)
              ~resourceType:(Values.ResourceType.of_json resourceType)
              ~mergeStrategy:(Values.MergeStrategy.of_json mergeStrategy) ())
           (Some Values.StartImportResponse.to_json)
           (Some Values.StartImportResponse.error_to_json)])
let start_migration =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and v1BotName =
         flag "v1-bot-name" (required string) ~doc:"STRING BotName"
       and v1BotVersion =
         flag "v1-bot-version" (required string) ~doc:"STRING Version"
       and v2BotName =
         flag "v2-bot-name" (required string) ~doc:"STRING V2BotName"
       and v2BotRole =
         flag "v2-bot-role" (required string) ~doc:"STRING IamRoleArn"
       and migrationStrategy =
         flag "migration-strategy" (required json_arg)
           ~doc:"JSON MigrationStrategy" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.start_migration
           (Values.StartMigrationRequest.make ~v1BotName ~v1BotVersion
              ~v2BotName ~v2BotRole
              ~migrationStrategy:(Values.MigrationStrategy.of_json
                                    migrationStrategy) ())
           (Some Values.StartMigrationResponse.to_json)
           (Some Values.StartMigrationResponse.error_to_json)])
let tag_resource =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and resourceArn =
         flag "resource-arn" (required string)
           ~doc:"STRING AmazonResourceName"
       and tags = flag "tags" (required json_arg) ~doc:"JSON TagList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.tag_resource
           (Values.TagResourceRequest.make ~resourceArn
              ~tags:(Values.TagList.of_json tags) ())
           (Some Values.TagResourceResponse.to_json)
           (Some Values.TagResourceResponse.error_to_json)])
let untag_resource =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and resourceArn =
         flag "resource-arn" (required string)
           ~doc:"STRING AmazonResourceName"
       and tagKeys =
         flag "tag-keys" (required json_arg) ~doc:"JSON TagKeyList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.untag_resource
           (Values.UntagResourceRequest.make ~resourceArn
              ~tagKeys:(Values.TagKeyList.of_json tagKeys) ())
           (Some Values.UntagResourceResponse.to_json)
           (Some Values.UntagResourceResponse.error_to_json)])
let main =
  Command.group
    ~summary:((Awso.Service.to_string Values.service) ^ " commands")
    [("create-bot-version", create_bot_version);
    ("create-intent-version", create_intent_version);
    ("create-slot-type-version", create_slot_type_version);
    ("delete-bot", delete_bot);
    ("delete-bot-alias", delete_bot_alias);
    ("delete-bot-channel-association", delete_bot_channel_association);
    ("delete-bot-version", delete_bot_version);
    ("delete-intent", delete_intent);
    ("delete-intent-version", delete_intent_version);
    ("delete-slot-type", delete_slot_type);
    ("delete-slot-type-version", delete_slot_type_version);
    ("delete-utterances", delete_utterances);
    ("get-bot", get_bot);
    ("get-bot-alias", get_bot_alias);
    ("get-bot-aliases", get_bot_aliases);
    ("get-bot-channel-association", get_bot_channel_association);
    ("get-bot-channel-associations", get_bot_channel_associations);
    ("get-bot-versions", get_bot_versions);
    ("get-bots", get_bots);
    ("get-builtin-intent", get_builtin_intent);
    ("get-builtin-intents", get_builtin_intents);
    ("get-builtin-slot-types", get_builtin_slot_types);
    ("get-export", get_export);
    ("get-import", get_import);
    ("get-intent", get_intent);
    ("get-intent-versions", get_intent_versions);
    ("get-intents", get_intents);
    ("get-migration", get_migration);
    ("get-migrations", get_migrations);
    ("get-slot-type", get_slot_type);
    ("get-slot-type-versions", get_slot_type_versions);
    ("get-slot-types", get_slot_types);
    ("get-utterances-view", get_utterances_view);
    ("list-tags-for-resource", list_tags_for_resource);
    ("put-bot", put_bot);
    ("put-bot-alias", put_bot_alias);
    ("put-intent", put_intent);
    ("put-slot-type", put_slot_type);
    ("start-import", start_import);
    ("start-migration", start_migration);
    ("tag-resource", tag_resource);
    ("untag-resource", untag_resource)]