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
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
(* 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 configure_logs_for_channel =
  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 channelName =
         flag "channel-name" (required string) ~doc:"STRING __string"
       and logTypes =
         flag "log-types" (required json_arg) ~doc:"JSON LogTypes" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.configure_logs_for_channel
           (Values.ConfigureLogsForChannelRequest.make ~channelName
              ~logTypes:(Values.LogTypes.of_json logTypes) ())
           (Some Values.ConfigureLogsForChannelResponse.to_json)
           (Some Values.ConfigureLogsForChannelResponse.error_to_json)])
let configure_logs_for_playback_configuration =
  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 enabledLoggingStrategies =
         flag "enabled-logging-strategies" (optional json_arg)
           ~doc:"JSON __listOfLoggingStrategies"
       and adsInteractionLog =
         flag "ads-interaction-log" (optional json_arg)
           ~doc:"JSON AdsInteractionLog"
       and manifestServiceInteractionLog =
         flag "manifest-service-interaction-log" (optional json_arg)
           ~doc:"JSON ManifestServiceInteractionLog"
       and percentEnabled =
         flag "percent-enabled" (required int) ~doc:"INT __integer"
       and playbackConfigurationName =
         flag "playback-configuration-name" (required string)
           ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.configure_logs_for_playback_configuration
           (Values.ConfigureLogsForPlaybackConfigurationRequest.make
              ?enabledLoggingStrategies:(Option.map
                                           ~f:Values.Zz__listOfLoggingStrategies.of_json
                                           enabledLoggingStrategies)
              ?adsInteractionLog:(Option.map
                                    ~f:Values.AdsInteractionLog.of_json
                                    adsInteractionLog)
              ?manifestServiceInteractionLog:(Option.map
                                                ~f:Values.ManifestServiceInteractionLog.of_json
                                                manifestServiceInteractionLog)
              ~percentEnabled ~playbackConfigurationName ())
           (Some Values.ConfigureLogsForPlaybackConfigurationResponse.to_json)
           (Some
              Values.ConfigureLogsForPlaybackConfigurationResponse.error_to_json)])
let create_channel =
  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 fillerSlate =
         flag "filler-slate" (optional json_arg) ~doc:"JSON SlateSource"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON __mapOf__string"
       and tier = flag "tier" (optional json_arg) ~doc:"JSON Tier"
       and timeShiftConfiguration =
         flag "time-shift-configuration" (optional json_arg)
           ~doc:"JSON TimeShiftConfiguration"
       and audiences =
         flag "audiences" (optional json_arg) ~doc:"JSON Audiences"
       and channelName =
         flag "channel-name" (required string) ~doc:"STRING __string"
       and outputs =
         flag "outputs" (required json_arg) ~doc:"JSON RequestOutputs"
       and playbackMode =
         flag "playback-mode" (required json_arg) ~doc:"JSON PlaybackMode" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_channel
           (Values.CreateChannelRequest.make
              ?fillerSlate:(Option.map ~f:Values.SlateSource.of_json
                              fillerSlate)
              ?tags:(Option.map ~f:Values.Zz__mapOf__string.of_json tags)
              ?tier:(Option.map ~f:Values.Tier.of_json tier)
              ?timeShiftConfiguration:(Option.map
                                         ~f:Values.TimeShiftConfiguration.of_json
                                         timeShiftConfiguration)
              ?audiences:(Option.map ~f:Values.Audiences.of_json audiences)
              ~channelName ~outputs:(Values.RequestOutputs.of_json outputs)
              ~playbackMode:(Values.PlaybackMode.of_json playbackMode) ())
           (Some Values.CreateChannelResponse.to_json)
           (Some Values.CreateChannelResponse.error_to_json)])
let create_live_source =
  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 __mapOf__string"
       and httpPackageConfigurations =
         flag "http-package-configurations" (required json_arg)
           ~doc:"JSON HttpPackageConfigurations"
       and liveSourceName =
         flag "live-source-name" (required string) ~doc:"STRING __string"
       and sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_live_source
           (Values.CreateLiveSourceRequest.make
              ?tags:(Option.map ~f:Values.Zz__mapOf__string.of_json tags)
              ~httpPackageConfigurations:(Values.HttpPackageConfigurations.of_json
                                            httpPackageConfigurations)
              ~liveSourceName ~sourceLocationName ())
           (Some Values.CreateLiveSourceResponse.to_json)
           (Some Values.CreateLiveSourceResponse.error_to_json)])
