1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Origination {
    #[allow(missing_docs)] // documentation missing in model
    Allow,
    #[allow(missing_docs)] // documentation missing in model
    Deny,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for Origination {
    fn from(s: &str) -> Self {
        match s {
            "ALLOW" => Origination::Allow,
            "DENY" => Origination::Deny,
            other => Origination::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for Origination {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Origination::from(s))
    }
}
impl Origination {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Origination::Allow => "ALLOW",
            Origination::Deny => "DENY",
            Origination::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["ALLOW", "DENY"]
    }
}
impl AsRef<str> for Origination {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// A Microsoft Smooth Streaming (MSS) packaging configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MssPackage {
    /// A Microsoft Smooth Streaming (MSS) encryption configuration.
    pub encryption: std::option::Option<crate::model::MssEncryption>,
    /// The time window (in seconds) contained in each manifest.
    pub manifest_window_seconds: i32,
    /// The duration (in seconds) of each segment.
    pub segment_duration_seconds: i32,
    /// A StreamSelection configuration.
    pub stream_selection: std::option::Option<crate::model::StreamSelection>,
}
impl MssPackage {
    /// A Microsoft Smooth Streaming (MSS) encryption configuration.
    pub fn encryption(&self) -> std::option::Option<&crate::model::MssEncryption> {
        self.encryption.as_ref()
    }
    /// The time window (in seconds) contained in each manifest.
    pub fn manifest_window_seconds(&self) -> i32 {
        self.manifest_window_seconds
    }
    /// The duration (in seconds) of each segment.
    pub fn segment_duration_seconds(&self) -> i32 {
        self.segment_duration_seconds
    }
    /// A StreamSelection configuration.
    pub fn stream_selection(&self) -> std::option::Option<&crate::model::StreamSelection> {
        self.stream_selection.as_ref()
    }
}
impl std::fmt::Debug for MssPackage {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("MssPackage");
        formatter.field("encryption", &self.encryption);
        formatter.field("manifest_window_seconds", &self.manifest_window_seconds);
        formatter.field("segment_duration_seconds", &self.segment_duration_seconds);
        formatter.field("stream_selection", &self.stream_selection);
        formatter.finish()
    }
}
/// See [`MssPackage`](crate::model::MssPackage)
pub mod mss_package {

    /// A builder for [`MssPackage`](crate::model::MssPackage)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) encryption: std::option::Option<crate::model::MssEncryption>,
        pub(crate) manifest_window_seconds: std::option::Option<i32>,
        pub(crate) segment_duration_seconds: std::option::Option<i32>,
        pub(crate) stream_selection: std::option::Option<crate::model::StreamSelection>,
    }
    impl Builder {
        /// A Microsoft Smooth Streaming (MSS) encryption configuration.
        pub fn encryption(mut self, input: crate::model::MssEncryption) -> Self {
            self.encryption = Some(input);
            self
        }
        /// A Microsoft Smooth Streaming (MSS) encryption configuration.
        pub fn set_encryption(
            mut self,
            input: std::option::Option<crate::model::MssEncryption>,
        ) -> Self {
            self.encryption = input;
            self
        }
        /// The time window (in seconds) contained in each manifest.
        pub fn manifest_window_seconds(mut self, input: i32) -> Self {
            self.manifest_window_seconds = Some(input);
            self
        }
        /// The time window (in seconds) contained in each manifest.
        pub fn set_manifest_window_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.manifest_window_seconds = input;
            self
        }
        /// The duration (in seconds) of each segment.
        pub fn segment_duration_seconds(mut self, input: i32) -> Self {
            self.segment_duration_seconds = Some(input);
            self
        }
        /// The duration (in seconds) of each segment.
        pub fn set_segment_duration_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.segment_duration_seconds = input;
            self
        }
        /// A StreamSelection configuration.
        pub fn stream_selection(mut self, input: crate::model::StreamSelection) -> Self {
            self.stream_selection = Some(input);
            self
        }
        /// A StreamSelection configuration.
        pub fn set_stream_selection(
            mut self,
            input: std::option::Option<crate::model::StreamSelection>,
        ) -> Self {
            self.stream_selection = input;
            self
        }
        /// Consumes the builder and constructs a [`MssPackage`](crate::model::MssPackage)
        pub fn build(self) -> crate::model::MssPackage {
            crate::model::MssPackage {
                encryption: self.encryption,
                manifest_window_seconds: self.manifest_window_seconds.unwrap_or_default(),
                segment_duration_seconds: self.segment_duration_seconds.unwrap_or_default(),
                stream_selection: self.stream_selection,
            }
        }
    }
}
impl MssPackage {
    /// Creates a new builder-style object to manufacture [`MssPackage`](crate::model::MssPackage)
    pub fn builder() -> crate::model::mss_package::Builder {
        crate::model::mss_package::Builder::default()
    }
}

/// A StreamSelection configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StreamSelection {
    /// The maximum video bitrate (bps) to include in output.
    pub max_video_bits_per_second: i32,
    /// The minimum video bitrate (bps) to include in output.
    pub min_video_bits_per_second: i32,
    /// A directive that determines the order of streams in the output.
    pub stream_order: std::option::Option<crate::model::StreamOrder>,
}
impl StreamSelection {
    /// The maximum video bitrate (bps) to include in output.
    pub fn max_video_bits_per_second(&self) -> i32 {
        self.max_video_bits_per_second
    }
    /// The minimum video bitrate (bps) to include in output.
    pub fn min_video_bits_per_second(&self) -> i32 {
        self.min_video_bits_per_second
    }
    /// A directive that determines the order of streams in the output.
    pub fn stream_order(&self) -> std::option::Option<&crate::model::StreamOrder> {
        self.stream_order.as_ref()
    }
}
impl std::fmt::Debug for StreamSelection {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("StreamSelection");
        formatter.field("max_video_bits_per_second", &self.max_video_bits_per_second);
        formatter.field("min_video_bits_per_second", &self.min_video_bits_per_second);
        formatter.field("stream_order", &self.stream_order);
        formatter.finish()
    }
}
/// See [`StreamSelection`](crate::model::StreamSelection)
pub mod stream_selection {

    /// A builder for [`StreamSelection`](crate::model::StreamSelection)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) max_video_bits_per_second: std::option::Option<i32>,
        pub(crate) min_video_bits_per_second: std::option::Option<i32>,
        pub(crate) stream_order: std::option::Option<crate::model::StreamOrder>,
    }
    impl Builder {
        /// The maximum video bitrate (bps) to include in output.
        pub fn max_video_bits_per_second(mut self, input: i32) -> Self {
            self.max_video_bits_per_second = Some(input);
            self
        }
        /// The maximum video bitrate (bps) to include in output.
        pub fn set_max_video_bits_per_second(mut self, input: std::option::Option<i32>) -> Self {
            self.max_video_bits_per_second = input;
            self
        }
        /// The minimum video bitrate (bps) to include in output.
        pub fn min_video_bits_per_second(mut self, input: i32) -> Self {
            self.min_video_bits_per_second = Some(input);
            self
        }
        /// The minimum video bitrate (bps) to include in output.
        pub fn set_min_video_bits_per_second(mut self, input: std::option::Option<i32>) -> Self {
            self.min_video_bits_per_second = input;
            self
        }
        /// A directive that determines the order of streams in the output.
        pub fn stream_order(mut self, input: crate::model::StreamOrder) -> Self {
            self.stream_order = Some(input);
            self
        }
        /// A directive that determines the order of streams in the output.
        pub fn set_stream_order(
            mut self,
            input: std::option::Option<crate::model::StreamOrder>,
        ) -> Self {
            self.stream_order = input;
            self
        }
        /// Consumes the builder and constructs a [`StreamSelection`](crate::model::StreamSelection)
        pub fn build(self) -> crate::model::StreamSelection {
            crate::model::StreamSelection {
                max_video_bits_per_second: self.max_video_bits_per_second.unwrap_or_default(),
                min_video_bits_per_second: self.min_video_bits_per_second.unwrap_or_default(),
                stream_order: self.stream_order,
            }
        }
    }
}
impl StreamSelection {
    /// Creates a new builder-style object to manufacture [`StreamSelection`](crate::model::StreamSelection)
    pub fn builder() -> crate::model::stream_selection::Builder {
        crate::model::stream_selection::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum StreamOrder {
    #[allow(missing_docs)] // documentation missing in model
    Original,
    #[allow(missing_docs)] // documentation missing in model
    VideoBitrateAscending,
    #[allow(missing_docs)] // documentation missing in model
    VideoBitrateDescending,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for StreamOrder {
    fn from(s: &str) -> Self {
        match s {
            "ORIGINAL" => StreamOrder::Original,
            "VIDEO_BITRATE_ASCENDING" => StreamOrder::VideoBitrateAscending,
            "VIDEO_BITRATE_DESCENDING" => StreamOrder::VideoBitrateDescending,
            other => StreamOrder::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for StreamOrder {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(StreamOrder::from(s))
    }
}
impl StreamOrder {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            StreamOrder::Original => "ORIGINAL",
            StreamOrder::VideoBitrateAscending => "VIDEO_BITRATE_ASCENDING",
            StreamOrder::VideoBitrateDescending => "VIDEO_BITRATE_DESCENDING",
            StreamOrder::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &[
            "ORIGINAL",
            "VIDEO_BITRATE_ASCENDING",
            "VIDEO_BITRATE_DESCENDING",
        ]
    }
}
impl AsRef<str> for StreamOrder {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// A Microsoft Smooth Streaming (MSS) encryption configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MssEncryption {
    /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
    pub speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
}
impl MssEncryption {
    /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
    pub fn speke_key_provider(&self) -> std::option::Option<&crate::model::SpekeKeyProvider> {
        self.speke_key_provider.as_ref()
    }
}
impl std::fmt::Debug for MssEncryption {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("MssEncryption");
        formatter.field("speke_key_provider", &self.speke_key_provider);
        formatter.finish()
    }
}
/// See [`MssEncryption`](crate::model::MssEncryption)
pub mod mss_encryption {

    /// A builder for [`MssEncryption`](crate::model::MssEncryption)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
    }
    impl Builder {
        /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
        pub fn speke_key_provider(mut self, input: crate::model::SpekeKeyProvider) -> Self {
            self.speke_key_provider = Some(input);
            self
        }
        /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
        pub fn set_speke_key_provider(
            mut self,
            input: std::option::Option<crate::model::SpekeKeyProvider>,
        ) -> Self {
            self.speke_key_provider = input;
            self
        }
        /// Consumes the builder and constructs a [`MssEncryption`](crate::model::MssEncryption)
        pub fn build(self) -> crate::model::MssEncryption {
            crate::model::MssEncryption {
                speke_key_provider: self.speke_key_provider,
            }
        }
    }
}
impl MssEncryption {
    /// Creates a new builder-style object to manufacture [`MssEncryption`](crate::model::MssEncryption)
    pub fn builder() -> crate::model::mss_encryption::Builder {
        crate::model::mss_encryption::Builder::default()
    }
}

/// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SpekeKeyProvider {
    /// An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service.
    pub certificate_arn: std::option::Option<std::string::String>,
    /// Use encryptionContractConfiguration to configure one or more content encryption keys for your endpoints that use SPEKE 2.0. The encryption contract defines which content keys are used to encrypt the audio and video tracks in your stream. To configure the encryption contract, specify which audio and video encryption presets to use. Note the following considerations when using encryptionContractConfiguration: encryptionContractConfiguration can be used for DASH or CMAF endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 specification. You must disable key rotation for this endpoint by setting keyRotationIntervalSeconds to 0.
    pub encryption_contract_configuration:
        std::option::Option<crate::model::EncryptionContractConfiguration>,
    /// The resource ID to include in key requests.
    pub resource_id: std::option::Option<std::string::String>,
    /// An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service.
    pub role_arn: std::option::Option<std::string::String>,
    /// The system IDs to include in key requests.
    pub system_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// The URL of the external key provider service.
    pub url: std::option::Option<std::string::String>,
}
impl SpekeKeyProvider {
    /// An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service.
    pub fn certificate_arn(&self) -> std::option::Option<&str> {
        self.certificate_arn.as_deref()
    }
    /// Use encryptionContractConfiguration to configure one or more content encryption keys for your endpoints that use SPEKE 2.0. The encryption contract defines which content keys are used to encrypt the audio and video tracks in your stream. To configure the encryption contract, specify which audio and video encryption presets to use. Note the following considerations when using encryptionContractConfiguration: encryptionContractConfiguration can be used for DASH or CMAF endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 specification. You must disable key rotation for this endpoint by setting keyRotationIntervalSeconds to 0.
    pub fn encryption_contract_configuration(
        &self,
    ) -> std::option::Option<&crate::model::EncryptionContractConfiguration> {
        self.encryption_contract_configuration.as_ref()
    }
    /// The resource ID to include in key requests.
    pub fn resource_id(&self) -> std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service.
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// The system IDs to include in key requests.
    pub fn system_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.system_ids.as_deref()
    }
    /// The URL of the external key provider service.
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
}
impl std::fmt::Debug for SpekeKeyProvider {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("SpekeKeyProvider");
        formatter.field("certificate_arn", &self.certificate_arn);
        formatter.field(
            "encryption_contract_configuration",
            &self.encryption_contract_configuration,
        );
        formatter.field("resource_id", &self.resource_id);
        formatter.field("role_arn", &self.role_arn);
        formatter.field("system_ids", &self.system_ids);
        formatter.field("url", &self.url);
        formatter.finish()
    }
}
/// See [`SpekeKeyProvider`](crate::model::SpekeKeyProvider)
pub mod speke_key_provider {

    /// A builder for [`SpekeKeyProvider`](crate::model::SpekeKeyProvider)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) certificate_arn: std::option::Option<std::string::String>,
        pub(crate) encryption_contract_configuration:
            std::option::Option<crate::model::EncryptionContractConfiguration>,
        pub(crate) resource_id: std::option::Option<std::string::String>,
        pub(crate) role_arn: std::option::Option<std::string::String>,
        pub(crate) system_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) url: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service.
        pub fn certificate_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.certificate_arn = Some(input.into());
            self
        }
        /// An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service.
        pub fn set_certificate_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.certificate_arn = input;
            self
        }
        /// Use encryptionContractConfiguration to configure one or more content encryption keys for your endpoints that use SPEKE 2.0. The encryption contract defines which content keys are used to encrypt the audio and video tracks in your stream. To configure the encryption contract, specify which audio and video encryption presets to use. Note the following considerations when using encryptionContractConfiguration: encryptionContractConfiguration can be used for DASH or CMAF endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 specification. You must disable key rotation for this endpoint by setting keyRotationIntervalSeconds to 0.
        pub fn encryption_contract_configuration(
            mut self,
            input: crate::model::EncryptionContractConfiguration,
        ) -> Self {
            self.encryption_contract_configuration = Some(input);
            self
        }
        /// Use encryptionContractConfiguration to configure one or more content encryption keys for your endpoints that use SPEKE 2.0. The encryption contract defines which content keys are used to encrypt the audio and video tracks in your stream. To configure the encryption contract, specify which audio and video encryption presets to use. Note the following considerations when using encryptionContractConfiguration: encryptionContractConfiguration can be used for DASH or CMAF endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 specification. You must disable key rotation for this endpoint by setting keyRotationIntervalSeconds to 0.
        pub fn set_encryption_contract_configuration(
            mut self,
            input: std::option::Option<crate::model::EncryptionContractConfiguration>,
        ) -> Self {
            self.encryption_contract_configuration = input;
            self
        }
        /// The resource ID to include in key requests.
        pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_id = Some(input.into());
            self
        }
        /// The resource ID to include in key requests.
        pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_id = input;
            self
        }
        /// An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service.
        pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.role_arn = Some(input.into());
            self
        }
        /// An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service.
        pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.role_arn = input;
            self
        }
        /// Appends an item to `system_ids`.
        ///
        /// To override the contents of this collection use [`set_system_ids`](Self::set_system_ids).
        ///
        /// The system IDs to include in key requests.
        pub fn system_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.system_ids.unwrap_or_default();
            v.push(input.into());
            self.system_ids = Some(v);
            self
        }
        /// The system IDs to include in key requests.
        pub fn set_system_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.system_ids = input;
            self
        }
        /// The URL of the external key provider service.
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// The URL of the external key provider service.
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// Consumes the builder and constructs a [`SpekeKeyProvider`](crate::model::SpekeKeyProvider)
        pub fn build(self) -> crate::model::SpekeKeyProvider {
            crate::model::SpekeKeyProvider {
                certificate_arn: self.certificate_arn,
                encryption_contract_configuration: self.encryption_contract_configuration,
                resource_id: self.resource_id,
                role_arn: self.role_arn,
                system_ids: self.system_ids,
                url: self.url,
            }
        }
    }
}
impl SpekeKeyProvider {
    /// Creates a new builder-style object to manufacture [`SpekeKeyProvider`](crate::model::SpekeKeyProvider)
    pub fn builder() -> crate::model::speke_key_provider::Builder {
        crate::model::speke_key_provider::Builder::default()
    }
}

