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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Information about agents or connectors that were instructed to start collecting data. Information includes the agent/connector ID, a description of the operation, and whether the agent/connector configuration was updated.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AgentConfigurationStatus {
/// <p>The agent/connector ID.</p>
#[doc(hidden)]
pub agent_id: std::option::Option<std::string::String>,
/// <p>Information about the status of the <code>StartDataCollection</code> and <code>StopDataCollection</code> operations. The system has recorded the data collection operation. The agent/connector receives this command the next time it polls for a new command. </p>
#[doc(hidden)]
pub operation_succeeded: bool,
/// <p>A description of the operation performed.</p>
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
}
impl AgentConfigurationStatus {
/// <p>The agent/connector ID.</p>
pub fn agent_id(&self) -> std::option::Option<&str> {
self.agent_id.as_deref()
}
/// <p>Information about the status of the <code>StartDataCollection</code> and <code>StopDataCollection</code> operations. The system has recorded the data collection operation. The agent/connector receives this command the next time it polls for a new command. </p>
pub fn operation_succeeded(&self) -> bool {
self.operation_succeeded
}
/// <p>A description of the operation performed.</p>
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
}
/// See [`AgentConfigurationStatus`](crate::model::AgentConfigurationStatus).
pub mod agent_configuration_status {
/// A builder for [`AgentConfigurationStatus`](crate::model::AgentConfigurationStatus).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) agent_id: std::option::Option<std::string::String>,
pub(crate) operation_succeeded: std::option::Option<bool>,
pub(crate) description: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The agent/connector ID.</p>
pub fn agent_id(mut self, input: impl Into<std::string::String>) -> Self {
self.agent_id = Some(input.into());
self
}
/// <p>The agent/connector ID.</p>
pub fn set_agent_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.agent_id = input;
self
}
/// <p>Information about the status of the <code>StartDataCollection</code> and <code>StopDataCollection</code> operations. The system has recorded the data collection operation. The agent/connector receives this command the next time it polls for a new command. </p>
pub fn operation_succeeded(mut self, input: bool) -> Self {
self.operation_succeeded = Some(input);
self
}
/// <p>Information about the status of the <code>StartDataCollection</code> and <code>StopDataCollection</code> operations. The system has recorded the data collection operation. The agent/connector receives this command the next time it polls for a new command. </p>
pub fn set_operation_succeeded(mut self, input: std::option::Option<bool>) -> Self {
self.operation_succeeded = input;
self
}
/// <p>A description of the operation performed.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
/// <p>A description of the operation performed.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
/// Consumes the builder and constructs a [`AgentConfigurationStatus`](crate::model::AgentConfigurationStatus).
pub fn build(self) -> crate::model::AgentConfigurationStatus {
crate::model::AgentConfigurationStatus {
agent_id: self.agent_id,
operation_succeeded: self.operation_succeeded.unwrap_or_default(),
description: self.description,
}
}
}
}
impl AgentConfigurationStatus {
/// Creates a new builder-style object to manufacture [`AgentConfigurationStatus`](crate::model::AgentConfigurationStatus).
pub fn builder() -> crate::model::agent_configuration_status::Builder {
crate::model::agent_configuration_status::Builder::default()
}
}
/// <p>An array of information related to the import task request that includes status information, times, IDs, the Amazon S3 Object URL for the import file, and more.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImportTask {
/// <p>The unique ID for a specific import task. These IDs aren't globally unique, but they are unique within an Amazon Web Services account.</p>
#[doc(hidden)]
pub import_task_id: std::option::Option<std::string::String>,
/// <p>A unique token used to prevent the same import request from occurring more than once. If you didn't provide a token, a token was automatically generated when the import task request was sent.</p>
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
/// <p>A descriptive name for an import task. You can use this name to filter future requests related to this import task, such as identifying applications and servers that were included in this import task. We recommend that you use a meaningful name for each import task.</p>
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// <p>The URL for your import file that you've uploaded to Amazon S3.</p>
#[doc(hidden)]
pub import_url: std::option::Option<std::string::String>,
/// <p>The status of the import task. An import can have the status of <code>IMPORT_COMPLETE</code> and still have some records fail to import from the overall request. More information can be found in the downloadable archive defined in the <code>errorsAndFailedEntriesZip</code> field, or in the Migration Hub management console.</p>
#[doc(hidden)]
pub status: std::option::Option<crate::model::ImportStatus>,
/// <p>The time that the import task request was made, presented in the Unix time stamp format.</p>
#[doc(hidden)]
pub import_request_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The time that the import task request finished, presented in the Unix time stamp format.</p>
#[doc(hidden)]
pub import_completion_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The time that the import task request was deleted, presented in the Unix time stamp format.</p>
#[doc(hidden)]
pub import_deleted_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The total number of server records in the import file that were successfully imported.</p>
#[doc(hidden)]
pub server_import_success: i32,
/// <p>The total number of server records in the import file that failed to be imported.</p>
#[doc(hidden)]
pub server_import_failure: i32,
/// <p>The total number of application records in the import file that were successfully imported.</p>
#[doc(hidden)]
pub application_import_success: i32,
/// <p>The total number of application records in the import file that failed to be imported.</p>
#[doc(hidden)]
pub application_import_failure: i32,
/// <p>A link to a compressed archive folder (in the ZIP format) that contains an error log and a file of failed records. You can use these two files to quickly identify records that failed, why they failed, and correct those records. Afterward, you can upload the corrected file to your Amazon S3 bucket and create another import task request.</p>
/// <p>This field also includes authorization information so you can confirm the authenticity of the compressed archive before you download it.</p>
/// <p>If some records failed to be imported we recommend that you correct the records in the failed entries file and then imports that failed entries file. This prevents you from having to correct and update the larger original file and attempt importing it again.</p>
#[doc(hidden)]
pub errors_and_failed_entries_zip: std::option::Option<std::string::String>,
}
impl ImportTask {
/// <p>The unique ID for a specific import task. These IDs aren't globally unique, but they are unique within an Amazon Web Services account.</p>
pub fn import_task_id(&self) -> std::option::Option<&str> {
self.import_task_id.as_deref()
}
/// <p>A unique token used to prevent the same import request from occurring more than once. If you didn't provide a token, a token was automatically generated when the import task request was sent.</p>
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
/// <p>A descriptive name for an import task. You can use this name to filter future requests related to this import task, such as identifying applications and servers that were included in this import task. We recommend that you use a meaningful name for each import task.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The URL for your import file that you've uploaded to Amazon S3.</p>
pub fn import_url(&self) -> std::option::Option<&str> {
self.import_url.as_deref()
}
/// <p>The status of the import task. An import can have the status of <code>IMPORT_COMPLETE</code> and still have some records fail to import from the overall request. More information can be found in the downloadable archive defined in the <code>errorsAndFailedEntriesZip</code> field, or in the Migration Hub management console.</p>
pub fn status(&self) -> std::option::Option<&crate::model::ImportStatus> {
self.status.as_ref()
}
/// <p>The time that the import task request was made, presented in the Unix time stamp format.</p>
pub fn import_request_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.import_request_time.as_ref()
}
/// <p>The time that the import task request finished, presented in the Unix time stamp format.</p>
pub fn import_completion_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.import_completion_time.as_ref()
}
/// <p>The time that the import task request was deleted, presented in the Unix time stamp format.</p>
pub fn import_deleted_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.import_deleted_time.as_ref()
}
/// <p>The total number of server records in the import file that were successfully imported.</p>
pub fn server_import_success(&self) -> i32 {
self.server_import_success
}
/// <p>The total number of server records in the import file that failed to be imported.</p>
pub fn server_import_failure(&self) -> i32 {
self.server_import_failure
}
/// <p>The total number of application records in the import file that were successfully imported.</p>
pub fn application_import_success(&self) -> i32 {
self.application_import_success
}
/// <p>The total number of application records in the import file that failed to be imported.</p>
pub fn application_import_failure(&self) -> i32 {
self.application_import_failure
}
/// <p>A link to a compressed archive folder (in the ZIP format) that contains an error log and a file of failed records. You can use these two files to quickly identify records that failed, why they failed, and correct those records. Afterward, you can upload the corrected file to your Amazon S3 bucket and create another import task request.</p>
/// <p>This field also includes authorization information so you can confirm the authenticity of the compressed archive before you download it.</p>
/// <p>If some records failed to be imported we recommend that you correct the records in the failed entries file and then imports that failed entries file. This prevents you from having to correct and update the larger original file and attempt importing it again.</p>
pub fn errors_and_failed_entries_zip(&self) -> std::option::Option<&str> {
self.errors_and_failed_entries_zip.as_deref()
}
}
/// See [`ImportTask`](crate::model::ImportTask).
pub mod import_task {
/// A builder for [`ImportTask`](crate::model::ImportTask).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) import_task_id: std::option::Option<std::string::String>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) import_url: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::ImportStatus>,
pub(crate) import_request_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) import_completion_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) import_deleted_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) server_import_success: std::option::Option<i32>,
pub(crate) server_import_failure: std::option::Option<i32>,
pub(crate) application_import_success: std::option::Option<i32>,
pub(crate) application_import_failure: std::option::Option<i32>,
pub(crate) errors_and_failed_entries_zip: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The unique ID for a specific import task. These IDs aren't globally unique, but they are unique within an Amazon Web Services account.</p>
pub fn import_task_id(mut self, input: impl Into<std::string::String>) -> Self {
self.import_task_id = Some(input.into());
self
}
/// <p>The unique ID for a specific import task. These IDs aren't globally unique, but they are unique within an Amazon Web Services account.</p>
pub fn set_import_task_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.import_task_id = input;
self
}
/// <p>A unique token used to prevent the same import request from occurring more than once. If you didn't provide a token, a token was automatically generated when the import task request was sent.</p>
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
/// <p>A unique token used to prevent the same import request from occurring more than once. If you didn't provide a token, a token was automatically generated when the import task request was sent.</p>
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
/// <p>A descriptive name for an import task. You can use this name to filter future requests related to this import task, such as identifying applications and servers that were included in this import task. We recommend that you use a meaningful name for each import task.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>A descriptive name for an import task. You can use this name to filter future requests related to this import task, such as identifying applications and servers that were included in this import task. We recommend that you use a meaningful name for each import task.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The URL for your import file that you've uploaded to Amazon S3.</p>
pub fn import_url(mut self, input: impl Into<std::string::String>) -> Self {
self.import_url = Some(input.into());
self
}
/// <p>The URL for your import file that you've uploaded to Amazon S3.</p>
pub fn set_import_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.import_url = input;
self
}
/// <p>The status of the import task. An import can have the status of <code>IMPORT_COMPLETE</code> and still have some records fail to import from the overall request. More information can be found in the downloadable archive defined in the <code>errorsAndFailedEntriesZip</code> field, or in the Migration Hub management console.</p>
pub fn status(mut self, input: crate::model::ImportStatus) -> Self {
self.status = Some(input);
self
}
/// <p>The status of the import task. An import can have the status of <code>IMPORT_COMPLETE</code> and still have some records fail to import from the overall request. More information can be found in the downloadable archive defined in the <code>errorsAndFailedEntriesZip</code> field, or in the Migration Hub management console.</p>
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ImportStatus>,
) -> Self {
self.status = input;
self
}
/// <p>The time that the import task request was made, presented in the Unix time stamp format.</p>
pub fn import_request_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.import_request_time = Some(input);
self
}
/// <p>The time that the import task request was made, presented in the Unix time stamp format.</p>
pub fn set_import_request_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.import_request_time = input;
self
}
/// <p>The time that the import task request finished, presented in the Unix time stamp format.</p>
pub fn import_completion_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.import_completion_time = Some(input);
self
}
/// <p>The time that the import task request finished, presented in the Unix time stamp format.</p>
pub fn set_import_completion_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.import_completion_time = input;
self
}
/// <p>The time that the import task request was deleted, presented in the Unix time stamp format.</p>
pub fn import_deleted_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.import_deleted_time = Some(input);
self
}
/// <p>The time that the import task request was deleted, presented in the Unix time stamp format.</p>
pub fn set_import_deleted_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.import_deleted_time = input;
self
}
/// <p>The total number of server records in the import file that were successfully imported.</p>
pub fn server_import_success(mut self, input: i32) -> Self {
self.server_import_success = Some(input);
self
}
/// <p>The total number of server records in the import file that were successfully imported.</p>
pub fn set_server_import_success(mut self, input: std::option::Option<i32>) -> Self {
self.server_import_success = input;
self
}
/// <p>The total number of server records in the import file that failed to be imported.</p>
pub fn server_import_failure(mut self, input: i32) -> Self {
self.server_import_failure = Some(input);
self
}
/// <p>The total number of server records in the import file that failed to be imported.</p>
pub fn set_server_import_failure(mut self, input: std::option::Option<i32>) -> Self {
self.server_import_failure = input;
self
}
/// <p>The total number of application records in the import file that were successfully imported.</p>
pub fn application_import_success(mut self, input: i32) -> Self {
self.application_import_success = Some(input);
self
}
/// <p>The total number of application records in the import file that were successfully imported.</p>
pub fn set_application_import_success(mut self, input: std::option::Option<i32>) -> Self {
self.application_import_success = input;
self
}
/// <p>The total number of application records in the import file that failed to be imported.</p>
pub fn application_import_failure(mut self, input: i32) -> Self {
self.application_import_failure = Some(input);
self
}
/// <p>The total number of application records in the import file that failed to be imported.</p>
pub fn set_application_import_failure(mut self, input: std::option::Option<i32>) -> Self {
self.application_import_failure = input;
self
}
/// <p>A link to a compressed archive folder (in the ZIP format) that contains an error log and a file of failed records. You can use these two files to quickly identify records that failed, why they failed, and correct those records. Afterward, you can upload the corrected file to your Amazon S3 bucket and create another import task request.</p>
/// <p>This field also includes authorization information so you can confirm the authenticity of the compressed archive before you download it.</p>
/// <p>If some records failed to be imported we recommend that you correct the records in the failed entries file and then imports that failed entries file. This prevents you from having to correct and update the larger original file and attempt importing it again.</p>
pub fn errors_and_failed_entries_zip(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.errors_and_failed_entries_zip = Some(input.into());
self
}
/// <p>A link to a compressed archive folder (in the ZIP format) that contains an error log and a file of failed records. You can use these two files to quickly identify records that failed, why they failed, and correct those records. Afterward, you can upload the corrected file to your Amazon S3 bucket and create another import task request.</p>
/// <p>This field also includes authorization information so you can confirm the authenticity of the compressed archive before you download it.</p>
/// <p>If some records failed to be imported we recommend that you correct the records in the failed entries file and then imports that failed entries file. This prevents you from having to correct and update the larger original file and attempt importing it again.</p>
pub fn set_errors_and_failed_entries_zip(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.errors_and_failed_entries_zip = input;
self
}
/// Consumes the builder and constructs a [`ImportTask`](crate::model::ImportTask).
pub fn build(self) -> crate::model::ImportTask {
crate::model::ImportTask {
import_task_id: self.import_task_id,
client_request_token: self.client_request_token,
name: self.name,
import_url: self.import_url,
status: self.status,
import_request_time: self.import_request_time,
import_completion_time: self.import_completion_time,
import_deleted_time: self.import_deleted_time,
server_import_success: self.server_import_success.unwrap_or_default(),
server_import_failure: self.server_import_failure.unwrap_or_default(),
application_import_success: self.application_import_success.unwrap_or_default(),
application_import_failure: self.application_import_failure.unwrap_or_default(),
errors_and_failed_entries_zip: self.errors_and_failed_entries_zip,
}
}
}
}
impl ImportTask {
/// Creates a new builder-style object to manufacture [`ImportTask`](crate::model::ImportTask).
pub fn builder() -> crate::model::import_task::Builder {
crate::model::import_task::Builder::default()
}
}
/// When writing a match expression against `ImportStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let importstatus = unimplemented!();
/// match importstatus {
/// ImportStatus::DeleteComplete => { /* ... */ },
/// ImportStatus::DeleteFailed => { /* ... */ },
/// ImportStatus::DeleteFailedLimitExceeded => { /* ... */ },
/// ImportStatus::DeleteInProgress => { /* ... */ },
/// ImportStatus::ImportComplete => { /* ... */ },
/// ImportStatus::ImportCompleteWithErrors => { /* ... */ },
/// ImportStatus::ImportFailed => { /* ... */ },
/// ImportStatus::ImportFailedRecordLimitExceeded => { /* ... */ },
/// ImportStatus::ImportFailedServerLimitExceeded => { /* ... */ },
/// ImportStatus::ImportInProgress => { /* ... */ },
/// ImportStatus::InternalError => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `importstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ImportStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ImportStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ImportStatus::NewFeature` is defined.
/// Specifically, when `importstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ImportStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ImportStatus {
#[allow(missing_docs)] // documentation missing in model
DeleteComplete,
#[allow(missing_docs)] // documentation missing in model
DeleteFailed,
#[allow(missing_docs)] // documentation missing in model
DeleteFailedLimitExceeded,
#[allow(missing_docs)] // documentation missing in model
DeleteInProgress,
#[allow(missing_docs)] // documentation missing in model
ImportComplete,
#[allow(missing_docs)] // documentation missing in model
ImportCompleteWithErrors,
#[allow(missing_docs)] // documentation missing in model
ImportFailed,
#[allow(missing_docs)] // documentation missing in model
ImportFailedRecordLimitExceeded,
#[allow(missing_docs)] // documentation missing in model
ImportFailedServerLimitExceeded,
#[allow(missing_docs)] // documentation missing in model
ImportInProgress,
#[allow(missing_docs)] // documentation missing in model
InternalError,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ImportStatus {
fn from(s: &str) -> Self {
match s {
"DELETE_COMPLETE" => ImportStatus::DeleteComplete,
"DELETE_FAILED" => ImportStatus::DeleteFailed,
"DELETE_FAILED_LIMIT_EXCEEDED" => ImportStatus::DeleteFailedLimitExceeded,
"DELETE_IN_PROGRESS" => ImportStatus::DeleteInProgress,
"IMPORT_COMPLETE" => ImportStatus::ImportComplete,
"IMPORT_COMPLETE_WITH_ERRORS" => ImportStatus::ImportCompleteWithErrors,
"IMPORT_FAILED" => ImportStatus::ImportFailed,
"IMPORT_FAILED_RECORD_LIMIT_EXCEEDED" => ImportStatus::ImportFailedRecordLimitExceeded,
"IMPORT_FAILED_SERVER_LIMIT_EXCEEDED" => ImportStatus::ImportFailedServerLimitExceeded,
"IMPORT_IN_PROGRESS" => ImportStatus::ImportInProgress,
"INTERNAL_ERROR" => ImportStatus::InternalError,
other => ImportStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ImportStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ImportStatus::from(s))
}
}
impl ImportStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ImportStatus::DeleteComplete => "DELETE_COMPLETE",
ImportStatus::DeleteFailed => "DELETE_FAILED",
ImportStatus::DeleteFailedLimitExceeded => "DELETE_FAILED_LIMIT_EXCEEDED",
ImportStatus::DeleteInProgress => "DELETE_IN_PROGRESS",
ImportStatus::ImportComplete => "IMPORT_COMPLETE",
ImportStatus::ImportCompleteWithErrors => "IMPORT_COMPLETE_WITH_ERRORS",
ImportStatus::ImportFailed => "IMPORT_FAILED",
ImportStatus::ImportFailedRecordLimitExceeded => "IMPORT_FAILED_RECORD_LIMIT_EXCEEDED",
ImportStatus::ImportFailedServerLimitExceeded => "IMPORT_FAILED_SERVER_LIMIT_EXCEEDED",
ImportStatus::ImportInProgress => "IMPORT_IN_PROGRESS",
ImportStatus::InternalError => "INTERNAL_ERROR",
ImportStatus::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&[
"DELETE_COMPLETE",
"DELETE_FAILED",
"DELETE_FAILED_LIMIT_EXCEEDED",
"DELETE_IN_PROGRESS",
"IMPORT_COMPLETE",
"IMPORT_COMPLETE_WITH_ERRORS",
"IMPORT_FAILED",
"IMPORT_FAILED_RECORD_LIMIT_EXCEEDED",
"IMPORT_FAILED_SERVER_LIMIT_EXCEEDED",
"IMPORT_IN_PROGRESS",
"INTERNAL_ERROR",
]
}
}
impl AsRef<str> for ImportStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Used to select which agent's data is to be exported. A single agent ID may be selected for export using the <a href="http://docs.aws.amazon.com/application-discovery/latest/APIReference/API_StartExportTask.html">StartExportTask</a> action.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExportFilter {
/// <p>A single <code>ExportFilter</code> name. Supported filters: <code>agentIds</code>.</p>
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// <p>A single agent ID for a Discovery Agent. An agent ID can be found using the <a href="http://docs.aws.amazon.com/application-discovery/latest/APIReference/API_DescribeAgents.html">DescribeAgents</a> action. Typically an ADS agent ID is in the form <code>o-0123456789abcdef0</code>.</p>
#[doc(hidden)]
pub values: std::option::Option<std::vec::Vec<std::string::String>>,
/// <p>Supported condition: <code>EQUALS</code> </p>
#[doc(hidden)]
pub condition: std::option::Option<std::string::String>,
}
impl ExportFilter {
/// <p>A single <code>ExportFilter</code> name. Supported filters: <code>agentIds</code>.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>A single agent ID for a Discovery Agent. An agent ID can be found using the <a href="http://docs.aws.amazon.com/application-discovery/latest/APIReference/API_DescribeAgents.html">DescribeAgents</a> action. Typically an ADS agent ID is in the form <code>o-0123456789abcdef0</code>.</p>
pub fn values(&self) -> std::option::Option<&[std::string::String]> {
self.values.as_deref()
}
/// <p>Supported condition: <code>EQUALS</code> </p>
pub fn condition(&self) -> std::option::Option<&str> {
self.condition.as_deref()
}
}
/// See [`ExportFilter`](crate::model::ExportFilter).
pub mod export_filter {
/// A builder for [`ExportFilter`](crate::model::ExportFilter).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) values: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) condition: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>A single <code>ExportFilter</code> name. Supported filters: <code>agentIds</code>.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>A single <code>ExportFilter</code> name. Supported filters: <code>agentIds</code>.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// Appends an item to `values`.
///
/// To override the contents of this collection use [`set_values`](Self::set_values).
///
/// <p>A single agent ID for a Discovery Agent. An agent ID can be found using the <a href="http://docs.aws.amazon.com/application-discovery/latest/APIReference/API_DescribeAgents.html">DescribeAgents</a> action. Typically an ADS agent ID is in the form <code>o-0123456789abcdef0</code>.</p>
pub fn values(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.values.unwrap_or_default();
v.push(input.into());
self.values = Some(v);
self
}
/// <p>A single agent ID for a Discovery Agent. An agent ID can be found using the <a href="http://docs.aws.amazon.com/application-discovery/latest/APIReference/API_DescribeAgents.html">DescribeAgents</a> action. Typically an ADS agent ID is in the form <code>o-0123456789abcdef0</code>.</p>
pub fn set_values(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.values = input;
self
}
/// <p>Supported condition: <code>EQUALS</code> </p>
pub fn condition(mut self, input: impl Into<std::string::String>) -> Self {
self.condition = Some(input.into());
self
}
/// <p>Supported condition: <code>EQUALS</code> </p>
pub fn set_condition(mut self, input: std::option::Option<std::string::String>) -> Self {
self.condition = input;
self
}
/// Consumes the builder and constructs a [`ExportFilter`](crate::model::ExportFilter).
pub fn build(self) -> crate::model::ExportFilter {
crate::model::ExportFilter {
name: self.name,
values: self.values,
condition: self.condition,
}
}
}
}
impl ExportFilter {
/// Creates a new builder-style object to manufacture [`ExportFilter`](crate::model::ExportFilter).
pub fn builder() -> crate::model::export_filter::Builder {
crate::model::export_filter::Builder::default()
}
}
/// When writing a match expression against `ExportDataFormat`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let exportdataformat = unimplemented!();
/// match exportdataformat {
/// ExportDataFormat::Csv => { /* ... */ },
/// ExportDataFormat::Graphml => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `exportdataformat` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ExportDataFormat::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ExportDataFormat::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ExportDataFormat::NewFeature` is defined.
/// Specifically, when `exportdataformat` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ExportDataFormat::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ExportDataFormat {
#[allow(missing_docs)] // documentation missing in model
Csv,
#[allow(missing_docs)] // documentation missing in model
Graphml,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ExportDataFormat {
fn from(s: &str) -> Self {
match s {
"CSV" => ExportDataFormat::Csv,
"GRAPHML" => ExportDataFormat::Graphml,
other => ExportDataFormat::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ExportDataFormat {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ExportDataFormat::from(s))
}
}
impl ExportDataFormat {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ExportDataFormat::Csv => "CSV",
ExportDataFormat::Graphml => "GRAPHML",
ExportDataFormat::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&["CSV", "GRAPHML"]
}
}
impl AsRef<str> for ExportDataFormat {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// When writing a match expression against `DataSource`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let datasource = unimplemented!();
/// match datasource {
/// DataSource::Agent => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `datasource` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DataSource::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DataSource::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DataSource::NewFeature` is defined.
/// Specifically, when `datasource` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DataSource::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DataSource {
#[allow(missing_docs)] // documentation missing in model
Agent,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DataSource {
fn from(s: &str) -> Self {
match s {
"AGENT" => DataSource::Agent,
other => DataSource::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for DataSource {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DataSource::from(s))
}
}
impl DataSource {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DataSource::Agent => "AGENT",
DataSource::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&["AGENT"]
}
}
impl AsRef<str> for DataSource {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Details about neighboring servers.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NeighborConnectionDetail {
/// <p>The ID of the server that opened the network connection.</p>
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
/// <p>The ID of the server that accepted the network connection.</p>
#[doc(hidden)]
pub destination_server_id: std::option::Option<std::string::String>,
/// <p>The destination network port for the connection.</p>
#[doc(hidden)]
pub destination_port: std::option::Option<i32>,
/// <p>The network protocol used for the connection.</p>
#[doc(hidden)]
pub transport_protocol: std::option::Option<std::string::String>,
/// <p>The number of open network connections with the neighboring server.</p>
#[doc(hidden)]
pub connections_count: i64,
}
impl NeighborConnectionDetail {
/// <p>The ID of the server that opened the network connection.</p>
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
/// <p>The ID of the server that accepted the network connection.</p>
pub fn destination_server_id(&self) -> std::option::Option<&str> {
self.destination_server_id.as_deref()
}
/// <p>The destination network port for the connection.</p>
pub fn destination_port(&self) -> std::option::Option<i32> {
self.destination_port
}
/// <p>The network protocol used for the connection.</p>
pub fn transport_protocol(&self) -> std::option::Option<&str> {
self.transport_protocol.as_deref()
}
/// <p>The number of open network connections with the neighboring server.</p>
pub fn connections_count(&self) -> i64 {
self.connections_count
}
}
/// See [`NeighborConnectionDetail`](crate::model::NeighborConnectionDetail).
pub mod neighbor_connection_detail {
/// A builder for [`NeighborConnectionDetail`](crate::model::NeighborConnectionDetail).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
pub(crate) destination_server_id: std::option::Option<std::string::String>,
pub(crate) destination_port: std::option::Option<i32>,
pub(crate) transport_protocol: std::option::Option<std::string::String>,
pub(crate) connections_count: std::option::Option<i64>,
}
impl Builder {
/// <p>The ID of the server that opened the network connection.</p>
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
/// <p>The ID of the server that opened the network connection.</p>
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
/// <p>The ID of the server that accepted the network connection.</p>
pub fn destination_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_server_id = Some(input.into());
self
}
/// <p>The ID of the server that accepted the network connection.</p>
pub fn set_destination_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_server_id = input;
self
}
/// <p>The destination network port for the connection.</p>
pub fn destination_port(mut self, input: i32) -> Self {
self.destination_port = Some(input);
self
}
/// <p>The destination network port for the connection.</p>
pub fn set_destination_port(mut self, input: std::option::Option<i32>) -> Self {
self.destination_port = input;
self
}
/// <p>The network protocol used for the connection.</p>
pub fn transport_protocol(mut self, input: impl Into<std::string::String>) -> Self {
self.transport_protocol = Some(input.into());
self
}
/// <p>The network protocol used for the connection.</p>
pub fn set_transport_protocol(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.transport_protocol = input;
self
}
/// <p>The number of open network connections with the neighboring server.</p>
pub fn connections_count(mut self, input: i64) -> Self {
self.connections_count = Some(input);
self
}
/// <p>The number of open network connections with the neighboring server.</p>
pub fn set_connections_count(mut self, input: std::option::Option<i64>) -> Self {
self.connections_count = input;
self
}
/// Consumes the builder and constructs a [`NeighborConnectionDetail`](crate::model::NeighborConnectionDetail).
pub fn build(self) -> crate::model::NeighborConnectionDetail {
crate::model::NeighborConnectionDetail {
source_server_id: self.source_server_id,
destination_server_id: self.destination_server_id,
destination_port: self.destination_port,
transport_protocol: self.transport_protocol,
connections_count: self.connections_count.unwrap_or_default(),
}
}
}
}
impl NeighborConnectionDetail {
/// Creates a new builder-style object to manufacture [`NeighborConnectionDetail`](crate::model::NeighborConnectionDetail).
pub fn builder() -> crate::model::neighbor_connection_detail::Builder {
crate::model::neighbor_connection_detail::Builder::default()
}
}
/// <p>A field and direction for ordered output.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OrderByElement {
/// <p>The field on which to order.</p>
#[doc(hidden)]
pub field_name: std::option::Option<std::string::String>,
/// <p>Ordering direction.</p>
#[doc(hidden)]
pub sort_order: std::option::Option<crate::model::OrderString>,
}
impl OrderByElement {
/// <p>The field on which to order.</p>
pub fn field_name(&self) -> std::option::Option<&str> {
self.field_name.as_deref()
}
/// <p>Ordering direction.</p>
pub fn sort_order(&self) -> std::option::Option<&crate::model::OrderString> {
self.sort_order.as_ref()
}
}
/// See [`OrderByElement`](crate::model::OrderByElement).
pub mod order_by_element {
/// A builder for [`OrderByElement`](crate::model::OrderByElement).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) field_name: std::option::Option<std::string::String>,
pub(crate) sort_order: std::option::Option<crate::model::OrderString>,
}
impl Builder {
/// <p>The field on which to order.</p>
pub fn field_name(mut self, input: impl Into<std::string::String>) -> Self {
self.field_name = Some(input.into());
self
}
/// <p>The field on which to order.</p>
pub fn set_field_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.field_name = input;
self
}
/// <p>Ordering direction.</p>
pub fn sort_order(mut self, input: crate::model::OrderString) -> Self {
self.sort_order = Some(input);
self
}
/// <p>Ordering direction.</p>
pub fn set_sort_order(
mut self,
input: std::option::Option<crate::model::OrderString>,
) -> Self {
self.sort_order = input;
self
}
/// Consumes the builder and constructs a [`OrderByElement`](crate::model::OrderByElement).
pub fn build(self) -> crate::model::OrderByElement {
crate::model::OrderByElement {
field_name: self.field_name,
sort_order: self.sort_order,
}
}
}
}
impl OrderByElement {
/// Creates a new builder-style object to manufacture [`OrderByElement`](crate::model::OrderByElement).
pub fn builder() -> crate::model::order_by_element::Builder {
crate::model::order_by_element::Builder::default()
}
}
/// When writing a match expression against `OrderString`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let orderstring = unimplemented!();
/// match orderstring {
/// OrderString::Asc => { /* ... */ },
/// OrderString::Desc => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `orderstring` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `OrderString::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `OrderString::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `OrderString::NewFeature` is defined.
/// Specifically, when `orderstring` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `OrderString::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum OrderString {
#[allow(missing_docs)] // documentation missing in model
Asc,
#[allow(missing_docs)] // documentation missing in model
Desc,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for OrderString {
fn from(s: &str) -> Self {
match s {
"ASC" => OrderString::Asc,
"DESC" => OrderString::Desc,
other => OrderString::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for OrderString {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(OrderString::from(s))
}
}
impl OrderString {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
OrderString::Asc => "ASC",
OrderString::Desc => "DESC",
OrderString::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&["ASC", "DESC"]
}
}
impl AsRef<str> for OrderString {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>A filter that can use conditional operators.</p>
/// <p>For more information about filters, see <a href="https://docs.aws.amazon.com/application-discovery/latest/userguide/discovery-api-queries.html">Querying Discovered Configuration Items</a> in the <i>Amazon Web Services Application Discovery Service User Guide</i>. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Filter {
/// <p>The name of the filter.</p>
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// <p>A string value on which to filter. For example, if you choose the <code>destinationServer.osVersion</code> filter name, you could specify <code>Ubuntu</code> for the value.</p>
#[doc(hidden)]
pub values: std::option::Option<std::vec::Vec<std::string::String>>,
/// <p>A conditional operator. The following operators are valid: EQUALS, NOT_EQUALS, CONTAINS, NOT_CONTAINS. If you specify multiple filters, the system utilizes all filters as though concatenated by <i>AND</i>. If you specify multiple values for a particular filter, the system differentiates the values using <i>OR</i>. Calling either <i>DescribeConfigurations</i> or <i>ListConfigurations</i> returns attributes of matching configuration items.</p>
#[doc(hidden)]
pub condition: std::option::Option<std::string::String>,
}
impl Filter {
/// <p>The name of the filter.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>A string value on which to filter. For example, if you choose the <code>destinationServer.osVersion</code> filter name, you could specify <code>Ubuntu</code> for the value.</p>
pub fn values(&self) -> std::option::Option<&[std::string::String]> {
self.values.as_deref()
}
/// <p>A conditional operator. The following operators are valid: EQUALS, NOT_EQUALS, CONTAINS, NOT_CONTAINS. If you specify multiple filters, the system utilizes all filters as though concatenated by <i>AND</i>. If you specify multiple values for a particular filter, the system differentiates the values using <i>OR</i>. Calling either <i>DescribeConfigurations</i> or <i>ListConfigurations</i> returns attributes of matching configuration items.</p>
pub fn condition(&self) -> std::option::Option<&str> {
self.condition.as_deref()
}
}
/// See [`Filter`](crate::model::Filter).
pub mod filter {
/// A builder for [`Filter`](crate::model::Filter).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) values: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) condition: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The name of the filter.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the filter.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// Appends an item to `values`.
///
/// To override the contents of this collection use [`set_values`](Self::set_values).
///
/// <p>A string value on which to filter. For example, if you choose the <code>destinationServer.osVersion</code> filter name, you could specify <code>Ubuntu</code> for the value.</p>
pub fn values(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.values.unwrap_or_default();
v.push(input.into());
self.values = Some(v);
self
}
/// <p>A string value on which to filter. For example, if you choose the <code>destinationServer.osVersion</code> filter name, you could specify <code>Ubuntu</code> for the value.</p>
pub fn set_values(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.values = input;
self
}
/// <p>A conditional operator. The following operators are valid: EQUALS, NOT_EQUALS, CONTAINS, NOT_CONTAINS. If you specify multiple filters, the system utilizes all filters as though concatenated by <i>AND</i>. If you specify multiple values for a particular filter, the system differentiates the values using <i>OR</i>. Calling either <i>DescribeConfigurations</i> or <i>ListConfigurations</i> returns attributes of matching configuration items.</p>
pub fn condition(mut self, input: impl Into<std::string::String>) -> Self {
self.condition = Some(input.into());
self
}
/// <p>A conditional operator. The following operators are valid: EQUALS, NOT_EQUALS, CONTAINS, NOT_CONTAINS. If you specify multiple filters, the system utilizes all filters as though concatenated by <i>AND</i>. If you specify multiple values for a particular filter, the system differentiates the values using <i>OR</i>. Calling either <i>DescribeConfigurations</i> or <i>ListConfigurations</i> returns attributes of matching configuration items.</p>
pub fn set_condition(mut self, input: std::option::Option<std::string::String>) -> Self {
self.condition = input;
self
}
/// Consumes the builder and constructs a [`Filter`](crate::model::Filter).
pub fn build(self) -> crate::model::Filter {
crate::model::Filter {
name: self.name,
values: self.values,
condition: self.condition,
}
}
}
}
impl Filter {
/// Creates a new builder-style object to manufacture [`Filter`](crate::model::Filter).
pub fn builder() -> crate::model::filter::Builder {
crate::model::filter::Builder::default()
}
}
/// When writing a match expression against `ConfigurationItemType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let configurationitemtype = unimplemented!();
/// match configurationitemtype {
/// ConfigurationItemType::Application => { /* ... */ },
/// ConfigurationItemType::Connections => { /* ... */ },
/// ConfigurationItemType::Process => { /* ... */ },
/// ConfigurationItemType::Server => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `configurationitemtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ConfigurationItemType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ConfigurationItemType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ConfigurationItemType::NewFeature` is defined.
/// Specifically, when `configurationitemtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ConfigurationItemType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ConfigurationItemType {
#[allow(missing_docs)] // documentation missing in model
Application,
#[allow(missing_docs)] // documentation missing in model
Connections,
#[allow(missing_docs)] // documentation missing in model
Process,
#[allow(missing_docs)] // documentation missing in model
Server,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ConfigurationItemType {
fn from(s: &str) -> Self {
match s {
"APPLICATION" => ConfigurationItemType::Application,
"CONNECTION" => ConfigurationItemType::Connections,
"PROCESS" => ConfigurationItemType::Process,
"SERVER" => ConfigurationItemType::Server,
other => {
ConfigurationItemType::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for ConfigurationItemType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ConfigurationItemType::from(s))
}
}
impl ConfigurationItemType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ConfigurationItemType::Application => "APPLICATION",
ConfigurationItemType::Connections => "CONNECTION",
ConfigurationItemType::Process => "PROCESS",
ConfigurationItemType::Server => "SERVER",
ConfigurationItemType::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&["APPLICATION", "CONNECTION", "PROCESS", "SERVER"]
}
}
impl AsRef<str> for ConfigurationItemType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CustomerAgentlessCollectorInfo {
#[allow(missing_docs)] // documentation missing in model
#[doc(hidden)]
pub active_agentless_collectors: i32,
#[allow(missing_docs)] // documentation missing in model
#[doc(hidden)]
pub healthy_agentless_collectors: i32,
#[allow(missing_docs)] // documentation missing in model
#[doc(hidden)]
pub deny_listed_agentless_collectors: i32,
#[allow(missing_docs)] // documentation missing in model
#[doc(hidden)]
pub shutdown_agentless_collectors: i32,
#[allow(missing_docs)] // documentation missing in model
#[doc(hidden)]
pub unhealthy_agentless_collectors: i32,
#[allow(missing_docs)] // documentation missing in model
#[doc(hidden)]
pub total_agentless_collectors: i32,
#[allow(missing_docs)] // documentation missing in model
#[doc(hidden)]
pub unknown_agentless_collectors: i32,
}
impl CustomerAgentlessCollectorInfo {
#[allow(missing_docs)] // documentation missing in model
pub fn active_agentless_collectors(&self) -> i32 {
self.active_agentless_collectors
}
#[allow(missing_docs)] // documentation missing in model
pub fn healthy_agentless_collectors(&self) -> i32 {
self.healthy_agentless_collectors
}
#[allow(missing_docs)] // documentation missing in model
pub fn deny_listed_agentless_collectors(&self) -> i32 {
self.deny_listed_agentless_collectors
}
#[allow(missing_docs)] // documentation missing in model
pub fn shutdown_agentless_collectors(&self) -> i32 {
self.shutdown_agentless_collectors
}
#[allow(missing_docs)] // documentation missing in model
pub fn unhealthy_agentless_collectors(&self) -> i32 {
self.unhealthy_agentless_collectors
}
#[allow(missing_docs)] // documentation missing in model
pub fn total_agentless_collectors(&self) -> i32 {
self.total_agentless_collectors
}
#[allow(missing_docs)] // documentation missing in model
pub fn unknown_agentless_collectors(&self) -> i32 {
self.unknown_agentless_collectors
}
}
/// See [`CustomerAgentlessCollectorInfo`](crate::model::CustomerAgentlessCollectorInfo).
pub mod customer_agentless_collector_info {
/// A builder for [`CustomerAgentlessCollectorInfo`](crate::model::CustomerAgentlessCollectorInfo).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) active_agentless_collectors: std::option::Option<i32>,
pub(crate) healthy_agentless_collectors: std::option::Option<i32>,
pub(crate) deny_listed_agentless_collectors: std::option::Option<i32>,
pub(crate) shutdown_agentless_collectors: std::option::Option<i32>,
pub(crate) unhealthy_agentless_collectors: std::option::Option<i32>,
pub(crate) total_agentless_collectors: std::option::Option<i32>,
pub(crate) unknown_agentless_collectors: std::option::Option<i32>,
}
impl Builder {
#[allow(missing_docs)] // documentation missing in model
pub fn active_agentless_collectors(mut self, input: i32) -> Self {
self.active_agentless_collectors = Some(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_active_agentless_collectors(mut self, input: std::option::Option<i32>) -> Self {
self.active_agentless_collectors = input;
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn healthy_agentless_collectors(mut self, input: i32) -> Self {
self.healthy_agentless_collectors = Some(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_healthy_agentless_collectors(mut self, input: std::option::Option<i32>) -> Self {
self.healthy_agentless_collectors = input;
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn deny_listed_agentless_collectors(mut self, input: i32) -> Self {
self.deny_listed_agentless_collectors = Some(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_deny_listed_agentless_collectors(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.deny_listed_agentless_collectors = input;
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn shutdown_agentless_collectors(mut self, input: i32) -> Self {
self.shutdown_agentless_collectors = Some(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_shutdown_agentless_collectors(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.shutdown_agentless_collectors = input;
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn unhealthy_agentless_collectors(mut self, input: i32) -> Self {
self.unhealthy_agentless_collectors = Some(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_unhealthy_agentless_collectors(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.unhealthy_agentless_collectors = input;
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn total_agentless_collectors(mut self, input: i32) -> Self {
self.total_agentless_collectors = Some(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_total_agentless_collectors(mut self, input: std::option::Option<i32>) -> Self {
self.total_agentless_collectors = input;
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn unknown_agentless_collectors(mut self, input: i32) -> Self {
self.unknown_agentless_collectors = Some(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_unknown_agentless_collectors(mut self, input: std::option::Option<i32>) -> Self {
self.unknown_agentless_collectors = input;
self
}
/// Consumes the builder and constructs a [`CustomerAgentlessCollectorInfo`](crate::model::CustomerAgentlessCollectorInfo).
pub fn build(self) -> crate::model::CustomerAgentlessCollectorInfo {
crate::model::CustomerAgentlessCollectorInfo {
active_agentless_collectors: self.active_agentless_collectors.unwrap_or_default(),
healthy_agentless_collectors: self.healthy_agentless_collectors.unwrap_or_default(),
deny_listed_agentless_collectors: self
.deny_listed_agentless_collectors
.unwrap_or_default(),
shutdown_agentless_collectors: self
.shutdown_agentless_collectors
.unwrap_or_default(),
unhealthy_agentless_collectors: self
.unhealthy_agentless_collectors
.unwrap_or_default(),
total_agentless_collectors: self.total_agentless_collectors.unwrap_or_default(),
unknown_agentless_collectors: self.unknown_agentless_collectors.unwrap_or_default(),
}
}
}
}
impl CustomerAgentlessCollectorInfo {
/// Creates a new builder-style object to manufacture [`CustomerAgentlessCollectorInfo`](crate::model::CustomerAgentlessCollectorInfo).
pub fn builder() -> crate::model::customer_agentless_collector_info::Builder {
crate::model::customer_agentless_collector_info::Builder::default()
}
}
/// <p> The inventory data for installed Migration Evaluator collectors. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CustomerMeCollectorInfo {
/// <p> The number of active Migration Evaluator collectors. </p>
#[doc(hidden)]
pub active_me_collectors: i32,
/// <p> The number of healthy Migration Evaluator collectors. </p>
#[doc(hidden)]
pub healthy_me_collectors: i32,
/// <p> The number of deny-listed Migration Evaluator collectors. </p>
#[doc(hidden)]
pub deny_listed_me_collectors: i32,
/// <p> The number of Migration Evaluator collectors with <code>SHUTDOWN</code> status. </p>
#[doc(hidden)]
pub shutdown_me_collectors: i32,
/// <p> The number of unhealthy Migration Evaluator collectors. </p>
#[doc(hidden)]
pub unhealthy_me_collectors: i32,
/// <p> The total number of Migration Evaluator collectors. </p>
#[doc(hidden)]
pub total_me_collectors: i32,
/// <p> The number of unknown Migration Evaluator collectors. </p>
#[doc(hidden)]
pub unknown_me_collectors: i32,
}
impl CustomerMeCollectorInfo {
/// <p> The number of active Migration Evaluator collectors. </p>
pub fn active_me_collectors(&self) -> i32 {
self.active_me_collectors
}
/// <p> The number of healthy Migration Evaluator collectors. </p>
pub fn healthy_me_collectors(&self) -> i32 {
self.healthy_me_collectors
}
/// <p> The number of deny-listed Migration Evaluator collectors. </p>
pub fn deny_listed_me_collectors(&self) -> i32 {
self.deny_listed_me_collectors
}
/// <p> The number of Migration Evaluator collectors with <code>SHUTDOWN</code> status. </p>
pub fn shutdown_me_collectors(&self) -> i32 {
self.shutdown_me_collectors
}
/// <p> The number of unhealthy Migration Evaluator collectors. </p>
pub fn unhealthy_me_collectors(&self) -> i32 {
self.unhealthy_me_collectors
}
/// <p> The total number of Migration Evaluator collectors. </p>
pub fn total_me_collectors(&self) -> i32 {
self.total_me_collectors
}
/// <p> The number of unknown Migration Evaluator collectors. </p>
pub fn unknown_me_collectors(&self) -> i32 {
self.unknown_me_collectors
}
}
/// See [`CustomerMeCollectorInfo`](crate::model::CustomerMeCollectorInfo).
pub mod customer_me_collector_info {
/// A builder for [`CustomerMeCollectorInfo`](crate::model::CustomerMeCollectorInfo).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) active_me_collectors: std::option::Option<i32>,
pub(crate) healthy_me_collectors: std::option::Option<i32>,
pub(crate) deny_listed_me_collectors: std::option::Option<i32>,
pub(crate) shutdown_me_collectors: std::option::Option<i32>,
pub(crate) unhealthy_me_collectors: std::option::Option<i32>,
pub(crate) total_me_collectors: std::option::Option<i32>,
pub(crate) unknown_me_collectors: std::option::Option<i32>,
}
impl Builder {
/// <p> The number of active Migration Evaluator collectors. </p>
pub fn active_me_collectors(mut self, input: i32) -> Self {
self.active_me_collectors = Some(input);
self
}
/// <p> The number of active Migration Evaluator collectors. </p>
pub fn set_active_me_collectors(mut self, input: std::option::Option<i32>) -> Self {
self.active_me_collectors = input;
self
}
/// <p> The number of healthy Migration Evaluator collectors. </p>
pub fn healthy_me_collectors(mut self, input: i32) -> Self {
self.healthy_me_collectors = Some(input);
self
}
/// <p> The number of healthy Migration Evaluator collectors. </p>
pub fn set_healthy_me_collectors(mut self, input: std::option::Option<i32>) -> Self {
self.healthy_me_collectors = input;
self
}
/// <p> The number of deny-listed Migration Evaluator collectors. </p>
pub fn deny_listed_me_collectors(mut self, input: i32) -> Self {
self.deny_listed_me_collectors = Some(input);
self
}
/// <p> The number of deny-listed Migration Evaluator collectors. </p>
pub fn set_deny_listed_me_collectors(mut self, input: std::option::Option<i32>) -> Self {
self.deny_listed_me_collectors = input;
self
}
/// <p> The number of Migration Evaluator collectors with <code>SHUTDOWN</code> status. </p>
pub fn shutdown_me_collectors(mut self, input: i32) -> Self {
self.shutdown_me_collectors = Some(input);
self
}
/// <p> The number of Migration Evaluator collectors with <code>SHUTDOWN</code> status. </p>
pub fn set_shutdown_me_collectors(mut self, input: std::option::Option<i32>) -> Self {
self.shutdown_me_collectors = input;
self
}
/// <p> The number of unhealthy Migration Evaluator collectors. </p>
pub fn unhealthy_me_collectors(mut self, input: i32) -> Self {
self.unhealthy_me_collectors = Some(input);
self
}
/// <p> The number of unhealthy Migration Evaluator collectors. </p>
pub fn set_unhealthy_me_collectors(mut self, input: std::option::Option<i32>) -> Self {
self.unhealthy_me_collectors = input;
self
}
/// <p> The total number of Migration Evaluator collectors. </p>
pub fn total_me_collectors(mut self, input: i32) -> Self {
self.total_me_collectors = Some(input);
self
}
/// <p> The total number of Migration Evaluator collectors. </p>
pub fn set_total_me_collectors(mut self, input: std::option::Option<i32>) -> Self {
self.total_me_collectors = input;
self
}
/// <p> The number of unknown Migration Evaluator collectors. </p>
pub fn unknown_me_collectors(mut self, input: i32) -> Self {
self.unknown_me_collectors = Some(input);
self
}
/// <p> The number of unknown Migration Evaluator collectors. </p>
pub fn set_unknown_me_collectors(mut self, input: std::option::Option<i32>) -> Self {
self.unknown_me_collectors = input;
self
}
/// Consumes the builder and constructs a [`CustomerMeCollectorInfo`](crate::model::CustomerMeCollectorInfo).
pub fn build(self) -> crate::model::CustomerMeCollectorInfo {
crate::model::CustomerMeCollectorInfo {
active_me_collectors: self.active_me_collectors.unwrap_or_default(),
healthy_me_collectors: self.healthy_me_collectors.unwrap_or_default(),
deny_listed_me_collectors: self.deny_listed_me_collectors.unwrap_or_default(),
shutdown_me_collectors: self.shutdown_me_collectors.unwrap_or_default(),
unhealthy_me_collectors: self.unhealthy_me_collectors.unwrap_or_default(),
total_me_collectors: self.total_me_collectors.unwrap_or_default(),
unknown_me_collectors: self.unknown_me_collectors.unwrap_or_default(),
}
}
}
}
impl CustomerMeCollectorInfo {
/// Creates a new builder-style object to manufacture [`CustomerMeCollectorInfo`](crate::model::CustomerMeCollectorInfo).
pub fn builder() -> crate::model::customer_me_collector_info::Builder {
crate::model::customer_me_collector_info::Builder::default()
}
}
/// <p>Inventory data for installed discovery connectors.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CustomerConnectorInfo {
/// <p>Number of active discovery connectors.</p>
#[doc(hidden)]
pub active_connectors: i32,
/// <p>Number of healthy discovery connectors.</p>
#[doc(hidden)]
pub healthy_connectors: i32,
/// <p>Number of blacklisted discovery connectors.</p>
#[doc(hidden)]
pub black_listed_connectors: i32,
/// <p>Number of discovery connectors with status SHUTDOWN,</p>
#[doc(hidden)]
pub shutdown_connectors: i32,
/// <p>Number of unhealthy discovery connectors.</p>
#[doc(hidden)]
pub unhealthy_connectors: i32,
/// <p>Total number of discovery connectors.</p>
#[doc(hidden)]
pub total_connectors: i32,
/// <p>Number of unknown discovery connectors.</p>
#[doc(hidden)]
pub unknown_connectors: i32,
}
impl CustomerConnectorInfo {
/// <p>Number of active discovery connectors.</p>
pub fn active_connectors(&self) -> i32 {
self.active_connectors
}
/// <p>Number of healthy discovery connectors.</p>
pub fn healthy_connectors(&self) -> i32 {
self.healthy_connectors
}
/// <p>Number of blacklisted discovery connectors.</p>
pub fn black_listed_connectors(&self) -> i32 {
self.black_listed_connectors
}
/// <p>Number of discovery connectors with status SHUTDOWN,</p>
pub fn shutdown_connectors(&self) -> i32 {
self.shutdown_connectors
}
/// <p>Number of unhealthy discovery connectors.</p>
pub fn unhealthy_connectors(&self) -> i32 {
self.unhealthy_connectors
}
/// <p>Total number of discovery connectors.</p>
pub fn total_connectors(&self) -> i32 {
self.total_connectors
}
/// <p>Number of unknown discovery connectors.</p>
pub fn unknown_connectors(&self) -> i32 {
self.unknown_connectors
}
}
/// See [`CustomerConnectorInfo`](crate::model::CustomerConnectorInfo).
pub mod customer_connector_info {
/// A builder for [`CustomerConnectorInfo`](crate::model::CustomerConnectorInfo).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) active_connectors: std::option::Option<i32>,
pub(crate) healthy_connectors: std::option::Option<i32>,
pub(crate) black_listed_connectors: std::option::Option<i32>,
pub(crate) shutdown_connectors: std::option::Option<i32>,
pub(crate) unhealthy_connectors: std::option::Option<i32>,
pub(crate) total_connectors: std::option::Option<i32>,
pub(crate) unknown_connectors: std::option::Option<i32>,
}
impl Builder {
/// <p>Number of active discovery connectors.</p>
pub fn active_connectors(mut self, input: i32) -> Self {
self.active_connectors = Some(input);
self
}
/// <p>Number of active discovery connectors.</p>
pub fn set_active_connectors(mut self, input: std::option::Option<i32>) -> Self {
self.active_connectors = input;
self
}
/// <p>Number of healthy discovery connectors.</p>
pub fn healthy_connectors(mut self, input: i32) -> Self {
self.healthy_connectors = Some(input);
self
}
/// <p>Number of healthy discovery connectors.</p>
pub fn set_healthy_connectors(mut self, input: std::option::Option<i32>) -> Self {
self.healthy_connectors = input;
self
}
/// <p>Number of blacklisted discovery connectors.</p>
pub fn black_listed_connectors(mut self, input: i32) -> Self {
self.black_listed_connectors = Some(input);
self
}
/// <p>Number of blacklisted discovery connectors.</p>
pub fn set_black_listed_connectors(mut self, input: std::option::Option<i32>) -> Self {
self.black_listed_connectors = input;
self
}
/// <p>Number of discovery connectors with status SHUTDOWN,</p>
pub fn shutdown_connectors(mut self, input: i32) -> Self {
self.shutdown_connectors = Some(input);
self
}
/// <p>Number of discovery connectors with status SHUTDOWN,</p>
pub fn set_shutdown_connectors(mut self, input: std::option::Option<i32>) -> Self {
self.shutdown_connectors = input;
self
}
/// <p>Number of unhealthy discovery connectors.</p>
pub fn unhealthy_connectors(mut self, input: i32) -> Self {
self.unhealthy_connectors = Some(input);
self
}
/// <p>Number of unhealthy discovery connectors.</p>
pub fn set_unhealthy_connectors(mut self, input: std::option::Option<i32>) -> Self {
self.unhealthy_connectors = input;
self
}
/// <p>Total number of discovery connectors.</p>
pub fn total_connectors(mut self, input: i32) -> Self {
self.total_connectors = Some(input);
self
}
/// <p>Total number of discovery connectors.</p>
pub fn set_total_connectors(mut self, input: std::option::Option<i32>) -> Self {
self.total_connectors = input;
self
}
/// <p>Number of unknown discovery connectors.</p>
pub fn unknown_connectors(mut self, input: i32) -> Self {
self.unknown_connectors = Some(input);
self
}
/// <p>Number of unknown discovery connectors.</p>
pub fn set_unknown_connectors(mut self, input: std::option::Option<i32>) -> Self {
self.unknown_connectors = input;
self
}
/// Consumes the builder and constructs a [`CustomerConnectorInfo`](crate::model::CustomerConnectorInfo).
pub fn build(self) -> crate::model::CustomerConnectorInfo {
crate::model::CustomerConnectorInfo {
active_connectors: self.active_connectors.unwrap_or_default(),
healthy_connectors: self.healthy_connectors.unwrap_or_default(),
black_listed_connectors: self.black_listed_connectors.unwrap_or_default(),
shutdown_connectors: self.shutdown_connectors.unwrap_or_default(),
unhealthy_connectors: self.unhealthy_connectors.unwrap_or_default(),
total_connectors: self.total_connectors.unwrap_or_default(),
unknown_connectors: self.unknown_connectors.unwrap_or_default(),
}
}
}
}
impl CustomerConnectorInfo {
/// Creates a new builder-style object to manufacture [`CustomerConnectorInfo`](crate::model::CustomerConnectorInfo).
pub fn builder() -> crate::model::customer_connector_info::Builder {
crate::model::customer_connector_info::Builder::default()
}
}
/// <p>Inventory data for installed discovery agents.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CustomerAgentInfo {
/// <p>Number of active discovery agents.</p>
#[doc(hidden)]
pub active_agents: i32,
/// <p>Number of healthy discovery agents</p>
#[doc(hidden)]
pub healthy_agents: i32,
/// <p>Number of blacklisted discovery agents.</p>
#[doc(hidden)]
pub black_listed_agents: i32,
/// <p>Number of discovery agents with status SHUTDOWN.</p>
#[doc(hidden)]
pub shutdown_agents: i32,
/// <p>Number of unhealthy discovery agents.</p>
#[doc(hidden)]
pub unhealthy_agents: i32,
/// <p>Total number of discovery agents.</p>
#[doc(hidden)]
pub total_agents: i32,
/// <p>Number of unknown discovery agents.</p>
#[doc(hidden)]
pub unknown_agents: i32,
}
impl CustomerAgentInfo {
/// <p>Number of active discovery agents.</p>
pub fn active_agents(&self) -> i32 {
self.active_agents
}
/// <p>Number of healthy discovery agents</p>
pub fn healthy_agents(&self) -> i32 {
self.healthy_agents
}
/// <p>Number of blacklisted discovery agents.</p>
pub fn black_listed_agents(&self) -> i32 {
self.black_listed_agents
}
/// <p>Number of discovery agents with status SHUTDOWN.</p>
pub fn shutdown_agents(&self) -> i32 {
self.shutdown_agents
}
/// <p>Number of unhealthy discovery agents.</p>
pub fn unhealthy_agents(&self) -> i32 {
self.unhealthy_agents
}
/// <p>Total number of discovery agents.</p>
pub fn total_agents(&self) -> i32 {
self.total_agents
}
/// <p>Number of unknown discovery agents.</p>
pub fn unknown_agents(&self) -> i32 {
self.unknown_agents
}
}
/// See [`CustomerAgentInfo`](crate::model::CustomerAgentInfo).
pub mod customer_agent_info {
/// A builder for [`CustomerAgentInfo`](crate::model::CustomerAgentInfo).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) active_agents: std::option::Option<i32>,
pub(crate) healthy_agents: std::option::Option<i32>,
pub(crate) black_listed_agents: std::option::Option<i32>,
pub(crate) shutdown_agents: std::option::Option<i32>,
pub(crate) unhealthy_agents: std::option::Option<i32>,
pub(crate) total_agents: std::option::Option<i32>,
pub(crate) unknown_agents: std::option::Option<i32>,
}
impl Builder {
/// <p>Number of active discovery agents.</p>
pub fn active_agents(mut self, input: i32) -> Self {
self.active_agents = Some(input);
self
}
/// <p>Number of active discovery agents.</p>
pub fn set_active_agents(mut self, input: std::option::Option<i32>) -> Self {
self.active_agents = input;
self
}
/// <p>Number of healthy discovery agents</p>
pub fn healthy_agents(mut self, input: i32) -> Self {
self.healthy_agents = Some(input);
self
}
/// <p>Number of healthy discovery agents</p>
pub fn set_healthy_agents(mut self, input: std::option::Option<i32>) -> Self {
self.healthy_agents = input;
self
}
/// <p>Number of blacklisted discovery agents.</p>
pub fn black_listed_agents(mut self, input: i32) -> Self {
self.black_listed_agents = Some(input);
self
}
/// <p>Number of blacklisted discovery agents.</p>
pub fn set_black_listed_agents(mut self, input: std::option::Option<i32>) -> Self {
self.black_listed_agents = input;
self
}
/// <p>Number of discovery agents with status SHUTDOWN.</p>
pub fn shutdown_agents(mut self, input: i32) -> Self {
self.shutdown_agents = Some(input);
self
}
/// <p>Number of discovery agents with status SHUTDOWN.</p>
pub fn set_shutdown_agents(mut self, input: std::option::Option<i32>) -> Self {
self.shutdown_agents = input;
self
}
/// <p>Number of unhealthy discovery agents.</p>
pub fn unhealthy_agents(mut self, input: i32) -> Self {
self.unhealthy_agents = Some(input);
self
}
/// <p>Number of unhealthy discovery agents.</p>
pub fn set_unhealthy_agents(mut self, input: std::option::Option<i32>) -> Self {
self.unhealthy_agents = input;
self
}
/// <p>Total number of discovery agents.</p>
pub fn total_agents(mut self, input: i32) -> Self {
self.total_agents = Some(input);
self
}
/// <p>Total number of discovery agents.</p>
pub fn set_total_agents(mut self, input: std::option::Option<i32>) -> Self {
self.total_agents = input;
self
}
/// <p>Number of unknown discovery agents.</p>
pub fn unknown_agents(mut self, input: i32) -> Self {
self.unknown_agents = Some(input);
self
}
/// <p>Number of unknown discovery agents.</p>
pub fn set_unknown_agents(mut self, input: std::option::Option<i32>) -> Self {
self.unknown_agents = input;
self
}
/// Consumes the builder and constructs a [`CustomerAgentInfo`](crate::model::CustomerAgentInfo).
pub fn build(self) -> crate::model::CustomerAgentInfo {
crate::model::CustomerAgentInfo {
active_agents: self.active_agents.unwrap_or_default(),
healthy_agents: self.healthy_agents.unwrap_or_default(),
black_listed_agents: self.black_listed_agents.unwrap_or_default(),
shutdown_agents: self.shutdown_agents.unwrap_or_default(),
unhealthy_agents: self.unhealthy_agents.unwrap_or_default(),
total_agents: self.total_agents.unwrap_or_default(),
unknown_agents: self.unknown_agents.unwrap_or_default(),
}
}
}
}
impl CustomerAgentInfo {
/// Creates a new builder-style object to manufacture [`CustomerAgentInfo`](crate::model::CustomerAgentInfo).
pub fn builder() -> crate::model::customer_agent_info::Builder {
crate::model::customer_agent_info::Builder::default()
}
}
/// <p>Tags for a configuration item. Tags are metadata that help you categorize IT assets.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConfigurationTag {
/// <p>A type of IT asset to tag.</p>
#[doc(hidden)]
pub configuration_type: std::option::Option<crate::model::ConfigurationItemType>,
/// <p>The configuration ID for the item to tag. You can specify a list of keys and values.</p>
#[doc(hidden)]
pub configuration_id: std::option::Option<std::string::String>,
/// <p>A type of tag on which to filter. For example, <i>serverType</i>.</p>
#[doc(hidden)]
pub key: std::option::Option<std::string::String>,
/// <p>A value on which to filter. For example <i>key = serverType</i> and <i>value = web server</i>.</p>
#[doc(hidden)]
pub value: std::option::Option<std::string::String>,
/// <p>The time the configuration tag was created in Coordinated Universal Time (UTC).</p>
#[doc(hidden)]
pub time_of_creation: std::option::Option<aws_smithy_types::DateTime>,
}
impl ConfigurationTag {
/// <p>A type of IT asset to tag.</p>
pub fn configuration_type(&self) -> std::option::Option<&crate::model::ConfigurationItemType> {
self.configuration_type.as_ref()
}
/// <p>The configuration ID for the item to tag. You can specify a list of keys and values.</p>
pub fn configuration_id(&self) -> std::option::Option<&str> {
self.configuration_id.as_deref()
}
/// <p>A type of tag on which to filter. For example, <i>serverType</i>.</p>
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
/// <p>A value on which to filter. For example <i>key = serverType</i> and <i>value = web server</i>.</p>
pub fn value(&self) -> std::option::Option<&str> {
self.value.as_deref()
}
/// <p>The time the configuration tag was created in Coordinated Universal Time (UTC).</p>
pub fn time_of_creation(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.time_of_creation.as_ref()
}
}
/// See [`ConfigurationTag`](crate::model::ConfigurationTag).
pub mod configuration_tag {
/// A builder for [`ConfigurationTag`](crate::model::ConfigurationTag).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_type: std::option::Option<crate::model::ConfigurationItemType>,
pub(crate) configuration_id: std::option::Option<std::string::String>,
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) value: std::option::Option<std::string::String>,
pub(crate) time_of_creation: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
/// <p>A type of IT asset to tag.</p>
pub fn configuration_type(mut self, input: crate::model::ConfigurationItemType) -> Self {
self.configuration_type = Some(input);
self
}
/// <p>A type of IT asset to tag.</p>
pub fn set_configuration_type(
mut self,
input: std::option::Option<crate::model::ConfigurationItemType>,
) -> Self {
self.configuration_type = input;
self
}
/// <p>The configuration ID for the item to tag. You can specify a list of keys and values.</p>
pub fn configuration_id(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_id = Some(input.into());
self
}
/// <p>The configuration ID for the item to tag. You can specify a list of keys and values.</p>
pub fn set_configuration_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_id = input;
self
}
/// <p>A type of tag on which to filter. For example, <i>serverType</i>.</p>
pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
self.key = Some(input.into());
self
}
/// <p>A type of tag on which to filter. For example, <i>serverType</i>.</p>
pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.key = input;
self
}
/// <p>A value on which to filter. For example <i>key = serverType</i> and <i>value = web server</i>.</p>
pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
self.value = Some(input.into());
self
}
/// <p>A value on which to filter. For example <i>key = serverType</i> and <i>value = web server</i>.</p>
pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
self.value = input;
self
}
/// <p>The time the configuration tag was created in Coordinated Universal Time (UTC).</p>
pub fn time_of_creation(mut self, input: aws_smithy_types::DateTime) -> Self {
self.time_of_creation = Some(input);
self
}
/// <p>The time the configuration tag was created in Coordinated Universal Time (UTC).</p>
pub fn set_time_of_creation(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.time_of_creation = input;
self
}
/// Consumes the builder and constructs a [`ConfigurationTag`](crate::model::ConfigurationTag).
pub fn build(self) -> crate::model::ConfigurationTag {
crate::model::ConfigurationTag {
configuration_type: self.configuration_type,
configuration_id: self.configuration_id,
key: self.key,
value: self.value,
time_of_creation: self.time_of_creation,
}
}
}
}
impl ConfigurationTag {
/// Creates a new builder-style object to manufacture [`ConfigurationTag`](crate::model::ConfigurationTag).
pub fn builder() -> crate::model::configuration_tag::Builder {
crate::model::configuration_tag::Builder::default()
}
}
/// <p>The tag filter. Valid names are: <code>tagKey</code>, <code>tagValue</code>, <code>configurationId</code>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagFilter {
/// <p>A name of the tag filter.</p>
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// <p>Values for the tag filter.</p>
#[doc(hidden)]
pub values: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl TagFilter {
/// <p>A name of the tag filter.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>Values for the tag filter.</p>
pub fn values(&self) -> std::option::Option<&[std::string::String]> {
self.values.as_deref()
}
}
/// See [`TagFilter`](crate::model::TagFilter).
pub mod tag_filter {
/// A builder for [`TagFilter`](crate::model::TagFilter).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) values: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
/// <p>A name of the tag filter.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>A name of the tag filter.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// Appends an item to `values`.
///
/// To override the contents of this collection use [`set_values`](Self::set_values).
///
/// <p>Values for the tag filter.</p>
pub fn values(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.values.unwrap_or_default();
v.push(input.into());
self.values = Some(v);
self
}
/// <p>Values for the tag filter.</p>
pub fn set_values(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.values = input;
self
}
/// Consumes the builder and constructs a [`TagFilter`](crate::model::TagFilter).
pub fn build(self) -> crate::model::TagFilter {
crate::model::TagFilter {
name: self.name,
values: self.values,
}
}
}
}
impl TagFilter {
/// Creates a new builder-style object to manufacture [`TagFilter`](crate::model::TagFilter).
pub fn builder() -> crate::model::tag_filter::Builder {
crate::model::tag_filter::Builder::default()
}
}
/// <p>A name-values pair of elements you can use to filter the results when querying your import tasks. Currently, wildcards are not supported for filters.</p> <note>
/// <p>When filtering by import status, all other filter values are ignored.</p>
/// </note>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImportTaskFilter {
/// <p>The name, status, or import task ID for a specific import task.</p>
#[doc(hidden)]
pub name: std::option::Option<crate::model::ImportTaskFilterName>,
/// <p>An array of strings that you can provide to match against a specific name, status, or import task ID to filter the results for your import task queries.</p>
#[doc(hidden)]
pub values: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl ImportTaskFilter {
/// <p>The name, status, or import task ID for a specific import task.</p>
pub fn name(&self) -> std::option::Option<&crate::model::ImportTaskFilterName> {
self.name.as_ref()
}
/// <p>An array of strings that you can provide to match against a specific name, status, or import task ID to filter the results for your import task queries.</p>
pub fn values(&self) -> std::option::Option<&[std::string::String]> {
self.values.as_deref()
}
}
/// See [`ImportTaskFilter`](crate::model::ImportTaskFilter).
pub mod import_task_filter {
/// A builder for [`ImportTaskFilter`](crate::model::ImportTaskFilter).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<crate::model::ImportTaskFilterName>,
pub(crate) values: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
/// <p>The name, status, or import task ID for a specific import task.</p>
pub fn name(mut self, input: crate::model::ImportTaskFilterName) -> Self {
self.name = Some(input);
self
}
/// <p>The name, status, or import task ID for a specific import task.</p>
pub fn set_name(
mut self,
input: std::option::Option<crate::model::ImportTaskFilterName>,
) -> Self {
self.name = input;
self
}
/// Appends an item to `values`.
///
/// To override the contents of this collection use [`set_values`](Self::set_values).
///
/// <p>An array of strings that you can provide to match against a specific name, status, or import task ID to filter the results for your import task queries.</p>
pub fn values(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.values.unwrap_or_default();
v.push(input.into());
self.values = Some(v);
self
}
/// <p>An array of strings that you can provide to match against a specific name, status, or import task ID to filter the results for your import task queries.</p>
pub fn set_values(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.values = input;
self
}
/// Consumes the builder and constructs a [`ImportTaskFilter`](crate::model::ImportTaskFilter).
pub fn build(self) -> crate::model::ImportTaskFilter {
crate::model::ImportTaskFilter {
name: self.name,
values: self.values,
}
}
}
}
impl ImportTaskFilter {
/// Creates a new builder-style object to manufacture [`ImportTaskFilter`](crate::model::ImportTaskFilter).
pub fn builder() -> crate::model::import_task_filter::Builder {
crate::model::import_task_filter::Builder::default()
}
}
/// When writing a match expression against `ImportTaskFilterName`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let importtaskfiltername = unimplemented!();
/// match importtaskfiltername {
/// ImportTaskFilterName::ImportTaskId => { /* ... */ },
/// ImportTaskFilterName::Name => { /* ... */ },
/// ImportTaskFilterName::Status => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `importtaskfiltername` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ImportTaskFilterName::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ImportTaskFilterName::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ImportTaskFilterName::NewFeature` is defined.
/// Specifically, when `importtaskfiltername` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ImportTaskFilterName::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ImportTaskFilterName {
#[allow(missing_docs)] // documentation missing in model
ImportTaskId,
#[allow(missing_docs)] // documentation missing in model
Name,
#[allow(missing_docs)] // documentation missing in model
Status,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ImportTaskFilterName {
fn from(s: &str) -> Self {
match s {
"IMPORT_TASK_ID" => ImportTaskFilterName::ImportTaskId,
"NAME" => ImportTaskFilterName::Name,
"STATUS" => ImportTaskFilterName::Status,
other => {
ImportTaskFilterName::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for ImportTaskFilterName {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ImportTaskFilterName::from(s))
}
}
impl ImportTaskFilterName {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ImportTaskFilterName::ImportTaskId => "IMPORT_TASK_ID",
ImportTaskFilterName::Name => "NAME",
ImportTaskFilterName::Status => "STATUS",
ImportTaskFilterName::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&["IMPORT_TASK_ID", "NAME", "STATUS"]
}
}
impl AsRef<str> for ImportTaskFilterName {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Information regarding the export status of discovered data. The value is an array of objects.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExportInfo {
/// <p>A unique identifier used to query an export.</p>
#[doc(hidden)]
pub export_id: std::option::Option<std::string::String>,
/// <p>The status of the data export job.</p>
#[doc(hidden)]
pub export_status: std::option::Option<crate::model::ExportStatus>,
/// <p>A status message provided for API callers.</p>
#[doc(hidden)]
pub status_message: std::option::Option<std::string::String>,
/// <p>A URL for an Amazon S3 bucket where you can review the exported data. The URL is displayed only if the export succeeded.</p>
#[doc(hidden)]
pub configurations_download_url: std::option::Option<std::string::String>,
/// <p>The time that the data export was initiated.</p>
#[doc(hidden)]
pub export_request_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>If true, the export of agent information exceeded the size limit for a single export and the exported data is incomplete for the requested time range. To address this, select a smaller time range for the export by using <code>startDate</code> and <code>endDate</code>.</p>
#[doc(hidden)]
pub is_truncated: bool,
/// <p>The value of <code>startTime</code> parameter in the <code>StartExportTask</code> request. If no <code>startTime</code> was requested, this result does not appear in <code>ExportInfo</code>.</p>
#[doc(hidden)]
pub requested_start_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The <code>endTime</code> used in the <code>StartExportTask</code> request. If no <code>endTime</code> was requested, this result does not appear in <code>ExportInfo</code>.</p>
#[doc(hidden)]
pub requested_end_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl ExportInfo {
/// <p>A unique identifier used to query an export.</p>
pub fn export_id(&self) -> std::option::Option<&str> {
self.export_id.as_deref()
}
/// <p>The status of the data export job.</p>
pub fn export_status(&self) -> std::option::Option<&crate::model::ExportStatus> {
self.export_status.as_ref()
}
/// <p>A status message provided for API callers.</p>
pub fn status_message(&self) -> std::option::Option<&str> {
self.status_message.as_deref()
}
/// <p>A URL for an Amazon S3 bucket where you can review the exported data. The URL is displayed only if the export succeeded.</p>
pub fn configurations_download_url(&self) -> std::option::Option<&str> {
self.configurations_download_url.as_deref()
}
/// <p>The time that the data export was initiated.</p>
pub fn export_request_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.export_request_time.as_ref()
}
/// <p>If true, the export of agent information exceeded the size limit for a single export and the exported data is incomplete for the requested time range. To address this, select a smaller time range for the export by using <code>startDate</code> and <code>endDate</code>.</p>
pub fn is_truncated(&self) -> bool {
self.is_truncated
}
/// <p>The value of <code>startTime</code> parameter in the <code>StartExportTask</code> request. If no <code>startTime</code> was requested, this result does not appear in <code>ExportInfo</code>.</p>
pub fn requested_start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.requested_start_time.as_ref()
}
/// <p>The <code>endTime</code> used in the <code>StartExportTask</code> request. If no <code>endTime</code> was requested, this result does not appear in <code>ExportInfo</code>.</p>
pub fn requested_end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.requested_end_time.as_ref()
}
}
/// See [`ExportInfo`](crate::model::ExportInfo).
pub mod export_info {
/// A builder for [`ExportInfo`](crate::model::ExportInfo).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) export_id: std::option::Option<std::string::String>,
pub(crate) export_status: std::option::Option<crate::model::ExportStatus>,
pub(crate) status_message: std::option::Option<std::string::String>,
pub(crate) configurations_download_url: std::option::Option<std::string::String>,
pub(crate) export_request_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) is_truncated: std::option::Option<bool>,
pub(crate) requested_start_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) requested_end_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
/// <p>A unique identifier used to query an export.</p>
pub fn export_id(mut self, input: impl Into<std::string::String>) -> Self {
self.export_id = Some(input.into());
self
}
/// <p>A unique identifier used to query an export.</p>
pub fn set_export_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.export_id = input;
self
}
/// <p>The status of the data export job.</p>
pub fn export_status(mut self, input: crate::model::ExportStatus) -> Self {
self.export_status = Some(input);
self
}
/// <p>The status of the data export job.</p>
pub fn set_export_status(
mut self,
input: std::option::Option<crate::model::ExportStatus>,
) -> Self {
self.export_status = input;
self
}
/// <p>A status message provided for API callers.</p>
pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
self.status_message = Some(input.into());
self
}
/// <p>A status message provided for API callers.</p>
pub fn set_status_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.status_message = input;
self
}
/// <p>A URL for an Amazon S3 bucket where you can review the exported data. The URL is displayed only if the export succeeded.</p>
pub fn configurations_download_url(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configurations_download_url = Some(input.into());
self
}
/// <p>A URL for an Amazon S3 bucket where you can review the exported data. The URL is displayed only if the export succeeded.</p>
pub fn set_configurations_download_url(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configurations_download_url = input;
self
}
/// <p>The time that the data export was initiated.</p>
pub fn export_request_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.export_request_time = Some(input);
self
}
/// <p>The time that the data export was initiated.</p>
pub fn set_export_request_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.export_request_time = input;
self
}
/// <p>If true, the export of agent information exceeded the size limit for a single export and the exported data is incomplete for the requested time range. To address this, select a smaller time range for the export by using <code>startDate</code> and <code>endDate</code>.</p>
pub fn is_truncated(mut self, input: bool) -> Self {
self.is_truncated = Some(input);
self
}
/// <p>If true, the export of agent information exceeded the size limit for a single export and the exported data is incomplete for the requested time range. To address this, select a smaller time range for the export by using <code>startDate</code> and <code>endDate</code>.</p>
pub fn set_is_truncated(mut self, input: std::option::Option<bool>) -> Self {
self.is_truncated = input;
self
}
/// <p>The value of <code>startTime</code> parameter in the <code>StartExportTask</code> request. If no <code>startTime</code> was requested, this result does not appear in <code>ExportInfo</code>.</p>
pub fn requested_start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.requested_start_time = Some(input);
self
}
/// <p>The value of <code>startTime</code> parameter in the <code>StartExportTask</code> request. If no <code>startTime</code> was requested, this result does not appear in <code>ExportInfo</code>.</p>
pub fn set_requested_start_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.requested_start_time = input;
self
}
/// <p>The <code>endTime</code> used in the <code>StartExportTask</code> request. If no <code>endTime</code> was requested, this result does not appear in <code>ExportInfo</code>.</p>
pub fn requested_end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.requested_end_time = Some(input);
self
}
/// <p>The <code>endTime</code> used in the <code>StartExportTask</code> request. If no <code>endTime</code> was requested, this result does not appear in <code>ExportInfo</code>.</p>
pub fn set_requested_end_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.requested_end_time = input;
self
}
/// Consumes the builder and constructs a [`ExportInfo`](crate::model::ExportInfo).
pub fn build(self) -> crate::model::ExportInfo {
crate::model::ExportInfo {
export_id: self.export_id,
export_status: self.export_status,
status_message: self.status_message,
configurations_download_url: self.configurations_download_url,
export_request_time: self.export_request_time,
is_truncated: self.is_truncated.unwrap_or_default(),
requested_start_time: self.requested_start_time,
requested_end_time: self.requested_end_time,
}
}
}
}
impl ExportInfo {
/// Creates a new builder-style object to manufacture [`ExportInfo`](crate::model::ExportInfo).
pub fn builder() -> crate::model::export_info::Builder {
crate::model::export_info::Builder::default()
}
}
/// When writing a match expression against `ExportStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let exportstatus = unimplemented!();
/// match exportstatus {
/// ExportStatus::Failed => { /* ... */ },
/// ExportStatus::InProgress => { /* ... */ },
/// ExportStatus::Succeeded => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `exportstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ExportStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ExportStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ExportStatus::NewFeature` is defined.
/// Specifically, when `exportstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ExportStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ExportStatus {
#[allow(missing_docs)] // documentation missing in model
Failed,
#[allow(missing_docs)] // documentation missing in model
InProgress,
#[allow(missing_docs)] // documentation missing in model
Succeeded,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ExportStatus {
fn from(s: &str) -> Self {
match s {
"FAILED" => ExportStatus::Failed,
"IN_PROGRESS" => ExportStatus::InProgress,
"SUCCEEDED" => ExportStatus::Succeeded,
other => ExportStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for ExportStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ExportStatus::from(s))
}
}
impl ExportStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ExportStatus::Failed => "FAILED",
ExportStatus::InProgress => "IN_PROGRESS",
ExportStatus::Succeeded => "SUCCEEDED",
ExportStatus::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&["FAILED", "IN_PROGRESS", "SUCCEEDED"]
}
}
impl AsRef<str> for ExportStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>A list of continuous export descriptions.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ContinuousExportDescription {
/// <p>The unique ID assigned to this export.</p>
#[doc(hidden)]
pub export_id: std::option::Option<std::string::String>,
/// <p>Describes the status of the export. Can be one of the following values:</p>
/// <ul>
/// <li> <p>START_IN_PROGRESS - setting up resources to start continuous export.</p> </li>
/// <li> <p>START_FAILED - an error occurred setting up continuous export. To recover, call start-continuous-export again.</p> </li>
/// <li> <p>ACTIVE - data is being exported to the customer bucket.</p> </li>
/// <li> <p>ERROR - an error occurred during export. To fix the issue, call stop-continuous-export and start-continuous-export.</p> </li>
/// <li> <p>STOP_IN_PROGRESS - stopping the export.</p> </li>
/// <li> <p>STOP_FAILED - an error occurred stopping the export. To recover, call stop-continuous-export again.</p> </li>
/// <li> <p>INACTIVE - the continuous export has been stopped. Data is no longer being exported to the customer bucket.</p> </li>
/// </ul>
#[doc(hidden)]
pub status: std::option::Option<crate::model::ContinuousExportStatus>,
/// <p>Contains information about any errors that have occurred. This data type can have the following values:</p>
/// <ul>
/// <li> <p>ACCESS_DENIED - You don’t have permission to start Data Exploration in Amazon Athena. Contact your Amazon Web Services administrator for help. For more information, see <a href="http://docs.aws.amazon.com/application-discovery/latest/userguide/setting-up.html">Setting Up Amazon Web Services Application Discovery Service</a> in the Application Discovery Service User Guide.</p> </li>
/// <li> <p>DELIVERY_STREAM_LIMIT_FAILURE - You reached the limit for Amazon Kinesis Data Firehose delivery streams. Reduce the number of streams or request a limit increase and try again. For more information, see <a href="http://docs.aws.amazon.com/streams/latest/dev/service-sizes-and-limits.html">Kinesis Data Streams Limits</a> in the Amazon Kinesis Data Streams Developer Guide.</p> </li>
/// <li> <p>FIREHOSE_ROLE_MISSING - The Data Exploration feature is in an error state because your IAM User is missing the AWSApplicationDiscoveryServiceFirehose role. Turn on Data Exploration in Amazon Athena and try again. For more information, see <a href="http://docs.aws.amazon.com/application-discovery/latest/userguide/setting-up.html#setting-up-user-policy">Step 3: Provide Application Discovery Service Access to Non-Administrator Users by Attaching Policies</a> in the Application Discovery Service User Guide.</p> </li>
/// <li> <p>FIREHOSE_STREAM_DOES_NOT_EXIST - The Data Exploration feature is in an error state because your IAM User is missing one or more of the Kinesis data delivery streams.</p> </li>
/// <li> <p>INTERNAL_FAILURE - The Data Exploration feature is in an error state because of an internal failure. Try again later. If this problem persists, contact Amazon Web Services Support.</p> </li>
/// <li> <p>LAKE_FORMATION_ACCESS_DENIED - You don't have sufficient lake formation permissions to start continuous export. For more information, see <a href="http://docs.aws.amazon.com/lake-formation/latest/dg/upgrade-glue-lake-formation.html"> Upgrading Amazon Web Services Glue Data Permissions to the Amazon Web Services Lake Formation Model </a> in the Amazon Web Services <i>Lake Formation Developer Guide</i>. </p> <p>You can use one of the following two ways to resolve this issue.</p>
/// <ol>
/// <li> <p>If you don’t want to use the Lake Formation permission model, you can change the default Data Catalog settings to use only Amazon Web Services Identity and Access Management (IAM) access control for new databases. For more information, see <a href="https://docs.aws.amazon.com/lake-formation/latest/dg/getting-started-setup.html#setup-change-cat-settings">Change Data Catalog Settings</a> in the <i>Lake Formation Developer Guide</i>.</p> </li>
/// <li> <p>You can give the service-linked IAM roles AWSServiceRoleForApplicationDiscoveryServiceContinuousExport and AWSApplicationDiscoveryServiceFirehose the required Lake Formation permissions. For more information, see <a href="https://docs.aws.amazon.com/lake-formation/latest/dg/granting-database-permissions.html"> Granting Database Permissions</a> in the <i>Lake Formation Developer Guide</i>. </p>
/// <ol>
/// <li> <p>AWSServiceRoleForApplicationDiscoveryServiceContinuousExport - Grant database creator permissions, which gives the role database creation ability and implicit permissions for any created tables. For more information, see <a href="https://docs.aws.amazon.com/lake-formation/latest/dg/implicit-permissions.html"> Implicit Lake Formation Permissions </a> in the <i>Lake Formation Developer Guide</i>.</p> </li>
/// <li> <p>AWSApplicationDiscoveryServiceFirehose - Grant describe permissions for all tables in the database.</p> </li>
/// </ol> </li>
/// </ol> </li>
/// <li> <p>S3_BUCKET_LIMIT_FAILURE - You reached the limit for Amazon S3 buckets. Reduce the number of S3 buckets or request a limit increase and try again. For more information, see <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html">Bucket Restrictions and Limitations</a> in the Amazon Simple Storage Service Developer Guide.</p> </li>
/// <li> <p>S3_NOT_SIGNED_UP - Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: <a href="https://aws.amazon.com/s3">https://aws.amazon.com/s3</a>.</p> </li>
/// </ul>
#[doc(hidden)]
pub status_detail: std::option::Option<std::string::String>,
/// <p>The name of the s3 bucket where the export data parquet files are stored.</p>
#[doc(hidden)]
pub s3_bucket: std::option::Option<std::string::String>,
/// <p>The timestamp representing when the continuous export was started.</p>
#[doc(hidden)]
pub start_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The timestamp that represents when this continuous export was stopped.</p>
#[doc(hidden)]
pub stop_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The type of data collector used to gather this data (currently only offered for AGENT).</p>
#[doc(hidden)]
pub data_source: std::option::Option<crate::model::DataSource>,
/// <p>An object which describes how the data is stored.</p>
/// <ul>
/// <li> <p> <code>databaseName</code> - the name of the Glue database used to store the schema.</p> </li>
/// </ul>
#[doc(hidden)]
pub schema_storage_config:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl ContinuousExportDescription {
/// <p>The unique ID assigned to this export.</p>
pub fn export_id(&self) -> std::option::Option<&str> {
self.export_id.as_deref()
}
/// <p>Describes the status of the export. Can be one of the following values:</p>
/// <ul>
/// <li> <p>START_IN_PROGRESS - setting up resources to start continuous export.</p> </li>
/// <li> <p>START_FAILED - an error occurred setting up continuous export. To recover, call start-continuous-export again.</p> </li>
/// <li> <p>ACTIVE - data is being exported to the customer bucket.</p> </li>
/// <li> <p>ERROR - an error occurred during export. To fix the issue, call stop-continuous-export and start-continuous-export.</p> </li>
/// <li> <p>STOP_IN_PROGRESS - stopping the export.</p> </li>
/// <li> <p>STOP_FAILED - an error occurred stopping the export. To recover, call stop-continuous-export again.</p> </li>
/// <li> <p>INACTIVE - the continuous export has been stopped. Data is no longer being exported to the customer bucket.</p> </li>
/// </ul>
pub fn status(&self) -> std::option::Option<&crate::model::ContinuousExportStatus> {
self.status.as_ref()
}
/// <p>Contains information about any errors that have occurred. This data type can have the following values:</p>
/// <ul>
/// <li> <p>ACCESS_DENIED - You don’t have permission to start Data Exploration in Amazon Athena. Contact your Amazon Web Services administrator for help. For more information, see <a href="http://docs.aws.amazon.com/application-discovery/latest/userguide/setting-up.html">Setting Up Amazon Web Services Application Discovery Service</a> in the Application Discovery Service User Guide.</p> </li>
/// <li> <p>DELIVERY_STREAM_LIMIT_FAILURE - You reached the limit for Amazon Kinesis Data Firehose delivery streams. Reduce the number of streams or request a limit increase and try again. For more information, see <a href="http://docs.aws.amazon.com/streams/latest/dev/service-sizes-and-limits.html">Kinesis Data Streams Limits</a> in the Amazon Kinesis Data Streams Developer Guide.</p> </li>
/// <li> <p>FIREHOSE_ROLE_MISSING - The Data Exploration feature is in an error state because your IAM User is missing the AWSApplicationDiscoveryServiceFirehose role. Turn on Data Exploration in Amazon Athena and try again. For more information, see <a href="http://docs.aws.amazon.com/application-discovery/latest/userguide/setting-up.html#setting-up-user-policy">Step 3: Provide Application Discovery Service Access to Non-Administrator Users by Attaching Policies</a> in the Application Discovery Service User Guide.</p> </li>
/// <li> <p>FIREHOSE_STREAM_DOES_NOT_EXIST - The Data Exploration feature is in an error state because your IAM User is missing one or more of the Kinesis data delivery streams.</p> </li>
/// <li> <p>INTERNAL_FAILURE - The Data Exploration feature is in an error state because of an internal failure. Try again later. If this problem persists, contact Amazon Web Services Support.</p> </li>
/// <li> <p>LAKE_FORMATION_ACCESS_DENIED - You don't have sufficient lake formation permissions to start continuous export. For more information, see <a href="http://docs.aws.amazon.com/lake-formation/latest/dg/upgrade-glue-lake-formation.html"> Upgrading Amazon Web Services Glue Data Permissions to the Amazon Web Services Lake Formation Model </a> in the Amazon Web Services <i>Lake Formation Developer Guide</i>. </p> <p>You can use one of the following two ways to resolve this issue.</p>
/// <ol>
/// <li> <p>If you don’t want to use the Lake Formation permission model, you can change the default Data Catalog settings to use only Amazon Web Services Identity and Access Management (IAM) access control for new databases. For more information, see <a href="https://docs.aws.amazon.com/lake-formation/latest/dg/getting-started-setup.html#setup-change-cat-settings">Change Data Catalog Settings</a> in the <i>Lake Formation Developer Guide</i>.</p> </li>
/// <li> <p>You can give the service-linked IAM roles AWSServiceRoleForApplicationDiscoveryServiceContinuousExport and AWSApplicationDiscoveryServiceFirehose the required Lake Formation permissions. For more information, see <a href="https://docs.aws.amazon.com/lake-formation/latest/dg/granting-database-permissions.html"> Granting Database Permissions</a> in the <i>Lake Formation Developer Guide</i>. </p>
/// <ol>
/// <li> <p>AWSServiceRoleForApplicationDiscoveryServiceContinuousExport - Grant database creator permissions, which gives the role database creation ability and implicit permissions for any created tables. For more information, see <a href="https://docs.aws.amazon.com/lake-formation/latest/dg/implicit-permissions.html"> Implicit Lake Formation Permissions </a> in the <i>Lake Formation Developer Guide</i>.</p> </li>
/// <li> <p>AWSApplicationDiscoveryServiceFirehose - Grant describe permissions for all tables in the database.</p> </li>
/// </ol> </li>
/// </ol> </li>
/// <li> <p>S3_BUCKET_LIMIT_FAILURE - You reached the limit for Amazon S3 buckets. Reduce the number of S3 buckets or request a limit increase and try again. For more information, see <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html">Bucket Restrictions and Limitations</a> in the Amazon Simple Storage Service Developer Guide.</p> </li>
/// <li> <p>S3_NOT_SIGNED_UP - Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: <a href="https://aws.amazon.com/s3">https://aws.amazon.com/s3</a>.</p> </li>
/// </ul>
pub fn status_detail(&self) -> std::option::Option<&str> {
self.status_detail.as_deref()
}
/// <p>The name of the s3 bucket where the export data parquet files are stored.</p>
pub fn s3_bucket(&self) -> std::option::Option<&str> {
self.s3_bucket.as_deref()
}
/// <p>The timestamp representing when the continuous export was started.</p>
pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.start_time.as_ref()
}
/// <p>The timestamp that represents when this continuous export was stopped.</p>
pub fn stop_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.stop_time.as_ref()
}
/// <p>The type of data collector used to gather this data (currently only offered for AGENT).</p>
pub fn data_source(&self) -> std::option::Option<&crate::model::DataSource> {
self.data_source.as_ref()
}
/// <p>An object which describes how the data is stored.</p>
/// <ul>
/// <li> <p> <code>databaseName</code> - the name of the Glue database used to store the schema.</p> </li>
/// </ul>
pub fn schema_storage_config(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.schema_storage_config.as_ref()
}
}
/// See [`ContinuousExportDescription`](crate::model::ContinuousExportDescription).
pub mod continuous_export_description {
/// A builder for [`ContinuousExportDescription`](crate::model::ContinuousExportDescription).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) export_id: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::ContinuousExportStatus>,
pub(crate) status_detail: std::option::Option<std::string::String>,
pub(crate) s3_bucket: std::option::Option<std::string::String>,
pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) stop_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) data_source: std::option::Option<crate::model::DataSource>,
pub(crate) schema_storage_config: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
/// <p>The unique ID assigned to this export.</p>
pub fn export_id(mut self, input: impl Into<std::string::String>) -> Self {
self.export_id = Some(input.into());
self
}
/// <p>The unique ID assigned to this export.</p>
pub fn set_export_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.export_id = input;
self
}
/// <p>Describes the status of the export. Can be one of the following values:</p>
/// <ul>
/// <li> <p>START_IN_PROGRESS - setting up resources to start continuous export.</p> </li>
/// <li> <p>START_FAILED - an error occurred setting up continuous export. To recover, call start-continuous-export again.</p> </li>
/// <li> <p>ACTIVE - data is being exported to the customer bucket.</p> </li>
/// <li> <p>ERROR - an error occurred during export. To fix the issue, call stop-continuous-export and start-continuous-export.</p> </li>
/// <li> <p>STOP_IN_PROGRESS - stopping the export.</p> </li>
/// <li> <p>STOP_FAILED - an error occurred stopping the export. To recover, call stop-continuous-export again.</p> </li>
/// <li> <p>INACTIVE - the continuous export has been stopped. Data is no longer being exported to the customer bucket.</p> </li>
/// </ul>
pub fn status(mut self, input: crate::model::ContinuousExportStatus) -> Self {
self.status = Some(input);
self
}
/// <p>Describes the status of the export. Can be one of the following values:</p>
/// <ul>
/// <li> <p>START_IN_PROGRESS - setting up resources to start continuous export.</p> </li>
/// <li> <p>START_FAILED - an error occurred setting up continuous export. To recover, call start-continuous-export again.</p> </li>
/// <li> <p>ACTIVE - data is being exported to the customer bucket.</p> </li>
/// <li> <p>ERROR - an error occurred during export. To fix the issue, call stop-continuous-export and start-continuous-export.</p> </li>
/// <li> <p>STOP_IN_PROGRESS - stopping the export.</p> </li>
/// <li> <p>STOP_FAILED - an error occurred stopping the export. To recover, call stop-continuous-export again.</p> </li>
/// <li> <p>INACTIVE - the continuous export has been stopped. Data is no longer being exported to the customer bucket.</p> </li>
/// </ul>
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ContinuousExportStatus>,
) -> Self {
self.status = input;
self
}
/// <p>Contains information about any errors that have occurred. This data type can have the following values:</p>
/// <ul>
/// <li> <p>ACCESS_DENIED - You don’t have permission to start Data Exploration in Amazon Athena. Contact your Amazon Web Services administrator for help. For more information, see <a href="http://docs.aws.amazon.com/application-discovery/latest/userguide/setting-up.html">Setting Up Amazon Web Services Application Discovery Service</a> in the Application Discovery Service User Guide.</p> </li>
/// <li> <p>DELIVERY_STREAM_LIMIT_FAILURE - You reached the limit for Amazon Kinesis Data Firehose delivery streams. Reduce the number of streams or request a limit increase and try again. For more information, see <a href="http://docs.aws.amazon.com/streams/latest/dev/service-sizes-and-limits.html">Kinesis Data Streams Limits</a> in the Amazon Kinesis Data Streams Developer Guide.</p> </li>
/// <li> <p>FIREHOSE_ROLE_MISSING - The Data Exploration feature is in an error state because your IAM User is missing the AWSApplicationDiscoveryServiceFirehose role. Turn on Data Exploration in Amazon Athena and try again. For more information, see <a href="http://docs.aws.amazon.com/application-discovery/latest/userguide/setting-up.html#setting-up-user-policy">Step 3: Provide Application Discovery Service Access to Non-Administrator Users by Attaching Policies</a> in the Application Discovery Service User Guide.</p> </li>
/// <li> <p>FIREHOSE_STREAM_DOES_NOT_EXIST - The Data Exploration feature is in an error state because your IAM User is missing one or more of the Kinesis data delivery streams.</p> </li>
/// <li> <p>INTERNAL_FAILURE - The Data Exploration feature is in an error state because of an internal failure. Try again later. If this problem persists, contact Amazon Web Services Support.</p> </li>
/// <li> <p>LAKE_FORMATION_ACCESS_DENIED - You don't have sufficient lake formation permissions to start continuous export. For more information, see <a href="http://docs.aws.amazon.com/lake-formation/latest/dg/upgrade-glue-lake-formation.html"> Upgrading Amazon Web Services Glue Data Permissions to the Amazon Web Services Lake Formation Model </a> in the Amazon Web Services <i>Lake Formation Developer Guide</i>. </p> <p>You can use one of the following two ways to resolve this issue.</p>
/// <ol>
/// <li> <p>If you don’t want to use the Lake Formation permission model, you can change the default Data Catalog settings to use only Amazon Web Services Identity and Access Management (IAM) access control for new databases. For more information, see <a href="https://docs.aws.amazon.com/lake-formation/latest/dg/getting-started-setup.html#setup-change-cat-settings">Change Data Catalog Settings</a> in the <i>Lake Formation Developer Guide</i>.</p> </li>
/// <li> <p>You can give the service-linked IAM roles AWSServiceRoleForApplicationDiscoveryServiceContinuousExport and AWSApplicationDiscoveryServiceFirehose the required Lake Formation permissions. For more information, see <a href="https://docs.aws.amazon.com/lake-formation/latest/dg/granting-database-permissions.html"> Granting Database Permissions</a> in the <i>Lake Formation Developer Guide</i>. </p>
/// <ol>
/// <li> <p>AWSServiceRoleForApplicationDiscoveryServiceContinuousExport - Grant database creator permissions, which gives the role database creation ability and implicit permissions for any created tables. For more information, see <a href="https://docs.aws.amazon.com/lake-formation/latest/dg/implicit-permissions.html"> Implicit Lake Formation Permissions </a> in the <i>Lake Formation Developer Guide</i>.</p> </li>
/// <li> <p>AWSApplicationDiscoveryServiceFirehose - Grant describe permissions for all tables in the database.</p> </li>
/// </ol> </li>
/// </ol> </li>
/// <li> <p>S3_BUCKET_LIMIT_FAILURE - You reached the limit for Amazon S3 buckets. Reduce the number of S3 buckets or request a limit increase and try again. For more information, see <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html">Bucket Restrictions and Limitations</a> in the Amazon Simple Storage Service Developer Guide.</p> </li>
/// <li> <p>S3_NOT_SIGNED_UP - Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: <a href="https://aws.amazon.com/s3">https://aws.amazon.com/s3</a>.</p> </li>
/// </ul>
pub fn status_detail(mut self, input: impl Into<std::string::String>) -> Self {
self.status_detail = Some(input.into());
self
}
/// <p>Contains information about any errors that have occurred. This data type can have the following values:</p>
/// <ul>
/// <li> <p>ACCESS_DENIED - You don’t have permission to start Data Exploration in Amazon Athena. Contact your Amazon Web Services administrator for help. For more information, see <a href="http://docs.aws.amazon.com/application-discovery/latest/userguide/setting-up.html">Setting Up Amazon Web Services Application Discovery Service</a> in the Application Discovery Service User Guide.</p> </li>
/// <li> <p>DELIVERY_STREAM_LIMIT_FAILURE - You reached the limit for Amazon Kinesis Data Firehose delivery streams. Reduce the number of streams or request a limit increase and try again. For more information, see <a href="http://docs.aws.amazon.com/streams/latest/dev/service-sizes-and-limits.html">Kinesis Data Streams Limits</a> in the Amazon Kinesis Data Streams Developer Guide.</p> </li>
/// <li> <p>FIREHOSE_ROLE_MISSING - The Data Exploration feature is in an error state because your IAM User is missing the AWSApplicationDiscoveryServiceFirehose role. Turn on Data Exploration in Amazon Athena and try again. For more information, see <a href="http://docs.aws.amazon.com/application-discovery/latest/userguide/setting-up.html#setting-up-user-policy">Step 3: Provide Application Discovery Service Access to Non-Administrator Users by Attaching Policies</a> in the Application Discovery Service User Guide.</p> </li>
/// <li> <p>FIREHOSE_STREAM_DOES_NOT_EXIST - The Data Exploration feature is in an error state because your IAM User is missing one or more of the Kinesis data delivery streams.</p> </li>
/// <li> <p>INTERNAL_FAILURE - The Data Exploration feature is in an error state because of an internal failure. Try again later. If this problem persists, contact Amazon Web Services Support.</p> </li>
/// <li> <p>LAKE_FORMATION_ACCESS_DENIED - You don't have sufficient lake formation permissions to start continuous export. For more information, see <a href="http://docs.aws.amazon.com/lake-formation/latest/dg/upgrade-glue-lake-formation.html"> Upgrading Amazon Web Services Glue Data Permissions to the Amazon Web Services Lake Formation Model </a> in the Amazon Web Services <i>Lake Formation Developer Guide</i>. </p> <p>You can use one of the following two ways to resolve this issue.</p>
/// <ol>
/// <li> <p>If you don’t want to use the Lake Formation permission model, you can change the default Data Catalog settings to use only Amazon Web Services Identity and Access Management (IAM) access control for new databases. For more information, see <a href="https://docs.aws.amazon.com/lake-formation/latest/dg/getting-started-setup.html#setup-change-cat-settings">Change Data Catalog Settings</a> in the <i>Lake Formation Developer Guide</i>.</p> </li>
/// <li> <p>You can give the service-linked IAM roles AWSServiceRoleForApplicationDiscoveryServiceContinuousExport and AWSApplicationDiscoveryServiceFirehose the required Lake Formation permissions. For more information, see <a href="https://docs.aws.amazon.com/lake-formation/latest/dg/granting-database-permissions.html"> Granting Database Permissions</a> in the <i>Lake Formation Developer Guide</i>. </p>
/// <ol>
/// <li> <p>AWSServiceRoleForApplicationDiscoveryServiceContinuousExport - Grant database creator permissions, which gives the role database creation ability and implicit permissions for any created tables. For more information, see <a href="https://docs.aws.amazon.com/lake-formation/latest/dg/implicit-permissions.html"> Implicit Lake Formation Permissions </a> in the <i>Lake Formation Developer Guide</i>.</p> </li>
/// <li> <p>AWSApplicationDiscoveryServiceFirehose - Grant describe permissions for all tables in the database.</p> </li>
/// </ol> </li>
/// </ol> </li>
/// <li> <p>S3_BUCKET_LIMIT_FAILURE - You reached the limit for Amazon S3 buckets. Reduce the number of S3 buckets or request a limit increase and try again. For more information, see <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html">Bucket Restrictions and Limitations</a> in the Amazon Simple Storage Service Developer Guide.</p> </li>
/// <li> <p>S3_NOT_SIGNED_UP - Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: <a href="https://aws.amazon.com/s3">https://aws.amazon.com/s3</a>.</p> </li>
/// </ul>
pub fn set_status_detail(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.status_detail = input;
self
}
/// <p>The name of the s3 bucket where the export data parquet files are stored.</p>
pub fn s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.s3_bucket = Some(input.into());
self
}
/// <p>The name of the s3 bucket where the export data parquet files are stored.</p>
pub fn set_s3_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
self.s3_bucket = input;
self
}
/// <p>The timestamp representing when the continuous export was started.</p>
pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.start_time = Some(input);
self
}
/// <p>The timestamp representing when the continuous export was started.</p>
pub fn set_start_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.start_time = input;
self
}
/// <p>The timestamp that represents when this continuous export was stopped.</p>
pub fn stop_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.stop_time = Some(input);
self
}
/// <p>The timestamp that represents when this continuous export was stopped.</p>
pub fn set_stop_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.stop_time = input;
self
}
/// <p>The type of data collector used to gather this data (currently only offered for AGENT).</p>
pub fn data_source(mut self, input: crate::model::DataSource) -> Self {
self.data_source = Some(input);
self
}
/// <p>The type of data collector used to gather this data (currently only offered for AGENT).</p>
pub fn set_data_source(
mut self,
input: std::option::Option<crate::model::DataSource>,
) -> Self {
self.data_source = input;
self
}
/// Adds a key-value pair to `schema_storage_config`.
///
/// To override the contents of this collection use [`set_schema_storage_config`](Self::set_schema_storage_config).
///
/// <p>An object which describes how the data is stored.</p>
/// <ul>
/// <li> <p> <code>databaseName</code> - the name of the Glue database used to store the schema.</p> </li>
/// </ul>
pub fn schema_storage_config(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.schema_storage_config.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.schema_storage_config = Some(hash_map);
self
}
/// <p>An object which describes how the data is stored.</p>
/// <ul>
/// <li> <p> <code>databaseName</code> - the name of the Glue database used to store the schema.</p> </li>
/// </ul>
pub fn set_schema_storage_config(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.schema_storage_config = input;
self
}
/// Consumes the builder and constructs a [`ContinuousExportDescription`](crate::model::ContinuousExportDescription).
pub fn build(self) -> crate::model::ContinuousExportDescription {
crate::model::ContinuousExportDescription {
export_id: self.export_id,
status: self.status,
status_detail: self.status_detail,
s3_bucket: self.s3_bucket,
start_time: self.start_time,
stop_time: self.stop_time,
data_source: self.data_source,
schema_storage_config: self.schema_storage_config,
}
}
}
}
impl ContinuousExportDescription {
/// Creates a new builder-style object to manufacture [`ContinuousExportDescription`](crate::model::ContinuousExportDescription).
pub fn builder() -> crate::model::continuous_export_description::Builder {
crate::model::continuous_export_description::Builder::default()
}
}
/// When writing a match expression against `ContinuousExportStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let continuousexportstatus = unimplemented!();
/// match continuousexportstatus {
/// ContinuousExportStatus::Active => { /* ... */ },
/// ContinuousExportStatus::Error => { /* ... */ },
/// ContinuousExportStatus::Inactive => { /* ... */ },
/// ContinuousExportStatus::StartFailed => { /* ... */ },
/// ContinuousExportStatus::StartInProgress => { /* ... */ },
/// ContinuousExportStatus::StopFailed => { /* ... */ },
/// ContinuousExportStatus::StopInProgress => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `continuousexportstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ContinuousExportStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ContinuousExportStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ContinuousExportStatus::NewFeature` is defined.
/// Specifically, when `continuousexportstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ContinuousExportStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ContinuousExportStatus {
#[allow(missing_docs)] // documentation missing in model
Active,
#[allow(missing_docs)] // documentation missing in model
Error,
#[allow(missing_docs)] // documentation missing in model
Inactive,
#[allow(missing_docs)] // documentation missing in model
StartFailed,
#[allow(missing_docs)] // documentation missing in model
StartInProgress,
#[allow(missing_docs)] // documentation missing in model
StopFailed,
#[allow(missing_docs)] // documentation missing in model
StopInProgress,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ContinuousExportStatus {
fn from(s: &str) -> Self {
match s {
"ACTIVE" => ContinuousExportStatus::Active,
"ERROR" => ContinuousExportStatus::Error,
"INACTIVE" => ContinuousExportStatus::Inactive,
"START_FAILED" => ContinuousExportStatus::StartFailed,
"START_IN_PROGRESS" => ContinuousExportStatus::StartInProgress,
"STOP_FAILED" => ContinuousExportStatus::StopFailed,
"STOP_IN_PROGRESS" => ContinuousExportStatus::StopInProgress,
other => {
ContinuousExportStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
}
}
}
}
impl std::str::FromStr for ContinuousExportStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ContinuousExportStatus::from(s))
}
}
impl ContinuousExportStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ContinuousExportStatus::Active => "ACTIVE",
ContinuousExportStatus::Error => "ERROR",
ContinuousExportStatus::Inactive => "INACTIVE",
ContinuousExportStatus::StartFailed => "START_FAILED",
ContinuousExportStatus::StartInProgress => "START_IN_PROGRESS",
ContinuousExportStatus::StopFailed => "STOP_FAILED",
ContinuousExportStatus::StopInProgress => "STOP_IN_PROGRESS",
ContinuousExportStatus::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&[
"ACTIVE",
"ERROR",
"INACTIVE",
"START_FAILED",
"START_IN_PROGRESS",
"STOP_FAILED",
"STOP_IN_PROGRESS",
]
}
}
impl AsRef<str> for ContinuousExportStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Information about agents or connectors associated with the user’s Amazon Web Services account. Information includes agent or connector IDs, IP addresses, media access control (MAC) addresses, agent or connector health, hostname where the agent or connector resides, and agent version for each agent.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AgentInfo {
/// <p>The agent or connector ID.</p>
#[doc(hidden)]
pub agent_id: std::option::Option<std::string::String>,
/// <p>The name of the host where the agent or connector resides. The host can be a server or virtual machine.</p>
#[doc(hidden)]
pub host_name: std::option::Option<std::string::String>,
/// <p>Network details about the host where the agent or connector resides.</p>
#[doc(hidden)]
pub agent_network_info_list: std::option::Option<std::vec::Vec<crate::model::AgentNetworkInfo>>,
/// <p>The ID of the connector.</p>
#[doc(hidden)]
pub connector_id: std::option::Option<std::string::String>,
/// <p>The agent or connector version.</p>
#[doc(hidden)]
pub version: std::option::Option<std::string::String>,
/// <p>The health of the agent or connector.</p>
#[doc(hidden)]
pub health: std::option::Option<crate::model::AgentStatus>,
/// <p>Time since agent or connector health was reported.</p>
#[doc(hidden)]
pub last_health_ping_time: std::option::Option<std::string::String>,
/// <p>Status of the collection process for an agent or connector.</p>
#[doc(hidden)]
pub collection_status: std::option::Option<std::string::String>,
/// <p>Type of agent.</p>
#[doc(hidden)]
pub agent_type: std::option::Option<std::string::String>,
/// <p>Agent's first registration timestamp in UTC.</p>
#[doc(hidden)]
pub registered_time: std::option::Option<std::string::String>,
}
impl AgentInfo {
/// <p>The agent or connector ID.</p>
pub fn agent_id(&self) -> std::option::Option<&str> {
self.agent_id.as_deref()
}
/// <p>The name of the host where the agent or connector resides. The host can be a server or virtual machine.</p>
pub fn host_name(&self) -> std::option::Option<&str> {
self.host_name.as_deref()
}
/// <p>Network details about the host where the agent or connector resides.</p>
pub fn agent_network_info_list(
&self,
) -> std::option::Option<&[crate::model::AgentNetworkInfo]> {
self.agent_network_info_list.as_deref()
}
/// <p>The ID of the connector.</p>
pub fn connector_id(&self) -> std::option::Option<&str> {
self.connector_id.as_deref()
}
/// <p>The agent or connector version.</p>
pub fn version(&self) -> std::option::Option<&str> {
self.version.as_deref()
}
/// <p>The health of the agent or connector.</p>
pub fn health(&self) -> std::option::Option<&crate::model::AgentStatus> {
self.health.as_ref()
}
/// <p>Time since agent or connector health was reported.</p>
pub fn last_health_ping_time(&self) -> std::option::Option<&str> {
self.last_health_ping_time.as_deref()
}
/// <p>Status of the collection process for an agent or connector.</p>
pub fn collection_status(&self) -> std::option::Option<&str> {
self.collection_status.as_deref()
}
/// <p>Type of agent.</p>
pub fn agent_type(&self) -> std::option::Option<&str> {
self.agent_type.as_deref()
}
/// <p>Agent's first registration timestamp in UTC.</p>
pub fn registered_time(&self) -> std::option::Option<&str> {
self.registered_time.as_deref()
}
}
/// See [`AgentInfo`](crate::model::AgentInfo).
pub mod agent_info {
/// A builder for [`AgentInfo`](crate::model::AgentInfo).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) agent_id: std::option::Option<std::string::String>,
pub(crate) host_name: std::option::Option<std::string::String>,
pub(crate) agent_network_info_list:
std::option::Option<std::vec::Vec<crate::model::AgentNetworkInfo>>,
pub(crate) connector_id: std::option::Option<std::string::String>,
pub(crate) version: std::option::Option<std::string::String>,
pub(crate) health: std::option::Option<crate::model::AgentStatus>,
pub(crate) last_health_ping_time: std::option::Option<std::string::String>,
pub(crate) collection_status: std::option::Option<std::string::String>,
pub(crate) agent_type: std::option::Option<std::string::String>,
pub(crate) registered_time: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The agent or connector ID.</p>
pub fn agent_id(mut self, input: impl Into<std::string::String>) -> Self {
self.agent_id = Some(input.into());
self
}
/// <p>The agent or connector ID.</p>
pub fn set_agent_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.agent_id = input;
self
}
/// <p>The name of the host where the agent or connector resides. The host can be a server or virtual machine.</p>
pub fn host_name(mut self, input: impl Into<std::string::String>) -> Self {
self.host_name = Some(input.into());
self
}
/// <p>The name of the host where the agent or connector resides. The host can be a server or virtual machine.</p>
pub fn set_host_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.host_name = input;
self
}
/// Appends an item to `agent_network_info_list`.
///
/// To override the contents of this collection use [`set_agent_network_info_list`](Self::set_agent_network_info_list).
///
/// <p>Network details about the host where the agent or connector resides.</p>
pub fn agent_network_info_list(mut self, input: crate::model::AgentNetworkInfo) -> Self {
let mut v = self.agent_network_info_list.unwrap_or_default();
v.push(input);
self.agent_network_info_list = Some(v);
self
}
/// <p>Network details about the host where the agent or connector resides.</p>
pub fn set_agent_network_info_list(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AgentNetworkInfo>>,
) -> Self {
self.agent_network_info_list = input;
self
}
/// <p>The ID of the connector.</p>
pub fn connector_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connector_id = Some(input.into());
self
}
/// <p>The ID of the connector.</p>
pub fn set_connector_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.connector_id = input;
self
}
/// <p>The agent or connector version.</p>
pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
self.version = Some(input.into());
self
}
/// <p>The agent or connector version.</p>
pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version = input;
self
}
/// <p>The health of the agent or connector.</p>
pub fn health(mut self, input: crate::model::AgentStatus) -> Self {
self.health = Some(input);
self
}
/// <p>The health of the agent or connector.</p>
pub fn set_health(mut self, input: std::option::Option<crate::model::AgentStatus>) -> Self {
self.health = input;
self
}
/// <p>Time since agent or connector health was reported.</p>
pub fn last_health_ping_time(mut self, input: impl Into<std::string::String>) -> Self {
self.last_health_ping_time = Some(input.into());
self
}
/// <p>Time since agent or connector health was reported.</p>
pub fn set_last_health_ping_time(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.last_health_ping_time = input;
self
}
/// <p>Status of the collection process for an agent or connector.</p>
pub fn collection_status(mut self, input: impl Into<std::string::String>) -> Self {
self.collection_status = Some(input.into());
self
}
/// <p>Status of the collection process for an agent or connector.</p>
pub fn set_collection_status(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.collection_status = input;
self
}
/// <p>Type of agent.</p>
pub fn agent_type(mut self, input: impl Into<std::string::String>) -> Self {
self.agent_type = Some(input.into());
self
}
/// <p>Type of agent.</p>
pub fn set_agent_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.agent_type = input;
self
}
/// <p>Agent's first registration timestamp in UTC.</p>
pub fn registered_time(mut self, input: impl Into<std::string::String>) -> Self {
self.registered_time = Some(input.into());
self
}
/// <p>Agent's first registration timestamp in UTC.</p>
pub fn set_registered_time(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.registered_time = input;
self
}
/// Consumes the builder and constructs a [`AgentInfo`](crate::model::AgentInfo).
pub fn build(self) -> crate::model::AgentInfo {
crate::model::AgentInfo {
agent_id: self.agent_id,
host_name: self.host_name,
agent_network_info_list: self.agent_network_info_list,
connector_id: self.connector_id,
version: self.version,
health: self.health,
last_health_ping_time: self.last_health_ping_time,
collection_status: self.collection_status,
agent_type: self.agent_type,
registered_time: self.registered_time,
}
}
}
}
impl AgentInfo {
/// Creates a new builder-style object to manufacture [`AgentInfo`](crate::model::AgentInfo).
pub fn builder() -> crate::model::agent_info::Builder {
crate::model::agent_info::Builder::default()
}
}
/// When writing a match expression against `AgentStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let agentstatus = unimplemented!();
/// match agentstatus {
/// AgentStatus::Blacklisted => { /* ... */ },
/// AgentStatus::Healthy => { /* ... */ },
/// AgentStatus::Running => { /* ... */ },
/// AgentStatus::Shutdown => { /* ... */ },
/// AgentStatus::Unhealthy => { /* ... */ },
/// AgentStatus::UnknownValue => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `agentstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AgentStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AgentStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AgentStatus::NewFeature` is defined.
/// Specifically, when `agentstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AgentStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
/// _Note: `AgentStatus::Unknown` has been renamed to `::UnknownValue`._
#[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 AgentStatus {
#[allow(missing_docs)] // documentation missing in model
Blacklisted,
#[allow(missing_docs)] // documentation missing in model
Healthy,
#[allow(missing_docs)] // documentation missing in model
Running,
#[allow(missing_docs)] // documentation missing in model
Shutdown,
#[allow(missing_docs)] // documentation missing in model
Unhealthy,
/// _Note: `::Unknown` has been renamed to `::UnknownValue`._
UnknownValue,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AgentStatus {
fn from(s: &str) -> Self {
match s {
"BLACKLISTED" => AgentStatus::Blacklisted,
"HEALTHY" => AgentStatus::Healthy,
"RUNNING" => AgentStatus::Running,
"SHUTDOWN" => AgentStatus::Shutdown,
"UNHEALTHY" => AgentStatus::Unhealthy,
"UNKNOWN" => AgentStatus::UnknownValue,
other => AgentStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for AgentStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(AgentStatus::from(s))
}
}
impl AgentStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
AgentStatus::Blacklisted => "BLACKLISTED",
AgentStatus::Healthy => "HEALTHY",
AgentStatus::Running => "RUNNING",
AgentStatus::Shutdown => "SHUTDOWN",
AgentStatus::Unhealthy => "UNHEALTHY",
AgentStatus::UnknownValue => "UNKNOWN",
AgentStatus::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&[
"BLACKLISTED",
"HEALTHY",
"RUNNING",
"SHUTDOWN",
"UNHEALTHY",
"UNKNOWN",
]
}
}
impl AsRef<str> for AgentStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Network details about the host where the agent/connector resides.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AgentNetworkInfo {
/// <p>The IP address for the host where the agent/connector resides.</p>
#[doc(hidden)]
pub ip_address: std::option::Option<std::string::String>,
/// <p>The MAC address for the host where the agent/connector resides.</p>
#[doc(hidden)]
pub mac_address: std::option::Option<std::string::String>,
}
impl AgentNetworkInfo {
/// <p>The IP address for the host where the agent/connector resides.</p>
pub fn ip_address(&self) -> std::option::Option<&str> {
self.ip_address.as_deref()
}
/// <p>The MAC address for the host where the agent/connector resides.</p>
pub fn mac_address(&self) -> std::option::Option<&str> {
self.mac_address.as_deref()
}
}
/// See [`AgentNetworkInfo`](crate::model::AgentNetworkInfo).
pub mod agent_network_info {
/// A builder for [`AgentNetworkInfo`](crate::model::AgentNetworkInfo).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) ip_address: std::option::Option<std::string::String>,
pub(crate) mac_address: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The IP address for the host where the agent/connector resides.</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 host where the agent/connector resides.</p>
pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ip_address = input;
self
}
/// <p>The MAC address for the host where the agent/connector resides.</p>
pub fn mac_address(mut self, input: impl Into<std::string::String>) -> Self {
self.mac_address = Some(input.into());
self
}
/// <p>The MAC address for the host where the agent/connector resides.</p>
pub fn set_mac_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.mac_address = input;
self
}
/// Consumes the builder and constructs a [`AgentNetworkInfo`](crate::model::AgentNetworkInfo).
pub fn build(self) -> crate::model::AgentNetworkInfo {
crate::model::AgentNetworkInfo {
ip_address: self.ip_address,
mac_address: self.mac_address,
}
}
}
}
impl AgentNetworkInfo {
/// Creates a new builder-style object to manufacture [`AgentNetworkInfo`](crate::model::AgentNetworkInfo).
pub fn builder() -> crate::model::agent_network_info::Builder {
crate::model::agent_network_info::Builder::default()
}
}
/// <p>Metadata that help you categorize IT assets.</p> <important>
/// <p>Do not store sensitive information (like personal data) in tags.</p>
/// </important>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Tag {
/// <p>The type of tag on which to filter.</p>
#[doc(hidden)]
pub key: std::option::Option<std::string::String>,
/// <p>A value for a tag key on which to filter.</p>
#[doc(hidden)]
pub value: std::option::Option<std::string::String>,
}
impl Tag {
/// <p>The type of tag on which to filter.</p>
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
/// <p>A value for a tag key on which to filter.</p>
pub fn value(&self) -> std::option::Option<&str> {
self.value.as_deref()
}
}
/// See [`Tag`](crate::model::Tag).
pub mod tag {
/// A builder for [`Tag`](crate::model::Tag).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, 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>The type of tag on which to filter.</p>
pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
self.key = Some(input.into());
self
}
/// <p>The type of tag on which to filter.</p>
pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.key = input;
self
}
/// <p>A value for a tag key on which to filter.</p>
pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
self.value = Some(input.into());
self
}
/// <p>A value for a tag key on which to filter.</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>Error messages returned for each import task that you deleted as a response for this command.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchDeleteImportDataError {
/// <p>The unique import ID associated with the error that occurred.</p>
#[doc(hidden)]
pub import_task_id: std::option::Option<std::string::String>,
/// <p>The type of error that occurred for a specific import task.</p>
#[doc(hidden)]
pub error_code: std::option::Option<crate::model::BatchDeleteImportDataErrorCode>,
/// <p>The description of the error that occurred for a specific import task.</p>
#[doc(hidden)]
pub error_description: std::option::Option<std::string::String>,
}
impl BatchDeleteImportDataError {
/// <p>The unique import ID associated with the error that occurred.</p>
pub fn import_task_id(&self) -> std::option::Option<&str> {
self.import_task_id.as_deref()
}
/// <p>The type of error that occurred for a specific import task.</p>
pub fn error_code(&self) -> std::option::Option<&crate::model::BatchDeleteImportDataErrorCode> {
self.error_code.as_ref()
}
/// <p>The description of the error that occurred for a specific import task.</p>
pub fn error_description(&self) -> std::option::Option<&str> {
self.error_description.as_deref()
}
}
/// See [`BatchDeleteImportDataError`](crate::model::BatchDeleteImportDataError).
pub mod batch_delete_import_data_error {
/// A builder for [`BatchDeleteImportDataError`](crate::model::BatchDeleteImportDataError).
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) import_task_id: std::option::Option<std::string::String>,
pub(crate) error_code: std::option::Option<crate::model::BatchDeleteImportDataErrorCode>,
pub(crate) error_description: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The unique import ID associated with the error that occurred.</p>
pub fn import_task_id(mut self, input: impl Into<std::string::String>) -> Self {
self.import_task_id = Some(input.into());
self
}
/// <p>The unique import ID associated with the error that occurred.</p>
pub fn set_import_task_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.import_task_id = input;
self
}
/// <p>The type of error that occurred for a specific import task.</p>
pub fn error_code(mut self, input: crate::model::BatchDeleteImportDataErrorCode) -> Self {
self.error_code = Some(input);
self
}
/// <p>The type of error that occurred for a specific import task.</p>
pub fn set_error_code(
mut self,
input: std::option::Option<crate::model::BatchDeleteImportDataErrorCode>,
) -> Self {
self.error_code = input;
self
}
/// <p>The description of the error that occurred for a specific import task.</p>
pub fn error_description(mut self, input: impl Into<std::string::String>) -> Self {
self.error_description = Some(input.into());
self
}
/// <p>The description of the error that occurred for a specific import task.</p>
pub fn set_error_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.error_description = input;
self
}
/// Consumes the builder and constructs a [`BatchDeleteImportDataError`](crate::model::BatchDeleteImportDataError).
pub fn build(self) -> crate::model::BatchDeleteImportDataError {
crate::model::BatchDeleteImportDataError {
import_task_id: self.import_task_id,
error_code: self.error_code,
error_description: self.error_description,
}
}
}
}
impl BatchDeleteImportDataError {
/// Creates a new builder-style object to manufacture [`BatchDeleteImportDataError`](crate::model::BatchDeleteImportDataError).
pub fn builder() -> crate::model::batch_delete_import_data_error::Builder {
crate::model::batch_delete_import_data_error::Builder::default()
}
}
/// When writing a match expression against `BatchDeleteImportDataErrorCode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let batchdeleteimportdataerrorcode = unimplemented!();
/// match batchdeleteimportdataerrorcode {
/// BatchDeleteImportDataErrorCode::InternalServerError => { /* ... */ },
/// BatchDeleteImportDataErrorCode::NotFound => { /* ... */ },
/// BatchDeleteImportDataErrorCode::OverLimit => { /* ... */ },
/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
/// _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `batchdeleteimportdataerrorcode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `BatchDeleteImportDataErrorCode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `BatchDeleteImportDataErrorCode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `BatchDeleteImportDataErrorCode::NewFeature` is defined.
/// Specifically, when `batchdeleteimportdataerrorcode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `BatchDeleteImportDataErrorCode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BatchDeleteImportDataErrorCode {
#[allow(missing_docs)] // documentation missing in model
InternalServerError,
#[allow(missing_docs)] // documentation missing in model
NotFound,
#[allow(missing_docs)] // documentation missing in model
OverLimit,
/// `Unknown` contains new variants that have been added since this code was generated.
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for BatchDeleteImportDataErrorCode {
fn from(s: &str) -> Self {
match s {
"INTERNAL_SERVER_ERROR" => BatchDeleteImportDataErrorCode::InternalServerError,
"NOT_FOUND" => BatchDeleteImportDataErrorCode::NotFound,
"OVER_LIMIT" => BatchDeleteImportDataErrorCode::OverLimit,
other => BatchDeleteImportDataErrorCode::Unknown(crate::types::UnknownVariantValue(
other.to_owned(),
)),
}
}
}
impl std::str::FromStr for BatchDeleteImportDataErrorCode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BatchDeleteImportDataErrorCode::from(s))
}
}
impl BatchDeleteImportDataErrorCode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BatchDeleteImportDataErrorCode::InternalServerError => "INTERNAL_SERVER_ERROR",
BatchDeleteImportDataErrorCode::NotFound => "NOT_FOUND",
BatchDeleteImportDataErrorCode::OverLimit => "OVER_LIMIT",
BatchDeleteImportDataErrorCode::Unknown(value) => value.as_str(),
}
}
/// Returns all the `&str` values of the enum members.
pub const fn values() -> &'static [&'static str] {
&["INTERNAL_SERVER_ERROR", "NOT_FOUND", "OVER_LIMIT"]
}
}
impl AsRef<str> for BatchDeleteImportDataErrorCode {
fn as_ref(&self) -> &str {
self.as_str()
}
}