let create_prefetch_schedule =
  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 consumption =
         flag "consumption" (optional json_arg)
           ~doc:"JSON PrefetchConsumption"
       and retrieval =
         flag "retrieval" (optional json_arg) ~doc:"JSON PrefetchRetrieval"
       and recurringPrefetchConfiguration =
         flag "recurring-prefetch-configuration" (optional json_arg)
           ~doc:"JSON RecurringPrefetchConfiguration"
       and scheduleType =
         flag "schedule-type" (optional json_arg)
           ~doc:"JSON PrefetchScheduleType"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING __string"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON __mapOf__string"
       and name = flag "name" (required string) ~doc:"STRING __string"
       and playbackConfigurationName =
         flag "playback-configuration-name" (required string)
           ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_prefetch_schedule
           (Values.CreatePrefetchScheduleRequest.make
              ?consumption:(Option.map ~f:Values.PrefetchConsumption.of_json
                              consumption)
              ?retrieval:(Option.map ~f:Values.PrefetchRetrieval.of_json
                            retrieval)
              ?recurringPrefetchConfiguration:(Option.map
                                                 ~f:Values.RecurringPrefetchConfiguration.of_json
                                                 recurringPrefetchConfiguration)
              ?scheduleType:(Option.map
                               ~f:Values.PrefetchScheduleType.of_json
                               scheduleType) ?streamId
              ?tags:(Option.map ~f:Values.Zz__mapOf__string.of_json tags)
              ~name ~playbackConfigurationName ())
           (Some Values.CreatePrefetchScheduleResponse.to_json)
           (Some Values.CreatePrefetchScheduleResponse.error_to_json)])
let create_program =
  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 adBreaks =
         flag "ad-breaks" (optional json_arg) ~doc:"JSON __listOfAdBreak"
       and liveSourceName =
         flag "live-source-name" (optional string) ~doc:"STRING __string"
       and vodSourceName =
         flag "vod-source-name" (optional string) ~doc:"STRING __string"
       and audienceMedia =
         flag "audience-media" (optional json_arg)
           ~doc:"JSON __listOfAudienceMedia"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON __mapOf__string"
       and channelName =
         flag "channel-name" (required string) ~doc:"STRING __string"
       and programName =
         flag "program-name" (required string) ~doc:"STRING __string"
       and scheduleConfiguration =
         flag "schedule-configuration" (required json_arg)
           ~doc:"JSON ScheduleConfiguration"
       and sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_program
           (Values.CreateProgramRequest.make
              ?adBreaks:(Option.map ~f:Values.Zz__listOfAdBreak.of_json
                           adBreaks) ?liveSourceName ?vodSourceName
              ?audienceMedia:(Option.map
                                ~f:Values.Zz__listOfAudienceMedia.of_json
                                audienceMedia)
              ?tags:(Option.map ~f:Values.Zz__mapOf__string.of_json tags)
              ~channelName ~programName
              ~scheduleConfiguration:(Values.ScheduleConfiguration.of_json
                                        scheduleConfiguration)
              ~sourceLocationName ())
           (Some Values.CreateProgramResponse.to_json)
           (Some Values.CreateProgramResponse.error_to_json)])