/// Use encryptionContractConfiguration to configure one or more content encryption keys for your endpoints that use SPEKE 2.0. The encryption contract defines which content keys are used to encrypt the audio and video tracks in your stream. To configure the encryption contract, specify which audio and video encryption presets to use. Note the following considerations when using encryptionContractConfiguration: encryptionContractConfiguration can be used for DASH or CMAF endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 specification. You must disable key rotation for this endpoint by setting keyRotationIntervalSeconds to 0.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EncryptionContractConfiguration {
    /// A collection of audio encryption presets.
    pub preset_speke20_audio: std::option::Option<crate::model::PresetSpeke20Audio>,
    /// A collection of video encryption presets.
    pub preset_speke20_video: std::option::Option<crate::model::PresetSpeke20Video>,
}
impl EncryptionContractConfiguration {
    /// A collection of audio encryption presets.
    pub fn preset_speke20_audio(&self) -> std::option::Option<&crate::model::PresetSpeke20Audio> {
        self.preset_speke20_audio.as_ref()
    }
    /// A collection of video encryption presets.
    pub fn preset_speke20_video(&self) -> std::option::Option<&crate::model::PresetSpeke20Video> {
        self.preset_speke20_video.as_ref()
    }
}
impl std::fmt::Debug for EncryptionContractConfiguration {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("EncryptionContractConfiguration");
        formatter.field("preset_speke20_audio", &self.preset_speke20_audio);
        formatter.field("preset_speke20_video", &self.preset_speke20_video);
        formatter.finish()
    }
}
/// See [`EncryptionContractConfiguration`](crate::model::EncryptionContractConfiguration)
pub mod encryption_contract_configuration {

    /// A builder for [`EncryptionContractConfiguration`](crate::model::EncryptionContractConfiguration)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) preset_speke20_audio: std::option::Option<crate::model::PresetSpeke20Audio>,
        pub(crate) preset_speke20_video: std::option::Option<crate::model::PresetSpeke20Video>,
    }
    impl Builder {
        /// A collection of audio encryption presets.
        pub fn preset_speke20_audio(mut self, input: crate::model::PresetSpeke20Audio) -> Self {
            self.preset_speke20_audio = Some(input);
            self
        }
        /// A collection of audio encryption presets.
        pub fn set_preset_speke20_audio(
            mut self,
            input: std::option::Option<crate::model::PresetSpeke20Audio>,
        ) -> Self {
            self.preset_speke20_audio = input;
            self
        }
        /// A collection of video encryption presets.
        pub fn preset_speke20_video(mut self, input: crate::model::PresetSpeke20Video) -> Self {
            self.preset_speke20_video = Some(input);
            self
        }
        /// A collection of video encryption presets.
        pub fn set_preset_speke20_video(
            mut self,
            input: std::option::Option<crate::model::PresetSpeke20Video>,
        ) -> Self {
            self.preset_speke20_video = input;
            self
        }
        /// Consumes the builder and constructs a [`EncryptionContractConfiguration`](crate::model::EncryptionContractConfiguration)
        pub fn build(self) -> crate::model::EncryptionContractConfiguration {
            crate::model::EncryptionContractConfiguration {
                preset_speke20_audio: self.preset_speke20_audio,
                preset_speke20_video: self.preset_speke20_video,
            }
        }
    }
}
impl EncryptionContractConfiguration {
    /// Creates a new builder-style object to manufacture [`EncryptionContractConfiguration`](crate::model::EncryptionContractConfiguration)
    pub fn builder() -> crate::model::encryption_contract_configuration::Builder {
        crate::model::encryption_contract_configuration::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum PresetSpeke20Video {
    #[allow(missing_docs)] // documentation missing in model
    PresetVideo1,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for PresetSpeke20Video {
    fn from(s: &str) -> Self {
        match s {
            "PRESET-VIDEO-1" => PresetSpeke20Video::PresetVideo1,
            other => PresetSpeke20Video::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for PresetSpeke20Video {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PresetSpeke20Video::from(s))
    }
}
impl PresetSpeke20Video {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PresetSpeke20Video::PresetVideo1 => "PRESET-VIDEO-1",
            PresetSpeke20Video::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["PRESET-VIDEO-1"]
    }
}
impl AsRef<str> for PresetSpeke20Video {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum PresetSpeke20Audio {
    #[allow(missing_docs)] // documentation missing in model
    PresetAudio1,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for PresetSpeke20Audio {
    fn from(s: &str) -> Self {
        match s {
            "PRESET-AUDIO-1" => PresetSpeke20Audio::PresetAudio1,
            other => PresetSpeke20Audio::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for PresetSpeke20Audio {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PresetSpeke20Audio::from(s))
    }
}
impl PresetSpeke20Audio {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PresetSpeke20Audio::PresetAudio1 => "PRESET-AUDIO-1",
            PresetSpeke20Audio::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["PRESET-AUDIO-1"]
    }
}
impl AsRef<str> for PresetSpeke20Audio {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// An HTTP Live Streaming (HLS) packaging configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HlsPackage {
    /// This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
    pub ad_markers: std::option::Option<crate::model::AdMarkers>,
    /// A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
    pub ad_triggers: std::option::Option<std::vec::Vec<crate::model::AdTriggersElement>>,
    /// This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
    pub ads_on_delivery_restrictions: std::option::Option<crate::model::AdsOnDeliveryRestrictions>,
    /// An HTTP Live Streaming (HLS) encryption configuration.
    pub encryption: std::option::Option<crate::model::HlsEncryption>,
    /// When enabled, MediaPackage passes through digital video broadcasting (DVB) subtitles into the output.
    pub include_dvb_subtitles: bool,
    /// When enabled, an I-Frame only stream will be included in the output.
    pub include_iframe_only_stream: bool,
    /// The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
    pub playlist_type: std::option::Option<crate::model::PlaylistType>,
    /// Time window (in seconds) contained in each parent manifest.
    pub playlist_window_seconds: i32,
    /// The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
    pub program_date_time_interval_seconds: i32,
    /// Duration (in seconds) of each fragment. Actual fragments will be rounded to the nearest multiple of the source fragment duration.
    pub segment_duration_seconds: i32,
    /// A StreamSelection configuration.
    pub stream_selection: std::option::Option<crate::model::StreamSelection>,
    /// When enabled, audio streams will be placed in rendition groups in the output.
    pub use_audio_rendition_group: bool,
}
impl HlsPackage {
    /// This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
    pub fn ad_markers(&self) -> std::option::Option<&crate::model::AdMarkers> {
        self.ad_markers.as_ref()
    }
    /// A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
    pub fn ad_triggers(&self) -> std::option::Option<&[crate::model::AdTriggersElement]> {
        self.ad_triggers.as_deref()
    }
    /// This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
    pub fn ads_on_delivery_restrictions(
        &self,
    ) -> std::option::Option<&crate::model::AdsOnDeliveryRestrictions> {
        self.ads_on_delivery_restrictions.as_ref()
    }
    /// An HTTP Live Streaming (HLS) encryption configuration.
    pub fn encryption(&self) -> std::option::Option<&crate::model::HlsEncryption> {
        self.encryption.as_ref()
    }
    /// When enabled, MediaPackage passes through digital video broadcasting (DVB) subtitles into the output.
    pub fn include_dvb_subtitles(&self) -> bool {
        self.include_dvb_subtitles
    }
    /// When enabled, an I-Frame only stream will be included in the output.
    pub fn include_iframe_only_stream(&self) -> bool {
        self.include_iframe_only_stream
    }
    /// The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
    pub fn playlist_type(&self) -> std::option::Option<&crate::model::PlaylistType> {
        self.playlist_type.as_ref()
    }
    /// Time window (in seconds) contained in each parent manifest.
    pub fn playlist_window_seconds(&self) -> i32 {
        self.playlist_window_seconds
    }
    /// The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
    pub fn program_date_time_interval_seconds(&self) -> i32 {
        self.program_date_time_interval_seconds
    }
    /// Duration (in seconds) of each fragment. Actual fragments will be rounded to the nearest multiple of the source fragment duration.
    pub fn segment_duration_seconds(&self) -> i32 {
        self.segment_duration_seconds
    }
    /// A StreamSelection configuration.
    pub fn stream_selection(&self) -> std::option::Option<&crate::model::StreamSelection> {
        self.stream_selection.as_ref()
    }
    /// When enabled, audio streams will be placed in rendition groups in the output.
    pub fn use_audio_rendition_group(&self) -> bool {
        self.use_audio_rendition_group
    }
}
impl std::fmt::Debug for HlsPackage {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("HlsPackage");
        formatter.field("ad_markers", &self.ad_markers);
        formatter.field("ad_triggers", &self.ad_triggers);
        formatter.field(
            "ads_on_delivery_restrictions",
            &self.ads_on_delivery_restrictions,
        );
        formatter.field("encryption", &self.encryption);
        formatter.field("include_dvb_subtitles", &self.include_dvb_subtitles);
        formatter.field(
            "include_iframe_only_stream",
            &self.include_iframe_only_stream,
        );
        formatter.field("playlist_type", &self.playlist_type);
        formatter.field("playlist_window_seconds", &self.playlist_window_seconds);
        formatter.field(
            "program_date_time_interval_seconds",
            &self.program_date_time_interval_seconds,
        );
        formatter.field("segment_duration_seconds", &self.segment_duration_seconds);
        formatter.field("stream_selection", &self.stream_selection);
        formatter.field("use_audio_rendition_group", &self.use_audio_rendition_group);
        formatter.finish()
    }
}
/// See [`HlsPackage`](crate::model::HlsPackage)
pub mod hls_package {

    /// A builder for [`HlsPackage`](crate::model::HlsPackage)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ad_markers: std::option::Option<crate::model::AdMarkers>,
        pub(crate) ad_triggers: std::option::Option<std::vec::Vec<crate::model::AdTriggersElement>>,
        pub(crate) ads_on_delivery_restrictions:
            std::option::Option<crate::model::AdsOnDeliveryRestrictions>,
        pub(crate) encryption: std::option::Option<crate::model::HlsEncryption>,
        pub(crate) include_dvb_subtitles: std::option::Option<bool>,
        pub(crate) include_iframe_only_stream: std::option::Option<bool>,
        pub(crate) playlist_type: std::option::Option<crate::model::PlaylistType>,
        pub(crate) playlist_window_seconds: std::option::Option<i32>,
        pub(crate) program_date_time_interval_seconds: std::option::Option<i32>,
        pub(crate) segment_duration_seconds: std::option::Option<i32>,
        pub(crate) stream_selection: std::option::Option<crate::model::StreamSelection>,
        pub(crate) use_audio_rendition_group: std::option::Option<bool>,
    }
    impl Builder {
        /// This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
        pub fn ad_markers(mut self, input: crate::model::AdMarkers) -> Self {
            self.ad_markers = Some(input);
            self
        }
        /// This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
        pub fn set_ad_markers(
            mut self,
            input: std::option::Option<crate::model::AdMarkers>,
        ) -> Self {
            self.ad_markers = input;
            self
        }
        /// Appends an item to `ad_triggers`.
        ///
        /// To override the contents of this collection use [`set_ad_triggers`](Self::set_ad_triggers).
        ///
        /// A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
        pub fn ad_triggers(mut self, input: crate::model::AdTriggersElement) -> Self {
            let mut v = self.ad_triggers.unwrap_or_default();
            v.push(input);
            self.ad_triggers = Some(v);
            self
        }
        /// A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
        pub fn set_ad_triggers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AdTriggersElement>>,
        ) -> Self {
            self.ad_triggers = input;
            self
        }
        /// This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
        pub fn ads_on_delivery_restrictions(
            mut self,
            input: crate::model::AdsOnDeliveryRestrictions,
        ) -> Self {
            self.ads_on_delivery_restrictions = Some(input);
            self
        }
        /// This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
        pub fn set_ads_on_delivery_restrictions(
            mut self,
            input: std::option::Option<crate::model::AdsOnDeliveryRestrictions>,
        ) -> Self {
            self.ads_on_delivery_restrictions = input;
            self
        }
        /// An HTTP Live Streaming (HLS) encryption configuration.
        pub fn encryption(mut self, input: crate::model::HlsEncryption) -> Self {
            self.encryption = Some(input);
            self
        }
        /// An HTTP Live Streaming (HLS) encryption configuration.
        pub fn set_encryption(
            mut self,
            input: std::option::Option<crate::model::HlsEncryption>,
        ) -> Self {
            self.encryption = input;
            self
        }
        /// When enabled, MediaPackage passes through digital video broadcasting (DVB) subtitles into the output.
        pub fn include_dvb_subtitles(mut self, input: bool) -> Self {
            self.include_dvb_subtitles = Some(input);
            self
        }
        /// When enabled, MediaPackage passes through digital video broadcasting (DVB) subtitles into the output.
        pub fn set_include_dvb_subtitles(mut self, input: std::option::Option<bool>) -> Self {
            self.include_dvb_subtitles = input;
            self
        }
        /// When enabled, an I-Frame only stream will be included in the output.
        pub fn include_iframe_only_stream(mut self, input: bool) -> Self {
            self.include_iframe_only_stream = Some(input);
            self
        }
        /// When enabled, an I-Frame only stream will be included in the output.
        pub fn set_include_iframe_only_stream(mut self, input: std::option::Option<bool>) -> Self {
            self.include_iframe_only_stream = input;
            self
        }
        /// The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
        pub fn playlist_type(mut self, input: crate::model::PlaylistType) -> Self {
            self.playlist_type = Some(input);
            self
        }
        /// The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
        pub fn set_playlist_type(
            mut self,
            input: std::option::Option<crate::model::PlaylistType>,
        ) -> Self {
            self.playlist_type = input;
            self
        }
        /// Time window (in seconds) contained in each parent manifest.
        pub fn playlist_window_seconds(mut self, input: i32) -> Self {
            self.playlist_window_seconds = Some(input);
            self
        }
        /// Time window (in seconds) contained in each parent manifest.
        pub fn set_playlist_window_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.playlist_window_seconds = input;
            self
        }
        /// The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
        pub fn program_date_time_interval_seconds(mut self, input: i32) -> Self {
            self.program_date_time_interval_seconds = Some(input);
            self
        }
        /// The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
        pub fn set_program_date_time_interval_seconds(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.program_date_time_interval_seconds = input;
            self
        }
        /// Duration (in seconds) of each fragment. Actual fragments will be rounded to the nearest multiple of the source fragment duration.
        pub fn segment_duration_seconds(mut self, input: i32) -> Self {
            self.segment_duration_seconds = Some(input);
            self
        }
        /// Duration (in seconds) of each fragment. Actual fragments will be rounded to the nearest multiple of the source fragment duration.
        pub fn set_segment_duration_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.segment_duration_seconds = input;
            self
        }
        /// A StreamSelection configuration.
        pub fn stream_selection(mut self, input: crate::model::StreamSelection) -> Self {
            self.stream_selection = Some(input);
            self
        }
        /// A StreamSelection configuration.
        pub fn set_stream_selection(
            mut self,
            input: std::option::Option<crate::model::StreamSelection>,
        ) -> Self {
            self.stream_selection = input;
            self
        }
        /// When enabled, audio streams will be placed in rendition groups in the output.
        pub fn use_audio_rendition_group(mut self, input: bool) -> Self {
            self.use_audio_rendition_group = Some(input);
            self
        }
        /// When enabled, audio streams will be placed in rendition groups in the output.
        pub fn set_use_audio_rendition_group(mut self, input: std::option::Option<bool>) -> Self {
            self.use_audio_rendition_group = input;
            self
        }
        /// Consumes the builder and constructs a [`HlsPackage`](crate::model::HlsPackage)
        pub fn build(self) -> crate::model::HlsPackage {
            crate::model::HlsPackage {
                ad_markers: self.ad_markers,
                ad_triggers: self.ad_triggers,
                ads_on_delivery_restrictions: self.ads_on_delivery_restrictions,
                encryption: self.encryption,
                include_dvb_subtitles: self.include_dvb_subtitles.unwrap_or_default(),
                include_iframe_only_stream: self.include_iframe_only_stream.unwrap_or_default(),
                playlist_type: self.playlist_type,
                playlist_window_seconds: self.playlist_window_seconds.unwrap_or_default(),
                program_date_time_interval_seconds: self
                    .program_date_time_interval_seconds
                    .unwrap_or_default(),
                segment_duration_seconds: self.segment_duration_seconds.unwrap_or_default(),
                stream_selection: self.stream_selection,
                use_audio_rendition_group: self.use_audio_rendition_group.unwrap_or_default(),
            }
        }
    }
}
impl HlsPackage {
    /// Creates a new builder-style object to manufacture [`HlsPackage`](crate::model::HlsPackage)
    pub fn builder() -> crate::model::hls_package::Builder {
        crate::model::hls_package::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum PlaylistType {
    #[allow(missing_docs)] // documentation missing in model
    Event,
    #[allow(missing_docs)] // documentation missing in model
    None,
    #[allow(missing_docs)] // documentation missing in model
    Vod,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for PlaylistType {
    fn from(s: &str) -> Self {
        match s {
            "EVENT" => PlaylistType::Event,
            "NONE" => PlaylistType::None,
            "VOD" => PlaylistType::Vod,
            other => PlaylistType::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for PlaylistType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PlaylistType::from(s))
    }
}
impl PlaylistType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PlaylistType::Event => "EVENT",
            PlaylistType::None => "NONE",
            PlaylistType::Vod => "VOD",
            PlaylistType::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["EVENT", "NONE", "VOD"]
    }
}
impl AsRef<str> for PlaylistType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// An HTTP Live Streaming (HLS) encryption configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HlsEncryption {
    /// A constant initialization vector for encryption (optional). When not specified the initialization vector will be periodically rotated.
    pub constant_initialization_vector: std::option::Option<std::string::String>,
    /// The encryption method to use.
    pub encryption_method: std::option::Option<crate::model::EncryptionMethod>,
    /// Interval (in seconds) between each encryption key rotation.
    pub key_rotation_interval_seconds: i32,
    /// When enabled, the EXT-X-KEY tag will be repeated in output manifests.
    pub repeat_ext_x_key: bool,
    /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
    pub speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
}
impl HlsEncryption {
    /// A constant initialization vector for encryption (optional). When not specified the initialization vector will be periodically rotated.
    pub fn constant_initialization_vector(&self) -> std::option::Option<&str> {
        self.constant_initialization_vector.as_deref()
    }
    /// The encryption method to use.
    pub fn encryption_method(&self) -> std::option::Option<&crate::model::EncryptionMethod> {
        self.encryption_method.as_ref()
    }
    /// Interval (in seconds) between each encryption key rotation.
    pub fn key_rotation_interval_seconds(&self) -> i32 {
        self.key_rotation_interval_seconds
    }
    /// When enabled, the EXT-X-KEY tag will be repeated in output manifests.
    pub fn repeat_ext_x_key(&self) -> bool {
        self.repeat_ext_x_key
    }
    /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
    pub fn speke_key_provider(&self) -> std::option::Option<&crate::model::SpekeKeyProvider> {
        self.speke_key_provider.as_ref()
    }
}
impl std::fmt::Debug for HlsEncryption {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("HlsEncryption");
        formatter.field(
            "constant_initialization_vector",
            &self.constant_initialization_vector,
        );
        formatter.field("encryption_method", &self.encryption_method);
        formatter.field(
            "key_rotation_interval_seconds",
            &self.key_rotation_interval_seconds,
        );
        formatter.field("repeat_ext_x_key", &self.repeat_ext_x_key);
        formatter.field("speke_key_provider", &self.speke_key_provider);
        formatter.finish()
    }
}
/// See [`HlsEncryption`](crate::model::HlsEncryption)
pub mod hls_encryption {

