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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Detailed information about the input that failed to satisfy the constraints specified by a call.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum BadRequestDetails {
/// <p>Detailed information about the bad request exception error when creating a hosted configuration version.</p>
InvalidConfiguration(std::vec::Vec<crate::model::InvalidConfigurationDetail>),
/// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
/// An unknown enum variant
///
/// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
/// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
/// by the client. This can happen when the server adds new functionality, but the client has not been updated.
/// To investigate this, consider turning on debug logging to print the raw HTTP response.
#[non_exhaustive]
Unknown,
}
impl BadRequestDetails {
#[allow(irrefutable_let_patterns)]
/// Tries to convert the enum instance into [`InvalidConfiguration`](crate::model::BadRequestDetails::InvalidConfiguration), extracting the inner [`Vec`](std::vec::Vec).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_invalid_configuration(
&self,
) -> std::result::Result<&std::vec::Vec<crate::model::InvalidConfigurationDetail>, &Self> {
if let BadRequestDetails::InvalidConfiguration(val) = &self {
Ok(val)
} else {
Err(self)
}
}
/// Returns true if this is a [`InvalidConfiguration`](crate::model::BadRequestDetails::InvalidConfiguration).
pub fn is_invalid_configuration(&self) -> bool {
self.as_invalid_configuration().is_ok()
}
/// Returns true if the enum instance is the `Unknown` variant.
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}
/// <p>Detailed information about the bad request exception error when creating a hosted configuration version.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidConfigurationDetail {
/// <p>The invalid or out-of-range validation constraint in your JSON schema that failed validation.</p>
#[doc(hidden)]
pub constraint: std::option::Option<std::string::String>,
/// <p>Location of the validation constraint in the configuration JSON schema that failed validation.</p>
#[doc(hidden)]
pub location: std::option::Option<std::string::String>,
/// <p>The reason for an invalid configuration error.</p>
#[doc(hidden)]
pub reason: std::option::Option<std::string::String>,
/// <p>The type of error for an invalid configuration.</p>
#[doc(hidden)]
pub r#type: std::option::Option<std::string::String>,
/// <p>Details about an error with Lambda when a synchronous extension experiences an error during an invocation.</p>
#[doc(hidden)]
pub value: std::option::Option<std::string::String>,
}
impl InvalidConfigurationDetail {
/// <p>The invalid or out-of-range validation constraint in your JSON schema that failed validation.</p>
pub fn constraint(&self) -> std::option::Option<&str> {
self.constraint.as_deref()
}
/// <p>Location of the validation constraint in the configuration JSON schema that failed validation.</p>
pub fn location(&self) -> std::option::Option<&str> {
self.location.as_deref()
}
/// <p>The reason for an invalid configuration error.</p>
pub fn reason(&self) -> std::option::Option<&str> {
self.reason.as_deref()
}
/// <p>The type of error for an invalid configuration.</p>
pub fn r#type(&self) -> std::option::Option<&str> {
self.r#type.as_deref()
}
/// <p>Details about an error with Lambda when a synchronous extension experiences an error during an invocation.</p>
pub fn value(&self) -> std::option::Option<&str> {
self.value.as_deref()
}
}
/// See [`InvalidConfigurationDetail`](crate::model::InvalidConfigurationDetail).
pub mod invalid_configuration_detail {
/// A builder for [`InvalidConfigurationDetail`](crate::model::InvalidConfigurationDetail).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) constraint: std::option::Option<std::string::String>,
pub(crate) location: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<std::string::String>,
pub(crate) value: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The invalid or out-of-range validation constraint in your JSON schema that failed validation.</p>
pub fn constraint(mut self, input: impl Into<std::string::String>) -> Self {
self.constraint = Some(input.into());
self
}
/// <p>The invalid or out-of-range validation constraint in your JSON schema that failed validation.</p>
pub fn set_constraint(mut self, input: std::option::Option<std::string::String>) -> Self {
self.constraint = input;
self
}
/// <p>Location of the validation constraint in the configuration JSON schema that failed validation.</p>
pub fn location(mut self, input: impl Into<std::string::String>) -> Self {
self.location = Some(input.into());
self
}
/// <p>Location of the validation constraint in the configuration JSON schema that failed validation.</p>
pub fn set_location(mut self, input: std::option::Option<std::string::String>) -> Self {
self.location = input;
self
}
/// <p>The reason for an invalid configuration error.</p>
pub fn reason(mut self, input: impl Into<std::string::String>) -> Self {
self.reason = Some(input.into());
self
}
/// <p>The reason for an invalid configuration error.</p>
pub fn set_reason(mut self, input: std::option::Option<std::string::String>) -> Self {
self.reason = input;
self
}
/// <p>The type of error for an invalid configuration.</p>
pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
self.r#type = Some(input.into());
self
}
/// <p>The type of error for an invalid configuration.</p>
pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.r#type = input;
self
}
/// <p>Details about an error with Lambda when a synchronous extension experiences an error during an invocation.</p>
pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
self.value = Some(input.into());
self
}
/// <p>Details about an error with Lambda when a synchronous extension experiences an error during an invocation.</p>
pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
self.value = input;
self
}
/// Consumes the builder and constructs a [`InvalidConfigurationDetail`](crate::model::InvalidConfigurationDetail).
pub fn build(self) -> crate::model::InvalidConfigurationDetail {
crate::model::InvalidConfigurationDetail {
constraint: self.constraint,
location: self.location,
reason: self.reason,
r#type: self.r#type,
value: self.value,
}
}
}
}
impl InvalidConfigurationDetail {
/// Creates a new builder-style object to manufacture [`InvalidConfigurationDetail`](crate::model::InvalidConfigurationDetail).
pub fn builder() -> crate::model::invalid_configuration_detail::Builder {
crate::model::invalid_configuration_detail::Builder::default()
}
}
/// When writing a match expression against `BadRequestReason`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let badrequestreason = unimplemented!();
/// match badrequestreason {
/// BadRequestReason::InvalidConfiguration => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `badrequestreason` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `BadRequestReason::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `BadRequestReason::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `BadRequestReason::NewFeature` is defined.
/// Specifically, when `badrequestreason` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `BadRequestReason::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[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 BadRequestReason {
#[allow(missing_docs)] // documentation missing in model
InvalidConfiguration,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for BadRequestReason {
fn from(s: &str) -> Self {
match s {
"InvalidConfiguration" => BadRequestReason::InvalidConfiguration,
other => BadRequestReason::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for BadRequestReason {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BadRequestReason::from(s))
}
}
impl BadRequestReason {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BadRequestReason::InvalidConfiguration => "InvalidConfiguration",
BadRequestReason::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&["InvalidConfiguration"]
}
}
impl AsRef<str> for BadRequestReason {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>A value such as an Amazon Resource Name (ARN) or an Amazon Simple Notification Service topic entered in an extension when invoked. Parameter values are specified in an extension association. For more information about extensions, see <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/working-with-appconfig-extensions.html">Working with AppConfig extensions</a> in the <i>AppConfig User Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Parameter {
/// <p>Information about the parameter.</p>
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
/// <p>A parameter value must be specified in the extension association.</p>
#[doc(hidden)]
pub required: bool,
}
impl Parameter {
/// <p>Information about the parameter.</p>
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
/// <p>A parameter value must be specified in the extension association.</p>
pub fn required(&self) -> bool {
self.required
}
}
/// See [`Parameter`](crate::model::Parameter).
pub mod parameter {
/// A builder for [`Parameter`](crate::model::Parameter).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) required: std::option::Option<bool>,
}
impl Builder {
/// <p>Information about the parameter.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// <p>Information about the parameter.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// <p>A parameter value must be specified in the extension association.</p>
pub fn required(mut self, input: bool) -> Self {
self.required = Some(input);
self
}
/// <p>A parameter value must be specified in the extension association.</p>
pub fn set_required(mut self, input: std::option::Option<bool>) -> Self {
self.required = input;
self
}
/// Consumes the builder and constructs a [`Parameter`](crate::model::Parameter).
pub fn build(self) -> crate::model::Parameter {
crate::model::Parameter {
description: self.description,
required: self.required.unwrap_or_default(),
}
}
}
}
impl Parameter {
/// Creates a new builder-style object to manufacture [`Parameter`](crate::model::Parameter).
pub fn builder() -> crate::model::parameter::Builder {
crate::model::parameter::Builder::default()
}
}
/// <p>An action defines the tasks the extension performs during the AppConfig workflow. Each action includes an action point such as <code>ON_CREATE_HOSTED_CONFIGURATION</code>, <code>PRE_DEPLOYMENT</code>, or <code>ON_DEPLOYMENT</code>. Each action also includes a name, a URI to an Lambda function, and an Amazon Resource Name (ARN) for an Identity and Access Management assume role. You specify the name, URI, and ARN for each <i>action point</i> defined in the extension. You can specify the following actions for an extension:</p>
/// <ul>
/// <li> <p> <code>PRE_CREATE_HOSTED_CONFIGURATION_VERSION</code> </p> </li>
/// <li> <p> <code>PRE_START_DEPLOYMENT</code> </p> </li>
/// <li> <p> <code>ON_DEPLOYMENT_START</code> </p> </li>
/// <li> <p> <code>ON_DEPLOYMENT_STEP</code> </p> </li>
/// <li> <p> <code>ON_DEPLOYMENT_BAKING</code> </p> </li>
/// <li> <p> <code>ON_DEPLOYMENT_COMPLETE</code> </p> </li>
/// <li> <p> <code>ON_DEPLOYMENT_ROLLED_BACK</code> </p> </li>
/// </ul>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Action {
/// <p>The action name.</p>
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// <p>Information about the action.</p>
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
/// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
#[doc(hidden)]
pub uri: std::option::Option<std::string::String>,
/// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
}
impl Action {
/// <p>The action name.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>Information about the action.</p>
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
pub fn uri(&self) -> std::option::Option<&str> {
self.uri.as_deref()
}
/// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
}
/// See [`Action`](crate::model::Action).
pub mod action {
/// A builder for [`Action`](crate::model::Action).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) uri: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The action name.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The action name.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>Information about the action.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// <p>Information about the action.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
pub fn uri(mut self, input: impl Into<std::string::String>) -> Self {
self.uri = Some(input.into());
self
}
/// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
pub fn set_uri(mut self, input: std::option::Option<std::string::String>) -> Self {
self.uri = input;
self
}
/// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
/// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
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 [`Action`](crate::model::Action).
pub fn build(self) -> crate::model::Action {
crate::model::Action {
name: self.name,
description: self.description,
uri: self.uri,
role_arn: self.role_arn,
}
}
}
}
impl Action {
/// Creates a new builder-style object to manufacture [`Action`](crate::model::Action).
pub fn builder() -> crate::model::action::Builder {
crate::model::action::Builder::default()
}
}
/// When writing a match expression against `ActionPoint`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let actionpoint = unimplemented!();
/// match actionpoint {
/// ActionPoint::OnDeploymentBaking => { /* ... */ },
/// ActionPoint::OnDeploymentComplete => { /* ... */ },
/// ActionPoint::OnDeploymentRolledBack => { /* ... */ },
/// ActionPoint::OnDeploymentStart => { /* ... */ },
/// ActionPoint::OnDeploymentStep => { /* ... */ },
/// ActionPoint::PreCreateHostedConfigurationVersion => { /* ... */ },
/// ActionPoint::PreStartDeployment => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `actionpoint` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ActionPoint::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ActionPoint::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ActionPoint::NewFeature` is defined.
/// Specifically, when `actionpoint` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ActionPoint::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[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 ActionPoint {
#[allow(missing_docs)] // documentation missing in model
OnDeploymentBaking,
#[allow(missing_docs)] // documentation missing in model
OnDeploymentComplete,
#[allow(missing_docs)] // documentation missing in model
OnDeploymentRolledBack,
#[allow(missing_docs)] // documentation missing in model
OnDeploymentStart,
#[allow(missing_docs)] // documentation missing in model
OnDeploymentStep,
#[allow(missing_docs)] // documentation missing in model
PreCreateHostedConfigurationVersion,
#[allow(missing_docs)] // documentation missing in model
PreStartDeployment,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ActionPoint {
fn from(s: &str) -> Self {
match s {
"ON_DEPLOYMENT_BAKING" => ActionPoint::OnDeploymentBaking,
"ON_DEPLOYMENT_COMPLETE" => ActionPoint::OnDeploymentComplete,
"ON_DEPLOYMENT_ROLLED_BACK" => ActionPoint::OnDeploymentRolledBack,
"ON_DEPLOYMENT_START" => ActionPoint::OnDeploymentStart,
"ON_DEPLOYMENT_STEP" => ActionPoint::OnDeploymentStep,
"PRE_CREATE_HOSTED_CONFIGURATION_VERSION" => {
ActionPoint::PreCreateHostedConfigurationVersion
}
"PRE_START_DEPLOYMENT" => ActionPoint::PreStartDeployment,
other => ActionPoint::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ActionPoint {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ActionPoint::from(s))
}
}
impl ActionPoint {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ActionPoint::OnDeploymentBaking => "ON_DEPLOYMENT_BAKING",
ActionPoint::OnDeploymentComplete => "ON_DEPLOYMENT_COMPLETE",
ActionPoint::OnDeploymentRolledBack => "ON_DEPLOYMENT_ROLLED_BACK",
ActionPoint::OnDeploymentStart => "ON_DEPLOYMENT_START",
ActionPoint::OnDeploymentStep => "ON_DEPLOYMENT_STEP",
ActionPoint::PreCreateHostedConfigurationVersion => {
"PRE_CREATE_HOSTED_CONFIGURATION_VERSION"
}
ActionPoint::PreStartDeployment => "PRE_START_DEPLOYMENT",
ActionPoint::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&[
"ON_DEPLOYMENT_BAKING",
"ON_DEPLOYMENT_COMPLETE",
"ON_DEPLOYMENT_ROLLED_BACK",
"ON_DEPLOYMENT_START",
"ON_DEPLOYMENT_STEP",
"PRE_CREATE_HOSTED_CONFIGURATION_VERSION",
"PRE_START_DEPLOYMENT",
]
}
}
impl AsRef<str> for ActionPoint {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Amazon CloudWatch alarms to monitor during the deployment process.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Monitor {
/// <p>Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.</p>
#[doc(hidden)]
pub alarm_arn: std::option::Option<std::string::String>,
/// <p>ARN of an Identity and Access Management (IAM) role for AppConfig to monitor <code>AlarmArn</code>.</p>
#[doc(hidden)]
pub alarm_role_arn: std::option::Option<std::string::String>,
}
impl Monitor {
/// <p>Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.</p>
pub fn alarm_arn(&self) -> std::option::Option<&str> {
self.alarm_arn.as_deref()
}
/// <p>ARN of an Identity and Access Management (IAM) role for AppConfig to monitor <code>AlarmArn</code>.</p>
pub fn alarm_role_arn(&self) -> std::option::Option<&str> {
self.alarm_role_arn.as_deref()
}
}
/// See [`Monitor`](crate::model::Monitor).
pub mod monitor {
/// A builder for [`Monitor`](crate::model::Monitor).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) alarm_arn: std::option::Option<std::string::String>,
pub(crate) alarm_role_arn: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.</p>
pub fn alarm_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.alarm_arn = Some(input.into());
self
}
/// <p>Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.</p>
pub fn set_alarm_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.alarm_arn = input;
self
}
/// <p>ARN of an Identity and Access Management (IAM) role for AppConfig to monitor <code>AlarmArn</code>.</p>
pub fn alarm_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.alarm_role_arn = Some(input.into());
self
}
/// <p>ARN of an Identity and Access Management (IAM) role for AppConfig to monitor <code>AlarmArn</code>.</p>
pub fn set_alarm_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.alarm_role_arn = input;
self
}
/// Consumes the builder and constructs a [`Monitor`](crate::model::Monitor).
pub fn build(self) -> crate::model::Monitor {
crate::model::Monitor {
alarm_arn: self.alarm_arn,
alarm_role_arn: self.alarm_role_arn,
}
}
}
}
impl Monitor {
/// Creates a new builder-style object to manufacture [`Monitor`](crate::model::Monitor).
pub fn builder() -> crate::model::monitor::Builder {
crate::model::monitor::Builder::default()
}
}
/// When writing a match expression against `EnvironmentState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let environmentstate = unimplemented!();
/// match environmentstate {
/// EnvironmentState::Deploying => { /* ... */ },
/// EnvironmentState::ReadyForDeployment => { /* ... */ },
/// EnvironmentState::RolledBack => { /* ... */ },
/// EnvironmentState::RollingBack => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `environmentstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `EnvironmentState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `EnvironmentState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `EnvironmentState::NewFeature` is defined.
/// Specifically, when `environmentstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `EnvironmentState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[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 EnvironmentState {
#[allow(missing_docs)] // documentation missing in model
Deploying,
#[allow(missing_docs)] // documentation missing in model
ReadyForDeployment,
#[allow(missing_docs)] // documentation missing in model
RolledBack,
#[allow(missing_docs)] // documentation missing in model
RollingBack,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for EnvironmentState {
fn from(s: &str) -> Self {
match s {
"DEPLOYING" => EnvironmentState::Deploying,
"READY_FOR_DEPLOYMENT" => EnvironmentState::ReadyForDeployment,
"ROLLED_BACK" => EnvironmentState::RolledBack,
"ROLLING_BACK" => EnvironmentState::RollingBack,
other => EnvironmentState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for EnvironmentState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(EnvironmentState::from(s))
}
}
impl EnvironmentState {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
EnvironmentState::Deploying => "DEPLOYING",
EnvironmentState::ReadyForDeployment => "READY_FOR_DEPLOYMENT",
EnvironmentState::RolledBack => "ROLLED_BACK",
EnvironmentState::RollingBack => "ROLLING_BACK",
EnvironmentState::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&[
"DEPLOYING",
"READY_FOR_DEPLOYMENT",
"ROLLED_BACK",
"ROLLING_BACK",
]
}
}
impl AsRef<str> for EnvironmentState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When writing a match expression against `ReplicateTo`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let replicateto = unimplemented!();
/// match replicateto {
/// ReplicateTo::None => { /* ... */ },
/// ReplicateTo::SsmDocument => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `replicateto` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ReplicateTo::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ReplicateTo::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ReplicateTo::NewFeature` is defined.
/// Specifically, when `replicateto` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ReplicateTo::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[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 ReplicateTo {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
SsmDocument,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ReplicateTo {
fn from(s: &str) -> Self {
match s {
"NONE" => ReplicateTo::None,
"SSM_DOCUMENT" => ReplicateTo::SsmDocument,
other => ReplicateTo::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ReplicateTo {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ReplicateTo::from(s))
}
}
impl ReplicateTo {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ReplicateTo::None => "NONE",
ReplicateTo::SsmDocument => "SSM_DOCUMENT",
ReplicateTo::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&["NONE", "SSM_DOCUMENT"]
}
}
impl AsRef<str> for ReplicateTo {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When writing a match expression against `GrowthType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let growthtype = unimplemented!();
/// match growthtype {
/// GrowthType::Exponential => { /* ... */ },
/// GrowthType::Linear => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `growthtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `GrowthType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `GrowthType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `GrowthType::NewFeature` is defined.
/// Specifically, when `growthtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `GrowthType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[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 GrowthType {
#[allow(missing_docs)] // documentation missing in model
Exponential,
#[allow(missing_docs)] // documentation missing in model
Linear,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for GrowthType {
fn from(s: &str) -> Self {
match s {
"EXPONENTIAL" => GrowthType::Exponential,
"LINEAR" => GrowthType::Linear,
other => GrowthType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for GrowthType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(GrowthType::from(s))
}
}
impl GrowthType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
GrowthType::Exponential => "EXPONENTIAL",
GrowthType::Linear => "LINEAR",
GrowthType::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&["EXPONENTIAL", "LINEAR"]
}
}
impl AsRef<str> for GrowthType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>A validator provides a syntactic or semantic check to ensure the configuration that you want to deploy functions as intended. To validate your application configuration data, you provide a schema or an Amazon Web Services Lambda function that runs against the configuration. The configuration deployment or update can only proceed when the configuration data is valid.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Validator {
/// <p>AppConfig supports validators of type <code>JSON_SCHEMA</code> and <code>LAMBDA</code> </p>
#[doc(hidden)]
pub r#type: std::option::Option<crate::model::ValidatorType>,
/// <p>Either the JSON Schema content or the Amazon Resource Name (ARN) of an Lambda function.</p>
#[doc(hidden)]
pub content: std::option::Option<std::string::String>,
}
impl Validator {
/// <p>AppConfig supports validators of type <code>JSON_SCHEMA</code> and <code>LAMBDA</code> </p>
pub fn r#type(&self) -> std::option::Option<&crate::model::ValidatorType> {
self.r#type.as_ref()
}
/// <p>Either the JSON Schema content or the Amazon Resource Name (ARN) of an Lambda function.</p>
pub fn content(&self) -> std::option::Option<&str> {
self.content.as_deref()
}
}
impl std::fmt::Debug for Validator {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Validator");
formatter.field("r#type", &self.r#type);
formatter.field("content", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
/// See [`Validator`](crate::model::Validator).
pub mod validator {
/// A builder for [`Validator`](crate::model::Validator).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) r#type: std::option::Option<crate::model::ValidatorType>,
pub(crate) content: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>AppConfig supports validators of type <code>JSON_SCHEMA</code> and <code>LAMBDA</code> </p>
pub fn r#type(mut self, input: crate::model::ValidatorType) -> Self {
self.r#type = Some(input);
self
}
/// <p>AppConfig supports validators of type <code>JSON_SCHEMA</code> and <code>LAMBDA</code> </p>
pub fn set_type(mut self, input: std::option::Option<crate::model::ValidatorType>) -> Self {
self.r#type = input;
self
}
/// <p>Either the JSON Schema content or the Amazon Resource Name (ARN) of an Lambda function.</p>
pub fn content(mut self, input: impl Into<std::string::String>) -> Self {
self.content = Some(input.into());
self
}
/// <p>Either the JSON Schema content or the Amazon Resource Name (ARN) of an Lambda function.</p>
pub fn set_content(mut self, input: std::option::Option<std::string::String>) -> Self {
self.content = input;
self
}
/// Consumes the builder and constructs a [`Validator`](crate::model::Validator).
pub fn build(self) -> crate::model::Validator {
crate::model::Validator {
r#type: self.r#type,
content: self.content,
}
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("r#type", &self.r#type);
formatter.field("content", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl Validator {
/// Creates a new builder-style object to manufacture [`Validator`](crate::model::Validator).
pub fn builder() -> crate::model::validator::Builder {
crate::model::validator::Builder::default()
}
}
/// When writing a match expression against `ValidatorType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let validatortype = unimplemented!();
/// match validatortype {
/// ValidatorType::JsonSchema => { /* ... */ },
/// ValidatorType::Lambda => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `validatortype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ValidatorType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ValidatorType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ValidatorType::NewFeature` is defined.
/// Specifically, when `validatortype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ValidatorType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[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 ValidatorType {
#[allow(missing_docs)] // documentation missing in model
JsonSchema,
#[allow(missing_docs)] // documentation missing in model
Lambda,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ValidatorType {
fn from(s: &str) -> Self {
match s {
"JSON_SCHEMA" => ValidatorType::JsonSchema,
"LAMBDA" => ValidatorType::Lambda,
other => ValidatorType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ValidatorType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ValidatorType::from(s))
}
}
impl ValidatorType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ValidatorType::JsonSchema => "JSON_SCHEMA",
ValidatorType::Lambda => "LAMBDA",
ValidatorType::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&["JSON_SCHEMA", "LAMBDA"]
}
}
impl AsRef<str> for ValidatorType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>An extension that was invoked during a deployment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AppliedExtension {
/// <p>The system-generated ID of the extension.</p>
#[doc(hidden)]
pub extension_id: std::option::Option<std::string::String>,
/// <p>The system-generated ID for the association.</p>
#[doc(hidden)]
pub extension_association_id: std::option::Option<std::string::String>,
/// <p>The extension version number.</p>
#[doc(hidden)]
pub version_number: i32,
/// <p>One or more parameters for the actions called by the extension.</p>
#[doc(hidden)]
pub parameters:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl AppliedExtension {
/// <p>The system-generated ID of the extension.</p>
pub fn extension_id(&self) -> std::option::Option<&str> {
self.extension_id.as_deref()
}
/// <p>The system-generated ID for the association.</p>
pub fn extension_association_id(&self) -> std::option::Option<&str> {
self.extension_association_id.as_deref()
}
/// <p>The extension version number.</p>
pub fn version_number(&self) -> i32 {
self.version_number
}
/// <p>One or more parameters for the actions called by the extension.</p>
pub fn parameters(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.parameters.as_ref()
}
}
/// See [`AppliedExtension`](crate::model::AppliedExtension).
pub mod applied_extension {
/// A builder for [`AppliedExtension`](crate::model::AppliedExtension).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) extension_id: std::option::Option<std::string::String>,
pub(crate) extension_association_id: std::option::Option<std::string::String>,
pub(crate) version_number: std::option::Option<i32>,
pub(crate) parameters: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
/// <p>The system-generated ID of the extension.</p>
pub fn extension_id(mut self, input: impl Into<std::string::String>) -> Self {
self.extension_id = Some(input.into());
self
}
/// <p>The system-generated ID of the extension.</p>
pub fn set_extension_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.extension_id = input;
self
}
/// <p>The system-generated ID for the association.</p>
pub fn extension_association_id(mut self, input: impl Into<std::string::String>) -> Self {
self.extension_association_id = Some(input.into());
self
}
/// <p>The system-generated ID for the association.</p>
pub fn set_extension_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.extension_association_id = input;
self
}
/// <p>The extension version number.</p>
pub fn version_number(mut self, input: i32) -> Self {
self.version_number = Some(input);
self
}
/// <p>The extension version number.</p>
pub fn set_version_number(mut self, input: std::option::Option<i32>) -> Self {
self.version_number = input;
self
}
/// Adds a key-value pair to `parameters`.
///
/// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
///
/// <p>One or more parameters for the actions called by the extension.</p>
pub fn parameters(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.parameters.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.parameters = Some(hash_map);
self
}
/// <p>One or more parameters for the actions called by the extension.</p>
pub fn set_parameters(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.parameters = input;
self
}
/// Consumes the builder and constructs a [`AppliedExtension`](crate::model::AppliedExtension).
pub fn build(self) -> crate::model::AppliedExtension {
crate::model::AppliedExtension {
extension_id: self.extension_id,
extension_association_id: self.extension_association_id,
version_number: self.version_number.unwrap_or_default(),
parameters: self.parameters,
}
}
}
}
impl AppliedExtension {
/// Creates a new builder-style object to manufacture [`AppliedExtension`](crate::model::AppliedExtension).
pub fn builder() -> crate::model::applied_extension::Builder {
crate::model::applied_extension::Builder::default()
}
}
/// <p>An object that describes a deployment event.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeploymentEvent {
/// <p>The type of deployment event. Deployment event types include the start, stop, or completion of a deployment; a percentage update; the start or stop of a bake period; and the start or completion of a rollback.</p>
#[doc(hidden)]
pub event_type: std::option::Option<crate::model::DeploymentEventType>,
/// <p>The entity that triggered the deployment event. Events can be triggered by a user, AppConfig, an Amazon CloudWatch alarm, or an internal error.</p>
#[doc(hidden)]
pub triggered_by: std::option::Option<crate::model::TriggeredBy>,
/// <p>A description of the deployment event. Descriptions include, but are not limited to, the user account or the Amazon CloudWatch alarm ARN that initiated a rollback, the percentage of hosts that received the deployment, or in the case of an internal error, a recommendation to attempt a new deployment.</p>
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
/// <p>The list of extensions that were invoked as part of the deployment.</p>
#[doc(hidden)]
pub action_invocations: std::option::Option<std::vec::Vec<crate::model::ActionInvocation>>,
/// <p>The date and time the event occurred.</p>
#[doc(hidden)]
pub occurred_at: std::option::Option<aws_smithy_types::DateTime>,
}
impl DeploymentEvent {
/// <p>The type of deployment event. Deployment event types include the start, stop, or completion of a deployment; a percentage update; the start or stop of a bake period; and the start or completion of a rollback.</p>
pub fn event_type(&self) -> std::option::Option<&crate::model::DeploymentEventType> {
self.event_type.as_ref()
}
/// <p>The entity that triggered the deployment event. Events can be triggered by a user, AppConfig, an Amazon CloudWatch alarm, or an internal error.</p>
pub fn triggered_by(&self) -> std::option::Option<&crate::model::TriggeredBy> {
self.triggered_by.as_ref()
}
/// <p>A description of the deployment event. Descriptions include, but are not limited to, the user account or the Amazon CloudWatch alarm ARN that initiated a rollback, the percentage of hosts that received the deployment, or in the case of an internal error, a recommendation to attempt a new deployment.</p>
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The list of extensions that were invoked as part of the deployment.</p>
pub fn action_invocations(&self) -> std::option::Option<&[crate::model::ActionInvocation]> {
self.action_invocations.as_deref()
}
/// <p>The date and time the event occurred.</p>
pub fn occurred_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.occurred_at.as_ref()
}
}
/// See [`DeploymentEvent`](crate::model::DeploymentEvent).
pub mod deployment_event {
/// A builder for [`DeploymentEvent`](crate::model::DeploymentEvent).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) event_type: std::option::Option<crate::model::DeploymentEventType>,
pub(crate) triggered_by: std::option::Option<crate::model::TriggeredBy>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) action_invocations:
std::option::Option<std::vec::Vec<crate::model::ActionInvocation>>,
pub(crate) occurred_at: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
/// <p>The type of deployment event. Deployment event types include the start, stop, or completion of a deployment; a percentage update; the start or stop of a bake period; and the start or completion of a rollback.</p>
pub fn event_type(mut self, input: crate::model::DeploymentEventType) -> Self {
self.event_type = Some(input);
self
}
/// <p>The type of deployment event. Deployment event types include the start, stop, or completion of a deployment; a percentage update; the start or stop of a bake period; and the start or completion of a rollback.</p>
pub fn set_event_type(
mut self,
input: std::option::Option<crate::model::DeploymentEventType>,
) -> Self {
self.event_type = input;
self
}
/// <p>The entity that triggered the deployment event. Events can be triggered by a user, AppConfig, an Amazon CloudWatch alarm, or an internal error.</p>
pub fn triggered_by(mut self, input: crate::model::TriggeredBy) -> Self {
self.triggered_by = Some(input);
self
}
/// <p>The entity that triggered the deployment event. Events can be triggered by a user, AppConfig, an Amazon CloudWatch alarm, or an internal error.</p>
pub fn set_triggered_by(
mut self,
input: std::option::Option<crate::model::TriggeredBy>,
) -> Self {
self.triggered_by = input;
self
}
/// <p>A description of the deployment event. Descriptions include, but are not limited to, the user account or the Amazon CloudWatch alarm ARN that initiated a rollback, the percentage of hosts that received the deployment, or in the case of an internal error, a recommendation to attempt a new deployment.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// <p>A description of the deployment event. Descriptions include, but are not limited to, the user account or the Amazon CloudWatch alarm ARN that initiated a rollback, the percentage of hosts that received the deployment, or in the case of an internal error, a recommendation to attempt a new deployment.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// Appends an item to `action_invocations`.
///
/// To override the contents of this collection use [`set_action_invocations`](Self::set_action_invocations).
///
/// <p>The list of extensions that were invoked as part of the deployment.</p>
pub fn action_invocations(mut self, input: crate::model::ActionInvocation) -> Self {
let mut v = self.action_invocations.unwrap_or_default();
v.push(input);
self.action_invocations = Some(v);
self
}
/// <p>The list of extensions that were invoked as part of the deployment.</p>
pub fn set_action_invocations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ActionInvocation>>,
) -> Self {
self.action_invocations = input;
self
}
/// <p>The date and time the event occurred.</p>
pub fn occurred_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.occurred_at = Some(input);
self
}
/// <p>The date and time the event occurred.</p>
pub fn set_occurred_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.occurred_at = input;
self
}
/// Consumes the builder and constructs a [`DeploymentEvent`](crate::model::DeploymentEvent).
pub fn build(self) -> crate::model::DeploymentEvent {
crate::model::DeploymentEvent {
event_type: self.event_type,
triggered_by: self.triggered_by,
description: self.description,
action_invocations: self.action_invocations,
occurred_at: self.occurred_at,
}
}
}
}
impl DeploymentEvent {
/// Creates a new builder-style object to manufacture [`DeploymentEvent`](crate::model::DeploymentEvent).
pub fn builder() -> crate::model::deployment_event::Builder {
crate::model::deployment_event::Builder::default()
}
}
/// <p>An extension that was invoked as part of a deployment event.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ActionInvocation {
/// <p>The name, the ID, or the Amazon Resource Name (ARN) of the extension.</p>
#[doc(hidden)]
pub extension_identifier: std::option::Option<std::string::String>,
/// <p>The name of the action.</p>
#[doc(hidden)]
pub action_name: std::option::Option<std::string::String>,
/// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
#[doc(hidden)]
pub uri: std::option::Option<std::string::String>,
/// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
/// <p>The error message when an extension invocation fails.</p>
#[doc(hidden)]
pub error_message: std::option::Option<std::string::String>,
/// <p>The error code when an extension invocation fails.</p>
#[doc(hidden)]
pub error_code: std::option::Option<std::string::String>,
/// <p>A system-generated ID for this invocation.</p>
#[doc(hidden)]
pub invocation_id: std::option::Option<std::string::String>,
}
impl ActionInvocation {
/// <p>The name, the ID, or the Amazon Resource Name (ARN) of the extension.</p>
pub fn extension_identifier(&self) -> std::option::Option<&str> {
self.extension_identifier.as_deref()
}
/// <p>The name of the action.</p>
pub fn action_name(&self) -> std::option::Option<&str> {
self.action_name.as_deref()
}
/// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
pub fn uri(&self) -> std::option::Option<&str> {
self.uri.as_deref()
}
/// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>The error message when an extension invocation fails.</p>
pub fn error_message(&self) -> std::option::Option<&str> {
self.error_message.as_deref()
}
/// <p>The error code when an extension invocation fails.</p>
pub fn error_code(&self) -> std::option::Option<&str> {
self.error_code.as_deref()
}
/// <p>A system-generated ID for this invocation.</p>
pub fn invocation_id(&self) -> std::option::Option<&str> {
self.invocation_id.as_deref()
}
}
/// See [`ActionInvocation`](crate::model::ActionInvocation).
pub mod action_invocation {
/// A builder for [`ActionInvocation`](crate::model::ActionInvocation).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) extension_identifier: std::option::Option<std::string::String>,
pub(crate) action_name: std::option::Option<std::string::String>,
pub(crate) uri: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
pub(crate) error_message: std::option::Option<std::string::String>,
pub(crate) error_code: std::option::Option<std::string::String>,
pub(crate) invocation_id: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The name, the ID, or the Amazon Resource Name (ARN) of the extension.</p>
pub fn extension_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.extension_identifier = Some(input.into());
self
}
/// <p>The name, the ID, or the Amazon Resource Name (ARN) of the extension.</p>
pub fn set_extension_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.extension_identifier = input;
self
}
/// <p>The name of the action.</p>
pub fn action_name(mut self, input: impl Into<std::string::String>) -> Self {
self.action_name = Some(input.into());
self
}
/// <p>The name of the action.</p>
pub fn set_action_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.action_name = input;
self
}
/// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
pub fn uri(mut self, input: impl Into<std::string::String>) -> Self {
self.uri = Some(input.into());
self
}
/// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
pub fn set_uri(mut self, input: std::option::Option<std::string::String>) -> Self {
self.uri = input;
self
}
/// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
/// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The error message when an extension invocation fails.</p>
pub fn error_message(mut self, input: impl Into<std::string::String>) -> Self {
self.error_message = Some(input.into());
self
}
/// <p>The error message when an extension invocation fails.</p>
pub fn set_error_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.error_message = input;
self
}
/// <p>The error code when an extension invocation fails.</p>
pub fn error_code(mut self, input: impl Into<std::string::String>) -> Self {
self.error_code = Some(input.into());
self
}
/// <p>The error code when an extension invocation fails.</p>
pub fn set_error_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.error_code = input;
self
}
/// <p>A system-generated ID for this invocation.</p>
pub fn invocation_id(mut self, input: impl Into<std::string::String>) -> Self {
self.invocation_id = Some(input.into());
self
}
/// <p>A system-generated ID for this invocation.</p>
pub fn set_invocation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.invocation_id = input;
self
}
/// Consumes the builder and constructs a [`ActionInvocation`](crate::model::ActionInvocation).
pub fn build(self) -> crate::model::ActionInvocation {
crate::model::ActionInvocation {
extension_identifier: self.extension_identifier,
action_name: self.action_name,
uri: self.uri,
role_arn: self.role_arn,
error_message: self.error_message,
error_code: self.error_code,
invocation_id: self.invocation_id,
}
}
}
}
impl ActionInvocation {
/// Creates a new builder-style object to manufacture [`ActionInvocation`](crate::model::ActionInvocation).
pub fn builder() -> crate::model::action_invocation::Builder {
crate::model::action_invocation::Builder::default()
}
}
/// When writing a match expression against `TriggeredBy`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let triggeredby = unimplemented!();
/// match triggeredby {
/// TriggeredBy::Appconfig => { /* ... */ },
/// TriggeredBy::CloudwatchAlarm => { /* ... */ },
/// TriggeredBy::InternalError => { /* ... */ },
/// TriggeredBy::User => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `triggeredby` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TriggeredBy::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TriggeredBy::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TriggeredBy::NewFeature` is defined.
/// Specifically, when `triggeredby` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TriggeredBy::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[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 TriggeredBy {
#[allow(missing_docs)] // documentation missing in model
Appconfig,
#[allow(missing_docs)] // documentation missing in model
CloudwatchAlarm,
#[allow(missing_docs)] // documentation missing in model
InternalError,
#[allow(missing_docs)] // documentation missing in model
User,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TriggeredBy {
fn from(s: &str) -> Self {
match s {
"APPCONFIG" => TriggeredBy::Appconfig,
"CLOUDWATCH_ALARM" => TriggeredBy::CloudwatchAlarm,
"INTERNAL_ERROR" => TriggeredBy::InternalError,
"USER" => TriggeredBy::User,
other => TriggeredBy::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for TriggeredBy {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TriggeredBy::from(s))
}
}
impl TriggeredBy {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
TriggeredBy::Appconfig => "APPCONFIG",
TriggeredBy::CloudwatchAlarm => "CLOUDWATCH_ALARM",
TriggeredBy::InternalError => "INTERNAL_ERROR",
TriggeredBy::User => "USER",
TriggeredBy::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&["APPCONFIG", "CLOUDWATCH_ALARM", "INTERNAL_ERROR", "USER"]
}
}
impl AsRef<str> for TriggeredBy {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When writing a match expression against `DeploymentEventType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let deploymenteventtype = unimplemented!();
/// match deploymenteventtype {
/// DeploymentEventType::BakeTimeStarted => { /* ... */ },
/// DeploymentEventType::DeploymentCompleted => { /* ... */ },
/// DeploymentEventType::DeploymentStarted => { /* ... */ },
/// DeploymentEventType::PercentageUpdated => { /* ... */ },
/// DeploymentEventType::RollbackCompleted => { /* ... */ },
/// DeploymentEventType::RollbackStarted => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `deploymenteventtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DeploymentEventType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DeploymentEventType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DeploymentEventType::NewFeature` is defined.
/// Specifically, when `deploymenteventtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DeploymentEventType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[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 DeploymentEventType {
#[allow(missing_docs)] // documentation missing in model
BakeTimeStarted,
#[allow(missing_docs)] // documentation missing in model
DeploymentCompleted,
#[allow(missing_docs)] // documentation missing in model
DeploymentStarted,
#[allow(missing_docs)] // documentation missing in model
PercentageUpdated,
#[allow(missing_docs)] // documentation missing in model
RollbackCompleted,
#[allow(missing_docs)] // documentation missing in model
RollbackStarted,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DeploymentEventType {
fn from(s: &str) -> Self {
match s {
"BAKE_TIME_STARTED" => DeploymentEventType::BakeTimeStarted,
"DEPLOYMENT_COMPLETED" => DeploymentEventType::DeploymentCompleted,
"DEPLOYMENT_STARTED" => DeploymentEventType::DeploymentStarted,
"PERCENTAGE_UPDATED" => DeploymentEventType::PercentageUpdated,
"ROLLBACK_COMPLETED" => DeploymentEventType::RollbackCompleted,
"ROLLBACK_STARTED" => DeploymentEventType::RollbackStarted,
other => {
DeploymentEventType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for DeploymentEventType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DeploymentEventType::from(s))
}
}
impl DeploymentEventType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DeploymentEventType::BakeTimeStarted => "BAKE_TIME_STARTED",
DeploymentEventType::DeploymentCompleted => "DEPLOYMENT_COMPLETED",
DeploymentEventType::DeploymentStarted => "DEPLOYMENT_STARTED",
DeploymentEventType::PercentageUpdated => "PERCENTAGE_UPDATED",
DeploymentEventType::RollbackCompleted => "ROLLBACK_COMPLETED",
DeploymentEventType::RollbackStarted => "ROLLBACK_STARTED",
DeploymentEventType::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&[
"BAKE_TIME_STARTED",
"DEPLOYMENT_COMPLETED",
"DEPLOYMENT_STARTED",
"PERCENTAGE_UPDATED",
"ROLLBACK_COMPLETED",
"ROLLBACK_STARTED",
]
}
}
impl AsRef<str> for DeploymentEventType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When writing a match expression against `DeploymentState`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let deploymentstate = unimplemented!();
/// match deploymentstate {
/// DeploymentState::Baking => { /* ... */ },
/// DeploymentState::Complete => { /* ... */ },
/// DeploymentState::Deploying => { /* ... */ },
/// DeploymentState::RolledBack => { /* ... */ },
/// DeploymentState::RollingBack => { /* ... */ },
/// DeploymentState::Validating => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `deploymentstate` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DeploymentState::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DeploymentState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DeploymentState::NewFeature` is defined.
/// Specifically, when `deploymentstate` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DeploymentState::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[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 DeploymentState {
#[allow(missing_docs)] // documentation missing in model
Baking,
#[allow(missing_docs)] // documentation missing in model
Complete,
#[allow(missing_docs)] // documentation missing in model
Deploying,
#[allow(missing_docs)] // documentation missing in model
RolledBack,
#[allow(missing_docs)] // documentation missing in model
RollingBack,
#[allow(missing_docs)] // documentation missing in model
Validating,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DeploymentState {
fn from(s: &str) -> Self {
match s {
"BAKING" => DeploymentState::Baking,
"COMPLETE" => DeploymentState::Complete,
"DEPLOYING" => DeploymentState::Deploying,
"ROLLED_BACK" => DeploymentState::RolledBack,
"ROLLING_BACK" => DeploymentState::RollingBack,
"VALIDATING" => DeploymentState::Validating,
other => DeploymentState::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for DeploymentState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DeploymentState::from(s))
}
}
impl DeploymentState {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DeploymentState::Baking => "BAKING",
DeploymentState::Complete => "COMPLETE",
DeploymentState::Deploying => "DEPLOYING",
DeploymentState::RolledBack => "ROLLED_BACK",
DeploymentState::RollingBack => "ROLLING_BACK",
DeploymentState::Validating => "VALIDATING",
DeploymentState::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&[
"BAKING",
"COMPLETE",
"DEPLOYING",
"ROLLED_BACK",
"ROLLING_BACK",
"VALIDATING",
]
}
}
impl AsRef<str> for DeploymentState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Information about the configuration.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct HostedConfigurationVersionSummary {
/// <p>The application ID.</p>
#[doc(hidden)]
pub application_id: std::option::Option<std::string::String>,
/// <p>The configuration profile ID.</p>
#[doc(hidden)]
pub configuration_profile_id: std::option::Option<std::string::String>,
/// <p>The configuration version.</p>
#[doc(hidden)]
pub version_number: i32,
/// <p>A description of the configuration.</p>
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
/// <p>A standard MIME type describing the format of the configuration content. For more information, see <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a>.</p>
#[doc(hidden)]
pub content_type: std::option::Option<std::string::String>,
}
impl HostedConfigurationVersionSummary {
/// <p>The application ID.</p>
pub fn application_id(&self) -> std::option::Option<&str> {
self.application_id.as_deref()
}
/// <p>The configuration profile ID.</p>
pub fn configuration_profile_id(&self) -> std::option::Option<&str> {
self.configuration_profile_id.as_deref()
}
/// <p>The configuration version.</p>
pub fn version_number(&self) -> i32 {
self.version_number
}
/// <p>A description of the configuration.</p>
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
/// <p>A standard MIME type describing the format of the configuration content. For more information, see <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a>.</p>
pub fn content_type(&self) -> std::option::Option<&str> {
self.content_type.as_deref()
}
}
/// See [`HostedConfigurationVersionSummary`](crate::model::HostedConfigurationVersionSummary).
pub mod hosted_configuration_version_summary {
/// A builder for [`HostedConfigurationVersionSummary`](crate::model::HostedConfigurationVersionSummary).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_id: std::option::Option<std::string::String>,
pub(crate) configuration_profile_id: std::option::Option<std::string::String>,
pub(crate) version_number: std::option::Option<i32>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) content_type: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The application ID.</p>
pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
self.application_id = Some(input.into());
self
}
/// <p>The application ID.</p>
pub fn set_application_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_id = input;
self
}
/// <p>The configuration profile ID.</p>
pub fn configuration_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_profile_id = Some(input.into());
self
}
/// <p>The configuration profile ID.</p>
pub fn set_configuration_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_profile_id = input;
self
}
/// <p>The configuration version.</p>
pub fn version_number(mut self, input: i32) -> Self {
self.version_number = Some(input);
self
}
/// <p>The configuration version.</p>
pub fn set_version_number(mut self, input: std::option::Option<i32>) -> Self {
self.version_number = input;
self
}
/// <p>A description of the configuration.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// <p>A description of the configuration.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// <p>A standard MIME type describing the format of the configuration content. For more information, see <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a>.</p>
pub fn content_type(mut self, input: impl Into<std::string::String>) -> Self {
self.content_type = Some(input.into());
self
}
/// <p>A standard MIME type describing the format of the configuration content. For more information, see <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a>.</p>
pub fn set_content_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.content_type = input;
self
}
/// Consumes the builder and constructs a [`HostedConfigurationVersionSummary`](crate::model::HostedConfigurationVersionSummary).
pub fn build(self) -> crate::model::HostedConfigurationVersionSummary {
crate::model::HostedConfigurationVersionSummary {
application_id: self.application_id,
configuration_profile_id: self.configuration_profile_id,
version_number: self.version_number.unwrap_or_default(),
description: self.description,
content_type: self.content_type,
}
}
}
}
impl HostedConfigurationVersionSummary {
/// Creates a new builder-style object to manufacture [`HostedConfigurationVersionSummary`](crate::model::HostedConfigurationVersionSummary).
pub fn builder() -> crate::model::hosted_configuration_version_summary::Builder {
crate::model::hosted_configuration_version_summary::Builder::default()
}
}
/// <p>Information about an extension. Call <code>GetExtension</code> to get more information about an extension.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExtensionSummary {
/// <p>The system-generated ID of the extension.</p>
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
/// <p>The extension name.</p>
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// <p>The extension version number.</p>
#[doc(hidden)]
pub version_number: i32,
/// <p>The system-generated Amazon Resource Name (ARN) for the extension.</p>
#[doc(hidden)]
pub arn: std::option::Option<std::string::String>,
/// <p>Information about the extension.</p>
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
}
impl ExtensionSummary {
/// <p>The system-generated ID of the extension.</p>
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
/// <p>The extension name.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The extension version number.</p>
pub fn version_number(&self) -> i32 {
self.version_number
}
/// <p>The system-generated Amazon Resource Name (ARN) for the extension.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>Information about the extension.</p>
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
}
/// See [`ExtensionSummary`](crate::model::ExtensionSummary).
pub mod extension_summary {
/// A builder for [`ExtensionSummary`](crate::model::ExtensionSummary).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) version_number: std::option::Option<i32>,
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The system-generated ID of the extension.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
/// <p>The system-generated ID of the extension.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
/// <p>The extension name.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The extension name.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The extension version number.</p>
pub fn version_number(mut self, input: i32) -> Self {
self.version_number = Some(input);
self
}
/// <p>The extension version number.</p>
pub fn set_version_number(mut self, input: std::option::Option<i32>) -> Self {
self.version_number = input;
self
}
/// <p>The system-generated Amazon Resource Name (ARN) for the extension.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The system-generated Amazon Resource Name (ARN) for the extension.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>Information about the extension.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// <p>Information about the extension.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// Consumes the builder and constructs a [`ExtensionSummary`](crate::model::ExtensionSummary).
pub fn build(self) -> crate::model::ExtensionSummary {
crate::model::ExtensionSummary {
id: self.id,
name: self.name,
version_number: self.version_number.unwrap_or_default(),
arn: self.arn,
description: self.description,
}
}
}
}
impl ExtensionSummary {
/// Creates a new builder-style object to manufacture [`ExtensionSummary`](crate::model::ExtensionSummary).
pub fn builder() -> crate::model::extension_summary::Builder {
crate::model::extension_summary::Builder::default()
}
}
/// <p>Information about an association between an extension and an AppConfig resource such as an application, environment, or configuration profile. Call <code>GetExtensionAssociation</code> to get more information about an association.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExtensionAssociationSummary {
/// <p>The extension association ID. This ID is used to call other <code>ExtensionAssociation</code> API actions such as <code>GetExtensionAssociation</code> or <code>DeleteExtensionAssociation</code>.</p>
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
/// <p>The system-generated Amazon Resource Name (ARN) for the extension.</p>
#[doc(hidden)]
pub extension_arn: std::option::Option<std::string::String>,
/// <p>The ARNs of applications, configuration profiles, or environments defined in the association.</p>
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
}
impl ExtensionAssociationSummary {
/// <p>The extension association ID. This ID is used to call other <code>ExtensionAssociation</code> API actions such as <code>GetExtensionAssociation</code> or <code>DeleteExtensionAssociation</code>.</p>
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
/// <p>The system-generated Amazon Resource Name (ARN) for the extension.</p>
pub fn extension_arn(&self) -> std::option::Option<&str> {
self.extension_arn.as_deref()
}
/// <p>The ARNs of applications, configuration profiles, or environments defined in the association.</p>
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
/// See [`ExtensionAssociationSummary`](crate::model::ExtensionAssociationSummary).
pub mod extension_association_summary {
/// A builder for [`ExtensionAssociationSummary`](crate::model::ExtensionAssociationSummary).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) extension_arn: std::option::Option<std::string::String>,
pub(crate) resource_arn: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The extension association ID. This ID is used to call other <code>ExtensionAssociation</code> API actions such as <code>GetExtensionAssociation</code> or <code>DeleteExtensionAssociation</code>.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
/// <p>The extension association ID. This ID is used to call other <code>ExtensionAssociation</code> API actions such as <code>GetExtensionAssociation</code> or <code>DeleteExtensionAssociation</code>.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
/// <p>The system-generated Amazon Resource Name (ARN) for the extension.</p>
pub fn extension_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.extension_arn = Some(input.into());
self
}
/// <p>The system-generated Amazon Resource Name (ARN) for the extension.</p>
pub fn set_extension_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.extension_arn = input;
self
}
/// <p>The ARNs of applications, configuration profiles, or environments defined in the association.</p>
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
/// <p>The ARNs of applications, configuration profiles, or environments defined in the association.</p>
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
/// Consumes the builder and constructs a [`ExtensionAssociationSummary`](crate::model::ExtensionAssociationSummary).
pub fn build(self) -> crate::model::ExtensionAssociationSummary {
crate::model::ExtensionAssociationSummary {
id: self.id,
extension_arn: self.extension_arn,
resource_arn: self.resource_arn,
}
}
}
}
impl ExtensionAssociationSummary {
/// Creates a new builder-style object to manufacture [`ExtensionAssociationSummary`](crate::model::ExtensionAssociationSummary).
pub fn builder() -> crate::model::extension_association_summary::Builder {
crate::model::extension_association_summary::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Environment {
/// <p>The application ID.</p>
#[doc(hidden)]
pub application_id: std::option::Option<std::string::String>,
/// <p>The environment ID.</p>
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
/// <p>The name of the environment.</p>
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// <p>The description of the environment.</p>
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
/// <p>The state of the environment. An environment can be in one of the following states: <code>READY_FOR_DEPLOYMENT</code>, <code>DEPLOYING</code>, <code>ROLLING_BACK</code>, or <code>ROLLED_BACK</code> </p>
#[doc(hidden)]
pub state: std::option::Option<crate::model::EnvironmentState>,
/// <p>Amazon CloudWatch alarms monitored during the deployment.</p>
#[doc(hidden)]
pub monitors: std::option::Option<std::vec::Vec<crate::model::Monitor>>,
}
impl Environment {
/// <p>The application ID.</p>
pub fn application_id(&self) -> std::option::Option<&str> {
self.application_id.as_deref()
}
/// <p>The environment ID.</p>
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
/// <p>The name of the environment.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The description of the environment.</p>
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The state of the environment. An environment can be in one of the following states: <code>READY_FOR_DEPLOYMENT</code>, <code>DEPLOYING</code>, <code>ROLLING_BACK</code>, or <code>ROLLED_BACK</code> </p>
pub fn state(&self) -> std::option::Option<&crate::model::EnvironmentState> {
self.state.as_ref()
}
/// <p>Amazon CloudWatch alarms monitored during the deployment.</p>
pub fn monitors(&self) -> std::option::Option<&[crate::model::Monitor]> {
self.monitors.as_deref()
}
}
/// See [`Environment`](crate::model::Environment).
pub mod environment {
/// A builder for [`Environment`](crate::model::Environment).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_id: std::option::Option<std::string::String>,
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) state: std::option::Option<crate::model::EnvironmentState>,
pub(crate) monitors: std::option::Option<std::vec::Vec<crate::model::Monitor>>,
}
impl Builder {
/// <p>The application ID.</p>
pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
self.application_id = Some(input.into());
self
}
/// <p>The application ID.</p>
pub fn set_application_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_id = input;
self
}
/// <p>The environment ID.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
/// <p>The environment ID.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
/// <p>The name of the environment.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the environment.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The description of the environment.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// <p>The description of the environment.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// <p>The state of the environment. An environment can be in one of the following states: <code>READY_FOR_DEPLOYMENT</code>, <code>DEPLOYING</code>, <code>ROLLING_BACK</code>, or <code>ROLLED_BACK</code> </p>
pub fn state(mut self, input: crate::model::EnvironmentState) -> Self {
self.state = Some(input);
self
}
/// <p>The state of the environment. An environment can be in one of the following states: <code>READY_FOR_DEPLOYMENT</code>, <code>DEPLOYING</code>, <code>ROLLING_BACK</code>, or <code>ROLLED_BACK</code> </p>
pub fn set_state(
mut self,
input: std::option::Option<crate::model::EnvironmentState>,
) -> Self {
self.state = input;
self
}
/// Appends an item to `monitors`.
///
/// To override the contents of this collection use [`set_monitors`](Self::set_monitors).
///
/// <p>Amazon CloudWatch alarms monitored during the deployment.</p>
pub fn monitors(mut self, input: crate::model::Monitor) -> Self {
let mut v = self.monitors.unwrap_or_default();
v.push(input);
self.monitors = Some(v);
self
}
/// <p>Amazon CloudWatch alarms monitored during the deployment.</p>
pub fn set_monitors(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Monitor>>,
) -> Self {
self.monitors = input;
self
}
/// Consumes the builder and constructs a [`Environment`](crate::model::Environment).
pub fn build(self) -> crate::model::Environment {
crate::model::Environment {
application_id: self.application_id,
id: self.id,
name: self.name,
description: self.description,
state: self.state,
monitors: self.monitors,
}
}
}
}
impl Environment {
/// Creates a new builder-style object to manufacture [`Environment`](crate::model::Environment).
pub fn builder() -> crate::model::environment::Builder {
crate::model::environment::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeploymentStrategy {
/// <p>The deployment strategy ID.</p>
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
/// <p>The name of the deployment strategy.</p>
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// <p>The description of the deployment strategy.</p>
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
/// <p>Total amount of time the deployment lasted.</p>
#[doc(hidden)]
pub deployment_duration_in_minutes: i32,
/// <p>The algorithm used to define how percentage grew over time.</p>
#[doc(hidden)]
pub growth_type: std::option::Option<crate::model::GrowthType>,
/// <p>The percentage of targets that received a deployed configuration during each interval.</p>
#[doc(hidden)]
pub growth_factor: f32,
/// <p>The amount of time that AppConfig monitored for alarms before considering the deployment to be complete and no longer eligible for automatic rollback.</p>
#[doc(hidden)]
pub final_bake_time_in_minutes: i32,
/// <p>Save the deployment strategy to a Systems Manager (SSM) document.</p>
#[doc(hidden)]
pub replicate_to: std::option::Option<crate::model::ReplicateTo>,
}
impl DeploymentStrategy {
/// <p>The deployment strategy ID.</p>
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
/// <p>The name of the deployment strategy.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The description of the deployment strategy.</p>
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
/// <p>Total amount of time the deployment lasted.</p>
pub fn deployment_duration_in_minutes(&self) -> i32 {
self.deployment_duration_in_minutes
}
/// <p>The algorithm used to define how percentage grew over time.</p>
pub fn growth_type(&self) -> std::option::Option<&crate::model::GrowthType> {
self.growth_type.as_ref()
}
/// <p>The percentage of targets that received a deployed configuration during each interval.</p>
pub fn growth_factor(&self) -> f32 {
self.growth_factor
}
/// <p>The amount of time that AppConfig monitored for alarms before considering the deployment to be complete and no longer eligible for automatic rollback.</p>
pub fn final_bake_time_in_minutes(&self) -> i32 {
self.final_bake_time_in_minutes
}
/// <p>Save the deployment strategy to a Systems Manager (SSM) document.</p>
pub fn replicate_to(&self) -> std::option::Option<&crate::model::ReplicateTo> {
self.replicate_to.as_ref()
}
}
/// See [`DeploymentStrategy`](crate::model::DeploymentStrategy).
pub mod deployment_strategy {
/// A builder for [`DeploymentStrategy`](crate::model::DeploymentStrategy).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) deployment_duration_in_minutes: std::option::Option<i32>,
pub(crate) growth_type: std::option::Option<crate::model::GrowthType>,
pub(crate) growth_factor: std::option::Option<f32>,
pub(crate) final_bake_time_in_minutes: std::option::Option<i32>,
pub(crate) replicate_to: std::option::Option<crate::model::ReplicateTo>,
}
impl Builder {
/// <p>The deployment strategy ID.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
/// <p>The deployment strategy ID.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
/// <p>The name of the deployment strategy.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the deployment strategy.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The description of the deployment strategy.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// <p>The description of the deployment strategy.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// <p>Total amount of time the deployment lasted.</p>
pub fn deployment_duration_in_minutes(mut self, input: i32) -> Self {
self.deployment_duration_in_minutes = Some(input);
self
}
/// <p>Total amount of time the deployment lasted.</p>
pub fn set_deployment_duration_in_minutes(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.deployment_duration_in_minutes = input;
self
}
/// <p>The algorithm used to define how percentage grew over time.</p>
pub fn growth_type(mut self, input: crate::model::GrowthType) -> Self {
self.growth_type = Some(input);
self
}
/// <p>The algorithm used to define how percentage grew over time.</p>
pub fn set_growth_type(
mut self,
input: std::option::Option<crate::model::GrowthType>,
) -> Self {
self.growth_type = input;
self
}
/// <p>The percentage of targets that received a deployed configuration during each interval.</p>
pub fn growth_factor(mut self, input: f32) -> Self {
self.growth_factor = Some(input);
self
}
/// <p>The percentage of targets that received a deployed configuration during each interval.</p>
pub fn set_growth_factor(mut self, input: std::option::Option<f32>) -> Self {
self.growth_factor = input;
self
}
/// <p>The amount of time that AppConfig monitored for alarms before considering the deployment to be complete and no longer eligible for automatic rollback.</p>
pub fn final_bake_time_in_minutes(mut self, input: i32) -> Self {
self.final_bake_time_in_minutes = Some(input);
self
}
/// <p>The amount of time that AppConfig monitored for alarms before considering the deployment to be complete and no longer eligible for automatic rollback.</p>
pub fn set_final_bake_time_in_minutes(mut self, input: std::option::Option<i32>) -> Self {
self.final_bake_time_in_minutes = input;
self
}
/// <p>Save the deployment strategy to a Systems Manager (SSM) document.</p>
pub fn replicate_to(mut self, input: crate::model::ReplicateTo) -> Self {
self.replicate_to = Some(input);
self
}
/// <p>Save the deployment strategy to a Systems Manager (SSM) document.</p>
pub fn set_replicate_to(
mut self,
input: std::option::Option<crate::model::ReplicateTo>,
) -> Self {
self.replicate_to = input;
self
}
/// Consumes the builder and constructs a [`DeploymentStrategy`](crate::model::DeploymentStrategy).
pub fn build(self) -> crate::model::DeploymentStrategy {
crate::model::DeploymentStrategy {
id: self.id,
name: self.name,
description: self.description,
deployment_duration_in_minutes: self
.deployment_duration_in_minutes
.unwrap_or_default(),
growth_type: self.growth_type,
growth_factor: self.growth_factor.unwrap_or_default(),
final_bake_time_in_minutes: self.final_bake_time_in_minutes.unwrap_or_default(),
replicate_to: self.replicate_to,
}
}
}
}
impl DeploymentStrategy {
/// Creates a new builder-style object to manufacture [`DeploymentStrategy`](crate::model::DeploymentStrategy).
pub fn builder() -> crate::model::deployment_strategy::Builder {
crate::model::deployment_strategy::Builder::default()
}
}
/// <p>Information about the deployment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeploymentSummary {
/// <p>The sequence number of the deployment.</p>
#[doc(hidden)]
pub deployment_number: i32,
/// <p>The name of the configuration.</p>
#[doc(hidden)]
pub configuration_name: std::option::Option<std::string::String>,
/// <p>The version of the configuration.</p>
#[doc(hidden)]
pub configuration_version: std::option::Option<std::string::String>,
/// <p>Total amount of time the deployment lasted.</p>
#[doc(hidden)]
pub deployment_duration_in_minutes: i32,
/// <p>The algorithm used to define how percentage grows over time.</p>
#[doc(hidden)]
pub growth_type: std::option::Option<crate::model::GrowthType>,
/// <p>The percentage of targets to receive a deployed configuration during each interval.</p>
#[doc(hidden)]
pub growth_factor: f32,
/// <p>The amount of time that AppConfig monitors for alarms before considering the deployment to be complete and no longer eligible for automatic rollback.</p>
#[doc(hidden)]
pub final_bake_time_in_minutes: i32,
/// <p>The state of the deployment.</p>
#[doc(hidden)]
pub state: std::option::Option<crate::model::DeploymentState>,
/// <p>The percentage of targets for which the deployment is available.</p>
#[doc(hidden)]
pub percentage_complete: f32,
/// <p>Time the deployment started.</p>
#[doc(hidden)]
pub started_at: std::option::Option<aws_smithy_types::DateTime>,
/// <p>Time the deployment completed.</p>
#[doc(hidden)]
pub completed_at: std::option::Option<aws_smithy_types::DateTime>,
}
impl DeploymentSummary {
/// <p>The sequence number of the deployment.</p>
pub fn deployment_number(&self) -> i32 {
self.deployment_number
}
/// <p>The name of the configuration.</p>
pub fn configuration_name(&self) -> std::option::Option<&str> {
self.configuration_name.as_deref()
}
/// <p>The version of the configuration.</p>
pub fn configuration_version(&self) -> std::option::Option<&str> {
self.configuration_version.as_deref()
}
/// <p>Total amount of time the deployment lasted.</p>
pub fn deployment_duration_in_minutes(&self) -> i32 {
self.deployment_duration_in_minutes
}
/// <p>The algorithm used to define how percentage grows over time.</p>
pub fn growth_type(&self) -> std::option::Option<&crate::model::GrowthType> {
self.growth_type.as_ref()
}
/// <p>The percentage of targets to receive a deployed configuration during each interval.</p>
pub fn growth_factor(&self) -> f32 {
self.growth_factor
}
/// <p>The amount of time that AppConfig monitors for alarms before considering the deployment to be complete and no longer eligible for automatic rollback.</p>
pub fn final_bake_time_in_minutes(&self) -> i32 {
self.final_bake_time_in_minutes
}
/// <p>The state of the deployment.</p>
pub fn state(&self) -> std::option::Option<&crate::model::DeploymentState> {
self.state.as_ref()
}
/// <p>The percentage of targets for which the deployment is available.</p>
pub fn percentage_complete(&self) -> f32 {
self.percentage_complete
}
/// <p>Time the deployment started.</p>
pub fn started_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.started_at.as_ref()
}
/// <p>Time the deployment completed.</p>
pub fn completed_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.completed_at.as_ref()
}
}
/// See [`DeploymentSummary`](crate::model::DeploymentSummary).
pub mod deployment_summary {
/// A builder for [`DeploymentSummary`](crate::model::DeploymentSummary).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_number: std::option::Option<i32>,
pub(crate) configuration_name: std::option::Option<std::string::String>,
pub(crate) configuration_version: std::option::Option<std::string::String>,
pub(crate) deployment_duration_in_minutes: std::option::Option<i32>,
pub(crate) growth_type: std::option::Option<crate::model::GrowthType>,
pub(crate) growth_factor: std::option::Option<f32>,
pub(crate) final_bake_time_in_minutes: std::option::Option<i32>,
pub(crate) state: std::option::Option<crate::model::DeploymentState>,
pub(crate) percentage_complete: std::option::Option<f32>,
pub(crate) started_at: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) completed_at: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
/// <p>The sequence number of the deployment.</p>
pub fn deployment_number(mut self, input: i32) -> Self {
self.deployment_number = Some(input);
self
}
/// <p>The sequence number of the deployment.</p>
pub fn set_deployment_number(mut self, input: std::option::Option<i32>) -> Self {
self.deployment_number = input;
self
}
/// <p>The name of the configuration.</p>
pub fn configuration_name(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_name = Some(input.into());
self
}
/// <p>The name of the configuration.</p>
pub fn set_configuration_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_name = input;
self
}
/// <p>The version of the configuration.</p>
pub fn configuration_version(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_version = Some(input.into());
self
}
/// <p>The version of the configuration.</p>
pub fn set_configuration_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_version = input;
self
}
/// <p>Total amount of time the deployment lasted.</p>
pub fn deployment_duration_in_minutes(mut self, input: i32) -> Self {
self.deployment_duration_in_minutes = Some(input);
self
}
/// <p>Total amount of time the deployment lasted.</p>
pub fn set_deployment_duration_in_minutes(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.deployment_duration_in_minutes = input;
self
}
/// <p>The algorithm used to define how percentage grows over time.</p>
pub fn growth_type(mut self, input: crate::model::GrowthType) -> Self {
self.growth_type = Some(input);
self
}
/// <p>The algorithm used to define how percentage grows over time.</p>
pub fn set_growth_type(
mut self,
input: std::option::Option<crate::model::GrowthType>,
) -> Self {
self.growth_type = input;
self
}
/// <p>The percentage of targets to receive a deployed configuration during each interval.</p>
pub fn growth_factor(mut self, input: f32) -> Self {
self.growth_factor = Some(input);
self
}
/// <p>The percentage of targets to receive a deployed configuration during each interval.</p>
pub fn set_growth_factor(mut self, input: std::option::Option<f32>) -> Self {
self.growth_factor = input;
self
}
/// <p>The amount of time that AppConfig monitors for alarms before considering the deployment to be complete and no longer eligible for automatic rollback.</p>
pub fn final_bake_time_in_minutes(mut self, input: i32) -> Self {
self.final_bake_time_in_minutes = Some(input);
self
}
/// <p>The amount of time that AppConfig monitors for alarms before considering the deployment to be complete and no longer eligible for automatic rollback.</p>
pub fn set_final_bake_time_in_minutes(mut self, input: std::option::Option<i32>) -> Self {
self.final_bake_time_in_minutes = input;
self
}
/// <p>The state of the deployment.</p>
pub fn state(mut self, input: crate::model::DeploymentState) -> Self {
self.state = Some(input);
self
}
/// <p>The state of the deployment.</p>
pub fn set_state(
mut self,
input: std::option::Option<crate::model::DeploymentState>,
) -> Self {
self.state = input;
self
}
/// <p>The percentage of targets for which the deployment is available.</p>
pub fn percentage_complete(mut self, input: f32) -> Self {
self.percentage_complete = Some(input);
self
}
/// <p>The percentage of targets for which the deployment is available.</p>
pub fn set_percentage_complete(mut self, input: std::option::Option<f32>) -> Self {
self.percentage_complete = input;
self
}
/// <p>Time the deployment started.</p>
pub fn started_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.started_at = Some(input);
self
}
/// <p>Time the deployment started.</p>
pub fn set_started_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.started_at = input;
self
}
/// <p>Time the deployment completed.</p>
pub fn completed_at(mut self, input: aws_smithy_types::DateTime) -> Self {
self.completed_at = Some(input);
self
}
/// <p>Time the deployment completed.</p>
pub fn set_completed_at(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.completed_at = input;
self
}
/// Consumes the builder and constructs a [`DeploymentSummary`](crate::model::DeploymentSummary).
pub fn build(self) -> crate::model::DeploymentSummary {
crate::model::DeploymentSummary {
deployment_number: self.deployment_number.unwrap_or_default(),
configuration_name: self.configuration_name,
configuration_version: self.configuration_version,
deployment_duration_in_minutes: self
.deployment_duration_in_minutes
.unwrap_or_default(),
growth_type: self.growth_type,
growth_factor: self.growth_factor.unwrap_or_default(),
final_bake_time_in_minutes: self.final_bake_time_in_minutes.unwrap_or_default(),
state: self.state,
percentage_complete: self.percentage_complete.unwrap_or_default(),
started_at: self.started_at,
completed_at: self.completed_at,
}
}
}
}
impl DeploymentSummary {
/// Creates a new builder-style object to manufacture [`DeploymentSummary`](crate::model::DeploymentSummary).
pub fn builder() -> crate::model::deployment_summary::Builder {
crate::model::deployment_summary::Builder::default()
}
}
/// <p>A summary of a configuration profile.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConfigurationProfileSummary {
/// <p>The application ID.</p>
#[doc(hidden)]
pub application_id: std::option::Option<std::string::String>,
/// <p>The ID of the configuration profile.</p>
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
/// <p>The name of the configuration profile.</p>
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// <p>The URI location of the configuration.</p>
#[doc(hidden)]
pub location_uri: std::option::Option<std::string::String>,
/// <p>The types of validators in the configuration profile.</p>
#[doc(hidden)]
pub validator_types: std::option::Option<std::vec::Vec<crate::model::ValidatorType>>,
/// <p>The type of configurations contained in the profile. AppConfig supports <code>feature flags</code> and <code>freeform</code> configurations. We recommend you create feature flag configurations to enable or disable new features and freeform configurations to distribute configurations to an application. When calling this API, enter one of the following values for <code>Type</code>:</p>
/// <p> <code>AWS.AppConfig.FeatureFlags</code> </p>
/// <p> <code>AWS.Freeform</code> </p>
#[doc(hidden)]
pub r#type: std::option::Option<std::string::String>,
}
impl ConfigurationProfileSummary {
/// <p>The application ID.</p>
pub fn application_id(&self) -> std::option::Option<&str> {
self.application_id.as_deref()
}
/// <p>The ID of the configuration profile.</p>
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
/// <p>The name of the configuration profile.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The URI location of the configuration.</p>
pub fn location_uri(&self) -> std::option::Option<&str> {
self.location_uri.as_deref()
}
/// <p>The types of validators in the configuration profile.</p>
pub fn validator_types(&self) -> std::option::Option<&[crate::model::ValidatorType]> {
self.validator_types.as_deref()
}
/// <p>The type of configurations contained in the profile. AppConfig supports <code>feature flags</code> and <code>freeform</code> configurations. We recommend you create feature flag configurations to enable or disable new features and freeform configurations to distribute configurations to an application. When calling this API, enter one of the following values for <code>Type</code>:</p>
/// <p> <code>AWS.AppConfig.FeatureFlags</code> </p>
/// <p> <code>AWS.Freeform</code> </p>
pub fn r#type(&self) -> std::option::Option<&str> {
self.r#type.as_deref()
}
}
/// See [`ConfigurationProfileSummary`](crate::model::ConfigurationProfileSummary).
pub mod configuration_profile_summary {
/// A builder for [`ConfigurationProfileSummary`](crate::model::ConfigurationProfileSummary).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_id: std::option::Option<std::string::String>,
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) location_uri: std::option::Option<std::string::String>,
pub(crate) validator_types: std::option::Option<std::vec::Vec<crate::model::ValidatorType>>,
pub(crate) r#type: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The application ID.</p>
pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
self.application_id = Some(input.into());
self
}
/// <p>The application ID.</p>
pub fn set_application_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_id = input;
self
}
/// <p>The ID of the configuration profile.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
/// <p>The ID of the configuration profile.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
/// <p>The name of the configuration profile.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the configuration profile.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The URI location of the configuration.</p>
pub fn location_uri(mut self, input: impl Into<std::string::String>) -> Self {
self.location_uri = Some(input.into());
self
}
/// <p>The URI location of the configuration.</p>
pub fn set_location_uri(mut self, input: std::option::Option<std::string::String>) -> Self {
self.location_uri = input;
self
}
/// Appends an item to `validator_types`.
///
/// To override the contents of this collection use [`set_validator_types`](Self::set_validator_types).
///
/// <p>The types of validators in the configuration profile.</p>
pub fn validator_types(mut self, input: crate::model::ValidatorType) -> Self {
let mut v = self.validator_types.unwrap_or_default();
v.push(input);
self.validator_types = Some(v);
self
}
/// <p>The types of validators in the configuration profile.</p>
pub fn set_validator_types(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ValidatorType>>,
) -> Self {
self.validator_types = input;
self
}
/// <p>The type of configurations contained in the profile. AppConfig supports <code>feature flags</code> and <code>freeform</code> configurations. We recommend you create feature flag configurations to enable or disable new features and freeform configurations to distribute configurations to an application. When calling this API, enter one of the following values for <code>Type</code>:</p>
/// <p> <code>AWS.AppConfig.FeatureFlags</code> </p>
/// <p> <code>AWS.Freeform</code> </p>
pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
self.r#type = Some(input.into());
self
}
/// <p>The type of configurations contained in the profile. AppConfig supports <code>feature flags</code> and <code>freeform</code> configurations. We recommend you create feature flag configurations to enable or disable new features and freeform configurations to distribute configurations to an application. When calling this API, enter one of the following values for <code>Type</code>:</p>
/// <p> <code>AWS.AppConfig.FeatureFlags</code> </p>
/// <p> <code>AWS.Freeform</code> </p>
pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.r#type = input;
self
}
/// Consumes the builder and constructs a [`ConfigurationProfileSummary`](crate::model::ConfigurationProfileSummary).
pub fn build(self) -> crate::model::ConfigurationProfileSummary {
crate::model::ConfigurationProfileSummary {
application_id: self.application_id,
id: self.id,
name: self.name,
location_uri: self.location_uri,
validator_types: self.validator_types,
r#type: self.r#type,
}
}
}
}
impl ConfigurationProfileSummary {
/// Creates a new builder-style object to manufacture [`ConfigurationProfileSummary`](crate::model::ConfigurationProfileSummary).
pub fn builder() -> crate::model::configuration_profile_summary::Builder {
crate::model::configuration_profile_summary::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Application {
/// <p>The application ID.</p>
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
/// <p>The application name.</p>
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// <p>The description of the application.</p>
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
}
impl Application {
/// <p>The application ID.</p>
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
/// <p>The application name.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The description of the application.</p>
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
}
/// See [`Application`](crate::model::Application).
pub mod application {
/// A builder for [`Application`](crate::model::Application).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The application ID.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
/// <p>The application ID.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
/// <p>The application name.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The application name.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The description of the application.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// <p>The description of the application.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// Consumes the builder and constructs a [`Application`](crate::model::Application).
pub fn build(self) -> crate::model::Application {
crate::model::Application {
id: self.id,
name: self.name,
description: self.description,
}
}
}
}
impl Application {
/// Creates a new builder-style object to manufacture [`Application`](crate::model::Application).
pub fn builder() -> crate::model::application::Builder {
crate::model::application::Builder::default()
}
}
/// When writing a match expression against `BytesMeasure`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let bytesmeasure = unimplemented!();
/// match bytesmeasure {
/// BytesMeasure::Kilobytes => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `bytesmeasure` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `BytesMeasure::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `BytesMeasure::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `BytesMeasure::NewFeature` is defined.
/// Specifically, when `bytesmeasure` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `BytesMeasure::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[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 BytesMeasure {
#[allow(missing_docs)] // documentation missing in model
Kilobytes,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for BytesMeasure {
fn from(s: &str) -> Self {
match s {
"KILOBYTES" => BytesMeasure::Kilobytes,
other => BytesMeasure::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for BytesMeasure {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BytesMeasure::from(s))
}
}
impl BytesMeasure {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BytesMeasure::Kilobytes => "KILOBYTES",
BytesMeasure::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&["KILOBYTES"]
}
}
impl AsRef<str> for BytesMeasure {
fn as_ref(&self) -> &str {
self.as_str()
}
}