let create_source_location =
  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 accessConfiguration =
         flag "access-configuration" (optional json_arg)
           ~doc:"JSON AccessConfiguration"
       and defaultSegmentDeliveryConfiguration =
         flag "default-segment-delivery-configuration" (optional json_arg)
           ~doc:"JSON DefaultSegmentDeliveryConfiguration"
       and segmentDeliveryConfigurations =
         flag "segment-delivery-configurations" (optional json_arg)
           ~doc:"JSON __listOfSegmentDeliveryConfiguration"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON __mapOf__string"
       and httpConfiguration =
         flag "http-configuration" (required json_arg)
           ~doc:"JSON HttpConfiguration"
       and sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_source_location
           (Values.CreateSourceLocationRequest.make
              ?accessConfiguration:(Option.map
                                      ~f:Values.AccessConfiguration.of_json
                                      accessConfiguration)
              ?defaultSegmentDeliveryConfiguration:(Option.map
                                                      ~f:Values.DefaultSegmentDeliveryConfiguration.of_json
                                                      defaultSegmentDeliveryConfiguration)
              ?segmentDeliveryConfigurations:(Option.map
                                                ~f:Values.Zz__listOfSegmentDeliveryConfiguration.of_json
                                                segmentDeliveryConfigurations)
              ?tags:(Option.map ~f:Values.Zz__mapOf__string.of_json tags)
              ~httpConfiguration:(Values.HttpConfiguration.of_json
                                    httpConfiguration) ~sourceLocationName ())
           (Some Values.CreateSourceLocationResponse.to_json)
           (Some Values.CreateSourceLocationResponse.error_to_json)])
let create_vod_source =
  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 __mapOf__string"
       and httpPackageConfigurations =
         flag "http-package-configurations" (required json_arg)
           ~doc:"JSON HttpPackageConfigurations"
       and sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string"
       and vodSourceName =
         flag "vod-source-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_vod_source
           (Values.CreateVodSourceRequest.make
              ?tags:(Option.map ~f:Values.Zz__mapOf__string.of_json tags)
              ~httpPackageConfigurations:(Values.HttpPackageConfigurations.of_json
                                            httpPackageConfigurations)
              ~sourceLocationName ~vodSourceName ())
           (Some Values.CreateVodSourceResponse.to_json)
           (Some Values.CreateVodSourceResponse.error_to_json)])
let delete_channel =
  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 channelName =
         flag "channel-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_channel
           (Values.DeleteChannelRequest.make ~channelName ())
           (Some Values.DeleteChannelResponse.to_json)
           (Some Values.DeleteChannelResponse.error_to_json)])
let delete_channel_policy =
  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 channelName =
         flag "channel-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_channel_policy
           (Values.DeleteChannelPolicyRequest.make ~channelName ())
           (Some Values.DeleteChannelPolicyResponse.to_json)
           (Some Values.DeleteChannelPolicyResponse.error_to_json)])
let delete_function =
  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 functionId =
         flag "function-id" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_function
           (Values.DeleteFunctionRequest.make ~functionId ())
           (Some Values.DeleteFunctionResponse.to_json)
           (Some Values.DeleteFunctionResponse.error_to_json)])
let delete_live_source =
  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 liveSourceName =
         flag "live-source-name" (required string) ~doc:"STRING __string"
       and sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_live_source
           (Values.DeleteLiveSourceRequest.make ~liveSourceName
              ~sourceLocationName ())
           (Some Values.DeleteLiveSourceResponse.to_json)
           (Some Values.DeleteLiveSourceResponse.error_to_json)])
let delete_playback_configuration =
  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 __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_playback_configuration
           (Values.DeletePlaybackConfigurationRequest.make ~name ())
           (Some Values.DeletePlaybackConfigurationResponse.to_json)
           (Some Values.DeletePlaybackConfigurationResponse.error_to_json)])
let delete_prefetch_schedule =
  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 __string"
       and playbackConfigurationName =
         flag "playback-configuration-name" (required string)
           ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_prefetch_schedule
           (Values.DeletePrefetchScheduleRequest.make ~name
              ~playbackConfigurationName ())
           (Some Values.DeletePrefetchScheduleResponse.to_json)
           (Some Values.DeletePrefetchScheduleResponse.error_to_json)])
let delete_program =
  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 channelName =
         flag "channel-name" (required string) ~doc:"STRING __string"
       and programName =
         flag "program-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_program
           (Values.DeleteProgramRequest.make ~channelName ~programName ())
           (Some Values.DeleteProgramResponse.to_json)
           (Some Values.DeleteProgramResponse.error_to_json)])
let delete_source_location =
  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 sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_source_location
           (Values.DeleteSourceLocationRequest.make ~sourceLocationName ())
           (Some Values.DeleteSourceLocationResponse.to_json)
           (Some Values.DeleteSourceLocationResponse.error_to_json)])