    /// A builder for [`HlsEncryption`](crate::model::HlsEncryption)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) constant_initialization_vector: std::option::Option<std::string::String>,
        pub(crate) encryption_method: std::option::Option<crate::model::EncryptionMethod>,
        pub(crate) key_rotation_interval_seconds: std::option::Option<i32>,
        pub(crate) repeat_ext_x_key: std::option::Option<bool>,
        pub(crate) speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
    }
    impl Builder {
        /// A constant initialization vector for encryption (optional). When not specified the initialization vector will be periodically rotated.
        pub fn constant_initialization_vector(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.constant_initialization_vector = Some(input.into());
            self
        }
        /// A constant initialization vector for encryption (optional). When not specified the initialization vector will be periodically rotated.
        pub fn set_constant_initialization_vector(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.constant_initialization_vector = input;
            self
        }
        /// The encryption method to use.
        pub fn encryption_method(mut self, input: crate::model::EncryptionMethod) -> Self {
            self.encryption_method = Some(input);
            self
        }
        /// The encryption method to use.
        pub fn set_encryption_method(
            mut self,
            input: std::option::Option<crate::model::EncryptionMethod>,
        ) -> Self {
            self.encryption_method = input;
            self
        }
        /// Interval (in seconds) between each encryption key rotation.
        pub fn key_rotation_interval_seconds(mut self, input: i32) -> Self {
            self.key_rotation_interval_seconds = Some(input);
            self
        }
        /// Interval (in seconds) between each encryption key rotation.
        pub fn set_key_rotation_interval_seconds(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.key_rotation_interval_seconds = input;
            self
        }
        /// When enabled, the EXT-X-KEY tag will be repeated in output manifests.
        pub fn repeat_ext_x_key(mut self, input: bool) -> Self {
            self.repeat_ext_x_key = Some(input);
            self
        }
        /// When enabled, the EXT-X-KEY tag will be repeated in output manifests.
        pub fn set_repeat_ext_x_key(mut self, input: std::option::Option<bool>) -> Self {
            self.repeat_ext_x_key = input;
            self
        }
        /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
        pub fn speke_key_provider(mut self, input: crate::model::SpekeKeyProvider) -> Self {
            self.speke_key_provider = Some(input);
            self
        }
        /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
        pub fn set_speke_key_provider(
            mut self,
            input: std::option::Option<crate::model::SpekeKeyProvider>,
        ) -> Self {
            self.speke_key_provider = input;
            self
        }
        /// Consumes the builder and constructs a [`HlsEncryption`](crate::model::HlsEncryption)
        pub fn build(self) -> crate::model::HlsEncryption {
            crate::model::HlsEncryption {
                constant_initialization_vector: self.constant_initialization_vector,
                encryption_method: self.encryption_method,
                key_rotation_interval_seconds: self
                    .key_rotation_interval_seconds
                    .unwrap_or_default(),
                repeat_ext_x_key: self.repeat_ext_x_key.unwrap_or_default(),
                speke_key_provider: self.speke_key_provider,
            }
        }
    }
}
impl HlsEncryption {
    /// Creates a new builder-style object to manufacture [`HlsEncryption`](crate::model::HlsEncryption)
    pub fn builder() -> crate::model::hls_encryption::Builder {
        crate::model::hls_encryption::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum EncryptionMethod {
    #[allow(missing_docs)] // documentation missing in model
    Aes128,
    #[allow(missing_docs)] // documentation missing in model
    SampleAes,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for EncryptionMethod {
    fn from(s: &str) -> Self {
        match s {
            "AES_128" => EncryptionMethod::Aes128,
            "SAMPLE_AES" => EncryptionMethod::SampleAes,
            other => EncryptionMethod::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for EncryptionMethod {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(EncryptionMethod::from(s))
    }
}
impl EncryptionMethod {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            EncryptionMethod::Aes128 => "AES_128",
            EncryptionMethod::SampleAes => "SAMPLE_AES",
            EncryptionMethod::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["AES_128", "SAMPLE_AES"]
    }
}
impl AsRef<str> for EncryptionMethod {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to
/// determine whether a message signals an ad.  Choosing "NONE" means no SCTE-35 messages become
/// ads.  Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that
/// contain delivery restrictions will be treated as ads.  Choosing "UNRESTRICTED" means SCTE-35
/// messages of the types specified in AdTriggers that do not contain delivery restrictions will
/// be treated as ads.  Choosing "BOTH" means all SCTE-35 messages of the types specified in
/// AdTriggers will be treated as ads.  Note that Splice Insert messages do not have these flags
/// and are always treated as ads if specified in AdTriggers.
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum AdsOnDeliveryRestrictions {
    #[allow(missing_docs)] // documentation missing in model
    Both,
    #[allow(missing_docs)] // documentation missing in model
    None,
    #[allow(missing_docs)] // documentation missing in model
    Restricted,
    #[allow(missing_docs)] // documentation missing in model
    Unrestricted,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for AdsOnDeliveryRestrictions {
    fn from(s: &str) -> Self {
        match s {
            "BOTH" => AdsOnDeliveryRestrictions::Both,
            "NONE" => AdsOnDeliveryRestrictions::None,
            "RESTRICTED" => AdsOnDeliveryRestrictions::Restricted,
            "UNRESTRICTED" => AdsOnDeliveryRestrictions::Unrestricted,
            other => AdsOnDeliveryRestrictions::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for AdsOnDeliveryRestrictions {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AdsOnDeliveryRestrictions::from(s))
    }
}
impl AdsOnDeliveryRestrictions {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AdsOnDeliveryRestrictions::Both => "BOTH",
            AdsOnDeliveryRestrictions::None => "NONE",
            AdsOnDeliveryRestrictions::Restricted => "RESTRICTED",
            AdsOnDeliveryRestrictions::Unrestricted => "UNRESTRICTED",
            AdsOnDeliveryRestrictions::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["BOTH", "NONE", "RESTRICTED", "UNRESTRICTED"]
    }
}
impl AsRef<str> for AdsOnDeliveryRestrictions {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum AdTriggersElement {
    #[allow(missing_docs)] // documentation missing in model
    Break,
    #[allow(missing_docs)] // documentation missing in model
    DistributorAdvertisement,
    #[allow(missing_docs)] // documentation missing in model
    DistributorOverlayPlacementOpportunity,
    #[allow(missing_docs)] // documentation missing in model
    DistributorPlacementOpportunity,
    #[allow(missing_docs)] // documentation missing in model
    ProviderAdvertisement,
    #[allow(missing_docs)] // documentation missing in model
    ProviderOverlayPlacementOpportunity,
    #[allow(missing_docs)] // documentation missing in model
    ProviderPlacementOpportunity,
    #[allow(missing_docs)] // documentation missing in model
    SpliceInsert,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for AdTriggersElement {
    fn from(s: &str) -> Self {
        match s {
            "BREAK" => AdTriggersElement::Break,
            "DISTRIBUTOR_ADVERTISEMENT" => AdTriggersElement::DistributorAdvertisement,
            "DISTRIBUTOR_OVERLAY_PLACEMENT_OPPORTUNITY" => {
                AdTriggersElement::DistributorOverlayPlacementOpportunity
            }
            "DISTRIBUTOR_PLACEMENT_OPPORTUNITY" => {
                AdTriggersElement::DistributorPlacementOpportunity
            }
            "PROVIDER_ADVERTISEMENT" => AdTriggersElement::ProviderAdvertisement,
            "PROVIDER_OVERLAY_PLACEMENT_OPPORTUNITY" => {
                AdTriggersElement::ProviderOverlayPlacementOpportunity
            }
            "PROVIDER_PLACEMENT_OPPORTUNITY" => AdTriggersElement::ProviderPlacementOpportunity,
            "SPLICE_INSERT" => AdTriggersElement::SpliceInsert,
            other => AdTriggersElement::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for AdTriggersElement {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AdTriggersElement::from(s))
    }
}
impl AdTriggersElement {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AdTriggersElement::Break => "BREAK",
            AdTriggersElement::DistributorAdvertisement => "DISTRIBUTOR_ADVERTISEMENT",
            AdTriggersElement::DistributorOverlayPlacementOpportunity => {
                "DISTRIBUTOR_OVERLAY_PLACEMENT_OPPORTUNITY"
            }
            AdTriggersElement::DistributorPlacementOpportunity => {
                "DISTRIBUTOR_PLACEMENT_OPPORTUNITY"
            }
            AdTriggersElement::ProviderAdvertisement => "PROVIDER_ADVERTISEMENT",
            AdTriggersElement::ProviderOverlayPlacementOpportunity => {
                "PROVIDER_OVERLAY_PLACEMENT_OPPORTUNITY"
            }
            AdTriggersElement::ProviderPlacementOpportunity => "PROVIDER_PLACEMENT_OPPORTUNITY",
            AdTriggersElement::SpliceInsert => "SPLICE_INSERT",
            AdTriggersElement::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &[
            "BREAK",
            "DISTRIBUTOR_ADVERTISEMENT",
            "DISTRIBUTOR_OVERLAY_PLACEMENT_OPPORTUNITY",
            "DISTRIBUTOR_PLACEMENT_OPPORTUNITY",
            "PROVIDER_ADVERTISEMENT",
            "PROVIDER_OVERLAY_PLACEMENT_OPPORTUNITY",
            "PROVIDER_PLACEMENT_OPPORTUNITY",
            "SPLICE_INSERT",
        ]
    }
}
impl AsRef<str> for AdTriggersElement {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum AdMarkers {
    #[allow(missing_docs)] // documentation missing in model
    Daterange,
    #[allow(missing_docs)] // documentation missing in model
    None,
    #[allow(missing_docs)] // documentation missing in model
    Passthrough,
    #[allow(missing_docs)] // documentation missing in model
    Scte35Enhanced,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for AdMarkers {
    fn from(s: &str) -> Self {
        match s {
            "DATERANGE" => AdMarkers::Daterange,
            "NONE" => AdMarkers::None,
            "PASSTHROUGH" => AdMarkers::Passthrough,
            "SCTE35_ENHANCED" => AdMarkers::Scte35Enhanced,
            other => AdMarkers::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for AdMarkers {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AdMarkers::from(s))
    }
}
impl AdMarkers {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AdMarkers::Daterange => "DATERANGE",
            AdMarkers::None => "NONE",
            AdMarkers::Passthrough => "PASSTHROUGH",
            AdMarkers::Scte35Enhanced => "SCTE35_ENHANCED",
            AdMarkers::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["DATERANGE", "NONE", "PASSTHROUGH", "SCTE35_ENHANCED"]
    }
}
impl AsRef<str> for AdMarkers {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DashPackage {
    /// A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
    pub ad_triggers: std::option::Option<std::vec::Vec<crate::model::AdTriggersElement>>,
    /// This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
    pub ads_on_delivery_restrictions: std::option::Option<crate::model::AdsOnDeliveryRestrictions>,
    /// A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.
    pub encryption: std::option::Option<crate::model::DashEncryption>,
    /// Determines the position of some tags in the Media Presentation Description (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation. When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level.
    pub manifest_layout: std::option::Option<crate::model::ManifestLayout>,
    /// Time window (in seconds) contained in each manifest.
    pub manifest_window_seconds: i32,
    /// Minimum duration (in seconds) that a player will buffer media before starting the presentation.
    pub min_buffer_time_seconds: i32,
    /// Minimum duration (in seconds) between potential changes to the Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD).
    pub min_update_period_seconds: i32,
    /// A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not be partitioned into more than one period. If the list contains "ADS", new periods will be created where the Channel source contains SCTE-35 ad markers.
    pub period_triggers: std::option::Option<std::vec::Vec<crate::model::PeriodTriggersElement>>,
    /// The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to "HBBTV_1_5", HbbTV 1.5 compliant output is enabled. When set to "DVB-DASH_2014", DVB-DASH 2014 compliant output is enabled.
    pub profile: std::option::Option<crate::model::Profile>,
    /// Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
    pub segment_duration_seconds: i32,
    /// Determines the type of SegmentTemplate included in the Media Presentation Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs. When set to TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs.
    pub segment_template_format: std::option::Option<crate::model::SegmentTemplateFormat>,
    /// A StreamSelection configuration.
    pub stream_selection: std::option::Option<crate::model::StreamSelection>,
    /// Duration (in seconds) to delay live content before presentation.
    pub suggested_presentation_delay_seconds: i32,
    /// Determines the type of UTCTiming included in the Media Presentation Description (MPD)
    pub utc_timing: std::option::Option<crate::model::UtcTiming>,
    /// Specifies the value attribute of the UTCTiming field when utcTiming is set to HTTP-ISO, HTTP-HEAD or HTTP-XSDATE
    pub utc_timing_uri: std::option::Option<std::string::String>,
}
impl DashPackage {
    /// A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
    pub fn ad_triggers(&self) -> std::option::Option<&[crate::model::AdTriggersElement]> {
        self.ad_triggers.as_deref()
    }
    /// This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
    pub fn ads_on_delivery_restrictions(
        &self,
    ) -> std::option::Option<&crate::model::AdsOnDeliveryRestrictions> {
        self.ads_on_delivery_restrictions.as_ref()
    }
    /// A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.
    pub fn encryption(&self) -> std::option::Option<&crate::model::DashEncryption> {
        self.encryption.as_ref()
    }
    /// Determines the position of some tags in the Media Presentation Description (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation. When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level.
    pub fn manifest_layout(&self) -> std::option::Option<&crate::model::ManifestLayout> {
        self.manifest_layout.as_ref()
    }
    /// Time window (in seconds) contained in each manifest.
    pub fn manifest_window_seconds(&self) -> i32 {
        self.manifest_window_seconds
    }
    /// Minimum duration (in seconds) that a player will buffer media before starting the presentation.
    pub fn min_buffer_time_seconds(&self) -> i32 {
        self.min_buffer_time_seconds
    }
    /// Minimum duration (in seconds) between potential changes to the Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD).
    pub fn min_update_period_seconds(&self) -> i32 {
        self.min_update_period_seconds
    }
    /// A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not be partitioned into more than one period. If the list contains "ADS", new periods will be created where the Channel source contains SCTE-35 ad markers.
    pub fn period_triggers(&self) -> std::option::Option<&[crate::model::PeriodTriggersElement]> {
        self.period_triggers.as_deref()
    }
    /// The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to "HBBTV_1_5", HbbTV 1.5 compliant output is enabled. When set to "DVB-DASH_2014", DVB-DASH 2014 compliant output is enabled.
    pub fn profile(&self) -> std::option::Option<&crate::model::Profile> {
        self.profile.as_ref()
    }
    /// Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
    pub fn segment_duration_seconds(&self) -> i32 {
        self.segment_duration_seconds
    }
    /// Determines the type of SegmentTemplate included in the Media Presentation Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs. When set to TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs.
    pub fn segment_template_format(
        &self,
    ) -> std::option::Option<&crate::model::SegmentTemplateFormat> {
        self.segment_template_format.as_ref()
    }
    /// A StreamSelection configuration.
    pub fn stream_selection(&self) -> std::option::Option<&crate::model::StreamSelection> {
        self.stream_selection.as_ref()
    }
    /// Duration (in seconds) to delay live content before presentation.
    pub fn suggested_presentation_delay_seconds(&self) -> i32 {
        self.suggested_presentation_delay_seconds
    }
    /// Determines the type of UTCTiming included in the Media Presentation Description (MPD)
    pub fn utc_timing(&self) -> std::option::Option<&crate::model::UtcTiming> {
        self.utc_timing.as_ref()
    }
    /// Specifies the value attribute of the UTCTiming field when utcTiming is set to HTTP-ISO, HTTP-HEAD or HTTP-XSDATE
    pub fn utc_timing_uri(&self) -> std::option::Option<&str> {
        self.utc_timing_uri.as_deref()
    }
}
impl std::fmt::Debug for DashPackage {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("DashPackage");
        formatter.field("ad_triggers", &self.ad_triggers);
        formatter.field(
            "ads_on_delivery_restrictions",
            &self.ads_on_delivery_restrictions,
        );
        formatter.field("encryption", &self.encryption);
        formatter.field("manifest_layout", &self.manifest_layout);
        formatter.field("manifest_window_seconds", &self.manifest_window_seconds);
        formatter.field("min_buffer_time_seconds", &self.min_buffer_time_seconds);
        formatter.field("min_update_period_seconds", &self.min_update_period_seconds);
        formatter.field("period_triggers", &self.period_triggers);
        formatter.field("profile", &self.profile);
        formatter.field("segment_duration_seconds", &self.segment_duration_seconds);
        formatter.field("segment_template_format", &self.segment_template_format);
        formatter.field("stream_selection", &self.stream_selection);
        formatter.field(
            "suggested_presentation_delay_seconds",
            &self.suggested_presentation_delay_seconds,
        );
        formatter.field("utc_timing", &self.utc_timing);
        formatter.field("utc_timing_uri", &self.utc_timing_uri);
        formatter.finish()
    }
}
/// See [`DashPackage`](crate::model::DashPackage)
pub mod dash_package {

    /// A builder for [`DashPackage`](crate::model::DashPackage)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ad_triggers: std::option::Option<std::vec::Vec<crate::model::AdTriggersElement>>,
        pub(crate) ads_on_delivery_restrictions:
            std::option::Option<crate::model::AdsOnDeliveryRestrictions>,
        pub(crate) encryption: std::option::Option<crate::model::DashEncryption>,
        pub(crate) manifest_layout: std::option::Option<crate::model::ManifestLayout>,
        pub(crate) manifest_window_seconds: std::option::Option<i32>,
        pub(crate) min_buffer_time_seconds: std::option::Option<i32>,
        pub(crate) min_update_period_seconds: std::option::Option<i32>,
        pub(crate) period_triggers:
            std::option::Option<std::vec::Vec<crate::model::PeriodTriggersElement>>,
        pub(crate) profile: std::option::Option<crate::model::Profile>,
        pub(crate) segment_duration_seconds: std::option::Option<i32>,
        pub(crate) segment_template_format:
            std::option::Option<crate::model::SegmentTemplateFormat>,
        pub(crate) stream_selection: std::option::Option<crate::model::StreamSelection>,
        pub(crate) suggested_presentation_delay_seconds: std::option::Option<i32>,
        pub(crate) utc_timing: std::option::Option<crate::model::UtcTiming>,
        pub(crate) utc_timing_uri: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `ad_triggers`.
        ///
        /// To override the contents of this collection use [`set_ad_triggers`](Self::set_ad_triggers).
        ///
        /// A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
        pub fn ad_triggers(mut self, input: crate::model::AdTriggersElement) -> Self {
            let mut v = self.ad_triggers.unwrap_or_default();
            v.push(input);
            self.ad_triggers = Some(v);
            self
        }
        /// A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
        pub fn set_ad_triggers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AdTriggersElement>>,
        ) -> Self {
            self.ad_triggers = input;
            self
        }
        /// This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
        pub fn ads_on_delivery_restrictions(
            mut self,
            input: crate::model::AdsOnDeliveryRestrictions,
        ) -> Self {
            self.ads_on_delivery_restrictions = Some(input);
            self
        }
        /// This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
        pub fn set_ads_on_delivery_restrictions(
            mut self,
            input: std::option::Option<crate::model::AdsOnDeliveryRestrictions>,
        ) -> Self {
            self.ads_on_delivery_restrictions = input;
            self
        }
        /// A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.
        pub fn encryption(mut self, input: crate::model::DashEncryption) -> Self {
            self.encryption = Some(input);
            self
        }
        /// A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.
        pub fn set_encryption(
            mut self,
            input: std::option::Option<crate::model::DashEncryption>,
        ) -> Self {
            self.encryption = input;
            self
        }
        /// Determines the position of some tags in the Media Presentation Description (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation. When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level.
        pub fn manifest_layout(mut self, input: crate::model::ManifestLayout) -> Self {
            self.manifest_layout = Some(input);
            self
        }
        /// Determines the position of some tags in the Media Presentation Description (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation. When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level.
        pub fn set_manifest_layout(
            mut self,
            input: std::option::Option<crate::model::ManifestLayout>,
        ) -> Self {
            self.manifest_layout = input;
            self
        }
        /// Time window (in seconds) contained in each manifest.
        pub fn manifest_window_seconds(mut self, input: i32) -> Self {
            self.manifest_window_seconds = Some(input);
            self
        }
        /// Time window (in seconds) contained in each manifest.
        pub fn set_manifest_window_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.manifest_window_seconds = input;
            self
        }
        /// Minimum duration (in seconds) that a player will buffer media before starting the presentation.
        pub fn min_buffer_time_seconds(mut self, input: i32) -> Self {
            self.min_buffer_time_seconds = Some(input);
            self
        }
        /// Minimum duration (in seconds) that a player will buffer media before starting the presentation.
        pub fn set_min_buffer_time_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.min_buffer_time_seconds = input;
            self
        }
        /// Minimum duration (in seconds) between potential changes to the Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD).
        pub fn min_update_period_seconds(mut self, input: i32) -> Self {
            self.min_update_period_seconds = Some(input);
            self
        }
        /// Minimum duration (in seconds) between potential changes to the Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD).
        pub fn set_min_update_period_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.min_update_period_seconds = input;
            self
        }
        /// Appends an item to `period_triggers`.
        ///
        /// To override the contents of this collection use [`set_period_triggers`](Self::set_period_triggers).
        ///
        /// A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not be partitioned into more than one period. If the list contains "ADS", new periods will be created where the Channel source contains SCTE-35 ad markers.
        pub fn period_triggers(mut self, input: crate::model::PeriodTriggersElement) -> Self {
            let mut v = self.period_triggers.unwrap_or_default();
            v.push(input);
            self.period_triggers = Some(v);
            self
        }
        /// A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not be partitioned into more than one period. If the list contains "ADS", new periods will be created where the Channel source contains SCTE-35 ad markers.
        pub fn set_period_triggers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PeriodTriggersElement>>,
        ) -> Self {
            self.period_triggers = input;
            self
        }
        /// The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to "HBBTV_1_5", HbbTV 1.5 compliant output is enabled. When set to "DVB-DASH_2014", DVB-DASH 2014 compliant output is enabled.
        pub fn profile(mut self, input: crate::model::Profile) -> Self {
            self.profile = Some(input);
            self
        }
        /// The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to "HBBTV_1_5", HbbTV 1.5 compliant output is enabled. When set to "DVB-DASH_2014", DVB-DASH 2014 compliant output is enabled.
        pub fn set_profile(mut self, input: std::option::Option<crate::model::Profile>) -> Self {
            self.profile = input;
            self
        }
        /// Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
        pub fn segment_duration_seconds(mut self, input: i32) -> Self {
            self.segment_duration_seconds = Some(input);
            self
        }
        /// Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
        pub fn set_segment_duration_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.segment_duration_seconds = input;
            self
        }
        /// Determines the type of SegmentTemplate included in the Media Presentation Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs. When set to TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs.
        pub fn segment_template_format(
            mut self,
            input: crate::model::SegmentTemplateFormat,
        ) -> Self {
            self.segment_template_format = Some(input);
            self
        }
        /// Determines the type of SegmentTemplate included in the Media Presentation Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs. When set to TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs.
        pub fn set_segment_template_format(
            mut self,
            input: std::option::Option<crate::model::SegmentTemplateFormat>,
        ) -> Self {
            self.segment_template_format = input;
            self
        }
        /// A StreamSelection configuration.
        pub fn stream_selection(mut self, input: crate::model::StreamSelection) -> Self {
            self.stream_selection = Some(input);
            self
        }
        /// A StreamSelection configuration.
        pub fn set_stream_selection(
            mut self,
            input: std::option::Option<crate::model::StreamSelection>,
        ) -> Self {
            self.stream_selection = input;
            self
        }
        /// Duration (in seconds) to delay live content before presentation.
        pub fn suggested_presentation_delay_seconds(mut self, input: i32) -> Self {
            self.suggested_presentation_delay_seconds = Some(input);
            self
        }
        /// Duration (in seconds) to delay live content before presentation.
        pub fn set_suggested_presentation_delay_seconds(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.suggested_presentation_delay_seconds = input;
            self
        }
        /// Determines the type of UTCTiming included in the Media Presentation Description (MPD)
        pub fn utc_timing(mut self, input: crate::model::UtcTiming) -> Self {
            self.utc_timing = Some(input);
            self
        }
        /// Determines the type of UTCTiming included in the Media Presentation Description (MPD)
        pub fn set_utc_timing(
            mut self,
            input: std::option::Option<crate::model::UtcTiming>,
        ) -> Self {
            self.utc_timing = input;
            self
        }
        /// Specifies the value attribute of the UTCTiming field when utcTiming is set to HTTP-ISO, HTTP-HEAD or HTTP-XSDATE
        pub fn utc_timing_uri(mut self, input: impl Into<std::string::String>) -> Self {
            self.utc_timing_uri = Some(input.into());
            self
        }
        /// Specifies the value attribute of the UTCTiming field when utcTiming is set to HTTP-ISO, HTTP-HEAD or HTTP-XSDATE
        pub fn set_utc_timing_uri(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.utc_timing_uri = input;
            self
        }
        /// Consumes the builder and constructs a [`DashPackage`](crate::model::DashPackage)
        pub fn build(self) -> crate::model::DashPackage {
            crate::model::DashPackage {
                ad_triggers: self.ad_triggers,
                ads_on_delivery_restrictions: self.ads_on_delivery_restrictions,
                encryption: self.encryption,
                manifest_layout: self.manifest_layout,
                manifest_window_seconds: self.manifest_window_seconds.unwrap_or_default(),
                min_buffer_time_seconds: self.min_buffer_time_seconds.unwrap_or_default(),
                min_update_period_seconds: self.min_update_period_seconds.unwrap_or_default(),
                period_triggers: self.period_triggers,
                profile: self.profile,
                segment_duration_seconds: self.segment_duration_seconds.unwrap_or_default(),
                segment_template_format: self.segment_template_format,
                stream_selection: self.stream_selection,
                suggested_presentation_delay_seconds: self
                    .suggested_presentation_delay_seconds
                    .unwrap_or_default(),
                utc_timing: self.utc_timing,
                utc_timing_uri: self.utc_timing_uri,
            }
        }
    }
}
impl DashPackage {
    /// Creates a new builder-style object to manufacture [`DashPackage`](crate::model::DashPackage)
    pub fn builder() -> crate::model::dash_package::Builder {
        crate::model::dash_package::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum UtcTiming {
    #[allow(missing_docs)] // documentation missing in model
    HttpHead,
    #[allow(missing_docs)] // documentation missing in model
    HttpIso,
    #[allow(missing_docs)] // documentation missing in model
    HttpXsdate,
    #[allow(missing_docs)] // documentation missing in model
    None,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for UtcTiming {
    fn from(s: &str) -> Self {
        match s {
            "HTTP-HEAD" => UtcTiming::HttpHead,
            "HTTP-ISO" => UtcTiming::HttpIso,
            "HTTP-XSDATE" => UtcTiming::HttpXsdate,
            "NONE" => UtcTiming::None,
            other => UtcTiming::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for UtcTiming {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(UtcTiming::from(s))
    }
}
impl UtcTiming {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            UtcTiming::HttpHead => "HTTP-HEAD",
            UtcTiming::HttpIso => "HTTP-ISO",
            UtcTiming::HttpXsdate => "HTTP-XSDATE",
            UtcTiming::None => "NONE",
            UtcTiming::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["HTTP-HEAD", "HTTP-ISO", "HTTP-XSDATE", "NONE"]
    }
}
impl AsRef<str> for UtcTiming {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum SegmentTemplateFormat {
    #[allow(missing_docs)] // documentation missing in model
    NumberWithDuration,
    #[allow(missing_docs)] // documentation missing in model
    NumberWithTimeline,
    #[allow(missing_docs)] // documentation missing in model
    TimeWithTimeline,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for SegmentTemplateFormat {
    fn from(s: &str) -> Self {
        match s {
            "NUMBER_WITH_DURATION" => SegmentTemplateFormat::NumberWithDuration,
            "NUMBER_WITH_TIMELINE" => SegmentTemplateFormat::NumberWithTimeline,
            "TIME_WITH_TIMELINE" => SegmentTemplateFormat::TimeWithTimeline,
            other => SegmentTemplateFormat::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for SegmentTemplateFormat {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SegmentTemplateFormat::from(s))
    }
}
impl SegmentTemplateFormat {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SegmentTemplateFormat::NumberWithDuration => "NUMBER_WITH_DURATION",
            SegmentTemplateFormat::NumberWithTimeline => "NUMBER_WITH_TIMELINE",
            SegmentTemplateFormat::TimeWithTimeline => "TIME_WITH_TIMELINE",
            SegmentTemplateFormat::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &[
            "NUMBER_WITH_DURATION",
            "NUMBER_WITH_TIMELINE",
            "TIME_WITH_TIMELINE",
        ]
    }
}
impl AsRef<str> for SegmentTemplateFormat {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Profile {
    #[allow(missing_docs)] // documentation missing in model
    DvbDash2014,
    #[allow(missing_docs)] // documentation missing in model
    Hbbtv15,
    #[allow(missing_docs)] // documentation missing in model
    Hybridcast,
    #[allow(missing_docs)] // documentation missing in model
    None,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for Profile {
    fn from(s: &str) -> Self {
        match s {
            "DVB_DASH_2014" => Profile::DvbDash2014,
            "HBBTV_1_5" => Profile::Hbbtv15,
            "HYBRIDCAST" => Profile::Hybridcast,
            "NONE" => Profile::None,
            other => Profile::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for Profile {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Profile::from(s))
    }
}
impl Profile {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Profile::DvbDash2014 => "DVB_DASH_2014",
            Profile::Hbbtv15 => "HBBTV_1_5",
            Profile::Hybridcast => "HYBRIDCAST",
            Profile::None => "NONE",
            Profile::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["DVB_DASH_2014", "HBBTV_1_5", "HYBRIDCAST", "NONE"]
    }
}
impl AsRef<str> for Profile {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum PeriodTriggersElement {
    #[allow(missing_docs)] // documentation missing in model
    Ads,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for PeriodTriggersElement {
    fn from(s: &str) -> Self {
        match s {
            "ADS" => PeriodTriggersElement::Ads,
            other => PeriodTriggersElement::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for PeriodTriggersElement {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PeriodTriggersElement::from(s))
    }
}
impl PeriodTriggersElement {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PeriodTriggersElement::Ads => "ADS",
            PeriodTriggersElement::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["ADS"]
    }
}
impl AsRef<str> for PeriodTriggersElement {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum ManifestLayout {
    #[allow(missing_docs)] // documentation missing in model
    Compact,
    #[allow(missing_docs)] // documentation missing in model
    Full,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for ManifestLayout {
    fn from(s: &str) -> Self {
        match s {
            "COMPACT" => ManifestLayout::Compact,
            "FULL" => ManifestLayout::Full,
            other => ManifestLayout::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for ManifestLayout {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ManifestLayout::from(s))
    }
}
impl ManifestLayout {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ManifestLayout::Compact => "COMPACT",
            ManifestLayout::Full => "FULL",
            ManifestLayout::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["COMPACT", "FULL"]
    }
}
impl AsRef<str> for ManifestLayout {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DashEncryption {
    /// Time (in seconds) between each encryption key rotation.
    pub key_rotation_interval_seconds: i32,
    /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
    pub speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
}
impl DashEncryption {
    /// Time (in seconds) between each encryption key rotation.
    pub fn key_rotation_interval_seconds(&self) -> i32 {
        self.key_rotation_interval_seconds
    }
    /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
    pub fn speke_key_provider(&self) -> std::option::Option<&crate::model::SpekeKeyProvider> {
        self.speke_key_provider.as_ref()
    }
}
impl std::fmt::Debug for DashEncryption {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("DashEncryption");
        formatter.field(
            "key_rotation_interval_seconds",
            &self.key_rotation_interval_seconds,
        );
        formatter.field("speke_key_provider", &self.speke_key_provider);
        formatter.finish()
    }
}
/// See [`DashEncryption`](crate::model::DashEncryption)
pub mod dash_encryption {

    /// A builder for [`DashEncryption`](crate::model::DashEncryption)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) key_rotation_interval_seconds: std::option::Option<i32>,
        pub(crate) speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
    }
    impl Builder {
        /// Time (in seconds) between each encryption key rotation.
        pub fn key_rotation_interval_seconds(mut self, input: i32) -> Self {
            self.key_rotation_interval_seconds = Some(input);
            self
        }
        /// Time (in seconds) between each encryption key rotation.
        pub fn set_key_rotation_interval_seconds(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.key_rotation_interval_seconds = input;
            self
        }
        /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
        pub fn speke_key_provider(mut self, input: crate::model::SpekeKeyProvider) -> Self {
            self.speke_key_provider = Some(input);
            self
        }
        /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
        pub fn set_speke_key_provider(
            mut self,
            input: std::option::Option<crate::model::SpekeKeyProvider>,
        ) -> Self {
            self.speke_key_provider = input;
            self
        }
        /// Consumes the builder and constructs a [`DashEncryption`](crate::model::DashEncryption)
        pub fn build(self) -> crate::model::DashEncryption {
            crate::model::DashEncryption {
                key_rotation_interval_seconds: self
                    .key_rotation_interval_seconds
                    .unwrap_or_default(),
                speke_key_provider: self.speke_key_provider,
            }
        }
    }
}
impl DashEncryption {
    /// Creates a new builder-style object to manufacture [`DashEncryption`](crate::model::DashEncryption)
    pub fn builder() -> crate::model::dash_encryption::Builder {
        crate::model::dash_encryption::Builder::default()
    }
}

/// A Common Media Application Format (CMAF) packaging configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CmafPackage {
    /// A Common Media Application Format (CMAF) encryption configuration.
    pub encryption: std::option::Option<crate::model::CmafEncryption>,
    /// A list of HLS manifest configurations
    pub hls_manifests: std::option::Option<std::vec::Vec<crate::model::HlsManifest>>,
    /// Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
    pub segment_duration_seconds: i32,
    /// An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId.
    pub segment_prefix: std::option::Option<std::string::String>,
    /// A StreamSelection configuration.
    pub stream_selection: std::option::Option<crate::model::StreamSelection>,
}
impl CmafPackage {
    /// A Common Media Application Format (CMAF) encryption configuration.
    pub fn encryption(&self) -> std::option::Option<&crate::model::CmafEncryption> {
        self.encryption.as_ref()
    }
    /// A list of HLS manifest configurations
    pub fn hls_manifests(&self) -> std::option::Option<&[crate::model::HlsManifest]> {
        self.hls_manifests.as_deref()
    }
    /// Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
    pub fn segment_duration_seconds(&self) -> i32 {
        self.segment_duration_seconds
    }
    /// An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId.
    pub fn segment_prefix(&self) -> std::option::Option<&str> {
        self.segment_prefix.as_deref()
    }
    /// A StreamSelection configuration.
    pub fn stream_selection(&self) -> std::option::Option<&crate::model::StreamSelection> {
        self.stream_selection.as_ref()
    }
}
impl std::fmt::Debug for CmafPackage {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("CmafPackage");
        formatter.field("encryption", &self.encryption);
        formatter.field("hls_manifests", &self.hls_manifests);
        formatter.field("segment_duration_seconds", &self.segment_duration_seconds);
        formatter.field("segment_prefix", &self.segment_prefix);
        formatter.field("stream_selection", &self.stream_selection);
        formatter.finish()
    }
}
/// See [`CmafPackage`](crate::model::CmafPackage)
pub mod cmaf_package {

    /// A builder for [`CmafPackage`](crate::model::CmafPackage)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) encryption: std::option::Option<crate::model::CmafEncryption>,
        pub(crate) hls_manifests: std::option::Option<std::vec::Vec<crate::model::HlsManifest>>,
        pub(crate) segment_duration_seconds: std::option::Option<i32>,
        pub(crate) segment_prefix: std::option::Option<std::string::String>,
        pub(crate) stream_selection: std::option::Option<crate::model::StreamSelection>,
    }
    impl Builder {
        /// A Common Media Application Format (CMAF) encryption configuration.
        pub fn encryption(mut self, input: crate::model::CmafEncryption) -> Self {
            self.encryption = Some(input);
            self
        }
        /// A Common Media Application Format (CMAF) encryption configuration.
        pub fn set_encryption(
            mut self,
            input: std::option::Option<crate::model::CmafEncryption>,
        ) -> Self {
            self.encryption = input;
            self
        }
        /// Appends an item to `hls_manifests`.
        ///
        /// To override the contents of this collection use [`set_hls_manifests`](Self::set_hls_manifests).
        ///
        /// A list of HLS manifest configurations
        pub fn hls_manifests(mut self, input: crate::model::HlsManifest) -> Self {
            let mut v = self.hls_manifests.unwrap_or_default();
            v.push(input);
            self.hls_manifests = Some(v);
            self
        }
        /// A list of HLS manifest configurations
        pub fn set_hls_manifests(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::HlsManifest>>,
        ) -> Self {
            self.hls_manifests = input;
            self
        }
        /// Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
        pub fn segment_duration_seconds(mut self, input: i32) -> Self {
            self.segment_duration_seconds = Some(input);
            self
        }
        /// Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
        pub fn set_segment_duration_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.segment_duration_seconds = input;
            self
        }
        /// An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId.
        pub fn segment_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.segment_prefix = Some(input.into());
            self
        }
        /// An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId.
        pub fn set_segment_prefix(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.segment_prefix = input;
            self
        }
        /// A StreamSelection configuration.
        pub fn stream_selection(mut self, input: crate::model::StreamSelection) -> Self {
            self.stream_selection = Some(input);
            self
        }
        /// A StreamSelection configuration.
        pub fn set_stream_selection(
            mut self,
            input: std::option::Option<crate::model::StreamSelection>,
        ) -> Self {
            self.stream_selection = input;
            self
        }
        /// Consumes the builder and constructs a [`CmafPackage`](crate::model::CmafPackage)
        pub fn build(self) -> crate::model::CmafPackage {
            crate::model::CmafPackage {
                encryption: self.encryption,
                hls_manifests: self.hls_manifests,
                segment_duration_seconds: self.segment_duration_seconds.unwrap_or_default(),
                segment_prefix: self.segment_prefix,
                stream_selection: self.stream_selection,
            }
        }
    }
}
impl CmafPackage {
    /// Creates a new builder-style object to manufacture [`CmafPackage`](crate::model::CmafPackage)
    pub fn builder() -> crate::model::cmaf_package::Builder {
        crate::model::cmaf_package::Builder::default()
    }
}

/// A HTTP Live Streaming (HLS) manifest configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HlsManifest {
    /// This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
    pub ad_markers: std::option::Option<crate::model::AdMarkers>,
    /// The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created.
    pub id: std::option::Option<std::string::String>,
    /// When enabled, an I-Frame only stream will be included in the output.
    pub include_iframe_only_stream: bool,
    /// An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint.
    pub manifest_name: std::option::Option<std::string::String>,
    /// The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
    pub playlist_type: std::option::Option<crate::model::PlaylistType>,
    /// Time window (in seconds) contained in each parent manifest.
    pub playlist_window_seconds: i32,
    /// The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
    pub program_date_time_interval_seconds: i32,
    /// The URL of the packaged OriginEndpoint for consumption.
    pub url: std::option::Option<std::string::String>,
}
impl HlsManifest {
    /// This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
    pub fn ad_markers(&self) -> std::option::Option<&crate::model::AdMarkers> {
        self.ad_markers.as_ref()
    }
    /// The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created.
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// When enabled, an I-Frame only stream will be included in the output.
    pub fn include_iframe_only_stream(&self) -> bool {
        self.include_iframe_only_stream
    }
    /// An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint.
    pub fn manifest_name(&self) -> std::option::Option<&str> {
        self.manifest_name.as_deref()
    }
    /// The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
    pub fn playlist_type(&self) -> std::option::Option<&crate::model::PlaylistType> {
        self.playlist_type.as_ref()
    }
    /// Time window (in seconds) contained in each parent manifest.
    pub fn playlist_window_seconds(&self) -> i32 {
        self.playlist_window_seconds
    }
    /// The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
    pub fn program_date_time_interval_seconds(&self) -> i32 {
        self.program_date_time_interval_seconds
    }
    /// The URL of the packaged OriginEndpoint for consumption.
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
}
impl std::fmt::Debug for HlsManifest {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("HlsManifest");
        formatter.field("ad_markers", &self.ad_markers);
        formatter.field("id", &self.id);
        formatter.field(
            "include_iframe_only_stream",
            &self.include_iframe_only_stream,
        );
        formatter.field("manifest_name", &self.manifest_name);
        formatter.field("playlist_type", &self.playlist_type);
        formatter.field("playlist_window_seconds", &self.playlist_window_seconds);
        formatter.field(
            "program_date_time_interval_seconds",
            &self.program_date_time_interval_seconds,
        );
        formatter.field("url", &self.url);
        formatter.finish()
    }
}
/// See [`HlsManifest`](crate::model::HlsManifest)
pub mod hls_manifest {

    /// A builder for [`HlsManifest`](crate::model::HlsManifest)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ad_markers: std::option::Option<crate::model::AdMarkers>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) include_iframe_only_stream: std::option::Option<bool>,
        pub(crate) manifest_name: std::option::Option<std::string::String>,
        pub(crate) playlist_type: std::option::Option<crate::model::PlaylistType>,
        pub(crate) playlist_window_seconds: std::option::Option<i32>,
        pub(crate) program_date_time_interval_seconds: std::option::Option<i32>,
        pub(crate) url: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
        pub fn ad_markers(mut self, input: crate::model::AdMarkers) -> Self {
            self.ad_markers = Some(input);
            self
        }
        /// This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
        pub fn set_ad_markers(
            mut self,
            input: std::option::Option<crate::model::AdMarkers>,
        ) -> Self {
            self.ad_markers = input;
            self
        }
        /// The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created.
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created.
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// When enabled, an I-Frame only stream will be included in the output.
        pub fn include_iframe_only_stream(mut self, input: bool) -> Self {
            self.include_iframe_only_stream = Some(input);
            self
        }
        /// When enabled, an I-Frame only stream will be included in the output.
        pub fn set_include_iframe_only_stream(mut self, input: std::option::Option<bool>) -> Self {
            self.include_iframe_only_stream = input;
            self
        }
        /// An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint.
        pub fn manifest_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.manifest_name = Some(input.into());
            self
        }
        /// An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint.
        pub fn set_manifest_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.manifest_name = input;
            self
        }
        /// The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
        pub fn playlist_type(mut self, input: crate::model::PlaylistType) -> Self {
            self.playlist_type = Some(input);
            self
        }
        /// The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
        pub fn set_playlist_type(
            mut self,
            input: std::option::Option<crate::model::PlaylistType>,
        ) -> Self {
            self.playlist_type = input;
            self
        }
        /// Time window (in seconds) contained in each parent manifest.
        pub fn playlist_window_seconds(mut self, input: i32) -> Self {
            self.playlist_window_seconds = Some(input);
            self
        }
        /// Time window (in seconds) contained in each parent manifest.
        pub fn set_playlist_window_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.playlist_window_seconds = input;
            self
        }
        /// The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
        pub fn program_date_time_interval_seconds(mut self, input: i32) -> Self {
            self.program_date_time_interval_seconds = Some(input);
            self
        }
        /// The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
        pub fn set_program_date_time_interval_seconds(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.program_date_time_interval_seconds = input;
            self
        }
        /// The URL of the packaged OriginEndpoint for consumption.
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// The URL of the packaged OriginEndpoint for consumption.
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// Consumes the builder and constructs a [`HlsManifest`](crate::model::HlsManifest)
        pub fn build(self) -> crate::model::HlsManifest {
            crate::model::HlsManifest {
                ad_markers: self.ad_markers,
                id: self.id,
                include_iframe_only_stream: self.include_iframe_only_stream.unwrap_or_default(),
                manifest_name: self.manifest_name,
                playlist_type: self.playlist_type,
                playlist_window_seconds: self.playlist_window_seconds.unwrap_or_default(),
                program_date_time_interval_seconds: self
                    .program_date_time_interval_seconds
                    .unwrap_or_default(),
                url: self.url,
            }
        }
    }
}
impl HlsManifest {
    /// Creates a new builder-style object to manufacture [`HlsManifest`](crate::model::HlsManifest)
    pub fn builder() -> crate::model::hls_manifest::Builder {
        crate::model::hls_manifest::Builder::default()
    }
}

/// A Common Media Application Format (CMAF) encryption configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CmafEncryption {
    /// An optional 128-bit, 16-byte hex value represented by a 32-character string, used in conjunction with the key for encrypting blocks. If you don't specify a value, then MediaPackage creates the constant initialization vector (IV).
    pub constant_initialization_vector: std::option::Option<std::string::String>,
    /// Time (in seconds) between each encryption key rotation.
    pub key_rotation_interval_seconds: i32,
    /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
    pub speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
}
impl CmafEncryption {
    /// An optional 128-bit, 16-byte hex value represented by a 32-character string, used in conjunction with the key for encrypting blocks. If you don't specify a value, then MediaPackage creates the constant initialization vector (IV).
    pub fn constant_initialization_vector(&self) -> std::option::Option<&str> {
        self.constant_initialization_vector.as_deref()
    }
    /// Time (in seconds) between each encryption key rotation.
    pub fn key_rotation_interval_seconds(&self) -> i32 {
        self.key_rotation_interval_seconds
    }
    /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
    pub fn speke_key_provider(&self) -> std::option::Option<&crate::model::SpekeKeyProvider> {
        self.speke_key_provider.as_ref()
    }
}
impl std::fmt::Debug for CmafEncryption {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("CmafEncryption");
        formatter.field(
            "constant_initialization_vector",
            &self.constant_initialization_vector,
        );
        formatter.field(
            "key_rotation_interval_seconds",
            &self.key_rotation_interval_seconds,
        );
        formatter.field("speke_key_provider", &self.speke_key_provider);
        formatter.finish()
    }
}
/// See [`CmafEncryption`](crate::model::CmafEncryption)
pub mod cmaf_encryption {

