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 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024
// This file is @generated by prost-build.
/// SSL configuration information.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SslConfig {
/// Output only. The ssl config type according to 'client_key',
/// 'client_certificate' and 'ca_certificate'.
#[prost(enumeration = "ssl_config::SslType", tag = "1")]
pub r#type: i32,
/// Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key
/// associated with the Client Certificate. If this field is used then the
/// 'client_certificate' field is mandatory.
#[prost(string, tag = "2")]
pub client_key: ::prost::alloc::string::String,
/// Input only. The x509 PEM-encoded certificate that will be used by the
/// replica to authenticate against the source database server.If this field is
/// used then the 'client_key' field is mandatory.
#[prost(string, tag = "3")]
pub client_certificate: ::prost::alloc::string::String,
/// Required. Input only. The x509 PEM-encoded certificate of the CA that
/// signed the source database server's certificate. The replica will use this
/// certificate to verify it's connecting to the right host.
#[prost(string, tag = "4")]
pub ca_certificate: ::prost::alloc::string::String,
}
/// Nested message and enum types in `SslConfig`.
pub mod ssl_config {
/// Specifies The kind of ssl configuration used.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SslType {
/// Unspecified.
Unspecified = 0,
/// Only 'ca_certificate' specified.
ServerOnly = 1,
/// Both server ('ca_certificate'), and client ('client_key',
/// 'client_certificate') specified.
ServerClient = 2,
}
impl SslType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
SslType::Unspecified => "SSL_TYPE_UNSPECIFIED",
SslType::ServerOnly => "SERVER_ONLY",
SslType::ServerClient => "SERVER_CLIENT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SSL_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SERVER_ONLY" => Some(Self::ServerOnly),
"SERVER_CLIENT" => Some(Self::ServerClient),
_ => None,
}
}
}
}
/// Specifies connection parameters required specifically for MySQL databases.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MySqlConnectionProfile {
/// Required. The IP or hostname of the source MySQL database.
#[prost(string, tag = "1")]
pub host: ::prost::alloc::string::String,
/// Required. The network port of the source MySQL database.
#[prost(int32, tag = "2")]
pub port: i32,
/// Required. The username that Database Migration Service will use to connect
/// to the database. The value is encrypted when stored in Database Migration
/// Service.
#[prost(string, tag = "3")]
pub username: ::prost::alloc::string::String,
/// Required. Input only. The password for the user that Database Migration
/// Service will be using to connect to the database. This field is not
/// returned on request, and the value is encrypted when stored in Database
/// Migration Service.
#[prost(string, tag = "4")]
pub password: ::prost::alloc::string::String,
/// Output only. Indicates If this connection profile password is stored.
#[prost(bool, tag = "5")]
pub password_set: bool,
/// SSL configuration for the destination to connect to the source database.
#[prost(message, optional, tag = "6")]
pub ssl: ::core::option::Option<SslConfig>,
/// If the source is a Cloud SQL database, use this field to
/// provide the Cloud SQL instance ID of the source.
#[prost(string, tag = "7")]
pub cloud_sql_id: ::prost::alloc::string::String,
}
/// Specifies connection parameters required specifically for PostgreSQL
/// databases.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PostgreSqlConnectionProfile {
/// Required. The IP or hostname of the source PostgreSQL database.
#[prost(string, tag = "1")]
pub host: ::prost::alloc::string::String,
/// Required. The network port of the source PostgreSQL database.
#[prost(int32, tag = "2")]
pub port: i32,
/// Required. The username that Database Migration Service will use to connect
/// to the database. The value is encrypted when stored in Database Migration
/// Service.
#[prost(string, tag = "3")]
pub username: ::prost::alloc::string::String,
/// Required. Input only. The password for the user that Database Migration
/// Service will be using to connect to the database. This field is not
/// returned on request, and the value is encrypted when stored in Database
/// Migration Service.
#[prost(string, tag = "4")]
pub password: ::prost::alloc::string::String,
/// Output only. Indicates If this connection profile password is stored.
#[prost(bool, tag = "5")]
pub password_set: bool,
/// SSL configuration for the destination to connect to the source database.
#[prost(message, optional, tag = "6")]
pub ssl: ::core::option::Option<SslConfig>,
/// If the source is a Cloud SQL database, use this field to
/// provide the Cloud SQL instance ID of the source.
#[prost(string, tag = "7")]
pub cloud_sql_id: ::prost::alloc::string::String,
/// Output only. If the source is a Cloud SQL database, this field indicates
/// the network architecture it's associated with.
#[prost(enumeration = "NetworkArchitecture", tag = "8")]
pub network_architecture: i32,
/// Connectivity options used to establish a connection to the database server.
#[prost(oneof = "postgre_sql_connection_profile::Connectivity", tags = "100, 101")]
pub connectivity: ::core::option::Option<
postgre_sql_connection_profile::Connectivity,
>,
}
/// Nested message and enum types in `PostgreSqlConnectionProfile`.
pub mod postgre_sql_connection_profile {
/// Connectivity options used to establish a connection to the database server.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Connectivity {
/// Static ip connectivity data (default, no additional details needed).
#[prost(message, tag = "100")]
StaticIpConnectivity(super::StaticIpConnectivity),
/// Private service connect connectivity.
#[prost(message, tag = "101")]
PrivateServiceConnectConnectivity(super::PrivateServiceConnectConnectivity),
}
}
/// Specifies connection parameters required specifically for Oracle
/// databases.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OracleConnectionProfile {
/// Required. The IP or hostname of the source Oracle database.
#[prost(string, tag = "1")]
pub host: ::prost::alloc::string::String,
/// Required. The network port of the source Oracle database.
#[prost(int32, tag = "2")]
pub port: i32,
/// Required. The username that Database Migration Service will use to connect
/// to the database. The value is encrypted when stored in Database Migration
/// Service.
#[prost(string, tag = "3")]
pub username: ::prost::alloc::string::String,
/// Required. Input only. The password for the user that Database Migration
/// Service will be using to connect to the database. This field is not
/// returned on request, and the value is encrypted when stored in Database
/// Migration Service.
#[prost(string, tag = "4")]
pub password: ::prost::alloc::string::String,
/// Output only. Indicates whether a new password is included in the request.
#[prost(bool, tag = "5")]
pub password_set: bool,
/// Required. Database service for the Oracle connection.
#[prost(string, tag = "6")]
pub database_service: ::prost::alloc::string::String,
/// SSL configuration for the connection to the source Oracle database.
///
/// * Only `SERVER_ONLY` configuration is supported for Oracle SSL.
/// * SSL is supported for Oracle versions 12 and above.
#[prost(message, optional, tag = "7")]
pub ssl: ::core::option::Option<SslConfig>,
/// Connectivity options used to establish a connection to the database server.
#[prost(oneof = "oracle_connection_profile::Connectivity", tags = "100, 101, 102")]
pub connectivity: ::core::option::Option<oracle_connection_profile::Connectivity>,
}
/// Nested message and enum types in `OracleConnectionProfile`.
pub mod oracle_connection_profile {
/// Connectivity options used to establish a connection to the database server.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Connectivity {
/// Static Service IP connectivity.
#[prost(message, tag = "100")]
StaticServiceIpConnectivity(super::StaticServiceIpConnectivity),
/// Forward SSH tunnel connectivity.
#[prost(message, tag = "101")]
ForwardSshConnectivity(super::ForwardSshTunnelConnectivity),
/// Private connectivity.
#[prost(message, tag = "102")]
PrivateConnectivity(super::PrivateConnectivity),
}
}
/// Specifies required connection parameters, and, optionally, the parameters
/// required to create a Cloud SQL destination database instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudSqlConnectionProfile {
/// Output only. The Cloud SQL instance ID that this connection profile is
/// associated with.
#[prost(string, tag = "1")]
pub cloud_sql_id: ::prost::alloc::string::String,
/// Immutable. Metadata used to create the destination Cloud SQL database.
#[prost(message, optional, tag = "2")]
pub settings: ::core::option::Option<CloudSqlSettings>,
/// Output only. The Cloud SQL database instance's private IP.
#[prost(string, tag = "3")]
pub private_ip: ::prost::alloc::string::String,
/// Output only. The Cloud SQL database instance's public IP.
#[prost(string, tag = "4")]
pub public_ip: ::prost::alloc::string::String,
/// Output only. The Cloud SQL database instance's additional (outgoing) public
/// IP. Used when the Cloud SQL database availability type is REGIONAL (i.e.
/// multiple zones / highly available).
#[prost(string, tag = "5")]
pub additional_public_ip: ::prost::alloc::string::String,
}
/// Specifies required connection parameters, and the parameters
/// required to create an AlloyDB destination cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlloyDbConnectionProfile {
/// Required. The AlloyDB cluster ID that this connection profile is associated
/// with.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Immutable. Metadata used to create the destination AlloyDB cluster.
#[prost(message, optional, tag = "2")]
pub settings: ::core::option::Option<AlloyDbSettings>,
}
/// An entry for an Access Control list.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlAclEntry {
/// The allowlisted value for the access control list.
#[prost(string, tag = "1")]
pub value: ::prost::alloc::string::String,
/// A label to identify this entry.
#[prost(string, tag = "3")]
pub label: ::prost::alloc::string::String,
/// The access control entry entry expiration.
#[prost(oneof = "sql_acl_entry::Expiration", tags = "10, 11")]
pub expiration: ::core::option::Option<sql_acl_entry::Expiration>,
}
/// Nested message and enum types in `SqlAclEntry`.
pub mod sql_acl_entry {
/// The access control entry entry expiration.
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Expiration {
/// The time when this access control entry expires in
/// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example:
/// `2012-11-15T16:19:00.094Z`.
#[prost(message, tag = "10")]
ExpireTime(::prost_types::Timestamp),
/// Input only. The time-to-leave of this access control entry.
#[prost(message, tag = "11")]
Ttl(::prost_types::Duration),
}
}
/// IP Management configuration.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlIpConfig {
/// Whether the instance should be assigned an IPv4 address or not.
#[prost(message, optional, tag = "1")]
pub enable_ipv4: ::core::option::Option<bool>,
/// The resource link for the VPC network from which the Cloud SQL instance is
/// accessible for private IP. For example,
/// `projects/myProject/global/networks/default`. This setting can
/// be updated, but it cannot be removed after it is set.
#[prost(string, tag = "2")]
pub private_network: ::prost::alloc::string::String,
/// Optional. The name of the allocated IP address range for the private IP
/// Cloud SQL instance. This name refers to an already allocated IP range
/// address. If set, the instance IP address will be created in the allocated
/// range. Note that this IP address range can't be modified after the instance
/// is created. If you change the VPC when configuring connectivity settings
/// for the migration job, this field is not relevant.
#[prost(string, tag = "5")]
pub allocated_ip_range: ::prost::alloc::string::String,
/// Whether SSL connections over IP should be enforced or not.
#[prost(message, optional, tag = "3")]
pub require_ssl: ::core::option::Option<bool>,
/// The list of external networks that are allowed to connect to the instance
/// using the IP. See
/// <https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation,> also known as
/// 'slash' notation (e.g. `192.168.100.0/24`).
#[prost(message, repeated, tag = "4")]
pub authorized_networks: ::prost::alloc::vec::Vec<SqlAclEntry>,
}
/// Settings for creating a Cloud SQL database instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudSqlSettings {
/// The database engine type and version.
#[prost(enumeration = "cloud_sql_settings::SqlDatabaseVersion", tag = "1")]
pub database_version: i32,
/// The resource labels for a Cloud SQL instance to use to annotate any related
/// underlying resources such as Compute Engine VMs.
/// An object containing a list of "key": "value" pairs.
///
/// Example: `{ "name": "wrench", "mass": "18kg", "count": "3" }`.
#[prost(btree_map = "string, string", tag = "2")]
pub user_labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// The tier (or machine type) for this instance, for example:
/// `db-n1-standard-1` (MySQL instances) or
/// `db-custom-1-3840` (PostgreSQL instances).
/// For more information, see
/// [Cloud SQL Instance
/// Settings](<https://cloud.google.com/sql/docs/mysql/instance-settings>).
#[prost(string, tag = "3")]
pub tier: ::prost::alloc::string::String,
/// The maximum size to which storage capacity can be automatically increased.
/// The default value is 0, which specifies that there is no limit.
#[prost(message, optional, tag = "4")]
pub storage_auto_resize_limit: ::core::option::Option<i64>,
/// The activation policy specifies when the instance is activated; it is
/// applicable only when the instance state is 'RUNNABLE'. Valid values:
///
/// 'ALWAYS': The instance is on, and remains so even in
/// the absence of connection requests.
///
/// `NEVER`: The instance is off; it is not activated, even if a
/// connection request arrives.
#[prost(enumeration = "cloud_sql_settings::SqlActivationPolicy", tag = "5")]
pub activation_policy: i32,
/// The settings for IP Management. This allows to enable or disable the
/// instance IP and manage which external networks can connect to the instance.
/// The IPv4 address cannot be disabled.
#[prost(message, optional, tag = "6")]
pub ip_config: ::core::option::Option<SqlIpConfig>,
/// \[default: ON\] If you enable this setting, Cloud SQL checks your available
/// storage every 30 seconds. If the available storage falls below a threshold
/// size, Cloud SQL automatically adds additional storage capacity. If the
/// available storage repeatedly falls below the threshold size, Cloud SQL
/// continues to add storage until it reaches the maximum of 30 TB.
#[prost(message, optional, tag = "7")]
pub auto_storage_increase: ::core::option::Option<bool>,
/// The database flags passed to the Cloud SQL instance at startup.
/// An object containing a list of "key": value pairs.
/// Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
#[prost(btree_map = "string, string", tag = "8")]
pub database_flags: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// The type of storage: `PD_SSD` (default) or `PD_HDD`.
#[prost(enumeration = "cloud_sql_settings::SqlDataDiskType", tag = "9")]
pub data_disk_type: i32,
/// The storage capacity available to the database, in GB.
/// The minimum (and default) size is 10GB.
#[prost(message, optional, tag = "10")]
pub data_disk_size_gb: ::core::option::Option<i64>,
/// The Google Cloud Platform zone where your Cloud SQL database instance is
/// located.
#[prost(string, tag = "11")]
pub zone: ::prost::alloc::string::String,
/// Optional. The Google Cloud Platform zone where the failover Cloud SQL
/// database instance is located. Used when the Cloud SQL database availability
/// type is REGIONAL (i.e. multiple zones / highly available).
#[prost(string, tag = "18")]
pub secondary_zone: ::prost::alloc::string::String,
/// The Database Migration Service source connection profile ID,
/// in the format:
/// `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID`
#[prost(string, tag = "12")]
pub source_id: ::prost::alloc::string::String,
/// Input only. Initial root password.
#[prost(string, tag = "13")]
pub root_password: ::prost::alloc::string::String,
/// Output only. Indicates If this connection profile root password is stored.
#[prost(bool, tag = "14")]
pub root_password_set: bool,
/// The Cloud SQL default instance level collation.
#[prost(string, tag = "15")]
pub collation: ::prost::alloc::string::String,
/// The KMS key name used for the csql instance.
#[prost(string, tag = "16")]
pub cmek_key_name: ::prost::alloc::string::String,
/// Optional. Availability type. Potential values:
/// * `ZONAL`: The instance serves data from only one zone. Outages in that
/// zone affect data availability.
/// * `REGIONAL`: The instance can serve data from more than one zone in a
/// region (it is highly available).
#[prost(enumeration = "cloud_sql_settings::SqlAvailabilityType", tag = "17")]
pub availability_type: i32,
/// Optional. The edition of the given Cloud SQL instance.
#[prost(enumeration = "cloud_sql_settings::Edition", tag = "19")]
pub edition: i32,
}
/// Nested message and enum types in `CloudSqlSettings`.
pub mod cloud_sql_settings {
/// Specifies when the instance should be activated.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SqlActivationPolicy {
/// unspecified policy.
Unspecified = 0,
/// The instance is always up and running.
Always = 1,
/// The instance should never spin up.
Never = 2,
}
impl SqlActivationPolicy {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
SqlActivationPolicy::Unspecified => "SQL_ACTIVATION_POLICY_UNSPECIFIED",
SqlActivationPolicy::Always => "ALWAYS",
SqlActivationPolicy::Never => "NEVER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SQL_ACTIVATION_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
"ALWAYS" => Some(Self::Always),
"NEVER" => Some(Self::Never),
_ => None,
}
}
}
/// The storage options for Cloud SQL databases.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SqlDataDiskType {
/// Unspecified.
Unspecified = 0,
/// SSD disk.
PdSsd = 1,
/// HDD disk.
PdHdd = 2,
}
impl SqlDataDiskType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
SqlDataDiskType::Unspecified => "SQL_DATA_DISK_TYPE_UNSPECIFIED",
SqlDataDiskType::PdSsd => "PD_SSD",
SqlDataDiskType::PdHdd => "PD_HDD",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SQL_DATA_DISK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PD_SSD" => Some(Self::PdSsd),
"PD_HDD" => Some(Self::PdHdd),
_ => None,
}
}
}
/// The database engine type and version.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SqlDatabaseVersion {
/// Unspecified version.
Unspecified = 0,
/// MySQL 5.6.
Mysql56 = 1,
/// MySQL 5.7.
Mysql57 = 2,
/// PostgreSQL 9.6.
Postgres96 = 3,
/// PostgreSQL 11.
Postgres11 = 4,
/// PostgreSQL 10.
Postgres10 = 5,
/// MySQL 8.0.
Mysql80 = 6,
/// PostgreSQL 12.
Postgres12 = 7,
/// PostgreSQL 13.
Postgres13 = 8,
/// PostgreSQL 14.
Postgres14 = 17,
/// PostgreSQL 15.
Postgres15 = 18,
}
impl SqlDatabaseVersion {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
SqlDatabaseVersion::Unspecified => "SQL_DATABASE_VERSION_UNSPECIFIED",
SqlDatabaseVersion::Mysql56 => "MYSQL_5_6",
SqlDatabaseVersion::Mysql57 => "MYSQL_5_7",
SqlDatabaseVersion::Postgres96 => "POSTGRES_9_6",
SqlDatabaseVersion::Postgres11 => "POSTGRES_11",
SqlDatabaseVersion::Postgres10 => "POSTGRES_10",
SqlDatabaseVersion::Mysql80 => "MYSQL_8_0",
SqlDatabaseVersion::Postgres12 => "POSTGRES_12",
SqlDatabaseVersion::Postgres13 => "POSTGRES_13",
SqlDatabaseVersion::Postgres14 => "POSTGRES_14",
SqlDatabaseVersion::Postgres15 => "POSTGRES_15",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SQL_DATABASE_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
"MYSQL_5_6" => Some(Self::Mysql56),
"MYSQL_5_7" => Some(Self::Mysql57),
"POSTGRES_9_6" => Some(Self::Postgres96),
"POSTGRES_11" => Some(Self::Postgres11),
"POSTGRES_10" => Some(Self::Postgres10),
"MYSQL_8_0" => Some(Self::Mysql80),
"POSTGRES_12" => Some(Self::Postgres12),
"POSTGRES_13" => Some(Self::Postgres13),
"POSTGRES_14" => Some(Self::Postgres14),
"POSTGRES_15" => Some(Self::Postgres15),
_ => None,
}
}
}
/// The availability type of the given Cloud SQL instance.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SqlAvailabilityType {
/// This is an unknown Availability type.
Unspecified = 0,
/// Zonal availablility instance.
Zonal = 1,
/// Regional availability instance.
Regional = 2,
}
impl SqlAvailabilityType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
SqlAvailabilityType::Unspecified => "SQL_AVAILABILITY_TYPE_UNSPECIFIED",
SqlAvailabilityType::Zonal => "ZONAL",
SqlAvailabilityType::Regional => "REGIONAL",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SQL_AVAILABILITY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ZONAL" => Some(Self::Zonal),
"REGIONAL" => Some(Self::Regional),
_ => None,
}
}
}
/// The edition of the given Cloud SQL instance.
/// Can be ENTERPRISE or ENTERPRISE_PLUS.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Edition {
/// The instance did not specify the edition.
Unspecified = 0,
/// The instance is an enterprise edition.
Enterprise = 2,
/// The instance is an enterprise plus edition.
EnterprisePlus = 3,
}
impl Edition {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Edition::Unspecified => "EDITION_UNSPECIFIED",
Edition::Enterprise => "ENTERPRISE",
Edition::EnterprisePlus => "ENTERPRISE_PLUS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EDITION_UNSPECIFIED" => Some(Self::Unspecified),
"ENTERPRISE" => Some(Self::Enterprise),
"ENTERPRISE_PLUS" => Some(Self::EnterprisePlus),
_ => None,
}
}
}
}
/// Settings for creating an AlloyDB cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlloyDbSettings {
/// Required. Input only. Initial user to setup during cluster creation.
/// Required.
#[prost(message, optional, tag = "1")]
pub initial_user: ::core::option::Option<alloy_db_settings::UserPassword>,
/// Required. The resource link for the VPC network in which cluster resources
/// are created and from which they are accessible via Private IP. The network
/// must belong to the same project as the cluster. It is specified in the
/// form: "projects/{project_number}/global/networks/{network_id}". This is
/// required to create a cluster.
#[prost(string, tag = "2")]
pub vpc_network: ::prost::alloc::string::String,
/// Labels for the AlloyDB cluster created by DMS. An object containing a list
/// of 'key', 'value' pairs.
#[prost(btree_map = "string, string", tag = "3")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "4")]
pub primary_instance_settings: ::core::option::Option<
alloy_db_settings::PrimaryInstanceSettings,
>,
/// Optional. The encryption config can be specified to encrypt the data disks
/// and other persistent data resources of a cluster with a
/// customer-managed encryption key (CMEK). When this field is not
/// specified, the cluster will then use default encryption scheme to
/// protect the user data.
#[prost(message, optional, tag = "5")]
pub encryption_config: ::core::option::Option<alloy_db_settings::EncryptionConfig>,
}
/// Nested message and enum types in `AlloyDbSettings`.
pub mod alloy_db_settings {
/// The username/password for a database user. Used for specifying initial
/// users at cluster creation time.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserPassword {
/// The database username.
#[prost(string, tag = "1")]
pub user: ::prost::alloc::string::String,
/// The initial password for the user.
#[prost(string, tag = "2")]
pub password: ::prost::alloc::string::String,
/// Output only. Indicates if the initial_user.password field has been set.
#[prost(bool, tag = "3")]
pub password_set: bool,
}
/// Settings for the cluster's primary instance
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrimaryInstanceSettings {
/// Required. The ID of the AlloyDB primary instance. The ID must satisfy the
/// regex expression "\[a-z0-9-\]+".
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// Configuration for the machines that host the underlying
/// database engine.
#[prost(message, optional, tag = "2")]
pub machine_config: ::core::option::Option<
primary_instance_settings::MachineConfig,
>,
/// Database flags to pass to AlloyDB when DMS is creating the AlloyDB
/// cluster and instances. See the AlloyDB documentation for how these can be
/// used.
#[prost(btree_map = "string, string", tag = "6")]
pub database_flags: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Labels for the AlloyDB primary instance created by DMS. An object
/// containing a list of 'key', 'value' pairs.
#[prost(btree_map = "string, string", tag = "7")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. The private IP address for the Instance.
/// This is the connection endpoint for an end-user application.
#[prost(string, tag = "8")]
pub private_ip: ::prost::alloc::string::String,
}
/// Nested message and enum types in `PrimaryInstanceSettings`.
pub mod primary_instance_settings {
/// MachineConfig describes the configuration of a machine.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MachineConfig {
/// The number of CPU's in the VM instance.
#[prost(int32, tag = "1")]
pub cpu_count: i32,
}
}
/// EncryptionConfig describes the encryption config of a cluster that is
/// encrypted with a CMEK (customer-managed encryption key).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EncryptionConfig {
/// The fully-qualified resource name of the KMS key.
/// Each Cloud KMS key is regionalized and has the following format:
/// projects/\[PROJECT\]/locations/\[REGION\]/keyRings/\[RING\]/cryptoKeys/\[KEY_NAME\]
#[prost(string, tag = "1")]
pub kms_key_name: ::prost::alloc::string::String,
}
}
/// The source database will allow incoming connections from the public IP of the
/// destination database. You can retrieve the public IP of the Cloud SQL
/// instance from the Cloud SQL console or using Cloud SQL APIs. No additional
/// configuration is required.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StaticIpConnectivity {}
/// [Private Service Connect
/// connectivity](<https://cloud.google.com/vpc/docs/private-service-connect#service-attachments>)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateServiceConnectConnectivity {
/// Required. A service attachment that exposes a database, and has the
/// following format:
/// projects/{project}/regions/{region}/serviceAttachments/{service_attachment_name}
#[prost(string, tag = "1")]
pub service_attachment: ::prost::alloc::string::String,
}
/// The details needed to configure a reverse SSH tunnel between the source and
/// destination databases. These details will be used when calling the
/// generateSshScript method (see
/// <https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs/generateSshScript>)
/// to produce the script that will help set up the reverse SSH tunnel, and to
/// set up the VPC peering between the Cloud SQL private network and the VPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReverseSshConnectivity {
/// Required. The IP of the virtual machine (Compute Engine) used as the
/// bastion server for the SSH tunnel.
#[prost(string, tag = "1")]
pub vm_ip: ::prost::alloc::string::String,
/// Required. The forwarding port of the virtual machine (Compute Engine) used
/// as the bastion server for the SSH tunnel.
#[prost(int32, tag = "2")]
pub vm_port: i32,
/// The name of the virtual machine (Compute Engine) used as the bastion server
/// for the SSH tunnel.
#[prost(string, tag = "3")]
pub vm: ::prost::alloc::string::String,
/// The name of the VPC to peer with the Cloud SQL private network.
#[prost(string, tag = "4")]
pub vpc: ::prost::alloc::string::String,
}
/// The details of the VPC where the source database is located in Google Cloud.
/// We will use this information to set up the VPC peering connection between
/// Cloud SQL and this VPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VpcPeeringConnectivity {
/// The name of the VPC network to peer with the Cloud SQL private network.
#[prost(string, tag = "1")]
pub vpc: ::prost::alloc::string::String,
}
/// Forward SSH Tunnel connectivity.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ForwardSshTunnelConnectivity {
/// Required. Hostname for the SSH tunnel.
#[prost(string, tag = "1")]
pub hostname: ::prost::alloc::string::String,
/// Required. Username for the SSH tunnel.
#[prost(string, tag = "2")]
pub username: ::prost::alloc::string::String,
/// Port for the SSH tunnel, default value is 22.
#[prost(int32, tag = "3")]
pub port: i32,
#[prost(
oneof = "forward_ssh_tunnel_connectivity::AuthenticationMethod",
tags = "100, 101"
)]
pub authentication_method: ::core::option::Option<
forward_ssh_tunnel_connectivity::AuthenticationMethod,
>,
}
/// Nested message and enum types in `ForwardSshTunnelConnectivity`.
pub mod forward_ssh_tunnel_connectivity {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AuthenticationMethod {
/// Input only. SSH password.
#[prost(string, tag = "100")]
Password(::prost::alloc::string::String),
/// Input only. SSH private key.
#[prost(string, tag = "101")]
PrivateKey(::prost::alloc::string::String),
}
}
/// Static IP address connectivity configured on service project.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StaticServiceIpConnectivity {}
/// Private Connectivity.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateConnectivity {
/// Required. The resource name (URI) of the private connection.
#[prost(string, tag = "1")]
pub private_connection: ::prost::alloc::string::String,
}
/// A message defining the database engine and provider.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DatabaseType {
/// The database provider.
#[prost(enumeration = "DatabaseProvider", tag = "1")]
pub provider: i32,
/// The database engine.
#[prost(enumeration = "DatabaseEngine", tag = "2")]
pub engine: i32,
}
/// Represents a Database Migration Service migration job object.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrationJob {
/// The name (URI) of this migration job resource, in the form of:
/// projects/{project}/locations/{location}/migrationJobs/{migrationJob}.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The timestamp when the migration job resource was created.
/// A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
/// Example: "2014-10-02T15:01:23.045123456Z".
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The timestamp when the migration job resource was last
/// updated. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
/// Example: "2014-10-02T15:01:23.045123456Z".
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// The resource labels for migration job to use to annotate any related
/// underlying resources such as Compute Engine VMs. An object containing a
/// list of "key": "value" pairs.
///
/// Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// The migration job display name.
#[prost(string, tag = "5")]
pub display_name: ::prost::alloc::string::String,
/// The current migration job state.
#[prost(enumeration = "migration_job::State", tag = "6")]
pub state: i32,
/// Output only. The current migration job phase.
#[prost(enumeration = "migration_job::Phase", tag = "7")]
pub phase: i32,
/// Required. The migration job type.
#[prost(enumeration = "migration_job::Type", tag = "8")]
pub r#type: i32,
/// The path to the dump file in Google Cloud Storage,
/// in the format: (gs://\[BUCKET_NAME\]/[OBJECT_NAME]).
/// This field and the "dump_flags" field are mutually exclusive.
#[prost(string, tag = "9")]
pub dump_path: ::prost::alloc::string::String,
/// The initial dump flags.
/// This field and the "dump_path" field are mutually exclusive.
#[prost(message, optional, tag = "17")]
pub dump_flags: ::core::option::Option<migration_job::DumpFlags>,
/// Required. The resource name (URI) of the source connection profile.
#[prost(string, tag = "10")]
pub source: ::prost::alloc::string::String,
/// Required. The resource name (URI) of the destination connection profile.
#[prost(string, tag = "11")]
pub destination: ::prost::alloc::string::String,
/// Output only. The duration of the migration job (in seconds). A duration in
/// seconds with up to nine fractional digits, terminated by 's'. Example:
/// "3.5s".
#[prost(message, optional, tag = "12")]
pub duration: ::core::option::Option<::prost_types::Duration>,
/// Output only. The error details in case of state FAILED.
#[prost(message, optional, tag = "13")]
pub error: ::core::option::Option<super::super::super::rpc::Status>,
/// The database engine type and provider of the source.
#[prost(message, optional, tag = "14")]
pub source_database: ::core::option::Option<DatabaseType>,
/// The database engine type and provider of the destination.
#[prost(message, optional, tag = "15")]
pub destination_database: ::core::option::Option<DatabaseType>,
/// Output only. If the migration job is completed, the time when it was
/// completed.
#[prost(message, optional, tag = "16")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// The conversion workspace used by the migration.
#[prost(message, optional, tag = "18")]
pub conversion_workspace: ::core::option::Option<ConversionWorkspaceInfo>,
/// This field can be used to select the entities to migrate as part of
/// the migration job. It uses AIP-160 notation to select a subset of the
/// entities configured on the associated conversion-workspace. This field
/// should not be set on migration-jobs that are not associated with a
/// conversion workspace.
#[prost(string, tag = "20")]
pub filter: ::prost::alloc::string::String,
/// The CMEK (customer-managed encryption key) fully qualified key name used
/// for the migration job.
/// This field supports all migration jobs types except for:
/// * Mysql to Mysql (use the cmek field in the cloudsql connection profile
/// instead).
/// * PostrgeSQL to PostgreSQL (use the cmek field in the cloudsql
/// connection profile instead).
/// * PostgreSQL to AlloyDB (use the kms_key_name field in the alloydb
/// connection profile instead).
/// Each Cloud CMEK key has the following format:
/// projects/\[PROJECT\]/locations/\[REGION\]/keyRings/\[RING\]/cryptoKeys/\[KEY_NAME\]
#[prost(string, tag = "21")]
pub cmek_key_name: ::prost::alloc::string::String,
/// Optional. Data dump parallelism settings used by the migration.
/// Currently applicable only for MySQL to Cloud SQL for MySQL migrations only.
#[prost(message, optional, tag = "22")]
pub performance_config: ::core::option::Option<migration_job::PerformanceConfig>,
/// The connectivity method.
#[prost(oneof = "migration_job::Connectivity", tags = "101, 102, 103")]
pub connectivity: ::core::option::Option<migration_job::Connectivity>,
}
/// Nested message and enum types in `MigrationJob`.
pub mod migration_job {
/// Dump flag definition.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DumpFlag {
/// The name of the flag
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The value of the flag.
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
/// Dump flags definition.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DumpFlags {
/// The flags for the initial dump.
#[prost(message, repeated, tag = "1")]
pub dump_flags: ::prost::alloc::vec::Vec<DumpFlag>,
}
/// Performance configuration definition.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PerformanceConfig {
/// Initial dump parallelism level.
#[prost(enumeration = "performance_config::DumpParallelLevel", tag = "1")]
pub dump_parallel_level: i32,
}
/// Nested message and enum types in `PerformanceConfig`.
pub mod performance_config {
/// Describes the parallelism level during initial dump.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DumpParallelLevel {
/// Unknown dump parallel level. Will be defaulted to OPTIMAL.
Unspecified = 0,
/// Minimal parallel level.
Min = 1,
/// Optimal parallel level.
Optimal = 2,
/// Maximum parallel level.
Max = 3,
}
impl DumpParallelLevel {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DumpParallelLevel::Unspecified => "DUMP_PARALLEL_LEVEL_UNSPECIFIED",
DumpParallelLevel::Min => "MIN",
DumpParallelLevel::Optimal => "OPTIMAL",
DumpParallelLevel::Max => "MAX",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DUMP_PARALLEL_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
"MIN" => Some(Self::Min),
"OPTIMAL" => Some(Self::Optimal),
"MAX" => Some(Self::Max),
_ => None,
}
}
}
}
/// The current migration job states.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// The state of the migration job is unknown.
Unspecified = 0,
/// The migration job is down for maintenance.
Maintenance = 1,
/// The migration job is in draft mode and no resources are created.
Draft = 2,
/// The migration job is being created.
Creating = 3,
/// The migration job is created and not started.
NotStarted = 4,
/// The migration job is running.
Running = 5,
/// The migration job failed.
Failed = 6,
/// The migration job has been completed.
Completed = 7,
/// The migration job is being deleted.
Deleting = 8,
/// The migration job is being stopped.
Stopping = 9,
/// The migration job is currently stopped.
Stopped = 10,
/// The migration job has been deleted.
Deleted = 11,
/// The migration job is being updated.
Updating = 12,
/// The migration job is starting.
Starting = 13,
/// The migration job is restarting.
Restarting = 14,
/// The migration job is resuming.
Resuming = 15,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Maintenance => "MAINTENANCE",
State::Draft => "DRAFT",
State::Creating => "CREATING",
State::NotStarted => "NOT_STARTED",
State::Running => "RUNNING",
State::Failed => "FAILED",
State::Completed => "COMPLETED",
State::Deleting => "DELETING",
State::Stopping => "STOPPING",
State::Stopped => "STOPPED",
State::Deleted => "DELETED",
State::Updating => "UPDATING",
State::Starting => "STARTING",
State::Restarting => "RESTARTING",
State::Resuming => "RESUMING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"MAINTENANCE" => Some(Self::Maintenance),
"DRAFT" => Some(Self::Draft),
"CREATING" => Some(Self::Creating),
"NOT_STARTED" => Some(Self::NotStarted),
"RUNNING" => Some(Self::Running),
"FAILED" => Some(Self::Failed),
"COMPLETED" => Some(Self::Completed),
"DELETING" => Some(Self::Deleting),
"STOPPING" => Some(Self::Stopping),
"STOPPED" => Some(Self::Stopped),
"DELETED" => Some(Self::Deleted),
"UPDATING" => Some(Self::Updating),
"STARTING" => Some(Self::Starting),
"RESTARTING" => Some(Self::Restarting),
"RESUMING" => Some(Self::Resuming),
_ => None,
}
}
}
/// The current migration job phase.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Phase {
/// The phase of the migration job is unknown.
Unspecified = 0,
/// The migration job is in the full dump phase.
FullDump = 1,
/// The migration job is CDC phase.
Cdc = 2,
/// The migration job is running the promote phase.
PromoteInProgress = 3,
/// Only RDS flow - waiting for source writes to stop
WaitingForSourceWritesToStop = 4,
/// Only RDS flow - the sources writes stopped, waiting for dump to begin
PreparingTheDump = 5,
}
impl Phase {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Phase::Unspecified => "PHASE_UNSPECIFIED",
Phase::FullDump => "FULL_DUMP",
Phase::Cdc => "CDC",
Phase::PromoteInProgress => "PROMOTE_IN_PROGRESS",
Phase::WaitingForSourceWritesToStop => {
"WAITING_FOR_SOURCE_WRITES_TO_STOP"
}
Phase::PreparingTheDump => "PREPARING_THE_DUMP",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PHASE_UNSPECIFIED" => Some(Self::Unspecified),
"FULL_DUMP" => Some(Self::FullDump),
"CDC" => Some(Self::Cdc),
"PROMOTE_IN_PROGRESS" => Some(Self::PromoteInProgress),
"WAITING_FOR_SOURCE_WRITES_TO_STOP" => {
Some(Self::WaitingForSourceWritesToStop)
}
"PREPARING_THE_DUMP" => Some(Self::PreparingTheDump),
_ => None,
}
}
}
/// The type of migration job (one-time or continuous).
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// The type of the migration job is unknown.
Unspecified = 0,
/// The migration job is a one time migration.
OneTime = 1,
/// The migration job is a continuous migration.
Continuous = 2,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::OneTime => "ONE_TIME",
Type::Continuous => "CONTINUOUS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ONE_TIME" => Some(Self::OneTime),
"CONTINUOUS" => Some(Self::Continuous),
_ => None,
}
}
}
/// The connectivity method.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Connectivity {
/// The details needed to communicate to the source over Reverse SSH
/// tunnel connectivity.
#[prost(message, tag = "101")]
ReverseSshConnectivity(super::ReverseSshConnectivity),
/// The details of the VPC network that the source database is located in.
#[prost(message, tag = "102")]
VpcPeeringConnectivity(super::VpcPeeringConnectivity),
/// static ip connectivity data (default, no additional details needed).
#[prost(message, tag = "103")]
StaticIpConnectivity(super::StaticIpConnectivity),
}
}
/// A conversion workspace's version.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversionWorkspaceInfo {
/// The resource name (URI) of the conversion workspace.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The commit ID of the conversion workspace.
#[prost(string, tag = "2")]
pub commit_id: ::prost::alloc::string::String,
}
/// A connection profile definition.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectionProfile {
/// The name of this connection profile resource in the form of
/// projects/{project}/locations/{location}/connectionProfiles/{connectionProfile}.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The timestamp when the resource was created.
/// A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
/// Example: "2014-10-02T15:01:23.045123456Z".
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The timestamp when the resource was last updated.
/// A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
/// Example: "2014-10-02T15:01:23.045123456Z".
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// The resource labels for connection profile to use to annotate any related
/// underlying resources such as Compute Engine VMs. An object containing a
/// list of "key": "value" pairs.
///
/// Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// The current connection profile state (e.g. DRAFT, READY, or FAILED).
#[prost(enumeration = "connection_profile::State", tag = "5")]
pub state: i32,
/// The connection profile display name.
#[prost(string, tag = "6")]
pub display_name: ::prost::alloc::string::String,
/// Output only. The error details in case of state FAILED.
#[prost(message, optional, tag = "7")]
pub error: ::core::option::Option<super::super::super::rpc::Status>,
/// The database provider.
#[prost(enumeration = "DatabaseProvider", tag = "8")]
pub provider: i32,
/// The connection profile definition.
#[prost(
oneof = "connection_profile::ConnectionProfile",
tags = "100, 101, 104, 102, 105"
)]
pub connection_profile: ::core::option::Option<
connection_profile::ConnectionProfile,
>,
}
/// Nested message and enum types in `ConnectionProfile`.
pub mod connection_profile {
/// The current connection profile state (e.g. DRAFT, READY, or FAILED).
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// The state of the connection profile is unknown.
Unspecified = 0,
/// The connection profile is in draft mode and fully editable.
Draft = 1,
/// The connection profile is being created.
Creating = 2,
/// The connection profile is ready.
Ready = 3,
/// The connection profile is being updated.
Updating = 4,
/// The connection profile is being deleted.
Deleting = 5,
/// The connection profile has been deleted.
Deleted = 6,
/// The last action on the connection profile failed.
Failed = 7,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Draft => "DRAFT",
State::Creating => "CREATING",
State::Ready => "READY",
State::Updating => "UPDATING",
State::Deleting => "DELETING",
State::Deleted => "DELETED",
State::Failed => "FAILED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"DRAFT" => Some(Self::Draft),
"CREATING" => Some(Self::Creating),
"READY" => Some(Self::Ready),
"UPDATING" => Some(Self::Updating),
"DELETING" => Some(Self::Deleting),
"DELETED" => Some(Self::Deleted),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
/// The connection profile definition.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ConnectionProfile {
/// A MySQL database connection profile.
#[prost(message, tag = "100")]
Mysql(super::MySqlConnectionProfile),
/// A PostgreSQL database connection profile.
#[prost(message, tag = "101")]
Postgresql(super::PostgreSqlConnectionProfile),
/// An Oracle database connection profile.
#[prost(message, tag = "104")]
Oracle(super::OracleConnectionProfile),
/// A CloudSQL database connection profile.
#[prost(message, tag = "102")]
Cloudsql(super::CloudSqlConnectionProfile),
/// An AlloyDB cluster connection profile.
#[prost(message, tag = "105")]
Alloydb(super::AlloyDbConnectionProfile),
}
}
/// Error message of a verification Migration job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrationJobVerificationError {
/// Output only. An instance of ErrorCode specifying the error that occurred.
#[prost(enumeration = "migration_job_verification_error::ErrorCode", tag = "1")]
pub error_code: i32,
/// Output only. A formatted message with further details about the error and a
/// CTA.
#[prost(string, tag = "2")]
pub error_message: ::prost::alloc::string::String,
/// Output only. A specific detailed error message, if supplied by the engine.
#[prost(string, tag = "3")]
pub error_detail_message: ::prost::alloc::string::String,
}
/// Nested message and enum types in `MigrationJobVerificationError`.
pub mod migration_job_verification_error {
/// A general error code describing the type of error that occurred.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ErrorCode {
/// An unknown error occurred
Unspecified = 0,
/// We failed to connect to one of the connection profile.
ConnectionFailure = 1,
/// We failed to authenticate to one of the connection profile.
AuthenticationFailure = 2,
/// One of the involved connection profiles has an invalid configuration.
InvalidConnectionProfileConfig = 3,
/// The versions of the source and the destination are incompatible.
VersionIncompatibility = 4,
/// The types of the source and the destination are incompatible.
ConnectionProfileTypesIncompatibility = 5,
/// No pglogical extension installed on databases, applicable for postgres.
NoPglogicalInstalled = 7,
/// pglogical node already exists on databases, applicable for postgres.
PglogicalNodeAlreadyExists = 8,
/// The value of parameter wal_level is not set to logical.
InvalidWalLevel = 9,
/// The value of parameter shared_preload_libraries does not include
/// pglogical.
InvalidSharedPreloadLibrary = 10,
/// The value of parameter max_replication_slots is not sufficient.
InsufficientMaxReplicationSlots = 11,
/// The value of parameter max_wal_senders is not sufficient.
InsufficientMaxWalSenders = 12,
/// The value of parameter max_worker_processes is not sufficient.
InsufficientMaxWorkerProcesses = 13,
/// Extensions installed are either not supported or having unsupported
/// versions.
UnsupportedExtensions = 14,
/// Unsupported migration type.
UnsupportedMigrationType = 15,
/// Invalid RDS logical replication.
InvalidRdsLogicalReplication = 16,
/// The gtid_mode is not supported, applicable for MySQL.
UnsupportedGtidMode = 17,
/// The table definition is not support due to missing primary key or replica
/// identity.
UnsupportedTableDefinition = 18,
/// The definer is not supported.
UnsupportedDefiner = 19,
/// Migration is already running at the time of restart request.
CantRestartRunningMigration = 21,
/// The source already has a replication setup.
SourceAlreadySetup = 23,
/// The source has tables with limited support.
/// E.g. PostgreSQL tables without primary keys.
TablesWithLimitedSupport = 24,
/// The source uses an unsupported locale.
UnsupportedDatabaseLocale = 25,
/// The source uses an unsupported Foreign Data Wrapper configuration.
UnsupportedDatabaseFdwConfig = 26,
/// There was an underlying RDBMS error.
ErrorRdbms = 27,
/// The source DB size in Bytes exceeds a certain threshold. The migration
/// might require an increase of quota, or might not be supported.
SourceSizeExceedsThreshold = 28,
/// The destination DB contains existing databases that are conflicting with
/// those in the source DB.
ExistingConflictingDatabases = 29,
/// Insufficient privilege to enable the parallelism configuration.
ParallelImportInsufficientPrivilege = 30,
}
impl ErrorCode {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
ErrorCode::Unspecified => "ERROR_CODE_UNSPECIFIED",
ErrorCode::ConnectionFailure => "CONNECTION_FAILURE",
ErrorCode::AuthenticationFailure => "AUTHENTICATION_FAILURE",
ErrorCode::InvalidConnectionProfileConfig => {
"INVALID_CONNECTION_PROFILE_CONFIG"
}
ErrorCode::VersionIncompatibility => "VERSION_INCOMPATIBILITY",
ErrorCode::ConnectionProfileTypesIncompatibility => {
"CONNECTION_PROFILE_TYPES_INCOMPATIBILITY"
}
ErrorCode::NoPglogicalInstalled => "NO_PGLOGICAL_INSTALLED",
ErrorCode::PglogicalNodeAlreadyExists => "PGLOGICAL_NODE_ALREADY_EXISTS",
ErrorCode::InvalidWalLevel => "INVALID_WAL_LEVEL",
ErrorCode::InvalidSharedPreloadLibrary => {
"INVALID_SHARED_PRELOAD_LIBRARY"
}
ErrorCode::InsufficientMaxReplicationSlots => {
"INSUFFICIENT_MAX_REPLICATION_SLOTS"
}
ErrorCode::InsufficientMaxWalSenders => "INSUFFICIENT_MAX_WAL_SENDERS",
ErrorCode::InsufficientMaxWorkerProcesses => {
"INSUFFICIENT_MAX_WORKER_PROCESSES"
}
ErrorCode::UnsupportedExtensions => "UNSUPPORTED_EXTENSIONS",
ErrorCode::UnsupportedMigrationType => "UNSUPPORTED_MIGRATION_TYPE",
ErrorCode::InvalidRdsLogicalReplication => {
"INVALID_RDS_LOGICAL_REPLICATION"
}
ErrorCode::UnsupportedGtidMode => "UNSUPPORTED_GTID_MODE",
ErrorCode::UnsupportedTableDefinition => "UNSUPPORTED_TABLE_DEFINITION",
ErrorCode::UnsupportedDefiner => "UNSUPPORTED_DEFINER",
ErrorCode::CantRestartRunningMigration => {
"CANT_RESTART_RUNNING_MIGRATION"
}
ErrorCode::SourceAlreadySetup => "SOURCE_ALREADY_SETUP",
ErrorCode::TablesWithLimitedSupport => "TABLES_WITH_LIMITED_SUPPORT",
ErrorCode::UnsupportedDatabaseLocale => "UNSUPPORTED_DATABASE_LOCALE",
ErrorCode::UnsupportedDatabaseFdwConfig => {
"UNSUPPORTED_DATABASE_FDW_CONFIG"
}
ErrorCode::ErrorRdbms => "ERROR_RDBMS",
ErrorCode::SourceSizeExceedsThreshold => "SOURCE_SIZE_EXCEEDS_THRESHOLD",
ErrorCode::ExistingConflictingDatabases => {
"EXISTING_CONFLICTING_DATABASES"
}
ErrorCode::ParallelImportInsufficientPrivilege => {
"PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ERROR_CODE_UNSPECIFIED" => Some(Self::Unspecified),
"CONNECTION_FAILURE" => Some(Self::ConnectionFailure),
"AUTHENTICATION_FAILURE" => Some(Self::AuthenticationFailure),
"INVALID_CONNECTION_PROFILE_CONFIG" => {
Some(Self::InvalidConnectionProfileConfig)
}
"VERSION_INCOMPATIBILITY" => Some(Self::VersionIncompatibility),
"CONNECTION_PROFILE_TYPES_INCOMPATIBILITY" => {
Some(Self::ConnectionProfileTypesIncompatibility)
}
"NO_PGLOGICAL_INSTALLED" => Some(Self::NoPglogicalInstalled),
"PGLOGICAL_NODE_ALREADY_EXISTS" => Some(Self::PglogicalNodeAlreadyExists),
"INVALID_WAL_LEVEL" => Some(Self::InvalidWalLevel),
"INVALID_SHARED_PRELOAD_LIBRARY" => {
Some(Self::InvalidSharedPreloadLibrary)
}
"INSUFFICIENT_MAX_REPLICATION_SLOTS" => {
Some(Self::InsufficientMaxReplicationSlots)
}
"INSUFFICIENT_MAX_WAL_SENDERS" => Some(Self::InsufficientMaxWalSenders),
"INSUFFICIENT_MAX_WORKER_PROCESSES" => {
Some(Self::InsufficientMaxWorkerProcesses)
}
"UNSUPPORTED_EXTENSIONS" => Some(Self::UnsupportedExtensions),
"UNSUPPORTED_MIGRATION_TYPE" => Some(Self::UnsupportedMigrationType),
"INVALID_RDS_LOGICAL_REPLICATION" => {
Some(Self::InvalidRdsLogicalReplication)
}
"UNSUPPORTED_GTID_MODE" => Some(Self::UnsupportedGtidMode),
"UNSUPPORTED_TABLE_DEFINITION" => Some(Self::UnsupportedTableDefinition),
"UNSUPPORTED_DEFINER" => Some(Self::UnsupportedDefiner),
"CANT_RESTART_RUNNING_MIGRATION" => {
Some(Self::CantRestartRunningMigration)
}
"SOURCE_ALREADY_SETUP" => Some(Self::SourceAlreadySetup),
"TABLES_WITH_LIMITED_SUPPORT" => Some(Self::TablesWithLimitedSupport),
"UNSUPPORTED_DATABASE_LOCALE" => Some(Self::UnsupportedDatabaseLocale),
"UNSUPPORTED_DATABASE_FDW_CONFIG" => {
Some(Self::UnsupportedDatabaseFdwConfig)
}
"ERROR_RDBMS" => Some(Self::ErrorRdbms),
"SOURCE_SIZE_EXCEEDS_THRESHOLD" => Some(Self::SourceSizeExceedsThreshold),
"EXISTING_CONFLICTING_DATABASES" => {
Some(Self::ExistingConflictingDatabases)
}
"PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE" => {
Some(Self::ParallelImportInsufficientPrivilege)
}
_ => None,
}
}
}
}
/// The PrivateConnection resource is used to establish private connectivity
/// with the customer's network.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateConnection {
/// The name of the resource.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The create time of the resource.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The last update time of the resource.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// The resource labels for private connections to use to annotate any related
/// underlying resources such as Compute Engine VMs. An object containing a
/// list of "key": "value" pairs.
///
/// Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// The private connection display name.
#[prost(string, tag = "5")]
pub display_name: ::prost::alloc::string::String,
/// Output only. The state of the private connection.
#[prost(enumeration = "private_connection::State", tag = "6")]
pub state: i32,
/// Output only. The error details in case of state FAILED.
#[prost(message, optional, tag = "7")]
pub error: ::core::option::Option<super::super::super::rpc::Status>,
#[prost(oneof = "private_connection::Connectivity", tags = "100")]
pub connectivity: ::core::option::Option<private_connection::Connectivity>,
}
/// Nested message and enum types in `PrivateConnection`.
pub mod private_connection {
/// Private Connection state.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
/// The private connection is in creation state - creating resources.
Creating = 1,
/// The private connection has been created with all of its resources.
Created = 2,
/// The private connection creation has failed.
Failed = 3,
/// The private connection is being deleted.
Deleting = 4,
/// Delete request has failed, resource is in invalid state.
FailedToDelete = 5,
/// The private connection has been deleted.
Deleted = 6,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Creating => "CREATING",
State::Created => "CREATED",
State::Failed => "FAILED",
State::Deleting => "DELETING",
State::FailedToDelete => "FAILED_TO_DELETE",
State::Deleted => "DELETED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"CREATING" => Some(Self::Creating),
"CREATED" => Some(Self::Created),
"FAILED" => Some(Self::Failed),
"DELETING" => Some(Self::Deleting),
"FAILED_TO_DELETE" => Some(Self::FailedToDelete),
"DELETED" => Some(Self::Deleted),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Connectivity {
/// VPC peering configuration.
#[prost(message, tag = "100")]
VpcPeeringConfig(super::VpcPeeringConfig),
}
}
/// The VPC peering configuration is used to create VPC peering with the
/// consumer's VPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VpcPeeringConfig {
/// Required. Fully qualified name of the VPC that Database Migration Service
/// will peer to.
#[prost(string, tag = "1")]
pub vpc_name: ::prost::alloc::string::String,
/// Required. A free subnet for peering. (CIDR of /29)
#[prost(string, tag = "2")]
pub subnet: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NetworkArchitecture {
Unspecified = 0,
/// Instance is in Cloud SQL's old producer network architecture.
OldCsqlProducer = 1,
/// Instance is in Cloud SQL's new producer network architecture.
NewCsqlProducer = 2,
}
impl NetworkArchitecture {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
NetworkArchitecture::Unspecified => "NETWORK_ARCHITECTURE_UNSPECIFIED",
NetworkArchitecture::OldCsqlProducer => {
"NETWORK_ARCHITECTURE_OLD_CSQL_PRODUCER"
}
NetworkArchitecture::NewCsqlProducer => {
"NETWORK_ARCHITECTURE_NEW_CSQL_PRODUCER"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NETWORK_ARCHITECTURE_UNSPECIFIED" => Some(Self::Unspecified),
"NETWORK_ARCHITECTURE_OLD_CSQL_PRODUCER" => Some(Self::OldCsqlProducer),
"NETWORK_ARCHITECTURE_NEW_CSQL_PRODUCER" => Some(Self::NewCsqlProducer),
_ => None,
}
}
}
/// The database engine types.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DatabaseEngine {
/// The source database engine of the migration job is unknown.
Unspecified = 0,
/// The source engine is MySQL.
Mysql = 1,
/// The source engine is PostgreSQL.
Postgresql = 2,
/// The source engine is Oracle.
Oracle = 4,
}
impl DatabaseEngine {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DatabaseEngine::Unspecified => "DATABASE_ENGINE_UNSPECIFIED",
DatabaseEngine::Mysql => "MYSQL",
DatabaseEngine::Postgresql => "POSTGRESQL",
DatabaseEngine::Oracle => "ORACLE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DATABASE_ENGINE_UNSPECIFIED" => Some(Self::Unspecified),
"MYSQL" => Some(Self::Mysql),
"POSTGRESQL" => Some(Self::Postgresql),
"ORACLE" => Some(Self::Oracle),
_ => None,
}
}
}
/// The database providers.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DatabaseProvider {
/// The database provider is unknown.
Unspecified = 0,
/// CloudSQL runs the database.
Cloudsql = 1,
/// RDS runs the database.
Rds = 2,
/// Amazon Aurora.
Aurora = 3,
/// AlloyDB.
Alloydb = 4,
}
impl DatabaseProvider {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DatabaseProvider::Unspecified => "DATABASE_PROVIDER_UNSPECIFIED",
DatabaseProvider::Cloudsql => "CLOUDSQL",
DatabaseProvider::Rds => "RDS",
DatabaseProvider::Aurora => "AURORA",
DatabaseProvider::Alloydb => "ALLOYDB",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DATABASE_PROVIDER_UNSPECIFIED" => Some(Self::Unspecified),
"CLOUDSQL" => Some(Self::Cloudsql),
"RDS" => Some(Self::Rds),
"AURORA" => Some(Self::Aurora),
"ALLOYDB" => Some(Self::Alloydb),
_ => None,
}
}
}
/// The type and version of a source or destination database.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseEngineInfo {
/// Required. Engine type.
#[prost(enumeration = "DatabaseEngine", tag = "1")]
pub engine: i32,
/// Required. Engine named version, for example 12.c.1.
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
}
/// The main conversion workspace resource entity.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversionWorkspace {
/// Full name of the workspace resource, in the form of:
/// projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. The source engine details.
#[prost(message, optional, tag = "2")]
pub source: ::core::option::Option<DatabaseEngineInfo>,
/// Required. The destination engine details.
#[prost(message, optional, tag = "3")]
pub destination: ::core::option::Option<DatabaseEngineInfo>,
/// Optional. A generic list of settings for the workspace.
/// The settings are database pair dependant and can indicate default behavior
/// for the mapping rules engine or turn on or off specific features.
/// Such examples can be: convert_foreign_key_to_interleave=true,
/// skip_triggers=false, ignore_non_table_synonyms=true
#[prost(btree_map = "string, string", tag = "4")]
pub global_settings: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. Whether the workspace has uncommitted changes (changes which
/// were made after the workspace was committed).
#[prost(bool, tag = "5")]
pub has_uncommitted_changes: bool,
/// Output only. The latest commit ID.
#[prost(string, tag = "6")]
pub latest_commit_id: ::prost::alloc::string::String,
/// Output only. The timestamp when the workspace was committed.
#[prost(message, optional, tag = "7")]
pub latest_commit_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The timestamp when the workspace resource was created.
#[prost(message, optional, tag = "9")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The timestamp when the workspace resource was last updated.
#[prost(message, optional, tag = "10")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Optional. The display name for the workspace.
#[prost(string, tag = "11")]
pub display_name: ::prost::alloc::string::String,
}
/// Execution log of a background job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackgroundJobLogEntry {
/// The background job log entry ID.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The type of job that was executed.
#[prost(enumeration = "BackgroundJobType", tag = "2")]
pub job_type: i32,
/// The timestamp when the background job was started.
#[prost(message, optional, tag = "3")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// The timestamp when the background job was finished.
#[prost(message, optional, tag = "4")]
pub finish_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Job completion state, i.e. the final state after the job
/// completed.
#[prost(enumeration = "background_job_log_entry::JobCompletionState", tag = "5")]
pub completion_state: i32,
/// Output only. Job completion comment, such as how many entities were seeded,
/// how many warnings were found during conversion, and similar information.
#[prost(string, tag = "6")]
pub completion_comment: ::prost::alloc::string::String,
/// Output only. Whether the client requested the conversion workspace to be
/// committed after a successful completion of the job.
#[prost(bool, tag = "7")]
pub request_autocommit: bool,
#[prost(oneof = "background_job_log_entry::JobDetails", tags = "100, 101, 102, 103")]
pub job_details: ::core::option::Option<background_job_log_entry::JobDetails>,
}
/// Nested message and enum types in `BackgroundJobLogEntry`.
pub mod background_job_log_entry {
/// Details regarding a Seed background job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SeedJobDetails {
/// Output only. The connection profile which was used for the seed job.
#[prost(string, tag = "1")]
pub connection_profile: ::prost::alloc::string::String,
}
/// Details regarding an Import Rules background job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportRulesJobDetails {
/// Output only. File names used for the import rules job.
#[prost(string, repeated, tag = "1")]
pub files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Output only. The requested file format.
#[prost(enumeration = "super::ImportRulesFileFormat", tag = "2")]
pub file_format: i32,
}
/// Details regarding a Convert background job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConvertJobDetails {
/// Output only. AIP-160 based filter used to specify the entities to convert
#[prost(string, tag = "1")]
pub filter: ::prost::alloc::string::String,
}
/// Details regarding an Apply background job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplyJobDetails {
/// Output only. The connection profile which was used for the apply job.
#[prost(string, tag = "1")]
pub connection_profile: ::prost::alloc::string::String,
/// Output only. AIP-160 based filter used to specify the entities to apply
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
}
/// Final state after a job completes.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum JobCompletionState {
/// The status is not specified. This state is used when job is not yet
/// finished.
Unspecified = 0,
/// Success.
Succeeded = 1,
/// Error.
Failed = 2,
}
impl JobCompletionState {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
JobCompletionState::Unspecified => "JOB_COMPLETION_STATE_UNSPECIFIED",
JobCompletionState::Succeeded => "SUCCEEDED",
JobCompletionState::Failed => "FAILED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"JOB_COMPLETION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"SUCCEEDED" => Some(Self::Succeeded),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum JobDetails {
/// Output only. Seed job details.
#[prost(message, tag = "100")]
SeedJobDetails(SeedJobDetails),
/// Output only. Import rules job details.
#[prost(message, tag = "101")]
ImportRulesJobDetails(ImportRulesJobDetails),
/// Output only. Convert job details.
#[prost(message, tag = "102")]
ConvertJobDetails(ConvertJobDetails),
/// Output only. Apply job details.
#[prost(message, tag = "103")]
ApplyJobDetails(ApplyJobDetails),
}
}
/// A filter defining the entities that a mapping rule should be applied to.
/// When more than one field is specified, the rule is applied only to
/// entities which match all the fields.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MappingRuleFilter {
/// Optional. The rule should be applied to entities whose parent entity
/// (fully qualified name) matches the given value.
/// For example, if the rule applies to a table entity, the expected value
/// should be a schema (schema). If the rule applies to a column or index
/// entity, the expected value can be either a schema (schema) or a table
/// (schema.table)
#[prost(string, tag = "1")]
pub parent_entity: ::prost::alloc::string::String,
/// Optional. The rule should be applied to entities whose non-qualified name
/// starts with the given prefix.
#[prost(string, tag = "2")]
pub entity_name_prefix: ::prost::alloc::string::String,
/// Optional. The rule should be applied to entities whose non-qualified name
/// ends with the given suffix.
#[prost(string, tag = "3")]
pub entity_name_suffix: ::prost::alloc::string::String,
/// Optional. The rule should be applied to entities whose non-qualified name
/// contains the given string.
#[prost(string, tag = "4")]
pub entity_name_contains: ::prost::alloc::string::String,
/// Optional. The rule should be applied to specific entities defined by their
/// fully qualified names.
#[prost(string, repeated, tag = "5")]
pub entities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Definition of a transformation that is to be applied to a group of entities
/// in the source schema. Several such transformations can be applied to an
/// entity sequentially to define the corresponding entity in the target schema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MappingRule {
/// Full name of the mapping rule resource, in the form of:
/// projects/{project}/locations/{location}/conversionWorkspaces/{set}/mappingRule/{rule}.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. A human readable name
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
/// Optional. The mapping rule state
#[prost(enumeration = "mapping_rule::State", tag = "3")]
pub state: i32,
/// Required. The rule scope
#[prost(enumeration = "DatabaseEntityType", tag = "4")]
pub rule_scope: i32,
/// Required. The rule filter
#[prost(message, optional, tag = "5")]
pub filter: ::core::option::Option<MappingRuleFilter>,
/// Required. The order in which the rule is applied. Lower order rules are
/// applied before higher value rules so they may end up being overridden.
#[prost(int64, tag = "6")]
pub rule_order: i64,
/// Output only. The revision ID of the mapping rule.
/// A new revision is committed whenever the mapping rule is changed in any
/// way. The format is an 8-character hexadecimal string.
#[prost(string, tag = "7")]
pub revision_id: ::prost::alloc::string::String,
/// Output only. The timestamp that the revision was created.
#[prost(message, optional, tag = "8")]
pub revision_create_time: ::core::option::Option<::prost_types::Timestamp>,
/// The rule specific details.
#[prost(
oneof = "mapping_rule::Details",
tags = "102, 103, 105, 106, 107, 108, 114, 115, 116, 117, 118"
)]
pub details: ::core::option::Option<mapping_rule::Details>,
}
/// Nested message and enum types in `MappingRule`.
pub mod mapping_rule {
/// The current mapping rule state such as enabled, disabled or deleted.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// The state of the mapping rule is unknown.
Unspecified = 0,
/// The rule is enabled.
Enabled = 1,
/// The rule is disabled.
Disabled = 2,
/// The rule is logically deleted.
Deleted = 3,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Enabled => "ENABLED",
State::Disabled => "DISABLED",
State::Deleted => "DELETED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"ENABLED" => Some(Self::Enabled),
"DISABLED" => Some(Self::Disabled),
"DELETED" => Some(Self::Deleted),
_ => None,
}
}
}
/// The rule specific details.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Details {
/// Optional. Rule to specify how a single entity should be renamed.
#[prost(message, tag = "102")]
SingleEntityRename(super::SingleEntityRename),
/// Optional. Rule to specify how multiple entities should be renamed.
#[prost(message, tag = "103")]
MultiEntityRename(super::MultiEntityRename),
/// Optional. Rule to specify how multiple entities should be relocated into
/// a different schema.
#[prost(message, tag = "105")]
EntityMove(super::EntityMove),
/// Optional. Rule to specify how a single column is converted.
#[prost(message, tag = "106")]
SingleColumnChange(super::SingleColumnChange),
/// Optional. Rule to specify how multiple columns should be converted to a
/// different data type.
#[prost(message, tag = "107")]
MultiColumnDataTypeChange(super::MultiColumnDatatypeChange),
/// Optional. Rule to specify how the data contained in a column should be
/// transformed (such as trimmed, rounded, etc) provided that the data meets
/// certain criteria.
#[prost(message, tag = "108")]
ConditionalColumnSetValue(super::ConditionalColumnSetValue),
/// Optional. Rule to specify how multiple tables should be converted with an
/// additional rowid column.
#[prost(message, tag = "114")]
ConvertRowidColumn(super::ConvertRowIdToColumn),
/// Optional. Rule to specify the primary key for a table
#[prost(message, tag = "115")]
SetTablePrimaryKey(super::SetTablePrimaryKey),
/// Optional. Rule to specify how a single package is converted.
#[prost(message, tag = "116")]
SinglePackageChange(super::SinglePackageChange),
/// Optional. Rule to change the sql code for an entity, for example,
/// function, procedure.
#[prost(message, tag = "117")]
SourceSqlChange(super::SourceSqlChange),
/// Optional. Rule to specify the list of columns to include or exclude from
/// a table.
#[prost(message, tag = "118")]
FilterTableColumns(super::FilterTableColumns),
}
}
/// Options to configure rule type SingleEntityRename.
/// The rule is used to rename an entity.
///
/// The rule filter field can refer to only one entity.
///
/// The rule scope can be one of: Database, Schema, Table, Column, Constraint,
/// Index, View, Function, Stored Procedure, Materialized View, Sequence, UDT,
/// Synonym
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SingleEntityRename {
/// Required. The new name of the destination entity
#[prost(string, tag = "1")]
pub new_name: ::prost::alloc::string::String,
}
/// Options to configure rule type MultiEntityRename.
/// The rule is used to rename multiple entities.
///
/// The rule filter field can refer to one or more entities.
///
/// The rule scope can be one of: Database, Schema, Table, Column, Constraint,
/// Index, View, Function, Stored Procedure, Materialized View, Sequence, UDT
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiEntityRename {
/// Optional. The pattern used to generate the new entity's name. This pattern
/// must include the characters '{name}', which will be replaced with the name
/// of the original entity. For example, the pattern 't_{name}' for an entity
/// name jobs would be converted to 't_jobs'.
///
/// If unspecified, the default value for this field is '{name}'
#[prost(string, tag = "1")]
pub new_name_pattern: ::prost::alloc::string::String,
/// Optional. Additional transformation that can be done on the source entity
/// name before it is being used by the new_name_pattern, for example lower
/// case. If no transformation is desired, use NO_TRANSFORMATION
#[prost(enumeration = "EntityNameTransformation", tag = "2")]
pub source_name_transformation: i32,
}
/// Options to configure rule type EntityMove.
/// The rule is used to move an entity to a new schema.
///
/// The rule filter field can refer to one or more entities.
///
/// The rule scope can be one of: Table, Column, Constraint, Index, View,
/// Function, Stored Procedure, Materialized View, Sequence, UDT
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityMove {
/// Required. The new schema
#[prost(string, tag = "1")]
pub new_schema: ::prost::alloc::string::String,
}
/// Options to configure rule type SingleColumnChange.
/// The rule is used to change the properties of a column.
///
/// The rule filter field can refer to one entity.
///
/// The rule scope can be one of: Column.
///
/// When using this rule, if a field is not specified than the destination
/// column's configuration will be the same as the one in the source column..
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SingleColumnChange {
/// Optional. Column data type name.
#[prost(string, tag = "1")]
pub data_type: ::prost::alloc::string::String,
/// Optional. Charset override - instead of table level charset.
#[prost(string, tag = "2")]
pub charset: ::prost::alloc::string::String,
/// Optional. Collation override - instead of table level collation.
#[prost(string, tag = "3")]
pub collation: ::prost::alloc::string::String,
/// Optional. Column length - e.g. 50 as in varchar (50) - when relevant.
#[prost(int64, tag = "4")]
pub length: i64,
/// Optional. Column precision - e.g. 8 as in double (8,2) - when relevant.
#[prost(int32, tag = "5")]
pub precision: i32,
/// Optional. Column scale - e.g. 2 as in double (8,2) - when relevant.
#[prost(int32, tag = "6")]
pub scale: i32,
/// Optional. Column fractional seconds precision - e.g. 2 as in timestamp (2)
/// - when relevant.
#[prost(int32, tag = "7")]
pub fractional_seconds_precision: i32,
/// Optional. Is the column of array type.
#[prost(bool, tag = "8")]
pub array: bool,
/// Optional. The length of the array, only relevant if the column type is an
/// array.
#[prost(int32, tag = "9")]
pub array_length: i32,
/// Optional. Is the column nullable.
#[prost(bool, tag = "10")]
pub nullable: bool,
/// Optional. Is the column auto-generated/identity.
#[prost(bool, tag = "11")]
pub auto_generated: bool,
/// Optional. Is the column a UDT (User-defined Type).
#[prost(bool, tag = "12")]
pub udt: bool,
/// Optional. Custom engine specific features.
#[prost(message, optional, tag = "13")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
/// Optional. Specifies the list of values allowed in the column.
#[prost(string, repeated, tag = "14")]
pub set_values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. Comment associated with the column.
#[prost(string, tag = "15")]
pub comment: ::prost::alloc::string::String,
}
/// Options to configure rule type MultiColumnDatatypeChange.
/// The rule is used to change the data type and associated properties of
/// multiple columns at once.
///
/// The rule filter field can refer to one or more entities.
///
/// The rule scope can be one of:Column.
///
/// This rule requires additional filters to be specified beyond the basic rule
/// filter field, which is the source data type, but the rule supports additional
/// filtering capabilities such as the minimum and maximum field length. All
/// additional filters which are specified are required to be met in order for
/// the rule to be applied (logical AND between the fields).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiColumnDatatypeChange {
/// Required. Filter on source data type.
#[prost(string, tag = "1")]
pub source_data_type_filter: ::prost::alloc::string::String,
/// Required. New data type.
#[prost(string, tag = "2")]
pub new_data_type: ::prost::alloc::string::String,
/// Optional. Column length - e.g. varchar (50) - if not specified and relevant
/// uses the source column length.
#[prost(int64, tag = "3")]
pub override_length: i64,
/// Optional. Column scale - when relevant - if not specified and relevant
/// uses the source column scale.
#[prost(int32, tag = "4")]
pub override_scale: i32,
/// Optional. Column precision - when relevant - if not specified and relevant
/// uses the source column precision.
#[prost(int32, tag = "5")]
pub override_precision: i32,
/// Optional. Column fractional seconds precision - used only for timestamp
/// based datatypes - if not specified and relevant uses the source column
/// fractional seconds precision.
#[prost(int32, tag = "6")]
pub override_fractional_seconds_precision: i32,
/// Optional. Custom engine specific features.
#[prost(message, optional, tag = "7")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
/// Filter on source column parameters.
#[prost(oneof = "multi_column_datatype_change::SourceFilter", tags = "100, 101")]
pub source_filter: ::core::option::Option<
multi_column_datatype_change::SourceFilter,
>,
}
/// Nested message and enum types in `MultiColumnDatatypeChange`.
pub mod multi_column_datatype_change {
/// Filter on source column parameters.
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum SourceFilter {
/// Optional. Filter for text-based data types like varchar.
#[prost(message, tag = "100")]
SourceTextFilter(super::SourceTextFilter),
/// Optional. Filter for fixed point number data types such as
/// NUMERIC/NUMBER.
#[prost(message, tag = "101")]
SourceNumericFilter(super::SourceNumericFilter),
}
}
/// Filter for text-based data types like varchar.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SourceTextFilter {
/// Optional. The filter will match columns with length greater than or equal
/// to this number.
#[prost(int64, tag = "1")]
pub source_min_length_filter: i64,
/// Optional. The filter will match columns with length smaller than or equal
/// to this number.
#[prost(int64, tag = "2")]
pub source_max_length_filter: i64,
}
/// Filter for fixed point number data types such as NUMERIC/NUMBER
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SourceNumericFilter {
/// Optional. The filter will match columns with scale greater than or equal to
/// this number.
#[prost(int32, tag = "1")]
pub source_min_scale_filter: i32,
/// Optional. The filter will match columns with scale smaller than or equal to
/// this number.
#[prost(int32, tag = "2")]
pub source_max_scale_filter: i32,
/// Optional. The filter will match columns with precision greater than or
/// equal to this number.
#[prost(int32, tag = "3")]
pub source_min_precision_filter: i32,
/// Optional. The filter will match columns with precision smaller than or
/// equal to this number.
#[prost(int32, tag = "4")]
pub source_max_precision_filter: i32,
/// Required. Enum to set the option defining the datatypes numeric filter has
/// to be applied to
#[prost(enumeration = "NumericFilterOption", tag = "5")]
pub numeric_filter_option: i32,
}
/// Options to configure rule type ConditionalColumnSetValue.
/// The rule is used to transform the data which is being replicated/migrated.
///
/// The rule filter field can refer to one or more entities.
///
/// The rule scope can be one of: Column.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConditionalColumnSetValue {
/// Required. Description of data transformation during migration.
#[prost(message, optional, tag = "1")]
pub value_transformation: ::core::option::Option<ValueTransformation>,
/// Optional. Custom engine specific features.
#[prost(message, optional, tag = "2")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
#[prost(oneof = "conditional_column_set_value::SourceFilter", tags = "100, 101")]
pub source_filter: ::core::option::Option<
conditional_column_set_value::SourceFilter,
>,
}
/// Nested message and enum types in `ConditionalColumnSetValue`.
pub mod conditional_column_set_value {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum SourceFilter {
/// Optional. Optional filter on source column length. Used for text based
/// data types like varchar.
#[prost(message, tag = "100")]
SourceTextFilter(super::SourceTextFilter),
/// Optional. Optional filter on source column precision and scale. Used for
/// fixed point numbers such as NUMERIC/NUMBER data types.
#[prost(message, tag = "101")]
SourceNumericFilter(super::SourceNumericFilter),
}
}
/// Description of data transformation during migration as part of the
/// ConditionalColumnSetValue.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValueTransformation {
#[prost(oneof = "value_transformation::Filter", tags = "100, 101, 102, 103")]
pub filter: ::core::option::Option<value_transformation::Filter>,
#[prost(
oneof = "value_transformation::Action",
tags = "200, 201, 202, 203, 204, 205"
)]
pub action: ::core::option::Option<value_transformation::Action>,
}
/// Nested message and enum types in `ValueTransformation`.
pub mod value_transformation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Filter {
/// Optional. Value is null
#[prost(message, tag = "100")]
IsNull(()),
/// Optional. Value is found in the specified list.
#[prost(message, tag = "101")]
ValueList(super::ValueListFilter),
/// Optional. Filter on relation between source value and compare value of
/// type integer.
#[prost(message, tag = "102")]
IntComparison(super::IntComparisonFilter),
/// Optional. Filter on relation between source value and compare value of
/// type double.
#[prost(message, tag = "103")]
DoubleComparison(super::DoubleComparisonFilter),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
/// Optional. Set to null
#[prost(message, tag = "200")]
AssignNull(()),
/// Optional. Set to a specific value (value is converted to fit the target
/// data type)
#[prost(message, tag = "201")]
AssignSpecificValue(super::AssignSpecificValue),
/// Optional. Set to min_value - if integer or numeric, will use
/// int.minvalue, etc
#[prost(message, tag = "202")]
AssignMinValue(()),
/// Optional. Set to max_value - if integer or numeric, will use
/// int.maxvalue, etc
#[prost(message, tag = "203")]
AssignMaxValue(()),
/// Optional. Allows the data to change scale
#[prost(message, tag = "204")]
RoundScale(super::RoundToScale),
/// Optional. Applies a hash function on the data
#[prost(message, tag = "205")]
ApplyHash(super::ApplyHash),
}
}
/// Options to configure rule type ConvertROWIDToColumn.
/// The rule is used to add column rowid to destination tables based on an Oracle
/// rowid function/property.
///
/// The rule filter field can refer to one or more entities.
///
/// The rule scope can be one of: Table.
///
/// This rule requires additional filter to be specified beyond the basic rule
/// filter field, which is whether or not to work on tables which already have a
/// primary key defined.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ConvertRowIdToColumn {
/// Required. Only work on tables without primary key defined
#[prost(bool, tag = "1")]
pub only_if_no_primary_key: bool,
}
/// Options to configure rule type SetTablePrimaryKey.
/// The rule is used to specify the columns and name to configure/alter the
/// primary key of a table.
///
/// The rule filter field can refer to one entity.
///
/// The rule scope can be one of: Table.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetTablePrimaryKey {
/// Required. List of column names for the primary key
#[prost(string, repeated, tag = "1")]
pub primary_key_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. Name for the primary key
#[prost(string, tag = "2")]
pub primary_key: ::prost::alloc::string::String,
}
/// Options to configure rule type SinglePackageChange.
/// The rule is used to alter the sql code for a package entities.
///
/// The rule filter field can refer to one entity.
///
/// The rule scope can be: Package
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SinglePackageChange {
/// Optional. Sql code for package description
#[prost(string, tag = "1")]
pub package_description: ::prost::alloc::string::String,
/// Optional. Sql code for package body
#[prost(string, tag = "2")]
pub package_body: ::prost::alloc::string::String,
}
/// Options to configure rule type SourceSqlChange.
/// The rule is used to alter the sql code for database entities.
///
/// The rule filter field can refer to one entity.
///
/// The rule scope can be: StoredProcedure, Function, Trigger, View
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceSqlChange {
/// Required. Sql code for source (stored procedure, function, trigger or view)
#[prost(string, tag = "1")]
pub sql_code: ::prost::alloc::string::String,
}
/// Options to configure rule type FilterTableColumns.
/// The rule is used to filter the list of columns to include or exclude from a
/// table.
///
/// The rule filter field can refer to one entity.
///
/// The rule scope can be: Table
///
/// Only one of the two lists can be specified for the rule.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FilterTableColumns {
/// Optional. List of columns to be included for a particular table.
#[prost(string, repeated, tag = "1")]
pub include_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. List of columns to be excluded for a particular table.
#[prost(string, repeated, tag = "2")]
pub exclude_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// A list of values to filter by in ConditionalColumnSetValue
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValueListFilter {
/// Required. Indicates whether the filter matches rows with values that are
/// present in the list or those with values not present in it.
#[prost(enumeration = "ValuePresentInList", tag = "1")]
pub value_present_list: i32,
/// Required. The list to be used to filter by
#[prost(string, repeated, tag = "2")]
pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Required. Whether to ignore case when filtering by values. Defaults to
/// false
#[prost(bool, tag = "3")]
pub ignore_case: bool,
}
/// Filter based on relation between source value and compare value of type
/// integer in ConditionalColumnSetValue
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct IntComparisonFilter {
/// Required. Relation between source value and compare value
#[prost(enumeration = "ValueComparison", tag = "1")]
pub value_comparison: i32,
/// Required. Integer compare value to be used
#[prost(int64, tag = "2")]
pub value: i64,
}
/// Filter based on relation between source
/// value and compare value of type double in ConditionalColumnSetValue
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DoubleComparisonFilter {
/// Required. Relation between source value and compare value
#[prost(enumeration = "ValueComparison", tag = "1")]
pub value_comparison: i32,
/// Required. Double compare value to be used
#[prost(double, tag = "2")]
pub value: f64,
}
/// Set to a specific value (value is converted to fit the target data type)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssignSpecificValue {
/// Required. Specific value to be assigned
#[prost(string, tag = "1")]
pub value: ::prost::alloc::string::String,
}
/// Apply a hash function on the value.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ApplyHash {
#[prost(oneof = "apply_hash::HashFunction", tags = "100")]
pub hash_function: ::core::option::Option<apply_hash::HashFunction>,
}
/// Nested message and enum types in `ApplyHash`.
pub mod apply_hash {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum HashFunction {
/// Optional. Generate UUID from the data's byte array
#[prost(message, tag = "100")]
UuidFromBytes(()),
}
}
/// This allows the data to change scale, for example if the source is 2 digits
/// after the decimal point, specify round to scale value = 2. If for example the
/// value needs to be converted to an integer, use round to scale value = 0.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RoundToScale {
/// Required. Scale value to be used
#[prost(int32, tag = "1")]
pub scale: i32,
}
/// The base entity type for all the database related entities.
/// The message contains the entity name, the name of its parent, the entity
/// type, and the specific details per entity type.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseEntity {
/// The short name (e.g. table name) of the entity.
#[prost(string, tag = "1")]
pub short_name: ::prost::alloc::string::String,
/// The full name of the parent entity (e.g. schema name).
#[prost(string, tag = "2")]
pub parent_entity: ::prost::alloc::string::String,
/// The type of tree the entity belongs to.
#[prost(enumeration = "database_entity::TreeType", tag = "3")]
pub tree: i32,
/// The type of the database entity (table, view, index, ...).
#[prost(enumeration = "DatabaseEntityType", tag = "4")]
pub entity_type: i32,
/// Details about entity mappings.
/// For source tree entities, this holds the draft entities which were
/// generated by the mapping rules.
/// For draft tree entities, this holds the source entities which were
/// converted to form the draft entity.
/// Destination entities will have no mapping details.
#[prost(message, repeated, tag = "5")]
pub mappings: ::prost::alloc::vec::Vec<EntityMapping>,
/// Details about the entity DDL script. Multiple DDL scripts are provided for
/// child entities such as a table entity will have one DDL for the table with
/// additional DDLs for each index, constraint and such.
#[prost(message, repeated, tag = "6")]
pub entity_ddl: ::prost::alloc::vec::Vec<EntityDdl>,
/// Details about the various issues found for the entity.
#[prost(message, repeated, tag = "7")]
pub issues: ::prost::alloc::vec::Vec<EntityIssue>,
/// The specific body for each entity type.
#[prost(
oneof = "database_entity::EntityBody",
tags = "101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111"
)]
pub entity_body: ::core::option::Option<database_entity::EntityBody>,
}
/// Nested message and enum types in `DatabaseEntity`.
pub mod database_entity {
/// The type of database entities tree.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum TreeType {
/// Tree type unspecified.
Unspecified = 0,
/// Tree of entities loaded from a source database.
Source = 1,
/// Tree of entities converted from the source tree using the mapping rules.
Draft = 2,
/// Tree of entities observed on the destination database.
Destination = 3,
}
impl TreeType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
TreeType::Unspecified => "TREE_TYPE_UNSPECIFIED",
TreeType::Source => "SOURCE",
TreeType::Draft => "DRAFT",
TreeType::Destination => "DESTINATION",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TREE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SOURCE" => Some(Self::Source),
"DRAFT" => Some(Self::Draft),
"DESTINATION" => Some(Self::Destination),
_ => None,
}
}
}
/// The specific body for each entity type.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EntityBody {
/// Database.
#[prost(message, tag = "101")]
Database(super::DatabaseInstanceEntity),
/// Schema.
#[prost(message, tag = "102")]
Schema(super::SchemaEntity),
/// Table.
#[prost(message, tag = "103")]
Table(super::TableEntity),
/// View.
#[prost(message, tag = "104")]
View(super::ViewEntity),
/// Sequence.
#[prost(message, tag = "105")]
Sequence(super::SequenceEntity),
/// Stored procedure.
#[prost(message, tag = "106")]
StoredProcedure(super::StoredProcedureEntity),
/// Function.
#[prost(message, tag = "107")]
DatabaseFunction(super::FunctionEntity),
/// Synonym.
#[prost(message, tag = "108")]
Synonym(super::SynonymEntity),
/// Package.
#[prost(message, tag = "109")]
DatabasePackage(super::PackageEntity),
/// UDT.
#[prost(message, tag = "110")]
Udt(super::UdtEntity),
/// Materialized view.
#[prost(message, tag = "111")]
MaterializedView(super::MaterializedViewEntity),
}
}
/// DatabaseInstance acts as a parent entity to other database entities.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseInstanceEntity {
/// Custom engine specific features.
#[prost(message, optional, tag = "1")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
}
/// Schema typically has no parent entity, but can have a parent entity
/// DatabaseInstance (for database engines which support it). For some database
/// engines, the terms schema and user can be used interchangeably when they
/// refer to a namespace or a collection of other database entities. Can store
/// additional information which is schema specific.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SchemaEntity {
/// Custom engine specific features.
#[prost(message, optional, tag = "1")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
}
/// Table's parent is a schema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableEntity {
/// Table columns.
#[prost(message, repeated, tag = "1")]
pub columns: ::prost::alloc::vec::Vec<ColumnEntity>,
/// Table constraints.
#[prost(message, repeated, tag = "2")]
pub constraints: ::prost::alloc::vec::Vec<ConstraintEntity>,
/// Table indices.
#[prost(message, repeated, tag = "3")]
pub indices: ::prost::alloc::vec::Vec<IndexEntity>,
/// Table triggers.
#[prost(message, repeated, tag = "4")]
pub triggers: ::prost::alloc::vec::Vec<TriggerEntity>,
/// Custom engine specific features.
#[prost(message, optional, tag = "5")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
/// Comment associated with the table.
#[prost(string, tag = "6")]
pub comment: ::prost::alloc::string::String,
}
/// Column is not used as an independent entity, it is retrieved as part of a
/// Table entity.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ColumnEntity {
/// Column name.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Column data type.
#[prost(string, tag = "2")]
pub data_type: ::prost::alloc::string::String,
/// Charset override - instead of table level charset.
#[prost(string, tag = "3")]
pub charset: ::prost::alloc::string::String,
/// Collation override - instead of table level collation.
#[prost(string, tag = "4")]
pub collation: ::prost::alloc::string::String,
/// Column length - e.g. varchar (50).
#[prost(int64, tag = "5")]
pub length: i64,
/// Column precision - when relevant.
#[prost(int32, tag = "6")]
pub precision: i32,
/// Column scale - when relevant.
#[prost(int32, tag = "7")]
pub scale: i32,
/// Column fractional second precision - used for timestamp based datatypes.
#[prost(int32, tag = "8")]
pub fractional_seconds_precision: i32,
/// Is the column of array type.
#[prost(bool, tag = "9")]
pub array: bool,
/// If the column is array, of which length.
#[prost(int32, tag = "10")]
pub array_length: i32,
/// Is the column nullable.
#[prost(bool, tag = "11")]
pub nullable: bool,
/// Is the column auto-generated/identity.
#[prost(bool, tag = "12")]
pub auto_generated: bool,
/// Is the column a UDT.
#[prost(bool, tag = "13")]
pub udt: bool,
/// Custom engine specific features.
#[prost(message, optional, tag = "14")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
/// Specifies the list of values allowed in the column.
/// Only used for set data type.
#[prost(string, repeated, tag = "15")]
pub set_values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Comment associated with the column.
#[prost(string, tag = "16")]
pub comment: ::prost::alloc::string::String,
/// Column order in the table.
#[prost(int32, tag = "17")]
pub ordinal_position: i32,
/// Default value of the column.
#[prost(string, tag = "18")]
pub default_value: ::prost::alloc::string::String,
}
/// Constraint is not used as an independent entity, it is retrieved
/// as part of another entity such as Table or View.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConstraintEntity {
/// The name of the table constraint.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Type of constraint, for example unique, primary key, foreign key (currently
/// only primary key is supported).
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
/// Table columns used as part of the Constraint, for example primary key
/// constraint should list the columns which constitutes the key.
#[prost(string, repeated, tag = "3")]
pub table_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Custom engine specific features.
#[prost(message, optional, tag = "4")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
/// Reference columns which may be associated with the constraint. For example,
/// if the constraint is a FOREIGN_KEY, this represents the list of full names
/// of referenced columns by the foreign key.
#[prost(string, repeated, tag = "5")]
pub reference_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Reference table which may be associated with the constraint. For example,
/// if the constraint is a FOREIGN_KEY, this represents the list of full name
/// of the referenced table by the foreign key.
#[prost(string, tag = "6")]
pub reference_table: ::prost::alloc::string::String,
/// Table which is associated with the constraint. In case the constraint
/// is defined on a table, this field is left empty as this information is
/// stored in parent_name. However, if constraint is defined on a view, this
/// field stores the table name on which the view is defined.
#[prost(string, tag = "7")]
pub table_name: ::prost::alloc::string::String,
}
/// Index is not used as an independent entity, it is retrieved as part of a
/// Table entity.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IndexEntity {
/// The name of the index.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Type of index, for example B-TREE.
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
/// Table columns used as part of the Index, for example B-TREE index should
/// list the columns which constitutes the index.
#[prost(string, repeated, tag = "3")]
pub table_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Boolean value indicating whether the index is unique.
#[prost(bool, tag = "4")]
pub unique: bool,
/// Custom engine specific features.
#[prost(message, optional, tag = "5")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
}
/// Trigger is not used as an independent entity, it is retrieved as part of a
/// Table entity.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TriggerEntity {
/// The name of the trigger.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The DML, DDL, or database events that fire the trigger, for example
/// INSERT, UPDATE.
#[prost(string, repeated, tag = "2")]
pub triggering_events: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Indicates when the trigger fires, for example BEFORE STATEMENT, AFTER EACH
/// ROW.
#[prost(string, tag = "3")]
pub trigger_type: ::prost::alloc::string::String,
/// The SQL code which creates the trigger.
#[prost(string, tag = "4")]
pub sql_code: ::prost::alloc::string::String,
/// Custom engine specific features.
#[prost(message, optional, tag = "5")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
}
/// View's parent is a schema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ViewEntity {
/// The SQL code which creates the view.
#[prost(string, tag = "1")]
pub sql_code: ::prost::alloc::string::String,
/// Custom engine specific features.
#[prost(message, optional, tag = "2")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
/// View constraints.
#[prost(message, repeated, tag = "3")]
pub constraints: ::prost::alloc::vec::Vec<ConstraintEntity>,
}
/// Sequence's parent is a schema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SequenceEntity {
/// Increment value for the sequence.
#[prost(int64, tag = "1")]
pub increment: i64,
/// Start number for the sequence represented as bytes to accommodate large.
/// numbers
#[prost(bytes = "bytes", tag = "2")]
pub start_value: ::prost::bytes::Bytes,
/// Maximum number for the sequence represented as bytes to accommodate large.
/// numbers
#[prost(bytes = "bytes", tag = "3")]
pub max_value: ::prost::bytes::Bytes,
/// Minimum number for the sequence represented as bytes to accommodate large.
/// numbers
#[prost(bytes = "bytes", tag = "4")]
pub min_value: ::prost::bytes::Bytes,
/// Indicates whether the sequence value should cycle through.
#[prost(bool, tag = "5")]
pub cycle: bool,
/// Indicates number of entries to cache / precreate.
#[prost(int64, tag = "6")]
pub cache: i64,
/// Custom engine specific features.
#[prost(message, optional, tag = "7")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
}
/// Stored procedure's parent is a schema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StoredProcedureEntity {
/// The SQL code which creates the stored procedure.
#[prost(string, tag = "1")]
pub sql_code: ::prost::alloc::string::String,
/// Custom engine specific features.
#[prost(message, optional, tag = "2")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
}
/// Function's parent is a schema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionEntity {
/// The SQL code which creates the function.
#[prost(string, tag = "1")]
pub sql_code: ::prost::alloc::string::String,
/// Custom engine specific features.
#[prost(message, optional, tag = "2")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
}
/// MaterializedView's parent is a schema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaterializedViewEntity {
/// The SQL code which creates the view.
#[prost(string, tag = "1")]
pub sql_code: ::prost::alloc::string::String,
/// Custom engine specific features.
#[prost(message, optional, tag = "2")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
}
/// Synonym's parent is a schema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SynonymEntity {
/// The name of the entity for which the synonym is being created (the source).
#[prost(string, tag = "1")]
pub source_entity: ::prost::alloc::string::String,
/// The type of the entity for which the synonym is being created
/// (usually a table or a sequence).
#[prost(enumeration = "DatabaseEntityType", tag = "2")]
pub source_type: i32,
/// Custom engine specific features.
#[prost(message, optional, tag = "3")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
}
/// Package's parent is a schema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PackageEntity {
/// The SQL code which creates the package.
#[prost(string, tag = "1")]
pub package_sql_code: ::prost::alloc::string::String,
/// The SQL code which creates the package body. If the package specification
/// has cursors or subprograms, then the package body is mandatory.
#[prost(string, tag = "2")]
pub package_body: ::prost::alloc::string::String,
/// Custom engine specific features.
#[prost(message, optional, tag = "3")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
}
/// UDT's parent is a schema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UdtEntity {
/// The SQL code which creates the udt.
#[prost(string, tag = "1")]
pub udt_sql_code: ::prost::alloc::string::String,
/// The SQL code which creates the udt body.
#[prost(string, tag = "2")]
pub udt_body: ::prost::alloc::string::String,
/// Custom engine specific features.
#[prost(message, optional, tag = "3")]
pub custom_features: ::core::option::Option<::prost_types::Struct>,
}
/// Details of the mappings of a database entity.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityMapping {
/// Source entity full name.
/// The source entity can also be a column, index or constraint using the
/// same naming notation schema.table.column.
#[prost(string, tag = "1")]
pub source_entity: ::prost::alloc::string::String,
/// Target entity full name.
/// The draft entity can also include a column, index or constraint using the
/// same naming notation schema.table.column.
#[prost(string, tag = "2")]
pub draft_entity: ::prost::alloc::string::String,
/// Type of source entity.
#[prost(enumeration = "DatabaseEntityType", tag = "4")]
pub source_type: i32,
/// Type of draft entity.
#[prost(enumeration = "DatabaseEntityType", tag = "5")]
pub draft_type: i32,
/// Entity mapping log entries.
/// Multiple rules can be effective and contribute changes to a converted
/// entity, such as a rule can handle the entity name, another rule can handle
/// an entity type. In addition, rules which did not change the entity are also
/// logged along with the reason preventing them to do so.
#[prost(message, repeated, tag = "3")]
pub mapping_log: ::prost::alloc::vec::Vec<EntityMappingLogEntry>,
}
/// A single record of a rule which was used for a mapping.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityMappingLogEntry {
/// Which rule caused this log entry.
#[prost(string, tag = "1")]
pub rule_id: ::prost::alloc::string::String,
/// Rule revision ID.
#[prost(string, tag = "2")]
pub rule_revision_id: ::prost::alloc::string::String,
/// Comment.
#[prost(string, tag = "3")]
pub mapping_comment: ::prost::alloc::string::String,
}
/// A single DDL statement for a specific entity
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityDdl {
/// Type of DDL (Create, Alter).
#[prost(string, tag = "1")]
pub ddl_type: ::prost::alloc::string::String,
/// The name of the database entity the ddl refers to.
#[prost(string, tag = "2")]
pub entity: ::prost::alloc::string::String,
/// The actual ddl code.
#[prost(string, tag = "3")]
pub ddl: ::prost::alloc::string::String,
/// The entity type (if the DDL is for a sub entity).
#[prost(enumeration = "DatabaseEntityType", tag = "4")]
pub entity_type: i32,
/// EntityIssues found for this ddl.
#[prost(string, repeated, tag = "100")]
pub issue_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Issue related to the entity.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityIssue {
/// Unique Issue ID.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The type of the issue.
#[prost(enumeration = "entity_issue::IssueType", tag = "2")]
pub r#type: i32,
/// Severity of the issue
#[prost(enumeration = "entity_issue::IssueSeverity", tag = "3")]
pub severity: i32,
/// Issue detailed message
#[prost(string, tag = "4")]
pub message: ::prost::alloc::string::String,
/// Error/Warning code
#[prost(string, tag = "5")]
pub code: ::prost::alloc::string::String,
/// The ddl which caused the issue, if relevant.
#[prost(string, optional, tag = "6")]
pub ddl: ::core::option::Option<::prost::alloc::string::String>,
/// The position of the issue found, if relevant.
#[prost(message, optional, tag = "7")]
pub position: ::core::option::Option<entity_issue::Position>,
/// The entity type (if the DDL is for a sub entity).
#[prost(enumeration = "DatabaseEntityType", tag = "8")]
pub entity_type: i32,
}
/// Nested message and enum types in `EntityIssue`.
pub mod entity_issue {
/// Issue position.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Position {
/// Issue line number
#[prost(int32, tag = "1")]
pub line: i32,
/// Issue column number
#[prost(int32, tag = "2")]
pub column: i32,
/// Issue offset
#[prost(int32, tag = "3")]
pub offset: i32,
/// Issue length
#[prost(int32, tag = "4")]
pub length: i32,
}
/// Type of issue.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum IssueType {
/// Unspecified issue type.
Unspecified = 0,
/// Issue originated from the DDL
Ddl = 1,
/// Issue originated during the apply process
Apply = 2,
/// Issue originated during the convert process
Convert = 3,
}
impl IssueType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
IssueType::Unspecified => "ISSUE_TYPE_UNSPECIFIED",
IssueType::Ddl => "ISSUE_TYPE_DDL",
IssueType::Apply => "ISSUE_TYPE_APPLY",
IssueType::Convert => "ISSUE_TYPE_CONVERT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ISSUE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ISSUE_TYPE_DDL" => Some(Self::Ddl),
"ISSUE_TYPE_APPLY" => Some(Self::Apply),
"ISSUE_TYPE_CONVERT" => Some(Self::Convert),
_ => None,
}
}
}
/// Severity of issue.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum IssueSeverity {
/// Unspecified issue severity
Unspecified = 0,
/// Info
Info = 1,
/// Warning
Warning = 2,
/// Error
Error = 3,
}
impl IssueSeverity {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
IssueSeverity::Unspecified => "ISSUE_SEVERITY_UNSPECIFIED",
IssueSeverity::Info => "ISSUE_SEVERITY_INFO",
IssueSeverity::Warning => "ISSUE_SEVERITY_WARNING",
IssueSeverity::Error => "ISSUE_SEVERITY_ERROR",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ISSUE_SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
"ISSUE_SEVERITY_INFO" => Some(Self::Info),
"ISSUE_SEVERITY_WARNING" => Some(Self::Warning),
"ISSUE_SEVERITY_ERROR" => Some(Self::Error),
_ => None,
}
}
}
}
/// Enum used by ValueListFilter to indicate whether the source value is in the
/// supplied list
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ValuePresentInList {
/// Value present in list unspecified
Unspecified = 0,
/// If the source value is in the supplied list at value_list
IfValueList = 1,
/// If the source value is not in the supplied list at value_list
IfValueNotList = 2,
}
impl ValuePresentInList {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
ValuePresentInList::Unspecified => "VALUE_PRESENT_IN_LIST_UNSPECIFIED",
ValuePresentInList::IfValueList => "VALUE_PRESENT_IN_LIST_IF_VALUE_LIST",
ValuePresentInList::IfValueNotList => {
"VALUE_PRESENT_IN_LIST_IF_VALUE_NOT_LIST"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VALUE_PRESENT_IN_LIST_UNSPECIFIED" => Some(Self::Unspecified),
"VALUE_PRESENT_IN_LIST_IF_VALUE_LIST" => Some(Self::IfValueList),
"VALUE_PRESENT_IN_LIST_IF_VALUE_NOT_LIST" => Some(Self::IfValueNotList),
_ => None,
}
}
}
/// The type of database entities supported,
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DatabaseEntityType {
/// Unspecified database entity type.
Unspecified = 0,
/// Schema.
Schema = 1,
/// Table.
Table = 2,
/// Column.
Column = 3,
/// Constraint.
Constraint = 4,
/// Index.
Index = 5,
/// Trigger.
Trigger = 6,
/// View.
View = 7,
/// Sequence.
Sequence = 8,
/// Stored Procedure.
StoredProcedure = 9,
/// Function.
Function = 10,
/// Synonym.
Synonym = 11,
/// Package.
DatabasePackage = 12,
/// UDT.
Udt = 13,
/// Materialized View.
MaterializedView = 14,
/// Database.
Database = 15,
}
impl DatabaseEntityType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DatabaseEntityType::Unspecified => "DATABASE_ENTITY_TYPE_UNSPECIFIED",
DatabaseEntityType::Schema => "DATABASE_ENTITY_TYPE_SCHEMA",
DatabaseEntityType::Table => "DATABASE_ENTITY_TYPE_TABLE",
DatabaseEntityType::Column => "DATABASE_ENTITY_TYPE_COLUMN",
DatabaseEntityType::Constraint => "DATABASE_ENTITY_TYPE_CONSTRAINT",
DatabaseEntityType::Index => "DATABASE_ENTITY_TYPE_INDEX",
DatabaseEntityType::Trigger => "DATABASE_ENTITY_TYPE_TRIGGER",
DatabaseEntityType::View => "DATABASE_ENTITY_TYPE_VIEW",
DatabaseEntityType::Sequence => "DATABASE_ENTITY_TYPE_SEQUENCE",
DatabaseEntityType::StoredProcedure => {
"DATABASE_ENTITY_TYPE_STORED_PROCEDURE"
}
DatabaseEntityType::Function => "DATABASE_ENTITY_TYPE_FUNCTION",
DatabaseEntityType::Synonym => "DATABASE_ENTITY_TYPE_SYNONYM",
DatabaseEntityType::DatabasePackage => {
"DATABASE_ENTITY_TYPE_DATABASE_PACKAGE"
}
DatabaseEntityType::Udt => "DATABASE_ENTITY_TYPE_UDT",
DatabaseEntityType::MaterializedView => {
"DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW"
}
DatabaseEntityType::Database => "DATABASE_ENTITY_TYPE_DATABASE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DATABASE_ENTITY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"DATABASE_ENTITY_TYPE_SCHEMA" => Some(Self::Schema),
"DATABASE_ENTITY_TYPE_TABLE" => Some(Self::Table),
"DATABASE_ENTITY_TYPE_COLUMN" => Some(Self::Column),
"DATABASE_ENTITY_TYPE_CONSTRAINT" => Some(Self::Constraint),
"DATABASE_ENTITY_TYPE_INDEX" => Some(Self::Index),
"DATABASE_ENTITY_TYPE_TRIGGER" => Some(Self::Trigger),
"DATABASE_ENTITY_TYPE_VIEW" => Some(Self::View),
"DATABASE_ENTITY_TYPE_SEQUENCE" => Some(Self::Sequence),
"DATABASE_ENTITY_TYPE_STORED_PROCEDURE" => Some(Self::StoredProcedure),
"DATABASE_ENTITY_TYPE_FUNCTION" => Some(Self::Function),
"DATABASE_ENTITY_TYPE_SYNONYM" => Some(Self::Synonym),
"DATABASE_ENTITY_TYPE_DATABASE_PACKAGE" => Some(Self::DatabasePackage),
"DATABASE_ENTITY_TYPE_UDT" => Some(Self::Udt),
"DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW" => Some(Self::MaterializedView),
"DATABASE_ENTITY_TYPE_DATABASE" => Some(Self::Database),
_ => None,
}
}
}
/// Entity Name Transformation Types
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EntityNameTransformation {
/// Entity name transformation unspecified.
Unspecified = 0,
/// No transformation.
NoTransformation = 1,
/// Transform to lower case.
LowerCase = 2,
/// Transform to upper case.
UpperCase = 3,
/// Transform to capitalized case.
CapitalizedCase = 4,
}
impl EntityNameTransformation {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
EntityNameTransformation::Unspecified => {
"ENTITY_NAME_TRANSFORMATION_UNSPECIFIED"
}
EntityNameTransformation::NoTransformation => {
"ENTITY_NAME_TRANSFORMATION_NO_TRANSFORMATION"
}
EntityNameTransformation::LowerCase => {
"ENTITY_NAME_TRANSFORMATION_LOWER_CASE"
}
EntityNameTransformation::UpperCase => {
"ENTITY_NAME_TRANSFORMATION_UPPER_CASE"
}
EntityNameTransformation::CapitalizedCase => {
"ENTITY_NAME_TRANSFORMATION_CAPITALIZED_CASE"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ENTITY_NAME_TRANSFORMATION_UNSPECIFIED" => Some(Self::Unspecified),
"ENTITY_NAME_TRANSFORMATION_NO_TRANSFORMATION" => {
Some(Self::NoTransformation)
}
"ENTITY_NAME_TRANSFORMATION_LOWER_CASE" => Some(Self::LowerCase),
"ENTITY_NAME_TRANSFORMATION_UPPER_CASE" => Some(Self::UpperCase),
"ENTITY_NAME_TRANSFORMATION_CAPITALIZED_CASE" => Some(Self::CapitalizedCase),
_ => None,
}
}
}
/// The types of jobs that can be executed in the background.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BackgroundJobType {
/// Unspecified background job type.
Unspecified = 0,
/// Job to seed from the source database.
SourceSeed = 1,
/// Job to convert the source database into a draft of the destination
/// database.
Convert = 2,
/// Job to apply the draft tree onto the destination.
ApplyDestination = 3,
/// Job to import and convert mapping rules from an external source such as an
/// ora2pg config file.
ImportRulesFile = 5,
}
impl BackgroundJobType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
BackgroundJobType::Unspecified => "BACKGROUND_JOB_TYPE_UNSPECIFIED",
BackgroundJobType::SourceSeed => "BACKGROUND_JOB_TYPE_SOURCE_SEED",
BackgroundJobType::Convert => "BACKGROUND_JOB_TYPE_CONVERT",
BackgroundJobType::ApplyDestination => {
"BACKGROUND_JOB_TYPE_APPLY_DESTINATION"
}
BackgroundJobType::ImportRulesFile => "BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BACKGROUND_JOB_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"BACKGROUND_JOB_TYPE_SOURCE_SEED" => Some(Self::SourceSeed),
"BACKGROUND_JOB_TYPE_CONVERT" => Some(Self::Convert),
"BACKGROUND_JOB_TYPE_APPLY_DESTINATION" => Some(Self::ApplyDestination),
"BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE" => Some(Self::ImportRulesFile),
_ => None,
}
}
}
/// The format for the import rules file.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ImportRulesFileFormat {
/// Unspecified rules format.
Unspecified = 0,
/// HarbourBridge session file.
HarbourBridgeSessionFile = 1,
/// Ora2Pg configuration file.
OratopgConfigFile = 2,
}
impl ImportRulesFileFormat {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
ImportRulesFileFormat::Unspecified => "IMPORT_RULES_FILE_FORMAT_UNSPECIFIED",
ImportRulesFileFormat::HarbourBridgeSessionFile => {
"IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE"
}
ImportRulesFileFormat::OratopgConfigFile => {
"IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"IMPORT_RULES_FILE_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
"IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE" => {
Some(Self::HarbourBridgeSessionFile)
}
"IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE" => {
Some(Self::OratopgConfigFile)
}
_ => None,
}
}
}
/// Enum used by IntComparisonFilter and DoubleComparisonFilter to indicate the
/// relation between source value and compare value.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ValueComparison {
/// Value comparison unspecified.
Unspecified = 0,
/// Value is smaller than the Compare value.
IfValueSmallerThan = 1,
/// Value is smaller or equal than the Compare value.
IfValueSmallerEqualThan = 2,
/// Value is larger than the Compare value.
IfValueLargerThan = 3,
/// Value is larger or equal than the Compare value.
IfValueLargerEqualThan = 4,
}
impl ValueComparison {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
ValueComparison::Unspecified => "VALUE_COMPARISON_UNSPECIFIED",
ValueComparison::IfValueSmallerThan => {
"VALUE_COMPARISON_IF_VALUE_SMALLER_THAN"
}
ValueComparison::IfValueSmallerEqualThan => {
"VALUE_COMPARISON_IF_VALUE_SMALLER_EQUAL_THAN"
}
ValueComparison::IfValueLargerThan => "VALUE_COMPARISON_IF_VALUE_LARGER_THAN",
ValueComparison::IfValueLargerEqualThan => {
"VALUE_COMPARISON_IF_VALUE_LARGER_EQUAL_THAN"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VALUE_COMPARISON_UNSPECIFIED" => Some(Self::Unspecified),
"VALUE_COMPARISON_IF_VALUE_SMALLER_THAN" => Some(Self::IfValueSmallerThan),
"VALUE_COMPARISON_IF_VALUE_SMALLER_EQUAL_THAN" => {
Some(Self::IfValueSmallerEqualThan)
}
"VALUE_COMPARISON_IF_VALUE_LARGER_THAN" => Some(Self::IfValueLargerThan),
"VALUE_COMPARISON_IF_VALUE_LARGER_EQUAL_THAN" => {
Some(Self::IfValueLargerEqualThan)
}
_ => None,
}
}
}
/// Specifies the columns on which numeric filter needs to be applied.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NumericFilterOption {
/// Numeric filter option unspecified
Unspecified = 0,
/// Numeric filter option that matches all numeric columns.
All = 1,
/// Numeric filter option that matches columns having numeric datatypes with
/// specified precision and scale within the limited range of filter.
Limit = 2,
/// Numeric filter option that matches only the numeric columns with no
/// precision and scale specified.
Limitless = 3,
}
impl NumericFilterOption {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
NumericFilterOption::Unspecified => "NUMERIC_FILTER_OPTION_UNSPECIFIED",
NumericFilterOption::All => "NUMERIC_FILTER_OPTION_ALL",
NumericFilterOption::Limit => "NUMERIC_FILTER_OPTION_LIMIT",
NumericFilterOption::Limitless => "NUMERIC_FILTER_OPTION_LIMITLESS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NUMERIC_FILTER_OPTION_UNSPECIFIED" => Some(Self::Unspecified),
"NUMERIC_FILTER_OPTION_ALL" => Some(Self::All),
"NUMERIC_FILTER_OPTION_LIMIT" => Some(Self::Limit),
"NUMERIC_FILTER_OPTION_LIMITLESS" => Some(Self::Limitless),
_ => None,
}
}
}
/// Retrieves a list of all migration jobs in a given project and location.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMigrationJobsRequest {
/// Required. The parent which owns this collection of migrationJobs.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// The maximum number of migration jobs to return. The service may return
/// fewer than this value. If unspecified, at most 50 migration jobs will be
/// returned. The maximum value is 1000; values above 1000 are coerced to
/// 1000.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// The nextPageToken value received in the previous call to
/// migrationJobs.list, used in the subsequent request to retrieve the next
/// page of results. On first call this should be left blank. When paginating,
/// all other parameters provided to migrationJobs.list must match the call
/// that provided the page token.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// A filter expression that filters migration jobs listed in the response.
/// The expression must specify the field name, a comparison operator, and the
/// value that you want to use for filtering. The value must be a string,
/// a number, or a boolean. The comparison operator must be
/// either =, !=, >, or <. For example, list migration jobs created this year
/// by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
/// You can also filter nested fields. For example, you could specify
/// **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
/// jobs connecting through the specific SSH tunnel bastion.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Sort the results based on the migration job name.
/// Valid values are: "name", "name asc", and "name desc".
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response message for 'ListMigrationJobs' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMigrationJobsResponse {
/// The list of migration jobs objects.
#[prost(message, repeated, tag = "1")]
pub migration_jobs: ::prost::alloc::vec::Vec<MigrationJob>,
/// A token which can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request message for 'GetMigrationJob' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMigrationJobRequest {
/// Required. Name of the migration job resource to get.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message to create a new Database Migration Service migration job
/// in the specified project and region.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMigrationJobRequest {
/// Required. The parent which owns this collection of migration jobs.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The ID of the instance to create.
#[prost(string, tag = "2")]
pub migration_job_id: ::prost::alloc::string::String,
/// Required. Represents a [migration
/// job](<https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs>)
/// object.
#[prost(message, optional, tag = "3")]
pub migration_job: ::core::option::Option<MigrationJob>,
/// Optional. A unique ID used to identify the request. If the server receives
/// two requests with the same ID, then the second request is ignored.
///
/// It is recommended to always set this value to a UUID.
///
/// The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
/// (_), and hyphens (-). The maximum length is 40 characters.
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for 'UpdateMigrationJob' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMigrationJobRequest {
/// Required. Field mask is used to specify the fields to be overwritten by the
/// update in the conversion workspace resource.
#[prost(message, optional, tag = "1")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Required. The migration job parameters to update.
#[prost(message, optional, tag = "2")]
pub migration_job: ::core::option::Option<MigrationJob>,
/// A unique ID used to identify the request. If the server receives two
/// requests with the same ID, then the second request is ignored.
///
/// It is recommended to always set this value to a UUID.
///
/// The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
/// (_), and hyphens (-). The maximum length is 40 characters.
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for 'DeleteMigrationJob' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteMigrationJobRequest {
/// Required. Name of the migration job resource to delete.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// A unique ID used to identify the request. If the server receives two
/// requests with the same ID, then the second request is ignored.
///
/// It is recommended to always set this value to a UUID.
///
/// The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
/// (_), and hyphens (-). The maximum length is 40 characters.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
/// The destination CloudSQL connection profile is always deleted with the
/// migration job. In case of force delete, the destination CloudSQL replica
/// database is also deleted.
#[prost(bool, tag = "3")]
pub force: bool,
}
/// Request message for 'StartMigrationJob' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartMigrationJobRequest {
/// Name of the migration job resource to start.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. Start the migration job without running prior configuration
/// verification. Defaults to `false`.
#[prost(bool, tag = "2")]
pub skip_validation: bool,
}
/// Request message for 'StopMigrationJob' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopMigrationJobRequest {
/// Name of the migration job resource to stop.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for 'ResumeMigrationJob' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResumeMigrationJobRequest {
/// Name of the migration job resource to resume.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for 'PromoteMigrationJob' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PromoteMigrationJobRequest {
/// Name of the migration job resource to promote.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for 'VerifyMigrationJob' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerifyMigrationJobRequest {
/// Name of the migration job resource to verify.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. Field mask is used to specify the changed fields to be verified.
/// It will not update the migration job.
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Optional. The changed migration job parameters to verify.
/// It will not update the migration job.
#[prost(message, optional, tag = "3")]
pub migration_job: ::core::option::Option<MigrationJob>,
}
/// Request message for 'RestartMigrationJob' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestartMigrationJobRequest {
/// Name of the migration job resource to restart.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. Restart the migration job without running prior configuration
/// verification. Defaults to `false`.
#[prost(bool, tag = "2")]
pub skip_validation: bool,
}
/// Request message for 'GenerateSshScript' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateSshScriptRequest {
/// Name of the migration job resource to generate the SSH script.
#[prost(string, tag = "1")]
pub migration_job: ::prost::alloc::string::String,
/// Required. Bastion VM Instance name to use or to create.
#[prost(string, tag = "2")]
pub vm: ::prost::alloc::string::String,
/// The port that will be open on the bastion host.
#[prost(int32, tag = "3")]
pub vm_port: i32,
/// The VM configuration
#[prost(oneof = "generate_ssh_script_request::VmConfig", tags = "100, 101")]
pub vm_config: ::core::option::Option<generate_ssh_script_request::VmConfig>,
}
/// Nested message and enum types in `GenerateSshScriptRequest`.
pub mod generate_ssh_script_request {
/// The VM configuration
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum VmConfig {
/// The VM creation configuration
#[prost(message, tag = "100")]
VmCreationConfig(super::VmCreationConfig),
/// The VM selection configuration
#[prost(message, tag = "101")]
VmSelectionConfig(super::VmSelectionConfig),
}
}
/// VM creation configuration message
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VmCreationConfig {
/// Required. VM instance machine type to create.
#[prost(string, tag = "1")]
pub vm_machine_type: ::prost::alloc::string::String,
/// The Google Cloud Platform zone to create the VM in.
#[prost(string, tag = "2")]
pub vm_zone: ::prost::alloc::string::String,
/// The subnet name the vm needs to be created in.
#[prost(string, tag = "3")]
pub subnet: ::prost::alloc::string::String,
}
/// VM selection configuration message
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VmSelectionConfig {
/// Required. The Google Cloud Platform zone the VM is located.
#[prost(string, tag = "1")]
pub vm_zone: ::prost::alloc::string::String,
}
/// Response message for 'GenerateSshScript' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SshScript {
/// The ssh configuration script.
#[prost(string, tag = "1")]
pub script: ::prost::alloc::string::String,
}
/// Request message for 'GenerateTcpProxyScript' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateTcpProxyScriptRequest {
/// Name of the migration job resource to generate the TCP Proxy script.
#[prost(string, tag = "1")]
pub migration_job: ::prost::alloc::string::String,
/// Required. The name of the Compute instance that will host the proxy.
#[prost(string, tag = "2")]
pub vm_name: ::prost::alloc::string::String,
/// Required. The type of the Compute instance that will host the proxy.
#[prost(string, tag = "3")]
pub vm_machine_type: ::prost::alloc::string::String,
/// Optional. The Google Cloud Platform zone to create the VM in. The fully
/// qualified name of the zone must be specified, including the region name,
/// for example "us-central1-b". If not specified, uses the "-b" zone of the
/// destination Connection Profile's region.
#[prost(string, tag = "4")]
pub vm_zone: ::prost::alloc::string::String,
/// Required. The name of the subnet the Compute instance will use for private
/// connectivity. Must be supplied in the form of
/// projects/{project}/regions/{region}/subnetworks/{subnetwork}.
/// Note: the region for the subnet must match the Compute instance region.
#[prost(string, tag = "5")]
pub vm_subnet: ::prost::alloc::string::String,
}
/// Response message for 'GenerateTcpProxyScript' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TcpProxyScript {
/// The TCP Proxy configuration script.
#[prost(string, tag = "1")]
pub script: ::prost::alloc::string::String,
}
/// Request message for 'ListConnectionProfiles' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConnectionProfilesRequest {
/// Required. The parent which owns this collection of connection profiles.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// The maximum number of connection profiles to return. The service may return
/// fewer than this value. If unspecified, at most 50 connection profiles will
/// be returned. The maximum value is 1000; values above 1000 are coerced
/// to 1000.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token, received from a previous `ListConnectionProfiles` call.
/// Provide this to retrieve the subsequent page.
///
/// When paginating, all other parameters provided to `ListConnectionProfiles`
/// must match the call that provided the page token.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// A filter expression that filters connection profiles listed in the
/// response. The expression must specify the field name, a comparison
/// operator, and the value that you want to use for filtering. The value must
/// be a string, a number, or a boolean. The comparison operator must be either
/// =, !=, >, or <. For example, list connection profiles created this year by
/// specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
/// also filter nested fields. For example, you could specify **mySql.username
/// = %lt;my_username%gt;** to list all connection profiles configured to
/// connect with a specific username.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// A comma-separated list of fields to order results according to.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response message for 'ListConnectionProfiles' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConnectionProfilesResponse {
/// The response list of connection profiles.
#[prost(message, repeated, tag = "1")]
pub connection_profiles: ::prost::alloc::vec::Vec<ConnectionProfile>,
/// A token which can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request message for 'GetConnectionProfile' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConnectionProfileRequest {
/// Required. Name of the connection profile resource to get.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for 'CreateConnectionProfile' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateConnectionProfileRequest {
/// Required. The parent which owns this collection of connection profiles.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The connection profile identifier.
#[prost(string, tag = "2")]
pub connection_profile_id: ::prost::alloc::string::String,
/// Required. The create request body including the connection profile data
#[prost(message, optional, tag = "3")]
pub connection_profile: ::core::option::Option<ConnectionProfile>,
/// Optional. A unique ID used to identify the request. If the server receives
/// two requests with the same ID, then the second request is ignored.
///
/// It is recommended to always set this value to a UUID.
///
/// The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
/// (_), and hyphens (-). The maximum length is 40 characters.
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
/// Optional. Only validate the connection profile, but don't create any
/// resources. The default is false. Only supported for Oracle connection
/// profiles.
#[prost(bool, tag = "5")]
pub validate_only: bool,
/// Optional. Create the connection profile without validating it.
/// The default is false.
/// Only supported for Oracle connection profiles.
#[prost(bool, tag = "6")]
pub skip_validation: bool,
}
/// Request message for 'UpdateConnectionProfile' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConnectionProfileRequest {
/// Required. Field mask is used to specify the fields to be overwritten by the
/// update in the conversion workspace resource.
#[prost(message, optional, tag = "1")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Required. The connection profile parameters to update.
#[prost(message, optional, tag = "2")]
pub connection_profile: ::core::option::Option<ConnectionProfile>,
/// Optional. A unique ID used to identify the request. If the server receives
/// two requests with the same ID, then the second request is ignored.
///
/// It is recommended to always set this value to a UUID.
///
/// The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
/// (_), and hyphens (-). The maximum length is 40 characters.
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
/// Optional. Only validate the connection profile, but don't update any
/// resources. The default is false. Only supported for Oracle connection
/// profiles.
#[prost(bool, tag = "4")]
pub validate_only: bool,
/// Optional. Update the connection profile without validating it.
/// The default is false.
/// Only supported for Oracle connection profiles.
#[prost(bool, tag = "5")]
pub skip_validation: bool,
}
/// Request message for 'DeleteConnectionProfile' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteConnectionProfileRequest {
/// Required. Name of the connection profile resource to delete.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// A unique ID used to identify the request. If the server receives two
/// requests with the same ID, then the second request is ignored.
///
/// It is recommended to always set this value to a UUID.
///
/// The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
/// (_), and hyphens (-). The maximum length is 40 characters.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
/// In case of force delete, the CloudSQL replica database is also deleted
/// (only for CloudSQL connection profile).
#[prost(bool, tag = "3")]
pub force: bool,
}
/// Request message to create a new private connection in the specified project
/// and region.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePrivateConnectionRequest {
/// Required. The parent that owns the collection of PrivateConnections.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The private connection identifier.
#[prost(string, tag = "2")]
pub private_connection_id: ::prost::alloc::string::String,
/// Required. The private connection resource to create.
#[prost(message, optional, tag = "3")]
pub private_connection: ::core::option::Option<PrivateConnection>,
/// Optional. A unique ID used to identify the request. If the server receives
/// two requests with the same ID, then the second request is ignored.
///
/// It is recommended to always set this value to a UUID.
///
/// The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
/// (_), and hyphens (-). The maximum length is 40 characters.
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
/// Optional. If set to true, will skip validations.
#[prost(bool, tag = "5")]
pub skip_validation: bool,
}
/// Request message to retrieve a list of private connections in a given project
/// and location.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPrivateConnectionsRequest {
/// Required. The parent that owns the collection of private connections.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum number of private connections to return.
/// If unspecified, at most 50 private connections that are returned.
/// The maximum value is 1000; values above 1000 are coerced to 1000.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Page token received from a previous `ListPrivateConnections` call.
/// Provide this to retrieve the subsequent page.
///
/// When paginating, all other parameters provided to
/// `ListPrivateConnections` must match the call that provided the page
/// token.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// A filter expression that filters private connections listed in the
/// response. The expression must specify the field name, a comparison
/// operator, and the value that you want to use for filtering. The value must
/// be a string, a number, or a boolean. The comparison operator must be either
/// =, !=, >, or <. For example, list private connections created this year by
/// specifying **createTime %gt; 2021-01-01T00:00:00.000000000Z**.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Order by fields for the result.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response message for 'ListPrivateConnections' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPrivateConnectionsResponse {
/// List of private connections.
#[prost(message, repeated, tag = "1")]
pub private_connections: ::prost::alloc::vec::Vec<PrivateConnection>,
/// A token which can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request message to delete a private connection.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePrivateConnectionRequest {
/// Required. The name of the private connection to delete.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. A unique ID used to identify the request. If the server receives
/// two requests with the same ID, then the second request is ignored.
///
/// It is recommended to always set this value to a UUID.
///
/// The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
/// (_), and hyphens (-). The maximum length is 40 characters.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message to get a private connection resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPrivateConnectionRequest {
/// Required. The name of the private connection to get.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Represents the metadata of the long-running operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
/// Output only. The time the operation was created.
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time the operation finished running.
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Server-defined resource path for the target of the operation.
#[prost(string, tag = "3")]
pub target: ::prost::alloc::string::String,
/// Output only. Name of the verb executed by the operation.
#[prost(string, tag = "4")]
pub verb: ::prost::alloc::string::String,
/// Output only. Human-readable status of the operation, if any.
#[prost(string, tag = "5")]
pub status_message: ::prost::alloc::string::String,
/// Output only. Identifies whether the user has requested cancellation
/// of the operation. Operations that have successfully been cancelled
/// have [Operation.error][] value with a
/// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
/// `Code.CANCELLED`.
#[prost(bool, tag = "6")]
pub requested_cancellation: bool,
/// Output only. API version used to start the operation.
#[prost(string, tag = "7")]
pub api_version: ::prost::alloc::string::String,
}
/// Retrieve a list of all conversion workspaces in a given project and location.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConversionWorkspacesRequest {
/// Required. The parent which owns this collection of conversion workspaces.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// The maximum number of conversion workspaces to return. The service may
/// return fewer than this value. If unspecified, at most 50 sets are returned.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// The nextPageToken value received in the previous call to
/// conversionWorkspaces.list, used in the subsequent request to retrieve the
/// next page of results. On first call this should be left blank. When
/// paginating, all other parameters provided to conversionWorkspaces.list must
/// match the call that provided the page token.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// A filter expression that filters conversion workspaces listed in the
/// response. The expression must specify the field name, a comparison
/// operator, and the value that you want to use for filtering. The value must
/// be a string, a number, or a boolean. The comparison operator must be either
/// =, !=, >, or <. For example, list conversion workspaces created this year
/// by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can
/// also filter nested fields. For example, you could specify
/// **source.version = "12.c.1"** to select all conversion workspaces with
/// source database version equal to 12.c.1.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
/// Response message for 'ListConversionWorkspaces' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConversionWorkspacesResponse {
/// The list of conversion workspace objects.
#[prost(message, repeated, tag = "1")]
pub conversion_workspaces: ::prost::alloc::vec::Vec<ConversionWorkspace>,
/// A token which can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request message for 'GetConversionWorkspace' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversionWorkspaceRequest {
/// Required. Name of the conversion workspace resource to get.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message to create a new Conversion Workspace
/// in the specified project and region.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateConversionWorkspaceRequest {
/// Required. The parent which owns this collection of conversion workspaces.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The ID of the conversion workspace to create.
#[prost(string, tag = "2")]
pub conversion_workspace_id: ::prost::alloc::string::String,
/// Required. Represents a conversion workspace object.
#[prost(message, optional, tag = "3")]
pub conversion_workspace: ::core::option::Option<ConversionWorkspace>,
/// A unique ID used to identify the request. If the server receives two
/// requests with the same ID, then the second request is ignored.
///
/// It is recommended to always set this value to a UUID.
///
/// The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
/// (_), and hyphens (-). The maximum length is 40 characters.
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for 'UpdateConversionWorkspace' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConversionWorkspaceRequest {
/// Required. Field mask is used to specify the fields to be overwritten by the
/// update in the conversion workspace resource.
#[prost(message, optional, tag = "1")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Required. The conversion workspace parameters to update.
#[prost(message, optional, tag = "2")]
pub conversion_workspace: ::core::option::Option<ConversionWorkspace>,
/// A unique ID used to identify the request. If the server receives two
/// requests with the same ID, then the second request is ignored.
///
/// It is recommended to always set this value to a UUID.
///
/// The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
/// (_), and hyphens (-). The maximum length is 40 characters.
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for 'DeleteConversionWorkspace' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteConversionWorkspaceRequest {
/// Required. Name of the conversion workspace resource to delete.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// A unique ID used to identify the request. If the server receives two
/// requests with the same ID, then the second request is ignored.
///
/// It is recommended to always set this value to a UUID.
///
/// The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
/// (_), and hyphens (-). The maximum length is 40 characters.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
/// Force delete the conversion workspace, even if there's a running migration
/// that is using the workspace.
#[prost(bool, tag = "3")]
pub force: bool,
}
/// Request message for 'CommitConversionWorkspace' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitConversionWorkspaceRequest {
/// Required. Name of the conversion workspace resource to commit.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. Optional name of the commit.
#[prost(string, tag = "2")]
pub commit_name: ::prost::alloc::string::String,
}
/// Request message for 'RollbackConversionWorkspace' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RollbackConversionWorkspaceRequest {
/// Required. Name of the conversion workspace resource to roll back to.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for 'ApplyConversionWorkspace' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplyConversionWorkspaceRequest {
/// Required. The name of the conversion workspace resource for which to apply
/// the draft tree. Must be in the form of:
/// projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Filter which entities to apply. Leaving this field empty will apply all of
/// the entities. Supports Google AIP 160 based filtering.
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
/// Optional. Only validates the apply process, but doesn't change the
/// destination database. Only works for PostgreSQL destination connection
/// profile.
#[prost(bool, tag = "3")]
pub dry_run: bool,
/// Optional. Specifies whether the conversion workspace is to be committed
/// automatically after the apply.
#[prost(bool, tag = "4")]
pub auto_commit: bool,
/// Which destination to use when applying the conversion workspace.
#[prost(oneof = "apply_conversion_workspace_request::Destination", tags = "100")]
pub destination: ::core::option::Option<
apply_conversion_workspace_request::Destination,
>,
}
/// Nested message and enum types in `ApplyConversionWorkspaceRequest`.
pub mod apply_conversion_workspace_request {
/// Which destination to use when applying the conversion workspace.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Destination {
/// Optional. Fully qualified (Uri) name of the destination connection
/// profile.
#[prost(string, tag = "100")]
ConnectionProfile(::prost::alloc::string::String),
}
}
/// Retrieve a list of all mapping rules in a given conversion workspace.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMappingRulesRequest {
/// Required. Name of the conversion workspace resource whose mapping rules are
/// listed in the form of:
/// projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// The maximum number of rules to return. The service may return
/// fewer than this value.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// The nextPageToken value received in the previous call to
/// mappingRules.list, used in the subsequent request to retrieve the next
/// page of results. On first call this should be left blank. When paginating,
/// all other parameters provided to mappingRules.list must match the call
/// that provided the page token.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
/// Response message for 'ListMappingRulesRequest' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMappingRulesResponse {
/// The list of conversion workspace mapping rules.
#[prost(message, repeated, tag = "1")]
pub mapping_rules: ::prost::alloc::vec::Vec<MappingRule>,
/// A token which can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for 'GetMappingRule' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMappingRuleRequest {
/// Required. Name of the mapping rule resource to get.
/// Example: conversionWorkspaces/123/mappingRules/rule123
///
/// In order to retrieve a previous revision of the mapping rule, also provide
/// the revision ID.
/// Example:
/// conversionWorkspace/123/mappingRules/rule123@c7cfa2a8c7cfa2a8c7cfa2a8c7cfa2a8
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for 'SeedConversionWorkspace' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SeedConversionWorkspaceRequest {
/// Name of the conversion workspace resource to seed with new database
/// structure, in the form of:
/// projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Should the conversion workspace be committed automatically after the
/// seed operation.
#[prost(bool, tag = "2")]
pub auto_commit: bool,
/// The input to be used for seeding the conversion workspace. The input can
/// either be from the source or destination databases and it can be provided
/// through a connection profile or a DDL file.
#[prost(oneof = "seed_conversion_workspace_request::SeedFrom", tags = "100, 101")]
pub seed_from: ::core::option::Option<seed_conversion_workspace_request::SeedFrom>,
}
/// Nested message and enum types in `SeedConversionWorkspaceRequest`.
pub mod seed_conversion_workspace_request {
/// The input to be used for seeding the conversion workspace. The input can
/// either be from the source or destination databases and it can be provided
/// through a connection profile or a DDL file.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SeedFrom {
/// Optional. Fully qualified (Uri) name of the source connection profile.
#[prost(string, tag = "100")]
SourceConnectionProfile(::prost::alloc::string::String),
/// Optional. Fully qualified (Uri) name of the destination connection
/// profile.
#[prost(string, tag = "101")]
DestinationConnectionProfile(::prost::alloc::string::String),
}
}
/// Request message for 'ConvertConversionWorkspace' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConvertConversionWorkspaceRequest {
/// Name of the conversion workspace resource to convert in the form of:
/// projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. Specifies whether the conversion workspace is to be committed
/// automatically after the conversion.
#[prost(bool, tag = "4")]
pub auto_commit: bool,
/// Optional. Filter the entities to convert. Leaving this field empty will
/// convert all of the entities. Supports Google AIP-160 style filtering.
#[prost(string, tag = "5")]
pub filter: ::prost::alloc::string::String,
/// Optional. Automatically convert the full entity path for each entity
/// specified by the filter. For example, if the filter specifies a table, that
/// table schema (and database if there is one) will also be converted.
#[prost(bool, tag = "6")]
pub convert_full_path: bool,
}
/// Request message for 'ImportMappingRules' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportMappingRulesRequest {
/// Required. Name of the conversion workspace resource to import the rules to
/// in the form of:
/// projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The format of the rules content file.
#[prost(enumeration = "ImportRulesFileFormat", tag = "2")]
pub rules_format: i32,
/// Required. One or more rules files.
#[prost(message, repeated, tag = "3")]
pub rules_files: ::prost::alloc::vec::Vec<import_mapping_rules_request::RulesFile>,
/// Required. Should the conversion workspace be committed automatically after
/// the import operation.
#[prost(bool, tag = "6")]
pub auto_commit: bool,
}
/// Nested message and enum types in `ImportMappingRulesRequest`.
pub mod import_mapping_rules_request {
/// Details of a single rules file.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RulesFile {
/// Required. The filename of the rules that needs to be converted. The
/// filename is used mainly so that future logs of the import rules job
/// contain it, and can therefore be searched by it.
#[prost(string, tag = "1")]
pub rules_source_filename: ::prost::alloc::string::String,
/// Required. The text content of the rules that needs to be converted.
#[prost(string, tag = "2")]
pub rules_content: ::prost::alloc::string::String,
}
}
/// Request message for 'DescribeDatabaseEntities' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeDatabaseEntitiesRequest {
/// Required. Name of the conversion workspace resource whose database entities
/// are described. Must be in the form of:
/// projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
#[prost(string, tag = "1")]
pub conversion_workspace: ::prost::alloc::string::String,
/// Optional. The maximum number of entities to return. The service may return
/// fewer entities than the value specifies.
#[prost(int32, tag = "3")]
pub page_size: i32,
/// Optional. The nextPageToken value received in the previous call to
/// conversionWorkspace.describeDatabaseEntities, used in the subsequent
/// request to retrieve the next page of results. On first call this should be
/// left blank. When paginating, all other parameters provided to
/// conversionWorkspace.describeDatabaseEntities must match the call that
/// provided the page token.
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
/// Required. The tree to fetch.
#[prost(enumeration = "describe_database_entities_request::DbTreeType", tag = "6")]
pub tree: i32,
/// Optional. Whether to retrieve the latest committed version of the entities
/// or the latest version. This field is ignored if a specific commit_id is
/// specified.
#[prost(bool, tag = "11")]
pub uncommitted: bool,
/// Optional. Request a specific commit ID. If not specified, the entities from
/// the latest commit are returned.
#[prost(string, tag = "12")]
pub commit_id: ::prost::alloc::string::String,
/// Optional. Filter the returned entities based on AIP-160 standard.
#[prost(string, tag = "13")]
pub filter: ::prost::alloc::string::String,
/// Optional. Results view based on AIP-157
#[prost(enumeration = "DatabaseEntityView", tag = "14")]
pub view: i32,
}
/// Nested message and enum types in `DescribeDatabaseEntitiesRequest`.
pub mod describe_database_entities_request {
/// The type of a tree to return
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DbTreeType {
/// Unspecified tree type.
Unspecified = 0,
/// The source database tree.
SourceTree = 1,
/// The draft database tree.
DraftTree = 2,
/// The destination database tree.
DestinationTree = 3,
}
impl DbTreeType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DbTreeType::Unspecified => "DB_TREE_TYPE_UNSPECIFIED",
DbTreeType::SourceTree => "SOURCE_TREE",
DbTreeType::DraftTree => "DRAFT_TREE",
DbTreeType::DestinationTree => "DESTINATION_TREE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DB_TREE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SOURCE_TREE" => Some(Self::SourceTree),
"DRAFT_TREE" => Some(Self::DraftTree),
"DESTINATION_TREE" => Some(Self::DestinationTree),
_ => None,
}
}
}
}
/// Response message for 'DescribeDatabaseEntities' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeDatabaseEntitiesResponse {
/// The list of database entities for the conversion workspace.
#[prost(message, repeated, tag = "1")]
pub database_entities: ::prost::alloc::vec::Vec<DatabaseEntity>,
/// A token which can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for 'SearchBackgroundJobs' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchBackgroundJobsRequest {
/// Required. Name of the conversion workspace resource whose jobs are listed,
/// in the form of:
/// projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
#[prost(string, tag = "1")]
pub conversion_workspace: ::prost::alloc::string::String,
/// Optional. Whether or not to return just the most recent job per job type,
#[prost(bool, tag = "2")]
pub return_most_recent_per_job_type: bool,
/// Optional. The maximum number of jobs to return. The service may return
/// fewer than this value. If unspecified, at most 100 jobs are
/// returned. The maximum value is 100; values above 100 are coerced to
/// 100.
#[prost(int32, tag = "3")]
pub max_size: i32,
/// Optional. If provided, only returns jobs that completed until (not
/// including) the given timestamp.
#[prost(message, optional, tag = "4")]
pub completed_until_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Response message for 'SearchBackgroundJobs' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchBackgroundJobsResponse {
/// The list of conversion workspace mapping rules.
#[prost(message, repeated, tag = "1")]
pub jobs: ::prost::alloc::vec::Vec<BackgroundJobLogEntry>,
}
/// Request message for 'DescribeConversionWorkspaceRevisions' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeConversionWorkspaceRevisionsRequest {
/// Required. Name of the conversion workspace resource whose revisions are
/// listed. Must be in the form of:
/// projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
#[prost(string, tag = "1")]
pub conversion_workspace: ::prost::alloc::string::String,
/// Optional. Optional filter to request a specific commit ID.
#[prost(string, tag = "2")]
pub commit_id: ::prost::alloc::string::String,
}
/// Response message for 'DescribeConversionWorkspaceRevisions' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeConversionWorkspaceRevisionsResponse {
/// The list of conversion workspace revisions.
#[prost(message, repeated, tag = "1")]
pub revisions: ::prost::alloc::vec::Vec<ConversionWorkspace>,
}
/// Request message for 'CreateMappingRule' command.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMappingRuleRequest {
/// Required. The parent which owns this collection of mapping rules.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The ID of the rule to create.
#[prost(string, tag = "2")]
pub mapping_rule_id: ::prost::alloc::string::String,
/// Required. Represents a \[mapping rule\]
/// (<https://cloud.google.com/database-migration/reference/rest/v1/projects.locations.mappingRules>)
/// object.
#[prost(message, optional, tag = "3")]
pub mapping_rule: ::core::option::Option<MappingRule>,
/// A unique ID used to identify the request. If the server receives two
/// requests with the same ID, then the second request is ignored.
///
/// It is recommended to always set this value to a UUID.
///
/// The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
/// (_), and hyphens (-). The maximum length is 40 characters.
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for 'DeleteMappingRule' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteMappingRuleRequest {
/// Required. Name of the mapping rule resource to delete.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. A unique ID used to identify the request. If the server receives
/// two requests with the same ID, then the second request is ignored.
///
/// It is recommended to always set this value to a UUID.
///
/// The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
/// (_), and hyphens (-). The maximum length is 40 characters.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for 'FetchStaticIps' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchStaticIpsRequest {
/// Required. The resource name for the location for which static IPs should be
/// returned. Must be in the format `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Maximum number of IPs to return.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token, received from a previous `FetchStaticIps` call.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
/// Response message for a 'FetchStaticIps' request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchStaticIpsResponse {
/// List of static IPs.
#[prost(string, repeated, tag = "1")]
pub static_ips: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// A token that can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// AIP-157 Partial Response view for Database Entity.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DatabaseEntityView {
/// Unspecified view. Defaults to basic view.
Unspecified = 0,
/// Default view. Does not return DDLs or Issues.
Basic = 1,
/// Return full entity details including mappings, ddl and issues.
Full = 2,
/// Top-most (Database, Schema) nodes which are returned contains summary
/// details for their decendents such as the number of entities per type and
/// issues rollups. When this view is used, only a single page of result is
/// returned and the page_size property of the request is ignored. The
/// returned page will only include the top-most node types.
RootSummary = 3,
}
impl DatabaseEntityView {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DatabaseEntityView::Unspecified => "DATABASE_ENTITY_VIEW_UNSPECIFIED",
DatabaseEntityView::Basic => "DATABASE_ENTITY_VIEW_BASIC",
DatabaseEntityView::Full => "DATABASE_ENTITY_VIEW_FULL",
DatabaseEntityView::RootSummary => "DATABASE_ENTITY_VIEW_ROOT_SUMMARY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DATABASE_ENTITY_VIEW_UNSPECIFIED" => Some(Self::Unspecified),
"DATABASE_ENTITY_VIEW_BASIC" => Some(Self::Basic),
"DATABASE_ENTITY_VIEW_FULL" => Some(Self::Full),
"DATABASE_ENTITY_VIEW_ROOT_SUMMARY" => Some(Self::RootSummary),
_ => None,
}
}
}
/// Generated client implementations.
pub mod data_migration_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Database Migration service
#[derive(Debug, Clone)]
pub struct DataMigrationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> DataMigrationServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DataMigrationServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
DataMigrationServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Lists migration jobs in a given project and location.
pub async fn list_migration_jobs(
&mut self,
request: impl tonic::IntoRequest<super::ListMigrationJobsRequest>,
) -> std::result::Result<
tonic::Response<super::ListMigrationJobsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/ListMigrationJobs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"ListMigrationJobs",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single migration job.
pub async fn get_migration_job(
&mut self,
request: impl tonic::IntoRequest<super::GetMigrationJobRequest>,
) -> std::result::Result<tonic::Response<super::MigrationJob>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/GetMigrationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"GetMigrationJob",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new migration job in a given project and location.
pub async fn create_migration_job(
&mut self,
request: impl tonic::IntoRequest<super::CreateMigrationJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/CreateMigrationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"CreateMigrationJob",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the parameters of a single migration job.
pub async fn update_migration_job(
&mut self,
request: impl tonic::IntoRequest<super::UpdateMigrationJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/UpdateMigrationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"UpdateMigrationJob",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single migration job.
pub async fn delete_migration_job(
&mut self,
request: impl tonic::IntoRequest<super::DeleteMigrationJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/DeleteMigrationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"DeleteMigrationJob",
),
);
self.inner.unary(req, path, codec).await
}
/// Start an already created migration job.
pub async fn start_migration_job(
&mut self,
request: impl tonic::IntoRequest<super::StartMigrationJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/StartMigrationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"StartMigrationJob",
),
);
self.inner.unary(req, path, codec).await
}
/// Stops a running migration job.
pub async fn stop_migration_job(
&mut self,
request: impl tonic::IntoRequest<super::StopMigrationJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/StopMigrationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"StopMigrationJob",
),
);
self.inner.unary(req, path, codec).await
}
/// Resume a migration job that is currently stopped and is resumable (was
/// stopped during CDC phase).
pub async fn resume_migration_job(
&mut self,
request: impl tonic::IntoRequest<super::ResumeMigrationJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/ResumeMigrationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"ResumeMigrationJob",
),
);
self.inner.unary(req, path, codec).await
}
/// Promote a migration job, stopping replication to the destination and
/// promoting the destination to be a standalone database.
pub async fn promote_migration_job(
&mut self,
request: impl tonic::IntoRequest<super::PromoteMigrationJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/PromoteMigrationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"PromoteMigrationJob",
),
);
self.inner.unary(req, path, codec).await
}
/// Verify a migration job, making sure the destination can reach the source
/// and that all configuration and prerequisites are met.
pub async fn verify_migration_job(
&mut self,
request: impl tonic::IntoRequest<super::VerifyMigrationJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/VerifyMigrationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"VerifyMigrationJob",
),
);
self.inner.unary(req, path, codec).await
}
/// Restart a stopped or failed migration job, resetting the destination
/// instance to its original state and starting the migration process from
/// scratch.
pub async fn restart_migration_job(
&mut self,
request: impl tonic::IntoRequest<super::RestartMigrationJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/RestartMigrationJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"RestartMigrationJob",
),
);
self.inner.unary(req, path, codec).await
}
/// Generate a SSH configuration script to configure the reverse SSH
/// connectivity.
pub async fn generate_ssh_script(
&mut self,
request: impl tonic::IntoRequest<super::GenerateSshScriptRequest>,
) -> std::result::Result<tonic::Response<super::SshScript>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/GenerateSshScript",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"GenerateSshScript",
),
);
self.inner.unary(req, path, codec).await
}
/// Generate a TCP Proxy configuration script to configure a cloud-hosted VM
/// running a TCP Proxy.
pub async fn generate_tcp_proxy_script(
&mut self,
request: impl tonic::IntoRequest<super::GenerateTcpProxyScriptRequest>,
) -> std::result::Result<tonic::Response<super::TcpProxyScript>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/GenerateTcpProxyScript",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"GenerateTcpProxyScript",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves a list of all connection profiles in a given project and
/// location.
pub async fn list_connection_profiles(
&mut self,
request: impl tonic::IntoRequest<super::ListConnectionProfilesRequest>,
) -> std::result::Result<
tonic::Response<super::ListConnectionProfilesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/ListConnectionProfiles",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"ListConnectionProfiles",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single connection profile.
pub async fn get_connection_profile(
&mut self,
request: impl tonic::IntoRequest<super::GetConnectionProfileRequest>,
) -> std::result::Result<
tonic::Response<super::ConnectionProfile>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/GetConnectionProfile",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"GetConnectionProfile",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new connection profile in a given project and location.
pub async fn create_connection_profile(
&mut self,
request: impl tonic::IntoRequest<super::CreateConnectionProfileRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/CreateConnectionProfile",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"CreateConnectionProfile",
),
);
self.inner.unary(req, path, codec).await
}
/// Update the configuration of a single connection profile.
pub async fn update_connection_profile(
&mut self,
request: impl tonic::IntoRequest<super::UpdateConnectionProfileRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/UpdateConnectionProfile",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"UpdateConnectionProfile",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single Database Migration Service connection profile.
/// A connection profile can only be deleted if it is not in use by any
/// active migration jobs.
pub async fn delete_connection_profile(
&mut self,
request: impl tonic::IntoRequest<super::DeleteConnectionProfileRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/DeleteConnectionProfile",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"DeleteConnectionProfile",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new private connection in a given project and location.
pub async fn create_private_connection(
&mut self,
request: impl tonic::IntoRequest<super::CreatePrivateConnectionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/CreatePrivateConnection",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"CreatePrivateConnection",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single private connection.
pub async fn get_private_connection(
&mut self,
request: impl tonic::IntoRequest<super::GetPrivateConnectionRequest>,
) -> std::result::Result<
tonic::Response<super::PrivateConnection>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/GetPrivateConnection",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"GetPrivateConnection",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves a list of private connections in a given project and location.
pub async fn list_private_connections(
&mut self,
request: impl tonic::IntoRequest<super::ListPrivateConnectionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListPrivateConnectionsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/ListPrivateConnections",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"ListPrivateConnections",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single Database Migration Service private connection.
pub async fn delete_private_connection(
&mut self,
request: impl tonic::IntoRequest<super::DeletePrivateConnectionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/DeletePrivateConnection",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"DeletePrivateConnection",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single conversion workspace.
pub async fn get_conversion_workspace(
&mut self,
request: impl tonic::IntoRequest<super::GetConversionWorkspaceRequest>,
) -> std::result::Result<
tonic::Response<super::ConversionWorkspace>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/GetConversionWorkspace",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"GetConversionWorkspace",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists conversion workspaces in a given project and location.
pub async fn list_conversion_workspaces(
&mut self,
request: impl tonic::IntoRequest<super::ListConversionWorkspacesRequest>,
) -> std::result::Result<
tonic::Response<super::ListConversionWorkspacesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/ListConversionWorkspaces",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"ListConversionWorkspaces",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new conversion workspace in a given project and location.
pub async fn create_conversion_workspace(
&mut self,
request: impl tonic::IntoRequest<super::CreateConversionWorkspaceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/CreateConversionWorkspace",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"CreateConversionWorkspace",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the parameters of a single conversion workspace.
pub async fn update_conversion_workspace(
&mut self,
request: impl tonic::IntoRequest<super::UpdateConversionWorkspaceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/UpdateConversionWorkspace",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"UpdateConversionWorkspace",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single conversion workspace.
pub async fn delete_conversion_workspace(
&mut self,
request: impl tonic::IntoRequest<super::DeleteConversionWorkspaceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/DeleteConversionWorkspace",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"DeleteConversionWorkspace",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new mapping rule for a given conversion workspace.
pub async fn create_mapping_rule(
&mut self,
request: impl tonic::IntoRequest<super::CreateMappingRuleRequest>,
) -> std::result::Result<tonic::Response<super::MappingRule>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/CreateMappingRule",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"CreateMappingRule",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single mapping rule.
pub async fn delete_mapping_rule(
&mut self,
request: impl tonic::IntoRequest<super::DeleteMappingRuleRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/DeleteMappingRule",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"DeleteMappingRule",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists the mapping rules for a specific conversion workspace.
pub async fn list_mapping_rules(
&mut self,
request: impl tonic::IntoRequest<super::ListMappingRulesRequest>,
) -> std::result::Result<
tonic::Response<super::ListMappingRulesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/ListMappingRules",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"ListMappingRules",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets the details of a mapping rule.
pub async fn get_mapping_rule(
&mut self,
request: impl tonic::IntoRequest<super::GetMappingRuleRequest>,
) -> std::result::Result<tonic::Response<super::MappingRule>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/GetMappingRule",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"GetMappingRule",
),
);
self.inner.unary(req, path, codec).await
}
/// Imports a snapshot of the source database into the
/// conversion workspace.
pub async fn seed_conversion_workspace(
&mut self,
request: impl tonic::IntoRequest<super::SeedConversionWorkspaceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/SeedConversionWorkspace",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"SeedConversionWorkspace",
),
);
self.inner.unary(req, path, codec).await
}
/// Imports the mapping rules for a given conversion workspace.
/// Supports various formats of external rules files.
pub async fn import_mapping_rules(
&mut self,
request: impl tonic::IntoRequest<super::ImportMappingRulesRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/ImportMappingRules",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"ImportMappingRules",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a draft tree schema for the destination database.
pub async fn convert_conversion_workspace(
&mut self,
request: impl tonic::IntoRequest<super::ConvertConversionWorkspaceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/ConvertConversionWorkspace",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"ConvertConversionWorkspace",
),
);
self.inner.unary(req, path, codec).await
}
/// Marks all the data in the conversion workspace as committed.
pub async fn commit_conversion_workspace(
&mut self,
request: impl tonic::IntoRequest<super::CommitConversionWorkspaceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/CommitConversionWorkspace",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"CommitConversionWorkspace",
),
);
self.inner.unary(req, path, codec).await
}
/// Rolls back a conversion workspace to the last committed snapshot.
pub async fn rollback_conversion_workspace(
&mut self,
request: impl tonic::IntoRequest<super::RollbackConversionWorkspaceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/RollbackConversionWorkspace",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"RollbackConversionWorkspace",
),
);
self.inner.unary(req, path, codec).await
}
/// Applies draft tree onto a specific destination database.
pub async fn apply_conversion_workspace(
&mut self,
request: impl tonic::IntoRequest<super::ApplyConversionWorkspaceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/ApplyConversionWorkspace",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"ApplyConversionWorkspace",
),
);
self.inner.unary(req, path, codec).await
}
/// Describes the database entities tree for a specific conversion workspace
/// and a specific tree type.
///
/// Database entities are not resources like conversion workspaces or mapping
/// rules, and they can't be created, updated or deleted. Instead, they are
/// simple data objects describing the structure of the client database.
pub async fn describe_database_entities(
&mut self,
request: impl tonic::IntoRequest<super::DescribeDatabaseEntitiesRequest>,
) -> std::result::Result<
tonic::Response<super::DescribeDatabaseEntitiesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/DescribeDatabaseEntities",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"DescribeDatabaseEntities",
),
);
self.inner.unary(req, path, codec).await
}
/// Searches/lists the background jobs for a specific
/// conversion workspace.
///
/// The background jobs are not resources like conversion workspaces or
/// mapping rules, and they can't be created, updated or deleted.
/// Instead, they are a way to expose the data plane jobs log.
pub async fn search_background_jobs(
&mut self,
request: impl tonic::IntoRequest<super::SearchBackgroundJobsRequest>,
) -> std::result::Result<
tonic::Response<super::SearchBackgroundJobsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/SearchBackgroundJobs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"SearchBackgroundJobs",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves a list of committed revisions of a specific conversion
/// workspace.
pub async fn describe_conversion_workspace_revisions(
&mut self,
request: impl tonic::IntoRequest<
super::DescribeConversionWorkspaceRevisionsRequest,
>,
) -> std::result::Result<
tonic::Response<super::DescribeConversionWorkspaceRevisionsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/DescribeConversionWorkspaceRevisions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"DescribeConversionWorkspaceRevisions",
),
);
self.inner.unary(req, path, codec).await
}
/// Fetches a set of static IP addresses that need to be allowlisted by the
/// customer when using the static-IP connectivity method.
pub async fn fetch_static_ips(
&mut self,
request: impl tonic::IntoRequest<super::FetchStaticIpsRequest>,
) -> std::result::Result<
tonic::Response<super::FetchStaticIpsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.clouddms.v1.DataMigrationService/FetchStaticIps",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.clouddms.v1.DataMigrationService",
"FetchStaticIps",
),
);
self.inner.unary(req, path, codec).await
}
}
}