let delete_vod_source =
  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 sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string"
       and vodSourceName =
         flag "vod-source-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_vod_source
           (Values.DeleteVodSourceRequest.make ~sourceLocationName
              ~vodSourceName ())
           (Some Values.DeleteVodSourceResponse.to_json)
           (Some Values.DeleteVodSourceResponse.error_to_json)])
let describe_channel =
  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 channelName =
         flag "channel-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_channel
           (Values.DescribeChannelRequest.make ~channelName ())
           (Some Values.DescribeChannelResponse.to_json)
           (Some Values.DescribeChannelResponse.error_to_json)])
let describe_live_source =
  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 liveSourceName =
         flag "live-source-name" (required string) ~doc:"STRING __string"
       and sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_live_source
           (Values.DescribeLiveSourceRequest.make ~liveSourceName
              ~sourceLocationName ())
           (Some Values.DescribeLiveSourceResponse.to_json)
           (Some Values.DescribeLiveSourceResponse.error_to_json)])
let describe_program =
  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 channelName =
         flag "channel-name" (required string) ~doc:"STRING __string"
       and programName =
         flag "program-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_program
           (Values.DescribeProgramRequest.make ~channelName ~programName ())
           (Some Values.DescribeProgramResponse.to_json)
           (Some Values.DescribeProgramResponse.error_to_json)])
let describe_source_location =
  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 sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_source_location
           (Values.DescribeSourceLocationRequest.make ~sourceLocationName ())
           (Some Values.DescribeSourceLocationResponse.to_json)
           (Some Values.DescribeSourceLocationResponse.error_to_json)])
let describe_vod_source =
  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 sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string"
       and vodSourceName =
         flag "vod-source-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_vod_source
           (Values.DescribeVodSourceRequest.make ~sourceLocationName
              ~vodSourceName ())
           (Some Values.DescribeVodSourceResponse.to_json)
           (Some Values.DescribeVodSourceResponse.error_to_json)])
let get_channel_policy =
  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 channelName =
         flag "channel-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_channel_policy
           (Values.GetChannelPolicyRequest.make ~channelName ())
           (Some Values.GetChannelPolicyResponse.to_json)
           (Some Values.GetChannelPolicyResponse.error_to_json)])
let get_channel_schedule =
  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 durationMinutes =
         flag "duration-minutes" (optional string) ~doc:"STRING __string"
       and maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING __string"
       and audience =
         flag "audience" (optional string) ~doc:"STRING __string"
       and channelName =
         flag "channel-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_channel_schedule
           (Values.GetChannelScheduleRequest.make ?durationMinutes
              ?maxResults ?nextToken ?audience ~channelName ())
           (Some Values.GetChannelScheduleResponse.to_json)
           (Some Values.GetChannelScheduleResponse.error_to_json)])
let get_function =
  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 functionId =
         flag "function-id" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_function (Values.GetFunctionRequest.make ~functionId ())
           (Some Values.GetFunctionResponse.to_json)
           (Some Values.GetFunctionResponse.error_to_json)])
let get_playback_configuration =
  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 __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_playback_configuration
           (Values.GetPlaybackConfigurationRequest.make ~name ())
           (Some Values.GetPlaybackConfigurationResponse.to_json)
           (Some Values.GetPlaybackConfigurationResponse.error_to_json)])
let get_prefetch_schedule =
  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 __string"
       and playbackConfigurationName =
         flag "playback-configuration-name" (required string)
           ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_prefetch_schedule
           (Values.GetPrefetchScheduleRequest.make ~name
              ~playbackConfigurationName ())
           (Some Values.GetPrefetchScheduleResponse.to_json)
           (Some Values.GetPrefetchScheduleResponse.error_to_json)])
let list_alerts =
  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 maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING __string"
       and resourceArn =
         flag "resource-arn" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_alerts
           (Values.ListAlertsRequest.make ?maxResults ?nextToken ~resourceArn
              ()) (Some Values.ListAlertsResponse.to_json)
           (Some Values.ListAlertsResponse.error_to_json)])
let list_channels =
  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 maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_channels
           (Values.ListChannelsRequest.make ?maxResults ?nextToken ())
           (Some Values.ListChannelsResponse.to_json)
           (Some Values.ListChannelsResponse.error_to_json)])