    /// A builder for [`CmafEncryption`](crate::model::CmafEncryption)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) constant_initialization_vector: std::option::Option<std::string::String>,
        pub(crate) key_rotation_interval_seconds: std::option::Option<i32>,
        pub(crate) speke_key_provider: std::option::Option<crate::model::SpekeKeyProvider>,
    }
    impl Builder {
        /// An optional 128-bit, 16-byte hex value represented by a 32-character string, used in conjunction with the key for encrypting blocks. If you don't specify a value, then MediaPackage creates the constant initialization vector (IV).
        pub fn constant_initialization_vector(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.constant_initialization_vector = Some(input.into());
            self
        }
        /// An optional 128-bit, 16-byte hex value represented by a 32-character string, used in conjunction with the key for encrypting blocks. If you don't specify a value, then MediaPackage creates the constant initialization vector (IV).
        pub fn set_constant_initialization_vector(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.constant_initialization_vector = input;
            self
        }
        /// Time (in seconds) between each encryption key rotation.
        pub fn key_rotation_interval_seconds(mut self, input: i32) -> Self {
            self.key_rotation_interval_seconds = Some(input);
            self
        }
        /// Time (in seconds) between each encryption key rotation.
        pub fn set_key_rotation_interval_seconds(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.key_rotation_interval_seconds = input;
            self
        }
        /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
        pub fn speke_key_provider(mut self, input: crate::model::SpekeKeyProvider) -> Self {
            self.speke_key_provider = Some(input);
            self
        }
        /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
        pub fn set_speke_key_provider(
            mut self,
            input: std::option::Option<crate::model::SpekeKeyProvider>,
        ) -> Self {
            self.speke_key_provider = input;
            self
        }
        /// Consumes the builder and constructs a [`CmafEncryption`](crate::model::CmafEncryption)
        pub fn build(self) -> crate::model::CmafEncryption {
            crate::model::CmafEncryption {
                constant_initialization_vector: self.constant_initialization_vector,
                key_rotation_interval_seconds: self
                    .key_rotation_interval_seconds
                    .unwrap_or_default(),
                speke_key_provider: self.speke_key_provider,
            }
        }
    }
}
impl CmafEncryption {
    /// Creates a new builder-style object to manufacture [`CmafEncryption`](crate::model::CmafEncryption)
    pub fn builder() -> crate::model::cmaf_encryption::Builder {
        crate::model::cmaf_encryption::Builder::default()
    }
}

