1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The content of the email, composed of a subject line, an HTML part, and a text-only part.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Template {
/// <p>The name of the template. You will refer to this name when you send email using the <code>SendTemplatedEmail</code> or <code>SendBulkTemplatedEmail</code> operations.</p>
pub template_name: std::option::Option<std::string::String>,
/// <p>The subject line of the email.</p>
pub subject_part: std::option::Option<std::string::String>,
/// <p>The email body that will be visible to recipients whose email clients do not display HTML.</p>
pub text_part: std::option::Option<std::string::String>,
/// <p>The HTML body of the email.</p>
pub html_part: std::option::Option<std::string::String>,
}
impl Template {
/// <p>The name of the template. You will refer to this name when you send email using the <code>SendTemplatedEmail</code> or <code>SendBulkTemplatedEmail</code> operations.</p>
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
/// <p>The subject line of the email.</p>
pub fn subject_part(&self) -> std::option::Option<&str> {
self.subject_part.as_deref()
}
/// <p>The email body that will be visible to recipients whose email clients do not display HTML.</p>
pub fn text_part(&self) -> std::option::Option<&str> {
self.text_part.as_deref()
}
/// <p>The HTML body of the email.</p>
pub fn html_part(&self) -> std::option::Option<&str> {
self.html_part.as_deref()
}
}
impl std::fmt::Debug for Template {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Template");
formatter.field("template_name", &self.template_name);
formatter.field("subject_part", &self.subject_part);
formatter.field("text_part", &self.text_part);
formatter.field("html_part", &self.html_part);
formatter.finish()
}
}
/// See [`Template`](crate::model::Template)
pub mod template {
/// A builder for [`Template`](crate::model::Template)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) subject_part: std::option::Option<std::string::String>,
pub(crate) text_part: std::option::Option<std::string::String>,
pub(crate) html_part: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The name of the template. You will refer to this name when you send email using the <code>SendTemplatedEmail</code> or <code>SendBulkTemplatedEmail</code> operations.</p>
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
/// <p>The name of the template. You will refer to this name when you send email using the <code>SendTemplatedEmail</code> or <code>SendBulkTemplatedEmail</code> operations.</p>
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
/// <p>The subject line of the email.</p>
pub fn subject_part(mut self, input: impl Into<std::string::String>) -> Self {
self.subject_part = Some(input.into());
self
}
/// <p>The subject line of the email.</p>
pub fn set_subject_part(mut self, input: std::option::Option<std::string::String>) -> Self {
self.subject_part = input;
self
}
/// <p>The email body that will be visible to recipients whose email clients do not display HTML.</p>
pub fn text_part(mut self, input: impl Into<std::string::String>) -> Self {
self.text_part = Some(input.into());
self
}
/// <p>The email body that will be visible to recipients whose email clients do not display HTML.</p>
pub fn set_text_part(mut self, input: std::option::Option<std::string::String>) -> Self {
self.text_part = input;
self
}
/// <p>The HTML body of the email.</p>
pub fn html_part(mut self, input: impl Into<std::string::String>) -> Self {
self.html_part = Some(input.into());
self
}
/// <p>The HTML body of the email.</p>
pub fn set_html_part(mut self, input: std::option::Option<std::string::String>) -> Self {
self.html_part = input;
self
}
/// Consumes the builder and constructs a [`Template`](crate::model::Template)
pub fn build(self) -> crate::model::Template {
crate::model::Template {
template_name: self.template_name,
subject_part: self.subject_part,
text_part: self.text_part,
html_part: self.html_part,
}
}
}
}
impl Template {
/// Creates a new builder-style object to manufacture [`Template`](crate::model::Template)
pub fn builder() -> crate::model::template::Builder {
crate::model::template::Builder::default()
}
}
/// <p>Receipt rules enable you to specify which actions Amazon SES should take when it receives mail on behalf of one or more email addresses or domains that you own.</p>
/// <p>Each receipt rule defines a set of email addresses or domains that it applies to. If the email addresses or domains match at least one recipient address of the message, Amazon SES executes all of the receipt rule's actions on the message.</p>
/// <p>For information about setting up receipt rules, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rules.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReceiptRule {
/// <p>The name of the receipt rule. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Start and end with a letter or number.</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub name: std::option::Option<std::string::String>,
/// <p>If <code>true</code>, the receipt rule is active. The default value is <code>false</code>.</p>
pub enabled: bool,
/// <p>Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to <code>Require</code>, Amazon SES will bounce emails that are not received over TLS. The default is <code>Optional</code>.</p>
pub tls_policy: std::option::Option<crate::model::TlsPolicy>,
/// <p>The recipient domains and email addresses that the receipt rule applies to. If this field is not specified, this rule will match all recipients under all verified domains.</p>
pub recipients: std::option::Option<std::vec::Vec<std::string::String>>,
/// <p>An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.</p>
pub actions: std::option::Option<std::vec::Vec<crate::model::ReceiptAction>>,
/// <p>If <code>true</code>, then messages that this receipt rule applies to are scanned for spam and viruses. The default value is <code>false</code>.</p>
pub scan_enabled: bool,
}
impl ReceiptRule {
/// <p>The name of the receipt rule. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Start and end with a letter or number.</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>If <code>true</code>, the receipt rule is active. The default value is <code>false</code>.</p>
pub fn enabled(&self) -> bool {
self.enabled
}
/// <p>Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to <code>Require</code>, Amazon SES will bounce emails that are not received over TLS. The default is <code>Optional</code>.</p>
pub fn tls_policy(&self) -> std::option::Option<&crate::model::TlsPolicy> {
self.tls_policy.as_ref()
}
/// <p>The recipient domains and email addresses that the receipt rule applies to. If this field is not specified, this rule will match all recipients under all verified domains.</p>
pub fn recipients(&self) -> std::option::Option<&[std::string::String]> {
self.recipients.as_deref()
}
/// <p>An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.</p>
pub fn actions(&self) -> std::option::Option<&[crate::model::ReceiptAction]> {
self.actions.as_deref()
}
/// <p>If <code>true</code>, then messages that this receipt rule applies to are scanned for spam and viruses. The default value is <code>false</code>.</p>
pub fn scan_enabled(&self) -> bool {
self.scan_enabled
}
}
impl std::fmt::Debug for ReceiptRule {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReceiptRule");
formatter.field("name", &self.name);
formatter.field("enabled", &self.enabled);
formatter.field("tls_policy", &self.tls_policy);
formatter.field("recipients", &self.recipients);
formatter.field("actions", &self.actions);
formatter.field("scan_enabled", &self.scan_enabled);
formatter.finish()
}
}
/// See [`ReceiptRule`](crate::model::ReceiptRule)
pub mod receipt_rule {
/// A builder for [`ReceiptRule`](crate::model::ReceiptRule)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) enabled: std::option::Option<bool>,
pub(crate) tls_policy: std::option::Option<crate::model::TlsPolicy>,
pub(crate) recipients: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) actions: std::option::Option<std::vec::Vec<crate::model::ReceiptAction>>,
pub(crate) scan_enabled: std::option::Option<bool>,
}
impl Builder {
/// <p>The name of the receipt rule. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Start and end with a letter or number.</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the receipt rule. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Start and end with a letter or number.</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>If <code>true</code>, the receipt rule is active. The default value is <code>false</code>.</p>
pub fn enabled(mut self, input: bool) -> Self {
self.enabled = Some(input);
self
}
/// <p>If <code>true</code>, the receipt rule is active. The default value is <code>false</code>.</p>
pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.enabled = input;
self
}
/// <p>Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to <code>Require</code>, Amazon SES will bounce emails that are not received over TLS. The default is <code>Optional</code>.</p>
pub fn tls_policy(mut self, input: crate::model::TlsPolicy) -> Self {
self.tls_policy = Some(input);
self
}
/// <p>Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to <code>Require</code>, Amazon SES will bounce emails that are not received over TLS. The default is <code>Optional</code>.</p>
pub fn set_tls_policy(
mut self,
input: std::option::Option<crate::model::TlsPolicy>,
) -> Self {
self.tls_policy = input;
self
}
/// Appends an item to `recipients`.
///
/// To override the contents of this collection use [`set_recipients`](Self::set_recipients).
///
/// <p>The recipient domains and email addresses that the receipt rule applies to. If this field is not specified, this rule will match all recipients under all verified domains.</p>
pub fn recipients(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.recipients.unwrap_or_default();
v.push(input.into());
self.recipients = Some(v);
self
}
/// <p>The recipient domains and email addresses that the receipt rule applies to. If this field is not specified, this rule will match all recipients under all verified domains.</p>
pub fn set_recipients(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.recipients = input;
self
}
/// Appends an item to `actions`.
///
/// To override the contents of this collection use [`set_actions`](Self::set_actions).
///
/// <p>An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.</p>
pub fn actions(mut self, input: crate::model::ReceiptAction) -> Self {
let mut v = self.actions.unwrap_or_default();
v.push(input);
self.actions = Some(v);
self
}
/// <p>An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.</p>
pub fn set_actions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ReceiptAction>>,
) -> Self {
self.actions = input;
self
}
/// <p>If <code>true</code>, then messages that this receipt rule applies to are scanned for spam and viruses. The default value is <code>false</code>.</p>
pub fn scan_enabled(mut self, input: bool) -> Self {
self.scan_enabled = Some(input);
self
}
/// <p>If <code>true</code>, then messages that this receipt rule applies to are scanned for spam and viruses. The default value is <code>false</code>.</p>
pub fn set_scan_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.scan_enabled = input;
self
}
/// Consumes the builder and constructs a [`ReceiptRule`](crate::model::ReceiptRule)
pub fn build(self) -> crate::model::ReceiptRule {
crate::model::ReceiptRule {
name: self.name,
enabled: self.enabled.unwrap_or_default(),
tls_policy: self.tls_policy,
recipients: self.recipients,
actions: self.actions,
scan_enabled: self.scan_enabled.unwrap_or_default(),
}
}
}
}
impl ReceiptRule {
/// Creates a new builder-style object to manufacture [`ReceiptRule`](crate::model::ReceiptRule)
pub fn builder() -> crate::model::receipt_rule::Builder {
crate::model::receipt_rule::Builder::default()
}
}
/// <p>An action that Amazon SES can take when it receives an email on behalf of one or more email addresses or domains that you own. An instance of this data type can represent only one action.</p>
/// <p>For information about setting up receipt rules, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rules.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReceiptAction {
/// <p>Saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon SNS.</p>
pub s3_action: std::option::Option<crate::model::S3Action>,
/// <p>Rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).</p>
pub bounce_action: std::option::Option<crate::model::BounceAction>,
/// <p>Calls Amazon WorkMail and, optionally, publishes a notification to Amazon Amazon SNS.</p>
pub workmail_action: std::option::Option<crate::model::WorkmailAction>,
/// <p>Calls an AWS Lambda function, and optionally, publishes a notification to Amazon SNS.</p>
pub lambda_action: std::option::Option<crate::model::LambdaAction>,
/// <p>Terminates the evaluation of the receipt rule set and optionally publishes a notification to Amazon SNS.</p>
pub stop_action: std::option::Option<crate::model::StopAction>,
/// <p>Adds a header to the received email.</p>
pub add_header_action: std::option::Option<crate::model::AddHeaderAction>,
/// <p>Publishes the email content within a notification to Amazon SNS.</p>
pub sns_action: std::option::Option<crate::model::SnsAction>,
}
impl ReceiptAction {
/// <p>Saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon SNS.</p>
pub fn s3_action(&self) -> std::option::Option<&crate::model::S3Action> {
self.s3_action.as_ref()
}
/// <p>Rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).</p>
pub fn bounce_action(&self) -> std::option::Option<&crate::model::BounceAction> {
self.bounce_action.as_ref()
}
/// <p>Calls Amazon WorkMail and, optionally, publishes a notification to Amazon Amazon SNS.</p>
pub fn workmail_action(&self) -> std::option::Option<&crate::model::WorkmailAction> {
self.workmail_action.as_ref()
}
/// <p>Calls an AWS Lambda function, and optionally, publishes a notification to Amazon SNS.</p>
pub fn lambda_action(&self) -> std::option::Option<&crate::model::LambdaAction> {
self.lambda_action.as_ref()
}
/// <p>Terminates the evaluation of the receipt rule set and optionally publishes a notification to Amazon SNS.</p>
pub fn stop_action(&self) -> std::option::Option<&crate::model::StopAction> {
self.stop_action.as_ref()
}
/// <p>Adds a header to the received email.</p>
pub fn add_header_action(&self) -> std::option::Option<&crate::model::AddHeaderAction> {
self.add_header_action.as_ref()
}
/// <p>Publishes the email content within a notification to Amazon SNS.</p>
pub fn sns_action(&self) -> std::option::Option<&crate::model::SnsAction> {
self.sns_action.as_ref()
}
}
impl std::fmt::Debug for ReceiptAction {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReceiptAction");
formatter.field("s3_action", &self.s3_action);
formatter.field("bounce_action", &self.bounce_action);
formatter.field("workmail_action", &self.workmail_action);
formatter.field("lambda_action", &self.lambda_action);
formatter.field("stop_action", &self.stop_action);
formatter.field("add_header_action", &self.add_header_action);
formatter.field("sns_action", &self.sns_action);
formatter.finish()
}
}
/// See [`ReceiptAction`](crate::model::ReceiptAction)
pub mod receipt_action {
/// A builder for [`ReceiptAction`](crate::model::ReceiptAction)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) s3_action: std::option::Option<crate::model::S3Action>,
pub(crate) bounce_action: std::option::Option<crate::model::BounceAction>,
pub(crate) workmail_action: std::option::Option<crate::model::WorkmailAction>,
pub(crate) lambda_action: std::option::Option<crate::model::LambdaAction>,
pub(crate) stop_action: std::option::Option<crate::model::StopAction>,
pub(crate) add_header_action: std::option::Option<crate::model::AddHeaderAction>,
pub(crate) sns_action: std::option::Option<crate::model::SnsAction>,
}
impl Builder {
/// <p>Saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon SNS.</p>
pub fn s3_action(mut self, input: crate::model::S3Action) -> Self {
self.s3_action = Some(input);
self
}
/// <p>Saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon SNS.</p>
pub fn set_s3_action(mut self, input: std::option::Option<crate::model::S3Action>) -> Self {
self.s3_action = input;
self
}
/// <p>Rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).</p>
pub fn bounce_action(mut self, input: crate::model::BounceAction) -> Self {
self.bounce_action = Some(input);
self
}
/// <p>Rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).</p>
pub fn set_bounce_action(
mut self,
input: std::option::Option<crate::model::BounceAction>,
) -> Self {
self.bounce_action = input;
self
}
/// <p>Calls Amazon WorkMail and, optionally, publishes a notification to Amazon Amazon SNS.</p>
pub fn workmail_action(mut self, input: crate::model::WorkmailAction) -> Self {
self.workmail_action = Some(input);
self
}
/// <p>Calls Amazon WorkMail and, optionally, publishes a notification to Amazon Amazon SNS.</p>
pub fn set_workmail_action(
mut self,
input: std::option::Option<crate::model::WorkmailAction>,
) -> Self {
self.workmail_action = input;
self
}
/// <p>Calls an AWS Lambda function, and optionally, publishes a notification to Amazon SNS.</p>
pub fn lambda_action(mut self, input: crate::model::LambdaAction) -> Self {
self.lambda_action = Some(input);
self
}
/// <p>Calls an AWS Lambda function, and optionally, publishes a notification to Amazon SNS.</p>
pub fn set_lambda_action(
mut self,
input: std::option::Option<crate::model::LambdaAction>,
) -> Self {
self.lambda_action = input;
self
}
/// <p>Terminates the evaluation of the receipt rule set and optionally publishes a notification to Amazon SNS.</p>
pub fn stop_action(mut self, input: crate::model::StopAction) -> Self {
self.stop_action = Some(input);
self
}
/// <p>Terminates the evaluation of the receipt rule set and optionally publishes a notification to Amazon SNS.</p>
pub fn set_stop_action(
mut self,
input: std::option::Option<crate::model::StopAction>,
) -> Self {
self.stop_action = input;
self
}
/// <p>Adds a header to the received email.</p>
pub fn add_header_action(mut self, input: crate::model::AddHeaderAction) -> Self {
self.add_header_action = Some(input);
self
}
/// <p>Adds a header to the received email.</p>
pub fn set_add_header_action(
mut self,
input: std::option::Option<crate::model::AddHeaderAction>,
) -> Self {
self.add_header_action = input;
self
}
/// <p>Publishes the email content within a notification to Amazon SNS.</p>
pub fn sns_action(mut self, input: crate::model::SnsAction) -> Self {
self.sns_action = Some(input);
self
}
/// <p>Publishes the email content within a notification to Amazon SNS.</p>
pub fn set_sns_action(
mut self,
input: std::option::Option<crate::model::SnsAction>,
) -> Self {
self.sns_action = input;
self
}
/// Consumes the builder and constructs a [`ReceiptAction`](crate::model::ReceiptAction)
pub fn build(self) -> crate::model::ReceiptAction {
crate::model::ReceiptAction {
s3_action: self.s3_action,
bounce_action: self.bounce_action,
workmail_action: self.workmail_action,
lambda_action: self.lambda_action,
stop_action: self.stop_action,
add_header_action: self.add_header_action,
sns_action: self.sns_action,
}
}
}
}
impl ReceiptAction {
/// Creates a new builder-style object to manufacture [`ReceiptAction`](crate::model::ReceiptAction)
pub fn builder() -> crate::model::receipt_action::Builder {
crate::model::receipt_action::Builder::default()
}
}
/// <p>When included in a receipt rule, this action publishes a notification to Amazon Simple Notification Service (Amazon SNS). This action includes a complete copy of the email content in the Amazon SNS notifications. Amazon SNS notifications for all other actions simply provide information about the email. They do not include the email content itself.</p>
/// <p>If you own the Amazon SNS topic, you don't need to do anything to give Amazon SES permission to publish emails to it. However, if you don't own the Amazon SNS topic, you need to attach a policy to the topic to give Amazon SES permissions to access it. For information about giving permissions, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html">Amazon SES Developer Guide</a>.</p> <important>
/// <p>You can only publish emails that are 150 KB or less (including the header) to Amazon SNS. Larger emails will bounce. If you anticipate emails larger than 150 KB, use the S3 action instead.</p>
/// </important>
/// <p>For information about using a receipt rule to publish an Amazon SNS notification, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-sns.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SnsAction {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub topic_arn: std::option::Option<std::string::String>,
/// <p>The encoding to use for the email within the Amazon SNS notification. UTF-8 is easier to use, but may not preserve all special characters when a message was encoded with a different encoding format. Base64 preserves all special characters. The default value is UTF-8.</p>
pub encoding: std::option::Option<crate::model::SnsActionEncoding>,
}
impl SnsAction {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(&self) -> std::option::Option<&str> {
self.topic_arn.as_deref()
}
/// <p>The encoding to use for the email within the Amazon SNS notification. UTF-8 is easier to use, but may not preserve all special characters when a message was encoded with a different encoding format. Base64 preserves all special characters. The default value is UTF-8.</p>
pub fn encoding(&self) -> std::option::Option<&crate::model::SnsActionEncoding> {
self.encoding.as_ref()
}
}
impl std::fmt::Debug for SnsAction {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SnsAction");
formatter.field("topic_arn", &self.topic_arn);
formatter.field("encoding", &self.encoding);
formatter.finish()
}
}
/// See [`SnsAction`](crate::model::SnsAction)
pub mod sns_action {
/// A builder for [`SnsAction`](crate::model::SnsAction)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) topic_arn: std::option::Option<std::string::String>,
pub(crate) encoding: std::option::Option<crate::model::SnsActionEncoding>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.topic_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn set_topic_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.topic_arn = input;
self
}
/// <p>The encoding to use for the email within the Amazon SNS notification. UTF-8 is easier to use, but may not preserve all special characters when a message was encoded with a different encoding format. Base64 preserves all special characters. The default value is UTF-8.</p>
pub fn encoding(mut self, input: crate::model::SnsActionEncoding) -> Self {
self.encoding = Some(input);
self
}
/// <p>The encoding to use for the email within the Amazon SNS notification. UTF-8 is easier to use, but may not preserve all special characters when a message was encoded with a different encoding format. Base64 preserves all special characters. The default value is UTF-8.</p>
pub fn set_encoding(
mut self,
input: std::option::Option<crate::model::SnsActionEncoding>,
) -> Self {
self.encoding = input;
self
}
/// Consumes the builder and constructs a [`SnsAction`](crate::model::SnsAction)
pub fn build(self) -> crate::model::SnsAction {
crate::model::SnsAction {
topic_arn: self.topic_arn,
encoding: self.encoding,
}
}
}
}
impl SnsAction {
/// Creates a new builder-style object to manufacture [`SnsAction`](crate::model::SnsAction)
pub fn builder() -> crate::model::sns_action::Builder {
crate::model::sns_action::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum SnsActionEncoding {
#[allow(missing_docs)] // documentation missing in model
Base64,
#[allow(missing_docs)] // documentation missing in model
Utf8,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for SnsActionEncoding {
fn from(s: &str) -> Self {
match s {
"Base64" => SnsActionEncoding::Base64,
"UTF-8" => SnsActionEncoding::Utf8,
other => SnsActionEncoding::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for SnsActionEncoding {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(SnsActionEncoding::from(s))
}
}
impl SnsActionEncoding {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
SnsActionEncoding::Base64 => "Base64",
SnsActionEncoding::Utf8 => "UTF-8",
SnsActionEncoding::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["Base64", "UTF-8"]
}
}
impl AsRef<str> for SnsActionEncoding {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>When included in a receipt rule, this action adds a header to the received email.</p>
/// <p>For information about adding a header using a receipt rule, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-add-header.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AddHeaderAction {
/// <p>The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.</p>
pub header_name: std::option::Option<std::string::String>,
/// <p>Must be less than 2048 characters, and must not contain newline characters ("\r" or "\n").</p>
pub header_value: std::option::Option<std::string::String>,
}
impl AddHeaderAction {
/// <p>The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.</p>
pub fn header_name(&self) -> std::option::Option<&str> {
self.header_name.as_deref()
}
/// <p>Must be less than 2048 characters, and must not contain newline characters ("\r" or "\n").</p>
pub fn header_value(&self) -> std::option::Option<&str> {
self.header_value.as_deref()
}
}
impl std::fmt::Debug for AddHeaderAction {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AddHeaderAction");
formatter.field("header_name", &self.header_name);
formatter.field("header_value", &self.header_value);
formatter.finish()
}
}
/// See [`AddHeaderAction`](crate::model::AddHeaderAction)
pub mod add_header_action {
/// A builder for [`AddHeaderAction`](crate::model::AddHeaderAction)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) header_name: std::option::Option<std::string::String>,
pub(crate) header_value: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.</p>
pub fn header_name(mut self, input: impl Into<std::string::String>) -> Self {
self.header_name = Some(input.into());
self
}
/// <p>The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.</p>
pub fn set_header_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.header_name = input;
self
}
/// <p>Must be less than 2048 characters, and must not contain newline characters ("\r" or "\n").</p>
pub fn header_value(mut self, input: impl Into<std::string::String>) -> Self {
self.header_value = Some(input.into());
self
}
/// <p>Must be less than 2048 characters, and must not contain newline characters ("\r" or "\n").</p>
pub fn set_header_value(mut self, input: std::option::Option<std::string::String>) -> Self {
self.header_value = input;
self
}
/// Consumes the builder and constructs a [`AddHeaderAction`](crate::model::AddHeaderAction)
pub fn build(self) -> crate::model::AddHeaderAction {
crate::model::AddHeaderAction {
header_name: self.header_name,
header_value: self.header_value,
}
}
}
}
impl AddHeaderAction {
/// Creates a new builder-style object to manufacture [`AddHeaderAction`](crate::model::AddHeaderAction)
pub fn builder() -> crate::model::add_header_action::Builder {
crate::model::add_header_action::Builder::default()
}
}
/// <p>When included in a receipt rule, this action terminates the evaluation of the receipt rule set and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).</p>
/// <p>For information about setting a stop action in a receipt rule, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-stop.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StopAction {
/// <p>The scope of the StopAction. The only acceptable value is <code>RuleSet</code>.</p>
pub scope: std::option::Option<crate::model::StopScope>,
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop action is taken. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub topic_arn: std::option::Option<std::string::String>,
}
impl StopAction {
/// <p>The scope of the StopAction. The only acceptable value is <code>RuleSet</code>.</p>
pub fn scope(&self) -> std::option::Option<&crate::model::StopScope> {
self.scope.as_ref()
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop action is taken. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(&self) -> std::option::Option<&str> {
self.topic_arn.as_deref()
}
}
impl std::fmt::Debug for StopAction {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StopAction");
formatter.field("scope", &self.scope);
formatter.field("topic_arn", &self.topic_arn);
formatter.finish()
}
}
/// See [`StopAction`](crate::model::StopAction)
pub mod stop_action {
/// A builder for [`StopAction`](crate::model::StopAction)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) scope: std::option::Option<crate::model::StopScope>,
pub(crate) topic_arn: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The scope of the StopAction. The only acceptable value is <code>RuleSet</code>.</p>
pub fn scope(mut self, input: crate::model::StopScope) -> Self {
self.scope = Some(input);
self
}
/// <p>The scope of the StopAction. The only acceptable value is <code>RuleSet</code>.</p>
pub fn set_scope(mut self, input: std::option::Option<crate::model::StopScope>) -> Self {
self.scope = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop action is taken. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.topic_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop action is taken. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn set_topic_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.topic_arn = input;
self
}
/// Consumes the builder and constructs a [`StopAction`](crate::model::StopAction)
pub fn build(self) -> crate::model::StopAction {
crate::model::StopAction {
scope: self.scope,
topic_arn: self.topic_arn,
}
}
}
}
impl StopAction {
/// Creates a new builder-style object to manufacture [`StopAction`](crate::model::StopAction)
pub fn builder() -> crate::model::stop_action::Builder {
crate::model::stop_action::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum StopScope {
#[allow(missing_docs)] // documentation missing in model
RuleSet,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for StopScope {
fn from(s: &str) -> Self {
match s {
"RuleSet" => StopScope::RuleSet,
other => StopScope::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for StopScope {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(StopScope::from(s))
}
}
impl StopScope {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
StopScope::RuleSet => "RuleSet",
StopScope::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["RuleSet"]
}
}
impl AsRef<str> for StopScope {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>When included in a receipt rule, this action calls an AWS Lambda function and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).</p>
/// <p>To enable Amazon SES to call your AWS Lambda function or to publish to an Amazon SNS topic of another account, Amazon SES must have permission to access those resources. For information about giving permissions, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html">Amazon SES Developer Guide</a>.</p>
/// <p>For information about using AWS Lambda actions in receipt rules, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-lambda.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LambdaAction {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the Lambda action is taken. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub topic_arn: std::option::Option<std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the AWS Lambda function. An example of an AWS Lambda function ARN is <code>arn:aws:lambda:us-west-2:account-id:function:MyFunction</code>. For more information about AWS Lambda, see the <a href="https://docs.aws.amazon.com/lambda/latest/dg/welcome.html">AWS Lambda Developer Guide</a>.</p>
pub function_arn: std::option::Option<std::string::String>,
/// <p>The invocation type of the AWS Lambda function. An invocation type of <code>RequestResponse</code> means that the execution of the function will immediately result in a response, and a value of <code>Event</code> means that the function will be invoked asynchronously. The default value is <code>Event</code>. For information about AWS Lambda invocation types, see the <a href="https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html">AWS Lambda Developer Guide</a>.</p> <important>
/// <p>There is a 30-second timeout on <code>RequestResponse</code> invocations. You should use <code>Event</code> invocation in most cases. Use <code>RequestResponse</code> only when you want to make a mail flow decision, such as whether to stop the receipt rule or the receipt rule set.</p>
/// </important>
pub invocation_type: std::option::Option<crate::model::InvocationType>,
}
impl LambdaAction {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the Lambda action is taken. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(&self) -> std::option::Option<&str> {
self.topic_arn.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the AWS Lambda function. An example of an AWS Lambda function ARN is <code>arn:aws:lambda:us-west-2:account-id:function:MyFunction</code>. For more information about AWS Lambda, see the <a href="https://docs.aws.amazon.com/lambda/latest/dg/welcome.html">AWS Lambda Developer Guide</a>.</p>
pub fn function_arn(&self) -> std::option::Option<&str> {
self.function_arn.as_deref()
}
/// <p>The invocation type of the AWS Lambda function. An invocation type of <code>RequestResponse</code> means that the execution of the function will immediately result in a response, and a value of <code>Event</code> means that the function will be invoked asynchronously. The default value is <code>Event</code>. For information about AWS Lambda invocation types, see the <a href="https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html">AWS Lambda Developer Guide</a>.</p> <important>
/// <p>There is a 30-second timeout on <code>RequestResponse</code> invocations. You should use <code>Event</code> invocation in most cases. Use <code>RequestResponse</code> only when you want to make a mail flow decision, such as whether to stop the receipt rule or the receipt rule set.</p>
/// </important>
pub fn invocation_type(&self) -> std::option::Option<&crate::model::InvocationType> {
self.invocation_type.as_ref()
}
}
impl std::fmt::Debug for LambdaAction {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LambdaAction");
formatter.field("topic_arn", &self.topic_arn);
formatter.field("function_arn", &self.function_arn);
formatter.field("invocation_type", &self.invocation_type);
formatter.finish()
}
}
/// See [`LambdaAction`](crate::model::LambdaAction)
pub mod lambda_action {
/// A builder for [`LambdaAction`](crate::model::LambdaAction)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) topic_arn: std::option::Option<std::string::String>,
pub(crate) function_arn: std::option::Option<std::string::String>,
pub(crate) invocation_type: std::option::Option<crate::model::InvocationType>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the Lambda action is taken. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.topic_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the Lambda action is taken. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn set_topic_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.topic_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the AWS Lambda function. An example of an AWS Lambda function ARN is <code>arn:aws:lambda:us-west-2:account-id:function:MyFunction</code>. For more information about AWS Lambda, see the <a href="https://docs.aws.amazon.com/lambda/latest/dg/welcome.html">AWS Lambda Developer Guide</a>.</p>
pub fn function_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.function_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the AWS Lambda function. An example of an AWS Lambda function ARN is <code>arn:aws:lambda:us-west-2:account-id:function:MyFunction</code>. For more information about AWS Lambda, see the <a href="https://docs.aws.amazon.com/lambda/latest/dg/welcome.html">AWS Lambda Developer Guide</a>.</p>
pub fn set_function_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.function_arn = input;
self
}
/// <p>The invocation type of the AWS Lambda function. An invocation type of <code>RequestResponse</code> means that the execution of the function will immediately result in a response, and a value of <code>Event</code> means that the function will be invoked asynchronously. The default value is <code>Event</code>. For information about AWS Lambda invocation types, see the <a href="https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html">AWS Lambda Developer Guide</a>.</p> <important>
/// <p>There is a 30-second timeout on <code>RequestResponse</code> invocations. You should use <code>Event</code> invocation in most cases. Use <code>RequestResponse</code> only when you want to make a mail flow decision, such as whether to stop the receipt rule or the receipt rule set.</p>
/// </important>
pub fn invocation_type(mut self, input: crate::model::InvocationType) -> Self {
self.invocation_type = Some(input);
self
}
/// <p>The invocation type of the AWS Lambda function. An invocation type of <code>RequestResponse</code> means that the execution of the function will immediately result in a response, and a value of <code>Event</code> means that the function will be invoked asynchronously. The default value is <code>Event</code>. For information about AWS Lambda invocation types, see the <a href="https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html">AWS Lambda Developer Guide</a>.</p> <important>
/// <p>There is a 30-second timeout on <code>RequestResponse</code> invocations. You should use <code>Event</code> invocation in most cases. Use <code>RequestResponse</code> only when you want to make a mail flow decision, such as whether to stop the receipt rule or the receipt rule set.</p>
/// </important>
pub fn set_invocation_type(
mut self,
input: std::option::Option<crate::model::InvocationType>,
) -> Self {
self.invocation_type = input;
self
}
/// Consumes the builder and constructs a [`LambdaAction`](crate::model::LambdaAction)
pub fn build(self) -> crate::model::LambdaAction {
crate::model::LambdaAction {
topic_arn: self.topic_arn,
function_arn: self.function_arn,
invocation_type: self.invocation_type,
}
}
}
}
impl LambdaAction {
/// Creates a new builder-style object to manufacture [`LambdaAction`](crate::model::LambdaAction)
pub fn builder() -> crate::model::lambda_action::Builder {
crate::model::lambda_action::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum InvocationType {
#[allow(missing_docs)] // documentation missing in model
Event,
#[allow(missing_docs)] // documentation missing in model
RequestResponse,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for InvocationType {
fn from(s: &str) -> Self {
match s {
"Event" => InvocationType::Event,
"RequestResponse" => InvocationType::RequestResponse,
other => InvocationType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for InvocationType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(InvocationType::from(s))
}
}
impl InvocationType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
InvocationType::Event => "Event",
InvocationType::RequestResponse => "RequestResponse",
InvocationType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["Event", "RequestResponse"]
}
}
impl AsRef<str> for InvocationType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>When included in a receipt rule, this action calls Amazon WorkMail and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS). You will typically not use this action directly because Amazon WorkMail adds the rule automatically during its setup procedure.</p>
/// <p>For information using a receipt rule to call Amazon WorkMail, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-workmail.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct WorkmailAction {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the WorkMail action is called. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub topic_arn: std::option::Option<std::string::String>,
/// <p>The ARN of the Amazon WorkMail organization. An example of an Amazon WorkMail organization ARN is <code>arn:aws:workmail:us-west-2:123456789012:organization/m-68755160c4cb4e29a2b2f8fb58f359d7</code>. For information about Amazon WorkMail organizations, see the <a href="https://docs.aws.amazon.com/workmail/latest/adminguide/organizations_overview.html">Amazon WorkMail Administrator Guide</a>.</p>
pub organization_arn: std::option::Option<std::string::String>,
}
impl WorkmailAction {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the WorkMail action is called. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(&self) -> std::option::Option<&str> {
self.topic_arn.as_deref()
}
/// <p>The ARN of the Amazon WorkMail organization. An example of an Amazon WorkMail organization ARN is <code>arn:aws:workmail:us-west-2:123456789012:organization/m-68755160c4cb4e29a2b2f8fb58f359d7</code>. For information about Amazon WorkMail organizations, see the <a href="https://docs.aws.amazon.com/workmail/latest/adminguide/organizations_overview.html">Amazon WorkMail Administrator Guide</a>.</p>
pub fn organization_arn(&self) -> std::option::Option<&str> {
self.organization_arn.as_deref()
}
}
impl std::fmt::Debug for WorkmailAction {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("WorkmailAction");
formatter.field("topic_arn", &self.topic_arn);
formatter.field("organization_arn", &self.organization_arn);
formatter.finish()
}
}
/// See [`WorkmailAction`](crate::model::WorkmailAction)
pub mod workmail_action {
/// A builder for [`WorkmailAction`](crate::model::WorkmailAction)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) topic_arn: std::option::Option<std::string::String>,
pub(crate) organization_arn: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the WorkMail action is called. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.topic_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the WorkMail action is called. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn set_topic_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.topic_arn = input;
self
}
/// <p>The ARN of the Amazon WorkMail organization. An example of an Amazon WorkMail organization ARN is <code>arn:aws:workmail:us-west-2:123456789012:organization/m-68755160c4cb4e29a2b2f8fb58f359d7</code>. For information about Amazon WorkMail organizations, see the <a href="https://docs.aws.amazon.com/workmail/latest/adminguide/organizations_overview.html">Amazon WorkMail Administrator Guide</a>.</p>
pub fn organization_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.organization_arn = Some(input.into());
self
}
/// <p>The ARN of the Amazon WorkMail organization. An example of an Amazon WorkMail organization ARN is <code>arn:aws:workmail:us-west-2:123456789012:organization/m-68755160c4cb4e29a2b2f8fb58f359d7</code>. For information about Amazon WorkMail organizations, see the <a href="https://docs.aws.amazon.com/workmail/latest/adminguide/organizations_overview.html">Amazon WorkMail Administrator Guide</a>.</p>
pub fn set_organization_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.organization_arn = input;
self
}
/// Consumes the builder and constructs a [`WorkmailAction`](crate::model::WorkmailAction)
pub fn build(self) -> crate::model::WorkmailAction {
crate::model::WorkmailAction {
topic_arn: self.topic_arn,
organization_arn: self.organization_arn,
}
}
}
}
impl WorkmailAction {
/// Creates a new builder-style object to manufacture [`WorkmailAction`](crate::model::WorkmailAction)
pub fn builder() -> crate::model::workmail_action::Builder {
crate::model::workmail_action::Builder::default()
}
}
/// <p>When included in a receipt rule, this action rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).</p>
/// <p>For information about sending a bounce message in response to a received email, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-bounce.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BounceAction {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub topic_arn: std::option::Option<std::string::String>,
/// <p>The SMTP reply code, as defined by <a href="https://tools.ietf.org/html/rfc5321">RFC 5321</a>.</p>
pub smtp_reply_code: std::option::Option<std::string::String>,
/// <p>The SMTP enhanced status code, as defined by <a href="https://tools.ietf.org/html/rfc3463">RFC 3463</a>.</p>
pub status_code: std::option::Option<std::string::String>,
/// <p>Human-readable text to include in the bounce message.</p>
pub message: std::option::Option<std::string::String>,
/// <p>The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.</p>
pub sender: std::option::Option<std::string::String>,
}
impl BounceAction {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(&self) -> std::option::Option<&str> {
self.topic_arn.as_deref()
}
/// <p>The SMTP reply code, as defined by <a href="https://tools.ietf.org/html/rfc5321">RFC 5321</a>.</p>
pub fn smtp_reply_code(&self) -> std::option::Option<&str> {
self.smtp_reply_code.as_deref()
}
/// <p>The SMTP enhanced status code, as defined by <a href="https://tools.ietf.org/html/rfc3463">RFC 3463</a>.</p>
pub fn status_code(&self) -> std::option::Option<&str> {
self.status_code.as_deref()
}
/// <p>Human-readable text to include in the bounce message.</p>
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
/// <p>The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.</p>
pub fn sender(&self) -> std::option::Option<&str> {
self.sender.as_deref()
}
}
impl std::fmt::Debug for BounceAction {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BounceAction");
formatter.field("topic_arn", &self.topic_arn);
formatter.field("smtp_reply_code", &self.smtp_reply_code);
formatter.field("status_code", &self.status_code);
formatter.field("message", &self.message);
formatter.field("sender", &self.sender);
formatter.finish()
}
}
/// See [`BounceAction`](crate::model::BounceAction)
pub mod bounce_action {
/// A builder for [`BounceAction`](crate::model::BounceAction)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) topic_arn: std::option::Option<std::string::String>,
pub(crate) smtp_reply_code: std::option::Option<std::string::String>,
pub(crate) status_code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) sender: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.topic_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn set_topic_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.topic_arn = input;
self
}
/// <p>The SMTP reply code, as defined by <a href="https://tools.ietf.org/html/rfc5321">RFC 5321</a>.</p>
pub fn smtp_reply_code(mut self, input: impl Into<std::string::String>) -> Self {
self.smtp_reply_code = Some(input.into());
self
}
/// <p>The SMTP reply code, as defined by <a href="https://tools.ietf.org/html/rfc5321">RFC 5321</a>.</p>
pub fn set_smtp_reply_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.smtp_reply_code = input;
self
}
/// <p>The SMTP enhanced status code, as defined by <a href="https://tools.ietf.org/html/rfc3463">RFC 3463</a>.</p>
pub fn status_code(mut self, input: impl Into<std::string::String>) -> Self {
self.status_code = Some(input.into());
self
}
/// <p>The SMTP enhanced status code, as defined by <a href="https://tools.ietf.org/html/rfc3463">RFC 3463</a>.</p>
pub fn set_status_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.status_code = input;
self
}
/// <p>Human-readable text to include in the bounce message.</p>
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
/// <p>Human-readable text to include in the bounce message.</p>
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
/// <p>The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.</p>
pub fn sender(mut self, input: impl Into<std::string::String>) -> Self {
self.sender = Some(input.into());
self
}
/// <p>The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.</p>
pub fn set_sender(mut self, input: std::option::Option<std::string::String>) -> Self {
self.sender = input;
self
}
/// Consumes the builder and constructs a [`BounceAction`](crate::model::BounceAction)
pub fn build(self) -> crate::model::BounceAction {
crate::model::BounceAction {
topic_arn: self.topic_arn,
smtp_reply_code: self.smtp_reply_code,
status_code: self.status_code,
message: self.message,
sender: self.sender,
}
}
}
}
impl BounceAction {
/// Creates a new builder-style object to manufacture [`BounceAction`](crate::model::BounceAction)
pub fn builder() -> crate::model::bounce_action::Builder {
crate::model::bounce_action::Builder::default()
}
}
/// <p>When included in a receipt rule, this action saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).</p>
/// <p>To enable Amazon SES to write emails to your Amazon S3 bucket, use an AWS KMS key to encrypt your emails, or publish to an Amazon SNS topic of another account, Amazon SES must have permission to access those resources. For information about giving permissions, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html">Amazon SES Developer Guide</a>.</p> <note>
/// <p>When you save your emails to an Amazon S3 bucket, the maximum email size (including headers) is 30 MB. Emails larger than that will bounce.</p>
/// </note>
/// <p>For information about specifying Amazon S3 actions in receipt rules, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-s3.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct S3Action {
/// <p>The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub topic_arn: std::option::Option<std::string::String>,
/// <p>The name of the Amazon S3 bucket that incoming email will be saved to.</p>
pub bucket_name: std::option::Option<std::string::String>,
/// <p>The key prefix of the Amazon S3 bucket. The key prefix is similar to a directory name that enables you to store similar data under the same directory in a bucket.</p>
pub object_key_prefix: std::option::Option<std::string::String>,
/// <p>The customer master key that Amazon SES should use to encrypt your emails before saving them to the Amazon S3 bucket. You can use the default master key or a custom master key you created in AWS KMS as follows:</p>
/// <ul>
/// <li> <p>To use the default master key, provide an ARN in the form of <code>arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses</code>. For example, if your AWS account ID is 123456789012 and you want to use the default master key in the US West (Oregon) region, the ARN of the default master key would be <code>arn:aws:kms:us-west-2:123456789012:alias/aws/ses</code>. If you use the default master key, you don't need to perform any extra steps to give Amazon SES permission to use the key.</p> </li>
/// <li> <p>To use a custom master key you created in AWS KMS, provide the ARN of the master key and ensure that you add a statement to your key's policy to give Amazon SES permission to use it. For more information about giving permissions, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html">Amazon SES Developer Guide</a>.</p> </li>
/// </ul>
/// <p>For more information about key policies, see the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html">AWS KMS Developer Guide</a>. If you do not specify a master key, Amazon SES will not encrypt your emails.</p> <important>
/// <p>Your mail is encrypted by Amazon SES using the Amazon S3 encryption client before the mail is submitted to Amazon S3 for storage. It is not encrypted using Amazon S3 server-side encryption. This means that you must use the Amazon S3 encryption client to decrypt the email after retrieving it from Amazon S3, as the service has no access to use your AWS KMS keys for decryption. This encryption client is currently available with the <a href="http://aws.amazon.com/sdk-for-java/">AWS SDK for Java</a> and <a href="http://aws.amazon.com/sdk-for-ruby/">AWS SDK for Ruby</a> only. For more information about client-side encryption using AWS KMS master keys, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html">Amazon S3 Developer Guide</a>.</p>
/// </important>
pub kms_key_arn: std::option::Option<std::string::String>,
}
impl S3Action {
/// <p>The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(&self) -> std::option::Option<&str> {
self.topic_arn.as_deref()
}
/// <p>The name of the Amazon S3 bucket that incoming email will be saved to.</p>
pub fn bucket_name(&self) -> std::option::Option<&str> {
self.bucket_name.as_deref()
}
/// <p>The key prefix of the Amazon S3 bucket. The key prefix is similar to a directory name that enables you to store similar data under the same directory in a bucket.</p>
pub fn object_key_prefix(&self) -> std::option::Option<&str> {
self.object_key_prefix.as_deref()
}
/// <p>The customer master key that Amazon SES should use to encrypt your emails before saving them to the Amazon S3 bucket. You can use the default master key or a custom master key you created in AWS KMS as follows:</p>
/// <ul>
/// <li> <p>To use the default master key, provide an ARN in the form of <code>arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses</code>. For example, if your AWS account ID is 123456789012 and you want to use the default master key in the US West (Oregon) region, the ARN of the default master key would be <code>arn:aws:kms:us-west-2:123456789012:alias/aws/ses</code>. If you use the default master key, you don't need to perform any extra steps to give Amazon SES permission to use the key.</p> </li>
/// <li> <p>To use a custom master key you created in AWS KMS, provide the ARN of the master key and ensure that you add a statement to your key's policy to give Amazon SES permission to use it. For more information about giving permissions, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html">Amazon SES Developer Guide</a>.</p> </li>
/// </ul>
/// <p>For more information about key policies, see the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html">AWS KMS Developer Guide</a>. If you do not specify a master key, Amazon SES will not encrypt your emails.</p> <important>
/// <p>Your mail is encrypted by Amazon SES using the Amazon S3 encryption client before the mail is submitted to Amazon S3 for storage. It is not encrypted using Amazon S3 server-side encryption. This means that you must use the Amazon S3 encryption client to decrypt the email after retrieving it from Amazon S3, as the service has no access to use your AWS KMS keys for decryption. This encryption client is currently available with the <a href="http://aws.amazon.com/sdk-for-java/">AWS SDK for Java</a> and <a href="http://aws.amazon.com/sdk-for-ruby/">AWS SDK for Ruby</a> only. For more information about client-side encryption using AWS KMS master keys, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html">Amazon S3 Developer Guide</a>.</p>
/// </important>
pub fn kms_key_arn(&self) -> std::option::Option<&str> {
self.kms_key_arn.as_deref()
}
}
impl std::fmt::Debug for S3Action {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("S3Action");
formatter.field("topic_arn", &self.topic_arn);
formatter.field("bucket_name", &self.bucket_name);
formatter.field("object_key_prefix", &self.object_key_prefix);
formatter.field("kms_key_arn", &self.kms_key_arn);
formatter.finish()
}
}
/// See [`S3Action`](crate::model::S3Action)
pub mod s3_action {
/// A builder for [`S3Action`](crate::model::S3Action)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) topic_arn: std::option::Option<std::string::String>,
pub(crate) bucket_name: std::option::Option<std::string::String>,
pub(crate) object_key_prefix: std::option::Option<std::string::String>,
pub(crate) kms_key_arn: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.topic_arn = Some(input.into());
self
}
/// <p>The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn set_topic_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.topic_arn = input;
self
}
/// <p>The name of the Amazon S3 bucket that incoming email will be saved to.</p>
pub fn bucket_name(mut self, input: impl Into<std::string::String>) -> Self {
self.bucket_name = Some(input.into());
self
}
/// <p>The name of the Amazon S3 bucket that incoming email will be saved to.</p>
pub fn set_bucket_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bucket_name = input;
self
}
/// <p>The key prefix of the Amazon S3 bucket. The key prefix is similar to a directory name that enables you to store similar data under the same directory in a bucket.</p>
pub fn object_key_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.object_key_prefix = Some(input.into());
self
}
/// <p>The key prefix of the Amazon S3 bucket. The key prefix is similar to a directory name that enables you to store similar data under the same directory in a bucket.</p>
pub fn set_object_key_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.object_key_prefix = input;
self
}
/// <p>The customer master key that Amazon SES should use to encrypt your emails before saving them to the Amazon S3 bucket. You can use the default master key or a custom master key you created in AWS KMS as follows:</p>
/// <ul>
/// <li> <p>To use the default master key, provide an ARN in the form of <code>arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses</code>. For example, if your AWS account ID is 123456789012 and you want to use the default master key in the US West (Oregon) region, the ARN of the default master key would be <code>arn:aws:kms:us-west-2:123456789012:alias/aws/ses</code>. If you use the default master key, you don't need to perform any extra steps to give Amazon SES permission to use the key.</p> </li>
/// <li> <p>To use a custom master key you created in AWS KMS, provide the ARN of the master key and ensure that you add a statement to your key's policy to give Amazon SES permission to use it. For more information about giving permissions, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html">Amazon SES Developer Guide</a>.</p> </li>
/// </ul>
/// <p>For more information about key policies, see the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html">AWS KMS Developer Guide</a>. If you do not specify a master key, Amazon SES will not encrypt your emails.</p> <important>
/// <p>Your mail is encrypted by Amazon SES using the Amazon S3 encryption client before the mail is submitted to Amazon S3 for storage. It is not encrypted using Amazon S3 server-side encryption. This means that you must use the Amazon S3 encryption client to decrypt the email after retrieving it from Amazon S3, as the service has no access to use your AWS KMS keys for decryption. This encryption client is currently available with the <a href="http://aws.amazon.com/sdk-for-java/">AWS SDK for Java</a> and <a href="http://aws.amazon.com/sdk-for-ruby/">AWS SDK for Ruby</a> only. For more information about client-side encryption using AWS KMS master keys, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html">Amazon S3 Developer Guide</a>.</p>
/// </important>
pub fn kms_key_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_arn = Some(input.into());
self
}
/// <p>The customer master key that Amazon SES should use to encrypt your emails before saving them to the Amazon S3 bucket. You can use the default master key or a custom master key you created in AWS KMS as follows:</p>
/// <ul>
/// <li> <p>To use the default master key, provide an ARN in the form of <code>arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses</code>. For example, if your AWS account ID is 123456789012 and you want to use the default master key in the US West (Oregon) region, the ARN of the default master key would be <code>arn:aws:kms:us-west-2:123456789012:alias/aws/ses</code>. If you use the default master key, you don't need to perform any extra steps to give Amazon SES permission to use the key.</p> </li>
/// <li> <p>To use a custom master key you created in AWS KMS, provide the ARN of the master key and ensure that you add a statement to your key's policy to give Amazon SES permission to use it. For more information about giving permissions, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html">Amazon SES Developer Guide</a>.</p> </li>
/// </ul>
/// <p>For more information about key policies, see the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html">AWS KMS Developer Guide</a>. If you do not specify a master key, Amazon SES will not encrypt your emails.</p> <important>
/// <p>Your mail is encrypted by Amazon SES using the Amazon S3 encryption client before the mail is submitted to Amazon S3 for storage. It is not encrypted using Amazon S3 server-side encryption. This means that you must use the Amazon S3 encryption client to decrypt the email after retrieving it from Amazon S3, as the service has no access to use your AWS KMS keys for decryption. This encryption client is currently available with the <a href="http://aws.amazon.com/sdk-for-java/">AWS SDK for Java</a> and <a href="http://aws.amazon.com/sdk-for-ruby/">AWS SDK for Ruby</a> only. For more information about client-side encryption using AWS KMS master keys, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html">Amazon S3 Developer Guide</a>.</p>
/// </important>
pub fn set_kms_key_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_arn = input;
self
}
/// Consumes the builder and constructs a [`S3Action`](crate::model::S3Action)
pub fn build(self) -> crate::model::S3Action {
crate::model::S3Action {
topic_arn: self.topic_arn,
bucket_name: self.bucket_name,
object_key_prefix: self.object_key_prefix,
kms_key_arn: self.kms_key_arn,
}
}
}
}
impl S3Action {
/// Creates a new builder-style object to manufacture [`S3Action`](crate::model::S3Action)
pub fn builder() -> crate::model::s3_action::Builder {
crate::model::s3_action::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum TlsPolicy {
#[allow(missing_docs)] // documentation missing in model
Optional,
#[allow(missing_docs)] // documentation missing in model
Require,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for TlsPolicy {
fn from(s: &str) -> Self {
match s {
"Optional" => TlsPolicy::Optional,
"Require" => TlsPolicy::Require,
other => TlsPolicy::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for TlsPolicy {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TlsPolicy::from(s))
}
}
impl TlsPolicy {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
TlsPolicy::Optional => "Optional",
TlsPolicy::Require => "Require",
TlsPolicy::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["Optional", "Require"]
}
}
impl AsRef<str> for TlsPolicy {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>A domain that is used to redirect email recipients to an Amazon SES-operated domain. This domain captures open and click events generated by Amazon SES emails.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html">Configuring Custom Domains to Handle Open and Click Tracking</a> in the <i>Amazon SES Developer Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TrackingOptions {
/// <p>The custom subdomain that will be used to redirect email recipients to the Amazon SES event tracking domain.</p>
pub custom_redirect_domain: std::option::Option<std::string::String>,
}
impl TrackingOptions {
/// <p>The custom subdomain that will be used to redirect email recipients to the Amazon SES event tracking domain.</p>
pub fn custom_redirect_domain(&self) -> std::option::Option<&str> {
self.custom_redirect_domain.as_deref()
}
}
impl std::fmt::Debug for TrackingOptions {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TrackingOptions");
formatter.field("custom_redirect_domain", &self.custom_redirect_domain);
formatter.finish()
}
}
/// See [`TrackingOptions`](crate::model::TrackingOptions)
pub mod tracking_options {
/// A builder for [`TrackingOptions`](crate::model::TrackingOptions)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) custom_redirect_domain: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The custom subdomain that will be used to redirect email recipients to the Amazon SES event tracking domain.</p>
pub fn custom_redirect_domain(mut self, input: impl Into<std::string::String>) -> Self {
self.custom_redirect_domain = Some(input.into());
self
}
/// <p>The custom subdomain that will be used to redirect email recipients to the Amazon SES event tracking domain.</p>
pub fn set_custom_redirect_domain(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.custom_redirect_domain = input;
self
}
/// Consumes the builder and constructs a [`TrackingOptions`](crate::model::TrackingOptions)
pub fn build(self) -> crate::model::TrackingOptions {
crate::model::TrackingOptions {
custom_redirect_domain: self.custom_redirect_domain,
}
}
}
}
impl TrackingOptions {
/// Creates a new builder-style object to manufacture [`TrackingOptions`](crate::model::TrackingOptions)
pub fn builder() -> crate::model::tracking_options::Builder {
crate::model::tracking_options::Builder::default()
}
}
/// <p>Contains information about the event destination that the specified email sending events will be published to.</p> <note>
/// <p>When you create or update an event destination, you must provide one, and only one, destination. The destination can be Amazon CloudWatch, Amazon Kinesis Firehose or Amazon Simple Notification Service (Amazon SNS).</p>
/// </note>
/// <p>Event destinations are associated with configuration sets, which enable you to publish email sending events to Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple Notification Service (Amazon SNS). For information about using configuration sets, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EventDestination {
/// <p>The name of the event destination. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub name: std::option::Option<std::string::String>,
/// <p>Sets whether Amazon SES publishes events to this destination when you send an email with the associated configuration set. Set to <code>true</code> to enable publishing to this destination; set to <code>false</code> to prevent publishing to this destination. The default value is <code>false</code>.</p>
pub enabled: bool,
/// <p>The type of email sending events to publish to the event destination.</p>
pub matching_event_types: std::option::Option<std::vec::Vec<crate::model::EventType>>,
/// <p>An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.</p>
pub kinesis_firehose_destination: std::option::Option<crate::model::KinesisFirehoseDestination>,
/// <p>An object that contains the names, default values, and sources of the dimensions associated with an Amazon CloudWatch event destination.</p>
pub cloud_watch_destination: std::option::Option<crate::model::CloudWatchDestination>,
/// <p>An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event destination.</p>
pub sns_destination: std::option::Option<crate::model::SnsDestination>,
}
impl EventDestination {
/// <p>The name of the event destination. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>Sets whether Amazon SES publishes events to this destination when you send an email with the associated configuration set. Set to <code>true</code> to enable publishing to this destination; set to <code>false</code> to prevent publishing to this destination. The default value is <code>false</code>.</p>
pub fn enabled(&self) -> bool {
self.enabled
}
/// <p>The type of email sending events to publish to the event destination.</p>
pub fn matching_event_types(&self) -> std::option::Option<&[crate::model::EventType]> {
self.matching_event_types.as_deref()
}
/// <p>An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.</p>
pub fn kinesis_firehose_destination(
&self,
) -> std::option::Option<&crate::model::KinesisFirehoseDestination> {
self.kinesis_firehose_destination.as_ref()
}
/// <p>An object that contains the names, default values, and sources of the dimensions associated with an Amazon CloudWatch event destination.</p>
pub fn cloud_watch_destination(
&self,
) -> std::option::Option<&crate::model::CloudWatchDestination> {
self.cloud_watch_destination.as_ref()
}
/// <p>An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event destination.</p>
pub fn sns_destination(&self) -> std::option::Option<&crate::model::SnsDestination> {
self.sns_destination.as_ref()
}
}
impl std::fmt::Debug for EventDestination {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EventDestination");
formatter.field("name", &self.name);
formatter.field("enabled", &self.enabled);
formatter.field("matching_event_types", &self.matching_event_types);
formatter.field(
"kinesis_firehose_destination",
&self.kinesis_firehose_destination,
);
formatter.field("cloud_watch_destination", &self.cloud_watch_destination);
formatter.field("sns_destination", &self.sns_destination);
formatter.finish()
}
}
/// See [`EventDestination`](crate::model::EventDestination)
pub mod event_destination {
/// A builder for [`EventDestination`](crate::model::EventDestination)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) enabled: std::option::Option<bool>,
pub(crate) matching_event_types:
std::option::Option<std::vec::Vec<crate::model::EventType>>,
pub(crate) kinesis_firehose_destination:
std::option::Option<crate::model::KinesisFirehoseDestination>,
pub(crate) cloud_watch_destination:
std::option::Option<crate::model::CloudWatchDestination>,
pub(crate) sns_destination: std::option::Option<crate::model::SnsDestination>,
}
impl Builder {
/// <p>The name of the event destination. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the event destination. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>Sets whether Amazon SES publishes events to this destination when you send an email with the associated configuration set. Set to <code>true</code> to enable publishing to this destination; set to <code>false</code> to prevent publishing to this destination. The default value is <code>false</code>.</p>
pub fn enabled(mut self, input: bool) -> Self {
self.enabled = Some(input);
self
}
/// <p>Sets whether Amazon SES publishes events to this destination when you send an email with the associated configuration set. Set to <code>true</code> to enable publishing to this destination; set to <code>false</code> to prevent publishing to this destination. The default value is <code>false</code>.</p>
pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.enabled = input;
self
}
/// Appends an item to `matching_event_types`.
///
/// To override the contents of this collection use [`set_matching_event_types`](Self::set_matching_event_types).
///
/// <p>The type of email sending events to publish to the event destination.</p>
pub fn matching_event_types(mut self, input: crate::model::EventType) -> Self {
let mut v = self.matching_event_types.unwrap_or_default();
v.push(input);
self.matching_event_types = Some(v);
self
}
/// <p>The type of email sending events to publish to the event destination.</p>
pub fn set_matching_event_types(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::EventType>>,
) -> Self {
self.matching_event_types = input;
self
}
/// <p>An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.</p>
pub fn kinesis_firehose_destination(
mut self,
input: crate::model::KinesisFirehoseDestination,
) -> Self {
self.kinesis_firehose_destination = Some(input);
self
}
/// <p>An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.</p>
pub fn set_kinesis_firehose_destination(
mut self,
input: std::option::Option<crate::model::KinesisFirehoseDestination>,
) -> Self {
self.kinesis_firehose_destination = input;
self
}
/// <p>An object that contains the names, default values, and sources of the dimensions associated with an Amazon CloudWatch event destination.</p>
pub fn cloud_watch_destination(
mut self,
input: crate::model::CloudWatchDestination,
) -> Self {
self.cloud_watch_destination = Some(input);
self
}
/// <p>An object that contains the names, default values, and sources of the dimensions associated with an Amazon CloudWatch event destination.</p>
pub fn set_cloud_watch_destination(
mut self,
input: std::option::Option<crate::model::CloudWatchDestination>,
) -> Self {
self.cloud_watch_destination = input;
self
}
/// <p>An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event destination.</p>
pub fn sns_destination(mut self, input: crate::model::SnsDestination) -> Self {
self.sns_destination = Some(input);
self
}
/// <p>An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event destination.</p>
pub fn set_sns_destination(
mut self,
input: std::option::Option<crate::model::SnsDestination>,
) -> Self {
self.sns_destination = input;
self
}
/// Consumes the builder and constructs a [`EventDestination`](crate::model::EventDestination)
pub fn build(self) -> crate::model::EventDestination {
crate::model::EventDestination {
name: self.name,
enabled: self.enabled.unwrap_or_default(),
matching_event_types: self.matching_event_types,
kinesis_firehose_destination: self.kinesis_firehose_destination,
cloud_watch_destination: self.cloud_watch_destination,
sns_destination: self.sns_destination,
}
}
}
}
impl EventDestination {
/// Creates a new builder-style object to manufacture [`EventDestination`](crate::model::EventDestination)
pub fn builder() -> crate::model::event_destination::Builder {
crate::model::event_destination::Builder::default()
}
}
/// <p>Contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event destination.</p>
/// <p>Event destinations, such as Amazon SNS, are associated with configuration sets, which enable you to publish email sending events. For information about using configuration sets, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SnsDestination {
/// <p>The ARN of the Amazon SNS topic that email sending events will be published to. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub topic_arn: std::option::Option<std::string::String>,
}
impl SnsDestination {
/// <p>The ARN of the Amazon SNS topic that email sending events will be published to. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(&self) -> std::option::Option<&str> {
self.topic_arn.as_deref()
}
}
impl std::fmt::Debug for SnsDestination {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SnsDestination");
formatter.field("topic_arn", &self.topic_arn);
formatter.finish()
}
}
/// See [`SnsDestination`](crate::model::SnsDestination)
pub mod sns_destination {
/// A builder for [`SnsDestination`](crate::model::SnsDestination)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) topic_arn: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The ARN of the Amazon SNS topic that email sending events will be published to. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn topic_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.topic_arn = Some(input.into());
self
}
/// <p>The ARN of the Amazon SNS topic that email sending events will be published to. An example of an Amazon SNS topic ARN is <code>arn:aws:sns:us-west-2:123456789012:MyTopic</code>. For more information about Amazon SNS topics, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Amazon SNS Developer Guide</a>.</p>
pub fn set_topic_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.topic_arn = input;
self
}
/// Consumes the builder and constructs a [`SnsDestination`](crate::model::SnsDestination)
pub fn build(self) -> crate::model::SnsDestination {
crate::model::SnsDestination {
topic_arn: self.topic_arn,
}
}
}
}
impl SnsDestination {
/// Creates a new builder-style object to manufacture [`SnsDestination`](crate::model::SnsDestination)
pub fn builder() -> crate::model::sns_destination::Builder {
crate::model::sns_destination::Builder::default()
}
}
/// <p>Contains information associated with an Amazon CloudWatch event destination to which email sending events are published.</p>
/// <p>Event destinations, such as Amazon CloudWatch, are associated with configuration sets, which enable you to publish email sending events. For information about using configuration sets, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CloudWatchDestination {
/// <p>A list of dimensions upon which to categorize your emails when you publish email sending events to Amazon CloudWatch.</p>
pub dimension_configurations:
std::option::Option<std::vec::Vec<crate::model::CloudWatchDimensionConfiguration>>,
}
impl CloudWatchDestination {
/// <p>A list of dimensions upon which to categorize your emails when you publish email sending events to Amazon CloudWatch.</p>
pub fn dimension_configurations(
&self,
) -> std::option::Option<&[crate::model::CloudWatchDimensionConfiguration]> {
self.dimension_configurations.as_deref()
}
}
impl std::fmt::Debug for CloudWatchDestination {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CloudWatchDestination");
formatter.field("dimension_configurations", &self.dimension_configurations);
formatter.finish()
}
}
/// See [`CloudWatchDestination`](crate::model::CloudWatchDestination)
pub mod cloud_watch_destination {
/// A builder for [`CloudWatchDestination`](crate::model::CloudWatchDestination)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) dimension_configurations:
std::option::Option<std::vec::Vec<crate::model::CloudWatchDimensionConfiguration>>,
}
impl Builder {
/// Appends an item to `dimension_configurations`.
///
/// To override the contents of this collection use [`set_dimension_configurations`](Self::set_dimension_configurations).
///
/// <p>A list of dimensions upon which to categorize your emails when you publish email sending events to Amazon CloudWatch.</p>
pub fn dimension_configurations(
mut self,
input: crate::model::CloudWatchDimensionConfiguration,
) -> Self {
let mut v = self.dimension_configurations.unwrap_or_default();
v.push(input);
self.dimension_configurations = Some(v);
self
}
/// <p>A list of dimensions upon which to categorize your emails when you publish email sending events to Amazon CloudWatch.</p>
pub fn set_dimension_configurations(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::CloudWatchDimensionConfiguration>,
>,
) -> Self {
self.dimension_configurations = input;
self
}
/// Consumes the builder and constructs a [`CloudWatchDestination`](crate::model::CloudWatchDestination)
pub fn build(self) -> crate::model::CloudWatchDestination {
crate::model::CloudWatchDestination {
dimension_configurations: self.dimension_configurations,
}
}
}
}
impl CloudWatchDestination {
/// Creates a new builder-style object to manufacture [`CloudWatchDestination`](crate::model::CloudWatchDestination)
pub fn builder() -> crate::model::cloud_watch_destination::Builder {
crate::model::cloud_watch_destination::Builder::default()
}
}
/// <p>Contains the dimension configuration to use when you publish email sending events to Amazon CloudWatch.</p>
/// <p>For information about publishing email sending events to Amazon CloudWatch, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CloudWatchDimensionConfiguration {
/// <p>The name of an Amazon CloudWatch dimension associated with an email sending metric. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub dimension_name: std::option::Option<std::string::String>,
/// <p>The place where Amazon SES finds the value of a dimension to publish to Amazon CloudWatch. If you want Amazon SES to use the message tags that you specify using an <code>X-SES-MESSAGE-TAGS</code> header or a parameter to the <code>SendEmail</code>/<code>SendRawEmail</code> API, choose <code>messageTag</code>. If you want Amazon SES to use your own email headers, choose <code>emailHeader</code>.</p>
pub dimension_value_source: std::option::Option<crate::model::DimensionValueSource>,
/// <p>The default value of the dimension that is published to Amazon CloudWatch if you do not provide the value of the dimension when you send an email. The default value must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub default_dimension_value: std::option::Option<std::string::String>,
}
impl CloudWatchDimensionConfiguration {
/// <p>The name of an Amazon CloudWatch dimension associated with an email sending metric. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub fn dimension_name(&self) -> std::option::Option<&str> {
self.dimension_name.as_deref()
}
/// <p>The place where Amazon SES finds the value of a dimension to publish to Amazon CloudWatch. If you want Amazon SES to use the message tags that you specify using an <code>X-SES-MESSAGE-TAGS</code> header or a parameter to the <code>SendEmail</code>/<code>SendRawEmail</code> API, choose <code>messageTag</code>. If you want Amazon SES to use your own email headers, choose <code>emailHeader</code>.</p>
pub fn dimension_value_source(
&self,
) -> std::option::Option<&crate::model::DimensionValueSource> {
self.dimension_value_source.as_ref()
}
/// <p>The default value of the dimension that is published to Amazon CloudWatch if you do not provide the value of the dimension when you send an email. The default value must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub fn default_dimension_value(&self) -> std::option::Option<&str> {
self.default_dimension_value.as_deref()
}
}
impl std::fmt::Debug for CloudWatchDimensionConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CloudWatchDimensionConfiguration");
formatter.field("dimension_name", &self.dimension_name);
formatter.field("dimension_value_source", &self.dimension_value_source);
formatter.field("default_dimension_value", &self.default_dimension_value);
formatter.finish()
}
}
/// See [`CloudWatchDimensionConfiguration`](crate::model::CloudWatchDimensionConfiguration)
pub mod cloud_watch_dimension_configuration {
/// A builder for [`CloudWatchDimensionConfiguration`](crate::model::CloudWatchDimensionConfiguration)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) dimension_name: std::option::Option<std::string::String>,
pub(crate) dimension_value_source: std::option::Option<crate::model::DimensionValueSource>,
pub(crate) default_dimension_value: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The name of an Amazon CloudWatch dimension associated with an email sending metric. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub fn dimension_name(mut self, input: impl Into<std::string::String>) -> Self {
self.dimension_name = Some(input.into());
self
}
/// <p>The name of an Amazon CloudWatch dimension associated with an email sending metric. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub fn set_dimension_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.dimension_name = input;
self
}
/// <p>The place where Amazon SES finds the value of a dimension to publish to Amazon CloudWatch. If you want Amazon SES to use the message tags that you specify using an <code>X-SES-MESSAGE-TAGS</code> header or a parameter to the <code>SendEmail</code>/<code>SendRawEmail</code> API, choose <code>messageTag</code>. If you want Amazon SES to use your own email headers, choose <code>emailHeader</code>.</p>
pub fn dimension_value_source(mut self, input: crate::model::DimensionValueSource) -> Self {
self.dimension_value_source = Some(input);
self
}
/// <p>The place where Amazon SES finds the value of a dimension to publish to Amazon CloudWatch. If you want Amazon SES to use the message tags that you specify using an <code>X-SES-MESSAGE-TAGS</code> header or a parameter to the <code>SendEmail</code>/<code>SendRawEmail</code> API, choose <code>messageTag</code>. If you want Amazon SES to use your own email headers, choose <code>emailHeader</code>.</p>
pub fn set_dimension_value_source(
mut self,
input: std::option::Option<crate::model::DimensionValueSource>,
) -> Self {
self.dimension_value_source = input;
self
}
/// <p>The default value of the dimension that is published to Amazon CloudWatch if you do not provide the value of the dimension when you send an email. The default value must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub fn default_dimension_value(mut self, input: impl Into<std::string::String>) -> Self {
self.default_dimension_value = Some(input.into());
self
}
/// <p>The default value of the dimension that is published to Amazon CloudWatch if you do not provide the value of the dimension when you send an email. The default value must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub fn set_default_dimension_value(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.default_dimension_value = input;
self
}
/// Consumes the builder and constructs a [`CloudWatchDimensionConfiguration`](crate::model::CloudWatchDimensionConfiguration)
pub fn build(self) -> crate::model::CloudWatchDimensionConfiguration {
crate::model::CloudWatchDimensionConfiguration {
dimension_name: self.dimension_name,
dimension_value_source: self.dimension_value_source,
default_dimension_value: self.default_dimension_value,
}
}
}
}
impl CloudWatchDimensionConfiguration {
/// Creates a new builder-style object to manufacture [`CloudWatchDimensionConfiguration`](crate::model::CloudWatchDimensionConfiguration)
pub fn builder() -> crate::model::cloud_watch_dimension_configuration::Builder {
crate::model::cloud_watch_dimension_configuration::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DimensionValueSource {
#[allow(missing_docs)] // documentation missing in model
EmailHeader,
#[allow(missing_docs)] // documentation missing in model
LinkTag,
#[allow(missing_docs)] // documentation missing in model
MessageTag,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DimensionValueSource {
fn from(s: &str) -> Self {
match s {
"emailHeader" => DimensionValueSource::EmailHeader,
"linkTag" => DimensionValueSource::LinkTag,
"messageTag" => DimensionValueSource::MessageTag,
other => DimensionValueSource::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DimensionValueSource {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DimensionValueSource::from(s))
}
}
impl DimensionValueSource {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DimensionValueSource::EmailHeader => "emailHeader",
DimensionValueSource::LinkTag => "linkTag",
DimensionValueSource::MessageTag => "messageTag",
DimensionValueSource::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["emailHeader", "linkTag", "messageTag"]
}
}
impl AsRef<str> for DimensionValueSource {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.</p>
/// <p>Event destinations, such as Amazon Kinesis Firehose, are associated with configuration sets, which enable you to publish email sending events. For information about using configuration sets, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct KinesisFirehoseDestination {
/// <p>The ARN of the IAM role under which Amazon SES publishes email sending events to the Amazon Kinesis Firehose stream.</p>
pub iam_role_arn: std::option::Option<std::string::String>,
/// <p>The ARN of the Amazon Kinesis Firehose stream that email sending events should be published to.</p>
pub delivery_stream_arn: std::option::Option<std::string::String>,
}
impl KinesisFirehoseDestination {
/// <p>The ARN of the IAM role under which Amazon SES publishes email sending events to the Amazon Kinesis Firehose stream.</p>
pub fn iam_role_arn(&self) -> std::option::Option<&str> {
self.iam_role_arn.as_deref()
}
/// <p>The ARN of the Amazon Kinesis Firehose stream that email sending events should be published to.</p>
pub fn delivery_stream_arn(&self) -> std::option::Option<&str> {
self.delivery_stream_arn.as_deref()
}
}
impl std::fmt::Debug for KinesisFirehoseDestination {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("KinesisFirehoseDestination");
formatter.field("iam_role_arn", &self.iam_role_arn);
formatter.field("delivery_stream_arn", &self.delivery_stream_arn);
formatter.finish()
}
}
/// See [`KinesisFirehoseDestination`](crate::model::KinesisFirehoseDestination)
pub mod kinesis_firehose_destination {
/// A builder for [`KinesisFirehoseDestination`](crate::model::KinesisFirehoseDestination)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) iam_role_arn: std::option::Option<std::string::String>,
pub(crate) delivery_stream_arn: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The ARN of the IAM role under which Amazon SES publishes email sending events to the Amazon Kinesis Firehose stream.</p>
pub fn iam_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.iam_role_arn = Some(input.into());
self
}
/// <p>The ARN of the IAM role under which Amazon SES publishes email sending events to the Amazon Kinesis Firehose stream.</p>
pub fn set_iam_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.iam_role_arn = input;
self
}
/// <p>The ARN of the Amazon Kinesis Firehose stream that email sending events should be published to.</p>
pub fn delivery_stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.delivery_stream_arn = Some(input.into());
self
}
/// <p>The ARN of the Amazon Kinesis Firehose stream that email sending events should be published to.</p>
pub fn set_delivery_stream_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.delivery_stream_arn = input;
self
}
/// Consumes the builder and constructs a [`KinesisFirehoseDestination`](crate::model::KinesisFirehoseDestination)
pub fn build(self) -> crate::model::KinesisFirehoseDestination {
crate::model::KinesisFirehoseDestination {
iam_role_arn: self.iam_role_arn,
delivery_stream_arn: self.delivery_stream_arn,
}
}
}
}
impl KinesisFirehoseDestination {
/// Creates a new builder-style object to manufacture [`KinesisFirehoseDestination`](crate::model::KinesisFirehoseDestination)
pub fn builder() -> crate::model::kinesis_firehose_destination::Builder {
crate::model::kinesis_firehose_destination::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum EventType {
#[allow(missing_docs)] // documentation missing in model
Bounce,
#[allow(missing_docs)] // documentation missing in model
Click,
#[allow(missing_docs)] // documentation missing in model
Complaint,
#[allow(missing_docs)] // documentation missing in model
Delivery,
#[allow(missing_docs)] // documentation missing in model
Open,
#[allow(missing_docs)] // documentation missing in model
Reject,
#[allow(missing_docs)] // documentation missing in model
RenderingFailure,
#[allow(missing_docs)] // documentation missing in model
Send,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for EventType {
fn from(s: &str) -> Self {
match s {
"bounce" => EventType::Bounce,
"click" => EventType::Click,
"complaint" => EventType::Complaint,
"delivery" => EventType::Delivery,
"open" => EventType::Open,
"reject" => EventType::Reject,
"renderingFailure" => EventType::RenderingFailure,
"send" => EventType::Send,
other => EventType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for EventType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(EventType::from(s))
}
}
impl EventType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
EventType::Bounce => "bounce",
EventType::Click => "click",
EventType::Complaint => "complaint",
EventType::Delivery => "delivery",
EventType::Open => "open",
EventType::Reject => "reject",
EventType::RenderingFailure => "renderingFailure",
EventType::Send => "send",
EventType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"bounce",
"click",
"complaint",
"delivery",
"open",
"reject",
"renderingFailure",
"send",
]
}
}
impl AsRef<str> for EventType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum NotificationType {
#[allow(missing_docs)] // documentation missing in model
Bounce,
#[allow(missing_docs)] // documentation missing in model
Complaint,
#[allow(missing_docs)] // documentation missing in model
Delivery,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for NotificationType {
fn from(s: &str) -> Self {
match s {
"Bounce" => NotificationType::Bounce,
"Complaint" => NotificationType::Complaint,
"Delivery" => NotificationType::Delivery,
other => NotificationType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for NotificationType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(NotificationType::from(s))
}
}
impl NotificationType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
NotificationType::Bounce => "Bounce",
NotificationType::Complaint => "Complaint",
NotificationType::Delivery => "Delivery",
NotificationType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["Bounce", "Complaint", "Delivery"]
}
}
impl AsRef<str> for NotificationType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BehaviorOnMxFailure {
#[allow(missing_docs)] // documentation missing in model
RejectMessage,
#[allow(missing_docs)] // documentation missing in model
UseDefaultValue,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for BehaviorOnMxFailure {
fn from(s: &str) -> Self {
match s {
"RejectMessage" => BehaviorOnMxFailure::RejectMessage,
"UseDefaultValue" => BehaviorOnMxFailure::UseDefaultValue,
other => BehaviorOnMxFailure::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BehaviorOnMxFailure {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BehaviorOnMxFailure::from(s))
}
}
impl BehaviorOnMxFailure {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BehaviorOnMxFailure::RejectMessage => "RejectMessage",
BehaviorOnMxFailure::UseDefaultValue => "UseDefaultValue",
BehaviorOnMxFailure::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["RejectMessage", "UseDefaultValue"]
}
}
impl AsRef<str> for BehaviorOnMxFailure {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Contains the name and value of a tag that you can provide to <code>SendEmail</code> or <code>SendRawEmail</code> to apply to an email.</p>
/// <p>Message tags, which you use with configuration sets, enable you to publish email sending events. For information about using configuration sets, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MessageTag {
/// <p>The name of the tag. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub name: std::option::Option<std::string::String>,
/// <p>The value of the tag. The value must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub value: std::option::Option<std::string::String>,
}
impl MessageTag {
/// <p>The name of the tag. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The value of the tag. The value must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub fn value(&self) -> std::option::Option<&str> {
self.value.as_deref()
}
}
impl std::fmt::Debug for MessageTag {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MessageTag");
formatter.field("name", &self.name);
formatter.field("value", &self.value);
formatter.finish()
}
}
/// See [`MessageTag`](crate::model::MessageTag)
pub mod message_tag {
/// A builder for [`MessageTag`](crate::model::MessageTag)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) value: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The name of the tag. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the tag. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The value of the tag. The value must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
self.value = Some(input.into());
self
}
/// <p>The value of the tag. The value must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain less than 256 characters.</p> </li>
/// </ul>
pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
self.value = input;
self
}
/// Consumes the builder and constructs a [`MessageTag`](crate::model::MessageTag)
pub fn build(self) -> crate::model::MessageTag {
crate::model::MessageTag {
name: self.name,
value: self.value,
}
}
}
}
impl MessageTag {
/// Creates a new builder-style object to manufacture [`MessageTag`](crate::model::MessageTag)
pub fn builder() -> crate::model::message_tag::Builder {
crate::model::message_tag::Builder::default()
}
}
/// <p>Represents the destination of the message, consisting of To:, CC:, and BCC: fields.</p> <note>
/// <p>Amazon SES does not support the SMTPUTF8 extension, as described in <a href="https://tools.ietf.org/html/rfc6531">RFC6531</a>. For this reason, the <i>local part</i> of a destination email address (the part of the email address that precedes the @ sign) may only contain <a href="https://en.wikipedia.org/wiki/Email_address#Local-part">7-bit ASCII characters</a>. If the <i>domain part</i> of an address (the part after the @ sign) contains non-ASCII characters, they must be encoded using Punycode, as described in <a href="https://tools.ietf.org/html/rfc3492.html">RFC3492</a>.</p>
/// </note>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Destination {
/// <p>The recipients to place on the To: line of the message.</p>
pub to_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
/// <p>The recipients to place on the CC: line of the message.</p>
pub cc_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
/// <p>The recipients to place on the BCC: line of the message.</p>
pub bcc_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Destination {
/// <p>The recipients to place on the To: line of the message.</p>
pub fn to_addresses(&self) -> std::option::Option<&[std::string::String]> {
self.to_addresses.as_deref()
}
/// <p>The recipients to place on the CC: line of the message.</p>
pub fn cc_addresses(&self) -> std::option::Option<&[std::string::String]> {
self.cc_addresses.as_deref()
}
/// <p>The recipients to place on the BCC: line of the message.</p>
pub fn bcc_addresses(&self) -> std::option::Option<&[std::string::String]> {
self.bcc_addresses.as_deref()
}
}
impl std::fmt::Debug for Destination {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Destination");
formatter.field("to_addresses", &self.to_addresses);
formatter.field("cc_addresses", &self.cc_addresses);
formatter.field("bcc_addresses", &self.bcc_addresses);
formatter.finish()
}
}
/// See [`Destination`](crate::model::Destination)
pub mod destination {
/// A builder for [`Destination`](crate::model::Destination)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) to_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) cc_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) bcc_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
/// Appends an item to `to_addresses`.
///
/// To override the contents of this collection use [`set_to_addresses`](Self::set_to_addresses).
///
/// <p>The recipients to place on the To: line of the message.</p>
pub fn to_addresses(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.to_addresses.unwrap_or_default();
v.push(input.into());
self.to_addresses = Some(v);
self
}
/// <p>The recipients to place on the To: line of the message.</p>
pub fn set_to_addresses(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.to_addresses = input;
self
}
/// Appends an item to `cc_addresses`.
///
/// To override the contents of this collection use [`set_cc_addresses`](Self::set_cc_addresses).
///
/// <p>The recipients to place on the CC: line of the message.</p>
pub fn cc_addresses(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.cc_addresses.unwrap_or_default();
v.push(input.into());
self.cc_addresses = Some(v);
self
}
/// <p>The recipients to place on the CC: line of the message.</p>
pub fn set_cc_addresses(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.cc_addresses = input;
self
}
/// Appends an item to `bcc_addresses`.
///
/// To override the contents of this collection use [`set_bcc_addresses`](Self::set_bcc_addresses).
///
/// <p>The recipients to place on the BCC: line of the message.</p>
pub fn bcc_addresses(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.bcc_addresses.unwrap_or_default();
v.push(input.into());
self.bcc_addresses = Some(v);
self
}
/// <p>The recipients to place on the BCC: line of the message.</p>
pub fn set_bcc_addresses(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.bcc_addresses = input;
self
}
/// Consumes the builder and constructs a [`Destination`](crate::model::Destination)
pub fn build(self) -> crate::model::Destination {
crate::model::Destination {
to_addresses: self.to_addresses,
cc_addresses: self.cc_addresses,
bcc_addresses: self.bcc_addresses,
}
}
}
}
impl Destination {
/// Creates a new builder-style object to manufacture [`Destination`](crate::model::Destination)
pub fn builder() -> crate::model::destination::Builder {
crate::model::destination::Builder::default()
}
}
/// <p>Represents the raw data of the message.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RawMessage {
/// <p>The raw data of the message. This data needs to base64-encoded if you are accessing Amazon SES directly through the HTTPS interface. If you are accessing Amazon SES using an AWS SDK, the SDK takes care of the base 64-encoding for you. In all cases, the client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, and MIME encoding.</p>
/// <p>The To:, CC:, and BCC: headers in the raw message can contain a group list.</p>
/// <p>If you are using <code>SendRawEmail</code> with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation for <code>SendRawEmail</code>. </p> <important>
/// <p>Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email.</p>
/// </important>
/// <p>For more information, go to the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html">Amazon SES Developer Guide</a>.</p>
pub data: std::option::Option<aws_smithy_types::Blob>,
}
impl RawMessage {
/// <p>The raw data of the message. This data needs to base64-encoded if you are accessing Amazon SES directly through the HTTPS interface. If you are accessing Amazon SES using an AWS SDK, the SDK takes care of the base 64-encoding for you. In all cases, the client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, and MIME encoding.</p>
/// <p>The To:, CC:, and BCC: headers in the raw message can contain a group list.</p>
/// <p>If you are using <code>SendRawEmail</code> with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation for <code>SendRawEmail</code>. </p> <important>
/// <p>Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email.</p>
/// </important>
/// <p>For more information, go to the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html">Amazon SES Developer Guide</a>.</p>
pub fn data(&self) -> std::option::Option<&aws_smithy_types::Blob> {
self.data.as_ref()
}
}
impl std::fmt::Debug for RawMessage {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RawMessage");
formatter.field("data", &self.data);
formatter.finish()
}
}
/// See [`RawMessage`](crate::model::RawMessage)
pub mod raw_message {
/// A builder for [`RawMessage`](crate::model::RawMessage)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) data: std::option::Option<aws_smithy_types::Blob>,
}
impl Builder {
/// <p>The raw data of the message. This data needs to base64-encoded if you are accessing Amazon SES directly through the HTTPS interface. If you are accessing Amazon SES using an AWS SDK, the SDK takes care of the base 64-encoding for you. In all cases, the client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, and MIME encoding.</p>
/// <p>The To:, CC:, and BCC: headers in the raw message can contain a group list.</p>
/// <p>If you are using <code>SendRawEmail</code> with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation for <code>SendRawEmail</code>. </p> <important>
/// <p>Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email.</p>
/// </important>
/// <p>For more information, go to the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html">Amazon SES Developer Guide</a>.</p>
pub fn data(mut self, input: aws_smithy_types::Blob) -> Self {
self.data = Some(input);
self
}
/// <p>The raw data of the message. This data needs to base64-encoded if you are accessing Amazon SES directly through the HTTPS interface. If you are accessing Amazon SES using an AWS SDK, the SDK takes care of the base 64-encoding for you. In all cases, the client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, and MIME encoding.</p>
/// <p>The To:, CC:, and BCC: headers in the raw message can contain a group list.</p>
/// <p>If you are using <code>SendRawEmail</code> with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation for <code>SendRawEmail</code>. </p> <important>
/// <p>Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email.</p>
/// </important>
/// <p>For more information, go to the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html">Amazon SES Developer Guide</a>.</p>
pub fn set_data(mut self, input: std::option::Option<aws_smithy_types::Blob>) -> Self {
self.data = input;
self
}
/// Consumes the builder and constructs a [`RawMessage`](crate::model::RawMessage)
pub fn build(self) -> crate::model::RawMessage {
crate::model::RawMessage { data: self.data }
}
}
}
impl RawMessage {
/// Creates a new builder-style object to manufacture [`RawMessage`](crate::model::RawMessage)
pub fn builder() -> crate::model::raw_message::Builder {
crate::model::raw_message::Builder::default()
}
}
/// <p>Represents the message to be sent, composed of a subject and a body.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Message {
/// <p>The subject of the message: A short summary of the content, which will appear in the recipient's inbox.</p>
pub subject: std::option::Option<crate::model::Content>,
/// <p>The message body.</p>
pub body: std::option::Option<crate::model::Body>,
}
impl Message {
/// <p>The subject of the message: A short summary of the content, which will appear in the recipient's inbox.</p>
pub fn subject(&self) -> std::option::Option<&crate::model::Content> {
self.subject.as_ref()
}
/// <p>The message body.</p>
pub fn body(&self) -> std::option::Option<&crate::model::Body> {
self.body.as_ref()
}
}
impl std::fmt::Debug for Message {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Message");
formatter.field("subject", &self.subject);
formatter.field("body", &self.body);
formatter.finish()
}
}
/// See [`Message`](crate::model::Message)
pub mod message {
/// A builder for [`Message`](crate::model::Message)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) subject: std::option::Option<crate::model::Content>,
pub(crate) body: std::option::Option<crate::model::Body>,
}
impl Builder {
/// <p>The subject of the message: A short summary of the content, which will appear in the recipient's inbox.</p>
pub fn subject(mut self, input: crate::model::Content) -> Self {
self.subject = Some(input);
self
}
/// <p>The subject of the message: A short summary of the content, which will appear in the recipient's inbox.</p>
pub fn set_subject(mut self, input: std::option::Option<crate::model::Content>) -> Self {
self.subject = input;
self
}
/// <p>The message body.</p>
pub fn body(mut self, input: crate::model::Body) -> Self {
self.body = Some(input);
self
}
/// <p>The message body.</p>
pub fn set_body(mut self, input: std::option::Option<crate::model::Body>) -> Self {
self.body = input;
self
}
/// Consumes the builder and constructs a [`Message`](crate::model::Message)
pub fn build(self) -> crate::model::Message {
crate::model::Message {
subject: self.subject,
body: self.body,
}
}
}
}
impl Message {
/// Creates a new builder-style object to manufacture [`Message`](crate::model::Message)
pub fn builder() -> crate::model::message::Builder {
crate::model::message::Builder::default()
}
}
/// <p>Represents the body of the message. You can specify text, HTML, or both. If you use both, then the message should display correctly in the widest variety of email clients.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Body {
/// <p>The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).</p>
pub text: std::option::Option<crate::model::Content>,
/// <p>The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.</p>
pub html: std::option::Option<crate::model::Content>,
}
impl Body {
/// <p>The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).</p>
pub fn text(&self) -> std::option::Option<&crate::model::Content> {
self.text.as_ref()
}
/// <p>The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.</p>
pub fn html(&self) -> std::option::Option<&crate::model::Content> {
self.html.as_ref()
}
}
impl std::fmt::Debug for Body {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Body");
formatter.field("text", &self.text);
formatter.field("html", &self.html);
formatter.finish()
}
}
/// See [`Body`](crate::model::Body)
pub mod body {
/// A builder for [`Body`](crate::model::Body)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text: std::option::Option<crate::model::Content>,
pub(crate) html: std::option::Option<crate::model::Content>,
}
impl Builder {
/// <p>The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).</p>
pub fn text(mut self, input: crate::model::Content) -> Self {
self.text = Some(input);
self
}
/// <p>The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).</p>
pub fn set_text(mut self, input: std::option::Option<crate::model::Content>) -> Self {
self.text = input;
self
}
/// <p>The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.</p>
pub fn html(mut self, input: crate::model::Content) -> Self {
self.html = Some(input);
self
}
/// <p>The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.</p>
pub fn set_html(mut self, input: std::option::Option<crate::model::Content>) -> Self {
self.html = input;
self
}
/// Consumes the builder and constructs a [`Body`](crate::model::Body)
pub fn build(self) -> crate::model::Body {
crate::model::Body {
text: self.text,
html: self.html,
}
}
}
}
impl Body {
/// Creates a new builder-style object to manufacture [`Body`](crate::model::Body)
pub fn builder() -> crate::model::body::Builder {
crate::model::body::Builder::default()
}
}
/// <p>Represents textual data, plus an optional character set specification.</p>
/// <p>By default, the text must be 7-bit ASCII, due to the constraints of the SMTP protocol. If the text must contain any other characters, then you must also specify a character set. Examples include UTF-8, ISO-8859-1, and Shift_JIS.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Content {
/// <p>The textual data of the content.</p>
pub data: std::option::Option<std::string::String>,
/// <p>The character set of the content.</p>
pub charset: std::option::Option<std::string::String>,
}
impl Content {
/// <p>The textual data of the content.</p>
pub fn data(&self) -> std::option::Option<&str> {
self.data.as_deref()
}
/// <p>The character set of the content.</p>
pub fn charset(&self) -> std::option::Option<&str> {
self.charset.as_deref()
}
}
impl std::fmt::Debug for Content {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Content");
formatter.field("data", &self.data);
formatter.field("charset", &self.charset);
formatter.finish()
}
}
/// See [`Content`](crate::model::Content)
pub mod content {
/// A builder for [`Content`](crate::model::Content)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) data: std::option::Option<std::string::String>,
pub(crate) charset: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The textual data of the content.</p>
pub fn data(mut self, input: impl Into<std::string::String>) -> Self {
self.data = Some(input.into());
self
}
/// <p>The textual data of the content.</p>
pub fn set_data(mut self, input: std::option::Option<std::string::String>) -> Self {
self.data = input;
self
}
/// <p>The character set of the content.</p>
pub fn charset(mut self, input: impl Into<std::string::String>) -> Self {
self.charset = Some(input.into());
self
}
/// <p>The character set of the content.</p>
pub fn set_charset(mut self, input: std::option::Option<std::string::String>) -> Self {
self.charset = input;
self
}
/// Consumes the builder and constructs a [`Content`](crate::model::Content)
pub fn build(self) -> crate::model::Content {
crate::model::Content {
data: self.data,
charset: self.charset,
}
}
}
}
impl Content {
/// Creates a new builder-style object to manufacture [`Content`](crate::model::Content)
pub fn builder() -> crate::model::content::Builder {
crate::model::content::Builder::default()
}
}
/// <p>An object that contains the response from the <code>SendBulkTemplatedEmail</code> operation.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BulkEmailDestinationStatus {
/// <p>The status of a message sent using the <code>SendBulkTemplatedEmail</code> operation.</p>
/// <p>Possible values for this parameter include:</p>
/// <ul>
/// <li> <p> <code>Success</code>: Amazon SES accepted the message, and will attempt to deliver it to the recipients.</p> </li>
/// <li> <p> <code>MessageRejected</code>: The message was rejected because it contained a virus.</p> </li>
/// <li> <p> <code>MailFromDomainNotVerified</code>: The sender's email address or domain was not verified.</p> </li>
/// <li> <p> <code>ConfigurationSetDoesNotExist</code>: The configuration set you specified does not exist.</p> </li>
/// <li> <p> <code>TemplateDoesNotExist</code>: The template you specified does not exist.</p> </li>
/// <li> <p> <code>AccountSuspended</code>: Your account has been shut down because of issues related to your email sending practices.</p> </li>
/// <li> <p> <code>AccountThrottled</code>: The number of emails you can send has been reduced because your account has exceeded its allocated sending limit.</p> </li>
/// <li> <p> <code>AccountDailyQuotaExceeded</code>: You have reached or exceeded the maximum number of emails you can send from your account in a 24-hour period.</p> </li>
/// <li> <p> <code>InvalidSendingPoolName</code>: The configuration set you specified refers to an IP pool that does not exist.</p> </li>
/// <li> <p> <code>AccountSendingPaused</code>: Email sending for the Amazon SES account was disabled using the <code>UpdateAccountSendingEnabled</code> operation.</p> </li>
/// <li> <p> <code>ConfigurationSetSendingPaused</code>: Email sending for this configuration set was disabled using the <code>UpdateConfigurationSetSendingEnabled</code> operation.</p> </li>
/// <li> <p> <code>InvalidParameterValue</code>: One or more of the parameters you specified when calling this operation was invalid. See the error message for additional information.</p> </li>
/// <li> <p> <code>TransientFailure</code>: Amazon SES was unable to process your request because of a temporary issue.</p> </li>
/// <li> <p> <code>Failed</code>: Amazon SES was unable to process your request. See the error message for additional information.</p> </li>
/// </ul>
pub status: std::option::Option<crate::model::BulkEmailStatus>,
/// <p>A description of an error that prevented a message being sent using the <code>SendBulkTemplatedEmail</code> operation.</p>
pub error: std::option::Option<std::string::String>,
/// <p>The unique message identifier returned from the <code>SendBulkTemplatedEmail</code> operation.</p>
pub message_id: std::option::Option<std::string::String>,
}
impl BulkEmailDestinationStatus {
/// <p>The status of a message sent using the <code>SendBulkTemplatedEmail</code> operation.</p>
/// <p>Possible values for this parameter include:</p>
/// <ul>
/// <li> <p> <code>Success</code>: Amazon SES accepted the message, and will attempt to deliver it to the recipients.</p> </li>
/// <li> <p> <code>MessageRejected</code>: The message was rejected because it contained a virus.</p> </li>
/// <li> <p> <code>MailFromDomainNotVerified</code>: The sender's email address or domain was not verified.</p> </li>
/// <li> <p> <code>ConfigurationSetDoesNotExist</code>: The configuration set you specified does not exist.</p> </li>
/// <li> <p> <code>TemplateDoesNotExist</code>: The template you specified does not exist.</p> </li>
/// <li> <p> <code>AccountSuspended</code>: Your account has been shut down because of issues related to your email sending practices.</p> </li>
/// <li> <p> <code>AccountThrottled</code>: The number of emails you can send has been reduced because your account has exceeded its allocated sending limit.</p> </li>
/// <li> <p> <code>AccountDailyQuotaExceeded</code>: You have reached or exceeded the maximum number of emails you can send from your account in a 24-hour period.</p> </li>
/// <li> <p> <code>InvalidSendingPoolName</code>: The configuration set you specified refers to an IP pool that does not exist.</p> </li>
/// <li> <p> <code>AccountSendingPaused</code>: Email sending for the Amazon SES account was disabled using the <code>UpdateAccountSendingEnabled</code> operation.</p> </li>
/// <li> <p> <code>ConfigurationSetSendingPaused</code>: Email sending for this configuration set was disabled using the <code>UpdateConfigurationSetSendingEnabled</code> operation.</p> </li>
/// <li> <p> <code>InvalidParameterValue</code>: One or more of the parameters you specified when calling this operation was invalid. See the error message for additional information.</p> </li>
/// <li> <p> <code>TransientFailure</code>: Amazon SES was unable to process your request because of a temporary issue.</p> </li>
/// <li> <p> <code>Failed</code>: Amazon SES was unable to process your request. See the error message for additional information.</p> </li>
/// </ul>
pub fn status(&self) -> std::option::Option<&crate::model::BulkEmailStatus> {
self.status.as_ref()
}
/// <p>A description of an error that prevented a message being sent using the <code>SendBulkTemplatedEmail</code> operation.</p>
pub fn error(&self) -> std::option::Option<&str> {
self.error.as_deref()
}
/// <p>The unique message identifier returned from the <code>SendBulkTemplatedEmail</code> operation.</p>
pub fn message_id(&self) -> std::option::Option<&str> {
self.message_id.as_deref()
}
}
impl std::fmt::Debug for BulkEmailDestinationStatus {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BulkEmailDestinationStatus");
formatter.field("status", &self.status);
formatter.field("error", &self.error);
formatter.field("message_id", &self.message_id);
formatter.finish()
}
}
/// See [`BulkEmailDestinationStatus`](crate::model::BulkEmailDestinationStatus)
pub mod bulk_email_destination_status {
/// A builder for [`BulkEmailDestinationStatus`](crate::model::BulkEmailDestinationStatus)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) status: std::option::Option<crate::model::BulkEmailStatus>,
pub(crate) error: std::option::Option<std::string::String>,
pub(crate) message_id: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The status of a message sent using the <code>SendBulkTemplatedEmail</code> operation.</p>
/// <p>Possible values for this parameter include:</p>
/// <ul>
/// <li> <p> <code>Success</code>: Amazon SES accepted the message, and will attempt to deliver it to the recipients.</p> </li>
/// <li> <p> <code>MessageRejected</code>: The message was rejected because it contained a virus.</p> </li>
/// <li> <p> <code>MailFromDomainNotVerified</code>: The sender's email address or domain was not verified.</p> </li>
/// <li> <p> <code>ConfigurationSetDoesNotExist</code>: The configuration set you specified does not exist.</p> </li>
/// <li> <p> <code>TemplateDoesNotExist</code>: The template you specified does not exist.</p> </li>
/// <li> <p> <code>AccountSuspended</code>: Your account has been shut down because of issues related to your email sending practices.</p> </li>
/// <li> <p> <code>AccountThrottled</code>: The number of emails you can send has been reduced because your account has exceeded its allocated sending limit.</p> </li>
/// <li> <p> <code>AccountDailyQuotaExceeded</code>: You have reached or exceeded the maximum number of emails you can send from your account in a 24-hour period.</p> </li>
/// <li> <p> <code>InvalidSendingPoolName</code>: The configuration set you specified refers to an IP pool that does not exist.</p> </li>
/// <li> <p> <code>AccountSendingPaused</code>: Email sending for the Amazon SES account was disabled using the <code>UpdateAccountSendingEnabled</code> operation.</p> </li>
/// <li> <p> <code>ConfigurationSetSendingPaused</code>: Email sending for this configuration set was disabled using the <code>UpdateConfigurationSetSendingEnabled</code> operation.</p> </li>
/// <li> <p> <code>InvalidParameterValue</code>: One or more of the parameters you specified when calling this operation was invalid. See the error message for additional information.</p> </li>
/// <li> <p> <code>TransientFailure</code>: Amazon SES was unable to process your request because of a temporary issue.</p> </li>
/// <li> <p> <code>Failed</code>: Amazon SES was unable to process your request. See the error message for additional information.</p> </li>
/// </ul>
pub fn status(mut self, input: crate::model::BulkEmailStatus) -> Self {
self.status = Some(input);
self
}
/// <p>The status of a message sent using the <code>SendBulkTemplatedEmail</code> operation.</p>
/// <p>Possible values for this parameter include:</p>
/// <ul>
/// <li> <p> <code>Success</code>: Amazon SES accepted the message, and will attempt to deliver it to the recipients.</p> </li>
/// <li> <p> <code>MessageRejected</code>: The message was rejected because it contained a virus.</p> </li>
/// <li> <p> <code>MailFromDomainNotVerified</code>: The sender's email address or domain was not verified.</p> </li>
/// <li> <p> <code>ConfigurationSetDoesNotExist</code>: The configuration set you specified does not exist.</p> </li>
/// <li> <p> <code>TemplateDoesNotExist</code>: The template you specified does not exist.</p> </li>
/// <li> <p> <code>AccountSuspended</code>: Your account has been shut down because of issues related to your email sending practices.</p> </li>
/// <li> <p> <code>AccountThrottled</code>: The number of emails you can send has been reduced because your account has exceeded its allocated sending limit.</p> </li>
/// <li> <p> <code>AccountDailyQuotaExceeded</code>: You have reached or exceeded the maximum number of emails you can send from your account in a 24-hour period.</p> </li>
/// <li> <p> <code>InvalidSendingPoolName</code>: The configuration set you specified refers to an IP pool that does not exist.</p> </li>
/// <li> <p> <code>AccountSendingPaused</code>: Email sending for the Amazon SES account was disabled using the <code>UpdateAccountSendingEnabled</code> operation.</p> </li>
/// <li> <p> <code>ConfigurationSetSendingPaused</code>: Email sending for this configuration set was disabled using the <code>UpdateConfigurationSetSendingEnabled</code> operation.</p> </li>
/// <li> <p> <code>InvalidParameterValue</code>: One or more of the parameters you specified when calling this operation was invalid. See the error message for additional information.</p> </li>
/// <li> <p> <code>TransientFailure</code>: Amazon SES was unable to process your request because of a temporary issue.</p> </li>
/// <li> <p> <code>Failed</code>: Amazon SES was unable to process your request. See the error message for additional information.</p> </li>
/// </ul>
pub fn set_status(
mut self,
input: std::option::Option<crate::model::BulkEmailStatus>,
) -> Self {
self.status = input;
self
}
/// <p>A description of an error that prevented a message being sent using the <code>SendBulkTemplatedEmail</code> operation.</p>
pub fn error(mut self, input: impl Into<std::string::String>) -> Self {
self.error = Some(input.into());
self
}
/// <p>A description of an error that prevented a message being sent using the <code>SendBulkTemplatedEmail</code> operation.</p>
pub fn set_error(mut self, input: std::option::Option<std::string::String>) -> Self {
self.error = input;
self
}
/// <p>The unique message identifier returned from the <code>SendBulkTemplatedEmail</code> operation.</p>
pub fn message_id(mut self, input: impl Into<std::string::String>) -> Self {
self.message_id = Some(input.into());
self
}
/// <p>The unique message identifier returned from the <code>SendBulkTemplatedEmail</code> operation.</p>
pub fn set_message_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message_id = input;
self
}
/// Consumes the builder and constructs a [`BulkEmailDestinationStatus`](crate::model::BulkEmailDestinationStatus)
pub fn build(self) -> crate::model::BulkEmailDestinationStatus {
crate::model::BulkEmailDestinationStatus {
status: self.status,
error: self.error,
message_id: self.message_id,
}
}
}
}
impl BulkEmailDestinationStatus {
/// Creates a new builder-style object to manufacture [`BulkEmailDestinationStatus`](crate::model::BulkEmailDestinationStatus)
pub fn builder() -> crate::model::bulk_email_destination_status::Builder {
crate::model::bulk_email_destination_status::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BulkEmailStatus {
#[allow(missing_docs)] // documentation missing in model
AccountDailyQuotaExceeded,
#[allow(missing_docs)] // documentation missing in model
AccountSendingPaused,
#[allow(missing_docs)] // documentation missing in model
AccountSuspended,
#[allow(missing_docs)] // documentation missing in model
AccountThrottled,
#[allow(missing_docs)] // documentation missing in model
ConfigurationSetDoesNotExist,
#[allow(missing_docs)] // documentation missing in model
ConfigurationSetSendingPaused,
#[allow(missing_docs)] // documentation missing in model
Failed,
#[allow(missing_docs)] // documentation missing in model
InvalidParameterValue,
#[allow(missing_docs)] // documentation missing in model
InvalidSendingPoolName,
#[allow(missing_docs)] // documentation missing in model
MailFromDomainNotVerified,
#[allow(missing_docs)] // documentation missing in model
MessageRejected,
#[allow(missing_docs)] // documentation missing in model
Success,
#[allow(missing_docs)] // documentation missing in model
TemplateDoesNotExist,
#[allow(missing_docs)] // documentation missing in model
TransientFailure,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for BulkEmailStatus {
fn from(s: &str) -> Self {
match s {
"AccountDailyQuotaExceeded" => BulkEmailStatus::AccountDailyQuotaExceeded,
"AccountSendingPaused" => BulkEmailStatus::AccountSendingPaused,
"AccountSuspended" => BulkEmailStatus::AccountSuspended,
"AccountThrottled" => BulkEmailStatus::AccountThrottled,
"ConfigurationSetDoesNotExist" => BulkEmailStatus::ConfigurationSetDoesNotExist,
"ConfigurationSetSendingPaused" => BulkEmailStatus::ConfigurationSetSendingPaused,
"Failed" => BulkEmailStatus::Failed,
"InvalidParameterValue" => BulkEmailStatus::InvalidParameterValue,
"InvalidSendingPoolName" => BulkEmailStatus::InvalidSendingPoolName,
"MailFromDomainNotVerified" => BulkEmailStatus::MailFromDomainNotVerified,
"MessageRejected" => BulkEmailStatus::MessageRejected,
"Success" => BulkEmailStatus::Success,
"TemplateDoesNotExist" => BulkEmailStatus::TemplateDoesNotExist,
"TransientFailure" => BulkEmailStatus::TransientFailure,
other => BulkEmailStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BulkEmailStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BulkEmailStatus::from(s))
}
}
impl BulkEmailStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BulkEmailStatus::AccountDailyQuotaExceeded => "AccountDailyQuotaExceeded",
BulkEmailStatus::AccountSendingPaused => "AccountSendingPaused",
BulkEmailStatus::AccountSuspended => "AccountSuspended",
BulkEmailStatus::AccountThrottled => "AccountThrottled",
BulkEmailStatus::ConfigurationSetDoesNotExist => "ConfigurationSetDoesNotExist",
BulkEmailStatus::ConfigurationSetSendingPaused => "ConfigurationSetSendingPaused",
BulkEmailStatus::Failed => "Failed",
BulkEmailStatus::InvalidParameterValue => "InvalidParameterValue",
BulkEmailStatus::InvalidSendingPoolName => "InvalidSendingPoolName",
BulkEmailStatus::MailFromDomainNotVerified => "MailFromDomainNotVerified",
BulkEmailStatus::MessageRejected => "MessageRejected",
BulkEmailStatus::Success => "Success",
BulkEmailStatus::TemplateDoesNotExist => "TemplateDoesNotExist",
BulkEmailStatus::TransientFailure => "TransientFailure",
BulkEmailStatus::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"AccountDailyQuotaExceeded",
"AccountSendingPaused",
"AccountSuspended",
"AccountThrottled",
"ConfigurationSetDoesNotExist",
"ConfigurationSetSendingPaused",
"Failed",
"InvalidParameterValue",
"InvalidSendingPoolName",
"MailFromDomainNotVerified",
"MessageRejected",
"Success",
"TemplateDoesNotExist",
"TransientFailure",
]
}
}
impl AsRef<str> for BulkEmailStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>An array that contains one or more Destinations, as well as the tags and replacement data associated with each of those Destinations.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BulkEmailDestination {
/// <p>Represents the destination of the message, consisting of To:, CC:, and BCC: fields.</p> <note>
/// <p>Amazon SES does not support the SMTPUTF8 extension, as described in <a href="https://tools.ietf.org/html/rfc6531">RFC6531</a>. For this reason, the <i>local part</i> of a destination email address (the part of the email address that precedes the @ sign) may only contain <a href="https://en.wikipedia.org/wiki/Email_address#Local-part">7-bit ASCII characters</a>. If the <i>domain part</i> of an address (the part after the @ sign) contains non-ASCII characters, they must be encoded using Punycode, as described in <a href="https://tools.ietf.org/html/rfc3492.html">RFC3492</a>.</p>
/// </note>
pub destination: std::option::Option<crate::model::Destination>,
/// <p>A list of tags, in the form of name/value pairs, to apply to an email that you send using <code>SendBulkTemplatedEmail</code>. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.</p>
pub replacement_tags: std::option::Option<std::vec::Vec<crate::model::MessageTag>>,
/// <p>A list of replacement values to apply to the template. This parameter is a JSON object, typically consisting of key-value pairs in which the keys correspond to replacement tags in the email template.</p>
pub replacement_template_data: std::option::Option<std::string::String>,
}
impl BulkEmailDestination {
/// <p>Represents the destination of the message, consisting of To:, CC:, and BCC: fields.</p> <note>
/// <p>Amazon SES does not support the SMTPUTF8 extension, as described in <a href="https://tools.ietf.org/html/rfc6531">RFC6531</a>. For this reason, the <i>local part</i> of a destination email address (the part of the email address that precedes the @ sign) may only contain <a href="https://en.wikipedia.org/wiki/Email_address#Local-part">7-bit ASCII characters</a>. If the <i>domain part</i> of an address (the part after the @ sign) contains non-ASCII characters, they must be encoded using Punycode, as described in <a href="https://tools.ietf.org/html/rfc3492.html">RFC3492</a>.</p>
/// </note>
pub fn destination(&self) -> std::option::Option<&crate::model::Destination> {
self.destination.as_ref()
}
/// <p>A list of tags, in the form of name/value pairs, to apply to an email that you send using <code>SendBulkTemplatedEmail</code>. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.</p>
pub fn replacement_tags(&self) -> std::option::Option<&[crate::model::MessageTag]> {
self.replacement_tags.as_deref()
}
/// <p>A list of replacement values to apply to the template. This parameter is a JSON object, typically consisting of key-value pairs in which the keys correspond to replacement tags in the email template.</p>
pub fn replacement_template_data(&self) -> std::option::Option<&str> {
self.replacement_template_data.as_deref()
}
}
impl std::fmt::Debug for BulkEmailDestination {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BulkEmailDestination");
formatter.field("destination", &self.destination);
formatter.field("replacement_tags", &self.replacement_tags);
formatter.field("replacement_template_data", &self.replacement_template_data);
formatter.finish()
}
}
/// See [`BulkEmailDestination`](crate::model::BulkEmailDestination)
pub mod bulk_email_destination {
/// A builder for [`BulkEmailDestination`](crate::model::BulkEmailDestination)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) destination: std::option::Option<crate::model::Destination>,
pub(crate) replacement_tags: std::option::Option<std::vec::Vec<crate::model::MessageTag>>,
pub(crate) replacement_template_data: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>Represents the destination of the message, consisting of To:, CC:, and BCC: fields.</p> <note>
/// <p>Amazon SES does not support the SMTPUTF8 extension, as described in <a href="https://tools.ietf.org/html/rfc6531">RFC6531</a>. For this reason, the <i>local part</i> of a destination email address (the part of the email address that precedes the @ sign) may only contain <a href="https://en.wikipedia.org/wiki/Email_address#Local-part">7-bit ASCII characters</a>. If the <i>domain part</i> of an address (the part after the @ sign) contains non-ASCII characters, they must be encoded using Punycode, as described in <a href="https://tools.ietf.org/html/rfc3492.html">RFC3492</a>.</p>
/// </note>
pub fn destination(mut self, input: crate::model::Destination) -> Self {
self.destination = Some(input);
self
}
/// <p>Represents the destination of the message, consisting of To:, CC:, and BCC: fields.</p> <note>
/// <p>Amazon SES does not support the SMTPUTF8 extension, as described in <a href="https://tools.ietf.org/html/rfc6531">RFC6531</a>. For this reason, the <i>local part</i> of a destination email address (the part of the email address that precedes the @ sign) may only contain <a href="https://en.wikipedia.org/wiki/Email_address#Local-part">7-bit ASCII characters</a>. If the <i>domain part</i> of an address (the part after the @ sign) contains non-ASCII characters, they must be encoded using Punycode, as described in <a href="https://tools.ietf.org/html/rfc3492.html">RFC3492</a>.</p>
/// </note>
pub fn set_destination(
mut self,
input: std::option::Option<crate::model::Destination>,
) -> Self {
self.destination = input;
self
}
/// Appends an item to `replacement_tags`.
///
/// To override the contents of this collection use [`set_replacement_tags`](Self::set_replacement_tags).
///
/// <p>A list of tags, in the form of name/value pairs, to apply to an email that you send using <code>SendBulkTemplatedEmail</code>. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.</p>
pub fn replacement_tags(mut self, input: crate::model::MessageTag) -> Self {
let mut v = self.replacement_tags.unwrap_or_default();
v.push(input);
self.replacement_tags = Some(v);
self
}
/// <p>A list of tags, in the form of name/value pairs, to apply to an email that you send using <code>SendBulkTemplatedEmail</code>. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.</p>
pub fn set_replacement_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::MessageTag>>,
) -> Self {
self.replacement_tags = input;
self
}
/// <p>A list of replacement values to apply to the template. This parameter is a JSON object, typically consisting of key-value pairs in which the keys correspond to replacement tags in the email template.</p>
pub fn replacement_template_data(mut self, input: impl Into<std::string::String>) -> Self {
self.replacement_template_data = Some(input.into());
self
}
/// <p>A list of replacement values to apply to the template. This parameter is a JSON object, typically consisting of key-value pairs in which the keys correspond to replacement tags in the email template.</p>
pub fn set_replacement_template_data(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.replacement_template_data = input;
self
}
/// Consumes the builder and constructs a [`BulkEmailDestination`](crate::model::BulkEmailDestination)
pub fn build(self) -> crate::model::BulkEmailDestination {
crate::model::BulkEmailDestination {
destination: self.destination,
replacement_tags: self.replacement_tags,
replacement_template_data: self.replacement_template_data,
}
}
}
}
impl BulkEmailDestination {
/// Creates a new builder-style object to manufacture [`BulkEmailDestination`](crate::model::BulkEmailDestination)
pub fn builder() -> crate::model::bulk_email_destination::Builder {
crate::model::bulk_email_destination::Builder::default()
}
}
/// <p>Recipient-related information to include in the Delivery Status Notification (DSN) when an email that Amazon SES receives on your behalf bounces.</p>
/// <p>For information about receiving email through Amazon SES, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BouncedRecipientInfo {
/// <p>The email address of the recipient of the bounced email.</p>
pub recipient: std::option::Option<std::string::String>,
/// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to receive email for the recipient of the bounced email. For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
pub recipient_arn: std::option::Option<std::string::String>,
/// <p>The reason for the bounce. You must provide either this parameter or <code>RecipientDsnFields</code>.</p>
pub bounce_type: std::option::Option<crate::model::BounceType>,
/// <p>Recipient-related DSN fields, most of which would normally be filled in automatically when provided with a <code>BounceType</code>. You must provide either this parameter or <code>BounceType</code>.</p>
pub recipient_dsn_fields: std::option::Option<crate::model::RecipientDsnFields>,
}
impl BouncedRecipientInfo {
/// <p>The email address of the recipient of the bounced email.</p>
pub fn recipient(&self) -> std::option::Option<&str> {
self.recipient.as_deref()
}
/// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to receive email for the recipient of the bounced email. For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
pub fn recipient_arn(&self) -> std::option::Option<&str> {
self.recipient_arn.as_deref()
}
/// <p>The reason for the bounce. You must provide either this parameter or <code>RecipientDsnFields</code>.</p>
pub fn bounce_type(&self) -> std::option::Option<&crate::model::BounceType> {
self.bounce_type.as_ref()
}
/// <p>Recipient-related DSN fields, most of which would normally be filled in automatically when provided with a <code>BounceType</code>. You must provide either this parameter or <code>BounceType</code>.</p>
pub fn recipient_dsn_fields(&self) -> std::option::Option<&crate::model::RecipientDsnFields> {
self.recipient_dsn_fields.as_ref()
}
}
impl std::fmt::Debug for BouncedRecipientInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BouncedRecipientInfo");
formatter.field("recipient", &self.recipient);
formatter.field("recipient_arn", &self.recipient_arn);
formatter.field("bounce_type", &self.bounce_type);
formatter.field("recipient_dsn_fields", &self.recipient_dsn_fields);
formatter.finish()
}
}
/// See [`BouncedRecipientInfo`](crate::model::BouncedRecipientInfo)
pub mod bounced_recipient_info {
/// A builder for [`BouncedRecipientInfo`](crate::model::BouncedRecipientInfo)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) recipient: std::option::Option<std::string::String>,
pub(crate) recipient_arn: std::option::Option<std::string::String>,
pub(crate) bounce_type: std::option::Option<crate::model::BounceType>,
pub(crate) recipient_dsn_fields: std::option::Option<crate::model::RecipientDsnFields>,
}
impl Builder {
/// <p>The email address of the recipient of the bounced email.</p>
pub fn recipient(mut self, input: impl Into<std::string::String>) -> Self {
self.recipient = Some(input.into());
self
}
/// <p>The email address of the recipient of the bounced email.</p>
pub fn set_recipient(mut self, input: std::option::Option<std::string::String>) -> Self {
self.recipient = input;
self
}
/// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to receive email for the recipient of the bounced email. For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
pub fn recipient_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.recipient_arn = Some(input.into());
self
}
/// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to receive email for the recipient of the bounced email. For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
pub fn set_recipient_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.recipient_arn = input;
self
}
/// <p>The reason for the bounce. You must provide either this parameter or <code>RecipientDsnFields</code>.</p>
pub fn bounce_type(mut self, input: crate::model::BounceType) -> Self {
self.bounce_type = Some(input);
self
}
/// <p>The reason for the bounce. You must provide either this parameter or <code>RecipientDsnFields</code>.</p>
pub fn set_bounce_type(
mut self,
input: std::option::Option<crate::model::BounceType>,
) -> Self {
self.bounce_type = input;
self
}
/// <p>Recipient-related DSN fields, most of which would normally be filled in automatically when provided with a <code>BounceType</code>. You must provide either this parameter or <code>BounceType</code>.</p>
pub fn recipient_dsn_fields(mut self, input: crate::model::RecipientDsnFields) -> Self {
self.recipient_dsn_fields = Some(input);
self
}
/// <p>Recipient-related DSN fields, most of which would normally be filled in automatically when provided with a <code>BounceType</code>. You must provide either this parameter or <code>BounceType</code>.</p>
pub fn set_recipient_dsn_fields(
mut self,
input: std::option::Option<crate::model::RecipientDsnFields>,
) -> Self {
self.recipient_dsn_fields = input;
self
}
/// Consumes the builder and constructs a [`BouncedRecipientInfo`](crate::model::BouncedRecipientInfo)
pub fn build(self) -> crate::model::BouncedRecipientInfo {
crate::model::BouncedRecipientInfo {
recipient: self.recipient,
recipient_arn: self.recipient_arn,
bounce_type: self.bounce_type,
recipient_dsn_fields: self.recipient_dsn_fields,
}
}
}
}
impl BouncedRecipientInfo {
/// Creates a new builder-style object to manufacture [`BouncedRecipientInfo`](crate::model::BouncedRecipientInfo)
pub fn builder() -> crate::model::bounced_recipient_info::Builder {
crate::model::bounced_recipient_info::Builder::default()
}
}
/// <p>Recipient-related information to include in the Delivery Status Notification (DSN) when an email that Amazon SES receives on your behalf bounces.</p>
/// <p>For information about receiving email through Amazon SES, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RecipientDsnFields {
/// <p>The email address that the message was ultimately delivered to. This corresponds to the <code>Final-Recipient</code> in the DSN. If not specified, <code>FinalRecipient</code> will be set to the <code>Recipient</code> specified in the <code>BouncedRecipientInfo</code> structure. Either <code>FinalRecipient</code> or the recipient in <code>BouncedRecipientInfo</code> must be a recipient of the original bounced message.</p> <note>
/// <p>Do not prepend the <code>FinalRecipient</code> email address with <code>rfc 822;</code>, as described in <a href="https://tools.ietf.org/html/rfc3798">RFC 3798</a>.</p>
/// </note>
pub final_recipient: std::option::Option<std::string::String>,
/// <p>The action performed by the reporting mail transfer agent (MTA) as a result of its attempt to deliver the message to the recipient address. This is required by <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a>.</p>
pub action: std::option::Option<crate::model::DsnAction>,
/// <p>The MTA to which the remote MTA attempted to deliver the message, formatted as specified in <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a> (<code>mta-name-type; mta-name</code>). This parameter typically applies only to propagating synchronous bounces.</p>
pub remote_mta: std::option::Option<std::string::String>,
/// <p>The status code that indicates what went wrong. This is required by <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a>.</p>
pub status: std::option::Option<std::string::String>,
/// <p>An extended explanation of what went wrong; this is usually an SMTP response. See <a href="https://tools.ietf.org/html/rfc3463">RFC 3463</a> for the correct formatting of this parameter.</p>
pub diagnostic_code: std::option::Option<std::string::String>,
/// <p>The time the final delivery attempt was made, in <a href="https://www.ietf.org/rfc/rfc0822.txt">RFC 822</a> date-time format.</p>
pub last_attempt_date: std::option::Option<aws_smithy_types::DateTime>,
/// <p>Additional X-headers to include in the DSN.</p>
pub extension_fields: std::option::Option<std::vec::Vec<crate::model::ExtensionField>>,
}
impl RecipientDsnFields {
/// <p>The email address that the message was ultimately delivered to. This corresponds to the <code>Final-Recipient</code> in the DSN. If not specified, <code>FinalRecipient</code> will be set to the <code>Recipient</code> specified in the <code>BouncedRecipientInfo</code> structure. Either <code>FinalRecipient</code> or the recipient in <code>BouncedRecipientInfo</code> must be a recipient of the original bounced message.</p> <note>
/// <p>Do not prepend the <code>FinalRecipient</code> email address with <code>rfc 822;</code>, as described in <a href="https://tools.ietf.org/html/rfc3798">RFC 3798</a>.</p>
/// </note>
pub fn final_recipient(&self) -> std::option::Option<&str> {
self.final_recipient.as_deref()
}
/// <p>The action performed by the reporting mail transfer agent (MTA) as a result of its attempt to deliver the message to the recipient address. This is required by <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a>.</p>
pub fn action(&self) -> std::option::Option<&crate::model::DsnAction> {
self.action.as_ref()
}
/// <p>The MTA to which the remote MTA attempted to deliver the message, formatted as specified in <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a> (<code>mta-name-type; mta-name</code>). This parameter typically applies only to propagating synchronous bounces.</p>
pub fn remote_mta(&self) -> std::option::Option<&str> {
self.remote_mta.as_deref()
}
/// <p>The status code that indicates what went wrong. This is required by <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a>.</p>
pub fn status(&self) -> std::option::Option<&str> {
self.status.as_deref()
}
/// <p>An extended explanation of what went wrong; this is usually an SMTP response. See <a href="https://tools.ietf.org/html/rfc3463">RFC 3463</a> for the correct formatting of this parameter.</p>
pub fn diagnostic_code(&self) -> std::option::Option<&str> {
self.diagnostic_code.as_deref()
}
/// <p>The time the final delivery attempt was made, in <a href="https://www.ietf.org/rfc/rfc0822.txt">RFC 822</a> date-time format.</p>
pub fn last_attempt_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_attempt_date.as_ref()
}
/// <p>Additional X-headers to include in the DSN.</p>
pub fn extension_fields(&self) -> std::option::Option<&[crate::model::ExtensionField]> {
self.extension_fields.as_deref()
}
}
impl std::fmt::Debug for RecipientDsnFields {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RecipientDsnFields");
formatter.field("final_recipient", &self.final_recipient);
formatter.field("action", &self.action);
formatter.field("remote_mta", &self.remote_mta);
formatter.field("status", &self.status);
formatter.field("diagnostic_code", &self.diagnostic_code);
formatter.field("last_attempt_date", &self.last_attempt_date);
formatter.field("extension_fields", &self.extension_fields);
formatter.finish()
}
}
/// See [`RecipientDsnFields`](crate::model::RecipientDsnFields)
pub mod recipient_dsn_fields {
/// A builder for [`RecipientDsnFields`](crate::model::RecipientDsnFields)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) final_recipient: std::option::Option<std::string::String>,
pub(crate) action: std::option::Option<crate::model::DsnAction>,
pub(crate) remote_mta: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<std::string::String>,
pub(crate) diagnostic_code: std::option::Option<std::string::String>,
pub(crate) last_attempt_date: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) extension_fields:
std::option::Option<std::vec::Vec<crate::model::ExtensionField>>,
}
impl Builder {
/// <p>The email address that the message was ultimately delivered to. This corresponds to the <code>Final-Recipient</code> in the DSN. If not specified, <code>FinalRecipient</code> will be set to the <code>Recipient</code> specified in the <code>BouncedRecipientInfo</code> structure. Either <code>FinalRecipient</code> or the recipient in <code>BouncedRecipientInfo</code> must be a recipient of the original bounced message.</p> <note>
/// <p>Do not prepend the <code>FinalRecipient</code> email address with <code>rfc 822;</code>, as described in <a href="https://tools.ietf.org/html/rfc3798">RFC 3798</a>.</p>
/// </note>
pub fn final_recipient(mut self, input: impl Into<std::string::String>) -> Self {
self.final_recipient = Some(input.into());
self
}
/// <p>The email address that the message was ultimately delivered to. This corresponds to the <code>Final-Recipient</code> in the DSN. If not specified, <code>FinalRecipient</code> will be set to the <code>Recipient</code> specified in the <code>BouncedRecipientInfo</code> structure. Either <code>FinalRecipient</code> or the recipient in <code>BouncedRecipientInfo</code> must be a recipient of the original bounced message.</p> <note>
/// <p>Do not prepend the <code>FinalRecipient</code> email address with <code>rfc 822;</code>, as described in <a href="https://tools.ietf.org/html/rfc3798">RFC 3798</a>.</p>
/// </note>
pub fn set_final_recipient(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.final_recipient = input;
self
}
/// <p>The action performed by the reporting mail transfer agent (MTA) as a result of its attempt to deliver the message to the recipient address. This is required by <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a>.</p>
pub fn action(mut self, input: crate::model::DsnAction) -> Self {
self.action = Some(input);
self
}
/// <p>The action performed by the reporting mail transfer agent (MTA) as a result of its attempt to deliver the message to the recipient address. This is required by <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a>.</p>
pub fn set_action(mut self, input: std::option::Option<crate::model::DsnAction>) -> Self {
self.action = input;
self
}
/// <p>The MTA to which the remote MTA attempted to deliver the message, formatted as specified in <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a> (<code>mta-name-type; mta-name</code>). This parameter typically applies only to propagating synchronous bounces.</p>
pub fn remote_mta(mut self, input: impl Into<std::string::String>) -> Self {
self.remote_mta = Some(input.into());
self
}
/// <p>The MTA to which the remote MTA attempted to deliver the message, formatted as specified in <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a> (<code>mta-name-type; mta-name</code>). This parameter typically applies only to propagating synchronous bounces.</p>
pub fn set_remote_mta(mut self, input: std::option::Option<std::string::String>) -> Self {
self.remote_mta = input;
self
}
/// <p>The status code that indicates what went wrong. This is required by <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a>.</p>
pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
self.status = Some(input.into());
self
}
/// <p>The status code that indicates what went wrong. This is required by <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a>.</p>
pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
self.status = input;
self
}
/// <p>An extended explanation of what went wrong; this is usually an SMTP response. See <a href="https://tools.ietf.org/html/rfc3463">RFC 3463</a> for the correct formatting of this parameter.</p>
pub fn diagnostic_code(mut self, input: impl Into<std::string::String>) -> Self {
self.diagnostic_code = Some(input.into());
self
}
/// <p>An extended explanation of what went wrong; this is usually an SMTP response. See <a href="https://tools.ietf.org/html/rfc3463">RFC 3463</a> for the correct formatting of this parameter.</p>
pub fn set_diagnostic_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.diagnostic_code = input;
self
}
/// <p>The time the final delivery attempt was made, in <a href="https://www.ietf.org/rfc/rfc0822.txt">RFC 822</a> date-time format.</p>
pub fn last_attempt_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_attempt_date = Some(input);
self
}
/// <p>The time the final delivery attempt was made, in <a href="https://www.ietf.org/rfc/rfc0822.txt">RFC 822</a> date-time format.</p>
pub fn set_last_attempt_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_attempt_date = input;
self
}
/// Appends an item to `extension_fields`.
///
/// To override the contents of this collection use [`set_extension_fields`](Self::set_extension_fields).
///
/// <p>Additional X-headers to include in the DSN.</p>
pub fn extension_fields(mut self, input: crate::model::ExtensionField) -> Self {
let mut v = self.extension_fields.unwrap_or_default();
v.push(input);
self.extension_fields = Some(v);
self
}
/// <p>Additional X-headers to include in the DSN.</p>
pub fn set_extension_fields(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ExtensionField>>,
) -> Self {
self.extension_fields = input;
self
}
/// Consumes the builder and constructs a [`RecipientDsnFields`](crate::model::RecipientDsnFields)
pub fn build(self) -> crate::model::RecipientDsnFields {
crate::model::RecipientDsnFields {
final_recipient: self.final_recipient,
action: self.action,
remote_mta: self.remote_mta,
status: self.status,
diagnostic_code: self.diagnostic_code,
last_attempt_date: self.last_attempt_date,
extension_fields: self.extension_fields,
}
}
}
}
impl RecipientDsnFields {
/// Creates a new builder-style object to manufacture [`RecipientDsnFields`](crate::model::RecipientDsnFields)
pub fn builder() -> crate::model::recipient_dsn_fields::Builder {
crate::model::recipient_dsn_fields::Builder::default()
}
}
/// <p>Additional X-headers to include in the Delivery Status Notification (DSN) when an email that Amazon SES receives on your behalf bounces.</p>
/// <p>For information about receiving email through Amazon SES, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ExtensionField {
/// <p>The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The value of the header to add. Must be less than 2048 characters, and must not contain newline characters ("\r" or "\n").</p>
pub value: std::option::Option<std::string::String>,
}
impl ExtensionField {
/// <p>The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The value of the header to add. Must be less than 2048 characters, and must not contain newline characters ("\r" or "\n").</p>
pub fn value(&self) -> std::option::Option<&str> {
self.value.as_deref()
}
}
impl std::fmt::Debug for ExtensionField {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ExtensionField");
formatter.field("name", &self.name);
formatter.field("value", &self.value);
formatter.finish()
}
}
/// See [`ExtensionField`](crate::model::ExtensionField)
pub mod extension_field {
/// A builder for [`ExtensionField`](crate::model::ExtensionField)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) value: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the header to add. Must be between 1 and 50 characters, inclusive, and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The value of the header to add. Must be less than 2048 characters, and must not contain newline characters ("\r" or "\n").</p>
pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
self.value = Some(input.into());
self
}
/// <p>The value of the header to add. Must be less than 2048 characters, and must not contain newline characters ("\r" or "\n").</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 [`ExtensionField`](crate::model::ExtensionField)
pub fn build(self) -> crate::model::ExtensionField {
crate::model::ExtensionField {
name: self.name,
value: self.value,
}
}
}
}
impl ExtensionField {
/// Creates a new builder-style object to manufacture [`ExtensionField`](crate::model::ExtensionField)
pub fn builder() -> crate::model::extension_field::Builder {
crate::model::extension_field::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DsnAction {
#[allow(missing_docs)] // documentation missing in model
Delayed,
#[allow(missing_docs)] // documentation missing in model
Delivered,
#[allow(missing_docs)] // documentation missing in model
Expanded,
#[allow(missing_docs)] // documentation missing in model
Failed,
#[allow(missing_docs)] // documentation missing in model
Relayed,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for DsnAction {
fn from(s: &str) -> Self {
match s {
"delayed" => DsnAction::Delayed,
"delivered" => DsnAction::Delivered,
"expanded" => DsnAction::Expanded,
"failed" => DsnAction::Failed,
"relayed" => DsnAction::Relayed,
other => DsnAction::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DsnAction {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DsnAction::from(s))
}
}
impl DsnAction {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
DsnAction::Delayed => "delayed",
DsnAction::Delivered => "delivered",
DsnAction::Expanded => "expanded",
DsnAction::Failed => "failed",
DsnAction::Relayed => "relayed",
DsnAction::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["delayed", "delivered", "expanded", "failed", "relayed"]
}
}
impl AsRef<str> for DsnAction {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum BounceType {
#[allow(missing_docs)] // documentation missing in model
ContentRejected,
#[allow(missing_docs)] // documentation missing in model
DoesNotExist,
#[allow(missing_docs)] // documentation missing in model
ExceededQuota,
#[allow(missing_docs)] // documentation missing in model
MessageTooLarge,
#[allow(missing_docs)] // documentation missing in model
TemporaryFailure,
#[allow(missing_docs)] // documentation missing in model
Undefined,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for BounceType {
fn from(s: &str) -> Self {
match s {
"ContentRejected" => BounceType::ContentRejected,
"DoesNotExist" => BounceType::DoesNotExist,
"ExceededQuota" => BounceType::ExceededQuota,
"MessageTooLarge" => BounceType::MessageTooLarge,
"TemporaryFailure" => BounceType::TemporaryFailure,
"Undefined" => BounceType::Undefined,
other => BounceType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BounceType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BounceType::from(s))
}
}
impl BounceType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
BounceType::ContentRejected => "ContentRejected",
BounceType::DoesNotExist => "DoesNotExist",
BounceType::ExceededQuota => "ExceededQuota",
BounceType::MessageTooLarge => "MessageTooLarge",
BounceType::TemporaryFailure => "TemporaryFailure",
BounceType::Undefined => "Undefined",
BounceType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"ContentRejected",
"DoesNotExist",
"ExceededQuota",
"MessageTooLarge",
"TemporaryFailure",
"Undefined",
]
}
}
impl AsRef<str> for BounceType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Message-related information to include in the Delivery Status Notification (DSN) when an email that Amazon SES receives on your behalf bounces.</p>
/// <p>For information about receiving email through Amazon SES, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MessageDsn {
/// <p>The reporting MTA that attempted to deliver the message, formatted as specified in <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a> (<code>mta-name-type; mta-name</code>). The default value is <code>dns; inbound-smtp.[region].amazonaws.com</code>.</p>
pub reporting_mta: std::option::Option<std::string::String>,
/// <p>When the message was received by the reporting mail transfer agent (MTA), in <a href="https://www.ietf.org/rfc/rfc0822.txt">RFC 822</a> date-time format.</p>
pub arrival_date: std::option::Option<aws_smithy_types::DateTime>,
/// <p>Additional X-headers to include in the DSN.</p>
pub extension_fields: std::option::Option<std::vec::Vec<crate::model::ExtensionField>>,
}
impl MessageDsn {
/// <p>The reporting MTA that attempted to deliver the message, formatted as specified in <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a> (<code>mta-name-type; mta-name</code>). The default value is <code>dns; inbound-smtp.[region].amazonaws.com</code>.</p>
pub fn reporting_mta(&self) -> std::option::Option<&str> {
self.reporting_mta.as_deref()
}
/// <p>When the message was received by the reporting mail transfer agent (MTA), in <a href="https://www.ietf.org/rfc/rfc0822.txt">RFC 822</a> date-time format.</p>
pub fn arrival_date(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.arrival_date.as_ref()
}
/// <p>Additional X-headers to include in the DSN.</p>
pub fn extension_fields(&self) -> std::option::Option<&[crate::model::ExtensionField]> {
self.extension_fields.as_deref()
}
}
impl std::fmt::Debug for MessageDsn {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MessageDsn");
formatter.field("reporting_mta", &self.reporting_mta);
formatter.field("arrival_date", &self.arrival_date);
formatter.field("extension_fields", &self.extension_fields);
formatter.finish()
}
}
/// See [`MessageDsn`](crate::model::MessageDsn)
pub mod message_dsn {
/// A builder for [`MessageDsn`](crate::model::MessageDsn)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) reporting_mta: std::option::Option<std::string::String>,
pub(crate) arrival_date: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) extension_fields:
std::option::Option<std::vec::Vec<crate::model::ExtensionField>>,
}
impl Builder {
/// <p>The reporting MTA that attempted to deliver the message, formatted as specified in <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a> (<code>mta-name-type; mta-name</code>). The default value is <code>dns; inbound-smtp.[region].amazonaws.com</code>.</p>
pub fn reporting_mta(mut self, input: impl Into<std::string::String>) -> Self {
self.reporting_mta = Some(input.into());
self
}
/// <p>The reporting MTA that attempted to deliver the message, formatted as specified in <a href="https://tools.ietf.org/html/rfc3464">RFC 3464</a> (<code>mta-name-type; mta-name</code>). The default value is <code>dns; inbound-smtp.[region].amazonaws.com</code>.</p>
pub fn set_reporting_mta(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.reporting_mta = input;
self
}
/// <p>When the message was received by the reporting mail transfer agent (MTA), in <a href="https://www.ietf.org/rfc/rfc0822.txt">RFC 822</a> date-time format.</p>
pub fn arrival_date(mut self, input: aws_smithy_types::DateTime) -> Self {
self.arrival_date = Some(input);
self
}
/// <p>When the message was received by the reporting mail transfer agent (MTA), in <a href="https://www.ietf.org/rfc/rfc0822.txt">RFC 822</a> date-time format.</p>
pub fn set_arrival_date(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.arrival_date = input;
self
}
/// Appends an item to `extension_fields`.
///
/// To override the contents of this collection use [`set_extension_fields`](Self::set_extension_fields).
///
/// <p>Additional X-headers to include in the DSN.</p>
pub fn extension_fields(mut self, input: crate::model::ExtensionField) -> Self {
let mut v = self.extension_fields.unwrap_or_default();
v.push(input);
self.extension_fields = Some(v);
self
}
/// <p>Additional X-headers to include in the DSN.</p>
pub fn set_extension_fields(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ExtensionField>>,
) -> Self {
self.extension_fields = input;
self
}
/// Consumes the builder and constructs a [`MessageDsn`](crate::model::MessageDsn)
pub fn build(self) -> crate::model::MessageDsn {
crate::model::MessageDsn {
reporting_mta: self.reporting_mta,
arrival_date: self.arrival_date,
extension_fields: self.extension_fields,
}
}
}
}
impl MessageDsn {
/// Creates a new builder-style object to manufacture [`MessageDsn`](crate::model::MessageDsn)
pub fn builder() -> crate::model::message_dsn::Builder {
crate::model::message_dsn::Builder::default()
}
}
/// <p>Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS).</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeliveryOptions {
/// <p>Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS). If the value is <code>Require</code>, messages are only delivered if a TLS connection can be established. If the value is <code>Optional</code>, messages can be delivered in plain text if a TLS connection can't be established.</p>
pub tls_policy: std::option::Option<crate::model::TlsPolicy>,
}
impl DeliveryOptions {
/// <p>Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS). If the value is <code>Require</code>, messages are only delivered if a TLS connection can be established. If the value is <code>Optional</code>, messages can be delivered in plain text if a TLS connection can't be established.</p>
pub fn tls_policy(&self) -> std::option::Option<&crate::model::TlsPolicy> {
self.tls_policy.as_ref()
}
}
impl std::fmt::Debug for DeliveryOptions {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeliveryOptions");
formatter.field("tls_policy", &self.tls_policy);
formatter.finish()
}
}
/// See [`DeliveryOptions`](crate::model::DeliveryOptions)
pub mod delivery_options {
/// A builder for [`DeliveryOptions`](crate::model::DeliveryOptions)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) tls_policy: std::option::Option<crate::model::TlsPolicy>,
}
impl Builder {
/// <p>Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS). If the value is <code>Require</code>, messages are only delivered if a TLS connection can be established. If the value is <code>Optional</code>, messages can be delivered in plain text if a TLS connection can't be established.</p>
pub fn tls_policy(mut self, input: crate::model::TlsPolicy) -> Self {
self.tls_policy = Some(input);
self
}
/// <p>Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS). If the value is <code>Require</code>, messages are only delivered if a TLS connection can be established. If the value is <code>Optional</code>, messages can be delivered in plain text if a TLS connection can't be established.</p>
pub fn set_tls_policy(
mut self,
input: std::option::Option<crate::model::TlsPolicy>,
) -> Self {
self.tls_policy = input;
self
}
/// Consumes the builder and constructs a [`DeliveryOptions`](crate::model::DeliveryOptions)
pub fn build(self) -> crate::model::DeliveryOptions {
crate::model::DeliveryOptions {
tls_policy: self.tls_policy,
}
}
}
}
impl DeliveryOptions {
/// Creates a new builder-style object to manufacture [`DeliveryOptions`](crate::model::DeliveryOptions)
pub fn builder() -> crate::model::delivery_options::Builder {
crate::model::delivery_options::Builder::default()
}
}
/// <p>Contains information about an email template.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TemplateMetadata {
/// <p>The name of the template.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The time and date the template was created.</p>
pub created_timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl TemplateMetadata {
/// <p>The name of the template.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The time and date the template was created.</p>
pub fn created_timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_timestamp.as_ref()
}
}
impl std::fmt::Debug for TemplateMetadata {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TemplateMetadata");
formatter.field("name", &self.name);
formatter.field("created_timestamp", &self.created_timestamp);
formatter.finish()
}
}
/// See [`TemplateMetadata`](crate::model::TemplateMetadata)
pub mod template_metadata {
/// A builder for [`TemplateMetadata`](crate::model::TemplateMetadata)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) created_timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
/// <p>The name of the template.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the template.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The time and date the template was created.</p>
pub fn created_timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_timestamp = Some(input);
self
}
/// <p>The time and date the template was created.</p>
pub fn set_created_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_timestamp = input;
self
}
/// Consumes the builder and constructs a [`TemplateMetadata`](crate::model::TemplateMetadata)
pub fn build(self) -> crate::model::TemplateMetadata {
crate::model::TemplateMetadata {
name: self.name,
created_timestamp: self.created_timestamp,
}
}
}
}
impl TemplateMetadata {
/// Creates a new builder-style object to manufacture [`TemplateMetadata`](crate::model::TemplateMetadata)
pub fn builder() -> crate::model::template_metadata::Builder {
crate::model::template_metadata::Builder::default()
}
}
/// <p>Information about a receipt rule set.</p>
/// <p>A receipt rule set is a collection of rules that specify what Amazon SES should do with mail it receives on behalf of your account's verified domains.</p>
/// <p>For information about setting up receipt rule sets, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReceiptRuleSetMetadata {
/// <p>The name of the receipt rule set. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Start and end with a letter or number.</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub name: std::option::Option<std::string::String>,
/// <p>The date and time the receipt rule set was created.</p>
pub created_timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl ReceiptRuleSetMetadata {
/// <p>The name of the receipt rule set. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Start and end with a letter or number.</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The date and time the receipt rule set was created.</p>
pub fn created_timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.created_timestamp.as_ref()
}
}
impl std::fmt::Debug for ReceiptRuleSetMetadata {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReceiptRuleSetMetadata");
formatter.field("name", &self.name);
formatter.field("created_timestamp", &self.created_timestamp);
formatter.finish()
}
}
/// See [`ReceiptRuleSetMetadata`](crate::model::ReceiptRuleSetMetadata)
pub mod receipt_rule_set_metadata {
/// A builder for [`ReceiptRuleSetMetadata`](crate::model::ReceiptRuleSetMetadata)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) created_timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
/// <p>The name of the receipt rule set. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Start and end with a letter or number.</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the receipt rule set. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Start and end with a letter or number.</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The date and time the receipt rule set was created.</p>
pub fn created_timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
self.created_timestamp = Some(input);
self
}
/// <p>The date and time the receipt rule set was created.</p>
pub fn set_created_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.created_timestamp = input;
self
}
/// Consumes the builder and constructs a [`ReceiptRuleSetMetadata`](crate::model::ReceiptRuleSetMetadata)
pub fn build(self) -> crate::model::ReceiptRuleSetMetadata {
crate::model::ReceiptRuleSetMetadata {
name: self.name,
created_timestamp: self.created_timestamp,
}
}
}
}
impl ReceiptRuleSetMetadata {
/// Creates a new builder-style object to manufacture [`ReceiptRuleSetMetadata`](crate::model::ReceiptRuleSetMetadata)
pub fn builder() -> crate::model::receipt_rule_set_metadata::Builder {
crate::model::receipt_rule_set_metadata::Builder::default()
}
}
/// <p>A receipt IP address filter enables you to specify whether to accept or reject mail originating from an IP address or range of IP addresses.</p>
/// <p>For information about setting up IP address filters, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-ip-filters.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReceiptFilter {
/// <p>The name of the IP address filter. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Start and end with a letter or number.</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub name: std::option::Option<std::string::String>,
/// <p>A structure that provides the IP addresses to block or allow, and whether to block or allow incoming mail from them.</p>
pub ip_filter: std::option::Option<crate::model::ReceiptIpFilter>,
}
impl ReceiptFilter {
/// <p>The name of the IP address filter. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Start and end with a letter or number.</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>A structure that provides the IP addresses to block or allow, and whether to block or allow incoming mail from them.</p>
pub fn ip_filter(&self) -> std::option::Option<&crate::model::ReceiptIpFilter> {
self.ip_filter.as_ref()
}
}
impl std::fmt::Debug for ReceiptFilter {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReceiptFilter");
formatter.field("name", &self.name);
formatter.field("ip_filter", &self.ip_filter);
formatter.finish()
}
}
/// See [`ReceiptFilter`](crate::model::ReceiptFilter)
pub mod receipt_filter {
/// A builder for [`ReceiptFilter`](crate::model::ReceiptFilter)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) ip_filter: std::option::Option<crate::model::ReceiptIpFilter>,
}
impl Builder {
/// <p>The name of the IP address filter. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Start and end with a letter or number.</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the IP address filter. The name must:</p>
/// <ul>
/// <li> <p>This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Start and end with a letter or number.</p> </li>
/// <li> <p>Contain less than 64 characters.</p> </li>
/// </ul>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>A structure that provides the IP addresses to block or allow, and whether to block or allow incoming mail from them.</p>
pub fn ip_filter(mut self, input: crate::model::ReceiptIpFilter) -> Self {
self.ip_filter = Some(input);
self
}
/// <p>A structure that provides the IP addresses to block or allow, and whether to block or allow incoming mail from them.</p>
pub fn set_ip_filter(
mut self,
input: std::option::Option<crate::model::ReceiptIpFilter>,
) -> Self {
self.ip_filter = input;
self
}
/// Consumes the builder and constructs a [`ReceiptFilter`](crate::model::ReceiptFilter)
pub fn build(self) -> crate::model::ReceiptFilter {
crate::model::ReceiptFilter {
name: self.name,
ip_filter: self.ip_filter,
}
}
}
}
impl ReceiptFilter {
/// Creates a new builder-style object to manufacture [`ReceiptFilter`](crate::model::ReceiptFilter)
pub fn builder() -> crate::model::receipt_filter::Builder {
crate::model::receipt_filter::Builder::default()
}
}
/// <p>A receipt IP address filter enables you to specify whether to accept or reject mail originating from an IP address or range of IP addresses.</p>
/// <p>For information about setting up IP address filters, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-ip-filters.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReceiptIpFilter {
/// <p>Indicates whether to block or allow incoming mail from the specified IP addresses.</p>
pub policy: std::option::Option<crate::model::ReceiptFilterPolicy>,
/// <p>A single IP address or a range of IP addresses that you want to block or allow, specified in Classless Inter-Domain Routing (CIDR) notation. An example of a single email address is 10.0.0.1. An example of a range of IP addresses is 10.0.0.1/24. For more information about CIDR notation, see <a href="https://tools.ietf.org/html/rfc2317">RFC 2317</a>.</p>
pub cidr: std::option::Option<std::string::String>,
}
impl ReceiptIpFilter {
/// <p>Indicates whether to block or allow incoming mail from the specified IP addresses.</p>
pub fn policy(&self) -> std::option::Option<&crate::model::ReceiptFilterPolicy> {
self.policy.as_ref()
}
/// <p>A single IP address or a range of IP addresses that you want to block or allow, specified in Classless Inter-Domain Routing (CIDR) notation. An example of a single email address is 10.0.0.1. An example of a range of IP addresses is 10.0.0.1/24. For more information about CIDR notation, see <a href="https://tools.ietf.org/html/rfc2317">RFC 2317</a>.</p>
pub fn cidr(&self) -> std::option::Option<&str> {
self.cidr.as_deref()
}
}
impl std::fmt::Debug for ReceiptIpFilter {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReceiptIpFilter");
formatter.field("policy", &self.policy);
formatter.field("cidr", &self.cidr);
formatter.finish()
}
}
/// See [`ReceiptIpFilter`](crate::model::ReceiptIpFilter)
pub mod receipt_ip_filter {
/// A builder for [`ReceiptIpFilter`](crate::model::ReceiptIpFilter)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) policy: std::option::Option<crate::model::ReceiptFilterPolicy>,
pub(crate) cidr: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>Indicates whether to block or allow incoming mail from the specified IP addresses.</p>
pub fn policy(mut self, input: crate::model::ReceiptFilterPolicy) -> Self {
self.policy = Some(input);
self
}
/// <p>Indicates whether to block or allow incoming mail from the specified IP addresses.</p>
pub fn set_policy(
mut self,
input: std::option::Option<crate::model::ReceiptFilterPolicy>,
) -> Self {
self.policy = input;
self
}
/// <p>A single IP address or a range of IP addresses that you want to block or allow, specified in Classless Inter-Domain Routing (CIDR) notation. An example of a single email address is 10.0.0.1. An example of a range of IP addresses is 10.0.0.1/24. For more information about CIDR notation, see <a href="https://tools.ietf.org/html/rfc2317">RFC 2317</a>.</p>
pub fn cidr(mut self, input: impl Into<std::string::String>) -> Self {
self.cidr = Some(input.into());
self
}
/// <p>A single IP address or a range of IP addresses that you want to block or allow, specified in Classless Inter-Domain Routing (CIDR) notation. An example of a single email address is 10.0.0.1. An example of a range of IP addresses is 10.0.0.1/24. For more information about CIDR notation, see <a href="https://tools.ietf.org/html/rfc2317">RFC 2317</a>.</p>
pub fn set_cidr(mut self, input: std::option::Option<std::string::String>) -> Self {
self.cidr = input;
self
}
/// Consumes the builder and constructs a [`ReceiptIpFilter`](crate::model::ReceiptIpFilter)
pub fn build(self) -> crate::model::ReceiptIpFilter {
crate::model::ReceiptIpFilter {
policy: self.policy,
cidr: self.cidr,
}
}
}
}
impl ReceiptIpFilter {
/// Creates a new builder-style object to manufacture [`ReceiptIpFilter`](crate::model::ReceiptIpFilter)
pub fn builder() -> crate::model::receipt_ip_filter::Builder {
crate::model::receipt_ip_filter::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ReceiptFilterPolicy {
#[allow(missing_docs)] // documentation missing in model
Allow,
#[allow(missing_docs)] // documentation missing in model
Block,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ReceiptFilterPolicy {
fn from(s: &str) -> Self {
match s {
"Allow" => ReceiptFilterPolicy::Allow,
"Block" => ReceiptFilterPolicy::Block,
other => ReceiptFilterPolicy::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ReceiptFilterPolicy {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ReceiptFilterPolicy::from(s))
}
}
impl ReceiptFilterPolicy {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ReceiptFilterPolicy::Allow => "Allow",
ReceiptFilterPolicy::Block => "Block",
ReceiptFilterPolicy::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["Allow", "Block"]
}
}
impl AsRef<str> for ReceiptFilterPolicy {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum IdentityType {
#[allow(missing_docs)] // documentation missing in model
Domain,
#[allow(missing_docs)] // documentation missing in model
EmailAddress,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for IdentityType {
fn from(s: &str) -> Self {
match s {
"Domain" => IdentityType::Domain,
"EmailAddress" => IdentityType::EmailAddress,
other => IdentityType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for IdentityType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(IdentityType::from(s))
}
}
impl IdentityType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
IdentityType::Domain => "Domain",
IdentityType::EmailAddress => "EmailAddress",
IdentityType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["Domain", "EmailAddress"]
}
}
impl AsRef<str> for IdentityType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Contains information about a custom verification email template.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CustomVerificationEmailTemplate {
/// <p>The name of the custom verification email template.</p>
pub template_name: std::option::Option<std::string::String>,
/// <p>The email address that the custom verification email is sent from.</p>
pub from_email_address: std::option::Option<std::string::String>,
/// <p>The subject line of the custom verification email.</p>
pub template_subject: std::option::Option<std::string::String>,
/// <p>The URL that the recipient of the verification email is sent to if his or her address is successfully verified.</p>
pub success_redirection_url: std::option::Option<std::string::String>,
/// <p>The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.</p>
pub failure_redirection_url: std::option::Option<std::string::String>,
}
impl CustomVerificationEmailTemplate {
/// <p>The name of the custom verification email template.</p>
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
/// <p>The email address that the custom verification email is sent from.</p>
pub fn from_email_address(&self) -> std::option::Option<&str> {
self.from_email_address.as_deref()
}
/// <p>The subject line of the custom verification email.</p>
pub fn template_subject(&self) -> std::option::Option<&str> {
self.template_subject.as_deref()
}
/// <p>The URL that the recipient of the verification email is sent to if his or her address is successfully verified.</p>
pub fn success_redirection_url(&self) -> std::option::Option<&str> {
self.success_redirection_url.as_deref()
}
/// <p>The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.</p>
pub fn failure_redirection_url(&self) -> std::option::Option<&str> {
self.failure_redirection_url.as_deref()
}
}
impl std::fmt::Debug for CustomVerificationEmailTemplate {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CustomVerificationEmailTemplate");
formatter.field("template_name", &self.template_name);
formatter.field("from_email_address", &self.from_email_address);
formatter.field("template_subject", &self.template_subject);
formatter.field("success_redirection_url", &self.success_redirection_url);
formatter.field("failure_redirection_url", &self.failure_redirection_url);
formatter.finish()
}
}
/// See [`CustomVerificationEmailTemplate`](crate::model::CustomVerificationEmailTemplate)
pub mod custom_verification_email_template {
/// A builder for [`CustomVerificationEmailTemplate`](crate::model::CustomVerificationEmailTemplate)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) from_email_address: std::option::Option<std::string::String>,
pub(crate) template_subject: std::option::Option<std::string::String>,
pub(crate) success_redirection_url: std::option::Option<std::string::String>,
pub(crate) failure_redirection_url: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The name of the custom verification email template.</p>
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
/// <p>The name of the custom verification email template.</p>
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
/// <p>The email address that the custom verification email is sent from.</p>
pub fn from_email_address(mut self, input: impl Into<std::string::String>) -> Self {
self.from_email_address = Some(input.into());
self
}
/// <p>The email address that the custom verification email is sent from.</p>
pub fn set_from_email_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.from_email_address = input;
self
}
/// <p>The subject line of the custom verification email.</p>
pub fn template_subject(mut self, input: impl Into<std::string::String>) -> Self {
self.template_subject = Some(input.into());
self
}
/// <p>The subject line of the custom verification email.</p>
pub fn set_template_subject(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_subject = input;
self
}
/// <p>The URL that the recipient of the verification email is sent to if his or her address is successfully verified.</p>
pub fn success_redirection_url(mut self, input: impl Into<std::string::String>) -> Self {
self.success_redirection_url = Some(input.into());
self
}
/// <p>The URL that the recipient of the verification email is sent to if his or her address is successfully verified.</p>
pub fn set_success_redirection_url(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.success_redirection_url = input;
self
}
/// <p>The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.</p>
pub fn failure_redirection_url(mut self, input: impl Into<std::string::String>) -> Self {
self.failure_redirection_url = Some(input.into());
self
}
/// <p>The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.</p>
pub fn set_failure_redirection_url(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.failure_redirection_url = input;
self
}
/// Consumes the builder and constructs a [`CustomVerificationEmailTemplate`](crate::model::CustomVerificationEmailTemplate)
pub fn build(self) -> crate::model::CustomVerificationEmailTemplate {
crate::model::CustomVerificationEmailTemplate {
template_name: self.template_name,
from_email_address: self.from_email_address,
template_subject: self.template_subject,
success_redirection_url: self.success_redirection_url,
failure_redirection_url: self.failure_redirection_url,
}
}
}
}
impl CustomVerificationEmailTemplate {
/// Creates a new builder-style object to manufacture [`CustomVerificationEmailTemplate`](crate::model::CustomVerificationEmailTemplate)
pub fn builder() -> crate::model::custom_verification_email_template::Builder {
crate::model::custom_verification_email_template::Builder::default()
}
}
/// <p>The name of the configuration set.</p>
/// <p>Configuration sets let you create groups of rules that you can apply to the emails you send using Amazon SES. For more information about using configuration sets, see <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-configuration-sets.html">Using Amazon SES Configuration Sets</a> in the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConfigurationSet {
/// <p>The name of the configuration set. The name must meet the following requirements:</p>
/// <ul>
/// <li> <p>Contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain 64 characters or fewer.</p> </li>
/// </ul>
pub name: std::option::Option<std::string::String>,
}
impl ConfigurationSet {
/// <p>The name of the configuration set. The name must meet the following requirements:</p>
/// <ul>
/// <li> <p>Contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain 64 characters or fewer.</p> </li>
/// </ul>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
impl std::fmt::Debug for ConfigurationSet {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConfigurationSet");
formatter.field("name", &self.name);
formatter.finish()
}
}
/// See [`ConfigurationSet`](crate::model::ConfigurationSet)
pub mod configuration_set {
/// A builder for [`ConfigurationSet`](crate::model::ConfigurationSet)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The name of the configuration set. The name must meet the following requirements:</p>
/// <ul>
/// <li> <p>Contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain 64 characters or fewer.</p> </li>
/// </ul>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the configuration set. The name must meet the following requirements:</p>
/// <ul>
/// <li> <p>Contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).</p> </li>
/// <li> <p>Contain 64 characters or fewer.</p> </li>
/// </ul>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// Consumes the builder and constructs a [`ConfigurationSet`](crate::model::ConfigurationSet)
pub fn build(self) -> crate::model::ConfigurationSet {
crate::model::ConfigurationSet { name: self.name }
}
}
}
impl ConfigurationSet {
/// Creates a new builder-style object to manufacture [`ConfigurationSet`](crate::model::ConfigurationSet)
pub fn builder() -> crate::model::configuration_set::Builder {
crate::model::configuration_set::Builder::default()
}
}
/// <p>Represents sending statistics data. Each <code>SendDataPoint</code> contains statistics for a 15-minute period of sending activity. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SendDataPoint {
/// <p>Time of the data point.</p>
pub timestamp: std::option::Option<aws_smithy_types::DateTime>,
/// <p>Number of emails that have been sent.</p>
pub delivery_attempts: i64,
/// <p>Number of emails that have bounced.</p>
pub bounces: i64,
/// <p>Number of unwanted emails that were rejected by recipients.</p>
pub complaints: i64,
/// <p>Number of emails rejected by Amazon SES.</p>
pub rejects: i64,
}
impl SendDataPoint {
/// <p>Time of the data point.</p>
pub fn timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.timestamp.as_ref()
}
/// <p>Number of emails that have been sent.</p>
pub fn delivery_attempts(&self) -> i64 {
self.delivery_attempts
}
/// <p>Number of emails that have bounced.</p>
pub fn bounces(&self) -> i64 {
self.bounces
}
/// <p>Number of unwanted emails that were rejected by recipients.</p>
pub fn complaints(&self) -> i64 {
self.complaints
}
/// <p>Number of emails rejected by Amazon SES.</p>
pub fn rejects(&self) -> i64 {
self.rejects
}
}
impl std::fmt::Debug for SendDataPoint {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SendDataPoint");
formatter.field("timestamp", &self.timestamp);
formatter.field("delivery_attempts", &self.delivery_attempts);
formatter.field("bounces", &self.bounces);
formatter.field("complaints", &self.complaints);
formatter.field("rejects", &self.rejects);
formatter.finish()
}
}
/// See [`SendDataPoint`](crate::model::SendDataPoint)
pub mod send_data_point {
/// A builder for [`SendDataPoint`](crate::model::SendDataPoint)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) timestamp: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) delivery_attempts: std::option::Option<i64>,
pub(crate) bounces: std::option::Option<i64>,
pub(crate) complaints: std::option::Option<i64>,
pub(crate) rejects: std::option::Option<i64>,
}
impl Builder {
/// <p>Time of the data point.</p>
pub fn timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
self.timestamp = Some(input);
self
}
/// <p>Time of the data point.</p>
pub fn set_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.timestamp = input;
self
}
/// <p>Number of emails that have been sent.</p>
pub fn delivery_attempts(mut self, input: i64) -> Self {
self.delivery_attempts = Some(input);
self
}
/// <p>Number of emails that have been sent.</p>
pub fn set_delivery_attempts(mut self, input: std::option::Option<i64>) -> Self {
self.delivery_attempts = input;
self
}
/// <p>Number of emails that have bounced.</p>
pub fn bounces(mut self, input: i64) -> Self {
self.bounces = Some(input);
self
}
/// <p>Number of emails that have bounced.</p>
pub fn set_bounces(mut self, input: std::option::Option<i64>) -> Self {
self.bounces = input;
self
}
/// <p>Number of unwanted emails that were rejected by recipients.</p>
pub fn complaints(mut self, input: i64) -> Self {
self.complaints = Some(input);
self
}
/// <p>Number of unwanted emails that were rejected by recipients.</p>
pub fn set_complaints(mut self, input: std::option::Option<i64>) -> Self {
self.complaints = input;
self
}
/// <p>Number of emails rejected by Amazon SES.</p>
pub fn rejects(mut self, input: i64) -> Self {
self.rejects = Some(input);
self
}
/// <p>Number of emails rejected by Amazon SES.</p>
pub fn set_rejects(mut self, input: std::option::Option<i64>) -> Self {
self.rejects = input;
self
}
/// Consumes the builder and constructs a [`SendDataPoint`](crate::model::SendDataPoint)
pub fn build(self) -> crate::model::SendDataPoint {
crate::model::SendDataPoint {
timestamp: self.timestamp,
delivery_attempts: self.delivery_attempts.unwrap_or_default(),
bounces: self.bounces.unwrap_or_default(),
complaints: self.complaints.unwrap_or_default(),
rejects: self.rejects.unwrap_or_default(),
}
}
}
}
impl SendDataPoint {
/// Creates a new builder-style object to manufacture [`SendDataPoint`](crate::model::SendDataPoint)
pub fn builder() -> crate::model::send_data_point::Builder {
crate::model::send_data_point::Builder::default()
}
}
/// <p>Represents the verification attributes of a single identity.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct IdentityVerificationAttributes {
/// <p>The verification status of the identity: "Pending", "Success", "Failed", or "TemporaryFailure".</p>
pub verification_status: std::option::Option<crate::model::VerificationStatus>,
/// <p>The verification token for a domain identity. Null for email address identities.</p>
pub verification_token: std::option::Option<std::string::String>,
}
impl IdentityVerificationAttributes {
/// <p>The verification status of the identity: "Pending", "Success", "Failed", or "TemporaryFailure".</p>
pub fn verification_status(&self) -> std::option::Option<&crate::model::VerificationStatus> {
self.verification_status.as_ref()
}
/// <p>The verification token for a domain identity. Null for email address identities.</p>
pub fn verification_token(&self) -> std::option::Option<&str> {
self.verification_token.as_deref()
}
}
impl std::fmt::Debug for IdentityVerificationAttributes {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("IdentityVerificationAttributes");
formatter.field("verification_status", &self.verification_status);
formatter.field("verification_token", &self.verification_token);
formatter.finish()
}
}
/// See [`IdentityVerificationAttributes`](crate::model::IdentityVerificationAttributes)
pub mod identity_verification_attributes {
/// A builder for [`IdentityVerificationAttributes`](crate::model::IdentityVerificationAttributes)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) verification_status: std::option::Option<crate::model::VerificationStatus>,
pub(crate) verification_token: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The verification status of the identity: "Pending", "Success", "Failed", or "TemporaryFailure".</p>
pub fn verification_status(mut self, input: crate::model::VerificationStatus) -> Self {
self.verification_status = Some(input);
self
}
/// <p>The verification status of the identity: "Pending", "Success", "Failed", or "TemporaryFailure".</p>
pub fn set_verification_status(
mut self,
input: std::option::Option<crate::model::VerificationStatus>,
) -> Self {
self.verification_status = input;
self
}
/// <p>The verification token for a domain identity. Null for email address identities.</p>
pub fn verification_token(mut self, input: impl Into<std::string::String>) -> Self {
self.verification_token = Some(input.into());
self
}
/// <p>The verification token for a domain identity. Null for email address identities.</p>
pub fn set_verification_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.verification_token = input;
self
}
/// Consumes the builder and constructs a [`IdentityVerificationAttributes`](crate::model::IdentityVerificationAttributes)
pub fn build(self) -> crate::model::IdentityVerificationAttributes {
crate::model::IdentityVerificationAttributes {
verification_status: self.verification_status,
verification_token: self.verification_token,
}
}
}
}
impl IdentityVerificationAttributes {
/// Creates a new builder-style object to manufacture [`IdentityVerificationAttributes`](crate::model::IdentityVerificationAttributes)
pub fn builder() -> crate::model::identity_verification_attributes::Builder {
crate::model::identity_verification_attributes::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum VerificationStatus {
#[allow(missing_docs)] // documentation missing in model
Failed,
#[allow(missing_docs)] // documentation missing in model
NotStarted,
#[allow(missing_docs)] // documentation missing in model
Pending,
#[allow(missing_docs)] // documentation missing in model
Success,
#[allow(missing_docs)] // documentation missing in model
TemporaryFailure,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for VerificationStatus {
fn from(s: &str) -> Self {
match s {
"Failed" => VerificationStatus::Failed,
"NotStarted" => VerificationStatus::NotStarted,
"Pending" => VerificationStatus::Pending,
"Success" => VerificationStatus::Success,
"TemporaryFailure" => VerificationStatus::TemporaryFailure,
other => VerificationStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for VerificationStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(VerificationStatus::from(s))
}
}
impl VerificationStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
VerificationStatus::Failed => "Failed",
VerificationStatus::NotStarted => "NotStarted",
VerificationStatus::Pending => "Pending",
VerificationStatus::Success => "Success",
VerificationStatus::TemporaryFailure => "TemporaryFailure",
VerificationStatus::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"Failed",
"NotStarted",
"Pending",
"Success",
"TemporaryFailure",
]
}
}
impl AsRef<str> for VerificationStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Represents the notification attributes of an identity, including whether an identity has Amazon Simple Notification Service (Amazon SNS) topics set for bounce, complaint, and/or delivery notifications, and whether feedback forwarding is enabled for bounce and complaint notifications.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct IdentityNotificationAttributes {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish bounce notifications.</p>
pub bounce_topic: std::option::Option<std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish complaint notifications.</p>
pub complaint_topic: std::option::Option<std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish delivery notifications.</p>
pub delivery_topic: std::option::Option<std::string::String>,
/// <p>Describes whether Amazon SES will forward bounce and complaint notifications as email. <code>true</code> indicates that Amazon SES will forward bounce and complaint notifications as email, while <code>false</code> indicates that bounce and complaint notifications will be published only to the specified bounce and complaint Amazon SNS topics.</p>
pub forwarding_enabled: bool,
/// <p>Describes whether Amazon SES includes the original email headers in Amazon SNS notifications of type <code>Bounce</code>. A value of <code>true</code> specifies that Amazon SES will include headers in bounce notifications, and a value of <code>false</code> specifies that Amazon SES will not include headers in bounce notifications.</p>
pub headers_in_bounce_notifications_enabled: bool,
/// <p>Describes whether Amazon SES includes the original email headers in Amazon SNS notifications of type <code>Complaint</code>. A value of <code>true</code> specifies that Amazon SES will include headers in complaint notifications, and a value of <code>false</code> specifies that Amazon SES will not include headers in complaint notifications.</p>
pub headers_in_complaint_notifications_enabled: bool,
/// <p>Describes whether Amazon SES includes the original email headers in Amazon SNS notifications of type <code>Delivery</code>. A value of <code>true</code> specifies that Amazon SES will include headers in delivery notifications, and a value of <code>false</code> specifies that Amazon SES will not include headers in delivery notifications.</p>
pub headers_in_delivery_notifications_enabled: bool,
}
impl IdentityNotificationAttributes {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish bounce notifications.</p>
pub fn bounce_topic(&self) -> std::option::Option<&str> {
self.bounce_topic.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish complaint notifications.</p>
pub fn complaint_topic(&self) -> std::option::Option<&str> {
self.complaint_topic.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish delivery notifications.</p>
pub fn delivery_topic(&self) -> std::option::Option<&str> {
self.delivery_topic.as_deref()
}
/// <p>Describes whether Amazon SES will forward bounce and complaint notifications as email. <code>true</code> indicates that Amazon SES will forward bounce and complaint notifications as email, while <code>false</code> indicates that bounce and complaint notifications will be published only to the specified bounce and complaint Amazon SNS topics.</p>
pub fn forwarding_enabled(&self) -> bool {
self.forwarding_enabled
}
/// <p>Describes whether Amazon SES includes the original email headers in Amazon SNS notifications of type <code>Bounce</code>. A value of <code>true</code> specifies that Amazon SES will include headers in bounce notifications, and a value of <code>false</code> specifies that Amazon SES will not include headers in bounce notifications.</p>
pub fn headers_in_bounce_notifications_enabled(&self) -> bool {
self.headers_in_bounce_notifications_enabled
}
/// <p>Describes whether Amazon SES includes the original email headers in Amazon SNS notifications of type <code>Complaint</code>. A value of <code>true</code> specifies that Amazon SES will include headers in complaint notifications, and a value of <code>false</code> specifies that Amazon SES will not include headers in complaint notifications.</p>
pub fn headers_in_complaint_notifications_enabled(&self) -> bool {
self.headers_in_complaint_notifications_enabled
}
/// <p>Describes whether Amazon SES includes the original email headers in Amazon SNS notifications of type <code>Delivery</code>. A value of <code>true</code> specifies that Amazon SES will include headers in delivery notifications, and a value of <code>false</code> specifies that Amazon SES will not include headers in delivery notifications.</p>
pub fn headers_in_delivery_notifications_enabled(&self) -> bool {
self.headers_in_delivery_notifications_enabled
}
}
impl std::fmt::Debug for IdentityNotificationAttributes {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("IdentityNotificationAttributes");
formatter.field("bounce_topic", &self.bounce_topic);
formatter.field("complaint_topic", &self.complaint_topic);
formatter.field("delivery_topic", &self.delivery_topic);
formatter.field("forwarding_enabled", &self.forwarding_enabled);
formatter.field(
"headers_in_bounce_notifications_enabled",
&self.headers_in_bounce_notifications_enabled,
);
formatter.field(
"headers_in_complaint_notifications_enabled",
&self.headers_in_complaint_notifications_enabled,
);
formatter.field(
"headers_in_delivery_notifications_enabled",
&self.headers_in_delivery_notifications_enabled,
);
formatter.finish()
}
}
/// See [`IdentityNotificationAttributes`](crate::model::IdentityNotificationAttributes)
pub mod identity_notification_attributes {
/// A builder for [`IdentityNotificationAttributes`](crate::model::IdentityNotificationAttributes)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bounce_topic: std::option::Option<std::string::String>,
pub(crate) complaint_topic: std::option::Option<std::string::String>,
pub(crate) delivery_topic: std::option::Option<std::string::String>,
pub(crate) forwarding_enabled: std::option::Option<bool>,
pub(crate) headers_in_bounce_notifications_enabled: std::option::Option<bool>,
pub(crate) headers_in_complaint_notifications_enabled: std::option::Option<bool>,
pub(crate) headers_in_delivery_notifications_enabled: std::option::Option<bool>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish bounce notifications.</p>
pub fn bounce_topic(mut self, input: impl Into<std::string::String>) -> Self {
self.bounce_topic = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish bounce notifications.</p>
pub fn set_bounce_topic(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bounce_topic = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish complaint notifications.</p>
pub fn complaint_topic(mut self, input: impl Into<std::string::String>) -> Self {
self.complaint_topic = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish complaint notifications.</p>
pub fn set_complaint_topic(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.complaint_topic = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish delivery notifications.</p>
pub fn delivery_topic(mut self, input: impl Into<std::string::String>) -> Self {
self.delivery_topic = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish delivery notifications.</p>
pub fn set_delivery_topic(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.delivery_topic = input;
self
}
/// <p>Describes whether Amazon SES will forward bounce and complaint notifications as email. <code>true</code> indicates that Amazon SES will forward bounce and complaint notifications as email, while <code>false</code> indicates that bounce and complaint notifications will be published only to the specified bounce and complaint Amazon SNS topics.</p>
pub fn forwarding_enabled(mut self, input: bool) -> Self {
self.forwarding_enabled = Some(input);
self
}
/// <p>Describes whether Amazon SES will forward bounce and complaint notifications as email. <code>true</code> indicates that Amazon SES will forward bounce and complaint notifications as email, while <code>false</code> indicates that bounce and complaint notifications will be published only to the specified bounce and complaint Amazon SNS topics.</p>
pub fn set_forwarding_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.forwarding_enabled = input;
self
}
/// <p>Describes whether Amazon SES includes the original email headers in Amazon SNS notifications of type <code>Bounce</code>. A value of <code>true</code> specifies that Amazon SES will include headers in bounce notifications, and a value of <code>false</code> specifies that Amazon SES will not include headers in bounce notifications.</p>
pub fn headers_in_bounce_notifications_enabled(mut self, input: bool) -> Self {
self.headers_in_bounce_notifications_enabled = Some(input);
self
}
/// <p>Describes whether Amazon SES includes the original email headers in Amazon SNS notifications of type <code>Bounce</code>. A value of <code>true</code> specifies that Amazon SES will include headers in bounce notifications, and a value of <code>false</code> specifies that Amazon SES will not include headers in bounce notifications.</p>
pub fn set_headers_in_bounce_notifications_enabled(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.headers_in_bounce_notifications_enabled = input;
self
}
/// <p>Describes whether Amazon SES includes the original email headers in Amazon SNS notifications of type <code>Complaint</code>. A value of <code>true</code> specifies that Amazon SES will include headers in complaint notifications, and a value of <code>false</code> specifies that Amazon SES will not include headers in complaint notifications.</p>
pub fn headers_in_complaint_notifications_enabled(mut self, input: bool) -> Self {
self.headers_in_complaint_notifications_enabled = Some(input);
self
}
/// <p>Describes whether Amazon SES includes the original email headers in Amazon SNS notifications of type <code>Complaint</code>. A value of <code>true</code> specifies that Amazon SES will include headers in complaint notifications, and a value of <code>false</code> specifies that Amazon SES will not include headers in complaint notifications.</p>
pub fn set_headers_in_complaint_notifications_enabled(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.headers_in_complaint_notifications_enabled = input;
self
}
/// <p>Describes whether Amazon SES includes the original email headers in Amazon SNS notifications of type <code>Delivery</code>. A value of <code>true</code> specifies that Amazon SES will include headers in delivery notifications, and a value of <code>false</code> specifies that Amazon SES will not include headers in delivery notifications.</p>
pub fn headers_in_delivery_notifications_enabled(mut self, input: bool) -> Self {
self.headers_in_delivery_notifications_enabled = Some(input);
self
}
/// <p>Describes whether Amazon SES includes the original email headers in Amazon SNS notifications of type <code>Delivery</code>. A value of <code>true</code> specifies that Amazon SES will include headers in delivery notifications, and a value of <code>false</code> specifies that Amazon SES will not include headers in delivery notifications.</p>
pub fn set_headers_in_delivery_notifications_enabled(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.headers_in_delivery_notifications_enabled = input;
self
}
/// Consumes the builder and constructs a [`IdentityNotificationAttributes`](crate::model::IdentityNotificationAttributes)
pub fn build(self) -> crate::model::IdentityNotificationAttributes {
crate::model::IdentityNotificationAttributes {
bounce_topic: self.bounce_topic,
complaint_topic: self.complaint_topic,
delivery_topic: self.delivery_topic,
forwarding_enabled: self.forwarding_enabled.unwrap_or_default(),
headers_in_bounce_notifications_enabled: self
.headers_in_bounce_notifications_enabled
.unwrap_or_default(),
headers_in_complaint_notifications_enabled: self
.headers_in_complaint_notifications_enabled
.unwrap_or_default(),
headers_in_delivery_notifications_enabled: self
.headers_in_delivery_notifications_enabled
.unwrap_or_default(),
}
}
}
}
impl IdentityNotificationAttributes {
/// Creates a new builder-style object to manufacture [`IdentityNotificationAttributes`](crate::model::IdentityNotificationAttributes)
pub fn builder() -> crate::model::identity_notification_attributes::Builder {
crate::model::identity_notification_attributes::Builder::default()
}
}
/// <p>Represents the custom MAIL FROM domain attributes of a verified identity (email address or domain).</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct IdentityMailFromDomainAttributes {
/// <p>The custom MAIL FROM domain that the identity is configured to use.</p>
pub mail_from_domain: std::option::Option<std::string::String>,
/// <p>The state that indicates whether Amazon SES has successfully read the MX record required for custom MAIL FROM domain setup. If the state is <code>Success</code>, Amazon SES uses the specified custom MAIL FROM domain when the verified identity sends an email. All other states indicate that Amazon SES takes the action described by <code>BehaviorOnMXFailure</code>.</p>
pub mail_from_domain_status: std::option::Option<crate::model::CustomMailFromStatus>,
/// <p>The action that Amazon SES takes if it cannot successfully read the required MX record when you send an email. A value of <code>UseDefaultValue</code> indicates that if Amazon SES cannot read the required MX record, it uses amazonses.com (or a subdomain of that) as the MAIL FROM domain. A value of <code>RejectMessage</code> indicates that if Amazon SES cannot read the required MX record, Amazon SES returns a <code>MailFromDomainNotVerified</code> error and does not send the email.</p>
/// <p>The custom MAIL FROM setup states that result in this behavior are <code>Pending</code>, <code>Failed</code>, and <code>TemporaryFailure</code>.</p>
pub behavior_on_mx_failure: std::option::Option<crate::model::BehaviorOnMxFailure>,
}
impl IdentityMailFromDomainAttributes {
/// <p>The custom MAIL FROM domain that the identity is configured to use.</p>
pub fn mail_from_domain(&self) -> std::option::Option<&str> {
self.mail_from_domain.as_deref()
}
/// <p>The state that indicates whether Amazon SES has successfully read the MX record required for custom MAIL FROM domain setup. If the state is <code>Success</code>, Amazon SES uses the specified custom MAIL FROM domain when the verified identity sends an email. All other states indicate that Amazon SES takes the action described by <code>BehaviorOnMXFailure</code>.</p>
pub fn mail_from_domain_status(
&self,
) -> std::option::Option<&crate::model::CustomMailFromStatus> {
self.mail_from_domain_status.as_ref()
}
/// <p>The action that Amazon SES takes if it cannot successfully read the required MX record when you send an email. A value of <code>UseDefaultValue</code> indicates that if Amazon SES cannot read the required MX record, it uses amazonses.com (or a subdomain of that) as the MAIL FROM domain. A value of <code>RejectMessage</code> indicates that if Amazon SES cannot read the required MX record, Amazon SES returns a <code>MailFromDomainNotVerified</code> error and does not send the email.</p>
/// <p>The custom MAIL FROM setup states that result in this behavior are <code>Pending</code>, <code>Failed</code>, and <code>TemporaryFailure</code>.</p>
pub fn behavior_on_mx_failure(
&self,
) -> std::option::Option<&crate::model::BehaviorOnMxFailure> {
self.behavior_on_mx_failure.as_ref()
}
}
impl std::fmt::Debug for IdentityMailFromDomainAttributes {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("IdentityMailFromDomainAttributes");
formatter.field("mail_from_domain", &self.mail_from_domain);
formatter.field("mail_from_domain_status", &self.mail_from_domain_status);
formatter.field("behavior_on_mx_failure", &self.behavior_on_mx_failure);
formatter.finish()
}
}
/// See [`IdentityMailFromDomainAttributes`](crate::model::IdentityMailFromDomainAttributes)
pub mod identity_mail_from_domain_attributes {
/// A builder for [`IdentityMailFromDomainAttributes`](crate::model::IdentityMailFromDomainAttributes)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) mail_from_domain: std::option::Option<std::string::String>,
pub(crate) mail_from_domain_status: std::option::Option<crate::model::CustomMailFromStatus>,
pub(crate) behavior_on_mx_failure: std::option::Option<crate::model::BehaviorOnMxFailure>,
}
impl Builder {
/// <p>The custom MAIL FROM domain that the identity is configured to use.</p>
pub fn mail_from_domain(mut self, input: impl Into<std::string::String>) -> Self {
self.mail_from_domain = Some(input.into());
self
}
/// <p>The custom MAIL FROM domain that the identity is configured to use.</p>
pub fn set_mail_from_domain(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.mail_from_domain = input;
self
}
/// <p>The state that indicates whether Amazon SES has successfully read the MX record required for custom MAIL FROM domain setup. If the state is <code>Success</code>, Amazon SES uses the specified custom MAIL FROM domain when the verified identity sends an email. All other states indicate that Amazon SES takes the action described by <code>BehaviorOnMXFailure</code>.</p>
pub fn mail_from_domain_status(
mut self,
input: crate::model::CustomMailFromStatus,
) -> Self {
self.mail_from_domain_status = Some(input);
self
}
/// <p>The state that indicates whether Amazon SES has successfully read the MX record required for custom MAIL FROM domain setup. If the state is <code>Success</code>, Amazon SES uses the specified custom MAIL FROM domain when the verified identity sends an email. All other states indicate that Amazon SES takes the action described by <code>BehaviorOnMXFailure</code>.</p>
pub fn set_mail_from_domain_status(
mut self,
input: std::option::Option<crate::model::CustomMailFromStatus>,
) -> Self {
self.mail_from_domain_status = input;
self
}
/// <p>The action that Amazon SES takes if it cannot successfully read the required MX record when you send an email. A value of <code>UseDefaultValue</code> indicates that if Amazon SES cannot read the required MX record, it uses amazonses.com (or a subdomain of that) as the MAIL FROM domain. A value of <code>RejectMessage</code> indicates that if Amazon SES cannot read the required MX record, Amazon SES returns a <code>MailFromDomainNotVerified</code> error and does not send the email.</p>
/// <p>The custom MAIL FROM setup states that result in this behavior are <code>Pending</code>, <code>Failed</code>, and <code>TemporaryFailure</code>.</p>
pub fn behavior_on_mx_failure(mut self, input: crate::model::BehaviorOnMxFailure) -> Self {
self.behavior_on_mx_failure = Some(input);
self
}
/// <p>The action that Amazon SES takes if it cannot successfully read the required MX record when you send an email. A value of <code>UseDefaultValue</code> indicates that if Amazon SES cannot read the required MX record, it uses amazonses.com (or a subdomain of that) as the MAIL FROM domain. A value of <code>RejectMessage</code> indicates that if Amazon SES cannot read the required MX record, Amazon SES returns a <code>MailFromDomainNotVerified</code> error and does not send the email.</p>
/// <p>The custom MAIL FROM setup states that result in this behavior are <code>Pending</code>, <code>Failed</code>, and <code>TemporaryFailure</code>.</p>
pub fn set_behavior_on_mx_failure(
mut self,
input: std::option::Option<crate::model::BehaviorOnMxFailure>,
) -> Self {
self.behavior_on_mx_failure = input;
self
}
/// Consumes the builder and constructs a [`IdentityMailFromDomainAttributes`](crate::model::IdentityMailFromDomainAttributes)
pub fn build(self) -> crate::model::IdentityMailFromDomainAttributes {
crate::model::IdentityMailFromDomainAttributes {
mail_from_domain: self.mail_from_domain,
mail_from_domain_status: self.mail_from_domain_status,
behavior_on_mx_failure: self.behavior_on_mx_failure,
}
}
}
}
impl IdentityMailFromDomainAttributes {
/// Creates a new builder-style object to manufacture [`IdentityMailFromDomainAttributes`](crate::model::IdentityMailFromDomainAttributes)
pub fn builder() -> crate::model::identity_mail_from_domain_attributes::Builder {
crate::model::identity_mail_from_domain_attributes::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum CustomMailFromStatus {
#[allow(missing_docs)] // documentation missing in model
Failed,
#[allow(missing_docs)] // documentation missing in model
Pending,
#[allow(missing_docs)] // documentation missing in model
Success,
#[allow(missing_docs)] // documentation missing in model
TemporaryFailure,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for CustomMailFromStatus {
fn from(s: &str) -> Self {
match s {
"Failed" => CustomMailFromStatus::Failed,
"Pending" => CustomMailFromStatus::Pending,
"Success" => CustomMailFromStatus::Success,
"TemporaryFailure" => CustomMailFromStatus::TemporaryFailure,
other => CustomMailFromStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CustomMailFromStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CustomMailFromStatus::from(s))
}
}
impl CustomMailFromStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
CustomMailFromStatus::Failed => "Failed",
CustomMailFromStatus::Pending => "Pending",
CustomMailFromStatus::Success => "Success",
CustomMailFromStatus::TemporaryFailure => "TemporaryFailure",
CustomMailFromStatus::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["Failed", "Pending", "Success", "TemporaryFailure"]
}
}
impl AsRef<str> for CustomMailFromStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Represents the DKIM attributes of a verified email address or a domain.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct IdentityDkimAttributes {
/// <p>Is true if DKIM signing is enabled for email sent from the identity. It's false otherwise. The default value is true.</p>
pub dkim_enabled: bool,
/// <p>Describes whether Amazon SES has successfully verified the DKIM DNS records (tokens) published in the domain name's DNS. (This only applies to domain identities, not email address identities.)</p>
pub dkim_verification_status: std::option::Option<crate::model::VerificationStatus>,
/// <p>A set of character strings that represent the domain's identity. Using these tokens, you need to create DNS CNAME records that point to DKIM public keys that are hosted by Amazon SES. Amazon Web Services eventually detects that you've updated your DNS records. This detection process might take up to 72 hours. After successful detection, Amazon SES is able to DKIM-sign email originating from that domain. (This only applies to domain identities, not email address identities.)</p>
/// <p>For more information about creating DNS records using DKIM tokens, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Amazon SES Developer Guide</a>.</p>
pub dkim_tokens: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl IdentityDkimAttributes {
/// <p>Is true if DKIM signing is enabled for email sent from the identity. It's false otherwise. The default value is true.</p>
pub fn dkim_enabled(&self) -> bool {
self.dkim_enabled
}
/// <p>Describes whether Amazon SES has successfully verified the DKIM DNS records (tokens) published in the domain name's DNS. (This only applies to domain identities, not email address identities.)</p>
pub fn dkim_verification_status(
&self,
) -> std::option::Option<&crate::model::VerificationStatus> {
self.dkim_verification_status.as_ref()
}
/// <p>A set of character strings that represent the domain's identity. Using these tokens, you need to create DNS CNAME records that point to DKIM public keys that are hosted by Amazon SES. Amazon Web Services eventually detects that you've updated your DNS records. This detection process might take up to 72 hours. After successful detection, Amazon SES is able to DKIM-sign email originating from that domain. (This only applies to domain identities, not email address identities.)</p>
/// <p>For more information about creating DNS records using DKIM tokens, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Amazon SES Developer Guide</a>.</p>
pub fn dkim_tokens(&self) -> std::option::Option<&[std::string::String]> {
self.dkim_tokens.as_deref()
}
}
impl std::fmt::Debug for IdentityDkimAttributes {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("IdentityDkimAttributes");
formatter.field("dkim_enabled", &self.dkim_enabled);
formatter.field("dkim_verification_status", &self.dkim_verification_status);
formatter.field("dkim_tokens", &self.dkim_tokens);
formatter.finish()
}
}
/// See [`IdentityDkimAttributes`](crate::model::IdentityDkimAttributes)
pub mod identity_dkim_attributes {
/// A builder for [`IdentityDkimAttributes`](crate::model::IdentityDkimAttributes)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) dkim_enabled: std::option::Option<bool>,
pub(crate) dkim_verification_status: std::option::Option<crate::model::VerificationStatus>,
pub(crate) dkim_tokens: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
/// <p>Is true if DKIM signing is enabled for email sent from the identity. It's false otherwise. The default value is true.</p>
pub fn dkim_enabled(mut self, input: bool) -> Self {
self.dkim_enabled = Some(input);
self
}
/// <p>Is true if DKIM signing is enabled for email sent from the identity. It's false otherwise. The default value is true.</p>
pub fn set_dkim_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.dkim_enabled = input;
self
}
/// <p>Describes whether Amazon SES has successfully verified the DKIM DNS records (tokens) published in the domain name's DNS. (This only applies to domain identities, not email address identities.)</p>
pub fn dkim_verification_status(mut self, input: crate::model::VerificationStatus) -> Self {
self.dkim_verification_status = Some(input);
self
}
/// <p>Describes whether Amazon SES has successfully verified the DKIM DNS records (tokens) published in the domain name's DNS. (This only applies to domain identities, not email address identities.)</p>
pub fn set_dkim_verification_status(
mut self,
input: std::option::Option<crate::model::VerificationStatus>,
) -> Self {
self.dkim_verification_status = input;
self
}
/// Appends an item to `dkim_tokens`.
///
/// To override the contents of this collection use [`set_dkim_tokens`](Self::set_dkim_tokens).
///
/// <p>A set of character strings that represent the domain's identity. Using these tokens, you need to create DNS CNAME records that point to DKIM public keys that are hosted by Amazon SES. Amazon Web Services eventually detects that you've updated your DNS records. This detection process might take up to 72 hours. After successful detection, Amazon SES is able to DKIM-sign email originating from that domain. (This only applies to domain identities, not email address identities.)</p>
/// <p>For more information about creating DNS records using DKIM tokens, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Amazon SES Developer Guide</a>.</p>
pub fn dkim_tokens(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.dkim_tokens.unwrap_or_default();
v.push(input.into());
self.dkim_tokens = Some(v);
self
}
/// <p>A set of character strings that represent the domain's identity. Using these tokens, you need to create DNS CNAME records that point to DKIM public keys that are hosted by Amazon SES. Amazon Web Services eventually detects that you've updated your DNS records. This detection process might take up to 72 hours. After successful detection, Amazon SES is able to DKIM-sign email originating from that domain. (This only applies to domain identities, not email address identities.)</p>
/// <p>For more information about creating DNS records using DKIM tokens, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Amazon SES Developer Guide</a>.</p>
pub fn set_dkim_tokens(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.dkim_tokens = input;
self
}
/// Consumes the builder and constructs a [`IdentityDkimAttributes`](crate::model::IdentityDkimAttributes)
pub fn build(self) -> crate::model::IdentityDkimAttributes {
crate::model::IdentityDkimAttributes {
dkim_enabled: self.dkim_enabled.unwrap_or_default(),
dkim_verification_status: self.dkim_verification_status,
dkim_tokens: self.dkim_tokens,
}
}
}
}
impl IdentityDkimAttributes {
/// Creates a new builder-style object to manufacture [`IdentityDkimAttributes`](crate::model::IdentityDkimAttributes)
pub fn builder() -> crate::model::identity_dkim_attributes::Builder {
crate::model::identity_dkim_attributes::Builder::default()
}
}
/// <p>Contains information about the reputation settings for a configuration set.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ReputationOptions {
/// <p>Describes whether email sending is enabled or disabled for the configuration set. If the value is <code>true</code>, then Amazon SES will send emails that use the configuration set. If the value is <code>false</code>, Amazon SES will not send emails that use the configuration set. The default value is <code>true</code>. You can change this setting using <code>UpdateConfigurationSetSendingEnabled</code>.</p>
pub sending_enabled: bool,
/// <p>Describes whether or not Amazon SES publishes reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch.</p>
/// <p>If the value is <code>true</code>, reputation metrics are published. If the value is <code>false</code>, reputation metrics are not published. The default value is <code>false</code>.</p>
pub reputation_metrics_enabled: bool,
/// <p>The date and time at which the reputation metrics for the configuration set were last reset. Resetting these metrics is known as a <i>fresh start</i>.</p>
/// <p>When you disable email sending for a configuration set using <code>UpdateConfigurationSetSendingEnabled</code> and later re-enable it, the reputation metrics for the configuration set (but not for the entire Amazon SES account) are reset.</p>
/// <p>If email sending for the configuration set has never been disabled and later re-enabled, the value of this attribute is <code>null</code>.</p>
pub last_fresh_start: std::option::Option<aws_smithy_types::DateTime>,
}
impl ReputationOptions {
/// <p>Describes whether email sending is enabled or disabled for the configuration set. If the value is <code>true</code>, then Amazon SES will send emails that use the configuration set. If the value is <code>false</code>, Amazon SES will not send emails that use the configuration set. The default value is <code>true</code>. You can change this setting using <code>UpdateConfigurationSetSendingEnabled</code>.</p>
pub fn sending_enabled(&self) -> bool {
self.sending_enabled
}
/// <p>Describes whether or not Amazon SES publishes reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch.</p>
/// <p>If the value is <code>true</code>, reputation metrics are published. If the value is <code>false</code>, reputation metrics are not published. The default value is <code>false</code>.</p>
pub fn reputation_metrics_enabled(&self) -> bool {
self.reputation_metrics_enabled
}
/// <p>The date and time at which the reputation metrics for the configuration set were last reset. Resetting these metrics is known as a <i>fresh start</i>.</p>
/// <p>When you disable email sending for a configuration set using <code>UpdateConfigurationSetSendingEnabled</code> and later re-enable it, the reputation metrics for the configuration set (but not for the entire Amazon SES account) are reset.</p>
/// <p>If email sending for the configuration set has never been disabled and later re-enabled, the value of this attribute is <code>null</code>.</p>
pub fn last_fresh_start(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.last_fresh_start.as_ref()
}
}
impl std::fmt::Debug for ReputationOptions {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ReputationOptions");
formatter.field("sending_enabled", &self.sending_enabled);
formatter.field(
"reputation_metrics_enabled",
&self.reputation_metrics_enabled,
);
formatter.field("last_fresh_start", &self.last_fresh_start);
formatter.finish()
}
}
/// See [`ReputationOptions`](crate::model::ReputationOptions)
pub mod reputation_options {
/// A builder for [`ReputationOptions`](crate::model::ReputationOptions)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) sending_enabled: std::option::Option<bool>,
pub(crate) reputation_metrics_enabled: std::option::Option<bool>,
pub(crate) last_fresh_start: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
/// <p>Describes whether email sending is enabled or disabled for the configuration set. If the value is <code>true</code>, then Amazon SES will send emails that use the configuration set. If the value is <code>false</code>, Amazon SES will not send emails that use the configuration set. The default value is <code>true</code>. You can change this setting using <code>UpdateConfigurationSetSendingEnabled</code>.</p>
pub fn sending_enabled(mut self, input: bool) -> Self {
self.sending_enabled = Some(input);
self
}
/// <p>Describes whether email sending is enabled or disabled for the configuration set. If the value is <code>true</code>, then Amazon SES will send emails that use the configuration set. If the value is <code>false</code>, Amazon SES will not send emails that use the configuration set. The default value is <code>true</code>. You can change this setting using <code>UpdateConfigurationSetSendingEnabled</code>.</p>
pub fn set_sending_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.sending_enabled = input;
self
}
/// <p>Describes whether or not Amazon SES publishes reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch.</p>
/// <p>If the value is <code>true</code>, reputation metrics are published. If the value is <code>false</code>, reputation metrics are not published. The default value is <code>false</code>.</p>
pub fn reputation_metrics_enabled(mut self, input: bool) -> Self {
self.reputation_metrics_enabled = Some(input);
self
}
/// <p>Describes whether or not Amazon SES publishes reputation metrics for the configuration set, such as bounce and complaint rates, to Amazon CloudWatch.</p>
/// <p>If the value is <code>true</code>, reputation metrics are published. If the value is <code>false</code>, reputation metrics are not published. The default value is <code>false</code>.</p>
pub fn set_reputation_metrics_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.reputation_metrics_enabled = input;
self
}
/// <p>The date and time at which the reputation metrics for the configuration set were last reset. Resetting these metrics is known as a <i>fresh start</i>.</p>
/// <p>When you disable email sending for a configuration set using <code>UpdateConfigurationSetSendingEnabled</code> and later re-enable it, the reputation metrics for the configuration set (but not for the entire Amazon SES account) are reset.</p>
/// <p>If email sending for the configuration set has never been disabled and later re-enabled, the value of this attribute is <code>null</code>.</p>
pub fn last_fresh_start(mut self, input: aws_smithy_types::DateTime) -> Self {
self.last_fresh_start = Some(input);
self
}
/// <p>The date and time at which the reputation metrics for the configuration set were last reset. Resetting these metrics is known as a <i>fresh start</i>.</p>
/// <p>When you disable email sending for a configuration set using <code>UpdateConfigurationSetSendingEnabled</code> and later re-enable it, the reputation metrics for the configuration set (but not for the entire Amazon SES account) are reset.</p>
/// <p>If email sending for the configuration set has never been disabled and later re-enabled, the value of this attribute is <code>null</code>.</p>
pub fn set_last_fresh_start(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.last_fresh_start = input;
self
}
/// Consumes the builder and constructs a [`ReputationOptions`](crate::model::ReputationOptions)
pub fn build(self) -> crate::model::ReputationOptions {
crate::model::ReputationOptions {
sending_enabled: self.sending_enabled.unwrap_or_default(),
reputation_metrics_enabled: self.reputation_metrics_enabled.unwrap_or_default(),
last_fresh_start: self.last_fresh_start,
}
}
}
}
impl ReputationOptions {
/// Creates a new builder-style object to manufacture [`ReputationOptions`](crate::model::ReputationOptions)
pub fn builder() -> crate::model::reputation_options::Builder {
crate::model::reputation_options::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ConfigurationSetAttribute {
#[allow(missing_docs)] // documentation missing in model
DeliveryOptions,
#[allow(missing_docs)] // documentation missing in model
EventDestinations,
#[allow(missing_docs)] // documentation missing in model
ReputationOptions,
#[allow(missing_docs)] // documentation missing in model
TrackingOptions,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ConfigurationSetAttribute {
fn from(s: &str) -> Self {
match s {
"deliveryOptions" => ConfigurationSetAttribute::DeliveryOptions,
"eventDestinations" => ConfigurationSetAttribute::EventDestinations,
"reputationOptions" => ConfigurationSetAttribute::ReputationOptions,
"trackingOptions" => ConfigurationSetAttribute::TrackingOptions,
other => ConfigurationSetAttribute::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ConfigurationSetAttribute {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ConfigurationSetAttribute::from(s))
}
}
impl ConfigurationSetAttribute {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ConfigurationSetAttribute::DeliveryOptions => "deliveryOptions",
ConfigurationSetAttribute::EventDestinations => "eventDestinations",
ConfigurationSetAttribute::ReputationOptions => "reputationOptions",
ConfigurationSetAttribute::TrackingOptions => "trackingOptions",
ConfigurationSetAttribute::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&[
"deliveryOptions",
"eventDestinations",
"reputationOptions",
"trackingOptions",
]
}
}
impl AsRef<str> for ConfigurationSetAttribute {
fn as_ref(&self) -> &str {
self.as_str()
}
}