let list_functions =
  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 maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_functions
           (Values.ListFunctionsRequest.make ?maxResults ?nextToken ())
           (Some Values.ListFunctionsResponse.to_json)
           (Some Values.ListFunctionsResponse.error_to_json)])
let list_live_sources =
  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 maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING __string"
       and sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_live_sources
           (Values.ListLiveSourcesRequest.make ?maxResults ?nextToken
              ~sourceLocationName ())
           (Some Values.ListLiveSourcesResponse.to_json)
           (Some Values.ListLiveSourcesResponse.error_to_json)])
let list_playback_configurations =
  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 maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_playback_configurations
           (Values.ListPlaybackConfigurationsRequest.make ?maxResults
              ?nextToken ())
           (Some Values.ListPlaybackConfigurationsResponse.to_json)
           (Some Values.ListPlaybackConfigurationsResponse.error_to_json)])
let list_prefetch_schedules =
  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 maxResults =
         flag "max-results" (optional int) ~doc:"INT __integerMin1Max100"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING __string"
       and scheduleType =
         flag "schedule-type" (optional json_arg)
           ~doc:"JSON ListPrefetchScheduleType"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING __string"
       and playbackConfigurationName =
         flag "playback-configuration-name" (required string)
           ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_prefetch_schedules
           (Values.ListPrefetchSchedulesRequest.make ?maxResults ?nextToken
              ?scheduleType:(Option.map
                               ~f:Values.ListPrefetchScheduleType.of_json
                               scheduleType) ?streamId
              ~playbackConfigurationName ())
           (Some Values.ListPrefetchSchedulesResponse.to_json)
           (Some Values.ListPrefetchSchedulesResponse.error_to_json)])
let list_source_locations =
  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 maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_source_locations
           (Values.ListSourceLocationsRequest.make ?maxResults ?nextToken ())
           (Some Values.ListSourceLocationsResponse.to_json)
           (Some Values.ListSourceLocationsResponse.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 __string" 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 list_vod_sources =
  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 maxResults =
         flag "max-results" (optional int) ~doc:"INT MaxResults"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING __string"
       and sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_vod_sources
           (Values.ListVodSourcesRequest.make ?maxResults ?nextToken
              ~sourceLocationName ())
           (Some Values.ListVodSourcesResponse.to_json)
           (Some Values.ListVodSourcesResponse.error_to_json)])
let put_channel_policy =
  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 channelName =
         flag "channel-name" (required string) ~doc:"STRING __string"
       and policy = flag "policy" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.put_channel_policy
           (Values.PutChannelPolicyRequest.make ~channelName ~policy ())
           (Some Values.PutChannelPolicyResponse.to_json)
           (Some Values.PutChannelPolicyResponse.error_to_json)])
let put_function =
  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 __string"
       and httpRequestConfiguration =
         flag "http-request-configuration" (optional json_arg)
           ~doc:"JSON HttpRequestConfiguration"
       and customOutputConfiguration =
         flag "custom-output-configuration" (optional json_arg)
           ~doc:"JSON CustomOutputConfiguration"
       and sequentialExecutorConfiguration =
         flag "sequential-executor-configuration" (optional json_arg)
           ~doc:"JSON SequentialExecutorConfiguration"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON __mapOf__string"
       and functionId =
         flag "function-id" (required string) ~doc:"STRING __string"
       and functionType =
         flag "function-type" (required json_arg) ~doc:"JSON FunctionType" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.put_function
           (Values.PutFunctionRequest.make ?description
              ?httpRequestConfiguration:(Option.map
                                           ~f:Values.HttpRequestConfiguration.of_json
                                           httpRequestConfiguration)
              ?customOutputConfiguration:(Option.map
                                            ~f:Values.CustomOutputConfiguration.of_json
                                            customOutputConfiguration)
              ?sequentialExecutorConfiguration:(Option.map
                                                  ~f:Values.SequentialExecutorConfiguration.of_json
                                                  sequentialExecutorConfiguration)
              ?tags:(Option.map ~f:Values.Zz__mapOf__string.of_json tags)
              ~functionId
              ~functionType:(Values.FunctionType.of_json functionType) ())
           (Some Values.PutFunctionResponse.to_json)
           (Some Values.PutFunctionResponse.error_to_json)])