/// CDN Authorization credentials
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Authorization {
    /// The Amazon Resource Name (ARN) for the secret in Secrets Manager that your Content Distribution Network (CDN) uses for authorization to access your endpoint.
    pub cdn_identifier_secret: std::option::Option<std::string::String>,
    /// The Amazon Resource Name (ARN) for the IAM role that allows MediaPackage to communicate with AWS Secrets Manager.
    pub secrets_role_arn: std::option::Option<std::string::String>,
}
impl Authorization {
    /// The Amazon Resource Name (ARN) for the secret in Secrets Manager that your Content Distribution Network (CDN) uses for authorization to access your endpoint.
    pub fn cdn_identifier_secret(&self) -> std::option::Option<&str> {
        self.cdn_identifier_secret.as_deref()
    }
    /// The Amazon Resource Name (ARN) for the IAM role that allows MediaPackage to communicate with AWS Secrets Manager.
    pub fn secrets_role_arn(&self) -> std::option::Option<&str> {
        self.secrets_role_arn.as_deref()
    }
}
impl std::fmt::Debug for Authorization {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Authorization");
        formatter.field("cdn_identifier_secret", &self.cdn_identifier_secret);
        formatter.field("secrets_role_arn", &self.secrets_role_arn);
        formatter.finish()
    }
}
/// See [`Authorization`](crate::model::Authorization)
pub mod authorization {

