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 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945
// This file is @generated by prost-build.
/// An entry for an Access Control list.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AclEntry {
/// The allowlisted value for the access control list.
#[prost(string, tag = "1")]
pub value: ::prost::alloc::string::String,
/// 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, optional, tag = "2")]
pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
/// Optional. A label to identify this entry.
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
/// This is always `sql#aclEntry`.
#[prost(string, tag = "4")]
pub kind: ::prost::alloc::string::String,
}
/// An Admin API warning message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiWarning {
/// Code to uniquely identify the warning type.
#[prost(enumeration = "api_warning::SqlApiWarningCode", tag = "1")]
pub code: i32,
/// The warning message.
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
/// The region name for REGION_UNREACHABLE warning.
#[prost(string, tag = "3")]
pub region: ::prost::alloc::string::String,
}
/// Nested message and enum types in `ApiWarning`.
pub mod api_warning {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SqlApiWarningCode {
/// An unknown or unset warning type from Cloud SQL API.
Unspecified = 0,
/// Warning when one or more regions are not reachable. The returned result
/// set may be incomplete.
RegionUnreachable = 1,
/// Warning when user provided maxResults parameter exceeds the limit. The
/// returned result set may be incomplete.
MaxResultsExceedsLimit = 2,
/// Warning when user tries to create/update a user with credentials that
/// have previously been compromised by a public data breach.
CompromisedCredentials = 3,
/// Warning when the operation succeeds but some non-critical workflow state
/// failed.
InternalStateFailure = 4,
}
impl SqlApiWarningCode {
/// 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 {
SqlApiWarningCode::Unspecified => "SQL_API_WARNING_CODE_UNSPECIFIED",
SqlApiWarningCode::RegionUnreachable => "REGION_UNREACHABLE",
SqlApiWarningCode::MaxResultsExceedsLimit => "MAX_RESULTS_EXCEEDS_LIMIT",
SqlApiWarningCode::CompromisedCredentials => "COMPROMISED_CREDENTIALS",
SqlApiWarningCode::InternalStateFailure => "INTERNAL_STATE_FAILURE",
}
}
/// 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_API_WARNING_CODE_UNSPECIFIED" => Some(Self::Unspecified),
"REGION_UNREACHABLE" => Some(Self::RegionUnreachable),
"MAX_RESULTS_EXCEEDS_LIMIT" => Some(Self::MaxResultsExceedsLimit),
"COMPROMISED_CREDENTIALS" => Some(Self::CompromisedCredentials),
"INTERNAL_STATE_FAILURE" => Some(Self::InternalStateFailure),
_ => None,
}
}
}
}
/// We currently only support backup retention by specifying the number
/// of backups we will retain.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BackupRetentionSettings {
/// The unit that 'retained_backups' represents.
#[prost(enumeration = "backup_retention_settings::RetentionUnit", tag = "1")]
pub retention_unit: i32,
/// Depending on the value of retention_unit, this is used to determine
/// if a backup needs to be deleted. If retention_unit is 'COUNT', we will
/// retain this many backups.
#[prost(message, optional, tag = "2")]
pub retained_backups: ::core::option::Option<i32>,
}
/// Nested message and enum types in `BackupRetentionSettings`.
pub mod backup_retention_settings {
/// The units that retained_backups specifies, we only support COUNT.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RetentionUnit {
/// Backup retention unit is unspecified, will be treated as COUNT.
Unspecified = 0,
/// Retention will be by count, eg. "retain the most recent 7 backups".
Count = 1,
}
impl RetentionUnit {
/// 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 {
RetentionUnit::Unspecified => "RETENTION_UNIT_UNSPECIFIED",
RetentionUnit::Count => "COUNT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RETENTION_UNIT_UNSPECIFIED" => Some(Self::Unspecified),
"COUNT" => Some(Self::Count),
_ => None,
}
}
}
}
/// Database instance backup configuration.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupConfiguration {
/// Start time for the daily backup configuration in UTC timezone in the 24
/// hour format - `HH:MM`.
#[prost(string, tag = "1")]
pub start_time: ::prost::alloc::string::String,
/// Whether this configuration is enabled.
#[prost(message, optional, tag = "2")]
pub enabled: ::core::option::Option<bool>,
/// This is always `sql#backupConfiguration`.
#[prost(string, tag = "3")]
pub kind: ::prost::alloc::string::String,
/// (MySQL only) Whether binary log is enabled. If backup configuration is
/// disabled, binarylog must be disabled as well.
#[prost(message, optional, tag = "4")]
pub binary_log_enabled: ::core::option::Option<bool>,
/// Reserved for future use.
#[prost(message, optional, tag = "5")]
pub replication_log_archiving_enabled: ::core::option::Option<bool>,
/// Location of the backup
#[prost(string, tag = "6")]
pub location: ::prost::alloc::string::String,
/// Whether point in time recovery is enabled.
#[prost(message, optional, tag = "7")]
pub point_in_time_recovery_enabled: ::core::option::Option<bool>,
/// The number of days of transaction logs we retain for point in time
/// restore, from 1-7.
#[prost(message, optional, tag = "9")]
pub transaction_log_retention_days: ::core::option::Option<i32>,
/// Backup retention settings.
#[prost(message, optional, tag = "10")]
pub backup_retention_settings: ::core::option::Option<BackupRetentionSettings>,
/// Output only. This value contains the storage location of transactional logs
/// for the database for point-in-time recovery.
#[prost(
enumeration = "backup_configuration::TransactionalLogStorageState",
optional,
tag = "11"
)]
pub transactional_log_storage_state: ::core::option::Option<i32>,
}
/// Nested message and enum types in `BackupConfiguration`.
pub mod backup_configuration {
/// This value contains the storage location of the transactional logs
/// used to perform point-in-time recovery (PITR) for the database.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum TransactionalLogStorageState {
/// Unspecified.
Unspecified = 0,
/// The transaction logs used for PITR for the instance are stored
/// on a data disk.
Disk = 1,
/// The transaction logs used for PITR for the instance are switching from
/// being stored on a data disk to being stored in Cloud Storage.
/// Only applicable to MySQL.
SwitchingToCloudStorage = 2,
/// The transaction logs used for PITR for the instance are now stored
/// in Cloud Storage. Previously, they were stored on a data disk.
/// Only applicable to MySQL.
SwitchedToCloudStorage = 3,
/// The transaction logs used for PITR for the instance are stored in
/// Cloud Storage. Only applicable to MySQL and PostgreSQL.
CloudStorage = 4,
}
impl TransactionalLogStorageState {
/// 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 {
TransactionalLogStorageState::Unspecified => {
"TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED"
}
TransactionalLogStorageState::Disk => "DISK",
TransactionalLogStorageState::SwitchingToCloudStorage => {
"SWITCHING_TO_CLOUD_STORAGE"
}
TransactionalLogStorageState::SwitchedToCloudStorage => {
"SWITCHED_TO_CLOUD_STORAGE"
}
TransactionalLogStorageState::CloudStorage => "CLOUD_STORAGE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"DISK" => Some(Self::Disk),
"SWITCHING_TO_CLOUD_STORAGE" => Some(Self::SwitchingToCloudStorage),
"SWITCHED_TO_CLOUD_STORAGE" => Some(Self::SwitchedToCloudStorage),
"CLOUD_STORAGE" => Some(Self::CloudStorage),
_ => None,
}
}
}
}
/// A BackupRun resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupRun {
/// This is always `sql#backupRun`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// The status of this run.
#[prost(enumeration = "SqlBackupRunStatus", tag = "2")]
pub status: i32,
/// The time the run was enqueued in UTC timezone in
/// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
/// `2012-11-15T16:19:00.094Z`.
#[prost(message, optional, tag = "3")]
pub enqueued_time: ::core::option::Option<::prost_types::Timestamp>,
/// The identifier for this backup run. Unique only for a specific Cloud SQL
/// instance.
#[prost(int64, tag = "4")]
pub id: i64,
/// The time the backup operation actually started in UTC timezone in
/// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
/// `2012-11-15T16:19:00.094Z`.
#[prost(message, optional, tag = "5")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// The time the backup operation completed in UTC timezone in
/// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
/// `2012-11-15T16:19:00.094Z`.
#[prost(message, optional, tag = "6")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// Information about why the backup operation failed. This is only present if
/// the run has the FAILED status.
#[prost(message, optional, tag = "7")]
pub error: ::core::option::Option<OperationError>,
/// The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL".
/// This field defaults to "ON_DEMAND" and is ignored, when specified for
/// insert requests.
#[prost(enumeration = "SqlBackupRunType", tag = "8")]
pub r#type: i32,
/// The description of this run, only applicable to on-demand backups.
#[prost(string, tag = "9")]
pub description: ::prost::alloc::string::String,
/// The start time of the backup window during which this the backup was
/// attempted in [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for
/// example `2012-11-15T16:19:00.094Z`.
#[prost(message, optional, tag = "10")]
pub window_start_time: ::core::option::Option<::prost_types::Timestamp>,
/// Name of the database instance.
#[prost(string, tag = "11")]
pub instance: ::prost::alloc::string::String,
/// The URI of this resource.
#[prost(string, tag = "12")]
pub self_link: ::prost::alloc::string::String,
/// Location of the backups.
#[prost(string, tag = "13")]
pub location: ::prost::alloc::string::String,
/// Encryption configuration specific to a backup.
#[prost(message, optional, tag = "16")]
pub disk_encryption_configuration: ::core::option::Option<
DiskEncryptionConfiguration,
>,
/// Encryption status specific to a backup.
#[prost(message, optional, tag = "17")]
pub disk_encryption_status: ::core::option::Option<DiskEncryptionStatus>,
/// Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
#[prost(enumeration = "SqlBackupKind", tag = "19")]
pub backup_kind: i32,
/// Backup time zone to prevent restores to an instance with
/// a different time zone. Now relevant only for SQL Server.
#[prost(string, tag = "23")]
pub time_zone: ::prost::alloc::string::String,
}
/// Backup run list results.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupRunsListResponse {
/// This is always `sql#backupRunsList`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// A list of backup runs in reverse chronological order of the enqueued time.
#[prost(message, repeated, tag = "2")]
pub items: ::prost::alloc::vec::Vec<BackupRun>,
/// The continuation token, used to page through large result sets. Provide
/// this value in a subsequent request to return the next page of results.
#[prost(string, tag = "3")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Binary log coordinates.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BinLogCoordinates {
/// Name of the binary log file for a Cloud SQL instance.
#[prost(string, tag = "1")]
pub bin_log_file_name: ::prost::alloc::string::String,
/// Position (offset) within the binary log file.
#[prost(int64, tag = "2")]
pub bin_log_position: i64,
/// This is always `sql#binLogCoordinates`.
#[prost(string, tag = "3")]
pub kind: ::prost::alloc::string::String,
}
/// Backup context.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupContext {
/// The identifier of the backup.
#[prost(int64, tag = "1")]
pub backup_id: i64,
/// This is always `sql#backupContext`.
#[prost(string, tag = "2")]
pub kind: ::prost::alloc::string::String,
}
/// Database instance clone context.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloneContext {
/// This is always `sql#cloneContext`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// Reserved for future use.
#[prost(int64, tag = "2")]
pub pitr_timestamp_ms: i64,
/// Name of the Cloud SQL instance to be created as a clone.
#[prost(string, tag = "3")]
pub destination_instance_name: ::prost::alloc::string::String,
/// Binary log coordinates, if specified, identify the position up to which the
/// source instance is cloned. If not specified, the source instance is
/// cloned up to the most recent binary log coordinates.
#[prost(message, optional, tag = "4")]
pub bin_log_coordinates: ::core::option::Option<BinLogCoordinates>,
/// Timestamp, if specified, identifies the time to which the source instance
/// is cloned.
#[prost(message, optional, tag = "5")]
pub point_in_time: ::core::option::Option<::prost_types::Timestamp>,
/// The name of the allocated ip range for the private ip Cloud SQL instance.
/// For example: "google-managed-services-default". If set, the cloned instance
/// ip will be created in the allocated range. The range name must comply with
/// [RFC 1035](<https://tools.ietf.org/html/rfc1035>). Specifically, the name
/// must be 1-63 characters long and match the regular expression
/// [a-z](\[-a-z0-9\]*[a-z0-9])?.
/// Reserved for future use.
#[prost(string, tag = "6")]
pub allocated_ip_range: ::prost::alloc::string::String,
/// (SQL Server only) Clone only the specified databases from the source
/// instance. Clone all databases if empty.
#[prost(string, repeated, tag = "9")]
pub database_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. Copy clone and point-in-time recovery clone of an instance to the
/// specified zone. If no zone is specified, clone to the same primary zone as
/// the source instance.
#[prost(string, optional, tag = "10")]
pub preferred_zone: ::core::option::Option<::prost::alloc::string::String>,
/// Optional. Copy clone and point-in-time recovery clone of a regional
/// instance in the specified zones. If not specified, clone to the same
/// secondary zone as the source instance. This value cannot be the same as the
/// preferred_zone field.
#[prost(string, optional, tag = "11")]
pub preferred_secondary_zone: ::core::option::Option<::prost::alloc::string::String>,
}
/// Represents a SQL database on the Cloud SQL instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Database {
/// This is always `sql#database`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// The Cloud SQL charset value.
#[prost(string, tag = "2")]
pub charset: ::prost::alloc::string::String,
/// The Cloud SQL collation value.
#[prost(string, tag = "3")]
pub collation: ::prost::alloc::string::String,
/// This field is deprecated and will be removed from a future version of the
/// API.
#[prost(string, tag = "4")]
pub etag: ::prost::alloc::string::String,
/// The name of the database in the Cloud SQL instance. This does not include
/// the project ID or instance name.
#[prost(string, tag = "5")]
pub name: ::prost::alloc::string::String,
/// The name of the Cloud SQL instance. This does not include the project ID.
#[prost(string, tag = "6")]
pub instance: ::prost::alloc::string::String,
/// The URI of this resource.
#[prost(string, tag = "7")]
pub self_link: ::prost::alloc::string::String,
/// The project ID of the project containing the Cloud SQL database. The Google
/// apps domain is prefixed if applicable.
#[prost(string, tag = "8")]
pub project: ::prost::alloc::string::String,
#[prost(oneof = "database::DatabaseDetails", tags = "9")]
pub database_details: ::core::option::Option<database::DatabaseDetails>,
}
/// Nested message and enum types in `Database`.
pub mod database {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum DatabaseDetails {
#[prost(message, tag = "9")]
SqlserverDatabaseDetails(super::SqlServerDatabaseDetails),
}
}
/// Represents a Sql Server database on the Cloud SQL instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlServerDatabaseDetails {
/// The version of SQL Server with which the database is to be made compatible
#[prost(int32, tag = "1")]
pub compatibility_level: i32,
/// The recovery model of a SQL Server database
#[prost(string, tag = "2")]
pub recovery_model: ::prost::alloc::string::String,
}
/// Database flags for Cloud SQL instances.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseFlags {
/// The name of the flag. These flags are passed at instance startup, so
/// include both server options and system variables. Flags are
/// specified with underscores, not hyphens. For more information, see
/// [Configuring Database Flags](<https://cloud.google.com/sql/docs/mysql/flags>)
/// in the Cloud SQL documentation.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The value of the flag. Boolean flags are set to `on` for true
/// and `off` for false. This field must be omitted if the flag
/// doesn't take a value.
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
/// Initial sync flags for certain Cloud SQL APIs.
/// Currently used for the MySQL external server initial dump.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncFlags {
/// The name of the flag.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The value of the flag. This field must be omitted if the flag
/// doesn't take a value.
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
/// Reference to another Cloud SQL instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstanceReference {
/// The name of the Cloud SQL instance being referenced.
/// This does not include the project ID.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The region of the Cloud SQL instance being referenced.
#[prost(string, tag = "2")]
pub region: ::prost::alloc::string::String,
/// The project ID of the Cloud SQL instance being referenced.
/// The default is the same project ID as the instance references it.
#[prost(string, tag = "3")]
pub project: ::prost::alloc::string::String,
}
/// A Cloud SQL instance resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseInstance {
/// This is always `sql#instance`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// The current serving state of the Cloud SQL instance.
#[prost(enumeration = "database_instance::SqlInstanceState", tag = "2")]
pub state: i32,
/// The database engine type and version. The `databaseVersion` field cannot
/// be changed after instance creation.
#[prost(enumeration = "SqlDatabaseVersion", tag = "3")]
pub database_version: i32,
/// The user settings.
#[prost(message, optional, tag = "4")]
pub settings: ::core::option::Option<Settings>,
/// This field is deprecated and will be removed from a future version of the
/// API. Use the `settings.settingsVersion` field instead.
#[prost(string, tag = "5")]
pub etag: ::prost::alloc::string::String,
/// The name and status of the failover replica.
#[prost(message, optional, tag = "6")]
pub failover_replica: ::core::option::Option<database_instance::SqlFailoverReplica>,
/// The name of the instance which will act as primary in the replication
/// setup.
#[prost(string, tag = "7")]
pub master_instance_name: ::prost::alloc::string::String,
/// The replicas of the instance.
#[prost(string, repeated, tag = "8")]
pub replica_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The maximum disk size of the instance in bytes.
#[deprecated]
#[prost(message, optional, tag = "9")]
pub max_disk_size: ::core::option::Option<i64>,
/// The current disk usage of the instance in bytes. This property has been
/// deprecated. Use the
/// "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
/// Monitoring API instead. Please see [this
/// announcement](<https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ>)
/// for details.
#[deprecated]
#[prost(message, optional, tag = "10")]
pub current_disk_size: ::core::option::Option<i64>,
/// The assigned IP addresses for the instance.
#[prost(message, repeated, tag = "11")]
pub ip_addresses: ::prost::alloc::vec::Vec<IpMapping>,
/// SSL configuration.
#[prost(message, optional, tag = "12")]
pub server_ca_cert: ::core::option::Option<SslCert>,
/// The instance type.
#[prost(enumeration = "SqlInstanceType", tag = "13")]
pub instance_type: i32,
/// The project ID of the project containing the Cloud SQL instance. The Google
/// apps domain is prefixed if applicable.
#[prost(string, tag = "14")]
pub project: ::prost::alloc::string::String,
/// The IPv6 address assigned to the instance.
/// (Deprecated) This property was applicable only
/// to First Generation instances.
#[deprecated]
#[prost(string, tag = "15")]
pub ipv6_address: ::prost::alloc::string::String,
/// The service account email address assigned to the instance. \This
/// property is read-only.
#[prost(string, tag = "16")]
pub service_account_email_address: ::prost::alloc::string::String,
/// Configuration specific to on-premises instances.
#[prost(message, optional, tag = "17")]
pub on_premises_configuration: ::core::option::Option<OnPremisesConfiguration>,
/// Configuration specific to failover replicas and read replicas.
#[prost(message, optional, tag = "18")]
pub replica_configuration: ::core::option::Option<ReplicaConfiguration>,
/// The backend type.
/// `SECOND_GEN`: Cloud SQL database instance.
/// `EXTERNAL`: A database server that is not managed by Google.
///
/// This property is read-only; use the `tier` property in the `settings`
/// object to determine the database type.
#[prost(enumeration = "SqlBackendType", tag = "19")]
pub backend_type: i32,
/// The URI of this resource.
#[prost(string, tag = "20")]
pub self_link: ::prost::alloc::string::String,
/// If the instance state is SUSPENDED, the reason for the suspension.
#[prost(enumeration = "SqlSuspensionReason", repeated, tag = "21")]
pub suspension_reason: ::prost::alloc::vec::Vec<i32>,
/// Connection name of the Cloud SQL instance used in connection strings.
#[prost(string, tag = "22")]
pub connection_name: ::prost::alloc::string::String,
/// Name of the Cloud SQL instance. This does not include the project ID.
#[prost(string, tag = "23")]
pub name: ::prost::alloc::string::String,
/// The geographical region of the Cloud SQL instance.
///
/// It can be one of the
/// [regions](<https://cloud.google.com/sql/docs/mysql/locations#location-r>)
/// where Cloud SQL operates:
///
/// For example, `asia-east1`, `europe-west1`, and `us-central1`.
/// The default value is `us-central1`.
#[prost(string, tag = "24")]
pub region: ::prost::alloc::string::String,
/// The Compute Engine zone that the instance is currently serving from. This
/// value could be different from the zone that was specified when the instance
/// was created if the instance has failed over to its secondary zone. WARNING:
/// Changing this might restart the instance.
#[prost(string, tag = "25")]
pub gce_zone: ::prost::alloc::string::String,
/// The Compute Engine zone that the failover instance is currently serving
/// from for a regional instance. This value could be different
/// from the zone that was specified when the instance
/// was created if the instance has failed over to its secondary/failover zone.
#[prost(string, tag = "34")]
pub secondary_gce_zone: ::prost::alloc::string::String,
/// Disk encryption configuration specific to an instance.
#[prost(message, optional, tag = "26")]
pub disk_encryption_configuration: ::core::option::Option<
DiskEncryptionConfiguration,
>,
/// Disk encryption status specific to an instance.
#[prost(message, optional, tag = "27")]
pub disk_encryption_status: ::core::option::Option<DiskEncryptionStatus>,
/// Initial root password. Use only on creation. You must set root passwords
/// before you can connect to PostgreSQL instances.
#[prost(string, tag = "29")]
pub root_password: ::prost::alloc::string::String,
/// The start time of any upcoming scheduled maintenance for this instance.
#[prost(message, optional, tag = "30")]
pub scheduled_maintenance: ::core::option::Option<
database_instance::SqlScheduledMaintenance,
>,
/// This status indicates whether the instance satisfies PZS.
///
/// The status is reserved for future use.
#[prost(message, optional, tag = "35")]
pub satisfies_pzs: ::core::option::Option<bool>,
/// Output only. Stores the current database version running on the instance
/// including minor version such as `MYSQL_8_0_18`.
#[prost(string, tag = "40")]
pub database_installed_version: ::prost::alloc::string::String,
/// This field represents the report generated by the proactive database
/// wellness job for OutOfDisk issues.
/// * Writers:
/// * the proactive database wellness job for OOD.
/// * Readers:
/// * the proactive database wellness job
#[prost(message, optional, tag = "38")]
pub out_of_disk_report: ::core::option::Option<
database_instance::SqlOutOfDiskReport,
>,
/// Output only. The time when the instance was created in
/// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
/// `2012-11-15T16:19:00.094Z`.
#[prost(message, optional, tag = "39")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. List all maintenance versions applicable on the instance
#[prost(string, repeated, tag = "41")]
pub available_maintenance_versions: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
/// The current software version on the instance.
#[prost(string, tag = "42")]
pub maintenance_version: ::prost::alloc::string::String,
/// Output only. All database versions that are available for upgrade.
#[prost(message, repeated, tag = "45")]
pub upgradable_database_versions: ::prost::alloc::vec::Vec<AvailableDatabaseVersion>,
/// The SQL network architecture for the instance.
#[prost(
enumeration = "database_instance::SqlNetworkArchitecture",
optional,
tag = "47"
)]
pub sql_network_architecture: ::core::option::Option<i32>,
/// Output only. The link to service attachment of PSC instance.
#[prost(string, optional, tag = "48")]
pub psc_service_attachment_link: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Output only. The dns name of the instance.
#[prost(string, optional, tag = "49")]
pub dns_name: ::core::option::Option<::prost::alloc::string::String>,
/// Output only. DEPRECATED: please use write_endpoint instead.
#[deprecated]
#[prost(string, optional, tag = "51")]
pub primary_dns_name: ::core::option::Option<::prost::alloc::string::String>,
/// Output only. The dns name of the primary instance in a replication group.
#[prost(string, optional, tag = "52")]
pub write_endpoint: ::core::option::Option<::prost::alloc::string::String>,
/// A primary instance and disaster recovery (DR) replica pair.
/// A DR replica is a cross-region replica that you designate
/// for failover in the event that the primary instance
/// experiences regional failure. Only applicable to MySQL.
#[prost(message, optional, tag = "54")]
pub replication_cluster: ::core::option::Option<ReplicationCluster>,
/// Gemini instance configuration.
#[prost(message, optional, tag = "55")]
pub gemini_config: ::core::option::Option<GeminiInstanceConfig>,
}
/// Nested message and enum types in `DatabaseInstance`.
pub mod database_instance {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlFailoverReplica {
/// The name of the failover replica. If specified at instance creation, a
/// failover replica is created for the instance. The name
/// doesn't include the project ID.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The availability status of the failover replica. A false status indicates
/// that the failover replica is out of sync. The primary instance can only
/// failover to the failover replica when the status is true.
#[prost(message, optional, tag = "2")]
pub available: ::core::option::Option<bool>,
}
/// Any scheduled maintenance for this instance.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SqlScheduledMaintenance {
/// The start time of any upcoming scheduled maintenance for this instance.
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[deprecated]
#[prost(bool, tag = "2")]
pub can_defer: bool,
/// If the scheduled maintenance can be rescheduled.
#[prost(bool, tag = "3")]
pub can_reschedule: bool,
/// Maintenance cannot be rescheduled to start beyond this deadline.
#[prost(message, optional, tag = "4")]
pub schedule_deadline_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// This message wraps up the information written by out-of-disk detection job.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SqlOutOfDiskReport {
/// This field represents the state generated by the proactive database
/// wellness job for OutOfDisk issues.
/// * Writers:
/// * the proactive database wellness job for OOD.
/// * Readers:
/// * the proactive database wellness job
#[prost(
enumeration = "sql_out_of_disk_report::SqlOutOfDiskState",
optional,
tag = "1"
)]
pub sql_out_of_disk_state: ::core::option::Option<i32>,
/// The minimum recommended increase size in GigaBytes
/// This field is consumed by the frontend
/// * Writers:
/// * the proactive database wellness job for OOD.
/// * Readers:
#[prost(int32, optional, tag = "2")]
pub sql_min_recommended_increase_size_gb: ::core::option::Option<i32>,
}
/// Nested message and enum types in `SqlOutOfDiskReport`.
pub mod sql_out_of_disk_report {
/// This enum lists all possible states regarding out-of-disk issues.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SqlOutOfDiskState {
/// Unspecified state
Unspecified = 0,
/// The instance has plenty space on data disk
Normal = 1,
/// Data disk is almost used up. It is shutdown to prevent data
/// corruption.
SoftShutdown = 2,
}
impl SqlOutOfDiskState {
/// 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 {
SqlOutOfDiskState::Unspecified => "SQL_OUT_OF_DISK_STATE_UNSPECIFIED",
SqlOutOfDiskState::Normal => "NORMAL",
SqlOutOfDiskState::SoftShutdown => "SOFT_SHUTDOWN",
}
}
/// 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_OUT_OF_DISK_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"NORMAL" => Some(Self::Normal),
"SOFT_SHUTDOWN" => Some(Self::SoftShutdown),
_ => None,
}
}
}
}
/// The current serving state of the database instance.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SqlInstanceState {
/// The state of the instance is unknown.
Unspecified = 0,
/// The instance is running, or has been stopped by owner.
Runnable = 1,
/// The instance is not available, for example due to problems with billing.
Suspended = 2,
/// The instance is being deleted.
PendingDelete = 3,
/// The instance is being created.
PendingCreate = 4,
/// The instance is down for maintenance.
Maintenance = 5,
/// The creation of the instance failed or a fatal error occurred during
/// maintenance.
Failed = 6,
/// Deprecated
OnlineMaintenance = 7,
}
impl SqlInstanceState {
/// 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 {
SqlInstanceState::Unspecified => "SQL_INSTANCE_STATE_UNSPECIFIED",
SqlInstanceState::Runnable => "RUNNABLE",
SqlInstanceState::Suspended => "SUSPENDED",
SqlInstanceState::PendingDelete => "PENDING_DELETE",
SqlInstanceState::PendingCreate => "PENDING_CREATE",
SqlInstanceState::Maintenance => "MAINTENANCE",
SqlInstanceState::Failed => "FAILED",
SqlInstanceState::OnlineMaintenance => "ONLINE_MAINTENANCE",
}
}
/// 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_INSTANCE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"RUNNABLE" => Some(Self::Runnable),
"SUSPENDED" => Some(Self::Suspended),
"PENDING_DELETE" => Some(Self::PendingDelete),
"PENDING_CREATE" => Some(Self::PendingCreate),
"MAINTENANCE" => Some(Self::Maintenance),
"FAILED" => Some(Self::Failed),
"ONLINE_MAINTENANCE" => Some(Self::OnlineMaintenance),
_ => None,
}
}
}
/// The SQL network architecture for the instance.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SqlNetworkArchitecture {
Unspecified = 0,
/// The instance uses the new network architecture.
NewNetworkArchitecture = 1,
/// The instance uses the old network architecture.
OldNetworkArchitecture = 2,
}
impl SqlNetworkArchitecture {
/// 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 {
SqlNetworkArchitecture::Unspecified => {
"SQL_NETWORK_ARCHITECTURE_UNSPECIFIED"
}
SqlNetworkArchitecture::NewNetworkArchitecture => {
"NEW_NETWORK_ARCHITECTURE"
}
SqlNetworkArchitecture::OldNetworkArchitecture => {
"OLD_NETWORK_ARCHITECTURE"
}
}
}
/// 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_NETWORK_ARCHITECTURE_UNSPECIFIED" => Some(Self::Unspecified),
"NEW_NETWORK_ARCHITECTURE" => Some(Self::NewNetworkArchitecture),
"OLD_NETWORK_ARCHITECTURE" => Some(Self::OldNetworkArchitecture),
_ => None,
}
}
}
}
/// Gemini instance configuration.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GeminiInstanceConfig {
/// Output only. Whether Gemini is enabled.
#[prost(bool, optional, tag = "1")]
pub entitled: ::core::option::Option<bool>,
/// Output only. Whether the vacuum management is enabled.
#[prost(bool, optional, tag = "2")]
pub google_vacuum_mgmt_enabled: ::core::option::Option<bool>,
/// Output only. Whether canceling the out-of-memory (OOM) session is enabled.
#[prost(bool, optional, tag = "3")]
pub oom_session_cancel_enabled: ::core::option::Option<bool>,
/// Output only. Whether the active query is enabled.
#[prost(bool, optional, tag = "4")]
pub active_query_enabled: ::core::option::Option<bool>,
/// Output only. Whether the index advisor is enabled.
#[prost(bool, optional, tag = "5")]
pub index_advisor_enabled: ::core::option::Option<bool>,
/// Output only. Whether the flag recommender is enabled.
#[prost(bool, optional, tag = "6")]
pub flag_recommender_enabled: ::core::option::Option<bool>,
}
/// A primary instance and disaster recovery (DR) replica pair.
/// A DR replica is a cross-region replica that you designate for failover
/// in the event that the primary instance has regional failure.
/// Only applicable to MySQL.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplicationCluster {
/// Output only. If set, it indicates this instance has a private service
/// access (PSA) dns endpoint that is pointing to the primary instance of the
/// cluster. If this instance is the primary, the dns should be pointing to
/// this instance. After Switchover or Replica failover, this DNS endpoint
/// points to the promoted instance. This is a read-only field, returned to the
/// user as information. This field can exist even if a standalone instance
/// does not yet have a replica, or had a DR replica that was deleted.
#[prost(string, optional, tag = "1")]
pub psa_write_endpoint: ::core::option::Option<::prost::alloc::string::String>,
/// Optional. If the instance is a primary instance, then this field identifies
/// the disaster recovery (DR) replica. A DR replica is an optional
/// configuration for Enterprise Plus edition instances. If the instance is a
/// read replica, then the field is not set. Set this field to a replica name
/// to designate a DR replica for a primary instance. Remove the replica name
/// to remove the DR replica designation.
#[prost(string, optional, tag = "2")]
pub failover_dr_replica_name: ::core::option::Option<::prost::alloc::string::String>,
/// Output only. Read-only field that indicates whether the replica is a DR
/// replica. This field is not set if the instance is a primary instance.
#[prost(bool, optional, tag = "4")]
pub dr_replica: ::core::option::Option<bool>,
}
/// An available database version. It can be a major or a minor version.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AvailableDatabaseVersion {
/// The version's major version name.
#[prost(string, optional, tag = "3")]
pub major_version: ::core::option::Option<::prost::alloc::string::String>,
/// The database version name. For MySQL 8.0, this string provides the database
/// major and minor version.
#[prost(string, optional, tag = "8")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
/// The database version's display name.
#[prost(string, optional, tag = "9")]
pub display_name: ::core::option::Option<::prost::alloc::string::String>,
}
/// Database list response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabasesListResponse {
/// This is always `sql#databasesList`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// List of database resources in the instance.
#[prost(message, repeated, tag = "2")]
pub items: ::prost::alloc::vec::Vec<Database>,
}
/// Read-replica configuration for connecting to the on-premises primary
/// instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DemoteMasterConfiguration {
/// This is always `sql#demoteMasterConfiguration`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// MySQL specific configuration when replicating from a MySQL on-premises
/// primary instance. Replication configuration information such as the
/// username, password, certificates, and keys are not stored in the instance
/// metadata. The configuration information is used only to set up the
/// replication connection and is stored by MySQL in a file named
/// `master.info` in the data directory.
#[prost(message, optional, tag = "2")]
pub mysql_replica_configuration: ::core::option::Option<
DemoteMasterMySqlReplicaConfiguration,
>,
}
/// Database instance demote primary instance context.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DemoteMasterContext {
/// This is always `sql#demoteMasterContext`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// Verify the GTID consistency for demote operation. Default value:
/// `True`. Setting this flag to `false` enables you to bypass the GTID
/// consistency check between on-premises primary instance and Cloud SQL
/// instance during the demotion operation but also exposes you to the risk of
/// future replication failures. Change the value only if you know the reason
/// for the GTID divergence and are confident that doing so will not cause any
/// replication issues.
#[prost(message, optional, tag = "2")]
pub verify_gtid_consistency: ::core::option::Option<bool>,
/// The name of the instance which will act as on-premises primary instance
/// in the replication setup.
#[prost(string, tag = "3")]
pub master_instance_name: ::prost::alloc::string::String,
/// Configuration specific to read-replicas replicating from the on-premises
/// primary instance.
#[prost(message, optional, tag = "4")]
pub replica_configuration: ::core::option::Option<DemoteMasterConfiguration>,
/// Flag to skip replication setup on the instance.
#[prost(bool, tag = "5")]
pub skip_replication_setup: bool,
}
/// Read-replica configuration specific to MySQL databases.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DemoteMasterMySqlReplicaConfiguration {
/// This is always `sql#demoteMasterMysqlReplicaConfiguration`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// The username for the replication connection.
#[prost(string, tag = "2")]
pub username: ::prost::alloc::string::String,
/// The password for the replication connection.
#[prost(string, tag = "3")]
pub password: ::prost::alloc::string::String,
/// PEM representation of the replica's private key. The corresponsing public
/// key is encoded in the client's certificate. The format of the replica's
/// private key can be either PKCS #1 or PKCS #8.
#[prost(string, tag = "4")]
pub client_key: ::prost::alloc::string::String,
/// PEM representation of the replica's x509 certificate.
#[prost(string, tag = "5")]
pub client_certificate: ::prost::alloc::string::String,
/// PEM representation of the trusted CA's x509 certificate.
#[prost(string, tag = "6")]
pub ca_certificate: ::prost::alloc::string::String,
}
/// This context is used to demote an existing standalone instance to be
/// a Cloud SQL read replica for an external database server.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DemoteContext {
/// This is always `sql#demoteContext`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// Required. The name of the instance which acts as an on-premises primary
/// instance in the replication setup.
#[prost(string, tag = "2")]
pub source_representative_instance_name: ::prost::alloc::string::String,
}
/// Database instance export context.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportContext {
/// The path to the file in Google Cloud Storage where the export will be
/// stored. The URI is in the form `gs://bucketName/fileName`. If the file
/// already exists, the request succeeds, but the operation fails. If
/// `fileType` is `SQL` and the filename ends with .gz,
/// the contents are compressed.
#[prost(string, tag = "1")]
pub uri: ::prost::alloc::string::String,
/// Databases to be exported. <br /> `MySQL instances:` If
/// `fileType` is `SQL` and no database is specified, all
/// databases are exported, except for the `mysql` system database.
/// If `fileType` is `CSV`, you can specify one database,
/// either by using this property or by using the
/// `csvExportOptions.selectQuery` property, which takes precedence
/// over this property. <br /> `PostgreSQL instances:` You must specify
/// one database to be exported. If `fileType` is `CSV`,
/// this database must match the one specified in the
/// `csvExportOptions.selectQuery` property. <br /> `SQL Server
/// instances:` You must specify one database to be exported, and the
/// `fileType` must be `BAK`.
#[prost(string, repeated, tag = "2")]
pub databases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// This is always `sql#exportContext`.
#[prost(string, tag = "3")]
pub kind: ::prost::alloc::string::String,
/// Options for exporting data as SQL statements.
#[prost(message, optional, tag = "4")]
pub sql_export_options: ::core::option::Option<export_context::SqlExportOptions>,
/// Options for exporting data as CSV. `MySQL` and `PostgreSQL`
/// instances only.
#[prost(message, optional, tag = "5")]
pub csv_export_options: ::core::option::Option<export_context::SqlCsvExportOptions>,
/// The file type for the specified uri.
#[prost(enumeration = "SqlFileType", tag = "6")]
pub file_type: i32,
/// Option for export offload.
#[prost(message, optional, tag = "8")]
pub offload: ::core::option::Option<bool>,
/// Options for exporting data as BAK files.
#[prost(message, optional, tag = "9")]
pub bak_export_options: ::core::option::Option<export_context::SqlBakExportOptions>,
}
/// Nested message and enum types in `ExportContext`.
pub mod export_context {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlCsvExportOptions {
/// The select query used to extract the data.
#[prost(string, tag = "1")]
pub select_query: ::prost::alloc::string::String,
/// Specifies the character that should appear before a data character that
/// needs to be escaped.
#[prost(string, tag = "2")]
pub escape_character: ::prost::alloc::string::String,
/// Specifies the quoting character to be used when a data value is quoted.
#[prost(string, tag = "3")]
pub quote_character: ::prost::alloc::string::String,
/// Specifies the character that separates columns within each row (line) of
/// the file.
#[prost(string, tag = "4")]
pub fields_terminated_by: ::prost::alloc::string::String,
/// This is used to separate lines. If a line does not contain all fields,
/// the rest of the columns are set to their default values.
#[prost(string, tag = "6")]
pub lines_terminated_by: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlExportOptions {
/// Tables to export, or that were exported, from the specified database. If
/// you specify tables, specify one and only one database. For PostgreSQL
/// instances, you can specify only one table.
#[prost(string, repeated, tag = "1")]
pub tables: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Export only schemas.
#[prost(message, optional, tag = "2")]
pub schema_only: ::core::option::Option<bool>,
#[prost(message, optional, tag = "3")]
pub mysql_export_options: ::core::option::Option<
sql_export_options::MysqlExportOptions,
>,
/// Optional. The number of threads to use for parallel export.
#[prost(message, optional, tag = "4")]
pub threads: ::core::option::Option<i32>,
/// Optional. Whether or not the export should be parallel.
#[prost(message, optional, tag = "5")]
pub parallel: ::core::option::Option<bool>,
}
/// Nested message and enum types in `SqlExportOptions`.
pub mod sql_export_options {
/// Options for exporting from MySQL.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MysqlExportOptions {
/// Option to include SQL statement required to set up replication. If set
/// to `1`, the dump file includes a CHANGE MASTER TO statement with the
/// binary log coordinates, and --set-gtid-purged is set to ON. If set to
/// `2`, the CHANGE MASTER TO statement is written as a SQL comment and
/// has no effect. If set to any value other than `1`, --set-gtid-purged
/// is set to OFF.
#[prost(message, optional, tag = "1")]
pub master_data: ::core::option::Option<i32>,
}
}
/// Options for exporting BAK files (SQL Server-only)
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SqlBakExportOptions {
/// Whether or not the export should be striped.
#[prost(message, optional, tag = "1")]
pub striped: ::core::option::Option<bool>,
/// Option for specifying how many stripes to use for the export.
/// If blank, and the value of the striped field is true,
/// the number of stripes is automatically chosen.
#[prost(message, optional, tag = "2")]
pub stripe_count: ::core::option::Option<i32>,
/// Type of this bak file will be export, FULL or DIFF, SQL Server only
#[prost(enumeration = "super::BakType", tag = "4")]
pub bak_type: i32,
/// Deprecated: copy_only is deprecated. Use differential_base instead
#[deprecated]
#[prost(message, optional, tag = "5")]
pub copy_only: ::core::option::Option<bool>,
/// Whether or not the backup can be used as a differential base
/// copy_only backup can not be served as differential base
#[prost(message, optional, tag = "6")]
pub differential_base: ::core::option::Option<bool>,
}
}
/// Database instance failover context.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FailoverContext {
/// The current settings version of this instance. Request will be rejected if
/// this version doesn't match the current settings version.
#[prost(int64, tag = "1")]
pub settings_version: i64,
/// This is always `sql#failoverContext`.
#[prost(string, tag = "2")]
pub kind: ::prost::alloc::string::String,
}
/// A flag resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Flag {
/// This is the name of the flag. Flag names always use underscores, not
/// hyphens, for example: `max_allowed_packet`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`,
/// `INTEGER` or `NONE`. `NONE` is used for flags which do not take a
/// value, such as `skip_grant_tables`.
#[prost(enumeration = "SqlFlagType", tag = "2")]
pub r#type: i32,
/// The database version this flag applies to. Can be
/// MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`,
/// or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`,
/// `POSTGRES_11` or `POSTGRES_12`. SQL Server instances:
/// `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`,
/// `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`,
/// `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or
/// `SQLSERVER_2019_WEB`.
/// See [the complete
/// list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).
#[prost(enumeration = "SqlDatabaseVersion", repeated, tag = "3")]
pub applies_to: ::prost::alloc::vec::Vec<i32>,
/// For `STRING` flags, a list of strings that the value can be set to.
#[prost(string, repeated, tag = "4")]
pub allowed_string_values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// For `INTEGER` flags, the minimum allowed value.
#[prost(message, optional, tag = "5")]
pub min_value: ::core::option::Option<i64>,
/// For `INTEGER` flags, the maximum allowed value.
#[prost(message, optional, tag = "6")]
pub max_value: ::core::option::Option<i64>,
/// Indicates whether changing this flag will trigger a database restart. Only
/// applicable to Second Generation instances.
#[prost(message, optional, tag = "7")]
pub requires_restart: ::core::option::Option<bool>,
/// This is always `sql#flag`.
#[prost(string, tag = "8")]
pub kind: ::prost::alloc::string::String,
/// Whether or not the flag is considered in beta.
#[prost(message, optional, tag = "9")]
pub in_beta: ::core::option::Option<bool>,
/// Use this field if only certain integers are accepted. Can be combined
/// with min_value and max_value to add additional values.
#[prost(int64, repeated, tag = "10")]
pub allowed_int_values: ::prost::alloc::vec::Vec<i64>,
}
/// Flags list response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FlagsListResponse {
/// This is always `sql#flagsList`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// List of flags.
#[prost(message, repeated, tag = "2")]
pub items: ::prost::alloc::vec::Vec<Flag>,
}
/// Database instance import context.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportContext {
/// Path to the import file in Cloud Storage, in the form
/// `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported
/// when `fileType` is `SQL`. The instance must have
/// write permissions to the bucket and read access to the file.
#[prost(string, tag = "1")]
pub uri: ::prost::alloc::string::String,
/// The target database for the import. If `fileType` is `SQL`, this field
/// is required only if the import file does not specify a database, and is
/// overridden by any database specification in the import file. If
/// `fileType` is `CSV`, one database must be specified.
#[prost(string, tag = "2")]
pub database: ::prost::alloc::string::String,
/// This is always `sql#importContext`.
#[prost(string, tag = "3")]
pub kind: ::prost::alloc::string::String,
/// The file type for the specified uri.
/// * `SQL`: The file contains SQL statements.
/// * `CSV`: The file contains CSV data.
/// * `BAK`: The file contains backup data for a SQL Server instance.
#[prost(enumeration = "SqlFileType", tag = "4")]
pub file_type: i32,
/// Options for importing data as CSV.
#[prost(message, optional, tag = "5")]
pub csv_import_options: ::core::option::Option<import_context::SqlCsvImportOptions>,
/// The PostgreSQL user for this import operation. PostgreSQL instances only.
#[prost(string, tag = "6")]
pub import_user: ::prost::alloc::string::String,
/// Import parameters specific to SQL Server .BAK files
#[prost(message, optional, tag = "7")]
pub bak_import_options: ::core::option::Option<import_context::SqlBakImportOptions>,
/// Optional. Options for importing data from SQL statements.
#[prost(message, optional, tag = "8")]
pub sql_import_options: ::core::option::Option<import_context::SqlImportOptions>,
}
/// Nested message and enum types in `ImportContext`.
pub mod import_context {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SqlImportOptions {
/// Optional. The number of threads to use for parallel import.
#[prost(message, optional, tag = "1")]
pub threads: ::core::option::Option<i32>,
/// Optional. Whether or not the import should be parallel.
#[prost(message, optional, tag = "2")]
pub parallel: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlCsvImportOptions {
/// The table to which CSV data is imported.
#[prost(string, tag = "1")]
pub table: ::prost::alloc::string::String,
/// The columns to which CSV data is imported. If not specified, all columns
/// of the database table are loaded with CSV data.
#[prost(string, repeated, tag = "2")]
pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Specifies the character that should appear before a data character that
/// needs to be escaped.
#[prost(string, tag = "4")]
pub escape_character: ::prost::alloc::string::String,
/// Specifies the quoting character to be used when a data value is quoted.
#[prost(string, tag = "5")]
pub quote_character: ::prost::alloc::string::String,
/// Specifies the character that separates columns within each row (line) of
/// the file.
#[prost(string, tag = "6")]
pub fields_terminated_by: ::prost::alloc::string::String,
/// This is used to separate lines. If a line does not contain all fields,
/// the rest of the columns are set to their default values.
#[prost(string, tag = "8")]
pub lines_terminated_by: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlBakImportOptions {
#[prost(message, optional, tag = "1")]
pub encryption_options: ::core::option::Option<
sql_bak_import_options::EncryptionOptions,
>,
/// Whether or not the backup set being restored is striped.
/// Applies only to Cloud SQL for SQL Server.
#[prost(message, optional, tag = "2")]
pub striped: ::core::option::Option<bool>,
/// Whether or not the backup importing will restore database
/// with NORECOVERY option
/// Applies only to Cloud SQL for SQL Server.
#[prost(message, optional, tag = "4")]
pub no_recovery: ::core::option::Option<bool>,
/// Whether or not the backup importing request will just bring database
/// online without downloading Bak content only one of "no_recovery" and
/// "recovery_only" can be true otherwise error will return. Applies only to
/// Cloud SQL for SQL Server.
#[prost(message, optional, tag = "5")]
pub recovery_only: ::core::option::Option<bool>,
/// Type of the bak content, FULL or DIFF.
#[prost(enumeration = "super::BakType", tag = "6")]
pub bak_type: i32,
/// Optional. The timestamp when the import should stop. This timestamp is in
/// the [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format (for example,
/// `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT
/// keyword and applies to Cloud SQL for SQL Server only.
#[prost(message, optional, tag = "7")]
pub stop_at: ::core::option::Option<::prost_types::Timestamp>,
/// Optional. The marked transaction where the import should stop. This field
/// is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL
/// Server only.
#[prost(string, tag = "8")]
pub stop_at_mark: ::prost::alloc::string::String,
}
/// Nested message and enum types in `SqlBakImportOptions`.
pub mod sql_bak_import_options {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EncryptionOptions {
/// Path to the Certificate (.cer) in Cloud Storage, in the form
/// `gs://bucketName/fileName`. The instance must have write permissions
/// to the bucket and read access to the file.
#[prost(string, tag = "1")]
pub cert_path: ::prost::alloc::string::String,
/// Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
/// form `gs://bucketName/fileName`. The instance must have write
/// permissions to the bucket and read access to the file.
#[prost(string, tag = "2")]
pub pvk_path: ::prost::alloc::string::String,
/// Password that encrypts the private key
#[prost(string, tag = "3")]
pub pvk_password: ::prost::alloc::string::String,
}
}
}
/// Database instance clone request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstancesCloneRequest {
/// Contains details about the clone operation.
#[prost(message, optional, tag = "1")]
pub clone_context: ::core::option::Option<CloneContext>,
}
/// Database demote primary instance request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstancesDemoteMasterRequest {
/// Contains details about the demoteMaster operation.
#[prost(message, optional, tag = "1")]
pub demote_master_context: ::core::option::Option<DemoteMasterContext>,
}
/// This request is used to demote an existing standalone instance to be a
/// Cloud SQL read replica for an external database server.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstancesDemoteRequest {
/// Required. This context is used to demote an existing standalone instance to
/// be a Cloud SQL read replica for an external database server.
#[prost(message, optional, tag = "1")]
pub demote_context: ::core::option::Option<DemoteContext>,
}
/// Database instance export request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstancesExportRequest {
/// Contains details about the export operation.
#[prost(message, optional, tag = "1")]
pub export_context: ::core::option::Option<ExportContext>,
}
/// Instance failover request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstancesFailoverRequest {
/// Failover Context.
#[prost(message, optional, tag = "1")]
pub failover_context: ::core::option::Option<FailoverContext>,
}
/// Database instance import request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstancesImportRequest {
/// Contains details about the import operation.
#[prost(message, optional, tag = "1")]
pub import_context: ::core::option::Option<ImportContext>,
}
/// MySQL-specific external server sync settings.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MySqlSyncConfig {
/// Flags to use for the initial dump.
#[prost(message, repeated, tag = "1")]
pub initial_sync_flags: ::prost::alloc::vec::Vec<SyncFlags>,
}
/// Database instances list response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstancesListResponse {
/// This is always `sql#instancesList`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// List of warnings that occurred while handling the request.
#[prost(message, repeated, tag = "2")]
pub warnings: ::prost::alloc::vec::Vec<ApiWarning>,
/// List of database instance resources.
#[prost(message, repeated, tag = "3")]
pub items: ::prost::alloc::vec::Vec<DatabaseInstance>,
/// The continuation token, used to page through large result sets. Provide
/// this value in a subsequent request to return the next page of results.
#[prost(string, tag = "4")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Instances ListServerCas response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstancesListServerCasResponse {
/// List of server CA certificates for the instance.
#[prost(message, repeated, tag = "1")]
pub certs: ::prost::alloc::vec::Vec<SslCert>,
#[prost(string, tag = "2")]
pub active_version: ::prost::alloc::string::String,
/// This is always `sql#instancesListServerCas`.
#[prost(string, tag = "3")]
pub kind: ::prost::alloc::string::String,
}
/// Database instance restore backup request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstancesRestoreBackupRequest {
/// Parameters required to perform the restore backup operation.
#[prost(message, optional, tag = "1")]
pub restore_backup_context: ::core::option::Option<RestoreBackupContext>,
}
/// Rotate Server CA request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstancesRotateServerCaRequest {
/// Contains details about the rotate server CA operation.
#[prost(message, optional, tag = "1")]
pub rotate_server_ca_context: ::core::option::Option<RotateServerCaContext>,
}
/// Instance truncate log request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstancesTruncateLogRequest {
/// Contains details about the truncate log operation.
#[prost(message, optional, tag = "1")]
pub truncate_log_context: ::core::option::Option<TruncateLogContext>,
}
/// Request to acquire an SSRS lease for an instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstancesAcquireSsrsLeaseRequest {
/// Contains details about the acquire SSRS lease operation.
#[prost(message, optional, tag = "1")]
pub acquire_ssrs_lease_context: ::core::option::Option<AcquireSsrsLeaseContext>,
}
/// Perform disk shrink context.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PerformDiskShrinkContext {
/// The target disk shrink size in GigaBytes.
#[prost(int64, tag = "1")]
pub target_size_gb: i64,
}
/// Instance get disk shrink config response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesGetDiskShrinkConfigResponse {
/// This is always `sql#getDiskShrinkConfig`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// The minimum size to which a disk can be shrunk in GigaBytes.
#[prost(int64, tag = "2")]
pub minimal_target_size_gb: i64,
/// Additional message to customers.
#[prost(string, tag = "3")]
pub message: ::prost::alloc::string::String,
}
/// Instance verify external sync settings response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesVerifyExternalSyncSettingsResponse {
/// This is always `sql#migrationSettingErrorList`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// List of migration violations.
#[prost(message, repeated, tag = "2")]
pub errors: ::prost::alloc::vec::Vec<SqlExternalSyncSettingError>,
/// List of migration warnings.
#[prost(message, repeated, tag = "3")]
pub warnings: ::prost::alloc::vec::Vec<SqlExternalSyncSettingError>,
}
/// External primary instance migration setting error/warning.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlExternalSyncSettingError {
/// Can be `sql#externalSyncSettingError` or
/// `sql#externalSyncSettingWarning`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// Identifies the specific error that occurred.
#[prost(
enumeration = "sql_external_sync_setting_error::SqlExternalSyncSettingErrorType",
tag = "2"
)]
pub r#type: i32,
/// Additional information about the error encountered.
#[prost(string, tag = "3")]
pub detail: ::prost::alloc::string::String,
}
/// Nested message and enum types in `SqlExternalSyncSettingError`.
pub mod sql_external_sync_setting_error {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SqlExternalSyncSettingErrorType {
Unspecified = 0,
ConnectionFailure = 1,
BinlogNotEnabled = 2,
IncompatibleDatabaseVersion = 3,
ReplicaAlreadySetup = 4,
/// The replication user is missing privileges that are required.
InsufficientPrivilege = 5,
/// Unsupported migration type.
UnsupportedMigrationType = 6,
/// 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,
/// The value of parameter rds.logical_replication is not set to 1.
InvalidRdsLogicalReplication = 15,
/// The primary instance logging setup doesn't allow EM sync.
InvalidLoggingSetup = 16,
/// The primary instance database parameter setup doesn't allow EM sync.
InvalidDbParam = 17,
/// The gtid_mode is not supported, applicable for MySQL.
UnsupportedGtidMode = 18,
/// SQL Server Agent is not running.
SqlserverAgentNotRunning = 19,
/// The table definition is not support due to missing primary key or replica
/// identity, applicable for postgres.
UnsupportedTableDefinition = 20,
/// The customer has a definer that will break EM setup.
UnsupportedDefiner = 21,
/// SQL Server @@SERVERNAME does not match actual host name.
SqlserverServernameMismatch = 22,
/// The primary instance has been setup and will fail the setup.
PrimaryAlreadySetup = 23,
/// The primary instance has unsupported binary log format.
UnsupportedBinlogFormat = 24,
/// The primary instance's binary log retention setting.
BinlogRetentionSetting = 25,
/// The primary instance has tables with unsupported storage engine.
UnsupportedStorageEngine = 26,
/// Source has tables with limited support
/// eg: PostgreSQL tables without primary keys.
LimitedSupportTables = 27,
/// The replica instance contains existing data.
ExistingDataInReplica = 28,
/// The replication user is missing privileges that are optional.
MissingOptionalPrivileges = 29,
/// Additional BACKUP_ADMIN privilege is granted to the replication user
/// which may lock source MySQL 8 instance for DDLs during initial sync.
RiskyBackupAdminPrivilege = 30,
/// The Cloud Storage bucket is missing necessary permissions.
InsufficientGcsPermissions = 31,
/// The Cloud Storage bucket has an error in the file or contains invalid
/// file information.
InvalidFileInfo = 32,
/// The source instance has unsupported database settings for migration.
UnsupportedDatabaseSettings = 33,
/// The replication user is missing parallel import specific privileges.
/// (e.g. LOCK TABLES) for MySQL.
MysqlParallelImportInsufficientPrivilege = 34,
/// The global variable local_infile is off on external server replica.
LocalInfileOff = 35,
/// This code instructs customers to turn on point-in-time recovery manually
/// for the instance after promoting the Cloud SQL for PostgreSQL instance.
TurnOnPitrAfterPromote = 36,
/// The minor version of replica database is incompatible with the source.
IncompatibleDatabaseMinorVersion = 37,
/// This warning message indicates that Cloud SQL uses the maximum number of
/// subscriptions to migrate data from the source to the destination.
SourceMaxSubscriptions = 38,
/// Unable to verify definers on the source for MySQL.
UnableToVerifyDefiners = 39,
/// If a time out occurs while the subscription counts are calculated, then
/// this value is set to 1. Otherwise, this value is set to 2.
SubscriptionCalculationStatus = 40,
/// Count of subscriptions needed to sync source data for PostgreSQL
/// database.
PgSubscriptionCount = 41,
/// Final parallel level that is used to do migration.
PgSyncParallelLevel = 42,
/// The disk size of the replica instance is smaller than the data size of
/// the source instance.
InsufficientDiskSize = 43,
/// The data size of the source instance is greater than 1 TB, the number of
/// cores of the replica instance is less than 8, and the memory of the
/// replica is less than 32 GB.
InsufficientMachineTier = 44,
/// The warning message indicates the unsupported extensions will not be
/// migrated to the destination.
UnsupportedExtensionsNotMigrated = 45,
/// The warning message indicates the pg_cron extension and settings will not
/// be migrated to the destination.
ExtensionsNotMigrated = 46,
/// The error message indicates that pg_cron flags are enabled on the
/// destination which is not supported during the migration.
PgCronFlagEnabledInReplica = 47,
/// This error message indicates that the specified extensions are not
/// enabled on destination instance. For example, before you can migrate
/// data to the destination instance, you must enable the PGAudit extension
/// on the instance.
ExtensionsNotEnabledInReplica = 48,
}
impl SqlExternalSyncSettingErrorType {
/// 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 {
SqlExternalSyncSettingErrorType::Unspecified => {
"SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED"
}
SqlExternalSyncSettingErrorType::ConnectionFailure => {
"CONNECTION_FAILURE"
}
SqlExternalSyncSettingErrorType::BinlogNotEnabled => "BINLOG_NOT_ENABLED",
SqlExternalSyncSettingErrorType::IncompatibleDatabaseVersion => {
"INCOMPATIBLE_DATABASE_VERSION"
}
SqlExternalSyncSettingErrorType::ReplicaAlreadySetup => {
"REPLICA_ALREADY_SETUP"
}
SqlExternalSyncSettingErrorType::InsufficientPrivilege => {
"INSUFFICIENT_PRIVILEGE"
}
SqlExternalSyncSettingErrorType::UnsupportedMigrationType => {
"UNSUPPORTED_MIGRATION_TYPE"
}
SqlExternalSyncSettingErrorType::NoPglogicalInstalled => {
"NO_PGLOGICAL_INSTALLED"
}
SqlExternalSyncSettingErrorType::PglogicalNodeAlreadyExists => {
"PGLOGICAL_NODE_ALREADY_EXISTS"
}
SqlExternalSyncSettingErrorType::InvalidWalLevel => "INVALID_WAL_LEVEL",
SqlExternalSyncSettingErrorType::InvalidSharedPreloadLibrary => {
"INVALID_SHARED_PRELOAD_LIBRARY"
}
SqlExternalSyncSettingErrorType::InsufficientMaxReplicationSlots => {
"INSUFFICIENT_MAX_REPLICATION_SLOTS"
}
SqlExternalSyncSettingErrorType::InsufficientMaxWalSenders => {
"INSUFFICIENT_MAX_WAL_SENDERS"
}
SqlExternalSyncSettingErrorType::InsufficientMaxWorkerProcesses => {
"INSUFFICIENT_MAX_WORKER_PROCESSES"
}
SqlExternalSyncSettingErrorType::UnsupportedExtensions => {
"UNSUPPORTED_EXTENSIONS"
}
SqlExternalSyncSettingErrorType::InvalidRdsLogicalReplication => {
"INVALID_RDS_LOGICAL_REPLICATION"
}
SqlExternalSyncSettingErrorType::InvalidLoggingSetup => {
"INVALID_LOGGING_SETUP"
}
SqlExternalSyncSettingErrorType::InvalidDbParam => "INVALID_DB_PARAM",
SqlExternalSyncSettingErrorType::UnsupportedGtidMode => {
"UNSUPPORTED_GTID_MODE"
}
SqlExternalSyncSettingErrorType::SqlserverAgentNotRunning => {
"SQLSERVER_AGENT_NOT_RUNNING"
}
SqlExternalSyncSettingErrorType::UnsupportedTableDefinition => {
"UNSUPPORTED_TABLE_DEFINITION"
}
SqlExternalSyncSettingErrorType::UnsupportedDefiner => {
"UNSUPPORTED_DEFINER"
}
SqlExternalSyncSettingErrorType::SqlserverServernameMismatch => {
"SQLSERVER_SERVERNAME_MISMATCH"
}
SqlExternalSyncSettingErrorType::PrimaryAlreadySetup => {
"PRIMARY_ALREADY_SETUP"
}
SqlExternalSyncSettingErrorType::UnsupportedBinlogFormat => {
"UNSUPPORTED_BINLOG_FORMAT"
}
SqlExternalSyncSettingErrorType::BinlogRetentionSetting => {
"BINLOG_RETENTION_SETTING"
}
SqlExternalSyncSettingErrorType::UnsupportedStorageEngine => {
"UNSUPPORTED_STORAGE_ENGINE"
}
SqlExternalSyncSettingErrorType::LimitedSupportTables => {
"LIMITED_SUPPORT_TABLES"
}
SqlExternalSyncSettingErrorType::ExistingDataInReplica => {
"EXISTING_DATA_IN_REPLICA"
}
SqlExternalSyncSettingErrorType::MissingOptionalPrivileges => {
"MISSING_OPTIONAL_PRIVILEGES"
}
SqlExternalSyncSettingErrorType::RiskyBackupAdminPrivilege => {
"RISKY_BACKUP_ADMIN_PRIVILEGE"
}
SqlExternalSyncSettingErrorType::InsufficientGcsPermissions => {
"INSUFFICIENT_GCS_PERMISSIONS"
}
SqlExternalSyncSettingErrorType::InvalidFileInfo => "INVALID_FILE_INFO",
SqlExternalSyncSettingErrorType::UnsupportedDatabaseSettings => {
"UNSUPPORTED_DATABASE_SETTINGS"
}
SqlExternalSyncSettingErrorType::MysqlParallelImportInsufficientPrivilege => {
"MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE"
}
SqlExternalSyncSettingErrorType::LocalInfileOff => "LOCAL_INFILE_OFF",
SqlExternalSyncSettingErrorType::TurnOnPitrAfterPromote => {
"TURN_ON_PITR_AFTER_PROMOTE"
}
SqlExternalSyncSettingErrorType::IncompatibleDatabaseMinorVersion => {
"INCOMPATIBLE_DATABASE_MINOR_VERSION"
}
SqlExternalSyncSettingErrorType::SourceMaxSubscriptions => {
"SOURCE_MAX_SUBSCRIPTIONS"
}
SqlExternalSyncSettingErrorType::UnableToVerifyDefiners => {
"UNABLE_TO_VERIFY_DEFINERS"
}
SqlExternalSyncSettingErrorType::SubscriptionCalculationStatus => {
"SUBSCRIPTION_CALCULATION_STATUS"
}
SqlExternalSyncSettingErrorType::PgSubscriptionCount => {
"PG_SUBSCRIPTION_COUNT"
}
SqlExternalSyncSettingErrorType::PgSyncParallelLevel => {
"PG_SYNC_PARALLEL_LEVEL"
}
SqlExternalSyncSettingErrorType::InsufficientDiskSize => {
"INSUFFICIENT_DISK_SIZE"
}
SqlExternalSyncSettingErrorType::InsufficientMachineTier => {
"INSUFFICIENT_MACHINE_TIER"
}
SqlExternalSyncSettingErrorType::UnsupportedExtensionsNotMigrated => {
"UNSUPPORTED_EXTENSIONS_NOT_MIGRATED"
}
SqlExternalSyncSettingErrorType::ExtensionsNotMigrated => {
"EXTENSIONS_NOT_MIGRATED"
}
SqlExternalSyncSettingErrorType::PgCronFlagEnabledInReplica => {
"PG_CRON_FLAG_ENABLED_IN_REPLICA"
}
SqlExternalSyncSettingErrorType::ExtensionsNotEnabledInReplica => {
"EXTENSIONS_NOT_ENABLED_IN_REPLICA"
}
}
}
/// 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_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED" => {
Some(Self::Unspecified)
}
"CONNECTION_FAILURE" => Some(Self::ConnectionFailure),
"BINLOG_NOT_ENABLED" => Some(Self::BinlogNotEnabled),
"INCOMPATIBLE_DATABASE_VERSION" => {
Some(Self::IncompatibleDatabaseVersion)
}
"REPLICA_ALREADY_SETUP" => Some(Self::ReplicaAlreadySetup),
"INSUFFICIENT_PRIVILEGE" => Some(Self::InsufficientPrivilege),
"UNSUPPORTED_MIGRATION_TYPE" => Some(Self::UnsupportedMigrationType),
"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),
"INVALID_RDS_LOGICAL_REPLICATION" => {
Some(Self::InvalidRdsLogicalReplication)
}
"INVALID_LOGGING_SETUP" => Some(Self::InvalidLoggingSetup),
"INVALID_DB_PARAM" => Some(Self::InvalidDbParam),
"UNSUPPORTED_GTID_MODE" => Some(Self::UnsupportedGtidMode),
"SQLSERVER_AGENT_NOT_RUNNING" => Some(Self::SqlserverAgentNotRunning),
"UNSUPPORTED_TABLE_DEFINITION" => Some(Self::UnsupportedTableDefinition),
"UNSUPPORTED_DEFINER" => Some(Self::UnsupportedDefiner),
"SQLSERVER_SERVERNAME_MISMATCH" => {
Some(Self::SqlserverServernameMismatch)
}
"PRIMARY_ALREADY_SETUP" => Some(Self::PrimaryAlreadySetup),
"UNSUPPORTED_BINLOG_FORMAT" => Some(Self::UnsupportedBinlogFormat),
"BINLOG_RETENTION_SETTING" => Some(Self::BinlogRetentionSetting),
"UNSUPPORTED_STORAGE_ENGINE" => Some(Self::UnsupportedStorageEngine),
"LIMITED_SUPPORT_TABLES" => Some(Self::LimitedSupportTables),
"EXISTING_DATA_IN_REPLICA" => Some(Self::ExistingDataInReplica),
"MISSING_OPTIONAL_PRIVILEGES" => Some(Self::MissingOptionalPrivileges),
"RISKY_BACKUP_ADMIN_PRIVILEGE" => Some(Self::RiskyBackupAdminPrivilege),
"INSUFFICIENT_GCS_PERMISSIONS" => Some(Self::InsufficientGcsPermissions),
"INVALID_FILE_INFO" => Some(Self::InvalidFileInfo),
"UNSUPPORTED_DATABASE_SETTINGS" => {
Some(Self::UnsupportedDatabaseSettings)
}
"MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE" => {
Some(Self::MysqlParallelImportInsufficientPrivilege)
}
"LOCAL_INFILE_OFF" => Some(Self::LocalInfileOff),
"TURN_ON_PITR_AFTER_PROMOTE" => Some(Self::TurnOnPitrAfterPromote),
"INCOMPATIBLE_DATABASE_MINOR_VERSION" => {
Some(Self::IncompatibleDatabaseMinorVersion)
}
"SOURCE_MAX_SUBSCRIPTIONS" => Some(Self::SourceMaxSubscriptions),
"UNABLE_TO_VERIFY_DEFINERS" => Some(Self::UnableToVerifyDefiners),
"SUBSCRIPTION_CALCULATION_STATUS" => {
Some(Self::SubscriptionCalculationStatus)
}
"PG_SUBSCRIPTION_COUNT" => Some(Self::PgSubscriptionCount),
"PG_SYNC_PARALLEL_LEVEL" => Some(Self::PgSyncParallelLevel),
"INSUFFICIENT_DISK_SIZE" => Some(Self::InsufficientDiskSize),
"INSUFFICIENT_MACHINE_TIER" => Some(Self::InsufficientMachineTier),
"UNSUPPORTED_EXTENSIONS_NOT_MIGRATED" => {
Some(Self::UnsupportedExtensionsNotMigrated)
}
"EXTENSIONS_NOT_MIGRATED" => Some(Self::ExtensionsNotMigrated),
"PG_CRON_FLAG_ENABLED_IN_REPLICA" => {
Some(Self::PgCronFlagEnabledInReplica)
}
"EXTENSIONS_NOT_ENABLED_IN_REPLICA" => {
Some(Self::ExtensionsNotEnabledInReplica)
}
_ => None,
}
}
}
}
/// IP Management configuration.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IpConfiguration {
/// Whether the instance is assigned a public IP address or not.
#[prost(message, optional, tag = "1")]
pub ipv4_enabled: ::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,
/// Use `ssl_mode` instead.
///
/// Whether SSL/TLS connections over IP are enforced.
/// If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
/// For SSL/TLS connections, the client certificate won't be verified. If
/// set to true, then only allow connections encrypted with SSL/TLS and with
/// valid client certificates. If you want to enforce SSL/TLS without enforcing
/// the requirement for valid client certificates, then use the `ssl_mode` flag
/// instead of the legacy `require_ssl` flag.
#[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. In 'CIDR' notation, also known as 'slash' notation (for
/// example: `157.197.200.0/24`).
#[prost(message, repeated, tag = "4")]
pub authorized_networks: ::prost::alloc::vec::Vec<AclEntry>,
/// The name of the allocated ip range for the private ip Cloud SQL instance.
/// For example: "google-managed-services-default". If set, the instance ip
/// will be created in the allocated range. The range name must comply with
/// [RFC 1035](<https://tools.ietf.org/html/rfc1035>). Specifically, the name
/// must be 1-63 characters long and match the regular expression
/// `[a-z](\[-a-z0-9\]*[a-z0-9])?.`
#[prost(string, tag = "6")]
pub allocated_ip_range: ::prost::alloc::string::String,
/// Controls connectivity to private IP instances from Google services,
/// such as BigQuery.
#[prost(message, optional, tag = "7")]
pub enable_private_path_for_google_cloud_services: ::core::option::Option<bool>,
/// Specify how SSL/TLS is enforced in database connections. If you must use
/// the `require_ssl` flag for backward compatibility, then only the following
/// value pairs are valid:
///
/// For PostgreSQL and MySQL:
///
/// * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
/// * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`
/// * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true`
///
/// For SQL Server:
///
/// * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
/// * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true`
///
/// The value of `ssl_mode` has priority over the value of `require_ssl`.
///
/// For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and
/// `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL
/// connections, while `require_ssl=false` means accept both non-SSL
/// and SSL connections. In this case, MySQL and PostgreSQL databases respect
/// `ssl_mode` and accepts only SSL connections.
#[prost(enumeration = "ip_configuration::SslMode", tag = "8")]
pub ssl_mode: i32,
/// PSC settings for this instance.
#[prost(message, optional, tag = "9")]
pub psc_config: ::core::option::Option<PscConfig>,
}
/// Nested message and enum types in `IpConfiguration`.
pub mod ip_configuration {
/// The SSL options for database connections.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SslMode {
/// The SSL mode is unknown.
Unspecified = 0,
/// Allow non-SSL/non-TLS and SSL/TLS connections.
/// For SSL connections to MySQL and PostgreSQL, the client certificate
/// isn't verified.
///
/// When this value is used, the legacy `require_ssl` flag must be false or
/// cleared to avoid a conflict between the values of the two flags.
AllowUnencryptedAndEncrypted = 1,
/// Only allow connections encrypted with SSL/TLS.
/// For SSL connections to MySQL and PostgreSQL, the client certificate
/// isn't verified.
///
/// When this value is used, the legacy `require_ssl` flag must be false or
/// cleared to avoid a conflict between the values of the two flags.
EncryptedOnly = 2,
/// Only allow connections encrypted with SSL/TLS and with valid
/// client certificates.
///
/// When this value is used, the legacy `require_ssl` flag must be true or
/// cleared to avoid the conflict between values of two flags.
/// PostgreSQL clients or users that connect using IAM database
/// authentication must use either the
/// [Cloud SQL Auth
/// Proxy](<https://cloud.google.com/sql/docs/postgres/connect-auth-proxy>) or
/// [Cloud SQL
/// Connectors](<https://cloud.google.com/sql/docs/postgres/connect-connectors>)
/// to enforce client identity verification.
///
/// Only applicable to MySQL and PostgreSQL. Not applicable to SQL Server.
TrustedClientCertificateRequired = 3,
}
impl SslMode {
/// 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 {
SslMode::Unspecified => "SSL_MODE_UNSPECIFIED",
SslMode::AllowUnencryptedAndEncrypted => {
"ALLOW_UNENCRYPTED_AND_ENCRYPTED"
}
SslMode::EncryptedOnly => "ENCRYPTED_ONLY",
SslMode::TrustedClientCertificateRequired => {
"TRUSTED_CLIENT_CERTIFICATE_REQUIRED"
}
}
}
/// 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_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"ALLOW_UNENCRYPTED_AND_ENCRYPTED" => {
Some(Self::AllowUnencryptedAndEncrypted)
}
"ENCRYPTED_ONLY" => Some(Self::EncryptedOnly),
"TRUSTED_CLIENT_CERTIFICATE_REQUIRED" => {
Some(Self::TrustedClientCertificateRequired)
}
_ => None,
}
}
}
}
/// PSC settings for a Cloud SQL instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PscConfig {
/// Whether PSC connectivity is enabled for this instance.
#[prost(bool, optional, tag = "1")]
pub psc_enabled: ::core::option::Option<bool>,
/// Optional. The list of consumer projects that are allow-listed for PSC
/// connections to this instance. This instance can be connected to with PSC
/// from any network in these projects.
///
/// Each consumer project in this list may be represented by a project number
/// (numeric) or by a project id (alphanumeric).
#[prost(string, repeated, tag = "2")]
pub allowed_consumer_projects: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
/// Database instance IP mapping
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IpMapping {
/// The type of this IP address. A `PRIMARY` address is a public address that
/// can accept incoming connections. A `PRIVATE` address is a private address
/// that can accept incoming connections. An `OUTGOING` address is the source
/// address of connections originating from the instance, if supported.
#[prost(enumeration = "SqlIpAddressType", tag = "1")]
pub r#type: i32,
/// The IP address assigned.
#[prost(string, tag = "2")]
pub ip_address: ::prost::alloc::string::String,
/// The due time for this IP to be retired in
/// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
/// `2012-11-15T16:19:00.094Z`. This field is only available when
/// the IP is scheduled to be retired.
#[prost(message, optional, tag = "3")]
pub time_to_retire: ::core::option::Option<::prost_types::Timestamp>,
}
/// Preferred location. This specifies where a Cloud SQL instance is located.
/// Note that if the preferred location is not available, the instance will be
/// located as close as possible within the region. Only one location may be
/// specified.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocationPreference {
/// The App Engine application to follow, it must be in the same region as the
/// Cloud SQL instance. WARNING: Changing this might restart the instance.
#[deprecated]
#[prost(string, tag = "1")]
pub follow_gae_application: ::prost::alloc::string::String,
/// The preferred Compute Engine zone (for example: us-central1-a,
/// us-central1-b, etc.). WARNING: Changing this might restart the instance.
#[prost(string, tag = "2")]
pub zone: ::prost::alloc::string::String,
/// The preferred Compute Engine zone for the secondary/failover
/// (for example: us-central1-a, us-central1-b, etc.).
/// To disable this field, set it to 'no_secondary_zone'.
#[prost(string, tag = "4")]
pub secondary_zone: ::prost::alloc::string::String,
/// This is always `sql#locationPreference`.
#[prost(string, tag = "3")]
pub kind: ::prost::alloc::string::String,
}
/// Maintenance window. This specifies when a Cloud SQL instance
/// is restarted for system maintenance purposes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenanceWindow {
/// hour of day - 0 to 23.
#[prost(message, optional, tag = "1")]
pub hour: ::core::option::Option<i32>,
/// day of week (1-7), starting on Monday.
#[prost(message, optional, tag = "2")]
pub day: ::core::option::Option<i32>,
/// Maintenance timing setting: `canary` (Earlier) or `stable` (Later).
/// [Learn
/// more](<https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen>).
#[prost(enumeration = "SqlUpdateTrack", tag = "3")]
pub update_track: i32,
/// This is always `sql#maintenanceWindow`.
#[prost(string, tag = "4")]
pub kind: ::prost::alloc::string::String,
}
/// Deny Maintenance Periods. This specifies a date range during when all CSA
/// rollout will be denied.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DenyMaintenancePeriod {
/// "deny maintenance period" start date. If the year of the start date is
/// empty, the year of the end date also must be empty. In this case, it means
/// the deny maintenance period recurs every year. The date is in format
/// yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
#[prost(string, tag = "1")]
pub start_date: ::prost::alloc::string::String,
/// "deny maintenance period" end date. If the year of the end date is empty,
/// the year of the start date also must be empty. In this case, it means the
/// deny maintenance period recurs every year. The date is in format yyyy-mm-dd
/// i.e., 2020-11-01, or mm-dd, i.e., 11-01
#[prost(string, tag = "2")]
pub end_date: ::prost::alloc::string::String,
/// Time in UTC when the "deny maintenance period" starts on start_date and
/// ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
#[prost(string, tag = "3")]
pub time: ::prost::alloc::string::String,
}
/// Insights configuration. This specifies when Cloud SQL Insights feature is
/// enabled and optional configuration.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct InsightsConfig {
/// Whether Query Insights feature is enabled.
#[prost(bool, tag = "1")]
pub query_insights_enabled: bool,
/// Whether Query Insights will record client address when enabled.
#[prost(bool, tag = "2")]
pub record_client_address: bool,
/// Whether Query Insights will record application tags from query when
/// enabled.
#[prost(bool, tag = "3")]
pub record_application_tags: bool,
/// Maximum query length stored in bytes. Default value: 1024 bytes.
/// Range: 256-4500 bytes. Query length more than this field value will be
/// truncated to this value. When unset, query length will be the default
/// value. Changing query length will restart the database.
#[prost(message, optional, tag = "4")]
pub query_string_length: ::core::option::Option<i32>,
/// Number of query execution plans captured by Insights per minute
/// for all queries combined. Default is 5.
#[prost(message, optional, tag = "5")]
pub query_plans_per_minute: ::core::option::Option<i32>,
}
/// Read-replica configuration specific to MySQL databases.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MySqlReplicaConfiguration {
/// Path to a SQL dump file in Google Cloud Storage from which the replica
/// instance is to be created. The URI is in the form gs://bucketName/fileName.
/// Compressed gzip files (.gz) are also supported.
/// Dumps have the binlog co-ordinates from which replication
/// begins. This can be accomplished by setting --master-data to 1 when using
/// mysqldump.
#[prost(string, tag = "1")]
pub dump_file_path: ::prost::alloc::string::String,
/// The username for the replication connection.
#[prost(string, tag = "2")]
pub username: ::prost::alloc::string::String,
/// The password for the replication connection.
#[prost(string, tag = "3")]
pub password: ::prost::alloc::string::String,
/// Seconds to wait between connect retries. MySQL's default is 60 seconds.
#[prost(message, optional, tag = "4")]
pub connect_retry_interval: ::core::option::Option<i32>,
/// Interval in milliseconds between replication heartbeats.
#[prost(message, optional, tag = "5")]
pub master_heartbeat_period: ::core::option::Option<i64>,
/// PEM representation of the trusted CA's x509 certificate.
#[prost(string, tag = "6")]
pub ca_certificate: ::prost::alloc::string::String,
/// PEM representation of the replica's x509 certificate.
#[prost(string, tag = "7")]
pub client_certificate: ::prost::alloc::string::String,
/// PEM representation of the replica's private key. The corresponsing public
/// key is encoded in the client's certificate.
#[prost(string, tag = "8")]
pub client_key: ::prost::alloc::string::String,
/// A list of permissible ciphers to use for SSL encryption.
#[prost(string, tag = "9")]
pub ssl_cipher: ::prost::alloc::string::String,
/// Whether or not to check the primary instance's Common Name value in the
/// certificate that it sends during the SSL handshake.
#[prost(message, optional, tag = "10")]
pub verify_server_certificate: ::core::option::Option<bool>,
/// This is always `sql#mysqlReplicaConfiguration`.
#[prost(string, tag = "11")]
pub kind: ::prost::alloc::string::String,
}
/// On-premises instance configuration.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OnPremisesConfiguration {
/// The host and port of the on-premises instance in host:port format
#[prost(string, tag = "1")]
pub host_port: ::prost::alloc::string::String,
/// This is always `sql#onPremisesConfiguration`.
#[prost(string, tag = "2")]
pub kind: ::prost::alloc::string::String,
/// The username for connecting to on-premises instance.
#[prost(string, tag = "3")]
pub username: ::prost::alloc::string::String,
/// The password for connecting to on-premises instance.
#[prost(string, tag = "4")]
pub password: ::prost::alloc::string::String,
/// PEM representation of the trusted CA's x509 certificate.
#[prost(string, tag = "5")]
pub ca_certificate: ::prost::alloc::string::String,
/// PEM representation of the replica's x509 certificate.
#[prost(string, tag = "6")]
pub client_certificate: ::prost::alloc::string::String,
/// PEM representation of the replica's private key. The corresponsing public
/// key is encoded in the client's certificate.
#[prost(string, tag = "7")]
pub client_key: ::prost::alloc::string::String,
/// The dump file to create the Cloud SQL replica.
#[prost(string, tag = "8")]
pub dump_file_path: ::prost::alloc::string::String,
/// The reference to Cloud SQL instance if the source is Cloud SQL.
#[prost(message, optional, tag = "15")]
pub source_instance: ::core::option::Option<InstanceReference>,
}
/// Disk encryption configuration for an instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiskEncryptionConfiguration {
/// Resource name of KMS key for disk encryption
#[prost(string, tag = "1")]
pub kms_key_name: ::prost::alloc::string::String,
/// This is always `sql#diskEncryptionConfiguration`.
#[prost(string, tag = "2")]
pub kind: ::prost::alloc::string::String,
}
/// Disk encryption status for an instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiskEncryptionStatus {
/// KMS key version used to encrypt the Cloud SQL instance resource
#[prost(string, tag = "1")]
pub kms_key_version_name: ::prost::alloc::string::String,
/// This is always `sql#diskEncryptionStatus`.
#[prost(string, tag = "2")]
pub kind: ::prost::alloc::string::String,
}
/// An Operation resource. For successful operations that return an
/// Operation resource, only the fields relevant to the operation are populated
/// in the resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Operation {
/// This is always `sql#operation`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub target_link: ::prost::alloc::string::String,
/// The status of an operation.
#[prost(enumeration = "operation::SqlOperationStatus", tag = "3")]
pub status: i32,
/// The email address of the user who initiated this operation.
#[prost(string, tag = "4")]
pub user: ::prost::alloc::string::String,
/// The time this operation was enqueued in UTC timezone in
/// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
/// `2012-11-15T16:19:00.094Z`.
#[prost(message, optional, tag = "5")]
pub insert_time: ::core::option::Option<::prost_types::Timestamp>,
/// The time this operation actually started in UTC timezone in
/// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
/// `2012-11-15T16:19:00.094Z`.
#[prost(message, optional, tag = "6")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// The time this operation finished in UTC timezone in
/// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
/// `2012-11-15T16:19:00.094Z`.
#[prost(message, optional, tag = "7")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// If errors occurred during processing of this operation, this field will be
/// populated.
#[prost(message, optional, tag = "8")]
pub error: ::core::option::Option<OperationErrors>,
/// An Admin API warning message.
#[prost(message, optional, tag = "19")]
pub api_warning: ::core::option::Option<ApiWarning>,
/// The type of the operation. Valid values are:
/// * `CREATE`
/// * `DELETE`
/// * `UPDATE`
/// * `RESTART`
/// * `IMPORT`
/// * `EXPORT`
/// * `BACKUP_VOLUME`
/// * `RESTORE_VOLUME`
/// * `CREATE_USER`
/// * `DELETE_USER`
/// * `CREATE_DATABASE`
/// * `DELETE_DATABASE`
#[prost(enumeration = "operation::SqlOperationType", tag = "9")]
pub operation_type: i32,
/// The context for import operation, if applicable.
#[prost(message, optional, tag = "10")]
pub import_context: ::core::option::Option<ImportContext>,
/// The context for export operation, if applicable.
#[prost(message, optional, tag = "11")]
pub export_context: ::core::option::Option<ExportContext>,
/// The context for backup operation, if applicable.
#[prost(message, optional, tag = "17")]
pub backup_context: ::core::option::Option<BackupContext>,
/// An identifier that uniquely identifies the operation. You can use this
/// identifier to retrieve the Operations resource that has information about
/// the operation.
#[prost(string, tag = "12")]
pub name: ::prost::alloc::string::String,
/// Name of the database instance related to this operation.
#[prost(string, tag = "13")]
pub target_id: ::prost::alloc::string::String,
/// The URI of this resource.
#[prost(string, tag = "14")]
pub self_link: ::prost::alloc::string::String,
/// The project ID of the target instance related to this operation.
#[prost(string, tag = "15")]
pub target_project: ::prost::alloc::string::String,
/// The context for acquire SSRS lease operation, if applicable.
#[prost(message, optional, tag = "20")]
pub acquire_ssrs_lease_context: ::core::option::Option<AcquireSsrsLeaseContext>,
}
/// Nested message and enum types in `Operation`.
pub mod operation {
/// The type of Cloud SQL operation.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SqlOperationType {
/// Unknown operation type.
Unspecified = 0,
/// Imports data into a Cloud SQL instance.
Import = 1,
/// Exports data from a Cloud SQL instance to a Cloud Storage
/// bucket.
Export = 2,
/// Creates a new Cloud SQL instance.
Create = 3,
/// Updates the settings of a Cloud SQL instance.
Update = 4,
/// Deletes a Cloud SQL instance.
Delete = 5,
/// Restarts the Cloud SQL instance.
Restart = 6,
Backup = 7,
Snapshot = 8,
/// Performs instance backup.
BackupVolume = 9,
/// Deletes an instance backup.
DeleteVolume = 10,
/// Restores an instance backup.
RestoreVolume = 11,
/// Injects a privileged user in mysql for MOB instances.
InjectUser = 12,
/// Clones a Cloud SQL instance.
Clone = 14,
/// Stops replication on a Cloud SQL read replica instance.
StopReplica = 15,
/// Starts replication on a Cloud SQL read replica instance.
StartReplica = 16,
/// Promotes a Cloud SQL replica instance.
PromoteReplica = 17,
/// Creates a Cloud SQL replica instance.
CreateReplica = 18,
/// Creates a new user in a Cloud SQL instance.
CreateUser = 19,
/// Deletes a user from a Cloud SQL instance.
DeleteUser = 20,
/// Updates an existing user in a Cloud SQL instance.
UpdateUser = 21,
/// Creates a database in the Cloud SQL instance.
CreateDatabase = 22,
/// Deletes a database in the Cloud SQL instance.
DeleteDatabase = 23,
/// Updates a database in the Cloud SQL instance.
UpdateDatabase = 24,
/// Performs failover of an HA-enabled Cloud SQL
/// failover replica.
Failover = 25,
/// Deletes the backup taken by a backup run.
DeleteBackup = 26,
RecreateReplica = 27,
/// Truncates a general or slow log table in MySQL.
TruncateLog = 28,
/// Demotes the stand-alone instance to be a Cloud SQL
/// read replica for an external database server.
DemoteMaster = 29,
/// Indicates that the instance is currently in maintenance. Maintenance
/// typically causes the instance to be unavailable for 1-3 minutes.
Maintenance = 30,
/// This field is deprecated, and will be removed in future version of API.
EnablePrivateIp = 31,
DeferMaintenance = 32,
/// Creates clone instance.
CreateClone = 33,
/// Reschedule maintenance to another time.
RescheduleMaintenance = 34,
/// Starts external sync of a Cloud SQL EM replica to an external primary
/// instance.
StartExternalSync = 35,
/// Recovers logs from an instance's old data disk.
LogCleanup = 36,
/// Performs auto-restart of an HA-enabled Cloud SQL database for auto
/// recovery.
AutoRestart = 37,
/// Re-encrypts CMEK instances with latest key version.
Reencrypt = 38,
/// Switches the roles of the primary and replica pair. The target instance
/// should be the replica.
Switchover = 39,
/// Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
AcquireSsrsLease = 42,
/// Release a lease for the setup of SQL Server Reporting Services (SSRS).
ReleaseSsrsLease = 43,
/// Reconfigures old primary after a promote replica operation. Effect of a
/// promote operation to the old primary is executed in this operation,
/// asynchronously from the promote replica operation executed to the
/// replica.
ReconfigureOldPrimary = 44,
/// Indicates that the instance, its read replicas, and its cascading
/// replicas are in maintenance. Maintenance typically gets initiated on
/// groups of replicas first, followed by the primary instance. For each
/// instance, maintenance typically causes the instance to be unavailable for
/// 1-3 minutes.
ClusterMaintenance = 45,
/// Indicates that the instance (and any of its replicas) are currently in
/// maintenance. This is initiated as a self-service request by using SSM.
/// Maintenance typically causes the instance to be unavailable for 1-3
/// minutes.
SelfServiceMaintenance = 46,
/// Switches a primary instance to a replica. This operation runs as part of
/// a switchover operation to the original primary instance.
SwitchoverToReplica = 47,
}
impl SqlOperationType {
/// 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 {
SqlOperationType::Unspecified => "SQL_OPERATION_TYPE_UNSPECIFIED",
SqlOperationType::Import => "IMPORT",
SqlOperationType::Export => "EXPORT",
SqlOperationType::Create => "CREATE",
SqlOperationType::Update => "UPDATE",
SqlOperationType::Delete => "DELETE",
SqlOperationType::Restart => "RESTART",
SqlOperationType::Backup => "BACKUP",
SqlOperationType::Snapshot => "SNAPSHOT",
SqlOperationType::BackupVolume => "BACKUP_VOLUME",
SqlOperationType::DeleteVolume => "DELETE_VOLUME",
SqlOperationType::RestoreVolume => "RESTORE_VOLUME",
SqlOperationType::InjectUser => "INJECT_USER",
SqlOperationType::Clone => "CLONE",
SqlOperationType::StopReplica => "STOP_REPLICA",
SqlOperationType::StartReplica => "START_REPLICA",
SqlOperationType::PromoteReplica => "PROMOTE_REPLICA",
SqlOperationType::CreateReplica => "CREATE_REPLICA",
SqlOperationType::CreateUser => "CREATE_USER",
SqlOperationType::DeleteUser => "DELETE_USER",
SqlOperationType::UpdateUser => "UPDATE_USER",
SqlOperationType::CreateDatabase => "CREATE_DATABASE",
SqlOperationType::DeleteDatabase => "DELETE_DATABASE",
SqlOperationType::UpdateDatabase => "UPDATE_DATABASE",
SqlOperationType::Failover => "FAILOVER",
SqlOperationType::DeleteBackup => "DELETE_BACKUP",
SqlOperationType::RecreateReplica => "RECREATE_REPLICA",
SqlOperationType::TruncateLog => "TRUNCATE_LOG",
SqlOperationType::DemoteMaster => "DEMOTE_MASTER",
SqlOperationType::Maintenance => "MAINTENANCE",
SqlOperationType::EnablePrivateIp => "ENABLE_PRIVATE_IP",
SqlOperationType::DeferMaintenance => "DEFER_MAINTENANCE",
SqlOperationType::CreateClone => "CREATE_CLONE",
SqlOperationType::RescheduleMaintenance => "RESCHEDULE_MAINTENANCE",
SqlOperationType::StartExternalSync => "START_EXTERNAL_SYNC",
SqlOperationType::LogCleanup => "LOG_CLEANUP",
SqlOperationType::AutoRestart => "AUTO_RESTART",
SqlOperationType::Reencrypt => "REENCRYPT",
SqlOperationType::Switchover => "SWITCHOVER",
SqlOperationType::AcquireSsrsLease => "ACQUIRE_SSRS_LEASE",
SqlOperationType::ReleaseSsrsLease => "RELEASE_SSRS_LEASE",
SqlOperationType::ReconfigureOldPrimary => "RECONFIGURE_OLD_PRIMARY",
SqlOperationType::ClusterMaintenance => "CLUSTER_MAINTENANCE",
SqlOperationType::SelfServiceMaintenance => "SELF_SERVICE_MAINTENANCE",
SqlOperationType::SwitchoverToReplica => "SWITCHOVER_TO_REPLICA",
}
}
/// 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_OPERATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"IMPORT" => Some(Self::Import),
"EXPORT" => Some(Self::Export),
"CREATE" => Some(Self::Create),
"UPDATE" => Some(Self::Update),
"DELETE" => Some(Self::Delete),
"RESTART" => Some(Self::Restart),
"BACKUP" => Some(Self::Backup),
"SNAPSHOT" => Some(Self::Snapshot),
"BACKUP_VOLUME" => Some(Self::BackupVolume),
"DELETE_VOLUME" => Some(Self::DeleteVolume),
"RESTORE_VOLUME" => Some(Self::RestoreVolume),
"INJECT_USER" => Some(Self::InjectUser),
"CLONE" => Some(Self::Clone),
"STOP_REPLICA" => Some(Self::StopReplica),
"START_REPLICA" => Some(Self::StartReplica),
"PROMOTE_REPLICA" => Some(Self::PromoteReplica),
"CREATE_REPLICA" => Some(Self::CreateReplica),
"CREATE_USER" => Some(Self::CreateUser),
"DELETE_USER" => Some(Self::DeleteUser),
"UPDATE_USER" => Some(Self::UpdateUser),
"CREATE_DATABASE" => Some(Self::CreateDatabase),
"DELETE_DATABASE" => Some(Self::DeleteDatabase),
"UPDATE_DATABASE" => Some(Self::UpdateDatabase),
"FAILOVER" => Some(Self::Failover),
"DELETE_BACKUP" => Some(Self::DeleteBackup),
"RECREATE_REPLICA" => Some(Self::RecreateReplica),
"TRUNCATE_LOG" => Some(Self::TruncateLog),
"DEMOTE_MASTER" => Some(Self::DemoteMaster),
"MAINTENANCE" => Some(Self::Maintenance),
"ENABLE_PRIVATE_IP" => Some(Self::EnablePrivateIp),
"DEFER_MAINTENANCE" => Some(Self::DeferMaintenance),
"CREATE_CLONE" => Some(Self::CreateClone),
"RESCHEDULE_MAINTENANCE" => Some(Self::RescheduleMaintenance),
"START_EXTERNAL_SYNC" => Some(Self::StartExternalSync),
"LOG_CLEANUP" => Some(Self::LogCleanup),
"AUTO_RESTART" => Some(Self::AutoRestart),
"REENCRYPT" => Some(Self::Reencrypt),
"SWITCHOVER" => Some(Self::Switchover),
"ACQUIRE_SSRS_LEASE" => Some(Self::AcquireSsrsLease),
"RELEASE_SSRS_LEASE" => Some(Self::ReleaseSsrsLease),
"RECONFIGURE_OLD_PRIMARY" => Some(Self::ReconfigureOldPrimary),
"CLUSTER_MAINTENANCE" => Some(Self::ClusterMaintenance),
"SELF_SERVICE_MAINTENANCE" => Some(Self::SelfServiceMaintenance),
"SWITCHOVER_TO_REPLICA" => Some(Self::SwitchoverToReplica),
_ => None,
}
}
}
/// The status of an operation.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SqlOperationStatus {
/// The state of the operation is unknown.
Unspecified = 0,
/// The operation has been queued, but has not started yet.
Pending = 1,
/// The operation is running.
Running = 2,
/// The operation completed.
Done = 3,
}
impl SqlOperationStatus {
/// 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 {
SqlOperationStatus::Unspecified => "SQL_OPERATION_STATUS_UNSPECIFIED",
SqlOperationStatus::Pending => "PENDING",
SqlOperationStatus::Running => "RUNNING",
SqlOperationStatus::Done => "DONE",
}
}
/// 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_OPERATION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"PENDING" => Some(Self::Pending),
"RUNNING" => Some(Self::Running),
"DONE" => Some(Self::Done),
_ => None,
}
}
}
}
/// Database instance operation error.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationError {
/// This is always `sql#operationError`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// Identifies the specific error that occurred.
#[prost(string, tag = "2")]
pub code: ::prost::alloc::string::String,
/// Additional information about the error encountered.
#[prost(string, tag = "3")]
pub message: ::prost::alloc::string::String,
}
/// Database instance operation errors list wrapper.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationErrors {
/// This is always `sql#operationErrors`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// The list of errors encountered while processing this operation.
#[prost(message, repeated, tag = "2")]
pub errors: ::prost::alloc::vec::Vec<OperationError>,
}
/// Database instance local user password validation policy
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PasswordValidationPolicy {
/// Minimum number of characters allowed.
#[prost(message, optional, tag = "1")]
pub min_length: ::core::option::Option<i32>,
/// The complexity of the password.
#[prost(enumeration = "password_validation_policy::Complexity", tag = "2")]
pub complexity: i32,
/// Number of previous passwords that cannot be reused.
#[prost(message, optional, tag = "3")]
pub reuse_interval: ::core::option::Option<i32>,
/// Disallow username as a part of the password.
#[prost(message, optional, tag = "4")]
pub disallow_username_substring: ::core::option::Option<bool>,
/// Minimum interval after which the password can be changed. This flag is only
/// supported for PostgreSQL.
#[prost(message, optional, tag = "5")]
pub password_change_interval: ::core::option::Option<::prost_types::Duration>,
/// Whether the password policy is enabled or not.
#[prost(message, optional, tag = "6")]
pub enable_password_policy: ::core::option::Option<bool>,
/// This field is deprecated and will be removed in a future version of the
/// API.
#[deprecated]
#[prost(message, optional, tag = "7")]
pub disallow_compromised_credentials: ::core::option::Option<bool>,
}
/// Nested message and enum types in `PasswordValidationPolicy`.
pub mod password_validation_policy {
/// The complexity choices of the password.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Complexity {
/// Complexity check is not specified.
Unspecified = 0,
/// A combination of lowercase, uppercase, numeric, and non-alphanumeric
/// characters.
Default = 1,
}
impl Complexity {
/// 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 {
Complexity::Unspecified => "COMPLEXITY_UNSPECIFIED",
Complexity::Default => "COMPLEXITY_DEFAULT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"COMPLEXITY_UNSPECIFIED" => Some(Self::Unspecified),
"COMPLEXITY_DEFAULT" => Some(Self::Default),
_ => None,
}
}
}
}
/// Operations list response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationsListResponse {
/// This is always `sql#operationsList`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// List of operation resources.
#[prost(message, repeated, tag = "2")]
pub items: ::prost::alloc::vec::Vec<Operation>,
/// The continuation token, used to page through large result sets. Provide
/// this value in a subsequent request to return the next page of results.
#[prost(string, tag = "3")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Read-replica configuration for connecting to the primary instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplicaConfiguration {
/// This is always `sql#replicaConfiguration`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// MySQL specific configuration when replicating from a MySQL on-premises
/// primary instance. Replication configuration information such as the
/// username, password, certificates, and keys are not stored in the instance
/// metadata. The configuration information is used only to set up the
/// replication connection and is stored by MySQL in a file named
/// `master.info` in the data directory.
#[prost(message, optional, tag = "2")]
pub mysql_replica_configuration: ::core::option::Option<MySqlReplicaConfiguration>,
/// Specifies if the replica is the failover target. If the field is set to
/// `true` the replica will be designated as a failover replica. In case the
/// primary instance fails, the replica instance will be promoted as the new
/// primary instance. Only one replica can be specified as failover target, and
/// the replica has to be in different zone with the primary instance.
#[prost(message, optional, tag = "3")]
pub failover_target: ::core::option::Option<bool>,
/// Optional. Specifies if a SQL Server replica is a cascadable replica. A
/// cascadable replica is a SQL Server cross region replica that supports
/// replica(s) under it.
#[prost(message, optional, tag = "5")]
pub cascadable_replica: ::core::option::Option<bool>,
}
/// Database instance restore from backup context.
/// Backup context contains source instance id and project id.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreBackupContext {
/// This is always `sql#restoreBackupContext`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// The ID of the backup run to restore from.
#[prost(int64, tag = "2")]
pub backup_run_id: i64,
/// The ID of the instance that the backup was taken from.
#[prost(string, tag = "3")]
pub instance_id: ::prost::alloc::string::String,
/// The full project ID of the source instance.
#[prost(string, tag = "4")]
pub project: ::prost::alloc::string::String,
}
/// Instance rotate server CA context.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RotateServerCaContext {
/// This is always `sql#rotateServerCaContext`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// The fingerprint of the next version to be rotated to. If left unspecified,
/// will be rotated to the most recently added server CA version.
#[prost(string, tag = "2")]
pub next_version: ::prost::alloc::string::String,
}
/// Data cache configurations.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DataCacheConfig {
/// Whether data cache is enabled for the instance.
#[prost(bool, tag = "1")]
pub data_cache_enabled: bool,
}
/// Database instance settings.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Settings {
/// The version of instance settings. This is a required field for update
/// method to make sure concurrent updates are handled properly. During update,
/// use the most recent settingsVersion value for this instance and do not try
/// to update this value.
#[prost(message, optional, tag = "1")]
pub settings_version: ::core::option::Option<i64>,
/// The App Engine app IDs that can access this instance.
/// (Deprecated) Applied to First Generation instances only.
#[deprecated]
#[prost(string, repeated, tag = "2")]
pub authorized_gae_applications: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
/// The tier (or machine type) for this instance, for example
/// `db-custom-1-3840`. WARNING: Changing this restarts the instance.
#[prost(string, tag = "3")]
pub tier: ::prost::alloc::string::String,
/// This is always `sql#settings`.
#[prost(string, tag = "4")]
pub kind: ::prost::alloc::string::String,
/// User-provided labels, represented as a dictionary where each label is a
/// single key value pair.
#[prost(btree_map = "string, string", tag = "5")]
pub user_labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Availability type. Potential values:
/// * `ZONAL`: The instance serves data from only one zone. Outages in that
/// zone affect data accessibility.
/// * `REGIONAL`: The instance can serve data from more than one zone in a
/// region (it is highly available)./
///
/// For more information, see [Overview of the High Availability
/// Configuration](<https://cloud.google.com/sql/docs/mysql/high-availability>).
#[prost(enumeration = "SqlAvailabilityType", tag = "6")]
pub availability_type: i32,
/// The pricing plan for this instance. This can be either `PER_USE` or
/// `PACKAGE`. Only `PER_USE` is supported for Second Generation instances.
#[prost(enumeration = "SqlPricingPlan", tag = "7")]
pub pricing_plan: i32,
/// The type of replication this instance uses. This can be either
/// `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only
/// applicable to First Generation instances.
#[deprecated]
#[prost(enumeration = "SqlReplicationType", tag = "8")]
pub replication_type: i32,
/// 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 = "9")]
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 = "settings::SqlActivationPolicy", tag = "10")]
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 for Second Generation instances.
#[prost(message, optional, tag = "11")]
pub ip_configuration: ::core::option::Option<IpConfiguration>,
/// Configuration to increase storage size automatically. The default value is
/// true.
#[prost(message, optional, tag = "12")]
pub storage_auto_resize: ::core::option::Option<bool>,
/// The location preference settings. This allows the instance to be located as
/// near as possible to either an App Engine app or Compute Engine zone for
/// better performance. App Engine co-location was only applicable to First
/// Generation instances.
#[prost(message, optional, tag = "13")]
pub location_preference: ::core::option::Option<LocationPreference>,
/// The database flags passed to the instance at startup.
#[prost(message, repeated, tag = "14")]
pub database_flags: ::prost::alloc::vec::Vec<DatabaseFlags>,
/// The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for
/// First Generation instances.
#[prost(enumeration = "SqlDataDiskType", tag = "15")]
pub data_disk_type: i32,
/// The maintenance window for this instance. This specifies when the instance
/// can be restarted for maintenance purposes.
#[prost(message, optional, tag = "16")]
pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
/// The daily backup configuration for the instance.
#[prost(message, optional, tag = "17")]
pub backup_configuration: ::core::option::Option<BackupConfiguration>,
/// Configuration specific to read replica instances. Indicates whether
/// replication is enabled or not. WARNING: Changing this restarts the
/// instance.
#[prost(message, optional, tag = "18")]
pub database_replication_enabled: ::core::option::Option<bool>,
/// Configuration specific to read replica instances. Indicates whether
/// database flags for crash-safe replication are enabled. This property was
/// only applicable to First Generation instances.
#[deprecated]
#[prost(message, optional, tag = "19")]
pub crash_safe_replication_enabled: ::core::option::Option<bool>,
/// The size of data disk, in GB. The data disk size minimum is 10GB.
#[prost(message, optional, tag = "20")]
pub data_disk_size_gb: ::core::option::Option<i64>,
/// Active Directory configuration, relevant only for Cloud SQL for SQL Server.
#[prost(message, optional, tag = "22")]
pub active_directory_config: ::core::option::Option<SqlActiveDirectoryConfig>,
/// The name of server Instance collation.
#[prost(string, tag = "23")]
pub collation: ::prost::alloc::string::String,
/// Deny maintenance periods
#[prost(message, repeated, tag = "24")]
pub deny_maintenance_periods: ::prost::alloc::vec::Vec<DenyMaintenancePeriod>,
/// Insights configuration, for now relevant only for Postgres.
#[prost(message, optional, tag = "25")]
pub insights_config: ::core::option::Option<InsightsConfig>,
/// The local user password validation policy of the instance.
#[prost(message, optional, tag = "27")]
pub password_validation_policy: ::core::option::Option<PasswordValidationPolicy>,
/// SQL Server specific audit configuration.
#[prost(message, optional, tag = "29")]
pub sql_server_audit_config: ::core::option::Option<SqlServerAuditConfig>,
/// Optional. The edition of the instance.
#[prost(enumeration = "settings::Edition", tag = "38")]
pub edition: i32,
/// Specifies if connections must use Cloud SQL connectors.
/// Option values include the following: `NOT_REQUIRED` (Cloud SQL instances
/// can be connected without Cloud SQL
/// Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL
/// Connectors)
///
/// Note that using REQUIRED disables all existing authorized networks. If
/// this field is not specified when creating a new instance, NOT_REQUIRED is
/// used. If this field is not specified when patching or updating an existing
/// instance, it is left unchanged in the instance.
#[prost(enumeration = "settings::ConnectorEnforcement", tag = "32")]
pub connector_enforcement: i32,
/// Configuration to protect against accidental instance deletion.
#[prost(message, optional, tag = "33")]
pub deletion_protection_enabled: ::core::option::Option<bool>,
/// Server timezone, relevant only for Cloud SQL for SQL Server.
#[prost(string, tag = "34")]
pub time_zone: ::prost::alloc::string::String,
/// Specifies advanced machine configuration for the instances relevant only
/// for SQL Server.
#[prost(message, optional, tag = "35")]
pub advanced_machine_features: ::core::option::Option<AdvancedMachineFeatures>,
/// Configuration for data cache.
#[prost(message, optional, tag = "37")]
pub data_cache_config: ::core::option::Option<DataCacheConfig>,
/// Optional. When this parameter is set to true, Cloud SQL instances can
/// connect to Vertex AI to pass requests for real-time predictions and
/// insights to the AI. The default value is false. This applies only to Cloud
/// SQL for PostgreSQL instances.
#[prost(message, optional, tag = "40")]
pub enable_google_ml_integration: ::core::option::Option<bool>,
/// Optional. By default, Cloud SQL instances have schema extraction disabled
/// for Dataplex. When this parameter is set to true, schema extraction for
/// Dataplex on Cloud SQL instances is activated.
#[prost(message, optional, tag = "41")]
pub enable_dataplex_integration: ::core::option::Option<bool>,
}
/// Nested message and enum types in `Settings`.
pub mod settings {
/// Specifies when the instance is activated.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SqlActivationPolicy {
/// Unknown activation plan.
Unspecified = 0,
/// The instance is always up and running.
Always = 1,
/// The instance never starts.
Never = 2,
/// The instance starts upon receiving requests.
OnDemand = 3,
}
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",
SqlActivationPolicy::OnDemand => "ON_DEMAND",
}
}
/// 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),
"ON_DEMAND" => Some(Self::OnDemand),
_ => None,
}
}
}
/// The edition of the 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,
}
}
}
/// The options for enforcing Cloud SQL connectors in the instance.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ConnectorEnforcement {
/// The requirement for Cloud SQL connectors is unknown.
Unspecified = 0,
/// Do not require Cloud SQL connectors.
NotRequired = 1,
/// Require all connections to use Cloud SQL connectors, including the
/// Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go connectors.
/// Note: This disables all existing authorized networks.
Required = 2,
}
impl ConnectorEnforcement {
/// 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 {
ConnectorEnforcement::Unspecified => "CONNECTOR_ENFORCEMENT_UNSPECIFIED",
ConnectorEnforcement::NotRequired => "NOT_REQUIRED",
ConnectorEnforcement::Required => "REQUIRED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONNECTOR_ENFORCEMENT_UNSPECIFIED" => Some(Self::Unspecified),
"NOT_REQUIRED" => Some(Self::NotRequired),
"REQUIRED" => Some(Self::Required),
_ => None,
}
}
}
}
/// Specifies options for controlling advanced machine features.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AdvancedMachineFeatures {
/// The number of threads per physical core.
#[prost(int32, tag = "1")]
pub threads_per_core: i32,
}
/// SslCerts Resource
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SslCert {
/// This is always `sql#sslCert`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// Serial number, as extracted from the certificate.
#[prost(string, tag = "2")]
pub cert_serial_number: ::prost::alloc::string::String,
/// PEM representation.
#[prost(string, tag = "3")]
pub cert: ::prost::alloc::string::String,
/// The time when the certificate was created in
/// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
/// `2012-11-15T16:19:00.094Z`.
#[prost(message, optional, tag = "4")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// User supplied name. Constrained to \[a-zA-Z.-_ \]+.
#[prost(string, tag = "5")]
pub common_name: ::prost::alloc::string::String,
/// The time when the certificate expires in
/// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
/// `2012-11-15T16:19:00.094Z`.
#[prost(message, optional, tag = "6")]
pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
/// Sha1 Fingerprint.
#[prost(string, tag = "7")]
pub sha1_fingerprint: ::prost::alloc::string::String,
/// Name of the database instance.
#[prost(string, tag = "8")]
pub instance: ::prost::alloc::string::String,
/// The URI of this resource.
#[prost(string, tag = "9")]
pub self_link: ::prost::alloc::string::String,
}
/// SslCertDetail.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SslCertDetail {
/// The public information about the cert.
#[prost(message, optional, tag = "1")]
pub cert_info: ::core::option::Option<SslCert>,
/// The private key for the client cert, in pem format. Keep private in order
/// to protect your security.
#[prost(string, tag = "2")]
pub cert_private_key: ::prost::alloc::string::String,
}
/// SslCerts create ephemeral certificate request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SslCertsCreateEphemeralRequest {
/// PEM encoded public key to include in the signed certificate.
#[prost(string, tag = "1")]
pub public_key: ::prost::alloc::string::String,
/// Access token to include in the signed certificate.
#[prost(string, tag = "2")]
pub access_token: ::prost::alloc::string::String,
}
/// SslCerts insert request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SslCertsInsertRequest {
/// User supplied name. Must be a distinct name from the other certificates
/// for this instance.
#[prost(string, tag = "1")]
pub common_name: ::prost::alloc::string::String,
}
/// Reschedule options for maintenance windows.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SqlInstancesRescheduleMaintenanceRequestBody {
/// Required. The type of the reschedule the user wants.
#[prost(message, optional, tag = "3")]
pub reschedule: ::core::option::Option<
sql_instances_reschedule_maintenance_request_body::Reschedule,
>,
}
/// Nested message and enum types in `SqlInstancesRescheduleMaintenanceRequestBody`.
pub mod sql_instances_reschedule_maintenance_request_body {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Reschedule {
/// Required. The type of the reschedule.
#[prost(enumeration = "RescheduleType", tag = "1")]
pub reschedule_type: i32,
/// Optional. Timestamp when the maintenance shall be rescheduled to if
/// reschedule_type=SPECIFIC_TIME, in
/// [RFC 3339](<https://tools.ietf.org/html/rfc3339>) format, for example
/// `2012-11-15T16:19:00.094Z`.
#[prost(message, optional, tag = "2")]
pub schedule_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RescheduleType {
Unspecified = 0,
/// Reschedules maintenance to happen now (within 5 minutes).
Immediate = 1,
/// Reschedules maintenance to occur within one week from the originally
/// scheduled day and time.
NextAvailableWindow = 2,
/// Reschedules maintenance to a specific time and day.
SpecificTime = 3,
}
impl RescheduleType {
/// 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 {
RescheduleType::Unspecified => "RESCHEDULE_TYPE_UNSPECIFIED",
RescheduleType::Immediate => "IMMEDIATE",
RescheduleType::NextAvailableWindow => "NEXT_AVAILABLE_WINDOW",
RescheduleType::SpecificTime => "SPECIFIC_TIME",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESCHEDULE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"IMMEDIATE" => Some(Self::Immediate),
"NEXT_AVAILABLE_WINDOW" => Some(Self::NextAvailableWindow),
"SPECIFIC_TIME" => Some(Self::SpecificTime),
_ => None,
}
}
}
}
/// SslCert insert response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SslCertsInsertResponse {
/// This is always `sql#sslCertsInsert`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// The operation to track the ssl certs insert request.
#[prost(message, optional, tag = "2")]
pub operation: ::core::option::Option<Operation>,
/// The server Certificate Authority's certificate. If this is missing you can
/// force a new one to be generated by calling resetSslConfig method on
/// instances resource.
#[prost(message, optional, tag = "3")]
pub server_ca_cert: ::core::option::Option<SslCert>,
/// The new client certificate and private key.
#[prost(message, optional, tag = "4")]
pub client_cert: ::core::option::Option<SslCertDetail>,
}
/// SslCerts list response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SslCertsListResponse {
/// This is always `sql#sslCertsList`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// List of client certificates for the instance.
#[prost(message, repeated, tag = "2")]
pub items: ::prost::alloc::vec::Vec<SslCert>,
}
/// Database Instance truncate log context.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TruncateLogContext {
/// This is always `sql#truncateLogContext`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and
/// `MYSQL_SLOW_TABLE`.
#[prost(string, tag = "2")]
pub log_type: ::prost::alloc::string::String,
}
/// Active Directory configuration, relevant only for Cloud SQL for SQL Server.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlActiveDirectoryConfig {
/// This is always sql#activeDirectoryConfig.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// The name of the domain (e.g., mydomain.com).
#[prost(string, tag = "2")]
pub domain: ::prost::alloc::string::String,
}
/// SQL Server specific audit configuration.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlServerAuditConfig {
/// This is always sql#sqlServerAuditConfig
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// The name of the destination bucket (e.g., gs://mybucket).
#[prost(string, tag = "2")]
pub bucket: ::prost::alloc::string::String,
/// How long to keep generated audit files.
#[prost(message, optional, tag = "3")]
pub retention_interval: ::core::option::Option<::prost_types::Duration>,
/// How often to upload generated audit files.
#[prost(message, optional, tag = "4")]
pub upload_interval: ::core::option::Option<::prost_types::Duration>,
}
/// Acquire SSRS lease context.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AcquireSsrsLeaseContext {
/// The username to be used as the setup login to connect to the database
/// server for SSRS setup.
#[prost(string, optional, tag = "1")]
pub setup_login: ::core::option::Option<::prost::alloc::string::String>,
/// The username to be used as the service login to connect to the report
/// database for SSRS setup.
#[prost(string, optional, tag = "2")]
pub service_login: ::core::option::Option<::prost::alloc::string::String>,
/// The report database to be used for the SSRS setup.
#[prost(string, optional, tag = "3")]
pub report_database: ::core::option::Option<::prost::alloc::string::String>,
/// Lease duration needed for the SSRS setup.
#[prost(message, optional, tag = "4")]
pub duration: ::core::option::Option<::prost_types::Duration>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlFileType {
/// Unknown file type.
Unspecified = 0,
/// File containing SQL statements.
Sql = 1,
/// File in CSV format.
Csv = 2,
Bak = 4,
}
impl SqlFileType {
/// 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 {
SqlFileType::Unspecified => "SQL_FILE_TYPE_UNSPECIFIED",
SqlFileType::Sql => "SQL",
SqlFileType::Csv => "CSV",
SqlFileType::Bak => "BAK",
}
}
/// 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_FILE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SQL" => Some(Self::Sql),
"CSV" => Some(Self::Csv),
"BAK" => Some(Self::Bak),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BakType {
/// Default type.
Unspecified = 0,
/// Full backup.
Full = 1,
/// Differential backup.
Diff = 2,
/// SQL Server Transaction Log
Tlog = 3,
}
impl BakType {
/// 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 {
BakType::Unspecified => "BAK_TYPE_UNSPECIFIED",
BakType::Full => "FULL",
BakType::Diff => "DIFF",
BakType::Tlog => "TLOG",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BAK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"FULL" => Some(Self::Full),
"DIFF" => Some(Self::Diff),
"TLOG" => Some(Self::Tlog),
_ => None,
}
}
}
/// The status of a backup run.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlBackupRunStatus {
/// The status of the run is unknown.
Unspecified = 0,
/// The backup operation was enqueued.
Enqueued = 1,
/// The backup is overdue across a given backup window. Indicates a
/// problem. Example: Long-running operation in progress during
/// the whole window.
Overdue = 2,
/// The backup is in progress.
Running = 3,
/// The backup failed.
Failed = 4,
/// The backup was successful.
Successful = 5,
/// The backup was skipped (without problems) for a given backup
/// window. Example: Instance was idle.
Skipped = 6,
/// The backup is about to be deleted.
DeletionPending = 7,
/// The backup deletion failed.
DeletionFailed = 8,
/// The backup has been deleted.
Deleted = 9,
}
impl SqlBackupRunStatus {
/// 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 {
SqlBackupRunStatus::Unspecified => "SQL_BACKUP_RUN_STATUS_UNSPECIFIED",
SqlBackupRunStatus::Enqueued => "ENQUEUED",
SqlBackupRunStatus::Overdue => "OVERDUE",
SqlBackupRunStatus::Running => "RUNNING",
SqlBackupRunStatus::Failed => "FAILED",
SqlBackupRunStatus::Successful => "SUCCESSFUL",
SqlBackupRunStatus::Skipped => "SKIPPED",
SqlBackupRunStatus::DeletionPending => "DELETION_PENDING",
SqlBackupRunStatus::DeletionFailed => "DELETION_FAILED",
SqlBackupRunStatus::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 {
"SQL_BACKUP_RUN_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"ENQUEUED" => Some(Self::Enqueued),
"OVERDUE" => Some(Self::Overdue),
"RUNNING" => Some(Self::Running),
"FAILED" => Some(Self::Failed),
"SUCCESSFUL" => Some(Self::Successful),
"SKIPPED" => Some(Self::Skipped),
"DELETION_PENDING" => Some(Self::DeletionPending),
"DELETION_FAILED" => Some(Self::DeletionFailed),
"DELETED" => Some(Self::Deleted),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlBackupRunType {
/// This is an unknown BackupRun type.
Unspecified = 0,
/// The backup schedule automatically triggers a backup.
Automated = 1,
/// The user manually triggers a backup.
OnDemand = 2,
}
impl SqlBackupRunType {
/// 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 {
SqlBackupRunType::Unspecified => "SQL_BACKUP_RUN_TYPE_UNSPECIFIED",
SqlBackupRunType::Automated => "AUTOMATED",
SqlBackupRunType::OnDemand => "ON_DEMAND",
}
}
/// 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_BACKUP_RUN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"AUTOMATED" => Some(Self::Automated),
"ON_DEMAND" => Some(Self::OnDemand),
_ => None,
}
}
}
/// Defines the supported backup kinds
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlBackupKind {
/// This is an unknown BackupKind.
Unspecified = 0,
/// The snapshot based backups
Snapshot = 1,
/// Physical backups
Physical = 2,
}
impl SqlBackupKind {
/// 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 {
SqlBackupKind::Unspecified => "SQL_BACKUP_KIND_UNSPECIFIED",
SqlBackupKind::Snapshot => "SNAPSHOT",
SqlBackupKind::Physical => "PHYSICAL",
}
}
/// 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_BACKUP_KIND_UNSPECIFIED" => Some(Self::Unspecified),
"SNAPSHOT" => Some(Self::Snapshot),
"PHYSICAL" => Some(Self::Physical),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlBackendType {
/// This is an unknown backend type for instance.
Unspecified = 0,
/// V1 speckle instance.
FirstGen = 1,
/// V2 speckle instance.
SecondGen = 2,
/// On premises instance.
External = 3,
}
impl SqlBackendType {
/// 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 {
SqlBackendType::Unspecified => "SQL_BACKEND_TYPE_UNSPECIFIED",
SqlBackendType::FirstGen => "FIRST_GEN",
SqlBackendType::SecondGen => "SECOND_GEN",
SqlBackendType::External => "EXTERNAL",
}
}
/// 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_BACKEND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"FIRST_GEN" => Some(Self::FirstGen),
"SECOND_GEN" => Some(Self::SecondGen),
"EXTERNAL" => Some(Self::External),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlIpAddressType {
/// This is an unknown IP address type.
Unspecified = 0,
/// IP address the customer is supposed to connect to. Usually this is the
/// load balancer's IP address
Primary = 1,
/// Source IP address of the connection a read replica establishes to its
/// external primary instance. This IP address can be allowlisted by the
/// customer in case it has a firewall that filters incoming connection to its
/// on premises primary instance.
Outgoing = 2,
/// Private IP used when using private IPs and network peering.
Private = 3,
/// V1 IP of a migrated instance. We want the user to
/// decommission this IP as soon as the migration is complete.
/// Note: V1 instances with V1 ip addresses will be counted as PRIMARY.
Migrated1stGen = 4,
}
impl SqlIpAddressType {
/// 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 {
SqlIpAddressType::Unspecified => "SQL_IP_ADDRESS_TYPE_UNSPECIFIED",
SqlIpAddressType::Primary => "PRIMARY",
SqlIpAddressType::Outgoing => "OUTGOING",
SqlIpAddressType::Private => "PRIVATE",
SqlIpAddressType::Migrated1stGen => "MIGRATED_1ST_GEN",
}
}
/// 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_IP_ADDRESS_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PRIMARY" => Some(Self::Primary),
"OUTGOING" => Some(Self::Outgoing),
"PRIVATE" => Some(Self::Private),
"MIGRATED_1ST_GEN" => Some(Self::Migrated1stGen),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlInstanceType {
/// This is an unknown Cloud SQL instance type.
Unspecified = 0,
/// A regular Cloud SQL instance that is not replicating from a primary
/// instance.
CloudSqlInstance = 1,
/// An instance running on the customer's premises that is not managed by
/// Cloud SQL.
OnPremisesInstance = 2,
/// A Cloud SQL instance acting as a read-replica.
ReadReplicaInstance = 3,
}
impl SqlInstanceType {
/// 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 {
SqlInstanceType::Unspecified => "SQL_INSTANCE_TYPE_UNSPECIFIED",
SqlInstanceType::CloudSqlInstance => "CLOUD_SQL_INSTANCE",
SqlInstanceType::OnPremisesInstance => "ON_PREMISES_INSTANCE",
SqlInstanceType::ReadReplicaInstance => "READ_REPLICA_INSTANCE",
}
}
/// 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_INSTANCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"CLOUD_SQL_INSTANCE" => Some(Self::CloudSqlInstance),
"ON_PREMISES_INSTANCE" => Some(Self::OnPremisesInstance),
"READ_REPLICA_INSTANCE" => Some(Self::ReadReplicaInstance),
_ => None,
}
}
}
/// The database engine type and version.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlDatabaseVersion {
/// This is an unknown database version.
Unspecified = 0,
/// The database version is MySQL 5.1.
Mysql51 = 2,
/// The database version is MySQL 5.5.
Mysql55 = 3,
/// The database version is MySQL 5.6.
Mysql56 = 5,
/// The database version is MySQL 5.7.
Mysql57 = 6,
/// The database version is SQL Server 2017 Standard.
Sqlserver2017Standard = 11,
/// The database version is SQL Server 2017 Enterprise.
Sqlserver2017Enterprise = 14,
/// The database version is SQL Server 2017 Express.
Sqlserver2017Express = 15,
/// The database version is SQL Server 2017 Web.
Sqlserver2017Web = 16,
/// The database version is PostgreSQL 9.6.
Postgres96 = 9,
/// The database version is PostgreSQL 10.
Postgres10 = 18,
/// The database version is PostgreSQL 11.
Postgres11 = 10,
/// The database version is PostgreSQL 12.
Postgres12 = 19,
/// The database version is PostgreSQL 13.
Postgres13 = 23,
/// The database version is PostgreSQL 14.
Postgres14 = 110,
/// The database version is PostgreSQL 15.
Postgres15 = 172,
/// The database version is PostgreSQL 16.
Postgres16 = 272,
/// The database version is MySQL 8.
Mysql80 = 20,
/// The database major version is MySQL 8.0 and the minor version is 18.
Mysql8018 = 41,
/// The database major version is MySQL 8.0 and the minor version is 26.
Mysql8026 = 85,
/// The database major version is MySQL 8.0 and the minor version is 27.
Mysql8027 = 111,
/// The database major version is MySQL 8.0 and the minor version is 28.
Mysql8028 = 132,
/// The database major version is MySQL 8.0 and the minor version is 29.
Mysql8029 = 148,
/// The database major version is MySQL 8.0 and the minor version is 30.
Mysql8030 = 174,
/// The database major version is MySQL 8.0 and the minor version is 31.
Mysql8031 = 197,
/// The database major version is MySQL 8.0 and the minor version is 32.
Mysql8032 = 213,
/// The database major version is MySQL 8.0 and the minor version is 33.
Mysql8033 = 238,
/// The database major version is MySQL 8.0 and the minor version is 34.
Mysql8034 = 239,
/// The database major version is MySQL 8.0 and the minor version is 35.
Mysql8035 = 240,
/// The database major version is MySQL 8.0 and the minor version is 36.
Mysql8036 = 241,
/// The database major version is MySQL 8.0 and the minor version is 37.
Mysql8037 = 355,
/// The database major version is MySQL 8.0 and the minor version is 38.
Mysql8038 = 356,
/// The database major version is MySQL 8.0 and the minor version is 39.
Mysql8039 = 357,
/// The database major version is MySQL 8.0 and the minor version is 40.
Mysql8040 = 358,
/// The database version is MySQL 8.4.
Mysql84 = 398,
/// The database version is MySQL 8.4 and the patch version is 0.
Mysql840 = 399,
/// The database version is SQL Server 2019 Standard.
Sqlserver2019Standard = 26,
/// The database version is SQL Server 2019 Enterprise.
Sqlserver2019Enterprise = 27,
/// The database version is SQL Server 2019 Express.
Sqlserver2019Express = 28,
/// The database version is SQL Server 2019 Web.
Sqlserver2019Web = 29,
/// The database version is SQL Server 2022 Standard.
Sqlserver2022Standard = 199,
/// The database version is SQL Server 2022 Enterprise.
Sqlserver2022Enterprise = 200,
/// The database version is SQL Server 2022 Express.
Sqlserver2022Express = 201,
/// The database version is SQL Server 2022 Web.
Sqlserver2022Web = 202,
}
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::Mysql51 => "MYSQL_5_1",
SqlDatabaseVersion::Mysql55 => "MYSQL_5_5",
SqlDatabaseVersion::Mysql56 => "MYSQL_5_6",
SqlDatabaseVersion::Mysql57 => "MYSQL_5_7",
SqlDatabaseVersion::Sqlserver2017Standard => "SQLSERVER_2017_STANDARD",
SqlDatabaseVersion::Sqlserver2017Enterprise => "SQLSERVER_2017_ENTERPRISE",
SqlDatabaseVersion::Sqlserver2017Express => "SQLSERVER_2017_EXPRESS",
SqlDatabaseVersion::Sqlserver2017Web => "SQLSERVER_2017_WEB",
SqlDatabaseVersion::Postgres96 => "POSTGRES_9_6",
SqlDatabaseVersion::Postgres10 => "POSTGRES_10",
SqlDatabaseVersion::Postgres11 => "POSTGRES_11",
SqlDatabaseVersion::Postgres12 => "POSTGRES_12",
SqlDatabaseVersion::Postgres13 => "POSTGRES_13",
SqlDatabaseVersion::Postgres14 => "POSTGRES_14",
SqlDatabaseVersion::Postgres15 => "POSTGRES_15",
SqlDatabaseVersion::Postgres16 => "POSTGRES_16",
SqlDatabaseVersion::Mysql80 => "MYSQL_8_0",
SqlDatabaseVersion::Mysql8018 => "MYSQL_8_0_18",
SqlDatabaseVersion::Mysql8026 => "MYSQL_8_0_26",
SqlDatabaseVersion::Mysql8027 => "MYSQL_8_0_27",
SqlDatabaseVersion::Mysql8028 => "MYSQL_8_0_28",
SqlDatabaseVersion::Mysql8029 => "MYSQL_8_0_29",
SqlDatabaseVersion::Mysql8030 => "MYSQL_8_0_30",
SqlDatabaseVersion::Mysql8031 => "MYSQL_8_0_31",
SqlDatabaseVersion::Mysql8032 => "MYSQL_8_0_32",
SqlDatabaseVersion::Mysql8033 => "MYSQL_8_0_33",
SqlDatabaseVersion::Mysql8034 => "MYSQL_8_0_34",
SqlDatabaseVersion::Mysql8035 => "MYSQL_8_0_35",
SqlDatabaseVersion::Mysql8036 => "MYSQL_8_0_36",
SqlDatabaseVersion::Mysql8037 => "MYSQL_8_0_37",
SqlDatabaseVersion::Mysql8038 => "MYSQL_8_0_38",
SqlDatabaseVersion::Mysql8039 => "MYSQL_8_0_39",
SqlDatabaseVersion::Mysql8040 => "MYSQL_8_0_40",
SqlDatabaseVersion::Mysql84 => "MYSQL_8_4",
SqlDatabaseVersion::Mysql840 => "MYSQL_8_4_0",
SqlDatabaseVersion::Sqlserver2019Standard => "SQLSERVER_2019_STANDARD",
SqlDatabaseVersion::Sqlserver2019Enterprise => "SQLSERVER_2019_ENTERPRISE",
SqlDatabaseVersion::Sqlserver2019Express => "SQLSERVER_2019_EXPRESS",
SqlDatabaseVersion::Sqlserver2019Web => "SQLSERVER_2019_WEB",
SqlDatabaseVersion::Sqlserver2022Standard => "SQLSERVER_2022_STANDARD",
SqlDatabaseVersion::Sqlserver2022Enterprise => "SQLSERVER_2022_ENTERPRISE",
SqlDatabaseVersion::Sqlserver2022Express => "SQLSERVER_2022_EXPRESS",
SqlDatabaseVersion::Sqlserver2022Web => "SQLSERVER_2022_WEB",
}
}
/// 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_1" => Some(Self::Mysql51),
"MYSQL_5_5" => Some(Self::Mysql55),
"MYSQL_5_6" => Some(Self::Mysql56),
"MYSQL_5_7" => Some(Self::Mysql57),
"SQLSERVER_2017_STANDARD" => Some(Self::Sqlserver2017Standard),
"SQLSERVER_2017_ENTERPRISE" => Some(Self::Sqlserver2017Enterprise),
"SQLSERVER_2017_EXPRESS" => Some(Self::Sqlserver2017Express),
"SQLSERVER_2017_WEB" => Some(Self::Sqlserver2017Web),
"POSTGRES_9_6" => Some(Self::Postgres96),
"POSTGRES_10" => Some(Self::Postgres10),
"POSTGRES_11" => Some(Self::Postgres11),
"POSTGRES_12" => Some(Self::Postgres12),
"POSTGRES_13" => Some(Self::Postgres13),
"POSTGRES_14" => Some(Self::Postgres14),
"POSTGRES_15" => Some(Self::Postgres15),
"POSTGRES_16" => Some(Self::Postgres16),
"MYSQL_8_0" => Some(Self::Mysql80),
"MYSQL_8_0_18" => Some(Self::Mysql8018),
"MYSQL_8_0_26" => Some(Self::Mysql8026),
"MYSQL_8_0_27" => Some(Self::Mysql8027),
"MYSQL_8_0_28" => Some(Self::Mysql8028),
"MYSQL_8_0_29" => Some(Self::Mysql8029),
"MYSQL_8_0_30" => Some(Self::Mysql8030),
"MYSQL_8_0_31" => Some(Self::Mysql8031),
"MYSQL_8_0_32" => Some(Self::Mysql8032),
"MYSQL_8_0_33" => Some(Self::Mysql8033),
"MYSQL_8_0_34" => Some(Self::Mysql8034),
"MYSQL_8_0_35" => Some(Self::Mysql8035),
"MYSQL_8_0_36" => Some(Self::Mysql8036),
"MYSQL_8_0_37" => Some(Self::Mysql8037),
"MYSQL_8_0_38" => Some(Self::Mysql8038),
"MYSQL_8_0_39" => Some(Self::Mysql8039),
"MYSQL_8_0_40" => Some(Self::Mysql8040),
"MYSQL_8_4" => Some(Self::Mysql84),
"MYSQL_8_4_0" => Some(Self::Mysql840),
"SQLSERVER_2019_STANDARD" => Some(Self::Sqlserver2019Standard),
"SQLSERVER_2019_ENTERPRISE" => Some(Self::Sqlserver2019Enterprise),
"SQLSERVER_2019_EXPRESS" => Some(Self::Sqlserver2019Express),
"SQLSERVER_2019_WEB" => Some(Self::Sqlserver2019Web),
"SQLSERVER_2022_STANDARD" => Some(Self::Sqlserver2022Standard),
"SQLSERVER_2022_ENTERPRISE" => Some(Self::Sqlserver2022Enterprise),
"SQLSERVER_2022_EXPRESS" => Some(Self::Sqlserver2022Express),
"SQLSERVER_2022_WEB" => Some(Self::Sqlserver2022Web),
_ => None,
}
}
}
/// The suspension reason of the database instance if the state is SUSPENDED.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlSuspensionReason {
/// This is an unknown suspension reason.
Unspecified = 0,
/// The instance is suspended due to billing issues (for example:, GCP account
/// issue)
BillingIssue = 2,
/// The instance is suspended due to illegal content (for example:, child
/// pornography, copyrighted material, etc.).
LegalIssue = 3,
/// The instance is causing operational issues (for example:, causing the
/// database to crash).
OperationalIssue = 4,
/// The KMS key used by the instance is either revoked or denied access to
KmsKeyIssue = 5,
}
impl SqlSuspensionReason {
/// 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 {
SqlSuspensionReason::Unspecified => "SQL_SUSPENSION_REASON_UNSPECIFIED",
SqlSuspensionReason::BillingIssue => "BILLING_ISSUE",
SqlSuspensionReason::LegalIssue => "LEGAL_ISSUE",
SqlSuspensionReason::OperationalIssue => "OPERATIONAL_ISSUE",
SqlSuspensionReason::KmsKeyIssue => "KMS_KEY_ISSUE",
}
}
/// 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_SUSPENSION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"BILLING_ISSUE" => Some(Self::BillingIssue),
"LEGAL_ISSUE" => Some(Self::LegalIssue),
"OPERATIONAL_ISSUE" => Some(Self::OperationalIssue),
"KMS_KEY_ISSUE" => Some(Self::KmsKeyIssue),
_ => None,
}
}
}
/// The pricing plan for this instance.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlPricingPlan {
/// This is an unknown pricing plan for this instance.
Unspecified = 0,
/// The instance is billed at a monthly flat rate.
Package = 1,
/// The instance is billed per usage.
PerUse = 2,
}
impl SqlPricingPlan {
/// 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 {
SqlPricingPlan::Unspecified => "SQL_PRICING_PLAN_UNSPECIFIED",
SqlPricingPlan::Package => "PACKAGE",
SqlPricingPlan::PerUse => "PER_USE",
}
}
/// 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_PRICING_PLAN_UNSPECIFIED" => Some(Self::Unspecified),
"PACKAGE" => Some(Self::Package),
"PER_USE" => Some(Self::PerUse),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlReplicationType {
/// This is an unknown replication type for a Cloud SQL instance.
Unspecified = 0,
/// The synchronous replication mode for First Generation instances. It is the
/// default value.
Synchronous = 1,
/// The asynchronous replication mode for First Generation instances. It
/// provides a slight performance gain, but if an outage occurs while this
/// option is set to asynchronous, you can lose up to a few seconds of updates
/// to your data.
Asynchronous = 2,
}
impl SqlReplicationType {
/// 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 {
SqlReplicationType::Unspecified => "SQL_REPLICATION_TYPE_UNSPECIFIED",
SqlReplicationType::Synchronous => "SYNCHRONOUS",
SqlReplicationType::Asynchronous => "ASYNCHRONOUS",
}
}
/// 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_REPLICATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SYNCHRONOUS" => Some(Self::Synchronous),
"ASYNCHRONOUS" => Some(Self::Asynchronous),
_ => None,
}
}
}
/// The type of disk that is used for a v2 instance to use.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlDataDiskType {
/// This is an unknown data disk type.
Unspecified = 0,
/// An SSD data disk.
PdSsd = 1,
/// An HDD data disk.
PdHdd = 2,
/// This field is deprecated and will be removed from a future version of the
/// API.
ObsoleteLocalSsd = 3,
}
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",
SqlDataDiskType::ObsoleteLocalSsd => "OBSOLETE_LOCAL_SSD",
}
}
/// 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),
"OBSOLETE_LOCAL_SSD" => Some(Self::ObsoleteLocalSsd),
_ => 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 available instance.
Zonal = 1,
/// Regional available 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,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlUpdateTrack {
/// This is an unknown maintenance timing preference.
Unspecified = 0,
/// For instance update that requires a restart, this update track indicates
/// your instance prefer to restart for new version early in maintenance
/// window.
Canary = 1,
/// For instance update that requires a restart, this update track indicates
/// your instance prefer to let Cloud SQL choose the timing of restart (within
/// its Maintenance window, if applicable).
Stable = 2,
/// For instance update that requires a restart, this update track indicates
/// your instance prefer to let Cloud SQL choose the timing of restart (within
/// its Maintenance window, if applicable) to be at least 5 weeks after the
/// notification.
Week5 = 3,
}
impl SqlUpdateTrack {
/// 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 {
SqlUpdateTrack::Unspecified => "SQL_UPDATE_TRACK_UNSPECIFIED",
SqlUpdateTrack::Canary => "canary",
SqlUpdateTrack::Stable => "stable",
SqlUpdateTrack::Week5 => "week5",
}
}
/// 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_UPDATE_TRACK_UNSPECIFIED" => Some(Self::Unspecified),
"canary" => Some(Self::Canary),
"stable" => Some(Self::Stable),
"week5" => Some(Self::Week5),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SqlFlagType {
/// This is an unknown flag type.
Unspecified = 0,
/// Boolean type flag.
Boolean = 1,
/// String type flag.
String = 2,
/// Integer type flag.
Integer = 3,
/// Flag type used for a server startup option.
None = 4,
/// Type introduced specially for MySQL TimeZone offset. Accept a string value
/// with the format \[-12:59, 13:00\].
MysqlTimezoneOffset = 5,
/// Float type flag.
Float = 6,
/// Comma-separated list of the strings in a SqlFlagType enum.
RepeatedString = 7,
}
impl SqlFlagType {
/// 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 {
SqlFlagType::Unspecified => "SQL_FLAG_TYPE_UNSPECIFIED",
SqlFlagType::Boolean => "BOOLEAN",
SqlFlagType::String => "STRING",
SqlFlagType::Integer => "INTEGER",
SqlFlagType::None => "NONE",
SqlFlagType::MysqlTimezoneOffset => "MYSQL_TIMEZONE_OFFSET",
SqlFlagType::Float => "FLOAT",
SqlFlagType::RepeatedString => "REPEATED_STRING",
}
}
/// 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_FLAG_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"BOOLEAN" => Some(Self::Boolean),
"STRING" => Some(Self::String),
"INTEGER" => Some(Self::Integer),
"NONE" => Some(Self::None),
"MYSQL_TIMEZONE_OFFSET" => Some(Self::MysqlTimezoneOffset),
"FLOAT" => Some(Self::Float),
"REPEATED_STRING" => Some(Self::RepeatedString),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlUsersDeleteRequest {
/// Host of the user in the instance.
#[prost(string, tag = "1")]
pub host: ::prost::alloc::string::String,
/// Database instance ID. This does not include the project ID.
#[prost(string, tag = "2")]
pub instance: ::prost::alloc::string::String,
/// Name of the user in the instance.
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "4")]
pub project: ::prost::alloc::string::String,
}
/// Request message for Users Get RPC
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlUsersGetRequest {
/// Database instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// User of the instance.
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "3")]
pub project: ::prost::alloc::string::String,
/// Host of a user of the instance.
#[prost(string, tag = "4")]
pub host: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlUsersInsertRequest {
/// Database instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<User>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlUsersListRequest {
/// Database instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlUsersUpdateRequest {
/// Optional. Host of the user in the instance.
#[prost(string, tag = "1")]
pub host: ::prost::alloc::string::String,
/// Database instance ID. This does not include the project ID.
#[prost(string, tag = "2")]
pub instance: ::prost::alloc::string::String,
/// Name of the user in the instance.
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "4")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<User>,
}
/// User level password validation policy.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UserPasswordValidationPolicy {
/// Number of failed login attempts allowed before user get locked.
#[prost(int32, tag = "1")]
pub allowed_failed_attempts: i32,
/// Expiration duration after password is updated.
#[prost(message, optional, tag = "2")]
pub password_expiration_duration: ::core::option::Option<::prost_types::Duration>,
/// If true, failed login attempts check will be enabled.
#[prost(bool, tag = "3")]
pub enable_failed_attempts_check: bool,
/// Output only. Read-only password status.
#[prost(message, optional, tag = "4")]
pub status: ::core::option::Option<PasswordStatus>,
/// If true, the user must specify the current password before changing the
/// password. This flag is supported only for MySQL.
#[prost(bool, tag = "5")]
pub enable_password_verification: bool,
}
/// Read-only password status.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PasswordStatus {
/// If true, user does not have login privileges.
#[prost(bool, tag = "1")]
pub locked: bool,
/// The expiration time of the current password.
#[prost(message, optional, tag = "2")]
pub password_expiration_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// A Cloud SQL user resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
/// This is always `sql#user`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// The password for the user.
#[prost(string, tag = "2")]
pub password: ::prost::alloc::string::String,
/// This field is deprecated and will be removed from a future version of the
/// API.
#[prost(string, tag = "3")]
pub etag: ::prost::alloc::string::String,
/// The name of the user in the Cloud SQL instance. Can be omitted for
/// `update` because it is already specified in the URL.
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
/// Optional. The host from which the user can connect. For `insert`
/// operations, host defaults to an empty string. For `update`
/// operations, host is specified as part of the request URL. The host name
/// cannot be updated after insertion. For a MySQL instance, it's required;
/// for a PostgreSQL or SQL Server instance, it's optional.
#[prost(string, tag = "5")]
pub host: ::prost::alloc::string::String,
/// The name of the Cloud SQL instance. This does not include the project ID.
/// Can be omitted for <b>update</b> because it is already specified on the
/// URL.
#[prost(string, tag = "6")]
pub instance: ::prost::alloc::string::String,
/// The project ID of the project containing the Cloud SQL database. The Google
/// apps domain is prefixed if applicable. Can be omitted for
/// <b>update</b> because it is already specified on the URL.
#[prost(string, tag = "7")]
pub project: ::prost::alloc::string::String,
/// The user type. It determines the method to authenticate the user during
/// login. The default is the database's built-in user type.
#[prost(enumeration = "user::SqlUserType", tag = "8")]
pub r#type: i32,
/// User level password validation policy.
#[prost(message, optional, tag = "12")]
pub password_policy: ::core::option::Option<UserPasswordValidationPolicy>,
/// Dual password status for the user.
#[prost(enumeration = "user::DualPasswordType", optional, tag = "13")]
pub dual_password_type: ::core::option::Option<i32>,
/// User details for specific database type
#[prost(oneof = "user::UserDetails", tags = "9")]
pub user_details: ::core::option::Option<user::UserDetails>,
}
/// Nested message and enum types in `User`.
pub mod user {
/// The user type.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SqlUserType {
/// The database's built-in user type.
BuiltIn = 0,
/// Cloud IAM user.
CloudIamUser = 1,
/// Cloud IAM service account.
CloudIamServiceAccount = 2,
/// Cloud IAM group non-login user.
CloudIamGroup = 3,
/// Cloud IAM group login user.
CloudIamGroupUser = 4,
/// Cloud IAM group service account.
CloudIamGroupServiceAccount = 5,
}
impl SqlUserType {
/// 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 {
SqlUserType::BuiltIn => "BUILT_IN",
SqlUserType::CloudIamUser => "CLOUD_IAM_USER",
SqlUserType::CloudIamServiceAccount => "CLOUD_IAM_SERVICE_ACCOUNT",
SqlUserType::CloudIamGroup => "CLOUD_IAM_GROUP",
SqlUserType::CloudIamGroupUser => "CLOUD_IAM_GROUP_USER",
SqlUserType::CloudIamGroupServiceAccount => {
"CLOUD_IAM_GROUP_SERVICE_ACCOUNT"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BUILT_IN" => Some(Self::BuiltIn),
"CLOUD_IAM_USER" => Some(Self::CloudIamUser),
"CLOUD_IAM_SERVICE_ACCOUNT" => Some(Self::CloudIamServiceAccount),
"CLOUD_IAM_GROUP" => Some(Self::CloudIamGroup),
"CLOUD_IAM_GROUP_USER" => Some(Self::CloudIamGroupUser),
"CLOUD_IAM_GROUP_SERVICE_ACCOUNT" => {
Some(Self::CloudIamGroupServiceAccount)
}
_ => None,
}
}
}
/// The type of retained password.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DualPasswordType {
/// The default value.
Unspecified = 0,
/// Do not update the user's dual password status.
NoModifyDualPassword = 1,
/// No dual password usable for connecting using this user.
NoDualPassword = 2,
/// Dual password usable for connecting using this user.
DualPassword = 3,
}
impl DualPasswordType {
/// 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 {
DualPasswordType::Unspecified => "DUAL_PASSWORD_TYPE_UNSPECIFIED",
DualPasswordType::NoModifyDualPassword => "NO_MODIFY_DUAL_PASSWORD",
DualPasswordType::NoDualPassword => "NO_DUAL_PASSWORD",
DualPasswordType::DualPassword => "DUAL_PASSWORD",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DUAL_PASSWORD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"NO_MODIFY_DUAL_PASSWORD" => Some(Self::NoModifyDualPassword),
"NO_DUAL_PASSWORD" => Some(Self::NoDualPassword),
"DUAL_PASSWORD" => Some(Self::DualPassword),
_ => None,
}
}
}
/// User details for specific database type
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum UserDetails {
#[prost(message, tag = "9")]
SqlserverUserDetails(super::SqlServerUserDetails),
}
}
/// Represents a Sql Server user on the Cloud SQL instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlServerUserDetails {
/// If the user has been disabled
#[prost(bool, tag = "1")]
pub disabled: bool,
/// The server roles for this user
#[prost(string, repeated, tag = "2")]
pub server_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// User list response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UsersListResponse {
/// This is always <b>sql#usersList</b>.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// List of user resources in the instance.
#[prost(message, repeated, tag = "2")]
pub items: ::prost::alloc::vec::Vec<User>,
/// Unused.
#[deprecated]
#[prost(string, tag = "3")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod sql_users_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct SqlUsersServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> SqlUsersServiceClient<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,
) -> SqlUsersServiceClient<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,
{
SqlUsersServiceClient::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
}
/// Deletes a user from a Cloud SQL instance.
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::SqlUsersDeleteRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlUsersService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.sql.v1beta4.SqlUsersService", "Delete"),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves a resource containing information about a user.
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::SqlUsersGetRequest>,
) -> std::result::Result<tonic::Response<super::User>, 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.sql.v1beta4.SqlUsersService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.sql.v1beta4.SqlUsersService", "Get"),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new user in a Cloud SQL instance.
pub async fn insert(
&mut self,
request: impl tonic::IntoRequest<super::SqlUsersInsertRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlUsersService/Insert",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.sql.v1beta4.SqlUsersService", "Insert"),
);
self.inner.unary(req, path, codec).await
}
/// Lists users in the specified Cloud SQL instance.
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::SqlUsersListRequest>,
) -> std::result::Result<
tonic::Response<super::UsersListResponse>,
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.sql.v1beta4.SqlUsersService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.sql.v1beta4.SqlUsersService", "List"),
);
self.inner.unary(req, path, codec).await
}
/// Updates an existing user in a Cloud SQL instance.
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::SqlUsersUpdateRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlUsersService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.sql.v1beta4.SqlUsersService", "Update"),
);
self.inner.unary(req, path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlTiersListRequest {
/// Project ID of the project for which to list tiers.
#[prost(string, tag = "1")]
pub project: ::prost::alloc::string::String,
}
/// Tiers list response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TiersListResponse {
/// This is always `sql#tiersList`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// List of tiers.
#[prost(message, repeated, tag = "2")]
pub items: ::prost::alloc::vec::Vec<Tier>,
}
/// A Google Cloud SQL service tier resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Tier {
/// An identifier for the machine type, for example, `db-custom-1-3840`. For
/// related information, see [Pricing](/sql/pricing).
#[prost(string, tag = "1")]
pub tier: ::prost::alloc::string::String,
/// The maximum RAM usage of this tier in bytes.
#[prost(int64, tag = "2")]
pub ram: i64,
/// This is always `sql#tier`.
#[prost(string, tag = "3")]
pub kind: ::prost::alloc::string::String,
/// The maximum disk size of this tier in bytes.
#[prost(int64, tag = "4")]
pub disk_quota: i64,
/// The applicable regions for this tier.
#[prost(string, repeated, tag = "5")]
pub region: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Generated client implementations.
pub mod sql_tiers_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Service for providing machine types (tiers) for Cloud SQL.
#[derive(Debug, Clone)]
pub struct SqlTiersServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> SqlTiersServiceClient<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,
) -> SqlTiersServiceClient<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,
{
SqlTiersServiceClient::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 all available machine types (tiers) for Cloud SQL, for example,
/// `db-custom-1-3840`. For related information, see [Pricing](/sql/pricing).
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::SqlTiersListRequest>,
) -> std::result::Result<
tonic::Response<super::TiersListResponse>,
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.sql.v1beta4.SqlTiersService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.sql.v1beta4.SqlTiersService", "List"),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Generated client implementations.
pub mod sql_iam_policies_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Service for providing IAM Meta APIs for Cloud SQL.
#[derive(Debug, Clone)]
pub struct SqlIamPoliciesServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> SqlIamPoliciesServiceClient<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,
) -> SqlIamPoliciesServiceClient<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,
{
SqlIamPoliciesServiceClient::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
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlBackupRunsDeleteRequest {
/// The ID of the backup run to delete. To find a backup run ID, use the
/// [list](<https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/backupRuns/list>)
/// method.
#[prost(int64, tag = "1")]
pub id: i64,
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "2")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "3")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlBackupRunsGetRequest {
/// The ID of this backup run.
#[prost(int64, tag = "1")]
pub id: i64,
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "2")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "3")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlBackupRunsInsertRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<BackupRun>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlBackupRunsListRequest {
/// Cloud SQL instance ID, or "-" for all instances. This does not include
/// the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Maximum number of backup runs per response.
#[prost(int32, tag = "2")]
pub max_results: i32,
/// A previously-returned page token representing part of the larger set of
/// results to view.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "4")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlDatabasesDeleteRequest {
/// Name of the database to be deleted in the instance.
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
/// Database instance ID. This does not include the project ID.
#[prost(string, tag = "2")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "3")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlDatabasesGetRequest {
/// Name of the database in the instance.
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
/// Database instance ID. This does not include the project ID.
#[prost(string, tag = "2")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "3")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlDatabasesInsertRequest {
/// Database instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<Database>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlDatabasesListRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlDatabasesUpdateRequest {
/// Name of the database to be updated in the instance.
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
/// Database instance ID. This does not include the project ID.
#[prost(string, tag = "2")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "3")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<Database>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlFlagsListRequest {
/// Database type and version you want to retrieve flags for. By default, this
/// method returns flags for all database types and versions.
#[prost(string, tag = "1")]
pub database_version: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesAddServerCaRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesCloneRequest {
/// The ID of the Cloud SQL instance to be cloned (source). This does not
/// include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the source as well as the clone Cloud SQL instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<InstancesCloneRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesDeleteRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance to be deleted.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesDemoteMasterRequest {
/// Cloud SQL instance name.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<InstancesDemoteMasterRequest>,
}
/// Instance demote request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesDemoteRequest {
/// Required. The name of the Cloud SQL instance.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Required. The project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
/// The request body.
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<InstancesDemoteRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesExportRequest {
/// The Cloud SQL instance ID. This doesn't include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance to be exported.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<InstancesExportRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesFailoverRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// ID of the project that contains the read replica.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<InstancesFailoverRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesGetRequest {
/// Database instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesImportRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<InstancesImportRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesInsertRequest {
/// Project ID of the project to which the newly created Cloud SQL instances
/// should belong.
#[prost(string, tag = "1")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<DatabaseInstance>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesListRequest {
/// A filter expression that filters resources listed in the response.
/// The expression is in the form of field:value. For example,
/// 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per
/// their JSON representation, such as 'settings.userLabels.auto_start:true'.
///
/// Multiple filter queries are space-separated. For example.
/// 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each
/// expression is an AND expression. However, you can include AND and OR
/// expressions explicitly.
#[prost(string, tag = "1")]
pub filter: ::prost::alloc::string::String,
/// The maximum number of instances to return. The service may return fewer
/// than this value.
/// If unspecified, at most 500 instances are returned.
/// The maximum value is 1000; values above 1000 are coerced to 1000.
#[prost(uint32, tag = "2")]
pub max_results: u32,
/// A previously-returned page token representing part of the larger set of
/// results to view.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Project ID of the project for which to list Cloud SQL instances.
#[prost(string, tag = "4")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesListServerCasRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesPatchRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<DatabaseInstance>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesPromoteReplicaRequest {
/// Cloud SQL read replica instance name.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// ID of the project that contains the read replica.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
/// Set to true to invoke a replica failover to the designated DR replica.
/// As part of replica failover, the promote operation attempts
/// to add the original primary instance as a replica of the promoted
/// DR replica when the original primary instance comes back online.
/// If set to false or not specified, then the original primary
/// instance becomes an independent Cloud SQL primary instance.
/// Only applicable to MySQL.
#[prost(bool, tag = "3")]
pub failover: bool,
}
/// Instance switchover request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesSwitchoverRequest {
/// Cloud SQL read replica instance name.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// ID of the project that contains the replica.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
/// Optional. (MySQL only) Cloud SQL instance operations timeout, which is a
/// sum of all database operations. Default value is 10 minutes and can be
/// modified to a maximum value of 24 hours.
#[prost(message, optional, tag = "3")]
pub db_timeout: ::core::option::Option<::prost_types::Duration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesResetSslConfigRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesRestartRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance to be restarted.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesRestoreBackupRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<InstancesRestoreBackupRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesRotateServerCaRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<InstancesRotateServerCaRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesStartReplicaRequest {
/// Cloud SQL read replica instance name.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// ID of the project that contains the read replica.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesStopReplicaRequest {
/// Cloud SQL read replica instance name.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// ID of the project that contains the read replica.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesTruncateLogRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the Cloud SQL project.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<InstancesTruncateLogRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesUpdateRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<DatabaseInstance>,
}
/// Instance reencrypt request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesReencryptRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
/// Reencrypt body that users request
#[prost(message, optional, tag = "3")]
pub body: ::core::option::Option<InstancesReencryptRequest>,
}
/// Database Instance reencrypt request.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct InstancesReencryptRequest {
/// Configuration specific to backup re-encryption
#[prost(message, optional, tag = "1")]
pub backup_reencryption_config: ::core::option::Option<BackupReencryptionConfig>,
}
/// Backup Reencryption Config
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BackupReencryptionConfig {
/// Backup re-encryption limit
#[prost(int32, optional, tag = "1")]
pub backup_limit: ::core::option::Option<i32>,
/// Type of backups users want to re-encrypt.
#[prost(enumeration = "backup_reencryption_config::BackupType", optional, tag = "2")]
pub backup_type: ::core::option::Option<i32>,
}
/// Nested message and enum types in `BackupReencryptionConfig`.
pub mod backup_reencryption_config {
/// Backup type for re-encryption
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum BackupType {
/// Unknown backup type, will be defaulted to AUTOMATIC backup type
Unspecified = 0,
/// Reencrypt automatic backups
Automated = 1,
/// Reencrypt on-demand backups
OnDemand = 2,
}
impl BackupType {
/// 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 {
BackupType::Unspecified => "BACKUP_TYPE_UNSPECIFIED",
BackupType::Automated => "AUTOMATED",
BackupType::OnDemand => "ON_DEMAND",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BACKUP_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"AUTOMATED" => Some(Self::Automated),
"ON_DEMAND" => Some(Self::OnDemand),
_ => None,
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesRescheduleMaintenanceRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<SqlInstancesRescheduleMaintenanceRequestBody>,
}
/// Instance perform disk shrink request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesPerformDiskShrinkRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
/// Perform disk shrink context.
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<PerformDiskShrinkContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesVerifyExternalSyncSettingsRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
/// Flag to enable verifying connection only
#[prost(bool, tag = "3")]
pub verify_connection_only: bool,
/// External sync mode
#[prost(
enumeration = "sql_instances_verify_external_sync_settings_request::ExternalSyncMode",
tag = "4"
)]
pub sync_mode: i32,
/// Optional. Flag to verify settings required by replication setup only
#[prost(bool, tag = "5")]
pub verify_replication_only: bool,
/// Optional. MigrationType configures the migration to use physical files or
/// logical dump files. If not set, then the logical dump file configuration is
/// used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL.
#[prost(
enumeration = "sql_instances_verify_external_sync_settings_request::MigrationType",
tag = "7"
)]
pub migration_type: i32,
/// Optional. Parallel level for initial data sync. Only applicable for
/// PostgreSQL.
#[prost(enumeration = "ExternalSyncParallelLevel", tag = "8")]
pub sync_parallel_level: i32,
#[prost(
oneof = "sql_instances_verify_external_sync_settings_request::SyncConfig",
tags = "6"
)]
pub sync_config: ::core::option::Option<
sql_instances_verify_external_sync_settings_request::SyncConfig,
>,
}
/// Nested message and enum types in `SqlInstancesVerifyExternalSyncSettingsRequest`.
pub mod sql_instances_verify_external_sync_settings_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ExternalSyncMode {
/// Unknown external sync mode, will be defaulted to ONLINE mode
Unspecified = 0,
/// Online external sync will set up replication after initial data external
/// sync
Online = 1,
/// Offline external sync only dumps and loads a one-time snapshot of
/// the primary instance's data
Offline = 2,
}
impl ExternalSyncMode {
/// 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 {
ExternalSyncMode::Unspecified => "EXTERNAL_SYNC_MODE_UNSPECIFIED",
ExternalSyncMode::Online => "ONLINE",
ExternalSyncMode::Offline => "OFFLINE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EXTERNAL_SYNC_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"ONLINE" => Some(Self::Online),
"OFFLINE" => Some(Self::Offline),
_ => None,
}
}
}
/// MigrationType determines whether the migration is a physical file-based
/// migration or a logical dump file-based migration.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum MigrationType {
/// Default value is a logical dump file-based migration
Unspecified = 0,
/// Logical dump file-based migration
Logical = 1,
/// Physical file-based migration
Physical = 2,
}
impl MigrationType {
/// 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 {
MigrationType::Unspecified => "MIGRATION_TYPE_UNSPECIFIED",
MigrationType::Logical => "LOGICAL",
MigrationType::Physical => "PHYSICAL",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MIGRATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"LOGICAL" => Some(Self::Logical),
"PHYSICAL" => Some(Self::Physical),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SyncConfig {
/// Optional. MySQL-specific settings for start external sync.
#[prost(message, tag = "6")]
MysqlSyncConfig(super::MySqlSyncConfig),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesStartExternalSyncRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
/// External sync mode.
#[prost(
enumeration = "sql_instances_verify_external_sync_settings_request::ExternalSyncMode",
tag = "3"
)]
pub sync_mode: i32,
/// Whether to skip the verification step (VESS).
#[prost(bool, tag = "4")]
pub skip_verification: bool,
/// Optional. Parallel level for initial data sync. Currently only applicable
/// for MySQL.
#[prost(enumeration = "ExternalSyncParallelLevel", tag = "7")]
pub sync_parallel_level: i32,
/// Optional. MigrationType configures the migration to use physical files or
/// logical dump files. If not set, then the logical dump file configuration is
/// used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL.
#[prost(
enumeration = "sql_instances_verify_external_sync_settings_request::MigrationType",
tag = "8"
)]
pub migration_type: i32,
#[prost(oneof = "sql_instances_start_external_sync_request::SyncConfig", tags = "6")]
pub sync_config: ::core::option::Option<
sql_instances_start_external_sync_request::SyncConfig,
>,
}
/// Nested message and enum types in `SqlInstancesStartExternalSyncRequest`.
pub mod sql_instances_start_external_sync_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SyncConfig {
/// MySQL-specific settings for start external sync.
#[prost(message, tag = "6")]
MysqlSyncConfig(super::MySqlSyncConfig),
}
}
/// Instance reset replica size request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesResetReplicaSizeRequest {
/// Cloud SQL read replica instance name.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// ID of the project that contains the read replica.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlOperationsGetRequest {
/// Instance operation ID.
#[prost(string, tag = "1")]
pub operation: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlOperationsListRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Maximum number of operations per response.
#[prost(uint32, tag = "2")]
pub max_results: u32,
/// A previously-returned page token representing part of the larger set of
/// results to view.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "4")]
pub project: ::prost::alloc::string::String,
}
/// The request payload to cancel an operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlOperationsCancelRequest {
/// Instance operation ID.
#[prost(string, tag = "1")]
pub operation: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesCreateEphemeralCertRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the Cloud SQL project.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<SslCertsCreateEphemeralRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlSslCertsDeleteRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
/// Sha1 FingerPrint.
#[prost(string, tag = "3")]
pub sha1_fingerprint: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlSslCertsGetRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
/// Sha1 FingerPrint.
#[prost(string, tag = "3")]
pub sha1_fingerprint: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlSslCertsInsertRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<SslCertsInsertRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlSslCertsListRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
/// Instance get disk shrink config request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesGetDiskShrinkConfigRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
/// Instance get latest recovery time request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesGetLatestRecoveryTimeRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
/// Instance get latest recovery time response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesGetLatestRecoveryTimeResponse {
/// This is always `sql#getLatestRecoveryTime`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// Timestamp, identifies the latest recovery time of the source instance.
#[prost(message, optional, tag = "2")]
pub latest_recovery_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Request to release a lease for SSRS.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesReleaseSsrsLeaseRequest {
/// Required. The Cloud SQL instance ID. This doesn't include the project ID.
/// It's composed of lowercase letters, numbers, and hyphens, and it must start
/// with a letter. The total length must be 98 characters or less (Example:
/// instance-id).
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Required. The ID of the project that contains the instance (Example:
/// project-id).
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
}
/// The response for the release of the SSRS lease.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesReleaseSsrsLeaseResponse {
/// The operation ID.
#[prost(string, tag = "1")]
pub operation_id: ::prost::alloc::string::String,
}
/// Request to acquire a lease for SSRS.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesAcquireSsrsLeaseRequest {
/// Required. Cloud SQL instance ID. This doesn't include the project ID. It's
/// composed of lowercase letters, numbers, and hyphens, and it must start with
/// a letter. The total length must be 98 characters or less (Example:
/// instance-id).
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Required. ID of the project that contains the instance (Example:
/// project-id).
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
/// The body for request to acquire an SSRS lease.
#[prost(message, optional, tag = "100")]
pub body: ::core::option::Option<InstancesAcquireSsrsLeaseRequest>,
}
/// Acquire SSRS lease response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlInstancesAcquireSsrsLeaseResponse {
/// The unique identifier for this operation.
#[prost(string, optional, tag = "1")]
pub operation_id: ::core::option::Option<::prost::alloc::string::String>,
}
/// External Sync parallel level.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExternalSyncParallelLevel {
/// Unknown sync 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 ExternalSyncParallelLevel {
/// 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 {
ExternalSyncParallelLevel::Unspecified => {
"EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED"
}
ExternalSyncParallelLevel::Min => "MIN",
ExternalSyncParallelLevel::Optimal => "OPTIMAL",
ExternalSyncParallelLevel::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 {
"EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
"MIN" => Some(Self::Min),
"OPTIMAL" => Some(Self::Optimal),
"MAX" => Some(Self::Max),
_ => None,
}
}
}
/// Generated client implementations.
pub mod sql_backup_runs_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct SqlBackupRunsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> SqlBackupRunsServiceClient<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,
) -> SqlBackupRunsServiceClient<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,
{
SqlBackupRunsServiceClient::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
}
/// Deletes the backup taken by a backup run.
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::SqlBackupRunsDeleteRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlBackupRunsService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlBackupRunsService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves a resource containing information about a backup run.
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::SqlBackupRunsGetRequest>,
) -> std::result::Result<tonic::Response<super::BackupRun>, 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.sql.v1beta4.SqlBackupRunsService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlBackupRunsService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new backup run on demand.
pub async fn insert(
&mut self,
request: impl tonic::IntoRequest<super::SqlBackupRunsInsertRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlBackupRunsService/Insert",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlBackupRunsService",
"Insert",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists all backup runs associated with the project or a given instance and
/// configuration in the reverse chronological order of the backup initiation
/// time.
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::SqlBackupRunsListRequest>,
) -> std::result::Result<
tonic::Response<super::BackupRunsListResponse>,
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.sql.v1beta4.SqlBackupRunsService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlBackupRunsService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Generated client implementations.
pub mod sql_databases_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct SqlDatabasesServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> SqlDatabasesServiceClient<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,
) -> SqlDatabasesServiceClient<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,
{
SqlDatabasesServiceClient::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
}
/// Deletes a database from a Cloud SQL instance.
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::SqlDatabasesDeleteRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlDatabasesService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlDatabasesService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves a resource containing information about a database inside a Cloud
/// SQL instance.
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::SqlDatabasesGetRequest>,
) -> std::result::Result<tonic::Response<super::Database>, 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.sql.v1beta4.SqlDatabasesService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlDatabasesService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
/// Inserts a resource containing information about a database inside a Cloud
/// SQL instance.
///
/// **Note:** You can't modify the default character set and collation.
pub async fn insert(
&mut self,
request: impl tonic::IntoRequest<super::SqlDatabasesInsertRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlDatabasesService/Insert",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlDatabasesService",
"Insert",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists databases in the specified Cloud SQL instance.
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::SqlDatabasesListRequest>,
) -> std::result::Result<
tonic::Response<super::DatabasesListResponse>,
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.sql.v1beta4.SqlDatabasesService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlDatabasesService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
/// Partially updates a resource containing information about a database inside
/// a Cloud SQL instance. This method supports patch semantics.
pub async fn patch(
&mut self,
request: impl tonic::IntoRequest<super::SqlDatabasesUpdateRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlDatabasesService/Patch",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlDatabasesService",
"Patch",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a resource containing information about a database inside a Cloud
/// SQL instance.
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::SqlDatabasesUpdateRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlDatabasesService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlDatabasesService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Generated client implementations.
pub mod sql_flags_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct SqlFlagsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> SqlFlagsServiceClient<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,
) -> SqlFlagsServiceClient<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,
{
SqlFlagsServiceClient::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 all available database flags for Cloud SQL instances.
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::SqlFlagsListRequest>,
) -> std::result::Result<
tonic::Response<super::FlagsListResponse>,
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.sql.v1beta4.SqlFlagsService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.sql.v1beta4.SqlFlagsService", "List"),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Generated client implementations.
pub mod sql_instances_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct SqlInstancesServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> SqlInstancesServiceClient<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,
) -> SqlInstancesServiceClient<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,
{
SqlInstancesServiceClient::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
}
/// Add a new trusted Certificate Authority (CA) version for the specified
/// instance. Required to prepare for a certificate rotation. If a CA version
/// was previously added but never used in a certificate rotation, this
/// operation replaces that version. There cannot be more than one CA version
/// waiting to be rotated in.
pub async fn add_server_ca(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesAddServerCaRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/AddServerCa",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"AddServerCa",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a Cloud SQL instance as a clone of the source instance. Using this
/// operation might cause your instance to restart.
pub async fn clone(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesCloneRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/Clone",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"Clone",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a Cloud SQL instance.
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesDeleteRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
/// Demotes the stand-alone instance to be a Cloud SQL read replica for an
/// external database server.
pub async fn demote_master(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesDemoteMasterRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/DemoteMaster",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"DemoteMaster",
),
);
self.inner.unary(req, path, codec).await
}
/// Demotes an existing standalone instance to be a Cloud SQL read replica
/// for an external database server.
pub async fn demote(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesDemoteRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/Demote",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"Demote",
),
);
self.inner.unary(req, path, codec).await
}
/// Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL
/// dump or CSV file.
pub async fn export(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesExportRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/Export",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"Export",
),
);
self.inner.unary(req, path, codec).await
}
/// Initiates a manual failover of a high availability (HA) primary instance
/// to a standby instance, which becomes the primary instance. Users are
/// then rerouted to the new primary. For more information, see the
/// [Overview of high
/// availability](https://cloud.google.com/sql/docs/mysql/high-availability)
/// page in the Cloud SQL documentation.
/// If using Legacy HA (MySQL only), this causes the instance to failover to
/// its failover replica instance.
pub async fn failover(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesFailoverRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/Failover",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"Failover",
),
);
self.inner.unary(req, path, codec).await
}
/// Reencrypt CMEK instance with latest key version.
pub async fn reencrypt(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesReencryptRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/Reencrypt",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"Reencrypt",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves a resource containing information about a Cloud SQL instance.
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesGetRequest>,
) -> std::result::Result<
tonic::Response<super::DatabaseInstance>,
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.sql.v1beta4.SqlInstancesService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
/// Imports data into a Cloud SQL instance from a SQL dump or CSV file in
/// Cloud Storage.
pub async fn import(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesImportRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/Import",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"Import",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new Cloud SQL instance.
pub async fn insert(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesInsertRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/Insert",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"Insert",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists instances under a given project.
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesListRequest>,
) -> std::result::Result<
tonic::Response<super::InstancesListResponse>,
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.sql.v1beta4.SqlInstancesService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists all of the trusted Certificate Authorities (CAs) for the specified
/// instance. There can be up to three CAs listed: the CA that was used to sign
/// the certificate that is currently in use, a CA that has been added but not
/// yet used to sign a certificate, and a CA used to sign a certificate that
/// has previously rotated out.
pub async fn list_server_cas(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesListServerCasRequest>,
) -> std::result::Result<
tonic::Response<super::InstancesListServerCasResponse>,
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.sql.v1beta4.SqlInstancesService/ListServerCas",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"ListServerCas",
),
);
self.inner.unary(req, path, codec).await
}
/// Partially updates settings of a Cloud SQL instance by merging the request
/// with the current configuration. This method supports patch semantics.
pub async fn patch(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesPatchRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/Patch",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"Patch",
),
);
self.inner.unary(req, path, codec).await
}
/// Promotes the read replica instance to be an independent Cloud SQL
/// primary instance.
/// Using this operation might cause your instance to restart.
pub async fn promote_replica(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesPromoteReplicaRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/PromoteReplica",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"PromoteReplica",
),
);
self.inner.unary(req, path, codec).await
}
/// Switches over from the primary instance to the designated DR replica
/// instance.
pub async fn switchover(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesSwitchoverRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/Switchover",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"Switchover",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes all client certificates and generates a new server SSL certificate
/// for the instance.
pub async fn reset_ssl_config(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesResetSslConfigRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/ResetSslConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"ResetSslConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Restarts a Cloud SQL instance.
pub async fn restart(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesRestartRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/Restart",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"Restart",
),
);
self.inner.unary(req, path, codec).await
}
/// Restores a backup of a Cloud SQL instance. Using this operation might cause
/// your instance to restart.
pub async fn restore_backup(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesRestoreBackupRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/RestoreBackup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"RestoreBackup",
),
);
self.inner.unary(req, path, codec).await
}
/// Rotates the server certificate to one signed by the Certificate Authority
/// (CA) version previously added with the addServerCA method.
pub async fn rotate_server_ca(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesRotateServerCaRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/RotateServerCa",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"RotateServerCa",
),
);
self.inner.unary(req, path, codec).await
}
/// Starts the replication in the read replica instance.
pub async fn start_replica(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesStartReplicaRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/StartReplica",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"StartReplica",
),
);
self.inner.unary(req, path, codec).await
}
/// Stops the replication in the read replica instance.
pub async fn stop_replica(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesStopReplicaRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/StopReplica",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"StopReplica",
),
);
self.inner.unary(req, path, codec).await
}
/// Truncate MySQL general and slow query log tables
/// MySQL only.
pub async fn truncate_log(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesTruncateLogRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/TruncateLog",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"TruncateLog",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates settings of a Cloud SQL instance. Using this operation might cause
/// your instance to restart.
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesUpdateRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
/// Generates a short-lived X509 certificate containing the provided public key
/// and signed by a private key specific to the target instance. Users may use
/// the certificate to authenticate as themselves when connecting to the
/// database.
pub async fn create_ephemeral(
&mut self,
request: impl tonic::IntoRequest<
super::SqlInstancesCreateEphemeralCertRequest,
>,
) -> std::result::Result<tonic::Response<super::SslCert>, 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.sql.v1beta4.SqlInstancesService/CreateEphemeral",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"CreateEphemeral",
),
);
self.inner.unary(req, path, codec).await
}
/// Reschedules the maintenance on the given instance.
pub async fn reschedule_maintenance(
&mut self,
request: impl tonic::IntoRequest<
super::SqlInstancesRescheduleMaintenanceRequest,
>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/RescheduleMaintenance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"RescheduleMaintenance",
),
);
self.inner.unary(req, path, codec).await
}
/// Verify External primary instance external sync settings.
pub async fn verify_external_sync_settings(
&mut self,
request: impl tonic::IntoRequest<
super::SqlInstancesVerifyExternalSyncSettingsRequest,
>,
) -> std::result::Result<
tonic::Response<super::SqlInstancesVerifyExternalSyncSettingsResponse>,
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.sql.v1beta4.SqlInstancesService/VerifyExternalSyncSettings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"VerifyExternalSyncSettings",
),
);
self.inner.unary(req, path, codec).await
}
/// Start External primary instance migration.
pub async fn start_external_sync(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesStartExternalSyncRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/StartExternalSync",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"StartExternalSync",
),
);
self.inner.unary(req, path, codec).await
}
/// Perform Disk Shrink on primary instance.
pub async fn perform_disk_shrink(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesPerformDiskShrinkRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/PerformDiskShrink",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"PerformDiskShrink",
),
);
self.inner.unary(req, path, codec).await
}
/// Get Disk Shrink Config for a given instance.
pub async fn get_disk_shrink_config(
&mut self,
request: impl tonic::IntoRequest<
super::SqlInstancesGetDiskShrinkConfigRequest,
>,
) -> std::result::Result<
tonic::Response<super::SqlInstancesGetDiskShrinkConfigResponse>,
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.sql.v1beta4.SqlInstancesService/GetDiskShrinkConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"GetDiskShrinkConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Reset Replica Size to primary instance disk size.
pub async fn reset_replica_size(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesResetReplicaSizeRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlInstancesService/ResetReplicaSize",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"ResetReplicaSize",
),
);
self.inner.unary(req, path, codec).await
}
/// Get Latest Recovery Time for a given instance.
pub async fn get_latest_recovery_time(
&mut self,
request: impl tonic::IntoRequest<
super::SqlInstancesGetLatestRecoveryTimeRequest,
>,
) -> std::result::Result<
tonic::Response<super::SqlInstancesGetLatestRecoveryTimeResponse>,
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.sql.v1beta4.SqlInstancesService/GetLatestRecoveryTime",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"GetLatestRecoveryTime",
),
);
self.inner.unary(req, path, codec).await
}
/// Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
pub async fn acquire_ssrs_lease(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesAcquireSsrsLeaseRequest>,
) -> std::result::Result<
tonic::Response<super::SqlInstancesAcquireSsrsLeaseResponse>,
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.sql.v1beta4.SqlInstancesService/AcquireSsrsLease",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"AcquireSsrsLease",
),
);
self.inner.unary(req, path, codec).await
}
/// Release a lease for the setup of SQL Server Reporting Services (SSRS).
pub async fn release_ssrs_lease(
&mut self,
request: impl tonic::IntoRequest<super::SqlInstancesReleaseSsrsLeaseRequest>,
) -> std::result::Result<
tonic::Response<super::SqlInstancesReleaseSsrsLeaseResponse>,
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.sql.v1beta4.SqlInstancesService/ReleaseSsrsLease",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlInstancesService",
"ReleaseSsrsLease",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Generated client implementations.
pub mod sql_operations_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct SqlOperationsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> SqlOperationsServiceClient<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,
) -> SqlOperationsServiceClient<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,
{
SqlOperationsServiceClient::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
}
/// Retrieves an instance operation that has been performed on an instance.
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::SqlOperationsGetRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlOperationsService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlOperationsService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists all instance operations that have been performed on the given Cloud
/// SQL instance in the reverse chronological order of the start time.
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::SqlOperationsListRequest>,
) -> std::result::Result<
tonic::Response<super::OperationsListResponse>,
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.sql.v1beta4.SqlOperationsService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlOperationsService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
/// Cancels an instance operation that has been performed on an instance.
pub async fn cancel(
&mut self,
request: impl tonic::IntoRequest<super::SqlOperationsCancelRequest>,
) -> 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.sql.v1beta4.SqlOperationsService/Cancel",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlOperationsService",
"Cancel",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Generated client implementations.
pub mod sql_ssl_certs_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct SqlSslCertsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> SqlSslCertsServiceClient<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,
) -> SqlSslCertsServiceClient<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,
{
SqlSslCertsServiceClient::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
}
/// Deletes the SSL certificate. For First Generation instances, the
/// certificate remains valid until the instance is restarted.
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::SqlSslCertsDeleteRequest>,
) -> std::result::Result<tonic::Response<super::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.sql.v1beta4.SqlSslCertsService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlSslCertsService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves a particular SSL certificate. Does not include the private key
/// (required for usage). The private key must be saved from the response to
/// initial creation.
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::SqlSslCertsGetRequest>,
) -> std::result::Result<tonic::Response<super::SslCert>, 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.sql.v1beta4.SqlSslCertsService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.sql.v1beta4.SqlSslCertsService", "Get"),
);
self.inner.unary(req, path, codec).await
}
/// Creates an SSL certificate and returns it along with the private key and
/// server certificate authority. The new certificate will not be usable until
/// the instance is restarted.
pub async fn insert(
&mut self,
request: impl tonic::IntoRequest<super::SqlSslCertsInsertRequest>,
) -> std::result::Result<
tonic::Response<super::SslCertsInsertResponse>,
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.sql.v1beta4.SqlSslCertsService/Insert",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlSslCertsService",
"Insert",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists all of the current SSL certificates for the instance.
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::SqlSslCertsListRequest>,
) -> std::result::Result<
tonic::Response<super::SslCertsListResponse>,
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.sql.v1beta4.SqlSslCertsService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlSslCertsService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Connect settings retrieval request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConnectSettingsRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
/// Optional. Optional snapshot read timestamp to trade freshness for
/// performance.
#[prost(message, optional, tag = "7")]
pub read_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Connect settings retrieval response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectSettings {
/// This is always `sql#connectSettings`.
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
/// SSL configuration.
#[prost(message, optional, tag = "2")]
pub server_ca_cert: ::core::option::Option<SslCert>,
/// The assigned IP addresses for the instance.
#[prost(message, repeated, tag = "3")]
pub ip_addresses: ::prost::alloc::vec::Vec<IpMapping>,
/// The cloud region for the instance. e.g. `us-central1`, `europe-west1`.
/// The region cannot be changed after instance creation.
#[prost(string, tag = "4")]
pub region: ::prost::alloc::string::String,
/// The database engine type and version. The `databaseVersion`
/// field cannot be changed after instance creation.
/// MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default),
/// or `MYSQL_5_6`.
/// PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`,
/// `POSTGRES_11` or `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`.
/// SQL Server instances: `SQLSERVER_2017_STANDARD` (default),
/// `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`,
/// `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`,
/// `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or
/// `SQLSERVER_2019_WEB`.
#[prost(enumeration = "SqlDatabaseVersion", tag = "31")]
pub database_version: i32,
/// `SECOND_GEN`: Cloud SQL database instance.
/// `EXTERNAL`: A database server that is not managed by Google.
/// This property is read-only; use the `tier` property in the `settings`
/// object to determine the database type.
#[prost(enumeration = "SqlBackendType", tag = "32")]
pub backend_type: i32,
/// Whether PSC connectivity is enabled for this instance.
#[prost(bool, tag = "33")]
pub psc_enabled: bool,
/// The dns name of the instance.
#[prost(string, tag = "34")]
pub dns_name: ::prost::alloc::string::String,
}
/// Ephemeral certificate creation request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateEphemeralCertRequest {
/// Cloud SQL instance ID. This does not include the project ID.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
/// Project ID of the project that contains the instance.
#[prost(string, tag = "2")]
pub project: ::prost::alloc::string::String,
/// PEM encoded public key to include in the signed certificate.
#[prost(string, tag = "3")]
pub public_key: ::prost::alloc::string::String,
/// Optional. Access token to include in the signed certificate.
#[prost(string, tag = "4")]
pub access_token: ::prost::alloc::string::String,
/// Optional. Optional snapshot read timestamp to trade freshness for
/// performance.
#[prost(message, optional, tag = "7")]
pub read_time: ::core::option::Option<::prost_types::Timestamp>,
/// Optional. If set, it will contain the cert valid duration.
#[prost(message, optional, tag = "12")]
pub valid_duration: ::core::option::Option<::prost_types::Duration>,
}
/// Ephemeral certificate creation request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateEphemeralCertResponse {
/// Generated cert
#[prost(message, optional, tag = "1")]
pub ephemeral_cert: ::core::option::Option<SslCert>,
}
/// Generated client implementations.
pub mod sql_connect_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Cloud SQL connect service.
#[derive(Debug, Clone)]
pub struct SqlConnectServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> SqlConnectServiceClient<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,
) -> SqlConnectServiceClient<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,
{
SqlConnectServiceClient::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
}
/// Retrieves connect settings about a Cloud SQL instance.
pub async fn get_connect_settings(
&mut self,
request: impl tonic::IntoRequest<super::GetConnectSettingsRequest>,
) -> std::result::Result<
tonic::Response<super::ConnectSettings>,
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.sql.v1beta4.SqlConnectService/GetConnectSettings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlConnectService",
"GetConnectSettings",
),
);
self.inner.unary(req, path, codec).await
}
/// Generates a short-lived X509 certificate containing the provided public key
/// and signed by a private key specific to the target instance. Users may use
/// the certificate to authenticate as themselves when connecting to the
/// database.
pub async fn generate_ephemeral_cert(
&mut self,
request: impl tonic::IntoRequest<super::GenerateEphemeralCertRequest>,
) -> std::result::Result<
tonic::Response<super::GenerateEphemeralCertResponse>,
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.sql.v1beta4.SqlConnectService/GenerateEphemeralCert",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.sql.v1beta4.SqlConnectService",
"GenerateEphemeralCert",
),
);
self.inner.unary(req, path, codec).await
}
}
}