let put_playback_configuration =
  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 adDecisionServerUrl =
         flag "ad-decision-server-url" (optional string)
           ~doc:"STRING __string"
       and availSuppression =
         flag "avail-suppression" (optional json_arg)
           ~doc:"JSON AvailSuppression"
       and bumper = flag "bumper" (optional json_arg) ~doc:"JSON Bumper"
       and cdnConfiguration =
         flag "cdn-configuration" (optional json_arg)
           ~doc:"JSON CdnConfiguration"
       and configurationAliases =
         flag "configuration-aliases" (optional json_arg)
           ~doc:"JSON ConfigurationAliasesRequest"
       and dashConfiguration =
         flag "dash-configuration" (optional json_arg)
           ~doc:"JSON DashConfigurationForPut"
       and insertionMode =
         flag "insertion-mode" (optional json_arg) ~doc:"JSON InsertionMode"
       and livePreRollConfiguration =
         flag "live-pre-roll-configuration" (optional json_arg)
           ~doc:"JSON LivePreRollConfiguration"
       and manifestProcessingRules =
         flag "manifest-processing-rules" (optional json_arg)
           ~doc:"JSON ManifestProcessingRules"
       and personalizationThresholdSeconds =
         flag "personalization-threshold-seconds" (optional int)
           ~doc:"INT __integerMin1"
       and slateAdUrl =
         flag "slate-ad-url" (optional string) ~doc:"STRING __string"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON __mapOf__string"
       and transcodeProfileName =
         flag "transcode-profile-name" (optional string)
           ~doc:"STRING __string"
       and videoContentSourceUrl =
         flag "video-content-source-url" (optional string)
           ~doc:"STRING __string"
       and adConditioningConfiguration =
         flag "ad-conditioning-configuration" (optional json_arg)
           ~doc:"JSON AdConditioningConfiguration"
       and adDecisionServerConfiguration =
         flag "ad-decision-server-configuration" (optional json_arg)
           ~doc:"JSON AdDecisionServerConfiguration"
       and functionMapping =
         flag "function-mapping" (optional json_arg)
           ~doc:"JSON FunctionMapping"
       and name = flag "name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.put_playback_configuration
           (Values.PutPlaybackConfigurationRequest.make ?adDecisionServerUrl
              ?availSuppression:(Option.map
                                   ~f:Values.AvailSuppression.of_json
                                   availSuppression)
              ?bumper:(Option.map ~f:Values.Bumper.of_json bumper)
              ?cdnConfiguration:(Option.map
                                   ~f:Values.CdnConfiguration.of_json
                                   cdnConfiguration)
              ?configurationAliases:(Option.map
                                       ~f:Values.ConfigurationAliasesRequest.of_json
                                       configurationAliases)
              ?dashConfiguration:(Option.map
                                    ~f:Values.DashConfigurationForPut.of_json
                                    dashConfiguration)
              ?insertionMode:(Option.map ~f:Values.InsertionMode.of_json
                                insertionMode)
              ?livePreRollConfiguration:(Option.map
                                           ~f:Values.LivePreRollConfiguration.of_json
                                           livePreRollConfiguration)
              ?manifestProcessingRules:(Option.map
                                          ~f:Values.ManifestProcessingRules.of_json
                                          manifestProcessingRules)
              ?personalizationThresholdSeconds ?slateAdUrl
              ?tags:(Option.map ~f:Values.Zz__mapOf__string.of_json tags)
              ?transcodeProfileName ?videoContentSourceUrl
              ?adConditioningConfiguration:(Option.map
                                              ~f:Values.AdConditioningConfiguration.of_json
                                              adConditioningConfiguration)
              ?adDecisionServerConfiguration:(Option.map
                                                ~f:Values.AdDecisionServerConfiguration.of_json
                                                adDecisionServerConfiguration)
              ?functionMapping:(Option.map ~f:Values.FunctionMapping.of_json
                                  functionMapping) ~name ())
           (Some Values.PutPlaybackConfigurationResponse.to_json)
           (Some Values.PutPlaybackConfigurationResponse.error_to_json)])
let start_channel =
  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 channelName =
         flag "channel-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.start_channel (Values.StartChannelRequest.make ~channelName ())
           (Some Values.StartChannelResponse.to_json)
           (Some Values.StartChannelResponse.error_to_json)])