    /// A builder for [`Authorization`](crate::model::Authorization)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) cdn_identifier_secret: std::option::Option<std::string::String>,
        pub(crate) secrets_role_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// The Amazon Resource Name (ARN) for the secret in Secrets Manager that your Content Distribution Network (CDN) uses for authorization to access your endpoint.
        pub fn cdn_identifier_secret(mut self, input: impl Into<std::string::String>) -> Self {
            self.cdn_identifier_secret = Some(input.into());
            self
        }
        /// The Amazon Resource Name (ARN) for the secret in Secrets Manager that your Content Distribution Network (CDN) uses for authorization to access your endpoint.
        pub fn set_cdn_identifier_secret(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.cdn_identifier_secret = input;
            self
        }
        /// The Amazon Resource Name (ARN) for the IAM role that allows MediaPackage to communicate with AWS Secrets Manager.
        pub fn secrets_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.secrets_role_arn = Some(input.into());
            self
        }
        /// The Amazon Resource Name (ARN) for the IAM role that allows MediaPackage to communicate with AWS Secrets Manager.
        pub fn set_secrets_role_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.secrets_role_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`Authorization`](crate::model::Authorization)
        pub fn build(self) -> crate::model::Authorization {
            crate::model::Authorization {
                cdn_identifier_secret: self.cdn_identifier_secret,
                secrets_role_arn: self.secrets_role_arn,
            }
        }
    }
}
impl Authorization {
    /// Creates a new builder-style object to manufacture [`Authorization`](crate::model::Authorization)
    pub fn builder() -> crate::model::authorization::Builder {
        crate::model::authorization::Builder::default()
    }
}

/// A Common Media Application Format (CMAF) packaging configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CmafPackageCreateOrUpdateParameters {
    /// A Common Media Application Format (CMAF) encryption configuration.
    pub encryption: std::option::Option<crate::model::CmafEncryption>,
    /// A list of HLS manifest configurations
    pub hls_manifests:
        std::option::Option<std::vec::Vec<crate::model::HlsManifestCreateOrUpdateParameters>>,
    /// Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
    pub segment_duration_seconds: i32,
    /// An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId.
    pub segment_prefix: std::option::Option<std::string::String>,
    /// A StreamSelection configuration.
    pub stream_selection: std::option::Option<crate::model::StreamSelection>,
}
impl CmafPackageCreateOrUpdateParameters {
    /// A Common Media Application Format (CMAF) encryption configuration.
    pub fn encryption(&self) -> std::option::Option<&crate::model::CmafEncryption> {
        self.encryption.as_ref()
    }
    /// A list of HLS manifest configurations
    pub fn hls_manifests(
        &self,
    ) -> std::option::Option<&[crate::model::HlsManifestCreateOrUpdateParameters]> {
        self.hls_manifests.as_deref()
    }
    /// Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
    pub fn segment_duration_seconds(&self) -> i32 {
        self.segment_duration_seconds
    }
    /// An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId.
    pub fn segment_prefix(&self) -> std::option::Option<&str> {
        self.segment_prefix.as_deref()
    }
    /// A StreamSelection configuration.
    pub fn stream_selection(&self) -> std::option::Option<&crate::model::StreamSelection> {
        self.stream_selection.as_ref()
    }
}
impl std::fmt::Debug for CmafPackageCreateOrUpdateParameters {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("CmafPackageCreateOrUpdateParameters");
        formatter.field("encryption", &self.encryption);
        formatter.field("hls_manifests", &self.hls_manifests);
        formatter.field("segment_duration_seconds", &self.segment_duration_seconds);
        formatter.field("segment_prefix", &self.segment_prefix);
        formatter.field("stream_selection", &self.stream_selection);
        formatter.finish()
    }
}
/// See [`CmafPackageCreateOrUpdateParameters`](crate::model::CmafPackageCreateOrUpdateParameters)
pub mod cmaf_package_create_or_update_parameters {

    /// A builder for [`CmafPackageCreateOrUpdateParameters`](crate::model::CmafPackageCreateOrUpdateParameters)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) encryption: std::option::Option<crate::model::CmafEncryption>,
        pub(crate) hls_manifests:
            std::option::Option<std::vec::Vec<crate::model::HlsManifestCreateOrUpdateParameters>>,
        pub(crate) segment_duration_seconds: std::option::Option<i32>,
        pub(crate) segment_prefix: std::option::Option<std::string::String>,
        pub(crate) stream_selection: std::option::Option<crate::model::StreamSelection>,
    }
    impl Builder {
        /// A Common Media Application Format (CMAF) encryption configuration.
        pub fn encryption(mut self, input: crate::model::CmafEncryption) -> Self {
            self.encryption = Some(input);
            self
        }
        /// A Common Media Application Format (CMAF) encryption configuration.
        pub fn set_encryption(
            mut self,
            input: std::option::Option<crate::model::CmafEncryption>,
        ) -> Self {
            self.encryption = input;
            self
        }
        /// Appends an item to `hls_manifests`.
        ///
        /// To override the contents of this collection use [`set_hls_manifests`](Self::set_hls_manifests).
        ///
        /// A list of HLS manifest configurations
        pub fn hls_manifests(
            mut self,
            input: crate::model::HlsManifestCreateOrUpdateParameters,
        ) -> Self {
            let mut v = self.hls_manifests.unwrap_or_default();
            v.push(input);
            self.hls_manifests = Some(v);
            self
        }
        /// A list of HLS manifest configurations
        pub fn set_hls_manifests(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::HlsManifestCreateOrUpdateParameters>,
            >,
        ) -> Self {
            self.hls_manifests = input;
            self
        }
        /// Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
        pub fn segment_duration_seconds(mut self, input: i32) -> Self {
            self.segment_duration_seconds = Some(input);
            self
        }
        /// Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
        pub fn set_segment_duration_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.segment_duration_seconds = input;
            self
        }
        /// An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId.
        pub fn segment_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.segment_prefix = Some(input.into());
            self
        }
        /// An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId.
        pub fn set_segment_prefix(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.segment_prefix = input;
            self
        }
        /// A StreamSelection configuration.
        pub fn stream_selection(mut self, input: crate::model::StreamSelection) -> Self {
            self.stream_selection = Some(input);
            self
        }
        /// A StreamSelection configuration.
        pub fn set_stream_selection(
            mut self,
            input: std::option::Option<crate::model::StreamSelection>,
        ) -> Self {
            self.stream_selection = input;
            self
        }
        /// Consumes the builder and constructs a [`CmafPackageCreateOrUpdateParameters`](crate::model::CmafPackageCreateOrUpdateParameters)
        pub fn build(self) -> crate::model::CmafPackageCreateOrUpdateParameters {
            crate::model::CmafPackageCreateOrUpdateParameters {
                encryption: self.encryption,
                hls_manifests: self.hls_manifests,
                segment_duration_seconds: self.segment_duration_seconds.unwrap_or_default(),
                segment_prefix: self.segment_prefix,
                stream_selection: self.stream_selection,
            }
        }
    }
}
impl CmafPackageCreateOrUpdateParameters {
    /// Creates a new builder-style object to manufacture [`CmafPackageCreateOrUpdateParameters`](crate::model::CmafPackageCreateOrUpdateParameters)
    pub fn builder() -> crate::model::cmaf_package_create_or_update_parameters::Builder {
        crate::model::cmaf_package_create_or_update_parameters::Builder::default()
    }
}

/// A HTTP Live Streaming (HLS) manifest configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HlsManifestCreateOrUpdateParameters {
    /// This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
    pub ad_markers: std::option::Option<crate::model::AdMarkers>,
    /// A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
    pub ad_triggers: std::option::Option<std::vec::Vec<crate::model::AdTriggersElement>>,
    /// This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
    pub ads_on_delivery_restrictions: std::option::Option<crate::model::AdsOnDeliveryRestrictions>,
    /// The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created.
    pub id: std::option::Option<std::string::String>,
    /// When enabled, an I-Frame only stream will be included in the output.
    pub include_iframe_only_stream: bool,
    /// An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint.
    pub manifest_name: std::option::Option<std::string::String>,
    /// The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
    pub playlist_type: std::option::Option<crate::model::PlaylistType>,
    /// Time window (in seconds) contained in each parent manifest.
    pub playlist_window_seconds: i32,
    /// The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
    pub program_date_time_interval_seconds: i32,
}
impl HlsManifestCreateOrUpdateParameters {
    /// This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
    pub fn ad_markers(&self) -> std::option::Option<&crate::model::AdMarkers> {
        self.ad_markers.as_ref()
    }
    /// A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
    pub fn ad_triggers(&self) -> std::option::Option<&[crate::model::AdTriggersElement]> {
        self.ad_triggers.as_deref()
    }
    /// This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
    pub fn ads_on_delivery_restrictions(
        &self,
    ) -> std::option::Option<&crate::model::AdsOnDeliveryRestrictions> {
        self.ads_on_delivery_restrictions.as_ref()
    }
    /// The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created.
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// When enabled, an I-Frame only stream will be included in the output.
    pub fn include_iframe_only_stream(&self) -> bool {
        self.include_iframe_only_stream
    }
    /// An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint.
    pub fn manifest_name(&self) -> std::option::Option<&str> {
        self.manifest_name.as_deref()
    }
    /// The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
    pub fn playlist_type(&self) -> std::option::Option<&crate::model::PlaylistType> {
        self.playlist_type.as_ref()
    }
    /// Time window (in seconds) contained in each parent manifest.
    pub fn playlist_window_seconds(&self) -> i32 {
        self.playlist_window_seconds
    }
    /// The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
    pub fn program_date_time_interval_seconds(&self) -> i32 {
        self.program_date_time_interval_seconds
    }
}
impl std::fmt::Debug for HlsManifestCreateOrUpdateParameters {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("HlsManifestCreateOrUpdateParameters");
        formatter.field("ad_markers", &self.ad_markers);
        formatter.field("ad_triggers", &self.ad_triggers);
        formatter.field(
            "ads_on_delivery_restrictions",
            &self.ads_on_delivery_restrictions,
        );
        formatter.field("id", &self.id);
        formatter.field(
            "include_iframe_only_stream",
            &self.include_iframe_only_stream,
        );
        formatter.field("manifest_name", &self.manifest_name);
        formatter.field("playlist_type", &self.playlist_type);
        formatter.field("playlist_window_seconds", &self.playlist_window_seconds);
        formatter.field(
            "program_date_time_interval_seconds",
            &self.program_date_time_interval_seconds,
        );
        formatter.finish()
    }
}
/// See [`HlsManifestCreateOrUpdateParameters`](crate::model::HlsManifestCreateOrUpdateParameters)
pub mod hls_manifest_create_or_update_parameters {

    /// A builder for [`HlsManifestCreateOrUpdateParameters`](crate::model::HlsManifestCreateOrUpdateParameters)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ad_markers: std::option::Option<crate::model::AdMarkers>,
        pub(crate) ad_triggers: std::option::Option<std::vec::Vec<crate::model::AdTriggersElement>>,
        pub(crate) ads_on_delivery_restrictions:
            std::option::Option<crate::model::AdsOnDeliveryRestrictions>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) include_iframe_only_stream: std::option::Option<bool>,
        pub(crate) manifest_name: std::option::Option<std::string::String>,
        pub(crate) playlist_type: std::option::Option<crate::model::PlaylistType>,
        pub(crate) playlist_window_seconds: std::option::Option<i32>,
        pub(crate) program_date_time_interval_seconds: std::option::Option<i32>,
    }
    impl Builder {
        /// This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
        pub fn ad_markers(mut self, input: crate::model::AdMarkers) -> Self {
            self.ad_markers = Some(input);
            self
        }
        /// This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0.
        pub fn set_ad_markers(
            mut self,
            input: std::option::Option<crate::model::AdMarkers>,
        ) -> Self {
            self.ad_markers = input;
            self
        }
        /// Appends an item to `ad_triggers`.
        ///
        /// To override the contents of this collection use [`set_ad_triggers`](Self::set_ad_triggers).
        ///
        /// A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
        pub fn ad_triggers(mut self, input: crate::model::AdTriggersElement) -> Self {
            let mut v = self.ad_triggers.unwrap_or_default();
            v.push(input);
            self.ad_triggers = Some(v);
            self
        }
        /// A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
        pub fn set_ad_triggers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AdTriggersElement>>,
        ) -> Self {
            self.ad_triggers = input;
            self
        }
        /// This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
        pub fn ads_on_delivery_restrictions(
            mut self,
            input: crate::model::AdsOnDeliveryRestrictions,
        ) -> Self {
            self.ads_on_delivery_restrictions = Some(input);
            self
        }
        /// This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
        pub fn set_ads_on_delivery_restrictions(
            mut self,
            input: std::option::Option<crate::model::AdsOnDeliveryRestrictions>,
        ) -> Self {
            self.ads_on_delivery_restrictions = input;
            self
        }
        /// The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created.
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created.
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// When enabled, an I-Frame only stream will be included in the output.
        pub fn include_iframe_only_stream(mut self, input: bool) -> Self {
            self.include_iframe_only_stream = Some(input);
            self
        }
        /// When enabled, an I-Frame only stream will be included in the output.
        pub fn set_include_iframe_only_stream(mut self, input: std::option::Option<bool>) -> Self {
            self.include_iframe_only_stream = input;
            self
        }
        /// An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint.
        pub fn manifest_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.manifest_name = Some(input.into());
            self
        }
        /// An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint.
        pub fn set_manifest_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.manifest_name = input;
            self
        }
        /// The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
        pub fn playlist_type(mut self, input: crate::model::PlaylistType) -> Self {
            self.playlist_type = Some(input);
            self
        }
        /// The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist.
        pub fn set_playlist_type(
            mut self,
            input: std::option::Option<crate::model::PlaylistType>,
        ) -> Self {
            self.playlist_type = input;
            self
        }
        /// Time window (in seconds) contained in each parent manifest.
        pub fn playlist_window_seconds(mut self, input: i32) -> Self {
            self.playlist_window_seconds = Some(input);
            self
        }
        /// Time window (in seconds) contained in each parent manifest.
        pub fn set_playlist_window_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.playlist_window_seconds = input;
            self
        }
        /// The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
        pub fn program_date_time_interval_seconds(mut self, input: i32) -> Self {
            self.program_date_time_interval_seconds = Some(input);
            self
        }
        /// The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output.
        pub fn set_program_date_time_interval_seconds(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.program_date_time_interval_seconds = input;
            self
        }
        /// Consumes the builder and constructs a [`HlsManifestCreateOrUpdateParameters`](crate::model::HlsManifestCreateOrUpdateParameters)
        pub fn build(self) -> crate::model::HlsManifestCreateOrUpdateParameters {
            crate::model::HlsManifestCreateOrUpdateParameters {
                ad_markers: self.ad_markers,
                ad_triggers: self.ad_triggers,
                ads_on_delivery_restrictions: self.ads_on_delivery_restrictions,
                id: self.id,
                include_iframe_only_stream: self.include_iframe_only_stream.unwrap_or_default(),
                manifest_name: self.manifest_name,
                playlist_type: self.playlist_type,
                playlist_window_seconds: self.playlist_window_seconds.unwrap_or_default(),
                program_date_time_interval_seconds: self
                    .program_date_time_interval_seconds
                    .unwrap_or_default(),
            }
        }
    }
}
impl HlsManifestCreateOrUpdateParameters {
    /// Creates a new builder-style object to manufacture [`HlsManifestCreateOrUpdateParameters`](crate::model::HlsManifestCreateOrUpdateParameters)
    pub fn builder() -> crate::model::hls_manifest_create_or_update_parameters::Builder {
        crate::model::hls_manifest_create_or_update_parameters::Builder::default()
    }
}

