1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Information about an IP address range that is provisioned for use with your AWS resources through
/// bring your own IP address (BYOIP).</p>
/// <p>The following describes each BYOIP <code>State</code> that your IP address range can be in.</p>
/// <ul>
/// <li>
/// <p>
/// <b>PENDING_PROVISIONING</b> —
/// You’ve submitted a request to provision an IP address range but it is not yet provisioned with
/// AWS Global Accelerator.</p>
/// </li>
/// <li>
/// <p>
/// <b>READY</b> — The address range is provisioned
/// with AWS Global Accelerator and can be advertised.</p>
/// </li>
/// <li>
/// <p>
/// <b>PENDING_ADVERTISING</b> — You’ve submitted a
/// request for AWS Global Accelerator to advertise an address range but it is not yet being advertised.</p>
/// </li>
/// <li>
/// <p>
/// <b>ADVERTISING</b> — The address range is
/// being advertised by AWS Global Accelerator.</p>
/// </li>
/// <li>
/// <p>
/// <b>PENDING_WITHDRAWING</b> — You’ve submitted
/// a request to withdraw an address range from being advertised but it is still being advertised
/// by AWS Global Accelerator.</p>
/// </li>
/// <li>
/// <p>
/// <b>PENDING_DEPROVISIONING</b> — You’ve submitted a
/// request to deprovision an address range from AWS Global Accelerator but it is still provisioned.</p>
/// </li>
/// <li>
/// <p>
/// <b>DEPROVISIONED</b> — The address range is deprovisioned
/// from AWS Global Accelerator.</p>
/// </li>
/// <li>
/// <p>
/// <b>FAILED_PROVISION </b> — The request to
/// provision the address range from AWS Global Accelerator was not successful. Please make sure that
/// you provide all of the correct information, and try again. If the request fails
/// a second time, contact AWS support.</p>
/// </li>
/// <li>
/// <p>
/// <b>FAILED_ADVERTISING</b> — The request for AWS Global Accelerator
/// to advertise the address range was not successful. Please make sure that
/// you provide all of the correct information, and try again. If the request fails
/// a second time, contact AWS support.</p>
/// </li>
/// <li>
/// <p>
/// <b>FAILED_WITHDRAW</b> — The request to withdraw
/// the address range from advertising by AWS Global Accelerator was not successful. Please make sure that
/// you provide all of the correct information, and try again. If the request fails
/// a second time, contact AWS support.</p>
/// </li>
/// <li>
/// <p>
/// <b>FAILED_DEPROVISION </b> — The request to
/// deprovision the address range from AWS Global Accelerator was not successful. Please make sure that
/// you provide all of the correct information, and try again. If the request fails
/// a second time, contact AWS support.</p>
/// </li>
/// </ul>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ByoipCidr {
/// <p>The address range, in CIDR notation.</p>
pub cidr: std::option::Option<std::string::String>,
/// <p>The state of the address pool.</p>
pub state: std::option::Option<crate::model::ByoipCidrState>,
/// <p>A history of status changes for an IP address range that you bring to AWS Global Accelerator
/// through bring your own IP address (BYOIP).</p>
pub events: std::option::Option<std::vec::Vec<crate::model::ByoipCidrEvent>>,
}
impl ByoipCidr {
/// <p>The address range, in CIDR notation.</p>
pub fn cidr(&self) -> std::option::Option<&str> {
self.cidr.as_deref()
}
/// <p>The state of the address pool.</p>
pub fn state(&self) -> std::option::Option<&crate::model::ByoipCidrState> {
self.state.as_ref()
}
/// <p>A history of status changes for an IP address range that you bring to AWS Global Accelerator
/// through bring your own IP address (BYOIP).</p>
pub fn events(&self) -> std::option::Option<&[crate::model::ByoipCidrEvent]> {
self.events.as_deref()
}
}
impl std::fmt::Debug for ByoipCidr {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ByoipCidr");
formatter.field("cidr", &self.cidr);
formatter.field("state", &self.state);
formatter.field("events", &self.events);
formatter.finish()
}
}
/// See [`ByoipCidr`](crate::model::ByoipCidr)
pub mod byoip_cidr {
/// A builder for [`ByoipCidr`](crate::model::ByoipCidr)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) cidr: std::option::Option<std::string::String>,
pub(crate) state: std::option::Option<crate::model::ByoipCidrState>,
pub(crate) events: std::option::Option<std::vec::Vec<crate::model::ByoipCidrEvent>>,
}
impl Builder {
/// <p>The address range, in CIDR notation.</p>
pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
self.cidr = Some(input.into());
self
}
/// <p>The address range, in CIDR notation.</p>
pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
self.cidr = input;
self
}
/// <p>The state of the address pool.</p>
pub fn state(mut self, input: crate::model::ByoipCidrState) -> Self {
self.state = Some(input);
self
}
/// <p>The state of the address pool.</p>
pub fn set_state(
mut self,
input: std::option::Option<crate::model::ByoipCidrState>,
) -> Self {
self.state = input;
self
}
/// Appends an item to `events`.
///
/// To override the contents of this collection use [`set_events`](Self::set_events).
///
/// <p>A history of status changes for an IP address range that you bring to AWS Global Accelerator
/// through bring your own IP address (BYOIP).</p>
pub fn events(mut self, input: impl Into<crate::model::ByoipCidrEvent>) -> Self {
let mut v = self.events.unwrap_or_default();
v.push(input.into());
self.events = Some(v);
self
}
/// <p>A history of status changes for an IP address range that you bring to AWS Global Accelerator
/// through bring your own IP address (BYOIP).</p>
pub fn set_events(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ByoipCidrEvent>>,
) -> Self {
self.events = input;
self
}
/// Consumes the builder and constructs a [`ByoipCidr`](crate::model::ByoipCidr)
pub fn build(self) -> crate::model::ByoipCidr {
crate::model::ByoipCidr {
cidr: self.cidr,
state: self.state,
events: self.events,
}
}
}
}
impl ByoipCidr {
/// Creates a new builder-style object to manufacture [`ByoipCidr`](crate::model::ByoipCidr)
pub fn builder() -> crate::model::byoip_cidr::Builder {
crate::model::byoip_cidr::Builder::default()
}
}
/// <p>A complex type that contains a <code>Message</code> and a <code>Timestamp</code> value for changes
/// that you make in the status an IP address range that you bring to AWS Global Accelerator through bring your own IP
/// address (BYOIP).</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ByoipCidrEvent {
/// <p>A string that contains an <code>Event</code> message describing changes that you make in the status
/// of an IP address range that you bring to AWS Global Accelerator through bring your own IP address (BYOIP).</p>
pub message: std::option::Option<std::string::String>,
/// <p>A timestamp when you make a status change for an IP address range that you bring to AWS Global Accelerator through
/// bring your own IP address (BYOIP).</p>
pub timestamp: std::option::Option<aws_smithy_types::Instant>,
}
impl ByoipCidrEvent {
/// <p>A string that contains an <code>Event</code> message describing changes that you make in the status
/// of an IP address range that you bring to AWS Global Accelerator through bring your own IP address (BYOIP).</p>
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
/// <p>A timestamp when you make a status change for an IP address range that you bring to AWS Global Accelerator through
/// bring your own IP address (BYOIP).</p>
pub fn timestamp(&self) -> std::option::Option<&aws_smithy_types::Instant> {
self.timestamp.as_ref()
}
}
impl std::fmt::Debug for ByoipCidrEvent {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ByoipCidrEvent");
formatter.field("message", &self.message);
formatter.field("timestamp", &self.timestamp);
formatter.finish()
}
}
/// See [`ByoipCidrEvent`](crate::model::ByoipCidrEvent)
pub mod byoip_cidr_event {
/// A builder for [`ByoipCidrEvent`](crate::model::ByoipCidrEvent)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) timestamp: std::option::Option<aws_smithy_types::Instant>,
}
impl Builder {
/// <p>A string that contains an <code>Event</code> message describing changes that you make in the status
/// of an IP address range that you bring to AWS Global Accelerator through bring your own IP address (BYOIP).</p>
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
/// <p>A string that contains an <code>Event</code> message describing changes that you make in the status
/// of an IP address range that you bring to AWS Global Accelerator through bring your own IP address (BYOIP).</p>
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
/// <p>A timestamp when you make a status change for an IP address range that you bring to AWS Global Accelerator through
/// bring your own IP address (BYOIP).</p>
pub fn timestamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.timestamp = Some(input);
self
}
/// <p>A timestamp when you make a status change for an IP address range that you bring to AWS Global Accelerator through
/// bring your own IP address (BYOIP).</p>
pub fn set_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.timestamp = input;
self
}
/// Consumes the builder and constructs a [`ByoipCidrEvent`](crate::model::ByoipCidrEvent)
pub fn build(self) -> crate::model::ByoipCidrEvent {
crate::model::ByoipCidrEvent {
message: self.message,
timestamp: self.timestamp,
}
}
}
}
impl ByoipCidrEvent {
/// Creates a new builder-style object to manufacture [`ByoipCidrEvent`](crate::model::ByoipCidrEvent)
pub fn builder() -> crate::model::byoip_cidr_event::Builder {
crate::model::byoip_cidr_event::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ByoipCidrState {
#[allow(missing_docs)] // documentation missing in model
Advertising,
#[allow(missing_docs)] // documentation missing in model
Deprovisioned,
#[allow(missing_docs)] // documentation missing in model
FailedAdvertising,
#[allow(missing_docs)] // documentation missing in model
FailedDeprovision,
#[allow(missing_docs)] // documentation missing in model
FailedProvision,
#[allow(missing_docs)] // documentation missing in model
FailedWithdraw,
#[allow(missing_docs)] // documentation missing in model
PendingAdvertising,
#[allow(missing_docs)] // documentation missing in model
PendingDeprovisioning,
#[allow(missing_docs)] // documentation missing in model
PendingProvisioning,
#[allow(missing_docs)] // documentation missing in model
PendingWithdrawing,
#[allow(missing_docs)] // documentation missing in model
Ready,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ByoipCidrState {
fn from(s: &str) -> Self {
match s {
"ADVERTISING" => ByoipCidrState::Advertising,
"DEPROVISIONED" => ByoipCidrState::Deprovisioned,
"FAILED_ADVERTISING" => ByoipCidrState::FailedAdvertising,
"FAILED_DEPROVISION" => ByoipCidrState::FailedDeprovision,
"FAILED_PROVISION" => ByoipCidrState::FailedProvision,
"FAILED_WITHDRAW" => ByoipCidrState::FailedWithdraw,
"PENDING_ADVERTISING" => ByoipCidrState::PendingAdvertising,
"PENDING_DEPROVISIONING" => ByoipCidrState::PendingDeprovisioning,
"PENDING_PROVISIONING" => ByoipCidrState::PendingProvisioning,
"PENDING_WITHDRAWING" => ByoipCidrState::PendingWithdrawing,
"READY" => ByoipCidrState::Ready,
other => ByoipCidrState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ByoipCidrState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ByoipCidrState::from(s))
}
}
impl ByoipCidrState {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ByoipCidrState::Advertising => "ADVERTISING",
ByoipCidrState::Deprovisioned => "DEPROVISIONED",
ByoipCidrState::FailedAdvertising => "FAILED_ADVERTISING",
ByoipCidrState::FailedDeprovision => "FAILED_DEPROVISION",
ByoipCidrState::FailedProvision => "FAILED_PROVISION",
ByoipCidrState::FailedWithdraw => "FAILED_WITHDRAW",
ByoipCidrState::PendingAdvertising => "PENDING_ADVERTISING",
ByoipCidrState::PendingDeprovisioning => "PENDING_DEPROVISIONING",
ByoipCidrState::PendingProvisioning => "PENDING_PROVISIONING",
ByoipCidrState::PendingWithdrawing => "PENDING_WITHDRAWING",
ByoipCidrState::Ready => "READY",
ByoipCidrState::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"ADVERTISING",
"DEPROVISIONED",
"FAILED_ADVERTISING",
"FAILED_DEPROVISION",
"FAILED_PROVISION",
"FAILED_WITHDRAW",
"PENDING_ADVERTISING",
"PENDING_DEPROVISIONING",
"PENDING_PROVISIONING",
"PENDING_WITHDRAWING",
"READY",
]
}
}
impl AsRef<str> for ByoipCidrState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>A complex type for a listener.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Listener {
/// <p>The Amazon Resource Name (ARN) of the listener.</p>
pub listener_arn: std::option::Option<std::string::String>,
/// <p>The list of port ranges for the connections from clients to the accelerator.</p>
pub port_ranges: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
/// <p>The protocol for the connections from clients to the accelerator.</p>
pub protocol: std::option::Option<crate::model::Protocol>,
/// <p>Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications,
/// regardless of the port and protocol of the client request. Client affinity gives you control over whether to always
/// route each client to the same specific endpoint.</p>
/// <p>AWS Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client
/// affinity is <code>NONE</code>, Global Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, source port,
/// destination IP address, destination port, and protocol—to select the hash value, and then chooses the best
/// endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not
/// be always routed to the same endpoint because the hash value changes. </p>
/// <p>If you want a given client to always be routed to the same endpoint, set client affinity to <code>SOURCE_IP</code>
/// instead. When you use the <code>SOURCE_IP</code> setting, Global Accelerator uses the "two-tuple" (2-tuple) properties—
/// source (client) IP address and destination IP address—to select the hash value.</p>
/// <p>The default value is <code>NONE</code>.</p>
pub client_affinity: std::option::Option<crate::model::ClientAffinity>,
}
impl Listener {
/// <p>The Amazon Resource Name (ARN) of the listener.</p>
pub fn listener_arn(&self) -> std::option::Option<&str> {
self.listener_arn.as_deref()
}
/// <p>The list of port ranges for the connections from clients to the accelerator.</p>
pub fn port_ranges(&self) -> std::option::Option<&[crate::model::PortRange]> {
self.port_ranges.as_deref()
}
/// <p>The protocol for the connections from clients to the accelerator.</p>
pub fn protocol(&self) -> std::option::Option<&crate::model::Protocol> {
self.protocol.as_ref()
}
/// <p>Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications,
/// regardless of the port and protocol of the client request. Client affinity gives you control over whether to always
/// route each client to the same specific endpoint.</p>
/// <p>AWS Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client
/// affinity is <code>NONE</code>, Global Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, source port,
/// destination IP address, destination port, and protocol—to select the hash value, and then chooses the best
/// endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not
/// be always routed to the same endpoint because the hash value changes. </p>
/// <p>If you want a given client to always be routed to the same endpoint, set client affinity to <code>SOURCE_IP</code>
/// instead. When you use the <code>SOURCE_IP</code> setting, Global Accelerator uses the "two-tuple" (2-tuple) properties—
/// source (client) IP address and destination IP address—to select the hash value.</p>
/// <p>The default value is <code>NONE</code>.</p>
pub fn client_affinity(&self) -> std::option::Option<&crate::model::ClientAffinity> {
self.client_affinity.as_ref()
}
}
impl std::fmt::Debug for Listener {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Listener");
formatter.field("listener_arn", &self.listener_arn);
formatter.field("port_ranges", &self.port_ranges);
formatter.field("protocol", &self.protocol);
formatter.field("client_affinity", &self.client_affinity);
formatter.finish()
}
}
/// See [`Listener`](crate::model::Listener)
pub mod listener {
/// A builder for [`Listener`](crate::model::Listener)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) listener_arn: std::option::Option<std::string::String>,
pub(crate) port_ranges: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
pub(crate) protocol: std::option::Option<crate::model::Protocol>,
pub(crate) client_affinity: std::option::Option<crate::model::ClientAffinity>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the listener.</p>
pub fn listener_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.listener_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the listener.</p>
pub fn set_listener_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.listener_arn = input;
self
}
/// Appends an item to `port_ranges`.
///
/// To override the contents of this collection use [`set_port_ranges`](Self::set_port_ranges).
///
/// <p>The list of port ranges for the connections from clients to the accelerator.</p>
pub fn port_ranges(mut self, input: impl Into<crate::model::PortRange>) -> Self {
let mut v = self.port_ranges.unwrap_or_default();
v.push(input.into());
self.port_ranges = Some(v);
self
}
/// <p>The list of port ranges for the connections from clients to the accelerator.</p>
pub fn set_port_ranges(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
) -> Self {
self.port_ranges = input;
self
}
/// <p>The protocol for the connections from clients to the accelerator.</p>
pub fn protocol(mut self, input: crate::model::Protocol) -> Self {
self.protocol = Some(input);
self
}
/// <p>The protocol for the connections from clients to the accelerator.</p>
pub fn set_protocol(mut self, input: std::option::Option<crate::model::Protocol>) -> Self {
self.protocol = input;
self
}
/// <p>Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications,
/// regardless of the port and protocol of the client request. Client affinity gives you control over whether to always
/// route each client to the same specific endpoint.</p>
/// <p>AWS Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client
/// affinity is <code>NONE</code>, Global Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, source port,
/// destination IP address, destination port, and protocol—to select the hash value, and then chooses the best
/// endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not
/// be always routed to the same endpoint because the hash value changes. </p>
/// <p>If you want a given client to always be routed to the same endpoint, set client affinity to <code>SOURCE_IP</code>
/// instead. When you use the <code>SOURCE_IP</code> setting, Global Accelerator uses the "two-tuple" (2-tuple) properties—
/// source (client) IP address and destination IP address—to select the hash value.</p>
/// <p>The default value is <code>NONE</code>.</p>
pub fn client_affinity(mut self, input: crate::model::ClientAffinity) -> Self {
self.client_affinity = Some(input);
self
}
/// <p>Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications,
/// regardless of the port and protocol of the client request. Client affinity gives you control over whether to always
/// route each client to the same specific endpoint.</p>
/// <p>AWS Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client
/// affinity is <code>NONE</code>, Global Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, source port,
/// destination IP address, destination port, and protocol—to select the hash value, and then chooses the best
/// endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not
/// be always routed to the same endpoint because the hash value changes. </p>
/// <p>If you want a given client to always be routed to the same endpoint, set client affinity to <code>SOURCE_IP</code>
/// instead. When you use the <code>SOURCE_IP</code> setting, Global Accelerator uses the "two-tuple" (2-tuple) properties—
/// source (client) IP address and destination IP address—to select the hash value.</p>
/// <p>The default value is <code>NONE</code>.</p>
pub fn set_client_affinity(
mut self,
input: std::option::Option<crate::model::ClientAffinity>,
) -> Self {
self.client_affinity = input;
self
}
/// Consumes the builder and constructs a [`Listener`](crate::model::Listener)
pub fn build(self) -> crate::model::Listener {
crate::model::Listener {
listener_arn: self.listener_arn,
port_ranges: self.port_ranges,
protocol: self.protocol,
client_affinity: self.client_affinity,
}
}
}
}
impl Listener {
/// Creates a new builder-style object to manufacture [`Listener`](crate::model::Listener)
pub fn builder() -> crate::model::listener::Builder {
crate::model::listener::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ClientAffinity {
#[allow(missing_docs)] // documentation missing in model
None,
#[allow(missing_docs)] // documentation missing in model
SourceIp,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ClientAffinity {
fn from(s: &str) -> Self {
match s {
"NONE" => ClientAffinity::None,
"SOURCE_IP" => ClientAffinity::SourceIp,
other => ClientAffinity::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ClientAffinity {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ClientAffinity::from(s))
}
}
impl ClientAffinity {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ClientAffinity::None => "NONE",
ClientAffinity::SourceIp => "SOURCE_IP",
ClientAffinity::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NONE", "SOURCE_IP"]
}
}
impl AsRef<str> for ClientAffinity {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Protocol {
#[allow(missing_docs)] // documentation missing in model
Tcp,
#[allow(missing_docs)] // documentation missing in model
Udp,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for Protocol {
fn from(s: &str) -> Self {
match s {
"TCP" => Protocol::Tcp,
"UDP" => Protocol::Udp,
other => Protocol::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for Protocol {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Protocol::from(s))
}
}
impl Protocol {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
Protocol::Tcp => "TCP",
Protocol::Udp => "UDP",
Protocol::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["TCP", "UDP"]
}
}
impl AsRef<str> for Protocol {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>A complex type for a range of ports for a listener.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PortRange {
/// <p>The first port in the range of ports, inclusive.</p>
pub from_port: std::option::Option<i32>,
/// <p>The last port in the range of ports, inclusive.</p>
pub to_port: std::option::Option<i32>,
}
impl PortRange {
/// <p>The first port in the range of ports, inclusive.</p>
pub fn from_port(&self) -> std::option::Option<i32> {
self.from_port
}
/// <p>The last port in the range of ports, inclusive.</p>
pub fn to_port(&self) -> std::option::Option<i32> {
self.to_port
}
}
impl std::fmt::Debug for PortRange {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PortRange");
formatter.field("from_port", &self.from_port);
formatter.field("to_port", &self.to_port);
formatter.finish()
}
}
/// See [`PortRange`](crate::model::PortRange)
pub mod port_range {
/// A builder for [`PortRange`](crate::model::PortRange)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) from_port: std::option::Option<i32>,
pub(crate) to_port: std::option::Option<i32>,
}
impl Builder {
/// <p>The first port in the range of ports, inclusive.</p>
pub fn from_port(mut self, input: i32) -> Self {
self.from_port = Some(input);
self
}
/// <p>The first port in the range of ports, inclusive.</p>
pub fn set_from_port(mut self, input: std::option::Option<i32>) -> Self {
self.from_port = input;
self
}
/// <p>The last port in the range of ports, inclusive.</p>
pub fn to_port(mut self, input: i32) -> Self {
self.to_port = Some(input);
self
}
/// <p>The last port in the range of ports, inclusive.</p>
pub fn set_to_port(mut self, input: std::option::Option<i32>) -> Self {
self.to_port = input;
self
}
/// Consumes the builder and constructs a [`PortRange`](crate::model::PortRange)
pub fn build(self) -> crate::model::PortRange {
crate::model::PortRange {
from_port: self.from_port,
to_port: self.to_port,
}
}
}
}
impl PortRange {
/// Creates a new builder-style object to manufacture [`PortRange`](crate::model::PortRange)
pub fn builder() -> crate::model::port_range::Builder {
crate::model::port_range::Builder::default()
}
}
/// <p>A complex type for the endpoint group. An AWS Region can have only one endpoint group for a specific listener.
/// </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EndpointGroup {
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub endpoint_group_arn: std::option::Option<std::string::String>,
/// <p>The AWS Region where the endpoint group is located.</p>
pub endpoint_group_region: std::option::Option<std::string::String>,
/// <p>The list of endpoint objects.</p>
pub endpoint_descriptions:
std::option::Option<std::vec::Vec<crate::model::EndpointDescription>>,
/// <p>The percentage of traffic to send to an AWS Region. Additional traffic is distributed to other endpoint groups for
/// this listener. </p>
/// <p>Use this action to increase (dial up) or decrease (dial down) traffic to a specific Region. The percentage is
/// applied to the traffic that would otherwise have been routed to the Region based on optimal routing.</p>
/// <p>The default value is 100.</p>
pub traffic_dial_percentage: std::option::Option<f32>,
/// <p>The port that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. </p>
///
/// <p>The default port is the port for the listener that this endpoint group is associated with. If the listener port is a
/// list, Global Accelerator uses the first specified port in the list of ports.</p>
pub health_check_port: std::option::Option<i32>,
/// <p>The protocol that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. The default
/// value is TCP.</p>
pub health_check_protocol: std::option::Option<crate::model::HealthCheckProtocol>,
/// <p>If the protocol is HTTP/S, then this value provides the ping path that Global Accelerator uses for the destination on the
/// endpoints for health checks. The default is slash (/).</p>
pub health_check_path: std::option::Option<std::string::String>,
/// <p>The time—10 seconds or 30 seconds—between health checks for each endpoint. The default value is 30.</p>
pub health_check_interval_seconds: std::option::Option<i32>,
/// <p>The number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an
/// unhealthy endpoint to healthy. The default value is 3.</p>
pub threshold_count: std::option::Option<i32>,
/// <p>Allows you to override the destination ports used to route traffic to an endpoint.
/// Using a port override lets you to map a list of external destination ports (that your
/// users send traffic to) to a list of internal destination ports that you want an application
/// endpoint to receive traffic on. </p>
pub port_overrides: std::option::Option<std::vec::Vec<crate::model::PortOverride>>,
}
impl EndpointGroup {
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub fn endpoint_group_arn(&self) -> std::option::Option<&str> {
self.endpoint_group_arn.as_deref()
}
/// <p>The AWS Region where the endpoint group is located.</p>
pub fn endpoint_group_region(&self) -> std::option::Option<&str> {
self.endpoint_group_region.as_deref()
}
/// <p>The list of endpoint objects.</p>
pub fn endpoint_descriptions(
&self,
) -> std::option::Option<&[crate::model::EndpointDescription]> {
self.endpoint_descriptions.as_deref()
}
/// <p>The percentage of traffic to send to an AWS Region. Additional traffic is distributed to other endpoint groups for
/// this listener. </p>
/// <p>Use this action to increase (dial up) or decrease (dial down) traffic to a specific Region. The percentage is
/// applied to the traffic that would otherwise have been routed to the Region based on optimal routing.</p>
/// <p>The default value is 100.</p>
pub fn traffic_dial_percentage(&self) -> std::option::Option<f32> {
self.traffic_dial_percentage
}
/// <p>The port that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. </p>
///
/// <p>The default port is the port for the listener that this endpoint group is associated with. If the listener port is a
/// list, Global Accelerator uses the first specified port in the list of ports.</p>
pub fn health_check_port(&self) -> std::option::Option<i32> {
self.health_check_port
}
/// <p>The protocol that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. The default
/// value is TCP.</p>
pub fn health_check_protocol(&self) -> std::option::Option<&crate::model::HealthCheckProtocol> {
self.health_check_protocol.as_ref()
}
/// <p>If the protocol is HTTP/S, then this value provides the ping path that Global Accelerator uses for the destination on the
/// endpoints for health checks. The default is slash (/).</p>
pub fn health_check_path(&self) -> std::option::Option<&str> {
self.health_check_path.as_deref()
}
/// <p>The time—10 seconds or 30 seconds—between health checks for each endpoint. The default value is 30.</p>
pub fn health_check_interval_seconds(&self) -> std::option::Option<i32> {
self.health_check_interval_seconds
}
/// <p>The number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an
/// unhealthy endpoint to healthy. The default value is 3.</p>
pub fn threshold_count(&self) -> std::option::Option<i32> {
self.threshold_count
}
/// <p>Allows you to override the destination ports used to route traffic to an endpoint.
/// Using a port override lets you to map a list of external destination ports (that your
/// users send traffic to) to a list of internal destination ports that you want an application
/// endpoint to receive traffic on. </p>
pub fn port_overrides(&self) -> std::option::Option<&[crate::model::PortOverride]> {
self.port_overrides.as_deref()
}
}
impl std::fmt::Debug for EndpointGroup {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EndpointGroup");
formatter.field("endpoint_group_arn", &self.endpoint_group_arn);
formatter.field("endpoint_group_region", &self.endpoint_group_region);
formatter.field("endpoint_descriptions", &self.endpoint_descriptions);
formatter.field("traffic_dial_percentage", &self.traffic_dial_percentage);
formatter.field("health_check_port", &self.health_check_port);
formatter.field("health_check_protocol", &self.health_check_protocol);
formatter.field("health_check_path", &self.health_check_path);
formatter.field(
"health_check_interval_seconds",
&self.health_check_interval_seconds,
);
formatter.field("threshold_count", &self.threshold_count);
formatter.field("port_overrides", &self.port_overrides);
formatter.finish()
}
}
/// See [`EndpointGroup`](crate::model::EndpointGroup)
pub mod endpoint_group {
/// A builder for [`EndpointGroup`](crate::model::EndpointGroup)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) endpoint_group_arn: std::option::Option<std::string::String>,
pub(crate) endpoint_group_region: std::option::Option<std::string::String>,
pub(crate) endpoint_descriptions:
std::option::Option<std::vec::Vec<crate::model::EndpointDescription>>,
pub(crate) traffic_dial_percentage: std::option::Option<f32>,
pub(crate) health_check_port: std::option::Option<i32>,
pub(crate) health_check_protocol: std::option::Option<crate::model::HealthCheckProtocol>,
pub(crate) health_check_path: std::option::Option<std::string::String>,
pub(crate) health_check_interval_seconds: std::option::Option<i32>,
pub(crate) threshold_count: std::option::Option<i32>,
pub(crate) port_overrides: std::option::Option<std::vec::Vec<crate::model::PortOverride>>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub fn endpoint_group_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_group_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub fn set_endpoint_group_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.endpoint_group_arn = input;
self
}
/// <p>The AWS Region where the endpoint group is located.</p>
pub fn endpoint_group_region(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_group_region = Some(input.into());
self
}
/// <p>The AWS Region where the endpoint group is located.</p>
pub fn set_endpoint_group_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.endpoint_group_region = input;
self
}
/// Appends an item to `endpoint_descriptions`.
///
/// To override the contents of this collection use [`set_endpoint_descriptions`](Self::set_endpoint_descriptions).
///
/// <p>The list of endpoint objects.</p>
pub fn endpoint_descriptions(
mut self,
input: impl Into<crate::model::EndpointDescription>,
) -> Self {
let mut v = self.endpoint_descriptions.unwrap_or_default();
v.push(input.into());
self.endpoint_descriptions = Some(v);
self
}
/// <p>The list of endpoint objects.</p>
pub fn set_endpoint_descriptions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::EndpointDescription>>,
) -> Self {
self.endpoint_descriptions = input;
self
}
/// <p>The percentage of traffic to send to an AWS Region. Additional traffic is distributed to other endpoint groups for
/// this listener. </p>
/// <p>Use this action to increase (dial up) or decrease (dial down) traffic to a specific Region. The percentage is
/// applied to the traffic that would otherwise have been routed to the Region based on optimal routing.</p>
/// <p>The default value is 100.</p>
pub fn traffic_dial_percentage(mut self, input: f32) -> Self {
self.traffic_dial_percentage = Some(input);
self
}
/// <p>The percentage of traffic to send to an AWS Region. Additional traffic is distributed to other endpoint groups for
/// this listener. </p>
/// <p>Use this action to increase (dial up) or decrease (dial down) traffic to a specific Region. The percentage is
/// applied to the traffic that would otherwise have been routed to the Region based on optimal routing.</p>
/// <p>The default value is 100.</p>
pub fn set_traffic_dial_percentage(mut self, input: std::option::Option<f32>) -> Self {
self.traffic_dial_percentage = input;
self
}
/// <p>The port that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. </p>
///
/// <p>The default port is the port for the listener that this endpoint group is associated with. If the listener port is a
/// list, Global Accelerator uses the first specified port in the list of ports.</p>
pub fn health_check_port(mut self, input: i32) -> Self {
self.health_check_port = Some(input);
self
}
/// <p>The port that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. </p>
///
/// <p>The default port is the port for the listener that this endpoint group is associated with. If the listener port is a
/// list, Global Accelerator uses the first specified port in the list of ports.</p>
pub fn set_health_check_port(mut self, input: std::option::Option<i32>) -> Self {
self.health_check_port = input;
self
}
/// <p>The protocol that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. The default
/// value is TCP.</p>
pub fn health_check_protocol(mut self, input: crate::model::HealthCheckProtocol) -> Self {
self.health_check_protocol = Some(input);
self
}
/// <p>The protocol that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. The default
/// value is TCP.</p>
pub fn set_health_check_protocol(
mut self,
input: std::option::Option<crate::model::HealthCheckProtocol>,
) -> Self {
self.health_check_protocol = input;
self
}
/// <p>If the protocol is HTTP/S, then this value provides the ping path that Global Accelerator uses for the destination on the
/// endpoints for health checks. The default is slash (/).</p>
pub fn health_check_path(mut self, input: impl Into<std::string::String>) -> Self {
self.health_check_path = Some(input.into());
self
}
/// <p>If the protocol is HTTP/S, then this value provides the ping path that Global Accelerator uses for the destination on the
/// endpoints for health checks. The default is slash (/).</p>
pub fn set_health_check_path(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.health_check_path = input;
self
}
/// <p>The time—10 seconds or 30 seconds—between health checks for each endpoint. The default value is 30.</p>
pub fn health_check_interval_seconds(mut self, input: i32) -> Self {
self.health_check_interval_seconds = Some(input);
self
}
/// <p>The time—10 seconds or 30 seconds—between health checks for each endpoint. The default value is 30.</p>
pub fn set_health_check_interval_seconds(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.health_check_interval_seconds = input;
self
}
/// <p>The number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an
/// unhealthy endpoint to healthy. The default value is 3.</p>
pub fn threshold_count(mut self, input: i32) -> Self {
self.threshold_count = Some(input);
self
}
/// <p>The number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an
/// unhealthy endpoint to healthy. The default value is 3.</p>
pub fn set_threshold_count(mut self, input: std::option::Option<i32>) -> Self {
self.threshold_count = input;
self
}
/// Appends an item to `port_overrides`.
///
/// To override the contents of this collection use [`set_port_overrides`](Self::set_port_overrides).
///
/// <p>Allows you to override the destination ports used to route traffic to an endpoint.
/// Using a port override lets you to map a list of external destination ports (that your
/// users send traffic to) to a list of internal destination ports that you want an application
/// endpoint to receive traffic on. </p>
pub fn port_overrides(mut self, input: impl Into<crate::model::PortOverride>) -> Self {
let mut v = self.port_overrides.unwrap_or_default();
v.push(input.into());
self.port_overrides = Some(v);
self
}
/// <p>Allows you to override the destination ports used to route traffic to an endpoint.
/// Using a port override lets you to map a list of external destination ports (that your
/// users send traffic to) to a list of internal destination ports that you want an application
/// endpoint to receive traffic on. </p>
pub fn set_port_overrides(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PortOverride>>,
) -> Self {
self.port_overrides = input;
self
}
/// Consumes the builder and constructs a [`EndpointGroup`](crate::model::EndpointGroup)
pub fn build(self) -> crate::model::EndpointGroup {
crate::model::EndpointGroup {
endpoint_group_arn: self.endpoint_group_arn,
endpoint_group_region: self.endpoint_group_region,
endpoint_descriptions: self.endpoint_descriptions,
traffic_dial_percentage: self.traffic_dial_percentage,
health_check_port: self.health_check_port,
health_check_protocol: self.health_check_protocol,
health_check_path: self.health_check_path,
health_check_interval_seconds: self.health_check_interval_seconds,
threshold_count: self.threshold_count,
port_overrides: self.port_overrides,
}
}
}
}
impl EndpointGroup {
/// Creates a new builder-style object to manufacture [`EndpointGroup`](crate::model::EndpointGroup)
pub fn builder() -> crate::model::endpoint_group::Builder {
crate::model::endpoint_group::Builder::default()
}
}
/// <p>Override specific listener ports used to route traffic to endpoints that are part of an endpoint group.
/// For example, you can create a port override in which the listener
/// receives user traffic on ports 80 and 443, but your accelerator routes that traffic to ports 1080
/// and 1443, respectively, on the endpoints.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoint-groups-port-override.html">
/// Port overrides</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PortOverride {
/// <p>The listener port that you want to map to a specific endpoint port. This is the port that user traffic
/// arrives to the Global Accelerator on.</p>
pub listener_port: std::option::Option<i32>,
/// <p>The endpoint port that you want a listener port to be mapped to. This is the port on the endpoint,
/// such as the Application Load Balancer or Amazon EC2 instance.</p>
pub endpoint_port: std::option::Option<i32>,
}
impl PortOverride {
/// <p>The listener port that you want to map to a specific endpoint port. This is the port that user traffic
/// arrives to the Global Accelerator on.</p>
pub fn listener_port(&self) -> std::option::Option<i32> {
self.listener_port
}
/// <p>The endpoint port that you want a listener port to be mapped to. This is the port on the endpoint,
/// such as the Application Load Balancer or Amazon EC2 instance.</p>
pub fn endpoint_port(&self) -> std::option::Option<i32> {
self.endpoint_port
}
}
impl std::fmt::Debug for PortOverride {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PortOverride");
formatter.field("listener_port", &self.listener_port);
formatter.field("endpoint_port", &self.endpoint_port);
formatter.finish()
}
}
/// See [`PortOverride`](crate::model::PortOverride)
pub mod port_override {
/// A builder for [`PortOverride`](crate::model::PortOverride)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) listener_port: std::option::Option<i32>,
pub(crate) endpoint_port: std::option::Option<i32>,
}
impl Builder {
/// <p>The listener port that you want to map to a specific endpoint port. This is the port that user traffic
/// arrives to the Global Accelerator on.</p>
pub fn listener_port(mut self, input: i32) -> Self {
self.listener_port = Some(input);
self
}
/// <p>The listener port that you want to map to a specific endpoint port. This is the port that user traffic
/// arrives to the Global Accelerator on.</p>
pub fn set_listener_port(mut self, input: std::option::Option<i32>) -> Self {
self.listener_port = input;
self
}
/// <p>The endpoint port that you want a listener port to be mapped to. This is the port on the endpoint,
/// such as the Application Load Balancer or Amazon EC2 instance.</p>
pub fn endpoint_port(mut self, input: i32) -> Self {
self.endpoint_port = Some(input);
self
}
/// <p>The endpoint port that you want a listener port to be mapped to. This is the port on the endpoint,
/// such as the Application Load Balancer or Amazon EC2 instance.</p>
pub fn set_endpoint_port(mut self, input: std::option::Option<i32>) -> Self {
self.endpoint_port = input;
self
}
/// Consumes the builder and constructs a [`PortOverride`](crate::model::PortOverride)
pub fn build(self) -> crate::model::PortOverride {
crate::model::PortOverride {
listener_port: self.listener_port,
endpoint_port: self.endpoint_port,
}
}
}
}
impl PortOverride {
/// Creates a new builder-style object to manufacture [`PortOverride`](crate::model::PortOverride)
pub fn builder() -> crate::model::port_override::Builder {
crate::model::port_override::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HealthCheckProtocol {
#[allow(missing_docs)] // documentation missing in model
Http,
#[allow(missing_docs)] // documentation missing in model
Https,
#[allow(missing_docs)] // documentation missing in model
Tcp,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HealthCheckProtocol {
fn from(s: &str) -> Self {
match s {
"HTTP" => HealthCheckProtocol::Http,
"HTTPS" => HealthCheckProtocol::Https,
"TCP" => HealthCheckProtocol::Tcp,
other => HealthCheckProtocol::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HealthCheckProtocol {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HealthCheckProtocol::from(s))
}
}
impl HealthCheckProtocol {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HealthCheckProtocol::Http => "HTTP",
HealthCheckProtocol::Https => "HTTPS",
HealthCheckProtocol::Tcp => "TCP",
HealthCheckProtocol::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HTTP", "HTTPS", "TCP"]
}
}
impl AsRef<str> for HealthCheckProtocol {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>A complex type for an endpoint. Each endpoint group can include one or more endpoints, such as load
/// balancers.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EndpointDescription {
/// <p>An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon
/// Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP address
/// allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. </p>
/// <p>An Application Load Balancer can be either internal or internet-facing.</p>
pub endpoint_id: std::option::Option<std::string::String>,
/// <p>The weight associated with the endpoint. When you add weights to endpoints, you configure AWS Global Accelerator to route traffic
/// based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The
/// result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is routed both to the second
/// and third endpoints, and 6/20 is routed to the last endpoint. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html">Endpoint Weights</a> in the
/// <i>AWS Global Accelerator Developer Guide</i>. </p>
pub weight: std::option::Option<i32>,
/// <p>The health status of the endpoint.</p>
pub health_state: std::option::Option<crate::model::HealthState>,
/// <p>Returns a null result.</p>
pub health_reason: std::option::Option<std::string::String>,
/// <p>Indicates whether client IP address preservation is enabled for an Application Load Balancer endpoint.
/// The value is true or false. The default value is true for new accelerators. </p>
/// <p>If the value is set to true, the client's IP address is preserved in the <code>X-Forwarded-For</code> request header as
/// traffic travels to applications on the Application Load Balancer endpoint fronted by the accelerator.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/introduction-how-it-works-client-ip.html">
/// Viewing Client IP Addresses in AWS Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub client_ip_preservation_enabled: std::option::Option<bool>,
}
impl EndpointDescription {
/// <p>An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon
/// Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP address
/// allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. </p>
/// <p>An Application Load Balancer can be either internal or internet-facing.</p>
pub fn endpoint_id(&self) -> std::option::Option<&str> {
self.endpoint_id.as_deref()
}
/// <p>The weight associated with the endpoint. When you add weights to endpoints, you configure AWS Global Accelerator to route traffic
/// based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The
/// result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is routed both to the second
/// and third endpoints, and 6/20 is routed to the last endpoint. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html">Endpoint Weights</a> in the
/// <i>AWS Global Accelerator Developer Guide</i>. </p>
pub fn weight(&self) -> std::option::Option<i32> {
self.weight
}
/// <p>The health status of the endpoint.</p>
pub fn health_state(&self) -> std::option::Option<&crate::model::HealthState> {
self.health_state.as_ref()
}
/// <p>Returns a null result.</p>
pub fn health_reason(&self) -> std::option::Option<&str> {
self.health_reason.as_deref()
}
/// <p>Indicates whether client IP address preservation is enabled for an Application Load Balancer endpoint.
/// The value is true or false. The default value is true for new accelerators. </p>
/// <p>If the value is set to true, the client's IP address is preserved in the <code>X-Forwarded-For</code> request header as
/// traffic travels to applications on the Application Load Balancer endpoint fronted by the accelerator.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/introduction-how-it-works-client-ip.html">
/// Viewing Client IP Addresses in AWS Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn client_ip_preservation_enabled(&self) -> std::option::Option<bool> {
self.client_ip_preservation_enabled
}
}
impl std::fmt::Debug for EndpointDescription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EndpointDescription");
formatter.field("endpoint_id", &self.endpoint_id);
formatter.field("weight", &self.weight);
formatter.field("health_state", &self.health_state);
formatter.field("health_reason", &self.health_reason);
formatter.field(
"client_ip_preservation_enabled",
&self.client_ip_preservation_enabled,
);
formatter.finish()
}
}
/// See [`EndpointDescription`](crate::model::EndpointDescription)
pub mod endpoint_description {
/// A builder for [`EndpointDescription`](crate::model::EndpointDescription)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) endpoint_id: std::option::Option<std::string::String>,
pub(crate) weight: std::option::Option<i32>,
pub(crate) health_state: std::option::Option<crate::model::HealthState>,
pub(crate) health_reason: std::option::Option<std::string::String>,
pub(crate) client_ip_preservation_enabled: std::option::Option<bool>,
}
impl Builder {
/// <p>An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon
/// Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP address
/// allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. </p>
/// <p>An Application Load Balancer can be either internal or internet-facing.</p>
pub fn endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_id = Some(input.into());
self
}
/// <p>An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon
/// Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP address
/// allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. </p>
/// <p>An Application Load Balancer can be either internal or internet-facing.</p>
pub fn set_endpoint_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_id = input;
self
}
/// <p>The weight associated with the endpoint. When you add weights to endpoints, you configure AWS Global Accelerator to route traffic
/// based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The
/// result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is routed both to the second
/// and third endpoints, and 6/20 is routed to the last endpoint. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html">Endpoint Weights</a> in the
/// <i>AWS Global Accelerator Developer Guide</i>. </p>
pub fn weight(mut self, input: i32) -> Self {
self.weight = Some(input);
self
}
/// <p>The weight associated with the endpoint. When you add weights to endpoints, you configure AWS Global Accelerator to route traffic
/// based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The
/// result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is routed both to the second
/// and third endpoints, and 6/20 is routed to the last endpoint. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html">Endpoint Weights</a> in the
/// <i>AWS Global Accelerator Developer Guide</i>. </p>
pub fn set_weight(mut self, input: std::option::Option<i32>) -> Self {
self.weight = input;
self
}
/// <p>The health status of the endpoint.</p>
pub fn health_state(mut self, input: crate::model::HealthState) -> Self {
self.health_state = Some(input);
self
}
/// <p>The health status of the endpoint.</p>
pub fn set_health_state(
mut self,
input: std::option::Option<crate::model::HealthState>,
) -> Self {
self.health_state = input;
self
}
/// <p>Returns a null result.</p>
pub fn health_reason(mut self, input: impl Into<std::string::String>) -> Self {
self.health_reason = Some(input.into());
self
}
/// <p>Returns a null result.</p>
pub fn set_health_reason(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.health_reason = input;
self
}
/// <p>Indicates whether client IP address preservation is enabled for an Application Load Balancer endpoint.
/// The value is true or false. The default value is true for new accelerators. </p>
/// <p>If the value is set to true, the client's IP address is preserved in the <code>X-Forwarded-For</code> request header as
/// traffic travels to applications on the Application Load Balancer endpoint fronted by the accelerator.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/introduction-how-it-works-client-ip.html">
/// Viewing Client IP Addresses in AWS Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn client_ip_preservation_enabled(mut self, input: bool) -> Self {
self.client_ip_preservation_enabled = Some(input);
self
}
/// <p>Indicates whether client IP address preservation is enabled for an Application Load Balancer endpoint.
/// The value is true or false. The default value is true for new accelerators. </p>
/// <p>If the value is set to true, the client's IP address is preserved in the <code>X-Forwarded-For</code> request header as
/// traffic travels to applications on the Application Load Balancer endpoint fronted by the accelerator.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/introduction-how-it-works-client-ip.html">
/// Viewing Client IP Addresses in AWS Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn set_client_ip_preservation_enabled(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.client_ip_preservation_enabled = input;
self
}
/// Consumes the builder and constructs a [`EndpointDescription`](crate::model::EndpointDescription)
pub fn build(self) -> crate::model::EndpointDescription {
crate::model::EndpointDescription {
endpoint_id: self.endpoint_id,
weight: self.weight,
health_state: self.health_state,
health_reason: self.health_reason,
client_ip_preservation_enabled: self.client_ip_preservation_enabled,
}
}
}
}
impl EndpointDescription {
/// Creates a new builder-style object to manufacture [`EndpointDescription`](crate::model::EndpointDescription)
pub fn builder() -> crate::model::endpoint_description::Builder {
crate::model::endpoint_description::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum HealthState {
#[allow(missing_docs)] // documentation missing in model
Healthy,
#[allow(missing_docs)] // documentation missing in model
Initial,
#[allow(missing_docs)] // documentation missing in model
Unhealthy,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for HealthState {
fn from(s: &str) -> Self {
match s {
"HEALTHY" => HealthState::Healthy,
"INITIAL" => HealthState::Initial,
"UNHEALTHY" => HealthState::Unhealthy,
other => HealthState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for HealthState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(HealthState::from(s))
}
}
impl HealthState {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
HealthState::Healthy => "HEALTHY",
HealthState::Initial => "INITIAL",
HealthState::Unhealthy => "UNHEALTHY",
HealthState::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["HEALTHY", "INITIAL", "UNHEALTHY"]
}
}
impl AsRef<str> for HealthState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>A complex type for endpoints. A resource must be valid and active when you add it as an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EndpointConfiguration {
/// <p>An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon
/// Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP address
/// allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. A resource must be valid and active
/// when you add it as an endpoint.</p>
/// <p>An Application Load Balancer can be either internal or internet-facing.</p>
pub endpoint_id: std::option::Option<std::string::String>,
/// <p>The weight associated with the endpoint. When you add weights to endpoints, you configure AWS Global Accelerator to route traffic
/// based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The
/// result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is routed both to the second
/// and third endpoints, and 6/20 is routed to the last endpoint. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html">Endpoint Weights</a> in the
/// <i>AWS Global Accelerator Developer Guide</i>.</p>
pub weight: std::option::Option<i32>,
/// <p>Indicates whether client IP address preservation is enabled for an Application Load Balancer endpoint.
/// The value is true or false. The default value is true for new accelerators. </p>
/// <p>If the value is set to true, the client's IP address is preserved in the <code>X-Forwarded-For</code> request header as
/// traffic travels to applications on the Application Load Balancer endpoint fronted by the accelerator.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/preserve-client-ip-address.html">
/// Preserve Client IP Addresses in AWS Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub client_ip_preservation_enabled: std::option::Option<bool>,
}
impl EndpointConfiguration {
/// <p>An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon
/// Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP address
/// allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. A resource must be valid and active
/// when you add it as an endpoint.</p>
/// <p>An Application Load Balancer can be either internal or internet-facing.</p>
pub fn endpoint_id(&self) -> std::option::Option<&str> {
self.endpoint_id.as_deref()
}
/// <p>The weight associated with the endpoint. When you add weights to endpoints, you configure AWS Global Accelerator to route traffic
/// based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The
/// result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is routed both to the second
/// and third endpoints, and 6/20 is routed to the last endpoint. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html">Endpoint Weights</a> in the
/// <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn weight(&self) -> std::option::Option<i32> {
self.weight
}
/// <p>Indicates whether client IP address preservation is enabled for an Application Load Balancer endpoint.
/// The value is true or false. The default value is true for new accelerators. </p>
/// <p>If the value is set to true, the client's IP address is preserved in the <code>X-Forwarded-For</code> request header as
/// traffic travels to applications on the Application Load Balancer endpoint fronted by the accelerator.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/preserve-client-ip-address.html">
/// Preserve Client IP Addresses in AWS Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn client_ip_preservation_enabled(&self) -> std::option::Option<bool> {
self.client_ip_preservation_enabled
}
}
impl std::fmt::Debug for EndpointConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EndpointConfiguration");
formatter.field("endpoint_id", &self.endpoint_id);
formatter.field("weight", &self.weight);
formatter.field(
"client_ip_preservation_enabled",
&self.client_ip_preservation_enabled,
);
formatter.finish()
}
}
/// See [`EndpointConfiguration`](crate::model::EndpointConfiguration)
pub mod endpoint_configuration {
/// A builder for [`EndpointConfiguration`](crate::model::EndpointConfiguration)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) endpoint_id: std::option::Option<std::string::String>,
pub(crate) weight: std::option::Option<i32>,
pub(crate) client_ip_preservation_enabled: std::option::Option<bool>,
}
impl Builder {
/// <p>An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon
/// Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP address
/// allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. A resource must be valid and active
/// when you add it as an endpoint.</p>
/// <p>An Application Load Balancer can be either internal or internet-facing.</p>
pub fn endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_id = Some(input.into());
self
}
/// <p>An ID for the endpoint. If the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon
/// Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP address
/// allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. A resource must be valid and active
/// when you add it as an endpoint.</p>
/// <p>An Application Load Balancer can be either internal or internet-facing.</p>
pub fn set_endpoint_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_id = input;
self
}
/// <p>The weight associated with the endpoint. When you add weights to endpoints, you configure AWS Global Accelerator to route traffic
/// based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The
/// result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is routed both to the second
/// and third endpoints, and 6/20 is routed to the last endpoint. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html">Endpoint Weights</a> in the
/// <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn weight(mut self, input: i32) -> Self {
self.weight = Some(input);
self
}
/// <p>The weight associated with the endpoint. When you add weights to endpoints, you configure AWS Global Accelerator to route traffic
/// based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The
/// result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is routed both to the second
/// and third endpoints, and 6/20 is routed to the last endpoint. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html">Endpoint Weights</a> in the
/// <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn set_weight(mut self, input: std::option::Option<i32>) -> Self {
self.weight = input;
self
}
/// <p>Indicates whether client IP address preservation is enabled for an Application Load Balancer endpoint.
/// The value is true or false. The default value is true for new accelerators. </p>
/// <p>If the value is set to true, the client's IP address is preserved in the <code>X-Forwarded-For</code> request header as
/// traffic travels to applications on the Application Load Balancer endpoint fronted by the accelerator.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/preserve-client-ip-address.html">
/// Preserve Client IP Addresses in AWS Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn client_ip_preservation_enabled(mut self, input: bool) -> Self {
self.client_ip_preservation_enabled = Some(input);
self
}
/// <p>Indicates whether client IP address preservation is enabled for an Application Load Balancer endpoint.
/// The value is true or false. The default value is true for new accelerators. </p>
/// <p>If the value is set to true, the client's IP address is preserved in the <code>X-Forwarded-For</code> request header as
/// traffic travels to applications on the Application Load Balancer endpoint fronted by the accelerator.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/preserve-client-ip-address.html">
/// Preserve Client IP Addresses in AWS Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn set_client_ip_preservation_enabled(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.client_ip_preservation_enabled = input;
self
}
/// Consumes the builder and constructs a [`EndpointConfiguration`](crate::model::EndpointConfiguration)
pub fn build(self) -> crate::model::EndpointConfiguration {
crate::model::EndpointConfiguration {
endpoint_id: self.endpoint_id,
weight: self.weight,
client_ip_preservation_enabled: self.client_ip_preservation_enabled,
}
}
}
}
impl EndpointConfiguration {
/// Creates a new builder-style object to manufacture [`EndpointConfiguration`](crate::model::EndpointConfiguration)
pub fn builder() -> crate::model::endpoint_configuration::Builder {
crate::model::endpoint_configuration::Builder::default()
}
}
/// <p>A complex type for a listener for a custom routing accelerator.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CustomRoutingListener {
/// <p>The Amazon Resource Name (ARN) of the listener.</p>
pub listener_arn: std::option::Option<std::string::String>,
/// <p>The port range to support for connections from clients to your accelerator.</p>
/// <p>Separately, you set port ranges for endpoints. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-custom-routing-endpoints.html">About
/// endpoints for custom routing accelerators</a>.</p>
pub port_ranges: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
}
impl CustomRoutingListener {
/// <p>The Amazon Resource Name (ARN) of the listener.</p>
pub fn listener_arn(&self) -> std::option::Option<&str> {
self.listener_arn.as_deref()
}
/// <p>The port range to support for connections from clients to your accelerator.</p>
/// <p>Separately, you set port ranges for endpoints. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-custom-routing-endpoints.html">About
/// endpoints for custom routing accelerators</a>.</p>
pub fn port_ranges(&self) -> std::option::Option<&[crate::model::PortRange]> {
self.port_ranges.as_deref()
}
}
impl std::fmt::Debug for CustomRoutingListener {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CustomRoutingListener");
formatter.field("listener_arn", &self.listener_arn);
formatter.field("port_ranges", &self.port_ranges);
formatter.finish()
}
}
/// See [`CustomRoutingListener`](crate::model::CustomRoutingListener)
pub mod custom_routing_listener {
/// A builder for [`CustomRoutingListener`](crate::model::CustomRoutingListener)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) listener_arn: std::option::Option<std::string::String>,
pub(crate) port_ranges: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the listener.</p>
pub fn listener_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.listener_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the listener.</p>
pub fn set_listener_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.listener_arn = input;
self
}
/// Appends an item to `port_ranges`.
///
/// To override the contents of this collection use [`set_port_ranges`](Self::set_port_ranges).
///
/// <p>The port range to support for connections from clients to your accelerator.</p>
/// <p>Separately, you set port ranges for endpoints. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-custom-routing-endpoints.html">About
/// endpoints for custom routing accelerators</a>.</p>
pub fn port_ranges(mut self, input: impl Into<crate::model::PortRange>) -> Self {
let mut v = self.port_ranges.unwrap_or_default();
v.push(input.into());
self.port_ranges = Some(v);
self
}
/// <p>The port range to support for connections from clients to your accelerator.</p>
/// <p>Separately, you set port ranges for endpoints. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-custom-routing-endpoints.html">About
/// endpoints for custom routing accelerators</a>.</p>
pub fn set_port_ranges(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PortRange>>,
) -> Self {
self.port_ranges = input;
self
}
/// Consumes the builder and constructs a [`CustomRoutingListener`](crate::model::CustomRoutingListener)
pub fn build(self) -> crate::model::CustomRoutingListener {
crate::model::CustomRoutingListener {
listener_arn: self.listener_arn,
port_ranges: self.port_ranges,
}
}
}
}
impl CustomRoutingListener {
/// Creates a new builder-style object to manufacture [`CustomRoutingListener`](crate::model::CustomRoutingListener)
pub fn builder() -> crate::model::custom_routing_listener::Builder {
crate::model::custom_routing_listener::Builder::default()
}
}
/// <p>Attributes of a custom routing accelerator.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CustomRoutingAcceleratorAttributes {
/// <p>Indicates whether flow logs are enabled. The default value is false. If the value is true,
/// <code>FlowLogsS3Bucket</code> and <code>FlowLogsS3Prefix</code> must be specified.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html">Flow Logs</a> in
/// the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub flow_logs_enabled: std::option::Option<bool>,
/// <p>The name of the Amazon S3 bucket for the flow logs. Attribute is required if <code>FlowLogsEnabled</code> is
/// <code>true</code>. The bucket must exist and have a bucket policy that grants AWS Global Accelerator permission to write to the
/// bucket.</p>
pub flow_logs_s3_bucket: std::option::Option<std::string::String>,
/// <p>The prefix for the location in the Amazon S3 bucket for the flow logs. Attribute is required if
/// <code>FlowLogsEnabled</code> is <code>true</code>.</p>
/// <p>If you don’t specify a prefix, the flow logs are stored in the
/// root of the bucket. If you specify slash (/) for the S3 bucket prefix, the log file bucket folder structure will include a double slash (//), like the following:</p>
/// <p>DOC-EXAMPLE-BUCKET//AWSLogs/aws_account_id</p>
pub flow_logs_s3_prefix: std::option::Option<std::string::String>,
}
impl CustomRoutingAcceleratorAttributes {
/// <p>Indicates whether flow logs are enabled. The default value is false. If the value is true,
/// <code>FlowLogsS3Bucket</code> and <code>FlowLogsS3Prefix</code> must be specified.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html">Flow Logs</a> in
/// the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn flow_logs_enabled(&self) -> std::option::Option<bool> {
self.flow_logs_enabled
}
/// <p>The name of the Amazon S3 bucket for the flow logs. Attribute is required if <code>FlowLogsEnabled</code> is
/// <code>true</code>. The bucket must exist and have a bucket policy that grants AWS Global Accelerator permission to write to the
/// bucket.</p>
pub fn flow_logs_s3_bucket(&self) -> std::option::Option<&str> {
self.flow_logs_s3_bucket.as_deref()
}
/// <p>The prefix for the location in the Amazon S3 bucket for the flow logs. Attribute is required if
/// <code>FlowLogsEnabled</code> is <code>true</code>.</p>
/// <p>If you don’t specify a prefix, the flow logs are stored in the
/// root of the bucket. If you specify slash (/) for the S3 bucket prefix, the log file bucket folder structure will include a double slash (//), like the following:</p>
/// <p>DOC-EXAMPLE-BUCKET//AWSLogs/aws_account_id</p>
pub fn flow_logs_s3_prefix(&self) -> std::option::Option<&str> {
self.flow_logs_s3_prefix.as_deref()
}
}
impl std::fmt::Debug for CustomRoutingAcceleratorAttributes {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CustomRoutingAcceleratorAttributes");
formatter.field("flow_logs_enabled", &self.flow_logs_enabled);
formatter.field("flow_logs_s3_bucket", &self.flow_logs_s3_bucket);
formatter.field("flow_logs_s3_prefix", &self.flow_logs_s3_prefix);
formatter.finish()
}
}
/// See [`CustomRoutingAcceleratorAttributes`](crate::model::CustomRoutingAcceleratorAttributes)
pub mod custom_routing_accelerator_attributes {
/// A builder for [`CustomRoutingAcceleratorAttributes`](crate::model::CustomRoutingAcceleratorAttributes)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) flow_logs_enabled: std::option::Option<bool>,
pub(crate) flow_logs_s3_bucket: std::option::Option<std::string::String>,
pub(crate) flow_logs_s3_prefix: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>Indicates whether flow logs are enabled. The default value is false. If the value is true,
/// <code>FlowLogsS3Bucket</code> and <code>FlowLogsS3Prefix</code> must be specified.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html">Flow Logs</a> in
/// the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn flow_logs_enabled(mut self, input: bool) -> Self {
self.flow_logs_enabled = Some(input);
self
}
/// <p>Indicates whether flow logs are enabled. The default value is false. If the value is true,
/// <code>FlowLogsS3Bucket</code> and <code>FlowLogsS3Prefix</code> must be specified.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html">Flow Logs</a> in
/// the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn set_flow_logs_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.flow_logs_enabled = input;
self
}
/// <p>The name of the Amazon S3 bucket for the flow logs. Attribute is required if <code>FlowLogsEnabled</code> is
/// <code>true</code>. The bucket must exist and have a bucket policy that grants AWS Global Accelerator permission to write to the
/// bucket.</p>
pub fn flow_logs_s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.flow_logs_s3_bucket = Some(input.into());
self
}
/// <p>The name of the Amazon S3 bucket for the flow logs. Attribute is required if <code>FlowLogsEnabled</code> is
/// <code>true</code>. The bucket must exist and have a bucket policy that grants AWS Global Accelerator permission to write to the
/// bucket.</p>
pub fn set_flow_logs_s3_bucket(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.flow_logs_s3_bucket = input;
self
}
/// <p>The prefix for the location in the Amazon S3 bucket for the flow logs. Attribute is required if
/// <code>FlowLogsEnabled</code> is <code>true</code>.</p>
/// <p>If you don’t specify a prefix, the flow logs are stored in the
/// root of the bucket. If you specify slash (/) for the S3 bucket prefix, the log file bucket folder structure will include a double slash (//), like the following:</p>
/// <p>DOC-EXAMPLE-BUCKET//AWSLogs/aws_account_id</p>
pub fn flow_logs_s3_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.flow_logs_s3_prefix = Some(input.into());
self
}
/// <p>The prefix for the location in the Amazon S3 bucket for the flow logs. Attribute is required if
/// <code>FlowLogsEnabled</code> is <code>true</code>.</p>
/// <p>If you don’t specify a prefix, the flow logs are stored in the
/// root of the bucket. If you specify slash (/) for the S3 bucket prefix, the log file bucket folder structure will include a double slash (//), like the following:</p>
/// <p>DOC-EXAMPLE-BUCKET//AWSLogs/aws_account_id</p>
pub fn set_flow_logs_s3_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.flow_logs_s3_prefix = input;
self
}
/// Consumes the builder and constructs a [`CustomRoutingAcceleratorAttributes`](crate::model::CustomRoutingAcceleratorAttributes)
pub fn build(self) -> crate::model::CustomRoutingAcceleratorAttributes {
crate::model::CustomRoutingAcceleratorAttributes {
flow_logs_enabled: self.flow_logs_enabled,
flow_logs_s3_bucket: self.flow_logs_s3_bucket,
flow_logs_s3_prefix: self.flow_logs_s3_prefix,
}
}
}
}
impl CustomRoutingAcceleratorAttributes {
/// Creates a new builder-style object to manufacture [`CustomRoutingAcceleratorAttributes`](crate::model::CustomRoutingAcceleratorAttributes)
pub fn builder() -> crate::model::custom_routing_accelerator_attributes::Builder {
crate::model::custom_routing_accelerator_attributes::Builder::default()
}
}
/// <p>Attributes of a custom routing accelerator.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CustomRoutingAccelerator {
/// <p>The Amazon Resource Name (ARN) of the custom routing accelerator.</p>
pub accelerator_arn: std::option::Option<std::string::String>,
/// <p>The name of the accelerator. The name must contain only alphanumeric characters or
/// hyphens (-), and must not begin or end with a hyphen.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The value for the address type must be IPv4.</p>
pub ip_address_type: std::option::Option<crate::model::IpAddressType>,
/// <p>Indicates whether the accelerator is enabled. The value is true or false. The default value is true. </p>
/// <p>If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted.</p>
pub enabled: std::option::Option<bool>,
/// <p>The static IP addresses that Global Accelerator associates with the accelerator.</p>
pub ip_sets: std::option::Option<std::vec::Vec<crate::model::IpSet>>,
/// <p>The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses. </p>
/// <p>The naming convention for the DNS name is the following: A lowercase letter a,
/// followed by a 16-bit random hex string, followed by .awsglobalaccelerator.com. For example:
/// a1234567890abcdef.awsglobalaccelerator.com.</p>
/// <p>For more information about the default DNS name, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-accelerators.html#about-accelerators.dns-addressing">
/// Support for DNS Addressing in Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub dns_name: std::option::Option<std::string::String>,
/// <p>Describes the deployment status of the accelerator.</p>
pub status: std::option::Option<crate::model::CustomRoutingAcceleratorStatus>,
/// <p>The date and time that the accelerator was created.</p>
pub created_time: std::option::Option<aws_smithy_types::Instant>,
/// <p>The date and time that the accelerator was last modified.</p>
pub last_modified_time: std::option::Option<aws_smithy_types::Instant>,
}
impl CustomRoutingAccelerator {
/// <p>The Amazon Resource Name (ARN) of the custom routing accelerator.</p>
pub fn accelerator_arn(&self) -> std::option::Option<&str> {
self.accelerator_arn.as_deref()
}
/// <p>The name of the accelerator. The name must contain only alphanumeric characters or
/// hyphens (-), and must not begin or end with a hyphen.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The value for the address type must be IPv4.</p>
pub fn ip_address_type(&self) -> std::option::Option<&crate::model::IpAddressType> {
self.ip_address_type.as_ref()
}
/// <p>Indicates whether the accelerator is enabled. The value is true or false. The default value is true. </p>
/// <p>If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted.</p>
pub fn enabled(&self) -> std::option::Option<bool> {
self.enabled
}
/// <p>The static IP addresses that Global Accelerator associates with the accelerator.</p>
pub fn ip_sets(&self) -> std::option::Option<&[crate::model::IpSet]> {
self.ip_sets.as_deref()
}
/// <p>The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses. </p>
/// <p>The naming convention for the DNS name is the following: A lowercase letter a,
/// followed by a 16-bit random hex string, followed by .awsglobalaccelerator.com. For example:
/// a1234567890abcdef.awsglobalaccelerator.com.</p>
/// <p>For more information about the default DNS name, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-accelerators.html#about-accelerators.dns-addressing">
/// Support for DNS Addressing in Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn dns_name(&self) -> std::option::Option<&str> {
self.dns_name.as_deref()
}
/// <p>Describes the deployment status of the accelerator.</p>
pub fn status(&self) -> std::option::Option<&crate::model::CustomRoutingAcceleratorStatus> {
self.status.as_ref()
}
/// <p>The date and time that the accelerator was created.</p>
pub fn created_time(&self) -> std::option::Option<&aws_smithy_types::Instant> {
self.created_time.as_ref()
}
/// <p>The date and time that the accelerator was last modified.</p>
pub fn last_modified_time(&self) -> std::option::Option<&aws_smithy_types::Instant> {
self.last_modified_time.as_ref()
}
}
impl std::fmt::Debug for CustomRoutingAccelerator {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CustomRoutingAccelerator");
formatter.field("accelerator_arn", &self.accelerator_arn);
formatter.field("name", &self.name);
formatter.field("ip_address_type", &self.ip_address_type);
formatter.field("enabled", &self.enabled);
formatter.field("ip_sets", &self.ip_sets);
formatter.field("dns_name", &self.dns_name);
formatter.field("status", &self.status);
formatter.field("created_time", &self.created_time);
formatter.field("last_modified_time", &self.last_modified_time);
formatter.finish()
}
}
/// See [`CustomRoutingAccelerator`](crate::model::CustomRoutingAccelerator)
pub mod custom_routing_accelerator {
/// A builder for [`CustomRoutingAccelerator`](crate::model::CustomRoutingAccelerator)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) accelerator_arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) ip_address_type: std::option::Option<crate::model::IpAddressType>,
pub(crate) enabled: std::option::Option<bool>,
pub(crate) ip_sets: std::option::Option<std::vec::Vec<crate::model::IpSet>>,
pub(crate) dns_name: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::CustomRoutingAcceleratorStatus>,
pub(crate) created_time: std::option::Option<aws_smithy_types::Instant>,
pub(crate) last_modified_time: std::option::Option<aws_smithy_types::Instant>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the custom routing accelerator.</p>
pub fn accelerator_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.accelerator_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the custom routing accelerator.</p>
pub fn set_accelerator_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.accelerator_arn = input;
self
}
/// <p>The name of the accelerator. The name must contain only alphanumeric characters or
/// hyphens (-), and must not begin or end with a hyphen.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the accelerator. The name must contain only alphanumeric characters or
/// hyphens (-), and must not begin or end with a hyphen.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The value for the address type must be IPv4.</p>
pub fn ip_address_type(mut self, input: crate::model::IpAddressType) -> Self {
self.ip_address_type = Some(input);
self
}
/// <p>The value for the address type must be IPv4.</p>
pub fn set_ip_address_type(
mut self,
input: std::option::Option<crate::model::IpAddressType>,
) -> Self {
self.ip_address_type = input;
self
}
/// <p>Indicates whether the accelerator is enabled. The value is true or false. The default value is true. </p>
/// <p>If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted.</p>
pub fn enabled(mut self, input: bool) -> Self {
self.enabled = Some(input);
self
}
/// <p>Indicates whether the accelerator is enabled. The value is true or false. The default value is true. </p>
/// <p>If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted.</p>
pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.enabled = input;
self
}
/// Appends an item to `ip_sets`.
///
/// To override the contents of this collection use [`set_ip_sets`](Self::set_ip_sets).
///
/// <p>The static IP addresses that Global Accelerator associates with the accelerator.</p>
pub fn ip_sets(mut self, input: impl Into<crate::model::IpSet>) -> Self {
let mut v = self.ip_sets.unwrap_or_default();
v.push(input.into());
self.ip_sets = Some(v);
self
}
/// <p>The static IP addresses that Global Accelerator associates with the accelerator.</p>
pub fn set_ip_sets(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::IpSet>>,
) -> Self {
self.ip_sets = input;
self
}
/// <p>The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses. </p>
/// <p>The naming convention for the DNS name is the following: A lowercase letter a,
/// followed by a 16-bit random hex string, followed by .awsglobalaccelerator.com. For example:
/// a1234567890abcdef.awsglobalaccelerator.com.</p>
/// <p>For more information about the default DNS name, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-accelerators.html#about-accelerators.dns-addressing">
/// Support for DNS Addressing in Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn dns_name(mut self, input: impl Into<std::string::String>) -> Self {
self.dns_name = Some(input.into());
self
}
/// <p>The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses. </p>
/// <p>The naming convention for the DNS name is the following: A lowercase letter a,
/// followed by a 16-bit random hex string, followed by .awsglobalaccelerator.com. For example:
/// a1234567890abcdef.awsglobalaccelerator.com.</p>
/// <p>For more information about the default DNS name, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-accelerators.html#about-accelerators.dns-addressing">
/// Support for DNS Addressing in Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn set_dns_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.dns_name = input;
self
}
/// <p>Describes the deployment status of the accelerator.</p>
pub fn status(mut self, input: crate::model::CustomRoutingAcceleratorStatus) -> Self {
self.status = Some(input);
self
}
/// <p>Describes the deployment status of the accelerator.</p>
pub fn set_status(
mut self,
input: std::option::Option<crate::model::CustomRoutingAcceleratorStatus>,
) -> Self {
self.status = input;
self
}
/// <p>The date and time that the accelerator was created.</p>
pub fn created_time(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_time = Some(input);
self
}
/// <p>The date and time that the accelerator was created.</p>
pub fn set_created_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_time = input;
self
}
/// <p>The date and time that the accelerator was last modified.</p>
pub fn last_modified_time(mut self, input: aws_smithy_types::Instant) -> Self {
self.last_modified_time = Some(input);
self
}
/// <p>The date and time that the accelerator was last modified.</p>
pub fn set_last_modified_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.last_modified_time = input;
self
}
/// Consumes the builder and constructs a [`CustomRoutingAccelerator`](crate::model::CustomRoutingAccelerator)
pub fn build(self) -> crate::model::CustomRoutingAccelerator {
crate::model::CustomRoutingAccelerator {
accelerator_arn: self.accelerator_arn,
name: self.name,
ip_address_type: self.ip_address_type,
enabled: self.enabled,
ip_sets: self.ip_sets,
dns_name: self.dns_name,
status: self.status,
created_time: self.created_time,
last_modified_time: self.last_modified_time,
}
}
}
}
impl CustomRoutingAccelerator {
/// Creates a new builder-style object to manufacture [`CustomRoutingAccelerator`](crate::model::CustomRoutingAccelerator)
pub fn builder() -> crate::model::custom_routing_accelerator::Builder {
crate::model::custom_routing_accelerator::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CustomRoutingAcceleratorStatus {
#[allow(missing_docs)] // documentation missing in model
Deployed,
#[allow(missing_docs)] // documentation missing in model
InProgress,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CustomRoutingAcceleratorStatus {
fn from(s: &str) -> Self {
match s {
"DEPLOYED" => CustomRoutingAcceleratorStatus::Deployed,
"IN_PROGRESS" => CustomRoutingAcceleratorStatus::InProgress,
other => CustomRoutingAcceleratorStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CustomRoutingAcceleratorStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CustomRoutingAcceleratorStatus::from(s))
}
}
impl CustomRoutingAcceleratorStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CustomRoutingAcceleratorStatus::Deployed => "DEPLOYED",
CustomRoutingAcceleratorStatus::InProgress => "IN_PROGRESS",
CustomRoutingAcceleratorStatus::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DEPLOYED", "IN_PROGRESS"]
}
}
impl AsRef<str> for CustomRoutingAcceleratorStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>A complex type for the set of IP addresses for an accelerator.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct IpSet {
/// <p>The types of IP addresses included in this IP set.</p>
pub ip_family: std::option::Option<std::string::String>,
/// <p>The array of IP addresses in the IP address set. An IP address set can have a maximum of two IP addresses.</p>
pub ip_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl IpSet {
/// <p>The types of IP addresses included in this IP set.</p>
pub fn ip_family(&self) -> std::option::Option<&str> {
self.ip_family.as_deref()
}
/// <p>The array of IP addresses in the IP address set. An IP address set can have a maximum of two IP addresses.</p>
pub fn ip_addresses(&self) -> std::option::Option<&[std::string::String]> {
self.ip_addresses.as_deref()
}
}
impl std::fmt::Debug for IpSet {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("IpSet");
formatter.field("ip_family", &self.ip_family);
formatter.field("ip_addresses", &self.ip_addresses);
formatter.finish()
}
}
/// See [`IpSet`](crate::model::IpSet)
pub mod ip_set {
/// A builder for [`IpSet`](crate::model::IpSet)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ip_family: std::option::Option<std::string::String>,
pub(crate) ip_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
/// <p>The types of IP addresses included in this IP set.</p>
pub fn ip_family(mut self, input: impl Into<std::string::String>) -> Self {
self.ip_family = Some(input.into());
self
}
/// <p>The types of IP addresses included in this IP set.</p>
pub fn set_ip_family(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ip_family = input;
self
}
/// Appends an item to `ip_addresses`.
///
/// To override the contents of this collection use [`set_ip_addresses`](Self::set_ip_addresses).
///
/// <p>The array of IP addresses in the IP address set. An IP address set can have a maximum of two IP addresses.</p>
pub fn ip_addresses(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.ip_addresses.unwrap_or_default();
v.push(input.into());
self.ip_addresses = Some(v);
self
}
/// <p>The array of IP addresses in the IP address set. An IP address set can have a maximum of two IP addresses.</p>
pub fn set_ip_addresses(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.ip_addresses = input;
self
}
/// Consumes the builder and constructs a [`IpSet`](crate::model::IpSet)
pub fn build(self) -> crate::model::IpSet {
crate::model::IpSet {
ip_family: self.ip_family,
ip_addresses: self.ip_addresses,
}
}
}
}
impl IpSet {
/// Creates a new builder-style object to manufacture [`IpSet`](crate::model::IpSet)
pub fn builder() -> crate::model::ip_set::Builder {
crate::model::ip_set::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum IpAddressType {
#[allow(missing_docs)] // documentation missing in model
Ipv4,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for IpAddressType {
fn from(s: &str) -> Self {
match s {
"IPV4" => IpAddressType::Ipv4,
other => IpAddressType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for IpAddressType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(IpAddressType::from(s))
}
}
impl IpAddressType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
IpAddressType::Ipv4 => "IPV4",
IpAddressType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["IPV4"]
}
}
impl AsRef<str> for IpAddressType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Attributes of an accelerator.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AcceleratorAttributes {
/// <p>Indicates whether flow logs are enabled. The default value is false. If the value is true,
/// <code>FlowLogsS3Bucket</code> and <code>FlowLogsS3Prefix</code> must be specified.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html">Flow Logs</a> in
/// the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub flow_logs_enabled: std::option::Option<bool>,
/// <p>The name of the Amazon S3 bucket for the flow logs. Attribute is required if <code>FlowLogsEnabled</code> is
/// <code>true</code>. The bucket must exist and have a bucket policy that grants AWS Global Accelerator permission to write to the
/// bucket.</p>
pub flow_logs_s3_bucket: std::option::Option<std::string::String>,
/// <p>The prefix for the location in the Amazon S3 bucket for the flow logs. Attribute is required if
/// <code>FlowLogsEnabled</code> is <code>true</code>.</p>
/// <p>If you don’t specify a prefix, the flow logs are stored in the
/// root of the bucket. If you specify slash (/) for the S3 bucket prefix, the log file bucket folder structure will include a double slash (//), like the following:</p>
/// <p>s3-bucket_name//AWSLogs/aws_account_id</p>
pub flow_logs_s3_prefix: std::option::Option<std::string::String>,
}
impl AcceleratorAttributes {
/// <p>Indicates whether flow logs are enabled. The default value is false. If the value is true,
/// <code>FlowLogsS3Bucket</code> and <code>FlowLogsS3Prefix</code> must be specified.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html">Flow Logs</a> in
/// the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn flow_logs_enabled(&self) -> std::option::Option<bool> {
self.flow_logs_enabled
}
/// <p>The name of the Amazon S3 bucket for the flow logs. Attribute is required if <code>FlowLogsEnabled</code> is
/// <code>true</code>. The bucket must exist and have a bucket policy that grants AWS Global Accelerator permission to write to the
/// bucket.</p>
pub fn flow_logs_s3_bucket(&self) -> std::option::Option<&str> {
self.flow_logs_s3_bucket.as_deref()
}
/// <p>The prefix for the location in the Amazon S3 bucket for the flow logs. Attribute is required if
/// <code>FlowLogsEnabled</code> is <code>true</code>.</p>
/// <p>If you don’t specify a prefix, the flow logs are stored in the
/// root of the bucket. If you specify slash (/) for the S3 bucket prefix, the log file bucket folder structure will include a double slash (//), like the following:</p>
/// <p>s3-bucket_name//AWSLogs/aws_account_id</p>
pub fn flow_logs_s3_prefix(&self) -> std::option::Option<&str> {
self.flow_logs_s3_prefix.as_deref()
}
}
impl std::fmt::Debug for AcceleratorAttributes {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AcceleratorAttributes");
formatter.field("flow_logs_enabled", &self.flow_logs_enabled);
formatter.field("flow_logs_s3_bucket", &self.flow_logs_s3_bucket);
formatter.field("flow_logs_s3_prefix", &self.flow_logs_s3_prefix);
formatter.finish()
}
}
/// See [`AcceleratorAttributes`](crate::model::AcceleratorAttributes)
pub mod accelerator_attributes {
/// A builder for [`AcceleratorAttributes`](crate::model::AcceleratorAttributes)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) flow_logs_enabled: std::option::Option<bool>,
pub(crate) flow_logs_s3_bucket: std::option::Option<std::string::String>,
pub(crate) flow_logs_s3_prefix: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>Indicates whether flow logs are enabled. The default value is false. If the value is true,
/// <code>FlowLogsS3Bucket</code> and <code>FlowLogsS3Prefix</code> must be specified.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html">Flow Logs</a> in
/// the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn flow_logs_enabled(mut self, input: bool) -> Self {
self.flow_logs_enabled = Some(input);
self
}
/// <p>Indicates whether flow logs are enabled. The default value is false. If the value is true,
/// <code>FlowLogsS3Bucket</code> and <code>FlowLogsS3Prefix</code> must be specified.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html">Flow Logs</a> in
/// the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn set_flow_logs_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.flow_logs_enabled = input;
self
}
/// <p>The name of the Amazon S3 bucket for the flow logs. Attribute is required if <code>FlowLogsEnabled</code> is
/// <code>true</code>. The bucket must exist and have a bucket policy that grants AWS Global Accelerator permission to write to the
/// bucket.</p>
pub fn flow_logs_s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.flow_logs_s3_bucket = Some(input.into());
self
}
/// <p>The name of the Amazon S3 bucket for the flow logs. Attribute is required if <code>FlowLogsEnabled</code> is
/// <code>true</code>. The bucket must exist and have a bucket policy that grants AWS Global Accelerator permission to write to the
/// bucket.</p>
pub fn set_flow_logs_s3_bucket(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.flow_logs_s3_bucket = input;
self
}
/// <p>The prefix for the location in the Amazon S3 bucket for the flow logs. Attribute is required if
/// <code>FlowLogsEnabled</code> is <code>true</code>.</p>
/// <p>If you don’t specify a prefix, the flow logs are stored in the
/// root of the bucket. If you specify slash (/) for the S3 bucket prefix, the log file bucket folder structure will include a double slash (//), like the following:</p>
/// <p>s3-bucket_name//AWSLogs/aws_account_id</p>
pub fn flow_logs_s3_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.flow_logs_s3_prefix = Some(input.into());
self
}
/// <p>The prefix for the location in the Amazon S3 bucket for the flow logs. Attribute is required if
/// <code>FlowLogsEnabled</code> is <code>true</code>.</p>
/// <p>If you don’t specify a prefix, the flow logs are stored in the
/// root of the bucket. If you specify slash (/) for the S3 bucket prefix, the log file bucket folder structure will include a double slash (//), like the following:</p>
/// <p>s3-bucket_name//AWSLogs/aws_account_id</p>
pub fn set_flow_logs_s3_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.flow_logs_s3_prefix = input;
self
}
/// Consumes the builder and constructs a [`AcceleratorAttributes`](crate::model::AcceleratorAttributes)
pub fn build(self) -> crate::model::AcceleratorAttributes {
crate::model::AcceleratorAttributes {
flow_logs_enabled: self.flow_logs_enabled,
flow_logs_s3_bucket: self.flow_logs_s3_bucket,
flow_logs_s3_prefix: self.flow_logs_s3_prefix,
}
}
}
}
impl AcceleratorAttributes {
/// Creates a new builder-style object to manufacture [`AcceleratorAttributes`](crate::model::AcceleratorAttributes)
pub fn builder() -> crate::model::accelerator_attributes::Builder {
crate::model::accelerator_attributes::Builder::default()
}
}
/// <p>An accelerator is a complex type that includes one or more listeners that process inbound connections and then direct
/// traffic to one or more endpoint groups, each of which includes endpoints, such as load balancers.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Accelerator {
/// <p>The Amazon Resource Name (ARN) of the accelerator.</p>
pub accelerator_arn: std::option::Option<std::string::String>,
/// <p>The name of the accelerator. The name must contain only alphanumeric characters or
/// hyphens (-), and must not begin or end with a hyphen.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The value for the address type must be IPv4.
/// </p>
pub ip_address_type: std::option::Option<crate::model::IpAddressType>,
/// <p>Indicates whether the accelerator is enabled. The value is true or false. The default value is true. </p>
/// <p>If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted.</p>
pub enabled: std::option::Option<bool>,
/// <p>The static IP addresses that Global Accelerator associates with the accelerator.</p>
pub ip_sets: std::option::Option<std::vec::Vec<crate::model::IpSet>>,
/// <p>The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses. </p>
/// <p>The naming convention for the DNS name is the following: A lowercase letter a,
/// followed by a 16-bit random hex string, followed by .awsglobalaccelerator.com. For example:
/// a1234567890abcdef.awsglobalaccelerator.com.</p>
/// <p>For more information about the default DNS name, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-accelerators.html#about-accelerators.dns-addressing">
/// Support for DNS Addressing in Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub dns_name: std::option::Option<std::string::String>,
/// <p>Describes the deployment status of the accelerator.</p>
pub status: std::option::Option<crate::model::AcceleratorStatus>,
/// <p>The date and time that the accelerator was created.</p>
pub created_time: std::option::Option<aws_smithy_types::Instant>,
/// <p>The date and time that the accelerator was last modified.</p>
pub last_modified_time: std::option::Option<aws_smithy_types::Instant>,
}
impl Accelerator {
/// <p>The Amazon Resource Name (ARN) of the accelerator.</p>
pub fn accelerator_arn(&self) -> std::option::Option<&str> {
self.accelerator_arn.as_deref()
}
/// <p>The name of the accelerator. The name must contain only alphanumeric characters or
/// hyphens (-), and must not begin or end with a hyphen.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The value for the address type must be IPv4.
/// </p>
pub fn ip_address_type(&self) -> std::option::Option<&crate::model::IpAddressType> {
self.ip_address_type.as_ref()
}
/// <p>Indicates whether the accelerator is enabled. The value is true or false. The default value is true. </p>
/// <p>If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted.</p>
pub fn enabled(&self) -> std::option::Option<bool> {
self.enabled
}
/// <p>The static IP addresses that Global Accelerator associates with the accelerator.</p>
pub fn ip_sets(&self) -> std::option::Option<&[crate::model::IpSet]> {
self.ip_sets.as_deref()
}
/// <p>The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses. </p>
/// <p>The naming convention for the DNS name is the following: A lowercase letter a,
/// followed by a 16-bit random hex string, followed by .awsglobalaccelerator.com. For example:
/// a1234567890abcdef.awsglobalaccelerator.com.</p>
/// <p>For more information about the default DNS name, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-accelerators.html#about-accelerators.dns-addressing">
/// Support for DNS Addressing in Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn dns_name(&self) -> std::option::Option<&str> {
self.dns_name.as_deref()
}
/// <p>Describes the deployment status of the accelerator.</p>
pub fn status(&self) -> std::option::Option<&crate::model::AcceleratorStatus> {
self.status.as_ref()
}
/// <p>The date and time that the accelerator was created.</p>
pub fn created_time(&self) -> std::option::Option<&aws_smithy_types::Instant> {
self.created_time.as_ref()
}
/// <p>The date and time that the accelerator was last modified.</p>
pub fn last_modified_time(&self) -> std::option::Option<&aws_smithy_types::Instant> {
self.last_modified_time.as_ref()
}
}
impl std::fmt::Debug for Accelerator {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Accelerator");
formatter.field("accelerator_arn", &self.accelerator_arn);
formatter.field("name", &self.name);
formatter.field("ip_address_type", &self.ip_address_type);
formatter.field("enabled", &self.enabled);
formatter.field("ip_sets", &self.ip_sets);
formatter.field("dns_name", &self.dns_name);
formatter.field("status", &self.status);
formatter.field("created_time", &self.created_time);
formatter.field("last_modified_time", &self.last_modified_time);
formatter.finish()
}
}
/// See [`Accelerator`](crate::model::Accelerator)
pub mod accelerator {
/// A builder for [`Accelerator`](crate::model::Accelerator)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) accelerator_arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) ip_address_type: std::option::Option<crate::model::IpAddressType>,
pub(crate) enabled: std::option::Option<bool>,
pub(crate) ip_sets: std::option::Option<std::vec::Vec<crate::model::IpSet>>,
pub(crate) dns_name: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::AcceleratorStatus>,
pub(crate) created_time: std::option::Option<aws_smithy_types::Instant>,
pub(crate) last_modified_time: std::option::Option<aws_smithy_types::Instant>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the accelerator.</p>
pub fn accelerator_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.accelerator_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the accelerator.</p>
pub fn set_accelerator_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.accelerator_arn = input;
self
}
/// <p>The name of the accelerator. The name must contain only alphanumeric characters or
/// hyphens (-), and must not begin or end with a hyphen.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the accelerator. The name must contain only alphanumeric characters or
/// hyphens (-), and must not begin or end with a hyphen.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The value for the address type must be IPv4.
/// </p>
pub fn ip_address_type(mut self, input: crate::model::IpAddressType) -> Self {
self.ip_address_type = Some(input);
self
}
/// <p>The value for the address type must be IPv4.
/// </p>
pub fn set_ip_address_type(
mut self,
input: std::option::Option<crate::model::IpAddressType>,
) -> Self {
self.ip_address_type = input;
self
}
/// <p>Indicates whether the accelerator is enabled. The value is true or false. The default value is true. </p>
/// <p>If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted.</p>
pub fn enabled(mut self, input: bool) -> Self {
self.enabled = Some(input);
self
}
/// <p>Indicates whether the accelerator is enabled. The value is true or false. The default value is true. </p>
/// <p>If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted.</p>
pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.enabled = input;
self
}
/// Appends an item to `ip_sets`.
///
/// To override the contents of this collection use [`set_ip_sets`](Self::set_ip_sets).
///
/// <p>The static IP addresses that Global Accelerator associates with the accelerator.</p>
pub fn ip_sets(mut self, input: impl Into<crate::model::IpSet>) -> Self {
let mut v = self.ip_sets.unwrap_or_default();
v.push(input.into());
self.ip_sets = Some(v);
self
}
/// <p>The static IP addresses that Global Accelerator associates with the accelerator.</p>
pub fn set_ip_sets(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::IpSet>>,
) -> Self {
self.ip_sets = input;
self
}
/// <p>The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses. </p>
/// <p>The naming convention for the DNS name is the following: A lowercase letter a,
/// followed by a 16-bit random hex string, followed by .awsglobalaccelerator.com. For example:
/// a1234567890abcdef.awsglobalaccelerator.com.</p>
/// <p>For more information about the default DNS name, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-accelerators.html#about-accelerators.dns-addressing">
/// Support for DNS Addressing in Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn dns_name(mut self, input: impl Into<std::string::String>) -> Self {
self.dns_name = Some(input.into());
self
}
/// <p>The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses. </p>
/// <p>The naming convention for the DNS name is the following: A lowercase letter a,
/// followed by a 16-bit random hex string, followed by .awsglobalaccelerator.com. For example:
/// a1234567890abcdef.awsglobalaccelerator.com.</p>
/// <p>For more information about the default DNS name, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/about-accelerators.html#about-accelerators.dns-addressing">
/// Support for DNS Addressing in Global Accelerator</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
pub fn set_dns_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.dns_name = input;
self
}
/// <p>Describes the deployment status of the accelerator.</p>
pub fn status(mut self, input: crate::model::AcceleratorStatus) -> Self {
self.status = Some(input);
self
}
/// <p>Describes the deployment status of the accelerator.</p>
pub fn set_status(
mut self,
input: std::option::Option<crate::model::AcceleratorStatus>,
) -> Self {
self.status = input;
self
}
/// <p>The date and time that the accelerator was created.</p>
pub fn created_time(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_time = Some(input);
self
}
/// <p>The date and time that the accelerator was created.</p>
pub fn set_created_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_time = input;
self
}
/// <p>The date and time that the accelerator was last modified.</p>
pub fn last_modified_time(mut self, input: aws_smithy_types::Instant) -> Self {
self.last_modified_time = Some(input);
self
}
/// <p>The date and time that the accelerator was last modified.</p>
pub fn set_last_modified_time(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.last_modified_time = input;
self
}
/// Consumes the builder and constructs a [`Accelerator`](crate::model::Accelerator)
pub fn build(self) -> crate::model::Accelerator {
crate::model::Accelerator {
accelerator_arn: self.accelerator_arn,
name: self.name,
ip_address_type: self.ip_address_type,
enabled: self.enabled,
ip_sets: self.ip_sets,
dns_name: self.dns_name,
status: self.status,
created_time: self.created_time,
last_modified_time: self.last_modified_time,
}
}
}
}
impl Accelerator {
/// Creates a new builder-style object to manufacture [`Accelerator`](crate::model::Accelerator)
pub fn builder() -> crate::model::accelerator::Builder {
crate::model::accelerator::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum AcceleratorStatus {
#[allow(missing_docs)] // documentation missing in model
Deployed,
#[allow(missing_docs)] // documentation missing in model
InProgress,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for AcceleratorStatus {
fn from(s: &str) -> Self {
match s {
"DEPLOYED" => AcceleratorStatus::Deployed,
"IN_PROGRESS" => AcceleratorStatus::InProgress,
other => AcceleratorStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for AcceleratorStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AcceleratorStatus::from(s))
}
}
impl AcceleratorStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AcceleratorStatus::Deployed => "DEPLOYED",
AcceleratorStatus::InProgress => "IN_PROGRESS",
AcceleratorStatus::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["DEPLOYED", "IN_PROGRESS"]
}
}
impl AsRef<str> for AcceleratorStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>A complex type that contains a <code>Tag</code> key and <code>Tag</code> value.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Tag {
/// <p>A string that contains a <code>Tag</code> key.</p>
pub key: std::option::Option<std::string::String>,
/// <p>A string that contains a <code>Tag</code> value.</p>
pub value: std::option::Option<std::string::String>,
}
impl Tag {
/// <p>A string that contains a <code>Tag</code> key.</p>
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
/// <p>A string that contains a <code>Tag</code> value.</p>
pub fn value(&self) -> std::option::Option<&str> {
self.value.as_deref()
}
}
impl std::fmt::Debug for Tag {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Tag");
formatter.field("key", &self.key);
formatter.field("value", &self.value);
formatter.finish()
}
}
/// See [`Tag`](crate::model::Tag)
pub mod tag {
/// A builder for [`Tag`](crate::model::Tag)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) value: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>A string that contains a <code>Tag</code> key.</p>
pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
self.key = Some(input.into());
self
}
/// <p>A string that contains a <code>Tag</code> key.</p>
pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.key = input;
self
}
/// <p>A string that contains a <code>Tag</code> value.</p>
pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
self.value = Some(input.into());
self
}
/// <p>A string that contains a <code>Tag</code> value.</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 [`Tag`](crate::model::Tag)
pub fn build(self) -> crate::model::Tag {
crate::model::Tag {
key: self.key,
value: self.value,
}
}
}
}
impl Tag {
/// Creates a new builder-style object to manufacture [`Tag`](crate::model::Tag)
pub fn builder() -> crate::model::tag::Builder {
crate::model::tag::Builder::default()
}
}
/// <p>Provides authorization for Amazon to bring a specific IP address range to a specific AWS
/// account using bring your own IP addresses (BYOIP). </p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/using-byoip.html">Bring Your Own
/// IP Addresses (BYOIP)</a> in the <i>AWS Global Accelerator Developer Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CidrAuthorizationContext {
/// <p>The plain-text authorization message for the prefix and account.</p>
pub message: std::option::Option<std::string::String>,
/// <p>The signed authorization message for the prefix and account.</p>
pub signature: std::option::Option<std::string::String>,
}
impl CidrAuthorizationContext {
/// <p>The plain-text authorization message for the prefix and account.</p>
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
/// <p>The signed authorization message for the prefix and account.</p>
pub fn signature(&self) -> std::option::Option<&str> {
self.signature.as_deref()
}
}
impl std::fmt::Debug for CidrAuthorizationContext {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CidrAuthorizationContext");
formatter.field("message", &self.message);
formatter.field("signature", &self.signature);
formatter.finish()
}
}
/// See [`CidrAuthorizationContext`](crate::model::CidrAuthorizationContext)
pub mod cidr_authorization_context {
/// A builder for [`CidrAuthorizationContext`](crate::model::CidrAuthorizationContext)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) signature: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The plain-text authorization message for the prefix and account.</p>
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
/// <p>The plain-text authorization message for the prefix and account.</p>
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
/// <p>The signed authorization message for the prefix and account.</p>
pub fn signature(mut self, input: impl Into<std::string::String>) -> Self {
self.signature = Some(input.into());
self
}
/// <p>The signed authorization message for the prefix and account.</p>
pub fn set_signature(mut self, input: std::option::Option<std::string::String>) -> Self {
self.signature = input;
self
}
/// Consumes the builder and constructs a [`CidrAuthorizationContext`](crate::model::CidrAuthorizationContext)
pub fn build(self) -> crate::model::CidrAuthorizationContext {
crate::model::CidrAuthorizationContext {
message: self.message,
signature: self.signature,
}
}
}
}
impl CidrAuthorizationContext {
/// Creates a new builder-style object to manufacture [`CidrAuthorizationContext`](crate::model::CidrAuthorizationContext)
pub fn builder() -> crate::model::cidr_authorization_context::Builder {
crate::model::cidr_authorization_context::Builder::default()
}
}
/// <p>The port mappings for a specified endpoint IP address (destination).</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DestinationPortMapping {
/// <p>The Amazon Resource Name (ARN) of the custom routing accelerator
/// that you have port mappings for.</p>
pub accelerator_arn: std::option::Option<std::string::String>,
/// <p>The IP address/port combinations (sockets) that map to a given destination socket
/// address.</p>
pub accelerator_socket_addresses:
std::option::Option<std::vec::Vec<crate::model::SocketAddress>>,
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub endpoint_group_arn: std::option::Option<std::string::String>,
/// <p>The ID for the virtual private cloud (VPC) subnet.</p>
pub endpoint_id: std::option::Option<std::string::String>,
/// <p>The AWS Region for the endpoint group.</p>
pub endpoint_group_region: std::option::Option<std::string::String>,
/// <p>The endpoint IP address/port combination for traffic received on the accelerator socket address.</p>
pub destination_socket_address: std::option::Option<crate::model::SocketAddress>,
/// <p>The IP address type, which must be IPv4.</p>
pub ip_address_type: std::option::Option<crate::model::IpAddressType>,
/// <p>Indicates whether or not a port mapping destination can receive traffic. The value is either ALLOW, if
/// traffic is allowed to the destination, or DENY, if traffic is not allowed to the destination.</p>
pub destination_traffic_state:
std::option::Option<crate::model::CustomRoutingDestinationTrafficState>,
}
impl DestinationPortMapping {
/// <p>The Amazon Resource Name (ARN) of the custom routing accelerator
/// that you have port mappings for.</p>
pub fn accelerator_arn(&self) -> std::option::Option<&str> {
self.accelerator_arn.as_deref()
}
/// <p>The IP address/port combinations (sockets) that map to a given destination socket
/// address.</p>
pub fn accelerator_socket_addresses(
&self,
) -> std::option::Option<&[crate::model::SocketAddress]> {
self.accelerator_socket_addresses.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub fn endpoint_group_arn(&self) -> std::option::Option<&str> {
self.endpoint_group_arn.as_deref()
}
/// <p>The ID for the virtual private cloud (VPC) subnet.</p>
pub fn endpoint_id(&self) -> std::option::Option<&str> {
self.endpoint_id.as_deref()
}
/// <p>The AWS Region for the endpoint group.</p>
pub fn endpoint_group_region(&self) -> std::option::Option<&str> {
self.endpoint_group_region.as_deref()
}
/// <p>The endpoint IP address/port combination for traffic received on the accelerator socket address.</p>
pub fn destination_socket_address(&self) -> std::option::Option<&crate::model::SocketAddress> {
self.destination_socket_address.as_ref()
}
/// <p>The IP address type, which must be IPv4.</p>
pub fn ip_address_type(&self) -> std::option::Option<&crate::model::IpAddressType> {
self.ip_address_type.as_ref()
}
/// <p>Indicates whether or not a port mapping destination can receive traffic. The value is either ALLOW, if
/// traffic is allowed to the destination, or DENY, if traffic is not allowed to the destination.</p>
pub fn destination_traffic_state(
&self,
) -> std::option::Option<&crate::model::CustomRoutingDestinationTrafficState> {
self.destination_traffic_state.as_ref()
}
}
impl std::fmt::Debug for DestinationPortMapping {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DestinationPortMapping");
formatter.field("accelerator_arn", &self.accelerator_arn);
formatter.field(
"accelerator_socket_addresses",
&self.accelerator_socket_addresses,
);
formatter.field("endpoint_group_arn", &self.endpoint_group_arn);
formatter.field("endpoint_id", &self.endpoint_id);
formatter.field("endpoint_group_region", &self.endpoint_group_region);
formatter.field(
"destination_socket_address",
&self.destination_socket_address,
);
formatter.field("ip_address_type", &self.ip_address_type);
formatter.field("destination_traffic_state", &self.destination_traffic_state);
formatter.finish()
}
}
/// See [`DestinationPortMapping`](crate::model::DestinationPortMapping)
pub mod destination_port_mapping {
/// A builder for [`DestinationPortMapping`](crate::model::DestinationPortMapping)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) accelerator_arn: std::option::Option<std::string::String>,
pub(crate) accelerator_socket_addresses:
std::option::Option<std::vec::Vec<crate::model::SocketAddress>>,
pub(crate) endpoint_group_arn: std::option::Option<std::string::String>,
pub(crate) endpoint_id: std::option::Option<std::string::String>,
pub(crate) endpoint_group_region: std::option::Option<std::string::String>,
pub(crate) destination_socket_address: std::option::Option<crate::model::SocketAddress>,
pub(crate) ip_address_type: std::option::Option<crate::model::IpAddressType>,
pub(crate) destination_traffic_state:
std::option::Option<crate::model::CustomRoutingDestinationTrafficState>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the custom routing accelerator
/// that you have port mappings for.</p>
pub fn accelerator_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.accelerator_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the custom routing accelerator
/// that you have port mappings for.</p>
pub fn set_accelerator_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.accelerator_arn = input;
self
}
/// Appends an item to `accelerator_socket_addresses`.
///
/// To override the contents of this collection use [`set_accelerator_socket_addresses`](Self::set_accelerator_socket_addresses).
///
/// <p>The IP address/port combinations (sockets) that map to a given destination socket
/// address.</p>
pub fn accelerator_socket_addresses(
mut self,
input: impl Into<crate::model::SocketAddress>,
) -> Self {
let mut v = self.accelerator_socket_addresses.unwrap_or_default();
v.push(input.into());
self.accelerator_socket_addresses = Some(v);
self
}
/// <p>The IP address/port combinations (sockets) that map to a given destination socket
/// address.</p>
pub fn set_accelerator_socket_addresses(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::SocketAddress>>,
) -> Self {
self.accelerator_socket_addresses = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub fn endpoint_group_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_group_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub fn set_endpoint_group_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.endpoint_group_arn = input;
self
}
/// <p>The ID for the virtual private cloud (VPC) subnet.</p>
pub fn endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_id = Some(input.into());
self
}
/// <p>The ID for the virtual private cloud (VPC) subnet.</p>
pub fn set_endpoint_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_id = input;
self
}
/// <p>The AWS Region for the endpoint group.</p>
pub fn endpoint_group_region(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_group_region = Some(input.into());
self
}
/// <p>The AWS Region for the endpoint group.</p>
pub fn set_endpoint_group_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.endpoint_group_region = input;
self
}
/// <p>The endpoint IP address/port combination for traffic received on the accelerator socket address.</p>
pub fn destination_socket_address(mut self, input: crate::model::SocketAddress) -> Self {
self.destination_socket_address = Some(input);
self
}
/// <p>The endpoint IP address/port combination for traffic received on the accelerator socket address.</p>
pub fn set_destination_socket_address(
mut self,
input: std::option::Option<crate::model::SocketAddress>,
) -> Self {
self.destination_socket_address = input;
self
}
/// <p>The IP address type, which must be IPv4.</p>
pub fn ip_address_type(mut self, input: crate::model::IpAddressType) -> Self {
self.ip_address_type = Some(input);
self
}
/// <p>The IP address type, which must be IPv4.</p>
pub fn set_ip_address_type(
mut self,
input: std::option::Option<crate::model::IpAddressType>,
) -> Self {
self.ip_address_type = input;
self
}
/// <p>Indicates whether or not a port mapping destination can receive traffic. The value is either ALLOW, if
/// traffic is allowed to the destination, or DENY, if traffic is not allowed to the destination.</p>
pub fn destination_traffic_state(
mut self,
input: crate::model::CustomRoutingDestinationTrafficState,
) -> Self {
self.destination_traffic_state = Some(input);
self
}
/// <p>Indicates whether or not a port mapping destination can receive traffic. The value is either ALLOW, if
/// traffic is allowed to the destination, or DENY, if traffic is not allowed to the destination.</p>
pub fn set_destination_traffic_state(
mut self,
input: std::option::Option<crate::model::CustomRoutingDestinationTrafficState>,
) -> Self {
self.destination_traffic_state = input;
self
}
/// Consumes the builder and constructs a [`DestinationPortMapping`](crate::model::DestinationPortMapping)
pub fn build(self) -> crate::model::DestinationPortMapping {
crate::model::DestinationPortMapping {
accelerator_arn: self.accelerator_arn,
accelerator_socket_addresses: self.accelerator_socket_addresses,
endpoint_group_arn: self.endpoint_group_arn,
endpoint_id: self.endpoint_id,
endpoint_group_region: self.endpoint_group_region,
destination_socket_address: self.destination_socket_address,
ip_address_type: self.ip_address_type,
destination_traffic_state: self.destination_traffic_state,
}
}
}
}
impl DestinationPortMapping {
/// Creates a new builder-style object to manufacture [`DestinationPortMapping`](crate::model::DestinationPortMapping)
pub fn builder() -> crate::model::destination_port_mapping::Builder {
crate::model::destination_port_mapping::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CustomRoutingDestinationTrafficState {
#[allow(missing_docs)] // documentation missing in model
Allow,
#[allow(missing_docs)] // documentation missing in model
Deny,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CustomRoutingDestinationTrafficState {
fn from(s: &str) -> Self {
match s {
"ALLOW" => CustomRoutingDestinationTrafficState::Allow,
"DENY" => CustomRoutingDestinationTrafficState::Deny,
other => CustomRoutingDestinationTrafficState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CustomRoutingDestinationTrafficState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CustomRoutingDestinationTrafficState::from(s))
}
}
impl CustomRoutingDestinationTrafficState {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CustomRoutingDestinationTrafficState::Allow => "ALLOW",
CustomRoutingDestinationTrafficState::Deny => "DENY",
CustomRoutingDestinationTrafficState::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ALLOW", "DENY"]
}
}
impl AsRef<str> for CustomRoutingDestinationTrafficState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>An IP address/port combination.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SocketAddress {
/// <p>The IP address for the socket address.</p>
pub ip_address: std::option::Option<std::string::String>,
/// <p>The port for the socket address.</p>
pub port: std::option::Option<i32>,
}
impl SocketAddress {
/// <p>The IP address for the socket address.</p>
pub fn ip_address(&self) -> std::option::Option<&str> {
self.ip_address.as_deref()
}
/// <p>The port for the socket address.</p>
pub fn port(&self) -> std::option::Option<i32> {
self.port
}
}
impl std::fmt::Debug for SocketAddress {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SocketAddress");
formatter.field("ip_address", &self.ip_address);
formatter.field("port", &self.port);
formatter.finish()
}
}
/// See [`SocketAddress`](crate::model::SocketAddress)
pub mod socket_address {
/// A builder for [`SocketAddress`](crate::model::SocketAddress)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ip_address: std::option::Option<std::string::String>,
pub(crate) port: std::option::Option<i32>,
}
impl Builder {
/// <p>The IP address for the socket address.</p>
pub fn ip_address(mut self, input: impl Into<std::string::String>) -> Self {
self.ip_address = Some(input.into());
self
}
/// <p>The IP address for the socket address.</p>
pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ip_address = input;
self
}
/// <p>The port for the socket address.</p>
pub fn port(mut self, input: i32) -> Self {
self.port = Some(input);
self
}
/// <p>The port for the socket address.</p>
pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
self.port = input;
self
}
/// Consumes the builder and constructs a [`SocketAddress`](crate::model::SocketAddress)
pub fn build(self) -> crate::model::SocketAddress {
crate::model::SocketAddress {
ip_address: self.ip_address,
port: self.port,
}
}
}
}
impl SocketAddress {
/// Creates a new builder-style object to manufacture [`SocketAddress`](crate::model::SocketAddress)
pub fn builder() -> crate::model::socket_address::Builder {
crate::model::socket_address::Builder::default()
}
}
/// <p>Returns the ports and associated IP addresses and ports of Amazon EC2 instances in your virtual
/// private cloud (VPC) subnets. Custom routing is a port mapping protocol in AWS Global Accelerator that
/// statically associates port ranges with VPC subnets, which allows Global Accelerator to route to
/// specific instances and ports within one or more subnets. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PortMapping {
/// <p>The accelerator port.</p>
pub accelerator_port: std::option::Option<i32>,
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub endpoint_group_arn: std::option::Option<std::string::String>,
/// <p>The IP address of the VPC subnet (the subnet ID).</p>
pub endpoint_id: std::option::Option<std::string::String>,
/// <p>The EC2 instance IP address and port number in the virtual private cloud (VPC) subnet.</p>
pub destination_socket_address: std::option::Option<crate::model::SocketAddress>,
/// <p>The protocols supported by the endpoint group.</p>
pub protocols: std::option::Option<std::vec::Vec<crate::model::CustomRoutingProtocol>>,
/// <p>Indicates whether or not a port mapping destination can receive traffic. The value is either ALLOW, if
/// traffic is allowed to the destination, or DENY, if traffic is not allowed to the destination.</p>
pub destination_traffic_state:
std::option::Option<crate::model::CustomRoutingDestinationTrafficState>,
}
impl PortMapping {
/// <p>The accelerator port.</p>
pub fn accelerator_port(&self) -> std::option::Option<i32> {
self.accelerator_port
}
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub fn endpoint_group_arn(&self) -> std::option::Option<&str> {
self.endpoint_group_arn.as_deref()
}
/// <p>The IP address of the VPC subnet (the subnet ID).</p>
pub fn endpoint_id(&self) -> std::option::Option<&str> {
self.endpoint_id.as_deref()
}
/// <p>The EC2 instance IP address and port number in the virtual private cloud (VPC) subnet.</p>
pub fn destination_socket_address(&self) -> std::option::Option<&crate::model::SocketAddress> {
self.destination_socket_address.as_ref()
}
/// <p>The protocols supported by the endpoint group.</p>
pub fn protocols(&self) -> std::option::Option<&[crate::model::CustomRoutingProtocol]> {
self.protocols.as_deref()
}
/// <p>Indicates whether or not a port mapping destination can receive traffic. The value is either ALLOW, if
/// traffic is allowed to the destination, or DENY, if traffic is not allowed to the destination.</p>
pub fn destination_traffic_state(
&self,
) -> std::option::Option<&crate::model::CustomRoutingDestinationTrafficState> {
self.destination_traffic_state.as_ref()
}
}
impl std::fmt::Debug for PortMapping {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PortMapping");
formatter.field("accelerator_port", &self.accelerator_port);
formatter.field("endpoint_group_arn", &self.endpoint_group_arn);
formatter.field("endpoint_id", &self.endpoint_id);
formatter.field(
"destination_socket_address",
&self.destination_socket_address,
);
formatter.field("protocols", &self.protocols);
formatter.field("destination_traffic_state", &self.destination_traffic_state);
formatter.finish()
}
}
/// See [`PortMapping`](crate::model::PortMapping)
pub mod port_mapping {
/// A builder for [`PortMapping`](crate::model::PortMapping)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) accelerator_port: std::option::Option<i32>,
pub(crate) endpoint_group_arn: std::option::Option<std::string::String>,
pub(crate) endpoint_id: std::option::Option<std::string::String>,
pub(crate) destination_socket_address: std::option::Option<crate::model::SocketAddress>,
pub(crate) protocols:
std::option::Option<std::vec::Vec<crate::model::CustomRoutingProtocol>>,
pub(crate) destination_traffic_state:
std::option::Option<crate::model::CustomRoutingDestinationTrafficState>,
}
impl Builder {
/// <p>The accelerator port.</p>
pub fn accelerator_port(mut self, input: i32) -> Self {
self.accelerator_port = Some(input);
self
}
/// <p>The accelerator port.</p>
pub fn set_accelerator_port(mut self, input: std::option::Option<i32>) -> Self {
self.accelerator_port = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub fn endpoint_group_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_group_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub fn set_endpoint_group_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.endpoint_group_arn = input;
self
}
/// <p>The IP address of the VPC subnet (the subnet ID).</p>
pub fn endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_id = Some(input.into());
self
}
/// <p>The IP address of the VPC subnet (the subnet ID).</p>
pub fn set_endpoint_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_id = input;
self
}
/// <p>The EC2 instance IP address and port number in the virtual private cloud (VPC) subnet.</p>
pub fn destination_socket_address(mut self, input: crate::model::SocketAddress) -> Self {
self.destination_socket_address = Some(input);
self
}
/// <p>The EC2 instance IP address and port number in the virtual private cloud (VPC) subnet.</p>
pub fn set_destination_socket_address(
mut self,
input: std::option::Option<crate::model::SocketAddress>,
) -> Self {
self.destination_socket_address = input;
self
}
/// Appends an item to `protocols`.
///
/// To override the contents of this collection use [`set_protocols`](Self::set_protocols).
///
/// <p>The protocols supported by the endpoint group.</p>
pub fn protocols(mut self, input: impl Into<crate::model::CustomRoutingProtocol>) -> Self {
let mut v = self.protocols.unwrap_or_default();
v.push(input.into());
self.protocols = Some(v);
self
}
/// <p>The protocols supported by the endpoint group.</p>
pub fn set_protocols(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CustomRoutingProtocol>>,
) -> Self {
self.protocols = input;
self
}
/// <p>Indicates whether or not a port mapping destination can receive traffic. The value is either ALLOW, if
/// traffic is allowed to the destination, or DENY, if traffic is not allowed to the destination.</p>
pub fn destination_traffic_state(
mut self,
input: crate::model::CustomRoutingDestinationTrafficState,
) -> Self {
self.destination_traffic_state = Some(input);
self
}
/// <p>Indicates whether or not a port mapping destination can receive traffic. The value is either ALLOW, if
/// traffic is allowed to the destination, or DENY, if traffic is not allowed to the destination.</p>
pub fn set_destination_traffic_state(
mut self,
input: std::option::Option<crate::model::CustomRoutingDestinationTrafficState>,
) -> Self {
self.destination_traffic_state = input;
self
}
/// Consumes the builder and constructs a [`PortMapping`](crate::model::PortMapping)
pub fn build(self) -> crate::model::PortMapping {
crate::model::PortMapping {
accelerator_port: self.accelerator_port,
endpoint_group_arn: self.endpoint_group_arn,
endpoint_id: self.endpoint_id,
destination_socket_address: self.destination_socket_address,
protocols: self.protocols,
destination_traffic_state: self.destination_traffic_state,
}
}
}
}
impl PortMapping {
/// Creates a new builder-style object to manufacture [`PortMapping`](crate::model::PortMapping)
pub fn builder() -> crate::model::port_mapping::Builder {
crate::model::port_mapping::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CustomRoutingProtocol {
#[allow(missing_docs)] // documentation missing in model
Tcp,
#[allow(missing_docs)] // documentation missing in model
Udp,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CustomRoutingProtocol {
fn from(s: &str) -> Self {
match s {
"TCP" => CustomRoutingProtocol::Tcp,
"UDP" => CustomRoutingProtocol::Udp,
other => CustomRoutingProtocol::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CustomRoutingProtocol {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CustomRoutingProtocol::from(s))
}
}
impl CustomRoutingProtocol {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CustomRoutingProtocol::Tcp => "TCP",
CustomRoutingProtocol::Udp => "UDP",
CustomRoutingProtocol::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["TCP", "UDP"]
}
}
impl AsRef<str> for CustomRoutingProtocol {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>A complex type for the endpoint group for a custom routing accelerator. An AWS Region can have only one endpoint group for a specific listener.
/// </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CustomRoutingEndpointGroup {
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub endpoint_group_arn: std::option::Option<std::string::String>,
/// <p>The AWS Region where the endpoint group is located.</p>
pub endpoint_group_region: std::option::Option<std::string::String>,
/// <p>For a custom routing accelerator, describes the port range and protocol for all endpoints
/// (virtual private cloud subnets) in an endpoint group to accept client traffic on.</p>
pub destination_descriptions:
std::option::Option<std::vec::Vec<crate::model::CustomRoutingDestinationDescription>>,
/// <p>For a custom routing accelerator, describes the endpoints (virtual private cloud subnets) in an
/// endpoint group to accept client traffic on.</p>
pub endpoint_descriptions:
std::option::Option<std::vec::Vec<crate::model::CustomRoutingEndpointDescription>>,
}
impl CustomRoutingEndpointGroup {
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub fn endpoint_group_arn(&self) -> std::option::Option<&str> {
self.endpoint_group_arn.as_deref()
}
/// <p>The AWS Region where the endpoint group is located.</p>
pub fn endpoint_group_region(&self) -> std::option::Option<&str> {
self.endpoint_group_region.as_deref()
}
/// <p>For a custom routing accelerator, describes the port range and protocol for all endpoints
/// (virtual private cloud subnets) in an endpoint group to accept client traffic on.</p>
pub fn destination_descriptions(
&self,
) -> std::option::Option<&[crate::model::CustomRoutingDestinationDescription]> {
self.destination_descriptions.as_deref()
}
/// <p>For a custom routing accelerator, describes the endpoints (virtual private cloud subnets) in an
/// endpoint group to accept client traffic on.</p>
pub fn endpoint_descriptions(
&self,
) -> std::option::Option<&[crate::model::CustomRoutingEndpointDescription]> {
self.endpoint_descriptions.as_deref()
}
}
impl std::fmt::Debug for CustomRoutingEndpointGroup {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CustomRoutingEndpointGroup");
formatter.field("endpoint_group_arn", &self.endpoint_group_arn);
formatter.field("endpoint_group_region", &self.endpoint_group_region);
formatter.field("destination_descriptions", &self.destination_descriptions);
formatter.field("endpoint_descriptions", &self.endpoint_descriptions);
formatter.finish()
}
}
/// See [`CustomRoutingEndpointGroup`](crate::model::CustomRoutingEndpointGroup)
pub mod custom_routing_endpoint_group {
/// A builder for [`CustomRoutingEndpointGroup`](crate::model::CustomRoutingEndpointGroup)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) endpoint_group_arn: std::option::Option<std::string::String>,
pub(crate) endpoint_group_region: std::option::Option<std::string::String>,
pub(crate) destination_descriptions:
std::option::Option<std::vec::Vec<crate::model::CustomRoutingDestinationDescription>>,
pub(crate) endpoint_descriptions:
std::option::Option<std::vec::Vec<crate::model::CustomRoutingEndpointDescription>>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub fn endpoint_group_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_group_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
pub fn set_endpoint_group_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.endpoint_group_arn = input;
self
}
/// <p>The AWS Region where the endpoint group is located.</p>
pub fn endpoint_group_region(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_group_region = Some(input.into());
self
}
/// <p>The AWS Region where the endpoint group is located.</p>
pub fn set_endpoint_group_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.endpoint_group_region = input;
self
}
/// Appends an item to `destination_descriptions`.
///
/// To override the contents of this collection use [`set_destination_descriptions`](Self::set_destination_descriptions).
///
/// <p>For a custom routing accelerator, describes the port range and protocol for all endpoints
/// (virtual private cloud subnets) in an endpoint group to accept client traffic on.</p>
pub fn destination_descriptions(
mut self,
input: impl Into<crate::model::CustomRoutingDestinationDescription>,
) -> Self {
let mut v = self.destination_descriptions.unwrap_or_default();
v.push(input.into());
self.destination_descriptions = Some(v);
self
}
/// <p>For a custom routing accelerator, describes the port range and protocol for all endpoints
/// (virtual private cloud subnets) in an endpoint group to accept client traffic on.</p>
pub fn set_destination_descriptions(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::CustomRoutingDestinationDescription>,
>,
) -> Self {
self.destination_descriptions = input;
self
}
/// Appends an item to `endpoint_descriptions`.
///
/// To override the contents of this collection use [`set_endpoint_descriptions`](Self::set_endpoint_descriptions).
///
/// <p>For a custom routing accelerator, describes the endpoints (virtual private cloud subnets) in an
/// endpoint group to accept client traffic on.</p>
pub fn endpoint_descriptions(
mut self,
input: impl Into<crate::model::CustomRoutingEndpointDescription>,
) -> Self {
let mut v = self.endpoint_descriptions.unwrap_or_default();
v.push(input.into());
self.endpoint_descriptions = Some(v);
self
}
/// <p>For a custom routing accelerator, describes the endpoints (virtual private cloud subnets) in an
/// endpoint group to accept client traffic on.</p>
pub fn set_endpoint_descriptions(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::CustomRoutingEndpointDescription>,
>,
) -> Self {
self.endpoint_descriptions = input;
self
}
/// Consumes the builder and constructs a [`CustomRoutingEndpointGroup`](crate::model::CustomRoutingEndpointGroup)
pub fn build(self) -> crate::model::CustomRoutingEndpointGroup {
crate::model::CustomRoutingEndpointGroup {
endpoint_group_arn: self.endpoint_group_arn,
endpoint_group_region: self.endpoint_group_region,
destination_descriptions: self.destination_descriptions,
endpoint_descriptions: self.endpoint_descriptions,
}
}
}
}
impl CustomRoutingEndpointGroup {
/// Creates a new builder-style object to manufacture [`CustomRoutingEndpointGroup`](crate::model::CustomRoutingEndpointGroup)
pub fn builder() -> crate::model::custom_routing_endpoint_group::Builder {
crate::model::custom_routing_endpoint_group::Builder::default()
}
}
/// <p>A complex type for an endpoint for a custom routing accelerator. Each endpoint group can include one or more endpoints,
/// which are virtual private cloud (VPC) subnets.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CustomRoutingEndpointDescription {
/// <p>An ID for the endpoint. For custom routing accelerators, this is the virtual private cloud (VPC)
/// subnet ID. </p>
pub endpoint_id: std::option::Option<std::string::String>,
}
impl CustomRoutingEndpointDescription {
/// <p>An ID for the endpoint. For custom routing accelerators, this is the virtual private cloud (VPC)
/// subnet ID. </p>
pub fn endpoint_id(&self) -> std::option::Option<&str> {
self.endpoint_id.as_deref()
}
}
impl std::fmt::Debug for CustomRoutingEndpointDescription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CustomRoutingEndpointDescription");
formatter.field("endpoint_id", &self.endpoint_id);
formatter.finish()
}
}
/// See [`CustomRoutingEndpointDescription`](crate::model::CustomRoutingEndpointDescription)
pub mod custom_routing_endpoint_description {
/// A builder for [`CustomRoutingEndpointDescription`](crate::model::CustomRoutingEndpointDescription)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) endpoint_id: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>An ID for the endpoint. For custom routing accelerators, this is the virtual private cloud (VPC)
/// subnet ID. </p>
pub fn endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_id = Some(input.into());
self
}
/// <p>An ID for the endpoint. For custom routing accelerators, this is the virtual private cloud (VPC)
/// subnet ID. </p>
pub fn set_endpoint_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_id = input;
self
}
/// Consumes the builder and constructs a [`CustomRoutingEndpointDescription`](crate::model::CustomRoutingEndpointDescription)
pub fn build(self) -> crate::model::CustomRoutingEndpointDescription {
crate::model::CustomRoutingEndpointDescription {
endpoint_id: self.endpoint_id,
}
}
}
}
impl CustomRoutingEndpointDescription {
/// Creates a new builder-style object to manufacture [`CustomRoutingEndpointDescription`](crate::model::CustomRoutingEndpointDescription)
pub fn builder() -> crate::model::custom_routing_endpoint_description::Builder {
crate::model::custom_routing_endpoint_description::Builder::default()
}
}
/// <p>For a custom routing accelerator, describes the port range and protocol for all endpoints
/// (virtual private cloud subnets) in an endpoint group to accept client traffic on.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CustomRoutingDestinationDescription {
/// <p>The first port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub from_port: std::option::Option<i32>,
/// <p>The last port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub to_port: std::option::Option<i32>,
/// <p>The protocol for the endpoint group that is associated with a custom routing accelerator. The protocol can be either TCP or UDP.</p>
pub protocols: std::option::Option<std::vec::Vec<crate::model::Protocol>>,
}
impl CustomRoutingDestinationDescription {
/// <p>The first port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub fn from_port(&self) -> std::option::Option<i32> {
self.from_port
}
/// <p>The last port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub fn to_port(&self) -> std::option::Option<i32> {
self.to_port
}
/// <p>The protocol for the endpoint group that is associated with a custom routing accelerator. The protocol can be either TCP or UDP.</p>
pub fn protocols(&self) -> std::option::Option<&[crate::model::Protocol]> {
self.protocols.as_deref()
}
}
impl std::fmt::Debug for CustomRoutingDestinationDescription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CustomRoutingDestinationDescription");
formatter.field("from_port", &self.from_port);
formatter.field("to_port", &self.to_port);
formatter.field("protocols", &self.protocols);
formatter.finish()
}
}
/// See [`CustomRoutingDestinationDescription`](crate::model::CustomRoutingDestinationDescription)
pub mod custom_routing_destination_description {
/// A builder for [`CustomRoutingDestinationDescription`](crate::model::CustomRoutingDestinationDescription)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) from_port: std::option::Option<i32>,
pub(crate) to_port: std::option::Option<i32>,
pub(crate) protocols: std::option::Option<std::vec::Vec<crate::model::Protocol>>,
}
impl Builder {
/// <p>The first port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub fn from_port(mut self, input: i32) -> Self {
self.from_port = Some(input);
self
}
/// <p>The first port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub fn set_from_port(mut self, input: std::option::Option<i32>) -> Self {
self.from_port = input;
self
}
/// <p>The last port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub fn to_port(mut self, input: i32) -> Self {
self.to_port = Some(input);
self
}
/// <p>The last port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub fn set_to_port(mut self, input: std::option::Option<i32>) -> Self {
self.to_port = input;
self
}
/// Appends an item to `protocols`.
///
/// To override the contents of this collection use [`set_protocols`](Self::set_protocols).
///
/// <p>The protocol for the endpoint group that is associated with a custom routing accelerator. The protocol can be either TCP or UDP.</p>
pub fn protocols(mut self, input: impl Into<crate::model::Protocol>) -> Self {
let mut v = self.protocols.unwrap_or_default();
v.push(input.into());
self.protocols = Some(v);
self
}
/// <p>The protocol for the endpoint group that is associated with a custom routing accelerator. The protocol can be either TCP or UDP.</p>
pub fn set_protocols(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Protocol>>,
) -> Self {
self.protocols = input;
self
}
/// Consumes the builder and constructs a [`CustomRoutingDestinationDescription`](crate::model::CustomRoutingDestinationDescription)
pub fn build(self) -> crate::model::CustomRoutingDestinationDescription {
crate::model::CustomRoutingDestinationDescription {
from_port: self.from_port,
to_port: self.to_port,
protocols: self.protocols,
}
}
}
}
impl CustomRoutingDestinationDescription {
/// Creates a new builder-style object to manufacture [`CustomRoutingDestinationDescription`](crate::model::CustomRoutingDestinationDescription)
pub fn builder() -> crate::model::custom_routing_destination_description::Builder {
crate::model::custom_routing_destination_description::Builder::default()
}
}
/// <p>For a custom routing accelerator, sets the port range and protocol for all endpoints (virtual
/// private cloud subnets) in an endpoint group to accept client traffic on.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CustomRoutingDestinationConfiguration {
/// <p>The first port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub from_port: std::option::Option<i32>,
/// <p>The last port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub to_port: std::option::Option<i32>,
/// <p>The protocol for the endpoint group that is associated with a custom routing accelerator. The protocol can be either TCP or UDP.</p>
pub protocols: std::option::Option<std::vec::Vec<crate::model::CustomRoutingProtocol>>,
}
impl CustomRoutingDestinationConfiguration {
/// <p>The first port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub fn from_port(&self) -> std::option::Option<i32> {
self.from_port
}
/// <p>The last port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub fn to_port(&self) -> std::option::Option<i32> {
self.to_port
}
/// <p>The protocol for the endpoint group that is associated with a custom routing accelerator. The protocol can be either TCP or UDP.</p>
pub fn protocols(&self) -> std::option::Option<&[crate::model::CustomRoutingProtocol]> {
self.protocols.as_deref()
}
}
impl std::fmt::Debug for CustomRoutingDestinationConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CustomRoutingDestinationConfiguration");
formatter.field("from_port", &self.from_port);
formatter.field("to_port", &self.to_port);
formatter.field("protocols", &self.protocols);
formatter.finish()
}
}
/// See [`CustomRoutingDestinationConfiguration`](crate::model::CustomRoutingDestinationConfiguration)
pub mod custom_routing_destination_configuration {
/// A builder for [`CustomRoutingDestinationConfiguration`](crate::model::CustomRoutingDestinationConfiguration)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) from_port: std::option::Option<i32>,
pub(crate) to_port: std::option::Option<i32>,
pub(crate) protocols:
std::option::Option<std::vec::Vec<crate::model::CustomRoutingProtocol>>,
}
impl Builder {
/// <p>The first port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub fn from_port(mut self, input: i32) -> Self {
self.from_port = Some(input);
self
}
/// <p>The first port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub fn set_from_port(mut self, input: std::option::Option<i32>) -> Self {
self.from_port = input;
self
}
/// <p>The last port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub fn to_port(mut self, input: i32) -> Self {
self.to_port = Some(input);
self
}
/// <p>The last port, inclusive, in the range of ports for the endpoint group that is associated with a custom routing accelerator.</p>
pub fn set_to_port(mut self, input: std::option::Option<i32>) -> Self {
self.to_port = input;
self
}
/// Appends an item to `protocols`.
///
/// To override the contents of this collection use [`set_protocols`](Self::set_protocols).
///
/// <p>The protocol for the endpoint group that is associated with a custom routing accelerator. The protocol can be either TCP or UDP.</p>
pub fn protocols(mut self, input: impl Into<crate::model::CustomRoutingProtocol>) -> Self {
let mut v = self.protocols.unwrap_or_default();
v.push(input.into());
self.protocols = Some(v);
self
}
/// <p>The protocol for the endpoint group that is associated with a custom routing accelerator. The protocol can be either TCP or UDP.</p>
pub fn set_protocols(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CustomRoutingProtocol>>,
) -> Self {
self.protocols = input;
self
}
/// Consumes the builder and constructs a [`CustomRoutingDestinationConfiguration`](crate::model::CustomRoutingDestinationConfiguration)
pub fn build(self) -> crate::model::CustomRoutingDestinationConfiguration {
crate::model::CustomRoutingDestinationConfiguration {
from_port: self.from_port,
to_port: self.to_port,
protocols: self.protocols,
}
}
}
}
impl CustomRoutingDestinationConfiguration {
/// Creates a new builder-style object to manufacture [`CustomRoutingDestinationConfiguration`](crate::model::CustomRoutingDestinationConfiguration)
pub fn builder() -> crate::model::custom_routing_destination_configuration::Builder {
crate::model::custom_routing_destination_configuration::Builder::default()
}
}
/// <p>The list of endpoint objects. For custom routing, this is a list of virtual private cloud (VPC) subnet IDs.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CustomRoutingEndpointConfiguration {
/// <p>An ID for the endpoint. For custom routing accelerators, this is the virtual private cloud (VPC)
/// subnet ID. </p>
pub endpoint_id: std::option::Option<std::string::String>,
}
impl CustomRoutingEndpointConfiguration {
/// <p>An ID for the endpoint. For custom routing accelerators, this is the virtual private cloud (VPC)
/// subnet ID. </p>
pub fn endpoint_id(&self) -> std::option::Option<&str> {
self.endpoint_id.as_deref()
}
}
impl std::fmt::Debug for CustomRoutingEndpointConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CustomRoutingEndpointConfiguration");
formatter.field("endpoint_id", &self.endpoint_id);
formatter.finish()
}
}
/// See [`CustomRoutingEndpointConfiguration`](crate::model::CustomRoutingEndpointConfiguration)
pub mod custom_routing_endpoint_configuration {
/// A builder for [`CustomRoutingEndpointConfiguration`](crate::model::CustomRoutingEndpointConfiguration)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) endpoint_id: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>An ID for the endpoint. For custom routing accelerators, this is the virtual private cloud (VPC)
/// subnet ID. </p>
pub fn endpoint_id(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_id = Some(input.into());
self
}
/// <p>An ID for the endpoint. For custom routing accelerators, this is the virtual private cloud (VPC)
/// subnet ID. </p>
pub fn set_endpoint_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_id = input;
self
}
/// Consumes the builder and constructs a [`CustomRoutingEndpointConfiguration`](crate::model::CustomRoutingEndpointConfiguration)
pub fn build(self) -> crate::model::CustomRoutingEndpointConfiguration {
crate::model::CustomRoutingEndpointConfiguration {
endpoint_id: self.endpoint_id,
}
}
}
}
impl CustomRoutingEndpointConfiguration {
/// Creates a new builder-style object to manufacture [`CustomRoutingEndpointConfiguration`](crate::model::CustomRoutingEndpointConfiguration)
pub fn builder() -> crate::model::custom_routing_endpoint_configuration::Builder {
crate::model::custom_routing_endpoint_configuration::Builder::default()
}
}