let stop_channel =
  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 channelName =
         flag "channel-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.stop_channel (Values.StopChannelRequest.make ~channelName ())
           (Some Values.StopChannelResponse.to_json)
           (Some Values.StopChannelResponse.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 __string"
       and tags = flag "tags" (required json_arg) ~doc:"JSON __mapOf__string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.tag_resource
           (Values.TagResourceRequest.make ~resourceArn
              ~tags:(Values.Zz__mapOf__string.of_json tags) ()) None None])
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 __string"
       and tagKeys =
         flag "tag-keys" (required json_arg) ~doc:"JSON __listOf__string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.untag_resource
           (Values.UntagResourceRequest.make ~resourceArn
              ~tagKeys:(Values.Zz__listOf__string.of_json tagKeys) ()) None
           None])
let update_channel =
  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 fillerSlate =
         flag "filler-slate" (optional json_arg) ~doc:"JSON SlateSource"
       and timeShiftConfiguration =
         flag "time-shift-configuration" (optional json_arg)
           ~doc:"JSON TimeShiftConfiguration"
       and audiences =
         flag "audiences" (optional json_arg) ~doc:"JSON Audiences"
       and channelName =
         flag "channel-name" (required string) ~doc:"STRING __string"
       and outputs =
         flag "outputs" (required json_arg) ~doc:"JSON RequestOutputs" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_channel
           (Values.UpdateChannelRequest.make
              ?fillerSlate:(Option.map ~f:Values.SlateSource.of_json
                              fillerSlate)
              ?timeShiftConfiguration:(Option.map
                                         ~f:Values.TimeShiftConfiguration.of_json
                                         timeShiftConfiguration)
              ?audiences:(Option.map ~f:Values.Audiences.of_json audiences)
              ~channelName ~outputs:(Values.RequestOutputs.of_json outputs)
              ()) (Some Values.UpdateChannelResponse.to_json)
           (Some Values.UpdateChannelResponse.error_to_json)])
let update_live_source =
  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 httpPackageConfigurations =
         flag "http-package-configurations" (required json_arg)
           ~doc:"JSON HttpPackageConfigurations"
       and liveSourceName =
         flag "live-source-name" (required string) ~doc:"STRING __string"
       and sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_live_source
           (Values.UpdateLiveSourceRequest.make
              ~httpPackageConfigurations:(Values.HttpPackageConfigurations.of_json
                                            httpPackageConfigurations)
              ~liveSourceName ~sourceLocationName ())
           (Some Values.UpdateLiveSourceResponse.to_json)
           (Some Values.UpdateLiveSourceResponse.error_to_json)])
let update_program =
  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 adBreaks =
         flag "ad-breaks" (optional json_arg) ~doc:"JSON __listOfAdBreak"
       and audienceMedia =
         flag "audience-media" (optional json_arg)
           ~doc:"JSON __listOfAudienceMedia"
       and channelName =
         flag "channel-name" (required string) ~doc:"STRING __string"
       and programName =
         flag "program-name" (required string) ~doc:"STRING __string"
       and scheduleConfiguration =
         flag "schedule-configuration" (required json_arg)
           ~doc:"JSON UpdateProgramScheduleConfiguration" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_program
           (Values.UpdateProgramRequest.make
              ?adBreaks:(Option.map ~f:Values.Zz__listOfAdBreak.of_json
                           adBreaks)
              ?audienceMedia:(Option.map
                                ~f:Values.Zz__listOfAudienceMedia.of_json
                                audienceMedia) ~channelName ~programName
              ~scheduleConfiguration:(Values.UpdateProgramScheduleConfiguration.of_json
                                        scheduleConfiguration) ())
           (Some Values.UpdateProgramResponse.to_json)
           (Some Values.UpdateProgramResponse.error_to_json)])