/// Configure ingress access logging.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct IngressAccessLogs {
    /// Customize the log group name.
    pub log_group_name: std::option::Option<std::string::String>,
}
impl IngressAccessLogs {
    /// Customize the log group name.
    pub fn log_group_name(&self) -> std::option::Option<&str> {
        self.log_group_name.as_deref()
    }
}
impl std::fmt::Debug for IngressAccessLogs {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("IngressAccessLogs");
        formatter.field("log_group_name", &self.log_group_name);
        formatter.finish()
    }
}
/// See [`IngressAccessLogs`](crate::model::IngressAccessLogs)
pub mod ingress_access_logs {

    /// A builder for [`IngressAccessLogs`](crate::model::IngressAccessLogs)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) log_group_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Customize the log group name.
        pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_group_name = Some(input.into());
            self
        }
        /// Customize the log group name.
        pub fn set_log_group_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_group_name = input;
            self
        }
        /// Consumes the builder and constructs a [`IngressAccessLogs`](crate::model::IngressAccessLogs)
        pub fn build(self) -> crate::model::IngressAccessLogs {
            crate::model::IngressAccessLogs {
                log_group_name: self.log_group_name,
            }
        }
    }
}
impl IngressAccessLogs {
    /// Creates a new builder-style object to manufacture [`IngressAccessLogs`](crate::model::IngressAccessLogs)
    pub fn builder() -> crate::model::ingress_access_logs::Builder {
        crate::model::ingress_access_logs::Builder::default()
    }
}

/// An HTTP Live Streaming (HLS) ingest resource configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HlsIngest {
    /// A list of endpoints to which the source stream should be sent.
    pub ingest_endpoints: std::option::Option<std::vec::Vec<crate::model::IngestEndpoint>>,
}
impl HlsIngest {
    /// A list of endpoints to which the source stream should be sent.
    pub fn ingest_endpoints(&self) -> std::option::Option<&[crate::model::IngestEndpoint]> {
        self.ingest_endpoints.as_deref()
    }
}
impl std::fmt::Debug for HlsIngest {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("HlsIngest");
        formatter.field("ingest_endpoints", &self.ingest_endpoints);
        formatter.finish()
    }
}
/// See [`HlsIngest`](crate::model::HlsIngest)
pub mod hls_ingest {

    /// A builder for [`HlsIngest`](crate::model::HlsIngest)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) ingest_endpoints:
            std::option::Option<std::vec::Vec<crate::model::IngestEndpoint>>,
    }
    impl Builder {
        /// Appends an item to `ingest_endpoints`.
        ///
        /// To override the contents of this collection use [`set_ingest_endpoints`](Self::set_ingest_endpoints).
        ///
        /// A list of endpoints to which the source stream should be sent.
        pub fn ingest_endpoints(mut self, input: crate::model::IngestEndpoint) -> Self {
            let mut v = self.ingest_endpoints.unwrap_or_default();
            v.push(input);
            self.ingest_endpoints = Some(v);
            self
        }
        /// A list of endpoints to which the source stream should be sent.
        pub fn set_ingest_endpoints(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::IngestEndpoint>>,
        ) -> Self {
            self.ingest_endpoints = input;
            self
        }
        /// Consumes the builder and constructs a [`HlsIngest`](crate::model::HlsIngest)
        pub fn build(self) -> crate::model::HlsIngest {
            crate::model::HlsIngest {
                ingest_endpoints: self.ingest_endpoints,
            }
        }
    }
}
impl HlsIngest {
    /// Creates a new builder-style object to manufacture [`HlsIngest`](crate::model::HlsIngest)
    pub fn builder() -> crate::model::hls_ingest::Builder {
        crate::model::hls_ingest::Builder::default()
    }
}

/// An endpoint for ingesting source content for a Channel.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct IngestEndpoint {
    /// The system generated unique identifier for the IngestEndpoint
    pub id: std::option::Option<std::string::String>,
    /// The system generated password for ingest authentication.
    pub password: std::option::Option<std::string::String>,
    /// The ingest URL to which the source stream should be sent.
    pub url: std::option::Option<std::string::String>,
    /// The system generated username for ingest authentication.
    pub username: std::option::Option<std::string::String>,
}
impl IngestEndpoint {
    /// The system generated unique identifier for the IngestEndpoint
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// The system generated password for ingest authentication.
    pub fn password(&self) -> std::option::Option<&str> {
        self.password.as_deref()
    }
    /// The ingest URL to which the source stream should be sent.
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
    /// The system generated username for ingest authentication.
    pub fn username(&self) -> std::option::Option<&str> {
        self.username.as_deref()
    }
}
impl std::fmt::Debug for IngestEndpoint {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("IngestEndpoint");
        formatter.field("id", &self.id);
        formatter.field("password", &self.password);
        formatter.field("url", &self.url);
        formatter.field("username", &self.username);
        formatter.finish()
    }
}
/// See [`IngestEndpoint`](crate::model::IngestEndpoint)
pub mod ingest_endpoint {

    /// A builder for [`IngestEndpoint`](crate::model::IngestEndpoint)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) password: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
        pub(crate) username: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// The system generated unique identifier for the IngestEndpoint
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// The system generated unique identifier for the IngestEndpoint
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// The system generated password for ingest authentication.
        pub fn password(mut self, input: impl Into<std::string::String>) -> Self {
            self.password = Some(input.into());
            self
        }
        /// The system generated password for ingest authentication.
        pub fn set_password(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.password = input;
            self
        }
        /// The ingest URL to which the source stream should be sent.
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// The ingest URL to which the source stream should be sent.
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// The system generated username for ingest authentication.
        pub fn username(mut self, input: impl Into<std::string::String>) -> Self {
            self.username = Some(input.into());
            self
        }
        /// The system generated username for ingest authentication.
        pub fn set_username(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.username = input;
            self
        }
        /// Consumes the builder and constructs a [`IngestEndpoint`](crate::model::IngestEndpoint)
        pub fn build(self) -> crate::model::IngestEndpoint {
            crate::model::IngestEndpoint {
                id: self.id,
                password: self.password,
                url: self.url,
                username: self.username,
            }
        }
    }
}
impl IngestEndpoint {
    /// Creates a new builder-style object to manufacture [`IngestEndpoint`](crate::model::IngestEndpoint)
    pub fn builder() -> crate::model::ingest_endpoint::Builder {
        crate::model::ingest_endpoint::Builder::default()
    }
}

/// Configure egress access logging.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EgressAccessLogs {
    /// Customize the log group name.
    pub log_group_name: std::option::Option<std::string::String>,
}
impl EgressAccessLogs {
    /// Customize the log group name.
    pub fn log_group_name(&self) -> std::option::Option<&str> {
        self.log_group_name.as_deref()
    }
}
impl std::fmt::Debug for EgressAccessLogs {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("EgressAccessLogs");
        formatter.field("log_group_name", &self.log_group_name);
        formatter.finish()
    }
}
/// See [`EgressAccessLogs`](crate::model::EgressAccessLogs)
pub mod egress_access_logs {

    /// A builder for [`EgressAccessLogs`](crate::model::EgressAccessLogs)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) log_group_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Customize the log group name.
        pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_group_name = Some(input.into());
            self
        }
        /// Customize the log group name.
        pub fn set_log_group_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_group_name = input;
            self
        }
        /// Consumes the builder and constructs a [`EgressAccessLogs`](crate::model::EgressAccessLogs)
        pub fn build(self) -> crate::model::EgressAccessLogs {
            crate::model::EgressAccessLogs {
                log_group_name: self.log_group_name,
            }
        }
    }
}
impl EgressAccessLogs {
    /// Creates a new builder-style object to manufacture [`EgressAccessLogs`](crate::model::EgressAccessLogs)
    pub fn builder() -> crate::model::egress_access_logs::Builder {
        crate::model::egress_access_logs::Builder::default()
    }
}

/// An OriginEndpoint resource configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OriginEndpoint {
    /// The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
    pub arn: std::option::Option<std::string::String>,
    /// CDN Authorization credentials
    pub authorization: std::option::Option<crate::model::Authorization>,
    /// The ID of the Channel the OriginEndpoint is associated with.
    pub channel_id: std::option::Option<std::string::String>,
    /// A Common Media Application Format (CMAF) packaging configuration.
    pub cmaf_package: std::option::Option<crate::model::CmafPackage>,
    /// A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration.
    pub dash_package: std::option::Option<crate::model::DashPackage>,
    /// A short text description of the OriginEndpoint.
    pub description: std::option::Option<std::string::String>,
    /// An HTTP Live Streaming (HLS) packaging configuration.
    pub hls_package: std::option::Option<crate::model::HlsPackage>,
    /// The ID of the OriginEndpoint.
    pub id: std::option::Option<std::string::String>,
    /// A short string appended to the end of the OriginEndpoint URL.
    pub manifest_name: std::option::Option<std::string::String>,
    /// A Microsoft Smooth Streaming (MSS) packaging configuration.
    pub mss_package: std::option::Option<crate::model::MssPackage>,
    /// Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
    pub origination: std::option::Option<crate::model::Origination>,
    /// Maximum duration (seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint.
    pub startover_window_seconds: i32,
    /// A collection of tags associated with a resource
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint.
    pub time_delay_seconds: i32,
    /// The URL of the packaged OriginEndpoint for consumption.
    pub url: std::option::Option<std::string::String>,
    /// A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
    pub whitelist: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl OriginEndpoint {
    /// The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// CDN Authorization credentials
    pub fn authorization(&self) -> std::option::Option<&crate::model::Authorization> {
        self.authorization.as_ref()
    }
    /// The ID of the Channel the OriginEndpoint is associated with.
    pub fn channel_id(&self) -> std::option::Option<&str> {
        self.channel_id.as_deref()
    }
    /// A Common Media Application Format (CMAF) packaging configuration.
    pub fn cmaf_package(&self) -> std::option::Option<&crate::model::CmafPackage> {
        self.cmaf_package.as_ref()
    }
    /// A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration.
    pub fn dash_package(&self) -> std::option::Option<&crate::model::DashPackage> {
        self.dash_package.as_ref()
    }
    /// A short text description of the OriginEndpoint.
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// An HTTP Live Streaming (HLS) packaging configuration.
    pub fn hls_package(&self) -> std::option::Option<&crate::model::HlsPackage> {
        self.hls_package.as_ref()
    }
    /// The ID of the OriginEndpoint.
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// A short string appended to the end of the OriginEndpoint URL.
    pub fn manifest_name(&self) -> std::option::Option<&str> {
        self.manifest_name.as_deref()
    }
    /// A Microsoft Smooth Streaming (MSS) packaging configuration.
    pub fn mss_package(&self) -> std::option::Option<&crate::model::MssPackage> {
        self.mss_package.as_ref()
    }
    /// Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
    pub fn origination(&self) -> std::option::Option<&crate::model::Origination> {
        self.origination.as_ref()
    }
    /// Maximum duration (seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint.
    pub fn startover_window_seconds(&self) -> i32 {
        self.startover_window_seconds
    }
    /// A collection of tags associated with a resource
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint.
    pub fn time_delay_seconds(&self) -> i32 {
        self.time_delay_seconds
    }
    /// The URL of the packaged OriginEndpoint for consumption.
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
    /// A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
    pub fn whitelist(&self) -> std::option::Option<&[std::string::String]> {
        self.whitelist.as_deref()
    }
}
impl std::fmt::Debug for OriginEndpoint {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("OriginEndpoint");
        formatter.field("arn", &self.arn);
        formatter.field("authorization", &self.authorization);
        formatter.field("channel_id", &self.channel_id);
        formatter.field("cmaf_package", &self.cmaf_package);
        formatter.field("dash_package", &self.dash_package);
        formatter.field("description", &self.description);
        formatter.field("hls_package", &self.hls_package);
        formatter.field("id", &self.id);
        formatter.field("manifest_name", &self.manifest_name);
        formatter.field("mss_package", &self.mss_package);
        formatter.field("origination", &self.origination);
        formatter.field("startover_window_seconds", &self.startover_window_seconds);
        formatter.field("tags", &self.tags);
        formatter.field("time_delay_seconds", &self.time_delay_seconds);
        formatter.field("url", &self.url);
        formatter.field("whitelist", &self.whitelist);
        formatter.finish()
    }
}
/// See [`OriginEndpoint`](crate::model::OriginEndpoint)
pub mod origin_endpoint {

    /// A builder for [`OriginEndpoint`](crate::model::OriginEndpoint)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) authorization: std::option::Option<crate::model::Authorization>,
        pub(crate) channel_id: std::option::Option<std::string::String>,
        pub(crate) cmaf_package: std::option::Option<crate::model::CmafPackage>,
        pub(crate) dash_package: std::option::Option<crate::model::DashPackage>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) hls_package: std::option::Option<crate::model::HlsPackage>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) manifest_name: std::option::Option<std::string::String>,
        pub(crate) mss_package: std::option::Option<crate::model::MssPackage>,
        pub(crate) origination: std::option::Option<crate::model::Origination>,
        pub(crate) startover_window_seconds: std::option::Option<i32>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) time_delay_seconds: std::option::Option<i32>,
        pub(crate) url: std::option::Option<std::string::String>,
        pub(crate) whitelist: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// CDN Authorization credentials
        pub fn authorization(mut self, input: crate::model::Authorization) -> Self {
            self.authorization = Some(input);
            self
        }
        /// CDN Authorization credentials
        pub fn set_authorization(
            mut self,
            input: std::option::Option<crate::model::Authorization>,
        ) -> Self {
            self.authorization = input;
            self
        }
        /// The ID of the Channel the OriginEndpoint is associated with.
        pub fn channel_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.channel_id = Some(input.into());
            self
        }
        /// The ID of the Channel the OriginEndpoint is associated with.
        pub fn set_channel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.channel_id = input;
            self
        }
        /// A Common Media Application Format (CMAF) packaging configuration.
        pub fn cmaf_package(mut self, input: crate::model::CmafPackage) -> Self {
            self.cmaf_package = Some(input);
            self
        }
        /// A Common Media Application Format (CMAF) packaging configuration.
        pub fn set_cmaf_package(
            mut self,
            input: std::option::Option<crate::model::CmafPackage>,
        ) -> Self {
            self.cmaf_package = input;
            self
        }
        /// A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration.
        pub fn dash_package(mut self, input: crate::model::DashPackage) -> Self {
            self.dash_package = Some(input);
            self
        }
        /// A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration.
        pub fn set_dash_package(
            mut self,
            input: std::option::Option<crate::model::DashPackage>,
        ) -> Self {
            self.dash_package = input;
            self
        }
        /// A short text description of the OriginEndpoint.
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// A short text description of the OriginEndpoint.
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// An HTTP Live Streaming (HLS) packaging configuration.
        pub fn hls_package(mut self, input: crate::model::HlsPackage) -> Self {
            self.hls_package = Some(input);
            self
        }
        /// An HTTP Live Streaming (HLS) packaging configuration.
        pub fn set_hls_package(
            mut self,
            input: std::option::Option<crate::model::HlsPackage>,
        ) -> Self {
            self.hls_package = input;
            self
        }
        /// The ID of the OriginEndpoint.
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// The ID of the OriginEndpoint.
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// A short string appended to the end of the OriginEndpoint URL.
        pub fn manifest_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.manifest_name = Some(input.into());
            self
        }
        /// A short string appended to the end of the OriginEndpoint URL.
        pub fn set_manifest_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.manifest_name = input;
            self
        }
        /// A Microsoft Smooth Streaming (MSS) packaging configuration.
        pub fn mss_package(mut self, input: crate::model::MssPackage) -> Self {
            self.mss_package = Some(input);
            self
        }
        /// A Microsoft Smooth Streaming (MSS) packaging configuration.
        pub fn set_mss_package(
            mut self,
            input: std::option::Option<crate::model::MssPackage>,
        ) -> Self {
            self.mss_package = input;
            self
        }
        /// Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
        pub fn origination(mut self, input: crate::model::Origination) -> Self {
            self.origination = Some(input);
            self
        }
        /// Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
        pub fn set_origination(
            mut self,
            input: std::option::Option<crate::model::Origination>,
        ) -> Self {
            self.origination = input;
            self
        }
        /// Maximum duration (seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint.
        pub fn startover_window_seconds(mut self, input: i32) -> Self {
            self.startover_window_seconds = Some(input);
            self
        }
        /// Maximum duration (seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint.
        pub fn set_startover_window_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.startover_window_seconds = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// A collection of tags associated with a resource
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// A collection of tags associated with a resource
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint.
        pub fn time_delay_seconds(mut self, input: i32) -> Self {
            self.time_delay_seconds = Some(input);
            self
        }
        /// Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint.
        pub fn set_time_delay_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.time_delay_seconds = input;
            self
        }
        /// The URL of the packaged OriginEndpoint for consumption.
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// The URL of the packaged OriginEndpoint for consumption.
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// Appends an item to `whitelist`.
        ///
        /// To override the contents of this collection use [`set_whitelist`](Self::set_whitelist).
        ///
        /// A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
        pub fn whitelist(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.whitelist.unwrap_or_default();
            v.push(input.into());
            self.whitelist = Some(v);
            self
        }
        /// A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
        pub fn set_whitelist(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.whitelist = input;
            self
        }
        /// Consumes the builder and constructs a [`OriginEndpoint`](crate::model::OriginEndpoint)
        pub fn build(self) -> crate::model::OriginEndpoint {
            crate::model::OriginEndpoint {
                arn: self.arn,
                authorization: self.authorization,
                channel_id: self.channel_id,
                cmaf_package: self.cmaf_package,
                dash_package: self.dash_package,
                description: self.description,
                hls_package: self.hls_package,
                id: self.id,
                manifest_name: self.manifest_name,
                mss_package: self.mss_package,
                origination: self.origination,
                startover_window_seconds: self.startover_window_seconds.unwrap_or_default(),
                tags: self.tags,
                time_delay_seconds: self.time_delay_seconds.unwrap_or_default(),
                url: self.url,
                whitelist: self.whitelist,
            }
        }
    }
}
impl OriginEndpoint {
    /// Creates a new builder-style object to manufacture [`OriginEndpoint`](crate::model::OriginEndpoint)
    pub fn builder() -> crate::model::origin_endpoint::Builder {
        crate::model::origin_endpoint::Builder::default()
    }
}

