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
// This file is @generated by prost-build.
/// Definition of a software environment that is used to start a notebook
/// instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Environment {
/// Output only. Name of this environment.
/// Format:
/// `projects/{project_id}/locations/{location}/environments/{environment_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Display name of this environment for the UI.
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
/// A brief description of this environment.
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
/// Path to a Bash script that automatically runs after a notebook instance
/// fully boots up. The path must be a URL or
/// Cloud Storage path. Example: `"gs://path-to-file/file-name"`
#[prost(string, tag = "8")]
pub post_startup_script: ::prost::alloc::string::String,
/// Output only. The time at which this environment was created.
#[prost(message, optional, tag = "9")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Type of the environment; can be one of VM image, or container image.
#[prost(oneof = "environment::ImageType", tags = "6, 7")]
pub image_type: ::core::option::Option<environment::ImageType>,
}
/// Nested message and enum types in `Environment`.
pub mod environment {
/// Type of the environment; can be one of VM image, or container image.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ImageType {
/// Use a Compute Engine VM image to start the notebook instance.
#[prost(message, tag = "6")]
VmImage(super::VmImage),
/// Use a container image to start the notebook instance.
#[prost(message, tag = "7")]
ContainerImage(super::ContainerImage),
}
}
/// Definition of a custom Compute Engine virtual machine image for starting a
/// notebook instance with the environment installed directly on the VM.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VmImage {
/// Required. The name of the Google Cloud project that this VM image belongs to.
/// Format: `{project_id}`
#[prost(string, tag = "1")]
pub project: ::prost::alloc::string::String,
/// The reference to an external Compute Engine VM image.
#[prost(oneof = "vm_image::Image", tags = "2, 3")]
pub image: ::core::option::Option<vm_image::Image>,
}
/// Nested message and enum types in `VmImage`.
pub mod vm_image {
/// The reference to an external Compute Engine VM image.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Image {
/// Use VM image name to find the image.
#[prost(string, tag = "2")]
ImageName(::prost::alloc::string::String),
/// Use this VM image family to find the image; the newest image in this
/// family will be used.
#[prost(string, tag = "3")]
ImageFamily(::prost::alloc::string::String),
}
}
/// Definition of a container image for starting a notebook instance with the
/// environment installed in a container.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContainerImage {
/// Required. The path to the container image repository. For example:
/// `gcr.io/{project_id}/{image_name}`
#[prost(string, tag = "1")]
pub repository: ::prost::alloc::string::String,
/// The tag of the container image. If not specified, this defaults
/// to the latest tag.
#[prost(string, tag = "2")]
pub tag: ::prost::alloc::string::String,
}
/// Reservation Affinity for consuming Zonal reservation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReservationAffinity {
/// Optional. Type of reservation to consume
#[prost(enumeration = "reservation_affinity::Type", tag = "1")]
pub consume_reservation_type: i32,
/// Optional. Corresponds to the label key of reservation resource.
#[prost(string, tag = "2")]
pub key: ::prost::alloc::string::String,
/// Optional. Corresponds to the label values of reservation resource.
#[prost(string, repeated, tag = "3")]
pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Nested message and enum types in `ReservationAffinity`.
pub mod reservation_affinity {
/// Indicates whether to consume capacity from an reservation or not.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// Default type.
Unspecified = 0,
/// Do not consume from any allocated capacity.
NoReservation = 1,
/// Consume any reservation available.
AnyReservation = 2,
/// Must consume from a specific reservation. Must specify key value fields
/// for specifying the reservations.
SpecificReservation = 3,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::NoReservation => "NO_RESERVATION",
Type::AnyReservation => "ANY_RESERVATION",
Type::SpecificReservation => "SPECIFIC_RESERVATION",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"NO_RESERVATION" => Some(Self::NoReservation),
"ANY_RESERVATION" => Some(Self::AnyReservation),
"SPECIFIC_RESERVATION" => Some(Self::SpecificReservation),
_ => None,
}
}
}
}
/// The definition of a notebook instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Instance {
/// Output only. The name of this notebook instance. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Path to a Bash script that automatically runs after a notebook instance
/// fully boots up. The path must be a URL or
/// Cloud Storage path (`gs://path-to-file/file-name`).
#[prost(string, tag = "4")]
pub post_startup_script: ::prost::alloc::string::String,
/// Output only. The proxy endpoint that is used to access the Jupyter notebook.
#[prost(string, tag = "5")]
pub proxy_uri: ::prost::alloc::string::String,
/// Input only. The owner of this instance after creation. Format: `alias@example.com`
///
/// Currently supports one owner only. If not specified, all of the service
/// account users of your VM instance's service account can use
/// the instance.
#[prost(string, repeated, tag = "6")]
pub instance_owners: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The service account on this instance, giving access to other Google
/// Cloud services.
/// You can use any service account within the same project, but you
/// must have the service account user permission to use the instance.
///
/// If not specified, the [Compute Engine default service
/// account](<https://cloud.google.com/compute/docs/access/service-accounts#default_service_account>)
/// is used.
#[prost(string, tag = "7")]
pub service_account: ::prost::alloc::string::String,
/// Optional. The URIs of service account scopes to be included in
/// Compute Engine instances.
///
/// If not specified, the following
/// [scopes](<https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam>)
/// are defined:
/// - <https://www.googleapis.com/auth/cloud-platform>
/// - <https://www.googleapis.com/auth/userinfo.email>
/// If not using default scopes, you need at least:
/// <https://www.googleapis.com/auth/compute>
#[prost(string, repeated, tag = "31")]
pub service_account_scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Required. The [Compute Engine machine
/// type](<https://cloud.google.com/compute/docs/machine-types>) of this
/// instance.
#[prost(string, tag = "8")]
pub machine_type: ::prost::alloc::string::String,
/// The hardware accelerator used on this instance. If you use
/// accelerators, make sure that your configuration has
/// [enough vCPUs and memory to support the `machine_type` you have
/// selected](<https://cloud.google.com/compute/docs/gpus/#gpus-list>).
#[prost(message, optional, tag = "9")]
pub accelerator_config: ::core::option::Option<instance::AcceleratorConfig>,
/// Output only. The state of this instance.
#[prost(enumeration = "instance::State", tag = "10")]
pub state: i32,
/// Whether the end user authorizes Google Cloud to install GPU driver
/// on this instance.
/// If this field is empty or set to false, the GPU driver won't be installed.
/// Only applicable to instances with GPUs.
#[prost(bool, tag = "11")]
pub install_gpu_driver: bool,
/// Specify a custom Cloud Storage path where the GPU driver is stored.
/// If not specified, we'll automatically choose from official GPU drivers.
#[prost(string, tag = "12")]
pub custom_gpu_driver_path: ::prost::alloc::string::String,
/// Input only. The type of the boot disk attached to this instance, defaults to
/// standard persistent disk (`PD_STANDARD`).
#[prost(enumeration = "instance::DiskType", tag = "13")]
pub boot_disk_type: i32,
/// Input only. The size of the boot disk in GB attached to this instance, up to a maximum
/// of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not
/// specified, this defaults to 100.
#[prost(int64, tag = "14")]
pub boot_disk_size_gb: i64,
/// Input only. The type of the data disk attached to this instance, defaults to
/// standard persistent disk (`PD_STANDARD`).
#[prost(enumeration = "instance::DiskType", tag = "25")]
pub data_disk_type: i32,
/// Input only. The size of the data disk in GB attached to this instance, up to a maximum
/// of 64000 GB (64 TB). You can choose the size of the data disk based on how
/// big your notebooks and data are. If not specified, this defaults to 100.
#[prost(int64, tag = "26")]
pub data_disk_size_gb: i64,
/// Input only. If true, the data disk will not be auto deleted when deleting the instance.
#[prost(bool, tag = "27")]
pub no_remove_data_disk: bool,
/// Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
#[prost(enumeration = "instance::DiskEncryption", tag = "15")]
pub disk_encryption: i32,
/// Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
/// is CMEK.
/// Format:
/// `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
///
/// Learn more about [using your own encryption keys](/kms/docs/quickstart).
#[prost(string, tag = "16")]
pub kms_key: ::prost::alloc::string::String,
/// Output only. Attached disks to notebook instance.
#[prost(message, repeated, tag = "28")]
pub disks: ::prost::alloc::vec::Vec<instance::Disk>,
/// Optional. Shielded VM configuration.
/// [Images using supported Shielded VM
/// features](<https://cloud.google.com/compute/docs/instances/modifying-shielded-vm>).
#[prost(message, optional, tag = "30")]
pub shielded_instance_config: ::core::option::Option<
instance::ShieldedInstanceConfig,
>,
/// If true, no public IP will be assigned to this instance.
#[prost(bool, tag = "17")]
pub no_public_ip: bool,
/// If true, the notebook instance will not register with the proxy.
#[prost(bool, tag = "18")]
pub no_proxy_access: bool,
/// The name of the VPC that this instance is in.
/// Format:
/// `projects/{project_id}/global/networks/{network_id}`
#[prost(string, tag = "19")]
pub network: ::prost::alloc::string::String,
/// The name of the subnet that this instance is in.
/// Format:
/// `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
#[prost(string, tag = "20")]
pub subnet: ::prost::alloc::string::String,
/// Labels to apply to this instance.
/// These can be later modified by the setLabels method.
#[prost(btree_map = "string, string", tag = "21")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Custom metadata to apply to this instance.
#[prost(btree_map = "string, string", tag = "22")]
pub metadata: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Optional. The Compute Engine tags to add to runtime (see [Tagging
/// instances](<https://cloud.google.com/compute/docs/label-or-tag-resources#tags>)).
#[prost(string, repeated, tag = "32")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The upgrade history of this instance.
#[prost(message, repeated, tag = "29")]
pub upgrade_history: ::prost::alloc::vec::Vec<instance::UpgradeHistoryEntry>,
/// Optional. The type of vNIC to be used on this interface. This may be gVNIC or
/// VirtioNet.
#[prost(enumeration = "instance::NicType", tag = "33")]
pub nic_type: i32,
/// Optional. The optional reservation affinity. Setting this field will apply
/// the specified [Zonal Compute
/// Reservation](<https://cloud.google.com/compute/docs/instances/reserving-zonal-resources>)
/// to this notebook instance.
#[prost(message, optional, tag = "34")]
pub reservation_affinity: ::core::option::Option<ReservationAffinity>,
/// Output only. Email address of entity that sent original CreateInstance request.
#[prost(string, tag = "36")]
pub creator: ::prost::alloc::string::String,
/// Optional. Flag to enable ip forwarding or not, default false/off.
/// <https://cloud.google.com/vpc/docs/using-routes#canipforward>
#[prost(bool, tag = "39")]
pub can_ip_forward: bool,
/// Output only. Instance creation time.
#[prost(message, optional, tag = "23")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Instance update time.
#[prost(message, optional, tag = "24")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Type of the environment; can be one of VM image, or container image.
#[prost(oneof = "instance::Environment", tags = "2, 3")]
pub environment: ::core::option::Option<instance::Environment>,
}
/// Nested message and enum types in `Instance`.
pub mod instance {
/// Definition of a hardware accelerator. Note that not all combinations
/// of `type` and `core_count` are valid. Check [GPUs on Compute
/// Engine](<https://cloud.google.com/compute/docs/gpus/#gpus-list>) to find a
/// valid combination. TPUs are not supported.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AcceleratorConfig {
/// Type of this accelerator.
#[prost(enumeration = "AcceleratorType", tag = "1")]
pub r#type: i32,
/// Count of cores of this accelerator.
#[prost(int64, tag = "2")]
pub core_count: i64,
}
/// An instance-attached disk resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Disk {
/// Indicates whether the disk will be auto-deleted when the instance is
/// deleted (but not when the disk is detached from the instance).
#[prost(bool, tag = "1")]
pub auto_delete: bool,
/// Indicates that this is a boot disk. The virtual machine will use the
/// first partition of the disk for its root filesystem.
#[prost(bool, tag = "2")]
pub boot: bool,
/// Indicates a unique device name of your choice that is reflected into the
/// `/dev/disk/by-id/google-*` tree of a Linux operating system running
/// within the instance. This name can be used to reference the device for
/// mounting, resizing, and so on, from within the instance.
///
/// If not specified, the server chooses a default device name to apply to
/// this disk, in the form persistent-disk-x, where x is a number assigned by
/// Google Compute Engine.This field is only applicable for persistent disks.
#[prost(string, tag = "3")]
pub device_name: ::prost::alloc::string::String,
/// Indicates the size of the disk in base-2 GB.
#[prost(int64, tag = "4")]
pub disk_size_gb: i64,
/// Indicates a list of features to enable on the guest operating system.
/// Applicable only for bootable images. Read Enabling guest operating
/// system features to see a list of available options.
#[prost(message, repeated, tag = "5")]
pub guest_os_features: ::prost::alloc::vec::Vec<disk::GuestOsFeature>,
/// A zero-based index to this disk, where 0 is reserved for the
/// boot disk. If you have many disks attached to an instance, each disk
/// would have a unique index number.
#[prost(int64, tag = "6")]
pub index: i64,
/// Indicates the disk interface to use for attaching this disk, which is
/// either SCSI or NVME. The default is SCSI. Persistent disks must always
/// use SCSI and the request will fail if you attempt to attach a persistent
/// disk in any other format than SCSI. Local SSDs can use either NVME or
/// SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
/// performance.
/// Valid values:
///
/// * `NVME`
/// * `SCSI`
#[prost(string, tag = "7")]
pub interface: ::prost::alloc::string::String,
/// Type of the resource. Always compute#attachedDisk for attached
/// disks.
#[prost(string, tag = "8")]
pub kind: ::prost::alloc::string::String,
/// A list of publicly visible licenses. Reserved for Google's use.
/// A License represents billing and aggregate usage data for public
/// and marketplace images.
#[prost(string, repeated, tag = "9")]
pub licenses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The mode in which to attach this disk, either `READ_WRITE` or
/// `READ_ONLY`. If not specified, the default is to attach the disk in
/// `READ_WRITE` mode. Valid values:
///
/// * `READ_ONLY`
/// * `READ_WRITE`
#[prost(string, tag = "10")]
pub mode: ::prost::alloc::string::String,
/// Indicates a valid partial or full URL to an existing Persistent Disk
/// resource.
#[prost(string, tag = "11")]
pub source: ::prost::alloc::string::String,
/// Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
/// Valid values:
///
/// * `PERSISTENT`
/// * `SCRATCH`
#[prost(string, tag = "12")]
pub r#type: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Disk`.
pub mod disk {
/// Guest OS features for boot disk.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GuestOsFeature {
/// The ID of a supported feature. Read Enabling guest operating system
/// features to see a list of available options.
/// Valid values:
///
/// * `FEATURE_TYPE_UNSPECIFIED`
/// * `MULTI_IP_SUBNET`
/// * `SECURE_BOOT`
/// * `UEFI_COMPATIBLE`
/// * `VIRTIO_SCSI_MULTIQUEUE`
/// * `WINDOWS`
#[prost(string, tag = "1")]
pub r#type: ::prost::alloc::string::String,
}
}
/// A set of Shielded Instance options.
/// Check [Images using supported Shielded VM
/// features](<https://cloud.google.com/compute/docs/instances/modifying-shielded-vm>).
/// Not all combinations are valid.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ShieldedInstanceConfig {
/// Defines whether the instance has Secure Boot enabled.
///
/// Secure Boot helps ensure that the system only runs authentic software by
/// verifying the digital signature of all boot components, and halting the
/// boot process if signature verification fails. Disabled by default.
#[prost(bool, tag = "1")]
pub enable_secure_boot: bool,
/// Defines whether the instance has the vTPM enabled. Enabled by default.
#[prost(bool, tag = "2")]
pub enable_vtpm: bool,
/// Defines whether the instance has integrity monitoring enabled.
///
/// Enables monitoring and attestation of the boot integrity of the instance.
/// The attestation is performed against the integrity policy baseline. This
/// baseline is initially derived from the implicitly trusted boot image when
/// the instance is created. Enabled by default.
#[prost(bool, tag = "3")]
pub enable_integrity_monitoring: bool,
}
/// The entry of VM image upgrade history.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpgradeHistoryEntry {
/// The snapshot of the boot disk of this notebook instance before upgrade.
#[prost(string, tag = "1")]
pub snapshot: ::prost::alloc::string::String,
/// The VM image before this instance upgrade.
#[prost(string, tag = "2")]
pub vm_image: ::prost::alloc::string::String,
/// The container image before this instance upgrade.
#[prost(string, tag = "3")]
pub container_image: ::prost::alloc::string::String,
/// The framework of this notebook instance.
#[prost(string, tag = "4")]
pub framework: ::prost::alloc::string::String,
/// The version of the notebook instance before this upgrade.
#[prost(string, tag = "5")]
pub version: ::prost::alloc::string::String,
/// The state of this instance upgrade history entry.
#[prost(enumeration = "upgrade_history_entry::State", tag = "6")]
pub state: i32,
/// The time that this instance upgrade history entry is created.
#[prost(message, optional, tag = "7")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
#[deprecated]
#[prost(string, tag = "8")]
pub target_image: ::prost::alloc::string::String,
/// Action. Rolloback or Upgrade.
#[prost(enumeration = "upgrade_history_entry::Action", tag = "9")]
pub action: i32,
/// Target VM Version, like m63.
#[prost(string, tag = "10")]
pub target_version: ::prost::alloc::string::String,
}
/// Nested message and enum types in `UpgradeHistoryEntry`.
pub mod upgrade_history_entry {
/// The definition of the states of this upgrade history entry.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// State is not specified.
Unspecified = 0,
/// The instance upgrade is started.
Started = 1,
/// The instance upgrade is succeeded.
Succeeded = 2,
/// The instance upgrade is failed.
Failed = 3,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Started => "STARTED",
State::Succeeded => "SUCCEEDED",
State::Failed => "FAILED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"STARTED" => Some(Self::Started),
"SUCCEEDED" => Some(Self::Succeeded),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
/// The definition of operations of this upgrade history entry.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Action {
/// Operation is not specified.
Unspecified = 0,
/// Upgrade.
Upgrade = 1,
/// Rollback.
Rollback = 2,
}
impl Action {
/// 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 {
Action::Unspecified => "ACTION_UNSPECIFIED",
Action::Upgrade => "UPGRADE",
Action::Rollback => "ROLLBACK",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ACTION_UNSPECIFIED" => Some(Self::Unspecified),
"UPGRADE" => Some(Self::Upgrade),
"ROLLBACK" => Some(Self::Rollback),
_ => None,
}
}
}
}
/// Definition of the types of hardware accelerators that can be used on this
/// instance.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum AcceleratorType {
/// Accelerator type is not specified.
Unspecified = 0,
/// Accelerator type is Nvidia Tesla K80.
NvidiaTeslaK80 = 1,
/// Accelerator type is Nvidia Tesla P100.
NvidiaTeslaP100 = 2,
/// Accelerator type is Nvidia Tesla V100.
NvidiaTeslaV100 = 3,
/// Accelerator type is Nvidia Tesla P4.
NvidiaTeslaP4 = 4,
/// Accelerator type is Nvidia Tesla T4.
NvidiaTeslaT4 = 5,
/// Accelerator type is Nvidia Tesla A100.
NvidiaTeslaA100 = 11,
/// Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
NvidiaTeslaT4Vws = 8,
/// Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
NvidiaTeslaP100Vws = 9,
/// Accelerator type is NVIDIA Tesla P4 Virtual Workstations.
NvidiaTeslaP4Vws = 10,
/// (Coming soon) Accelerator type is TPU V2.
TpuV2 = 6,
/// (Coming soon) Accelerator type is TPU V3.
TpuV3 = 7,
}
impl AcceleratorType {
/// 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 {
AcceleratorType::Unspecified => "ACCELERATOR_TYPE_UNSPECIFIED",
AcceleratorType::NvidiaTeslaK80 => "NVIDIA_TESLA_K80",
AcceleratorType::NvidiaTeslaP100 => "NVIDIA_TESLA_P100",
AcceleratorType::NvidiaTeslaV100 => "NVIDIA_TESLA_V100",
AcceleratorType::NvidiaTeslaP4 => "NVIDIA_TESLA_P4",
AcceleratorType::NvidiaTeslaT4 => "NVIDIA_TESLA_T4",
AcceleratorType::NvidiaTeslaA100 => "NVIDIA_TESLA_A100",
AcceleratorType::NvidiaTeslaT4Vws => "NVIDIA_TESLA_T4_VWS",
AcceleratorType::NvidiaTeslaP100Vws => "NVIDIA_TESLA_P100_VWS",
AcceleratorType::NvidiaTeslaP4Vws => "NVIDIA_TESLA_P4_VWS",
AcceleratorType::TpuV2 => "TPU_V2",
AcceleratorType::TpuV3 => "TPU_V3",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ACCELERATOR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"NVIDIA_TESLA_K80" => Some(Self::NvidiaTeslaK80),
"NVIDIA_TESLA_P100" => Some(Self::NvidiaTeslaP100),
"NVIDIA_TESLA_V100" => Some(Self::NvidiaTeslaV100),
"NVIDIA_TESLA_P4" => Some(Self::NvidiaTeslaP4),
"NVIDIA_TESLA_T4" => Some(Self::NvidiaTeslaT4),
"NVIDIA_TESLA_A100" => Some(Self::NvidiaTeslaA100),
"NVIDIA_TESLA_T4_VWS" => Some(Self::NvidiaTeslaT4Vws),
"NVIDIA_TESLA_P100_VWS" => Some(Self::NvidiaTeslaP100Vws),
"NVIDIA_TESLA_P4_VWS" => Some(Self::NvidiaTeslaP4Vws),
"TPU_V2" => Some(Self::TpuV2),
"TPU_V3" => Some(Self::TpuV3),
_ => None,
}
}
}
/// The definition of the states of this instance.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// State is not specified.
Unspecified = 0,
/// The control logic is starting the instance.
Starting = 1,
/// The control logic is installing required frameworks and registering the
/// instance with notebook proxy
Provisioning = 2,
/// The instance is running.
Active = 3,
/// The control logic is stopping the instance.
Stopping = 4,
/// The instance is stopped.
Stopped = 5,
/// The instance is deleted.
Deleted = 6,
/// The instance is upgrading.
Upgrading = 7,
/// The instance is being created.
Initializing = 8,
/// The instance is getting registered.
Registering = 9,
/// The instance is suspending.
Suspending = 10,
/// The instance is suspended.
Suspended = 11,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Starting => "STARTING",
State::Provisioning => "PROVISIONING",
State::Active => "ACTIVE",
State::Stopping => "STOPPING",
State::Stopped => "STOPPED",
State::Deleted => "DELETED",
State::Upgrading => "UPGRADING",
State::Initializing => "INITIALIZING",
State::Registering => "REGISTERING",
State::Suspending => "SUSPENDING",
State::Suspended => "SUSPENDED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"STARTING" => Some(Self::Starting),
"PROVISIONING" => Some(Self::Provisioning),
"ACTIVE" => Some(Self::Active),
"STOPPING" => Some(Self::Stopping),
"STOPPED" => Some(Self::Stopped),
"DELETED" => Some(Self::Deleted),
"UPGRADING" => Some(Self::Upgrading),
"INITIALIZING" => Some(Self::Initializing),
"REGISTERING" => Some(Self::Registering),
"SUSPENDING" => Some(Self::Suspending),
"SUSPENDED" => Some(Self::Suspended),
_ => None,
}
}
}
/// Possible disk types for notebook instances.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DiskType {
/// Disk type not set.
Unspecified = 0,
/// Standard persistent disk type.
PdStandard = 1,
/// SSD persistent disk type.
PdSsd = 2,
/// Balanced persistent disk type.
PdBalanced = 3,
/// Extreme persistent disk type.
PdExtreme = 4,
}
impl DiskType {
/// 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 {
DiskType::Unspecified => "DISK_TYPE_UNSPECIFIED",
DiskType::PdStandard => "PD_STANDARD",
DiskType::PdSsd => "PD_SSD",
DiskType::PdBalanced => "PD_BALANCED",
DiskType::PdExtreme => "PD_EXTREME",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DISK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PD_STANDARD" => Some(Self::PdStandard),
"PD_SSD" => Some(Self::PdSsd),
"PD_BALANCED" => Some(Self::PdBalanced),
"PD_EXTREME" => Some(Self::PdExtreme),
_ => None,
}
}
}
/// Definition of the disk encryption options.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DiskEncryption {
/// Disk encryption is not specified.
Unspecified = 0,
/// Use Google managed encryption keys to encrypt the boot disk.
Gmek = 1,
/// Use customer managed encryption keys to encrypt the boot disk.
Cmek = 2,
}
impl DiskEncryption {
/// 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 {
DiskEncryption::Unspecified => "DISK_ENCRYPTION_UNSPECIFIED",
DiskEncryption::Gmek => "GMEK",
DiskEncryption::Cmek => "CMEK",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DISK_ENCRYPTION_UNSPECIFIED" => Some(Self::Unspecified),
"GMEK" => Some(Self::Gmek),
"CMEK" => Some(Self::Cmek),
_ => None,
}
}
}
/// The type of vNIC driver.
/// Default should be UNSPECIFIED_NIC_TYPE.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum NicType {
/// No type specified.
UnspecifiedNicType = 0,
/// VIRTIO
VirtioNet = 1,
/// GVNIC
Gvnic = 2,
}
impl NicType {
/// 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 {
NicType::UnspecifiedNicType => "UNSPECIFIED_NIC_TYPE",
NicType::VirtioNet => "VIRTIO_NET",
NicType::Gvnic => "GVNIC",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED_NIC_TYPE" => Some(Self::UnspecifiedNicType),
"VIRTIO_NET" => Some(Self::VirtioNet),
"GVNIC" => Some(Self::Gvnic),
_ => None,
}
}
}
/// Type of the environment; can be one of VM image, or container image.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Environment {
/// Use a Compute Engine VM image to start the notebook instance.
#[prost(message, tag = "2")]
VmImage(super::VmImage),
/// Use a container image to start the notebook instance.
#[prost(message, tag = "3")]
ContainerImage(super::ContainerImage),
}
}
/// The description a notebook execution workload.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionTemplate {
/// Required. Scale tier of the hardware used for notebook execution.
/// DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
#[deprecated]
#[prost(enumeration = "execution_template::ScaleTier", tag = "1")]
pub scale_tier: i32,
/// Specifies the type of virtual machine to use for your training
/// job's master worker. You must specify this field when `scaleTier` is set to
/// `CUSTOM`.
///
/// You can use certain Compute Engine machine types directly in this field.
/// The following types are supported:
///
/// - `n1-standard-4`
/// - `n1-standard-8`
/// - `n1-standard-16`
/// - `n1-standard-32`
/// - `n1-standard-64`
/// - `n1-standard-96`
/// - `n1-highmem-2`
/// - `n1-highmem-4`
/// - `n1-highmem-8`
/// - `n1-highmem-16`
/// - `n1-highmem-32`
/// - `n1-highmem-64`
/// - `n1-highmem-96`
/// - `n1-highcpu-16`
/// - `n1-highcpu-32`
/// - `n1-highcpu-64`
/// - `n1-highcpu-96`
///
///
/// Alternatively, you can use the following legacy machine types:
///
/// - `standard`
/// - `large_model`
/// - `complex_model_s`
/// - `complex_model_m`
/// - `complex_model_l`
/// - `standard_gpu`
/// - `complex_model_m_gpu`
/// - `complex_model_l_gpu`
/// - `standard_p100`
/// - `complex_model_m_p100`
/// - `standard_v100`
/// - `large_model_v100`
/// - `complex_model_m_v100`
/// - `complex_model_l_v100`
///
///
/// Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
/// field. Learn more about the [special configuration options for training
/// with
/// TPU](<https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine>).
#[prost(string, tag = "2")]
pub master_type: ::prost::alloc::string::String,
/// Configuration (count and accelerator type) for hardware running notebook
/// execution.
#[prost(message, optional, tag = "3")]
pub accelerator_config: ::core::option::Option<
execution_template::SchedulerAcceleratorConfig,
>,
/// Labels for execution.
/// If execution is scheduled, a field included will be 'nbs-scheduled'.
/// Otherwise, it is an immediate execution, and an included field will be
/// 'nbs-immediate'. Use fields to efficiently index between various types of
/// executions.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Path to the notebook file to execute.
/// Must be in a Google Cloud Storage bucket.
/// Format: `gs://{bucket_name}/{folder}/{notebook_file_name}`
/// Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`
#[prost(string, tag = "5")]
pub input_notebook_file: ::prost::alloc::string::String,
/// Container Image URI to a DLVM
/// Example: 'gcr.io/deeplearning-platform-release/base-cu100'
/// More examples can be found at:
/// <https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container>
#[prost(string, tag = "6")]
pub container_image_uri: ::prost::alloc::string::String,
/// Path to the notebook folder to write to.
/// Must be in a Google Cloud Storage bucket path.
/// Format: `gs://{bucket_name}/{folder}`
/// Ex: `gs://notebook_user/scheduled_notebooks`
#[prost(string, tag = "7")]
pub output_notebook_folder: ::prost::alloc::string::String,
/// Parameters to be overridden in the notebook during execution.
/// Ref <https://papermill.readthedocs.io/en/latest/usage-parameterize.html> on
/// how to specifying parameters in the input notebook and pass them here
/// in an YAML file.
/// Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml`
#[prost(string, tag = "8")]
pub params_yaml_file: ::prost::alloc::string::String,
/// Parameters used within the 'input_notebook_file' notebook.
#[prost(string, tag = "9")]
pub parameters: ::prost::alloc::string::String,
/// The email address of a service account to use when running the execution.
/// You must have the `iam.serviceAccounts.actAs` permission for the specified
/// service account.
#[prost(string, tag = "10")]
pub service_account: ::prost::alloc::string::String,
/// The type of Job to be used on this execution.
#[prost(enumeration = "execution_template::JobType", tag = "11")]
pub job_type: i32,
/// Name of the kernel spec to use. This must be specified if the
/// kernel spec name on the execution target does not match the name in the
/// input notebook file.
#[prost(string, tag = "14")]
pub kernel_spec: ::prost::alloc::string::String,
/// The name of a Vertex AI \[Tensorboard\] resource to which this execution
/// will upload Tensorboard logs.
/// Format:
/// `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
#[prost(string, tag = "15")]
pub tensorboard: ::prost::alloc::string::String,
/// Parameters for an execution type.
/// NOTE: There are currently no extra parameters for VertexAI jobs.
#[prost(oneof = "execution_template::JobParameters", tags = "12, 13")]
pub job_parameters: ::core::option::Option<execution_template::JobParameters>,
}
/// Nested message and enum types in `ExecutionTemplate`.
pub mod execution_template {
/// Definition of a hardware accelerator. Note that not all combinations
/// of `type` and `core_count` are valid. Check [GPUs on
/// Compute Engine](<https://cloud.google.com/compute/docs/gpus>) to find a valid
/// combination. TPUs are not supported.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SchedulerAcceleratorConfig {
/// Type of this accelerator.
#[prost(enumeration = "SchedulerAcceleratorType", tag = "1")]
pub r#type: i32,
/// Count of cores of this accelerator.
#[prost(int64, tag = "2")]
pub core_count: i64,
}
/// Parameters used in Dataproc JobType executions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataprocParameters {
/// URI for cluster used to run Dataproc execution.
/// Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}`
#[prost(string, tag = "1")]
pub cluster: ::prost::alloc::string::String,
}
/// Parameters used in Vertex AI JobType executions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VertexAiParameters {
/// The full name of the Compute Engine
/// [network](<https://cloud.google.com/compute/docs/networks-and-firewalls#networks>)
/// to which the Job should be peered. For example,
/// `projects/12345/global/networks/myVPC`.
/// [Format](<https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert>)
/// is of the form `projects/{project}/global/networks/{network}`.
/// Where `{project}` is a project number, as in `12345`, and `{network}` is
/// a network name.
///
/// Private services access must already be configured for the network. If
/// left unspecified, the job is not peered with any network.
#[prost(string, tag = "1")]
pub network: ::prost::alloc::string::String,
/// Environment variables.
/// At most 100 environment variables can be specified and unique.
/// Example: `GCP_BUCKET=gs://my-bucket/samples/`
#[prost(btree_map = "string, string", tag = "2")]
pub env: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// Required. Specifies the machine types, the number of replicas for workers
/// and parameter servers.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ScaleTier {
/// Unspecified Scale Tier.
Unspecified = 0,
/// A single worker instance. This tier is suitable for learning how to use
/// Cloud ML, and for experimenting with new models using small datasets.
Basic = 1,
/// Many workers and a few parameter servers.
Standard1 = 2,
/// A large number of workers with many parameter servers.
Premium1 = 3,
/// A single worker instance with a K80 GPU.
BasicGpu = 4,
/// A single worker instance with a Cloud TPU.
BasicTpu = 5,
/// The CUSTOM tier is not a set tier, but rather enables you to use your
/// own cluster specification. When you use this tier, set values to
/// configure your processing cluster according to these guidelines:
///
/// * You _must_ set `ExecutionTemplate.masterType` to specify the type
/// of machine to use for your master node. This is the only required
/// setting.
Custom = 6,
}
impl ScaleTier {
/// 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 {
ScaleTier::Unspecified => "SCALE_TIER_UNSPECIFIED",
ScaleTier::Basic => "BASIC",
ScaleTier::Standard1 => "STANDARD_1",
ScaleTier::Premium1 => "PREMIUM_1",
ScaleTier::BasicGpu => "BASIC_GPU",
ScaleTier::BasicTpu => "BASIC_TPU",
ScaleTier::Custom => "CUSTOM",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SCALE_TIER_UNSPECIFIED" => Some(Self::Unspecified),
"BASIC" => Some(Self::Basic),
"STANDARD_1" => Some(Self::Standard1),
"PREMIUM_1" => Some(Self::Premium1),
"BASIC_GPU" => Some(Self::BasicGpu),
"BASIC_TPU" => Some(Self::BasicTpu),
"CUSTOM" => Some(Self::Custom),
_ => None,
}
}
}
/// Hardware accelerator types for AI Platform Training jobs.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SchedulerAcceleratorType {
/// Unspecified accelerator type. Default to no GPU.
Unspecified = 0,
/// Nvidia Tesla K80 GPU.
NvidiaTeslaK80 = 1,
/// Nvidia Tesla P100 GPU.
NvidiaTeslaP100 = 2,
/// Nvidia Tesla V100 GPU.
NvidiaTeslaV100 = 3,
/// Nvidia Tesla P4 GPU.
NvidiaTeslaP4 = 4,
/// Nvidia Tesla T4 GPU.
NvidiaTeslaT4 = 5,
/// Nvidia Tesla A100 GPU.
NvidiaTeslaA100 = 10,
/// TPU v2.
TpuV2 = 6,
/// TPU v3.
TpuV3 = 7,
}
impl SchedulerAcceleratorType {
/// 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 {
SchedulerAcceleratorType::Unspecified => {
"SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED"
}
SchedulerAcceleratorType::NvidiaTeslaK80 => "NVIDIA_TESLA_K80",
SchedulerAcceleratorType::NvidiaTeslaP100 => "NVIDIA_TESLA_P100",
SchedulerAcceleratorType::NvidiaTeslaV100 => "NVIDIA_TESLA_V100",
SchedulerAcceleratorType::NvidiaTeslaP4 => "NVIDIA_TESLA_P4",
SchedulerAcceleratorType::NvidiaTeslaT4 => "NVIDIA_TESLA_T4",
SchedulerAcceleratorType::NvidiaTeslaA100 => "NVIDIA_TESLA_A100",
SchedulerAcceleratorType::TpuV2 => "TPU_V2",
SchedulerAcceleratorType::TpuV3 => "TPU_V3",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"NVIDIA_TESLA_K80" => Some(Self::NvidiaTeslaK80),
"NVIDIA_TESLA_P100" => Some(Self::NvidiaTeslaP100),
"NVIDIA_TESLA_V100" => Some(Self::NvidiaTeslaV100),
"NVIDIA_TESLA_P4" => Some(Self::NvidiaTeslaP4),
"NVIDIA_TESLA_T4" => Some(Self::NvidiaTeslaT4),
"NVIDIA_TESLA_A100" => Some(Self::NvidiaTeslaA100),
"TPU_V2" => Some(Self::TpuV2),
"TPU_V3" => Some(Self::TpuV3),
_ => None,
}
}
}
/// The backend used for this execution.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum JobType {
/// No type specified.
Unspecified = 0,
/// Custom Job in `aiplatform.googleapis.com`.
/// Default value for an execution.
VertexAi = 1,
/// Run execution on a cluster with Dataproc as a job.
/// <https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs>
Dataproc = 2,
}
impl JobType {
/// 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 {
JobType::Unspecified => "JOB_TYPE_UNSPECIFIED",
JobType::VertexAi => "VERTEX_AI",
JobType::Dataproc => "DATAPROC",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"JOB_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"VERTEX_AI" => Some(Self::VertexAi),
"DATAPROC" => Some(Self::Dataproc),
_ => None,
}
}
}
/// Parameters for an execution type.
/// NOTE: There are currently no extra parameters for VertexAI jobs.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum JobParameters {
/// Parameters used in Dataproc JobType executions.
#[prost(message, tag = "12")]
DataprocParameters(DataprocParameters),
/// Parameters used in Vertex AI JobType executions.
#[prost(message, tag = "13")]
VertexAiParameters(VertexAiParameters),
}
}
/// The definition of a single executed notebook.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Execution {
/// execute metadata including name, hardware spec, region, labels, etc.
#[prost(message, optional, tag = "1")]
pub execution_template: ::core::option::Option<ExecutionTemplate>,
/// Output only. The resource name of the execute. Format:
/// `projects/{project_id}/locations/{location}/executions/{execution_id}`
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
/// Output only. Name used for UI purposes.
/// Name can only contain alphanumeric characters and underscores '_'.
#[prost(string, tag = "3")]
pub display_name: ::prost::alloc::string::String,
/// A brief description of this execution.
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
/// Output only. Time the Execution was instantiated.
#[prost(message, optional, tag = "5")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Time the Execution was last updated.
#[prost(message, optional, tag = "6")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. State of the underlying AI Platform job.
#[prost(enumeration = "execution::State", tag = "7")]
pub state: i32,
/// Output notebook file generated by this execution
#[prost(string, tag = "8")]
pub output_notebook_file: ::prost::alloc::string::String,
/// Output only. The URI of the external job used to execute the notebook.
#[prost(string, tag = "9")]
pub job_uri: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Execution`.
pub mod execution {
/// Enum description of the state of the underlying AIP job.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// The job state is unspecified.
Unspecified = 0,
/// The job has been just created and processing has not yet begun.
Queued = 1,
/// The service is preparing to execution the job.
Preparing = 2,
/// The job is in progress.
Running = 3,
/// The job completed successfully.
Succeeded = 4,
/// The job failed.
/// `error_message` should contain the details of the failure.
Failed = 5,
/// The job is being cancelled.
/// `error_message` should describe the reason for the cancellation.
Cancelling = 6,
/// The job has been cancelled.
/// `error_message` should describe the reason for the cancellation.
Cancelled = 7,
/// The job has become expired (relevant to Vertex AI jobs)
/// <https://cloud.google.com/vertex-ai/docs/reference/rest/v1/JobState>
Expired = 9,
/// The Execution is being created.
Initializing = 10,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Queued => "QUEUED",
State::Preparing => "PREPARING",
State::Running => "RUNNING",
State::Succeeded => "SUCCEEDED",
State::Failed => "FAILED",
State::Cancelling => "CANCELLING",
State::Cancelled => "CANCELLED",
State::Expired => "EXPIRED",
State::Initializing => "INITIALIZING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"QUEUED" => Some(Self::Queued),
"PREPARING" => Some(Self::Preparing),
"RUNNING" => Some(Self::Running),
"SUCCEEDED" => Some(Self::Succeeded),
"FAILED" => Some(Self::Failed),
"CANCELLING" => Some(Self::Cancelling),
"CANCELLED" => Some(Self::Cancelled),
"EXPIRED" => Some(Self::Expired),
"INITIALIZING" => Some(Self::Initializing),
_ => None,
}
}
}
}
/// The definition of a schedule.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Schedule {
/// Output only. The name of this schedule. Format:
/// `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. Display name used for UI purposes.
/// Name can only contain alphanumeric characters, hyphens `-`,
/// and underscores `_`.
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
/// A brief description of this environment.
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(enumeration = "schedule::State", tag = "4")]
pub state: i32,
/// Cron-tab formatted schedule by which the job will execute.
/// Format: minute, hour, day of month, month, day of week,
/// e.g. `0 0 * * WED` = every Wednesday
/// More examples: <https://crontab.guru/examples.html>
#[prost(string, tag = "5")]
pub cron_schedule: ::prost::alloc::string::String,
/// Timezone on which the cron_schedule.
/// The value of this field must be a time zone name from the tz database.
/// TZ Database: <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>
///
/// Note that some time zones include a provision for daylight savings time.
/// The rules for daylight saving time are determined by the chosen tz.
/// For UTC use the string "utc". If a time zone is not specified,
/// the default will be in UTC (also known as GMT).
#[prost(string, tag = "6")]
pub time_zone: ::prost::alloc::string::String,
/// Output only. Time the schedule was created.
#[prost(message, optional, tag = "7")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Time the schedule was last updated.
#[prost(message, optional, tag = "8")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Notebook Execution Template corresponding to this schedule.
#[prost(message, optional, tag = "9")]
pub execution_template: ::core::option::Option<ExecutionTemplate>,
/// Output only. The most recent execution names triggered from this schedule and their
/// corresponding states.
#[prost(message, repeated, tag = "10")]
pub recent_executions: ::prost::alloc::vec::Vec<Execution>,
}
/// Nested message and enum types in `Schedule`.
pub mod schedule {
/// State of the job.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// Unspecified state.
Unspecified = 0,
/// The job is executing normally.
Enabled = 1,
/// The job is paused by the user. It will not execute. A user can
/// intentionally pause the job using
/// [PauseJobRequest][].
Paused = 2,
/// The job is disabled by the system due to error. The user
/// cannot directly set a job to be disabled.
Disabled = 3,
/// The job state resulting from a failed [CloudScheduler.UpdateJob][]
/// operation. To recover a job from this state, retry
/// [CloudScheduler.UpdateJob][] until a successful response is received.
UpdateFailed = 4,
/// The schedule resource is being created.
Initializing = 5,
/// The schedule resource is being deleted.
Deleting = 6,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Enabled => "ENABLED",
State::Paused => "PAUSED",
State::Disabled => "DISABLED",
State::UpdateFailed => "UPDATE_FAILED",
State::Initializing => "INITIALIZING",
State::Deleting => "DELETING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"ENABLED" => Some(Self::Enabled),
"PAUSED" => Some(Self::Paused),
"DISABLED" => Some(Self::Disabled),
"UPDATE_FAILED" => Some(Self::UpdateFailed),
"INITIALIZING" => Some(Self::Initializing),
"DELETING" => Some(Self::Deleting),
_ => None,
}
}
}
}
/// Defines flags that are used to run the diagnostic tool
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiagnosticConfig {
/// Required. User Cloud Storage bucket location (REQUIRED).
/// Must be formatted with path prefix (`gs://$GCS_BUCKET`).
///
/// Permissions:
/// User Managed Notebooks:
/// - storage.buckets.writer: Must be given to the project's service account
/// attached to VM.
/// Google Managed Notebooks:
/// - storage.buckets.writer: Must be given to the project's service account or
/// user credentials attached to VM depending on authentication mode.
///
/// Cloud Storage bucket Log file will be written to
/// `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz`
#[prost(string, tag = "1")]
pub gcs_bucket: ::prost::alloc::string::String,
/// Optional. Defines the relative storage path in the Cloud Storage bucket
/// where the diagnostic logs will be written: Default path will be the root
/// directory of the Cloud Storage bucket
/// (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`)
/// Example of full path where Log file will be written:
/// `gs://$GCS_BUCKET/$RELATIVE_PATH/`
#[prost(string, tag = "2")]
pub relative_path: ::prost::alloc::string::String,
/// Optional. Enables flag to repair service for instance
#[prost(bool, tag = "3")]
pub repair_flag_enabled: bool,
/// Optional. Enables flag to capture packets from the instance for 30 seconds
#[prost(bool, tag = "4")]
pub packet_capture_flag_enabled: bool,
/// Optional. Enables flag to copy all `/home/jupyter` folder contents
#[prost(bool, tag = "5")]
pub copy_home_files_flag_enabled: bool,
}
/// The definition of an Event for a managed / semi-managed notebook instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Event {
/// Event report time.
#[prost(message, optional, tag = "1")]
pub report_time: ::core::option::Option<::prost_types::Timestamp>,
/// Event type.
#[prost(enumeration = "event::EventType", tag = "2")]
pub r#type: i32,
/// Optional. Event details. This field is used to pass event information.
#[prost(btree_map = "string, string", tag = "3")]
pub details: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// Nested message and enum types in `Event`.
pub mod event {
/// The definition of the event types.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum EventType {
/// Event is not specified.
Unspecified = 0,
/// The instance / runtime is idle
Idle = 1,
/// The instance / runtime is available.
/// This event indicates that instance / runtime underlying compute is
/// operational.
Heartbeat = 2,
/// The instance / runtime health is available.
/// This event indicates that instance / runtime health information.
Health = 3,
/// The instance / runtime is available.
/// This event allows instance / runtime to send Host maintenance
/// information to Control Plane.
/// <https://cloud.google.com/compute/docs/gpus/gpu-host-maintenance>
Maintenance = 4,
}
impl EventType {
/// 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 {
EventType::Unspecified => "EVENT_TYPE_UNSPECIFIED",
EventType::Idle => "IDLE",
EventType::Heartbeat => "HEARTBEAT",
EventType::Health => "HEALTH",
EventType::Maintenance => "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 {
"EVENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"IDLE" => Some(Self::Idle),
"HEARTBEAT" => Some(Self::Heartbeat),
"HEALTH" => Some(Self::Health),
"MAINTENANCE" => Some(Self::Maintenance),
_ => None,
}
}
}
}
/// The definition of a Runtime for a managed notebook instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Runtime {
/// Output only. The resource name of the runtime.
/// Format:
/// `projects/{project}/locations/{location}/runtimes/{runtimeId}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. Runtime state.
#[prost(enumeration = "runtime::State", tag = "3")]
pub state: i32,
/// Output only. Runtime health_state.
#[prost(enumeration = "runtime::HealthState", tag = "4")]
pub health_state: i32,
/// The config settings for accessing runtime.
#[prost(message, optional, tag = "5")]
pub access_config: ::core::option::Option<RuntimeAccessConfig>,
/// The config settings for software inside the runtime.
#[prost(message, optional, tag = "6")]
pub software_config: ::core::option::Option<RuntimeSoftwareConfig>,
/// Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
/// stats.
#[prost(message, optional, tag = "7")]
pub metrics: ::core::option::Option<RuntimeMetrics>,
/// Output only. Runtime creation time.
#[prost(message, optional, tag = "20")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Runtime update time.
#[prost(message, optional, tag = "21")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Type of the runtime; currently only supports Compute Engine VM.
#[prost(oneof = "runtime::RuntimeType", tags = "2")]
pub runtime_type: ::core::option::Option<runtime::RuntimeType>,
}
/// Nested message and enum types in `Runtime`.
pub mod runtime {
/// The definition of the states of this runtime.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// State is not specified.
Unspecified = 0,
/// The compute layer is starting the runtime. It is not ready for use.
Starting = 1,
/// The compute layer is installing required frameworks and registering the
/// runtime with notebook proxy. It cannot be used.
Provisioning = 2,
/// The runtime is currently running. It is ready for use.
Active = 3,
/// The control logic is stopping the runtime. It cannot be used.
Stopping = 4,
/// The runtime is stopped. It cannot be used.
Stopped = 5,
/// The runtime is being deleted. It cannot be used.
Deleting = 6,
/// The runtime is upgrading. It cannot be used.
Upgrading = 7,
/// The runtime is being created and set up. It is not ready for use.
Initializing = 8,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Starting => "STARTING",
State::Provisioning => "PROVISIONING",
State::Active => "ACTIVE",
State::Stopping => "STOPPING",
State::Stopped => "STOPPED",
State::Deleting => "DELETING",
State::Upgrading => "UPGRADING",
State::Initializing => "INITIALIZING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"STARTING" => Some(Self::Starting),
"PROVISIONING" => Some(Self::Provisioning),
"ACTIVE" => Some(Self::Active),
"STOPPING" => Some(Self::Stopping),
"STOPPED" => Some(Self::Stopped),
"DELETING" => Some(Self::Deleting),
"UPGRADING" => Some(Self::Upgrading),
"INITIALIZING" => Some(Self::Initializing),
_ => None,
}
}
}
/// The runtime substate.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum HealthState {
/// The runtime substate is unknown.
Unspecified = 0,
/// The runtime is known to be in an healthy state
/// (for example, critical daemons are running)
/// Applies to ACTIVE state.
Healthy = 1,
/// The runtime is known to be in an unhealthy state
/// (for example, critical daemons are not running)
/// Applies to ACTIVE state.
Unhealthy = 2,
/// The runtime has not installed health monitoring agent.
/// Applies to ACTIVE state.
AgentNotInstalled = 3,
/// The runtime health monitoring agent is not running.
/// Applies to ACTIVE state.
AgentNotRunning = 4,
}
impl HealthState {
/// 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 {
HealthState::Unspecified => "HEALTH_STATE_UNSPECIFIED",
HealthState::Healthy => "HEALTHY",
HealthState::Unhealthy => "UNHEALTHY",
HealthState::AgentNotInstalled => "AGENT_NOT_INSTALLED",
HealthState::AgentNotRunning => "AGENT_NOT_RUNNING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HEALTH_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"HEALTHY" => Some(Self::Healthy),
"UNHEALTHY" => Some(Self::Unhealthy),
"AGENT_NOT_INSTALLED" => Some(Self::AgentNotInstalled),
"AGENT_NOT_RUNNING" => Some(Self::AgentNotRunning),
_ => None,
}
}
}
/// Type of the runtime; currently only supports Compute Engine VM.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum RuntimeType {
/// Use a Compute Engine VM image to start the managed notebook instance.
#[prost(message, tag = "2")]
VirtualMachine(super::VirtualMachine),
}
}
/// Definition of the types of hardware accelerators that can be used.
/// Definition of the types of hardware accelerators that can be used.
/// See [Compute Engine
/// AcceleratorTypes](<https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes>).
/// Examples:
///
/// * `nvidia-tesla-k80`
/// * `nvidia-tesla-p100`
/// * `nvidia-tesla-v100`
/// * `nvidia-tesla-p4`
/// * `nvidia-tesla-t4`
/// * `nvidia-tesla-a100`
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RuntimeAcceleratorConfig {
/// Accelerator model.
#[prost(enumeration = "runtime_accelerator_config::AcceleratorType", tag = "1")]
pub r#type: i32,
/// Count of cores of this accelerator.
#[prost(int64, tag = "2")]
pub core_count: i64,
}
/// Nested message and enum types in `RuntimeAcceleratorConfig`.
pub mod runtime_accelerator_config {
/// Type of this accelerator.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum AcceleratorType {
/// Accelerator type is not specified.
Unspecified = 0,
/// Accelerator type is Nvidia Tesla K80.
NvidiaTeslaK80 = 1,
/// Accelerator type is Nvidia Tesla P100.
NvidiaTeslaP100 = 2,
/// Accelerator type is Nvidia Tesla V100.
NvidiaTeslaV100 = 3,
/// Accelerator type is Nvidia Tesla P4.
NvidiaTeslaP4 = 4,
/// Accelerator type is Nvidia Tesla T4.
NvidiaTeslaT4 = 5,
/// Accelerator type is Nvidia Tesla A100.
NvidiaTeslaA100 = 6,
/// (Coming soon) Accelerator type is TPU V2.
TpuV2 = 7,
/// (Coming soon) Accelerator type is TPU V3.
TpuV3 = 8,
/// Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
NvidiaTeslaT4Vws = 9,
/// Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
NvidiaTeslaP100Vws = 10,
/// Accelerator type is NVIDIA Tesla P4 Virtual Workstations.
NvidiaTeslaP4Vws = 11,
}
impl AcceleratorType {
/// 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 {
AcceleratorType::Unspecified => "ACCELERATOR_TYPE_UNSPECIFIED",
AcceleratorType::NvidiaTeslaK80 => "NVIDIA_TESLA_K80",
AcceleratorType::NvidiaTeslaP100 => "NVIDIA_TESLA_P100",
AcceleratorType::NvidiaTeslaV100 => "NVIDIA_TESLA_V100",
AcceleratorType::NvidiaTeslaP4 => "NVIDIA_TESLA_P4",
AcceleratorType::NvidiaTeslaT4 => "NVIDIA_TESLA_T4",
AcceleratorType::NvidiaTeslaA100 => "NVIDIA_TESLA_A100",
AcceleratorType::TpuV2 => "TPU_V2",
AcceleratorType::TpuV3 => "TPU_V3",
AcceleratorType::NvidiaTeslaT4Vws => "NVIDIA_TESLA_T4_VWS",
AcceleratorType::NvidiaTeslaP100Vws => "NVIDIA_TESLA_P100_VWS",
AcceleratorType::NvidiaTeslaP4Vws => "NVIDIA_TESLA_P4_VWS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ACCELERATOR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"NVIDIA_TESLA_K80" => Some(Self::NvidiaTeslaK80),
"NVIDIA_TESLA_P100" => Some(Self::NvidiaTeslaP100),
"NVIDIA_TESLA_V100" => Some(Self::NvidiaTeslaV100),
"NVIDIA_TESLA_P4" => Some(Self::NvidiaTeslaP4),
"NVIDIA_TESLA_T4" => Some(Self::NvidiaTeslaT4),
"NVIDIA_TESLA_A100" => Some(Self::NvidiaTeslaA100),
"TPU_V2" => Some(Self::TpuV2),
"TPU_V3" => Some(Self::TpuV3),
"NVIDIA_TESLA_T4_VWS" => Some(Self::NvidiaTeslaT4Vws),
"NVIDIA_TESLA_P100_VWS" => Some(Self::NvidiaTeslaP100Vws),
"NVIDIA_TESLA_P4_VWS" => Some(Self::NvidiaTeslaP4Vws),
_ => None,
}
}
}
}
/// Represents a custom encryption key configuration that can be applied to
/// a resource. This will encrypt all disks in Virtual Machine.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EncryptionConfig {
/// The Cloud KMS resource identifier of the customer-managed encryption key
/// used to protect a resource, such as a disks. It has the following
/// format:
/// `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
#[prost(string, tag = "1")]
pub kms_key: ::prost::alloc::string::String,
}
/// A Local attached disk resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocalDisk {
/// Optional. Output only. Specifies whether the disk will be auto-deleted when the
/// instance is deleted (but not when the disk is detached from the instance).
#[prost(bool, tag = "1")]
pub auto_delete: bool,
/// Optional. Output only. Indicates that this is a boot disk. The virtual machine
/// will use the first partition of the disk for its root filesystem.
#[prost(bool, tag = "2")]
pub boot: bool,
/// Optional. Output only. Specifies a unique device name
/// of your choice that is reflected into the
/// `/dev/disk/by-id/google-*` tree of a Linux operating system running within
/// the instance. This name can be used to reference the device for mounting,
/// resizing, and so on, from within the instance.
///
/// If not specified, the server chooses a default device name to apply to this
/// disk, in the form persistent-disk-x, where x is a number assigned by Google
/// Compute Engine. This field is only applicable for persistent disks.
#[prost(string, tag = "3")]
pub device_name: ::prost::alloc::string::String,
/// Output only. Indicates a list of features to enable on the guest operating system.
/// Applicable only for bootable images. Read Enabling guest operating
/// system features to see a list of available options.
#[prost(message, repeated, tag = "4")]
pub guest_os_features: ::prost::alloc::vec::Vec<local_disk::RuntimeGuestOsFeature>,
/// Output only. A zero-based index to this disk, where 0 is reserved for the
/// boot disk. If you have many disks attached to an instance, each disk would
/// have a unique index number.
#[prost(int32, tag = "5")]
pub index: i32,
/// Input only. Specifies the parameters for a new disk that will be created
/// alongside the new instance. Use initialization parameters to create boot
/// disks or local SSDs attached to the new instance.
///
/// This property is mutually exclusive with the source property; you can only
/// define one or the other, but not both.
#[prost(message, optional, tag = "6")]
pub initialize_params: ::core::option::Option<LocalDiskInitializeParams>,
/// Specifies the disk interface to use for attaching this disk, which is
/// either SCSI or NVME. The default is SCSI. Persistent disks must always use
/// SCSI and the request will fail if you attempt to attach a persistent disk
/// in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
/// performance characteristics of SCSI over NVMe, see Local SSD performance.
/// Valid values:
///
/// * `NVME`
/// * `SCSI`
#[prost(string, tag = "7")]
pub interface: ::prost::alloc::string::String,
/// Output only. Type of the resource. Always compute#attachedDisk for attached disks.
#[prost(string, tag = "8")]
pub kind: ::prost::alloc::string::String,
/// Output only. Any valid publicly visible licenses.
#[prost(string, repeated, tag = "9")]
pub licenses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`.
/// If not specified, the default is to attach the disk in `READ_WRITE` mode.
/// Valid values:
///
/// * `READ_ONLY`
/// * `READ_WRITE`
#[prost(string, tag = "10")]
pub mode: ::prost::alloc::string::String,
/// Specifies a valid partial or full URL to an existing Persistent Disk
/// resource.
#[prost(string, tag = "11")]
pub source: ::prost::alloc::string::String,
/// Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
/// specified, the default is `PERSISTENT`.
/// Valid values:
///
/// * `PERSISTENT`
/// * `SCRATCH`
#[prost(string, tag = "12")]
pub r#type: ::prost::alloc::string::String,
}
/// Nested message and enum types in `LocalDisk`.
pub mod local_disk {
/// Optional. A list of features to enable on the guest operating system.
/// Applicable only for bootable images.
/// Read [Enabling guest operating system
/// features](<https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features>)
/// to see a list of available options.
/// Guest OS features for boot disk.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuntimeGuestOsFeature {
/// The ID of a supported feature. Read [Enabling guest operating system
/// features](<https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features>)
/// to see a list of available options.
///
/// Valid values:
///
/// * `FEATURE_TYPE_UNSPECIFIED`
/// * `MULTI_IP_SUBNET`
/// * `SECURE_BOOT`
/// * `UEFI_COMPATIBLE`
/// * `VIRTIO_SCSI_MULTIQUEUE`
/// * `WINDOWS`
#[prost(string, tag = "1")]
pub r#type: ::prost::alloc::string::String,
}
}
/// Input only. Specifies the parameters for a new disk that will be created
/// alongside the new instance. Use initialization parameters to create boot
/// disks or local SSDs attached to the new runtime.
/// This property is mutually exclusive with the source property; you can only
/// define one or the other, but not both.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocalDiskInitializeParams {
/// Optional. Provide this property when creating the disk.
#[prost(string, tag = "1")]
pub description: ::prost::alloc::string::String,
/// Optional. Specifies the disk name. If not specified, the default is to use the name
/// of the instance. If the disk with the instance name exists already in the
/// given zone/region, a new name will be automatically generated.
#[prost(string, tag = "2")]
pub disk_name: ::prost::alloc::string::String,
/// Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk
/// will be the same size as the image (usually 10GB). If specified, the size
/// must be equal to or larger than 10GB. Default 100 GB.
#[prost(int64, tag = "3")]
pub disk_size_gb: i64,
/// Input only. The type of the boot disk attached to this instance, defaults to
/// standard persistent disk (`PD_STANDARD`).
#[prost(enumeration = "local_disk_initialize_params::DiskType", tag = "4")]
pub disk_type: i32,
/// Optional. Labels to apply to this disk. These can be later modified by the
/// disks.setLabels method. This field is only applicable for persistent disks.
#[prost(btree_map = "string, string", tag = "5")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// Nested message and enum types in `LocalDiskInitializeParams`.
pub mod local_disk_initialize_params {
/// Possible disk types.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DiskType {
/// Disk type not set.
Unspecified = 0,
/// Standard persistent disk type.
PdStandard = 1,
/// SSD persistent disk type.
PdSsd = 2,
/// Balanced persistent disk type.
PdBalanced = 3,
/// Extreme persistent disk type.
PdExtreme = 4,
}
impl DiskType {
/// 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 {
DiskType::Unspecified => "DISK_TYPE_UNSPECIFIED",
DiskType::PdStandard => "PD_STANDARD",
DiskType::PdSsd => "PD_SSD",
DiskType::PdBalanced => "PD_BALANCED",
DiskType::PdExtreme => "PD_EXTREME",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DISK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PD_STANDARD" => Some(Self::PdStandard),
"PD_SSD" => Some(Self::PdSsd),
"PD_BALANCED" => Some(Self::PdBalanced),
"PD_EXTREME" => Some(Self::PdExtreme),
_ => None,
}
}
}
}
/// Specifies the login configuration for Runtime
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuntimeAccessConfig {
/// The type of access mode this instance.
#[prost(enumeration = "runtime_access_config::RuntimeAccessType", tag = "1")]
pub access_type: i32,
/// The owner of this runtime after creation. Format: `alias@example.com`
/// Currently supports one owner only.
#[prost(string, tag = "2")]
pub runtime_owner: ::prost::alloc::string::String,
/// Output only. The proxy endpoint that is used to access the runtime.
#[prost(string, tag = "3")]
pub proxy_uri: ::prost::alloc::string::String,
}
/// Nested message and enum types in `RuntimeAccessConfig`.
pub mod runtime_access_config {
/// Possible ways to access runtime. Authentication mode.
/// Currently supports: Single User only.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RuntimeAccessType {
/// Unspecified access.
Unspecified = 0,
/// Single user login.
SingleUser = 1,
/// Service Account mode.
/// In Service Account mode, Runtime creator will specify a SA that exists
/// in the consumer project. Using Runtime Service Account field.
/// Users accessing the Runtime need ActAs (Service Account User) permission.
ServiceAccount = 2,
}
impl RuntimeAccessType {
/// 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 {
RuntimeAccessType::Unspecified => "RUNTIME_ACCESS_TYPE_UNSPECIFIED",
RuntimeAccessType::SingleUser => "SINGLE_USER",
RuntimeAccessType::ServiceAccount => "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 {
"RUNTIME_ACCESS_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SINGLE_USER" => Some(Self::SingleUser),
"SERVICE_ACCOUNT" => Some(Self::ServiceAccount),
_ => None,
}
}
}
}
/// Specifies the selection and configuration of software inside the runtime.
/// The properties to set on runtime.
/// Properties keys are specified in `key:value` format, for example:
///
/// * `idle_shutdown: true`
/// * `idle_shutdown_timeout: 180`
/// * `enable_health_monitoring: true`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuntimeSoftwareConfig {
/// Cron expression in UTC timezone, used to schedule instance auto upgrade.
/// Please follow the [cron format](<https://en.wikipedia.org/wiki/Cron>).
#[prost(string, tag = "1")]
pub notebook_upgrade_schedule: ::prost::alloc::string::String,
/// Verifies core internal services are running.
/// Default: True
#[prost(bool, optional, tag = "2")]
pub enable_health_monitoring: ::core::option::Option<bool>,
/// Runtime will automatically shutdown after idle_shutdown_time.
/// Default: True
#[prost(bool, optional, tag = "3")]
pub idle_shutdown: ::core::option::Option<bool>,
/// Time in minutes to wait before shutting down runtime. Default: 180 minutes
#[prost(int32, tag = "4")]
pub idle_shutdown_timeout: i32,
/// Install Nvidia Driver automatically.
/// Default: True
#[prost(bool, tag = "5")]
pub install_gpu_driver: bool,
/// Specify a custom Cloud Storage path where the GPU driver is stored.
/// If not specified, we'll automatically choose from official GPU drivers.
#[prost(string, tag = "6")]
pub custom_gpu_driver_path: ::prost::alloc::string::String,
/// Path to a Bash script that automatically runs after a notebook instance
/// fully boots up. The path must be a URL or
/// Cloud Storage path (`gs://path-to-file/file-name`).
#[prost(string, tag = "7")]
pub post_startup_script: ::prost::alloc::string::String,
/// Optional. Use a list of container images to use as Kernels in the notebook instance.
#[prost(message, repeated, tag = "8")]
pub kernels: ::prost::alloc::vec::Vec<ContainerImage>,
/// Output only. Bool indicating whether an newer image is available in an image family.
#[prost(bool, optional, tag = "9")]
pub upgradeable: ::core::option::Option<bool>,
/// Behavior for the post startup script.
#[prost(
enumeration = "runtime_software_config::PostStartupScriptBehavior",
tag = "10"
)]
pub post_startup_script_behavior: i32,
/// Bool indicating whether JupyterLab terminal will be available or not.
/// Default: False
#[prost(bool, optional, tag = "11")]
pub disable_terminal: ::core::option::Option<bool>,
/// Output only. version of boot image such as M100, from release label of the image.
#[prost(string, optional, tag = "12")]
pub version: ::core::option::Option<::prost::alloc::string::String>,
}
/// Nested message and enum types in `RuntimeSoftwareConfig`.
pub mod runtime_software_config {
/// Behavior for the post startup script.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum PostStartupScriptBehavior {
/// Unspecified post startup script behavior. Will run only once at creation.
Unspecified = 0,
/// Runs the post startup script provided during creation at every start.
RunEveryStart = 1,
/// Downloads and runs the provided post startup script at every start.
DownloadAndRunEveryStart = 2,
}
impl PostStartupScriptBehavior {
/// 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 {
PostStartupScriptBehavior::Unspecified => {
"POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED"
}
PostStartupScriptBehavior::RunEveryStart => "RUN_EVERY_START",
PostStartupScriptBehavior::DownloadAndRunEveryStart => {
"DOWNLOAD_AND_RUN_EVERY_START"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
"RUN_EVERY_START" => Some(Self::RunEveryStart),
"DOWNLOAD_AND_RUN_EVERY_START" => Some(Self::DownloadAndRunEveryStart),
_ => None,
}
}
}
}
/// Contains runtime daemon metrics, such as OS and kernels and sessions stats.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuntimeMetrics {
/// Output only. The system metrics.
#[prost(btree_map = "string, string", tag = "1")]
pub system_metrics: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// A set of Shielded Instance options.
/// Check [Images using supported Shielded VM
/// features](<https://cloud.google.com/compute/docs/instances/modifying-shielded-vm>).
/// Not all combinations are valid.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RuntimeShieldedInstanceConfig {
/// Defines whether the instance has Secure Boot enabled.
///
/// Secure Boot helps ensure that the system only runs authentic software by
/// verifying the digital signature of all boot components, and halting the
/// boot process if signature verification fails. Disabled by default.
#[prost(bool, tag = "1")]
pub enable_secure_boot: bool,
/// Defines whether the instance has the vTPM enabled. Enabled by default.
#[prost(bool, tag = "2")]
pub enable_vtpm: bool,
/// Defines whether the instance has integrity monitoring enabled.
///
/// Enables monitoring and attestation of the boot integrity of the instance.
/// The attestation is performed against the integrity policy baseline. This
/// baseline is initially derived from the implicitly trusted boot image when
/// the instance is created. Enabled by default.
#[prost(bool, tag = "3")]
pub enable_integrity_monitoring: bool,
}
/// Runtime using Virtual Machine for computing.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VirtualMachine {
/// Output only. The user-friendly name of the Managed Compute Engine instance.
#[prost(string, tag = "1")]
pub instance_name: ::prost::alloc::string::String,
/// Output only. The unique identifier of the Managed Compute Engine instance.
#[prost(string, tag = "2")]
pub instance_id: ::prost::alloc::string::String,
/// Virtual Machine configuration settings.
#[prost(message, optional, tag = "3")]
pub virtual_machine_config: ::core::option::Option<VirtualMachineConfig>,
}
/// The config settings for virtual machine.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VirtualMachineConfig {
/// Output only. The zone where the virtual machine is located.
/// If using regional request, the notebooks service will pick a location
/// in the corresponding runtime region.
/// On a get request, zone will always be present. Example:
/// * `us-central1-b`
#[prost(string, tag = "1")]
pub zone: ::prost::alloc::string::String,
/// Required. The Compute Engine machine type used for runtimes.
/// Short name is valid. Examples:
/// * `n1-standard-2`
/// * `e2-standard-8`
#[prost(string, tag = "2")]
pub machine_type: ::prost::alloc::string::String,
/// Optional. Use a list of container images to use as Kernels in the notebook instance.
#[prost(message, repeated, tag = "3")]
pub container_images: ::prost::alloc::vec::Vec<ContainerImage>,
/// Required. Data disk option configuration settings.
#[prost(message, optional, tag = "4")]
pub data_disk: ::core::option::Option<LocalDisk>,
/// Optional. Encryption settings for virtual machine data disk.
#[prost(message, optional, tag = "5")]
pub encryption_config: ::core::option::Option<EncryptionConfig>,
/// Optional. Shielded VM Instance configuration settings.
#[prost(message, optional, tag = "6")]
pub shielded_instance_config: ::core::option::Option<RuntimeShieldedInstanceConfig>,
/// Optional. The Compute Engine accelerator configuration for this runtime.
#[prost(message, optional, tag = "7")]
pub accelerator_config: ::core::option::Option<RuntimeAcceleratorConfig>,
/// Optional. The Compute Engine network to be used for machine
/// communications. Cannot be specified with subnetwork. If neither
/// `network` nor `subnet` is specified, the "default" network of
/// the project is used, if it exists.
///
/// A full URL or partial URI. Examples:
///
/// * `<https://www.googleapis.com/compute/v1/projects/\[project_id\]/global/networks/default`>
/// * `projects/\[project_id\]/global/networks/default`
///
/// Runtimes are managed resources inside Google Infrastructure.
/// Runtimes support the following network configurations:
///
/// * Google Managed Network (Network & subnet are empty)
/// * Consumer Project VPC (network & subnet are required). Requires
/// configuring Private Service Access.
/// * Shared VPC (network & subnet are required). Requires configuring Private
/// Service Access.
#[prost(string, tag = "8")]
pub network: ::prost::alloc::string::String,
/// Optional. The Compute Engine subnetwork to be used for machine
/// communications. Cannot be specified with network.
///
/// A full URL or partial URI are valid. Examples:
///
/// * `<https://www.googleapis.com/compute/v1/projects/\[project_id\]/regions/us-east1/subnetworks/sub0`>
/// * `projects/\[project_id\]/regions/us-east1/subnetworks/sub0`
#[prost(string, tag = "9")]
pub subnet: ::prost::alloc::string::String,
/// Optional. If true, runtime will only have internal IP
/// addresses. By default, runtimes are not restricted to internal IP
/// addresses, and will have ephemeral external IP addresses assigned to each
/// vm. This `internal_ip_only` restriction can only be enabled for
/// subnetwork enabled networks, and all dependencies must be
/// configured to be accessible without external IP addresses.
#[prost(bool, tag = "10")]
pub internal_ip_only: bool,
/// Optional. The Compute Engine tags to add to runtime (see [Tagging
/// instances](<https://cloud.google.com/compute/docs/label-or-tag-resources#tags>)).
#[prost(string, repeated, tag = "13")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Output only. The Compute Engine guest attributes. (see
/// [Project and instance
/// guest
/// attributes](<https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes>)).
#[prost(btree_map = "string, string", tag = "14")]
pub guest_attributes: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Optional. The Compute Engine metadata entries to add to virtual machine. (see
/// [Project and instance
/// metadata](<https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata>)).
#[prost(btree_map = "string, string", tag = "15")]
pub metadata: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Optional. The labels to associate with this runtime.
/// Label **keys** must contain 1 to 63 characters, and must conform to
/// [RFC 1035](<https://www.ietf.org/rfc/rfc1035.txt>).
/// Label **values** may be empty, but, if present, must contain 1 to 63
/// characters, and must conform to [RFC
/// 1035](<https://www.ietf.org/rfc/rfc1035.txt>). No more than 32 labels can be
/// associated with a cluster.
#[prost(btree_map = "string, string", tag = "16")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Optional. The type of vNIC to be used on this interface. This may be gVNIC or
/// VirtioNet.
#[prost(enumeration = "virtual_machine_config::NicType", tag = "17")]
pub nic_type: i32,
/// Optional. Reserved IP Range name is used for VPC Peering.
/// The subnetwork allocation will use the range *name* if it's assigned.
///
/// Example: managed-notebooks-range-c
///
/// PEERING_RANGE_NAME_3=managed-notebooks-range-c
/// gcloud compute addresses create $PEERING_RANGE_NAME_3 \
/// --global \
/// --prefix-length=24 \
/// --description="Google Cloud Managed Notebooks Range 24 c" \
/// --network=$NETWORK \
/// --addresses=192.168.0.0 \
/// --purpose=VPC_PEERING
///
/// Field value will be: `managed-notebooks-range-c`
#[prost(string, tag = "18")]
pub reserved_ip_range: ::prost::alloc::string::String,
/// Optional. Boot image metadata used for runtime upgradeability.
#[prost(message, optional, tag = "19")]
pub boot_image: ::core::option::Option<virtual_machine_config::BootImage>,
}
/// Nested message and enum types in `VirtualMachineConfig`.
pub mod virtual_machine_config {
/// Definition of the boot image used by the Runtime.
/// Used to facilitate runtime upgradeability.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BootImage {}
/// The type of vNIC driver.
/// Default should be UNSPECIFIED_NIC_TYPE.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum NicType {
/// No type specified.
UnspecifiedNicType = 0,
/// VIRTIO
VirtioNet = 1,
/// GVNIC
Gvnic = 2,
}
impl NicType {
/// 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 {
NicType::UnspecifiedNicType => "UNSPECIFIED_NIC_TYPE",
NicType::VirtioNet => "VIRTIO_NET",
NicType::Gvnic => "GVNIC",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED_NIC_TYPE" => Some(Self::UnspecifiedNicType),
"VIRTIO_NET" => Some(Self::VirtioNet),
"GVNIC" => Some(Self::Gvnic),
_ => None,
}
}
}
}
/// Request for listing Managed Notebook Runtimes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRuntimesRequest {
/// Required. Format:
/// `parent=projects/{project_id}/locations/{location}`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum return size of the list call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A previous returned page token that can be used to continue listing
/// from the last result.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
/// Response for listing Managed Notebook Runtimes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRuntimesResponse {
/// A list of returned Runtimes.
#[prost(message, repeated, tag = "1")]
pub runtimes: ::prost::alloc::vec::Vec<Runtime>,
/// Page token that can be used to continue listing from the last result in the
/// next list call.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached. For example,
/// `\['us-west1', 'us-central1'\]`.
/// A ListRuntimesResponse will only contain either runtimes or unreachables,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for getting a Managed Notebook Runtime.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRuntimeRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for creating a Managed Notebook Runtime.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRuntimeRequest {
/// Required. Format:
/// `parent=projects/{project_id}/locations/{location}`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. User-defined unique ID of this Runtime.
#[prost(string, tag = "2")]
pub runtime_id: ::prost::alloc::string::String,
/// Required. The Runtime to be created.
#[prost(message, optional, tag = "3")]
pub runtime: ::core::option::Option<Runtime>,
/// Idempotent request UUID.
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
/// Request for deleting a Managed Notebook Runtime.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRuntimeRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Idempotent request UUID.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Request for starting a Managed Notebook Runtime.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartRuntimeRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Idempotent request UUID.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Request for stopping a Managed Notebook Runtime.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopRuntimeRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Idempotent request UUID.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Request for switching a Managed Notebook Runtime.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SwitchRuntimeRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// machine type.
#[prost(string, tag = "2")]
pub machine_type: ::prost::alloc::string::String,
/// accelerator config.
#[prost(message, optional, tag = "3")]
pub accelerator_config: ::core::option::Option<RuntimeAcceleratorConfig>,
/// Idempotent request UUID.
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
/// Request for resetting a Managed Notebook Runtime.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResetRuntimeRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Idempotent request UUID.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Request for upgrading a Managed Notebook Runtime to the latest version.
/// option (google.api.message_visibility).restriction =
/// "TRUSTED_TESTER,SPECIAL_TESTER";
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpgradeRuntimeRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Idempotent request UUID.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Request for reporting a Managed Notebook Event.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportRuntimeEventRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. The VM hardware token for authenticating the VM.
/// <https://cloud.google.com/compute/docs/instances/verifying-instance-identity>
#[prost(string, tag = "2")]
pub vm_id: ::prost::alloc::string::String,
/// Required. The Event to be reported.
#[prost(message, optional, tag = "3")]
pub event: ::core::option::Option<Event>,
}
/// Request for updating a Managed Notebook configuration.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateRuntimeRequest {
/// Required. The Runtime to be updated.
#[prost(message, optional, tag = "1")]
pub runtime: ::core::option::Option<Runtime>,
/// Required. Specifies the path, relative to `Runtime`, of
/// the field to update. For example, to change the software configuration
/// kernels, the `update_mask` parameter would be
/// specified as `software_config.kernels`,
/// and the `PATCH` request body would specify the new value, as follows:
///
/// {
/// "software_config":{
/// "kernels": [{
/// 'repository':
/// 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag':
/// 'latest' }],
/// }
/// }
///
///
/// Currently, only the following fields can be updated:
/// - `software_config.kernels`
/// - `software_config.post_startup_script`
/// - `software_config.custom_gpu_driver_path`
/// - `software_config.idle_shutdown`
/// - `software_config.idle_shutdown_timeout`
/// - `software_config.disable_terminal`
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Idempotent request UUID.
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
/// Request for getting a new access token.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RefreshRuntimeTokenInternalRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. The VM hardware token for authenticating the VM.
/// <https://cloud.google.com/compute/docs/instances/verifying-instance-identity>
#[prost(string, tag = "2")]
pub vm_id: ::prost::alloc::string::String,
}
/// Response with a new access token.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RefreshRuntimeTokenInternalResponse {
/// The OAuth 2.0 access token.
#[prost(string, tag = "1")]
pub access_token: ::prost::alloc::string::String,
/// Output only. Token expiration time.
#[prost(message, optional, tag = "2")]
pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Request for creating a notebook instance diagnostic file.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiagnoseRuntimeRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. Defines flags that are used to run the diagnostic tool
#[prost(message, optional, tag = "2")]
pub diagnostic_config: ::core::option::Option<DiagnosticConfig>,
}
/// Generated client implementations.
pub mod managed_notebook_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// API v1 service for Managed Notebooks.
#[derive(Debug, Clone)]
pub struct ManagedNotebookServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ManagedNotebookServiceClient<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,
) -> ManagedNotebookServiceClient<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,
{
ManagedNotebookServiceClient::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 Runtimes in a given project and location.
pub async fn list_runtimes(
&mut self,
request: impl tonic::IntoRequest<super::ListRuntimesRequest>,
) -> std::result::Result<
tonic::Response<super::ListRuntimesResponse>,
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.notebooks.v1.ManagedNotebookService/ListRuntimes",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.ManagedNotebookService",
"ListRuntimes",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single Runtime. The location must be a regional endpoint
/// rather than zonal.
pub async fn get_runtime(
&mut self,
request: impl tonic::IntoRequest<super::GetRuntimeRequest>,
) -> std::result::Result<tonic::Response<super::Runtime>, 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.notebooks.v1.ManagedNotebookService/GetRuntime",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.ManagedNotebookService",
"GetRuntime",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new Runtime in a given project and location.
pub async fn create_runtime(
&mut self,
request: impl tonic::IntoRequest<super::CreateRuntimeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.ManagedNotebookService/CreateRuntime",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.ManagedNotebookService",
"CreateRuntime",
),
);
self.inner.unary(req, path, codec).await
}
/// Update Notebook Runtime configuration.
pub async fn update_runtime(
&mut self,
request: impl tonic::IntoRequest<super::UpdateRuntimeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.ManagedNotebookService/UpdateRuntime",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.ManagedNotebookService",
"UpdateRuntime",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single Runtime.
pub async fn delete_runtime(
&mut self,
request: impl tonic::IntoRequest<super::DeleteRuntimeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.ManagedNotebookService/DeleteRuntime",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.ManagedNotebookService",
"DeleteRuntime",
),
);
self.inner.unary(req, path, codec).await
}
/// Starts a Managed Notebook Runtime.
/// Perform "Start" on GPU instances; "Resume" on CPU instances
/// See:
/// https://cloud.google.com/compute/docs/instances/stop-start-instance
/// https://cloud.google.com/compute/docs/instances/suspend-resume-instance
pub async fn start_runtime(
&mut self,
request: impl tonic::IntoRequest<super::StartRuntimeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.ManagedNotebookService/StartRuntime",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.ManagedNotebookService",
"StartRuntime",
),
);
self.inner.unary(req, path, codec).await
}
/// Stops a Managed Notebook Runtime.
/// Perform "Stop" on GPU instances; "Suspend" on CPU instances
/// See:
/// https://cloud.google.com/compute/docs/instances/stop-start-instance
/// https://cloud.google.com/compute/docs/instances/suspend-resume-instance
pub async fn stop_runtime(
&mut self,
request: impl tonic::IntoRequest<super::StopRuntimeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.ManagedNotebookService/StopRuntime",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.ManagedNotebookService",
"StopRuntime",
),
);
self.inner.unary(req, path, codec).await
}
/// Switch a Managed Notebook Runtime.
pub async fn switch_runtime(
&mut self,
request: impl tonic::IntoRequest<super::SwitchRuntimeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.ManagedNotebookService/SwitchRuntime",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.ManagedNotebookService",
"SwitchRuntime",
),
);
self.inner.unary(req, path, codec).await
}
/// Resets a Managed Notebook Runtime.
pub async fn reset_runtime(
&mut self,
request: impl tonic::IntoRequest<super::ResetRuntimeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.ManagedNotebookService/ResetRuntime",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.ManagedNotebookService",
"ResetRuntime",
),
);
self.inner.unary(req, path, codec).await
}
/// Upgrades a Managed Notebook Runtime to the latest version.
pub async fn upgrade_runtime(
&mut self,
request: impl tonic::IntoRequest<super::UpgradeRuntimeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.ManagedNotebookService/UpgradeRuntime",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.ManagedNotebookService",
"UpgradeRuntime",
),
);
self.inner.unary(req, path, codec).await
}
/// Report and process a runtime event.
pub async fn report_runtime_event(
&mut self,
request: impl tonic::IntoRequest<super::ReportRuntimeEventRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.ManagedNotebookService/ReportRuntimeEvent",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.ManagedNotebookService",
"ReportRuntimeEvent",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets an access token for the consumer service account that the customer
/// attached to the runtime. Only accessible from the tenant instance.
pub async fn refresh_runtime_token_internal(
&mut self,
request: impl tonic::IntoRequest<super::RefreshRuntimeTokenInternalRequest>,
) -> std::result::Result<
tonic::Response<super::RefreshRuntimeTokenInternalResponse>,
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.notebooks.v1.ManagedNotebookService/RefreshRuntimeTokenInternal",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.ManagedNotebookService",
"RefreshRuntimeTokenInternal",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.
pub async fn diagnose_runtime(
&mut self,
request: impl tonic::IntoRequest<super::DiagnoseRuntimeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.ManagedNotebookService/DiagnoseRuntime",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.ManagedNotebookService",
"DiagnoseRuntime",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Notebook instance configurations that can be updated.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstanceConfig {
/// Cron expression in UTC timezone, used to schedule instance auto upgrade.
/// Please follow the [cron format](<https://en.wikipedia.org/wiki/Cron>).
#[prost(string, tag = "1")]
pub notebook_upgrade_schedule: ::prost::alloc::string::String,
/// Verifies core internal services are running.
#[prost(bool, tag = "2")]
pub enable_health_monitoring: bool,
}
/// Represents the metadata of the long-running operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
/// The time the operation was created.
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// The time the operation finished running.
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// Server-defined resource path for the target of the operation.
#[prost(string, tag = "3")]
pub target: ::prost::alloc::string::String,
/// Name of the verb executed by the operation.
#[prost(string, tag = "4")]
pub verb: ::prost::alloc::string::String,
/// Human-readable status of the operation, if any.
#[prost(string, tag = "5")]
pub status_message: ::prost::alloc::string::String,
/// Identifies whether the user has requested cancellation
/// of the operation. Operations that have successfully been cancelled
/// have [Operation.error][] value with a
/// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`.
#[prost(bool, tag = "6")]
pub requested_cancellation: bool,
/// API version used to start the operation.
#[prost(string, tag = "7")]
pub api_version: ::prost::alloc::string::String,
/// API endpoint name of this operation.
#[prost(string, tag = "8")]
pub endpoint: ::prost::alloc::string::String,
}
/// Request for listing notebook instances.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInstancesRequest {
/// Required. Format:
/// `parent=projects/{project_id}/locations/{location}`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum return size of the list call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A previous returned page token that can be used to continue listing
/// from the last result.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
/// Response for listing notebook instances.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInstancesResponse {
/// A list of returned instances.
#[prost(message, repeated, tag = "1")]
pub instances: ::prost::alloc::vec::Vec<Instance>,
/// Page token that can be used to continue listing from the last result in the
/// next list call.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached. For example,
/// `\['us-west1-a', 'us-central1-b'\]`.
/// A ListInstancesResponse will only contain either instances or unreachables,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for getting a notebook instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInstanceRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for creating a notebook instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateInstanceRequest {
/// Required. Format:
/// `parent=projects/{project_id}/locations/{location}`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. User-defined unique ID of this instance.
#[prost(string, tag = "2")]
pub instance_id: ::prost::alloc::string::String,
/// Required. The instance to be created.
#[prost(message, optional, tag = "3")]
pub instance: ::core::option::Option<Instance>,
}
/// Request for registering a notebook instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterInstanceRequest {
/// Required. Format:
/// `parent=projects/{project_id}/locations/{location}`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. User defined unique ID of this instance. The `instance_id` must
/// be 1 to 63 characters long and contain only lowercase letters,
/// numeric characters, and dashes. The first character must be a lowercase
/// letter and the last character cannot be a dash.
#[prost(string, tag = "2")]
pub instance_id: ::prost::alloc::string::String,
}
/// Request for setting instance accelerator.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetInstanceAcceleratorRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. Type of this accelerator.
#[prost(enumeration = "instance::AcceleratorType", tag = "2")]
pub r#type: i32,
/// Required. Count of cores of this accelerator. Note that not all combinations
/// of `type` and `core_count` are valid. Check [GPUs on
/// Compute Engine](<https://cloud.google.com/compute/docs/gpus/#gpus-list>) to
/// find a valid combination. TPUs are not supported.
#[prost(int64, tag = "3")]
pub core_count: i64,
}
/// Request for setting instance machine type.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetInstanceMachineTypeRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. The [Compute Engine machine
/// type](<https://cloud.google.com/compute/docs/machine-types>).
#[prost(string, tag = "2")]
pub machine_type: ::prost::alloc::string::String,
}
/// Request for updating instance configurations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateInstanceConfigRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The instance configurations to be updated.
#[prost(message, optional, tag = "2")]
pub config: ::core::option::Option<InstanceConfig>,
}
/// Request for setting instance labels.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetInstanceLabelsRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Labels to apply to this instance.
/// These can be later modified by the setLabels method
#[prost(btree_map = "string, string", tag = "2")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// Request for adding/changing metadata items for an instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateInstanceMetadataItemsRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Metadata items to add/update for the instance.
#[prost(btree_map = "string, string", tag = "2")]
pub items: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// Response for adding/changing metadata items for an instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateInstanceMetadataItemsResponse {
/// Map of items that were added/updated to/in the metadata.
#[prost(btree_map = "string, string", tag = "1")]
pub items: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// Request for updating the Shielded Instance config for a notebook instance.
/// You can only use this method on a stopped instance
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateShieldedInstanceConfigRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// ShieldedInstance configuration to be updated.
#[prost(message, optional, tag = "2")]
pub shielded_instance_config: ::core::option::Option<
instance::ShieldedInstanceConfig,
>,
}
/// Request for deleting a notebook instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteInstanceRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for starting a notebook instance
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartInstanceRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for stopping a notebook instance
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopInstanceRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for resetting a notebook instance
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResetInstanceRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for notebook instances to report information to Notebooks API.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportInstanceInfoRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. The VM hardware token for authenticating the VM.
/// <https://cloud.google.com/compute/docs/instances/verifying-instance-identity>
#[prost(string, tag = "2")]
pub vm_id: ::prost::alloc::string::String,
/// The metadata reported to Notebooks API. This will be merged to the instance
/// metadata store
#[prost(btree_map = "string, string", tag = "3")]
pub metadata: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// Request for checking if a notebook instance is upgradeable.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IsInstanceUpgradeableRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub notebook_instance: ::prost::alloc::string::String,
/// Optional. The optional UpgradeType. Setting this field will search for additional
/// compute images to upgrade this instance.
#[prost(enumeration = "UpgradeType", tag = "2")]
pub r#type: i32,
}
/// Response for checking if a notebook instance is upgradeable.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IsInstanceUpgradeableResponse {
/// If an instance is upgradeable.
#[prost(bool, tag = "1")]
pub upgradeable: bool,
/// The version this instance will be upgraded to if calling the upgrade
/// endpoint. This field will only be populated if field upgradeable is true.
#[prost(string, tag = "2")]
pub upgrade_version: ::prost::alloc::string::String,
/// Additional information about upgrade.
#[prost(string, tag = "3")]
pub upgrade_info: ::prost::alloc::string::String,
/// The new image self link this instance will be upgraded to if calling the
/// upgrade endpoint. This field will only be populated if field upgradeable
/// is true.
#[prost(string, tag = "4")]
pub upgrade_image: ::prost::alloc::string::String,
}
/// Request for checking if a notebook instance is healthy.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInstanceHealthRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Response for checking if a notebook instance is healthy.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInstanceHealthResponse {
/// Output only. Runtime health_state.
#[prost(enumeration = "get_instance_health_response::HealthState", tag = "1")]
pub health_state: i32,
/// Output only. Additional information about instance health.
/// Example:
/// healthInfo": {
/// "docker_proxy_agent_status": "1",
/// "docker_status": "1",
/// "jupyterlab_api_status": "-1",
/// "jupyterlab_status": "-1",
/// "updated": "2020-10-18 09:40:03.573409"
/// }
#[prost(btree_map = "string, string", tag = "2")]
pub health_info: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// Nested message and enum types in `GetInstanceHealthResponse`.
pub mod get_instance_health_response {
/// If an instance is healthy or not.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum HealthState {
/// The instance substate is unknown.
Unspecified = 0,
/// The instance is known to be in an healthy state
/// (for example, critical daemons are running)
/// Applies to ACTIVE state.
Healthy = 1,
/// The instance is known to be in an unhealthy state
/// (for example, critical daemons are not running)
/// Applies to ACTIVE state.
Unhealthy = 2,
/// The instance has not installed health monitoring agent.
/// Applies to ACTIVE state.
AgentNotInstalled = 3,
/// The instance health monitoring agent is not running.
/// Applies to ACTIVE state.
AgentNotRunning = 4,
}
impl HealthState {
/// 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 {
HealthState::Unspecified => "HEALTH_STATE_UNSPECIFIED",
HealthState::Healthy => "HEALTHY",
HealthState::Unhealthy => "UNHEALTHY",
HealthState::AgentNotInstalled => "AGENT_NOT_INSTALLED",
HealthState::AgentNotRunning => "AGENT_NOT_RUNNING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HEALTH_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"HEALTHY" => Some(Self::Healthy),
"UNHEALTHY" => Some(Self::Unhealthy),
"AGENT_NOT_INSTALLED" => Some(Self::AgentNotInstalled),
"AGENT_NOT_RUNNING" => Some(Self::AgentNotRunning),
_ => None,
}
}
}
}
/// Request for upgrading a notebook instance
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpgradeInstanceRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. The optional UpgradeType. Setting this field will search for additional
/// compute images to upgrade this instance.
#[prost(enumeration = "UpgradeType", tag = "2")]
pub r#type: i32,
}
/// Request for rollbacking a notebook instance
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RollbackInstanceRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. The snapshot for rollback.
/// Example: `projects/test-project/global/snapshots/krwlzipynril`.
#[prost(string, tag = "2")]
pub target_snapshot: ::prost::alloc::string::String,
}
/// Request for upgrading a notebook instance from within the VM
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpgradeInstanceInternalRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. The VM hardware token for authenticating the VM.
/// <https://cloud.google.com/compute/docs/instances/verifying-instance-identity>
#[prost(string, tag = "2")]
pub vm_id: ::prost::alloc::string::String,
/// Optional. The optional UpgradeType. Setting this field will search for additional
/// compute images to upgrade this instance.
#[prost(enumeration = "UpgradeType", tag = "3")]
pub r#type: i32,
}
/// Request for listing environments.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEnvironmentsRequest {
/// Required. Format: `projects/{project_id}/locations/{location}`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum return size of the list call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A previous returned page token that can be used to continue listing from
/// the last result.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
/// Request for creating a notebook instance diagnostic file.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiagnoseInstanceRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/instances/{instance_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. Defines flags that are used to run the diagnostic tool
#[prost(message, optional, tag = "2")]
pub diagnostic_config: ::core::option::Option<DiagnosticConfig>,
}
/// Response for listing environments.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEnvironmentsResponse {
/// A list of returned environments.
#[prost(message, repeated, tag = "1")]
pub environments: ::prost::alloc::vec::Vec<Environment>,
/// A page token that can be used to continue listing from the last result
/// in the next list call.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for getting a notebook environment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEnvironmentRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/environments/{environment_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for creating a notebook environment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateEnvironmentRequest {
/// Required. Format: `projects/{project_id}/locations/{location}`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. User-defined unique ID of this environment. The `environment_id` must
/// be 1 to 63 characters long and contain only lowercase letters,
/// numeric characters, and dashes. The first character must be a lowercase
/// letter and the last character cannot be a dash.
#[prost(string, tag = "2")]
pub environment_id: ::prost::alloc::string::String,
/// Required. The environment to be created.
#[prost(message, optional, tag = "3")]
pub environment: ::core::option::Option<Environment>,
}
/// Request for deleting a notebook environment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteEnvironmentRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/environments/{environment_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for listing scheduled notebook job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSchedulesRequest {
/// Required. Format:
/// `parent=projects/{project_id}/locations/{location}`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum return size of the list call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A previous returned page token that can be used to continue listing
/// from the last result.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Filter applied to resulting schedules.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Field to order results by.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response for listing scheduled notebook job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSchedulesResponse {
/// A list of returned instances.
#[prost(message, repeated, tag = "1")]
pub schedules: ::prost::alloc::vec::Vec<Schedule>,
/// Page token that can be used to continue listing from the last result in the
/// next list call.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Schedules that could not be reached. For example:
///
/// ['projects/{project_id}/location/{location}/schedules/monthly_digest',
/// 'projects/{project_id}/location/{location}/schedules/weekly_sentiment']
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for getting scheduled notebook.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetScheduleRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for deleting an Schedule
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteScheduleRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for created scheduled notebooks
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateScheduleRequest {
/// Required. Format:
/// `parent=projects/{project_id}/locations/{location}`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. User-defined unique ID of this schedule.
#[prost(string, tag = "2")]
pub schedule_id: ::prost::alloc::string::String,
/// Required. The schedule to be created.
#[prost(message, optional, tag = "3")]
pub schedule: ::core::option::Option<Schedule>,
}
/// Request for created scheduled notebooks
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TriggerScheduleRequest {
/// Required. Format:
/// `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for listing scheduled notebook executions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutionsRequest {
/// Required. Format:
/// `parent=projects/{project_id}/locations/{location}`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum return size of the list call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A previous returned page token that can be used to continue listing
/// from the last result.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Filter applied to resulting executions. Currently only supports filtering
/// executions by a specified `schedule_id`.
/// Format: `schedule_id=<Schedule_ID>`
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Sort by field.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response for listing scheduled notebook executions
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutionsResponse {
/// A list of returned instances.
#[prost(message, repeated, tag = "1")]
pub executions: ::prost::alloc::vec::Vec<Execution>,
/// Page token that can be used to continue listing from the last result in the
/// next list call.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Executions IDs that could not be reached. For example:
///
/// ['projects/{project_id}/location/{location}/executions/imagenet_test1',
/// 'projects/{project_id}/location/{location}/executions/classifier_train1']
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for getting scheduled notebook execution
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetExecutionRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/executions/{execution_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for deleting a scheduled notebook execution
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteExecutionRequest {
/// Required. Format:
/// `projects/{project_id}/locations/{location}/executions/{execution_id}`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request to create notebook execution
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateExecutionRequest {
/// Required. Format:
/// `parent=projects/{project_id}/locations/{location}`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. User-defined unique ID of this execution.
#[prost(string, tag = "2")]
pub execution_id: ::prost::alloc::string::String,
/// Required. The execution to be created.
#[prost(message, optional, tag = "3")]
pub execution: ::core::option::Option<Execution>,
}
/// Definition of the types of upgrade that can be used on this
/// instance.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum UpgradeType {
/// Upgrade type is not specified.
Unspecified = 0,
/// Upgrade ML framework.
UpgradeFramework = 1,
/// Upgrade Operating System.
UpgradeOs = 2,
/// Upgrade CUDA.
UpgradeCuda = 3,
/// Upgrade All (OS, Framework and CUDA).
UpgradeAll = 4,
}
impl UpgradeType {
/// 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 {
UpgradeType::Unspecified => "UPGRADE_TYPE_UNSPECIFIED",
UpgradeType::UpgradeFramework => "UPGRADE_FRAMEWORK",
UpgradeType::UpgradeOs => "UPGRADE_OS",
UpgradeType::UpgradeCuda => "UPGRADE_CUDA",
UpgradeType::UpgradeAll => "UPGRADE_ALL",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UPGRADE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"UPGRADE_FRAMEWORK" => Some(Self::UpgradeFramework),
"UPGRADE_OS" => Some(Self::UpgradeOs),
"UPGRADE_CUDA" => Some(Self::UpgradeCuda),
"UPGRADE_ALL" => Some(Self::UpgradeAll),
_ => None,
}
}
}
/// Generated client implementations.
pub mod notebook_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// API v1 service for Cloud AI Platform Notebooks.
#[derive(Debug, Clone)]
pub struct NotebookServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> NotebookServiceClient<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,
) -> NotebookServiceClient<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,
{
NotebookServiceClient::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 instances in a given project and location.
pub async fn list_instances(
&mut self,
request: impl tonic::IntoRequest<super::ListInstancesRequest>,
) -> std::result::Result<
tonic::Response<super::ListInstancesResponse>,
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.notebooks.v1.NotebookService/ListInstances",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"ListInstances",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single Instance.
pub async fn get_instance(
&mut self,
request: impl tonic::IntoRequest<super::GetInstanceRequest>,
) -> std::result::Result<tonic::Response<super::Instance>, 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.notebooks.v1.NotebookService/GetInstance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"GetInstance",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new Instance in a given project and location.
pub async fn create_instance(
&mut self,
request: impl tonic::IntoRequest<super::CreateInstanceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/CreateInstance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"CreateInstance",
),
);
self.inner.unary(req, path, codec).await
}
/// Registers an existing legacy notebook instance to the Notebooks API server.
/// Legacy instances are instances created with the legacy Compute Engine
/// calls. They are not manageable by the Notebooks API out of the box. This
/// call makes these instances manageable by the Notebooks API.
pub async fn register_instance(
&mut self,
request: impl tonic::IntoRequest<super::RegisterInstanceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/RegisterInstance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"RegisterInstance",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the guest accelerators of a single Instance.
pub async fn set_instance_accelerator(
&mut self,
request: impl tonic::IntoRequest<super::SetInstanceAcceleratorRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/SetInstanceAccelerator",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"SetInstanceAccelerator",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the machine type of a single Instance.
pub async fn set_instance_machine_type(
&mut self,
request: impl tonic::IntoRequest<super::SetInstanceMachineTypeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/SetInstanceMachineType",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"SetInstanceMachineType",
),
);
self.inner.unary(req, path, codec).await
}
/// Update Notebook Instance configurations.
pub async fn update_instance_config(
&mut self,
request: impl tonic::IntoRequest<super::UpdateInstanceConfigRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/UpdateInstanceConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"UpdateInstanceConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the Shielded instance configuration of a single Instance.
pub async fn update_shielded_instance_config(
&mut self,
request: impl tonic::IntoRequest<super::UpdateShieldedInstanceConfigRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/UpdateShieldedInstanceConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"UpdateShieldedInstanceConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Replaces all the labels of an Instance.
pub async fn set_instance_labels(
&mut self,
request: impl tonic::IntoRequest<super::SetInstanceLabelsRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/SetInstanceLabels",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"SetInstanceLabels",
),
);
self.inner.unary(req, path, codec).await
}
/// Add/update metadata items for an instance.
pub async fn update_instance_metadata_items(
&mut self,
request: impl tonic::IntoRequest<super::UpdateInstanceMetadataItemsRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateInstanceMetadataItemsResponse>,
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.notebooks.v1.NotebookService/UpdateInstanceMetadataItems",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"UpdateInstanceMetadataItems",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single Instance.
pub async fn delete_instance(
&mut self,
request: impl tonic::IntoRequest<super::DeleteInstanceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/DeleteInstance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"DeleteInstance",
),
);
self.inner.unary(req, path, codec).await
}
/// Starts a notebook instance.
pub async fn start_instance(
&mut self,
request: impl tonic::IntoRequest<super::StartInstanceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/StartInstance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"StartInstance",
),
);
self.inner.unary(req, path, codec).await
}
/// Stops a notebook instance.
pub async fn stop_instance(
&mut self,
request: impl tonic::IntoRequest<super::StopInstanceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/StopInstance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"StopInstance",
),
);
self.inner.unary(req, path, codec).await
}
/// Resets a notebook instance.
pub async fn reset_instance(
&mut self,
request: impl tonic::IntoRequest<super::ResetInstanceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/ResetInstance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"ResetInstance",
),
);
self.inner.unary(req, path, codec).await
}
/// Allows notebook instances to
/// report their latest instance information to the Notebooks
/// API server. The server will merge the reported information to
/// the instance metadata store. Do not use this method directly.
pub async fn report_instance_info(
&mut self,
request: impl tonic::IntoRequest<super::ReportInstanceInfoRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/ReportInstanceInfo",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"ReportInstanceInfo",
),
);
self.inner.unary(req, path, codec).await
}
/// Check if a notebook instance is upgradable.
pub async fn is_instance_upgradeable(
&mut self,
request: impl tonic::IntoRequest<super::IsInstanceUpgradeableRequest>,
) -> std::result::Result<
tonic::Response<super::IsInstanceUpgradeableResponse>,
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.notebooks.v1.NotebookService/IsInstanceUpgradeable",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"IsInstanceUpgradeable",
),
);
self.inner.unary(req, path, codec).await
}
/// Check if a notebook instance is healthy.
pub async fn get_instance_health(
&mut self,
request: impl tonic::IntoRequest<super::GetInstanceHealthRequest>,
) -> std::result::Result<
tonic::Response<super::GetInstanceHealthResponse>,
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.notebooks.v1.NotebookService/GetInstanceHealth",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"GetInstanceHealth",
),
);
self.inner.unary(req, path, codec).await
}
/// Upgrades a notebook instance to the latest version.
pub async fn upgrade_instance(
&mut self,
request: impl tonic::IntoRequest<super::UpgradeInstanceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/UpgradeInstance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"UpgradeInstance",
),
);
self.inner.unary(req, path, codec).await
}
/// Rollbacks a notebook instance to the previous version.
pub async fn rollback_instance(
&mut self,
request: impl tonic::IntoRequest<super::RollbackInstanceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/RollbackInstance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"RollbackInstance",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a Diagnostic File and runs Diagnostic Tool given an Instance.
pub async fn diagnose_instance(
&mut self,
request: impl tonic::IntoRequest<super::DiagnoseInstanceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/DiagnoseInstance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"DiagnoseInstance",
),
);
self.inner.unary(req, path, codec).await
}
/// Allows notebook instances to
/// call this endpoint to upgrade themselves. Do not use this method directly.
pub async fn upgrade_instance_internal(
&mut self,
request: impl tonic::IntoRequest<super::UpgradeInstanceInternalRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/UpgradeInstanceInternal",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"UpgradeInstanceInternal",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists environments in a project.
pub async fn list_environments(
&mut self,
request: impl tonic::IntoRequest<super::ListEnvironmentsRequest>,
) -> std::result::Result<
tonic::Response<super::ListEnvironmentsResponse>,
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.notebooks.v1.NotebookService/ListEnvironments",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"ListEnvironments",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single Environment.
pub async fn get_environment(
&mut self,
request: impl tonic::IntoRequest<super::GetEnvironmentRequest>,
) -> std::result::Result<tonic::Response<super::Environment>, 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.notebooks.v1.NotebookService/GetEnvironment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"GetEnvironment",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new Environment.
pub async fn create_environment(
&mut self,
request: impl tonic::IntoRequest<super::CreateEnvironmentRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/CreateEnvironment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"CreateEnvironment",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single Environment.
pub async fn delete_environment(
&mut self,
request: impl tonic::IntoRequest<super::DeleteEnvironmentRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/DeleteEnvironment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"DeleteEnvironment",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists schedules in a given project and location.
pub async fn list_schedules(
&mut self,
request: impl tonic::IntoRequest<super::ListSchedulesRequest>,
) -> std::result::Result<
tonic::Response<super::ListSchedulesResponse>,
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.notebooks.v1.NotebookService/ListSchedules",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"ListSchedules",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of schedule
pub async fn get_schedule(
&mut self,
request: impl tonic::IntoRequest<super::GetScheduleRequest>,
) -> std::result::Result<tonic::Response<super::Schedule>, 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.notebooks.v1.NotebookService/GetSchedule",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"GetSchedule",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes schedule and all underlying jobs
pub async fn delete_schedule(
&mut self,
request: impl tonic::IntoRequest<super::DeleteScheduleRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/DeleteSchedule",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"DeleteSchedule",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new Scheduled Notebook in a given project and location.
pub async fn create_schedule(
&mut self,
request: impl tonic::IntoRequest<super::CreateScheduleRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/CreateSchedule",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"CreateSchedule",
),
);
self.inner.unary(req, path, codec).await
}
/// Triggers execution of an existing schedule.
pub async fn trigger_schedule(
&mut self,
request: impl tonic::IntoRequest<super::TriggerScheduleRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/TriggerSchedule",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"TriggerSchedule",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists executions in a given project and location
pub async fn list_executions(
&mut self,
request: impl tonic::IntoRequest<super::ListExecutionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListExecutionsResponse>,
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.notebooks.v1.NotebookService/ListExecutions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"ListExecutions",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of executions
pub async fn get_execution(
&mut self,
request: impl tonic::IntoRequest<super::GetExecutionRequest>,
) -> std::result::Result<tonic::Response<super::Execution>, 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.notebooks.v1.NotebookService/GetExecution",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"GetExecution",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes execution
pub async fn delete_execution(
&mut self,
request: impl tonic::IntoRequest<super::DeleteExecutionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/DeleteExecution",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"DeleteExecution",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new Execution in a given project and location.
pub async fn create_execution(
&mut self,
request: impl tonic::IntoRequest<super::CreateExecutionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.notebooks.v1.NotebookService/CreateExecution",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.notebooks.v1.NotebookService",
"CreateExecution",
),
);
self.inner.unary(req, path, codec).await
}
}
}