let update_source_location =
  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 accessConfiguration =
         flag "access-configuration" (optional json_arg)
           ~doc:"JSON AccessConfiguration"
       and defaultSegmentDeliveryConfiguration =
         flag "default-segment-delivery-configuration" (optional json_arg)
           ~doc:"JSON DefaultSegmentDeliveryConfiguration"
       and segmentDeliveryConfigurations =
         flag "segment-delivery-configurations" (optional json_arg)
           ~doc:"JSON __listOfSegmentDeliveryConfiguration"
       and httpConfiguration =
         flag "http-configuration" (required json_arg)
           ~doc:"JSON HttpConfiguration"
       and sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_source_location
           (Values.UpdateSourceLocationRequest.make
              ?accessConfiguration:(Option.map
                                      ~f:Values.AccessConfiguration.of_json
                                      accessConfiguration)
              ?defaultSegmentDeliveryConfiguration:(Option.map
                                                      ~f:Values.DefaultSegmentDeliveryConfiguration.of_json
                                                      defaultSegmentDeliveryConfiguration)
              ?segmentDeliveryConfigurations:(Option.map
                                                ~f:Values.Zz__listOfSegmentDeliveryConfiguration.of_json
                                                segmentDeliveryConfigurations)
              ~httpConfiguration:(Values.HttpConfiguration.of_json
                                    httpConfiguration) ~sourceLocationName ())
           (Some Values.UpdateSourceLocationResponse.to_json)
           (Some Values.UpdateSourceLocationResponse.error_to_json)])
let update_vod_source =
  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 httpPackageConfigurations =
         flag "http-package-configurations" (required json_arg)
           ~doc:"JSON HttpPackageConfigurations"
       and sourceLocationName =
         flag "source-location-name" (required string) ~doc:"STRING __string"
       and vodSourceName =
         flag "vod-source-name" (required string) ~doc:"STRING __string" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_vod_source
           (Values.UpdateVodSourceRequest.make
              ~httpPackageConfigurations:(Values.HttpPackageConfigurations.of_json
                                            httpPackageConfigurations)
              ~sourceLocationName ~vodSourceName ())
           (Some Values.UpdateVodSourceResponse.to_json)
           (Some Values.UpdateVodSourceResponse.error_to_json)])
let main =
  Command.group
    ~summary:((Awso.Service.to_string Values.service) ^ " commands")
    [("configure-logs-for-channel", configure_logs_for_channel);
    ("configure-logs-for-playback-configuration",
      configure_logs_for_playback_configuration);
    ("create-channel", create_channel);
    ("create-live-source", create_live_source);
    ("create-prefetch-schedule", create_prefetch_schedule);
    ("create-program", create_program);
    ("create-source-location", create_source_location);
    ("create-vod-source", create_vod_source);
    ("delete-channel", delete_channel);
    ("delete-channel-policy", delete_channel_policy);
    ("delete-function", delete_function);
    ("delete-live-source", delete_live_source);
    ("delete-playback-configuration", delete_playback_configuration);
    ("delete-prefetch-schedule", delete_prefetch_schedule);
    ("delete-program", delete_program);
    ("delete-source-location", delete_source_location);
    ("delete-vod-source", delete_vod_source);
    ("describe-channel", describe_channel);
    ("describe-live-source", describe_live_source);
    ("describe-program", describe_program);
    ("describe-source-location", describe_source_location);
    ("describe-vod-source", describe_vod_source);
    ("get-channel-policy", get_channel_policy);
    ("get-channel-schedule", get_channel_schedule);
    ("get-function", get_function);
    ("get-playback-configuration", get_playback_configuration);
    ("get-prefetch-schedule", get_prefetch_schedule);
    ("list-alerts", list_alerts);
    ("list-channels", list_channels);
    ("list-functions", list_functions);
    ("list-live-sources", list_live_sources);
    ("list-playback-configurations", list_playback_configurations);
    ("list-prefetch-schedules", list_prefetch_schedules);
    ("list-source-locations", list_source_locations);
    ("list-tags-for-resource", list_tags_for_resource);
    ("list-vod-sources", list_vod_sources);
    ("put-channel-policy", put_channel_policy);
    ("put-function", put_function);
    ("put-playback-configuration", put_playback_configuration);
    ("start-channel", start_channel);
    ("stop-channel", stop_channel);
    ("tag-resource", tag_resource);
    ("untag-resource", untag_resource);
    ("update-channel", update_channel);
    ("update-live-source", update_live_source);
    ("update-program", update_program);
    ("update-source-location", update_source_location);
    ("update-vod-source", update_vod_source)]