/// A HarvestJob resource configuration
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HarvestJob {
    /// The Amazon Resource Name (ARN) assigned to the HarvestJob.
    pub arn: std::option::Option<std::string::String>,
    /// The ID of the Channel that the HarvestJob will harvest from.
    pub channel_id: std::option::Option<std::string::String>,
    /// The time the HarvestJob was submitted
    pub created_at: std::option::Option<std::string::String>,
    /// The end of the time-window which will be harvested.
    pub end_time: std::option::Option<std::string::String>,
    /// The ID of the HarvestJob. The ID must be unique within the region and it cannot be changed after the HarvestJob is submitted.
    pub id: std::option::Option<std::string::String>,
    /// The ID of the OriginEndpoint that the HarvestJob will harvest from. This cannot be changed after the HarvestJob is submitted.
    pub origin_endpoint_id: std::option::Option<std::string::String>,
    /// Configuration parameters for where in an S3 bucket to place the harvested content
    pub s3_destination: std::option::Option<crate::model::S3Destination>,
    /// The start of the time-window which will be harvested.
    pub start_time: std::option::Option<std::string::String>,
    /// The current status of the HarvestJob. Consider setting up a CloudWatch Event to listen for HarvestJobs as they succeed or fail. In the event of failure, the CloudWatch Event will include an explanation of why the HarvestJob failed.
    pub status: std::option::Option<crate::model::Status>,
}
impl HarvestJob {
    /// The Amazon Resource Name (ARN) assigned to the HarvestJob.
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// The ID of the Channel that the HarvestJob will harvest from.
    pub fn channel_id(&self) -> std::option::Option<&str> {
        self.channel_id.as_deref()
    }
    /// The time the HarvestJob was submitted
    pub fn created_at(&self) -> std::option::Option<&str> {
        self.created_at.as_deref()
    }
    /// The end of the time-window which will be harvested.
    pub fn end_time(&self) -> std::option::Option<&str> {
        self.end_time.as_deref()
    }
    /// The ID of the HarvestJob. The ID must be unique within the region and it cannot be changed after the HarvestJob is submitted.
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// The ID of the OriginEndpoint that the HarvestJob will harvest from. This cannot be changed after the HarvestJob is submitted.
    pub fn origin_endpoint_id(&self) -> std::option::Option<&str> {
        self.origin_endpoint_id.as_deref()
    }
    /// Configuration parameters for where in an S3 bucket to place the harvested content
    pub fn s3_destination(&self) -> std::option::Option<&crate::model::S3Destination> {
        self.s3_destination.as_ref()
    }
    /// The start of the time-window which will be harvested.
    pub fn start_time(&self) -> std::option::Option<&str> {
        self.start_time.as_deref()
    }
    /// The current status of the HarvestJob. Consider setting up a CloudWatch Event to listen for HarvestJobs as they succeed or fail. In the event of failure, the CloudWatch Event will include an explanation of why the HarvestJob failed.
    pub fn status(&self) -> std::option::Option<&crate::model::Status> {
        self.status.as_ref()
    }
}
impl std::fmt::Debug for HarvestJob {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("HarvestJob");
        formatter.field("arn", &self.arn);
        formatter.field("channel_id", &self.channel_id);
        formatter.field("created_at", &self.created_at);
        formatter.field("end_time", &self.end_time);
        formatter.field("id", &self.id);
        formatter.field("origin_endpoint_id", &self.origin_endpoint_id);
        formatter.field("s3_destination", &self.s3_destination);
        formatter.field("start_time", &self.start_time);
        formatter.field("status", &self.status);
        formatter.finish()
    }
}
/// See [`HarvestJob`](crate::model::HarvestJob)
pub mod harvest_job {

    /// A builder for [`HarvestJob`](crate::model::HarvestJob)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) channel_id: std::option::Option<std::string::String>,
        pub(crate) created_at: std::option::Option<std::string::String>,
        pub(crate) end_time: std::option::Option<std::string::String>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) origin_endpoint_id: std::option::Option<std::string::String>,
        pub(crate) s3_destination: std::option::Option<crate::model::S3Destination>,
        pub(crate) start_time: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::Status>,
    }
    impl Builder {
        /// The Amazon Resource Name (ARN) assigned to the HarvestJob.
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// The Amazon Resource Name (ARN) assigned to the HarvestJob.
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// The ID of the Channel that the HarvestJob will harvest from.
        pub fn channel_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.channel_id = Some(input.into());
            self
        }
        /// The ID of the Channel that the HarvestJob will harvest from.
        pub fn set_channel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.channel_id = input;
            self
        }
        /// The time the HarvestJob was submitted
        pub fn created_at(mut self, input: impl Into<std::string::String>) -> Self {
            self.created_at = Some(input.into());
            self
        }
        /// The time the HarvestJob was submitted
        pub fn set_created_at(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.created_at = input;
            self
        }
        /// The end of the time-window which will be harvested.
        pub fn end_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.end_time = Some(input.into());
            self
        }
        /// The end of the time-window which will be harvested.
        pub fn set_end_time(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.end_time = input;
            self
        }
        /// The ID of the HarvestJob. The ID must be unique within the region and it cannot be changed after the HarvestJob is submitted.
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// The ID of the HarvestJob. The ID must be unique within the region and it cannot be changed after the HarvestJob is submitted.
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// The ID of the OriginEndpoint that the HarvestJob will harvest from. This cannot be changed after the HarvestJob is submitted.
        pub fn origin_endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.origin_endpoint_id = Some(input.into());
            self
        }
        /// The ID of the OriginEndpoint that the HarvestJob will harvest from. This cannot be changed after the HarvestJob is submitted.
        pub fn set_origin_endpoint_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.origin_endpoint_id = input;
            self
        }
        /// Configuration parameters for where in an S3 bucket to place the harvested content
        pub fn s3_destination(mut self, input: crate::model::S3Destination) -> Self {
            self.s3_destination = Some(input);
            self
        }
        /// Configuration parameters for where in an S3 bucket to place the harvested content
        pub fn set_s3_destination(
            mut self,
            input: std::option::Option<crate::model::S3Destination>,
        ) -> Self {
            self.s3_destination = input;
            self
        }
        /// The start of the time-window which will be harvested.
        pub fn start_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.start_time = Some(input.into());
            self
        }
        /// The start of the time-window which will be harvested.
        pub fn set_start_time(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.start_time = input;
            self
        }
        /// The current status of the HarvestJob. Consider setting up a CloudWatch Event to listen for HarvestJobs as they succeed or fail. In the event of failure, the CloudWatch Event will include an explanation of why the HarvestJob failed.
        pub fn status(mut self, input: crate::model::Status) -> Self {
            self.status = Some(input);
            self
        }
        /// The current status of the HarvestJob. Consider setting up a CloudWatch Event to listen for HarvestJobs as they succeed or fail. In the event of failure, the CloudWatch Event will include an explanation of why the HarvestJob failed.
        pub fn set_status(mut self, input: std::option::Option<crate::model::Status>) -> Self {
            self.status = input;
            self
        }
        /// Consumes the builder and constructs a [`HarvestJob`](crate::model::HarvestJob)
        pub fn build(self) -> crate::model::HarvestJob {
            crate::model::HarvestJob {
                arn: self.arn,
                channel_id: self.channel_id,
                created_at: self.created_at,
                end_time: self.end_time,
                id: self.id,
                origin_endpoint_id: self.origin_endpoint_id,
                s3_destination: self.s3_destination,
                start_time: self.start_time,
                status: self.status,
            }
        }
    }
}
impl HarvestJob {
    /// Creates a new builder-style object to manufacture [`HarvestJob`](crate::model::HarvestJob)
    pub fn builder() -> crate::model::harvest_job::Builder {
        crate::model::harvest_job::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Status {
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    InProgress,
    #[allow(missing_docs)] // documentation missing in model
    Succeeded,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for Status {
    fn from(s: &str) -> Self {
        match s {
            "FAILED" => Status::Failed,
            "IN_PROGRESS" => Status::InProgress,
            "SUCCEEDED" => Status::Succeeded,
            other => Status::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for Status {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Status::from(s))
    }
}
impl Status {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Status::Failed => "FAILED",
            Status::InProgress => "IN_PROGRESS",
            Status::Succeeded => "SUCCEEDED",
            Status::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["FAILED", "IN_PROGRESS", "SUCCEEDED"]
    }
}
impl AsRef<str> for Status {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// Configuration parameters for where in an S3 bucket to place the harvested content
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct S3Destination {
    /// The name of an S3 bucket within which harvested content will be exported
    pub bucket_name: std::option::Option<std::string::String>,
    /// The key in the specified S3 bucket where the harvested top-level manifest will be placed.
    pub manifest_key: std::option::Option<std::string::String>,
    /// The IAM role used to write to the specified S3 bucket
    pub role_arn: std::option::Option<std::string::String>,
}
impl S3Destination {
    /// The name of an S3 bucket within which harvested content will be exported
    pub fn bucket_name(&self) -> std::option::Option<&str> {
        self.bucket_name.as_deref()
    }
    /// The key in the specified S3 bucket where the harvested top-level manifest will be placed.
    pub fn manifest_key(&self) -> std::option::Option<&str> {
        self.manifest_key.as_deref()
    }
    /// The IAM role used to write to the specified S3 bucket
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
}
impl std::fmt::Debug for S3Destination {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("S3Destination");
        formatter.field("bucket_name", &self.bucket_name);
        formatter.field("manifest_key", &self.manifest_key);
        formatter.field("role_arn", &self.role_arn);
        formatter.finish()
    }
}
/// See [`S3Destination`](crate::model::S3Destination)
pub mod s3_destination {

    /// A builder for [`S3Destination`](crate::model::S3Destination)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bucket_name: std::option::Option<std::string::String>,
        pub(crate) manifest_key: std::option::Option<std::string::String>,
        pub(crate) role_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// The name of an S3 bucket within which harvested content will be exported
        pub fn bucket_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.bucket_name = Some(input.into());
            self
        }
        /// The name of an S3 bucket within which harvested content will be exported
        pub fn set_bucket_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bucket_name = input;
            self
        }
        /// The key in the specified S3 bucket where the harvested top-level manifest will be placed.
        pub fn manifest_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.manifest_key = Some(input.into());
            self
        }
        /// The key in the specified S3 bucket where the harvested top-level manifest will be placed.
        pub fn set_manifest_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.manifest_key = input;
            self
        }
        /// The IAM role used to write to the specified S3 bucket
        pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.role_arn = Some(input.into());
            self
        }
        /// The IAM role used to write to the specified S3 bucket
        pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.role_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`S3Destination`](crate::model::S3Destination)
        pub fn build(self) -> crate::model::S3Destination {
            crate::model::S3Destination {
                bucket_name: self.bucket_name,
                manifest_key: self.manifest_key,
                role_arn: self.role_arn,
            }
        }
    }
}
impl S3Destination {
    /// Creates a new builder-style object to manufacture [`S3Destination`](crate::model::S3Destination)
    pub fn builder() -> crate::model::s3_destination::Builder {
        crate::model::s3_destination::Builder::default()
    }
}

/// A Channel resource configuration.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Channel {
    /// The Amazon Resource Name (ARN) assigned to the Channel.
    pub arn: std::option::Option<std::string::String>,
    /// A short text description of the Channel.
    pub description: std::option::Option<std::string::String>,
    /// Configure egress access logging.
    pub egress_access_logs: std::option::Option<crate::model::EgressAccessLogs>,
    /// An HTTP Live Streaming (HLS) ingest resource configuration.
    pub hls_ingest: std::option::Option<crate::model::HlsIngest>,
    /// The ID of the Channel.
    pub id: std::option::Option<std::string::String>,
    /// Configure ingress access logging.
    pub ingress_access_logs: std::option::Option<crate::model::IngressAccessLogs>,
    /// A collection of tags associated with a resource
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl Channel {
    /// The Amazon Resource Name (ARN) assigned to the Channel.
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// A short text description of the Channel.
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// Configure egress access logging.
    pub fn egress_access_logs(&self) -> std::option::Option<&crate::model::EgressAccessLogs> {
        self.egress_access_logs.as_ref()
    }
    /// An HTTP Live Streaming (HLS) ingest resource configuration.
    pub fn hls_ingest(&self) -> std::option::Option<&crate::model::HlsIngest> {
        self.hls_ingest.as_ref()
    }
    /// The ID of the Channel.
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// Configure ingress access logging.
    pub fn ingress_access_logs(&self) -> std::option::Option<&crate::model::IngressAccessLogs> {
        self.ingress_access_logs.as_ref()
    }
    /// A collection of tags associated with a resource
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
}
impl std::fmt::Debug for Channel {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Channel");
        formatter.field("arn", &self.arn);
        formatter.field("description", &self.description);
        formatter.field("egress_access_logs", &self.egress_access_logs);
        formatter.field("hls_ingest", &self.hls_ingest);
        formatter.field("id", &self.id);
        formatter.field("ingress_access_logs", &self.ingress_access_logs);
        formatter.field("tags", &self.tags);
        formatter.finish()
    }
}
/// See [`Channel`](crate::model::Channel)
pub mod channel {

    /// A builder for [`Channel`](crate::model::Channel)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) egress_access_logs: std::option::Option<crate::model::EgressAccessLogs>,
        pub(crate) hls_ingest: std::option::Option<crate::model::HlsIngest>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) ingress_access_logs: std::option::Option<crate::model::IngressAccessLogs>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
    }
    impl Builder {
        /// The Amazon Resource Name (ARN) assigned to the Channel.
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// The Amazon Resource Name (ARN) assigned to the Channel.
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// A short text description of the Channel.
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// A short text description of the Channel.
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// Configure egress access logging.
        pub fn egress_access_logs(mut self, input: crate::model::EgressAccessLogs) -> Self {
            self.egress_access_logs = Some(input);
            self
        }
        /// Configure egress access logging.
        pub fn set_egress_access_logs(
            mut self,
            input: std::option::Option<crate::model::EgressAccessLogs>,
        ) -> Self {
            self.egress_access_logs = input;
            self
        }
        /// An HTTP Live Streaming (HLS) ingest resource configuration.
        pub fn hls_ingest(mut self, input: crate::model::HlsIngest) -> Self {
            self.hls_ingest = Some(input);
            self
        }
        /// An HTTP Live Streaming (HLS) ingest resource configuration.
        pub fn set_hls_ingest(
            mut self,
            input: std::option::Option<crate::model::HlsIngest>,
        ) -> Self {
            self.hls_ingest = input;
            self
        }
        /// The ID of the Channel.
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// The ID of the Channel.
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// Configure ingress access logging.
        pub fn ingress_access_logs(mut self, input: crate::model::IngressAccessLogs) -> Self {
            self.ingress_access_logs = Some(input);
            self
        }
        /// Configure ingress access logging.
        pub fn set_ingress_access_logs(
            mut self,
            input: std::option::Option<crate::model::IngressAccessLogs>,
        ) -> Self {
            self.ingress_access_logs = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// A collection of tags associated with a resource
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// A collection of tags associated with a resource
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`Channel`](crate::model::Channel)
        pub fn build(self) -> crate::model::Channel {
            crate::model::Channel {
                arn: self.arn,
                description: self.description,
                egress_access_logs: self.egress_access_logs,
                hls_ingest: self.hls_ingest,
                id: self.id,
                ingress_access_logs: self.ingress_access_logs,
                tags: self.tags,
            }
        }
    }
}
impl Channel {
    /// Creates a new builder-style object to manufacture [`Channel`](crate::model::Channel)
    pub fn builder() -> crate::model::channel::Builder {
        crate::model::channel::Builder::default()
    }
}