google_cloudevents/google/events/cloud/notebooks/v1/mod.rs
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
// 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,
}
/// 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>,
/// Optional. The labels to associate with this Managed Notebook or 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(map = "string, string", tag = "23")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// 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 {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Starting => "STARTING",
Self::Provisioning => "PROVISIONING",
Self::Active => "ACTIVE",
Self::Stopping => "STOPPING",
Self::Stopped => "STOPPED",
Self::Deleting => "DELETING",
Self::Upgrading => "UPGRADING",
Self::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 {
Self::Unspecified => "HEALTH_STATE_UNSPECIFIED",
Self::Healthy => "HEALTHY",
Self::Unhealthy => "UNHEALTHY",
Self::AgentNotInstalled => "AGENT_NOT_INSTALLED",
Self::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 - 40GB.
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 {
Self::Unspecified => "ACCELERATOR_TYPE_UNSPECIFIED",
Self::NvidiaTeslaK80 => "NVIDIA_TESLA_K80",
Self::NvidiaTeslaP100 => "NVIDIA_TESLA_P100",
Self::NvidiaTeslaV100 => "NVIDIA_TESLA_V100",
Self::NvidiaTeslaP4 => "NVIDIA_TESLA_P4",
Self::NvidiaTeslaT4 => "NVIDIA_TESLA_T4",
Self::NvidiaTeslaA100 => "NVIDIA_TESLA_A100",
Self::TpuV2 => "TPU_V2",
Self::TpuV3 => "TPU_V3",
Self::NvidiaTeslaT4Vws => "NVIDIA_TESLA_T4_VWS",
Self::NvidiaTeslaP100Vws => "NVIDIA_TESLA_P100_VWS",
Self::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,
/// 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,
/// 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(map = "string, string", tag = "5")]
pub labels: ::std::collections::HashMap<
::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 {
Self::Unspecified => "DISK_TYPE_UNSPECIFIED",
Self::PdStandard => "PD_STANDARD",
Self::PdSsd => "PD_SSD",
Self::PdBalanced => "PD_BALANCED",
Self::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 {
Self::Unspecified => "RUNTIME_ACCESS_TYPE_UNSPECIFIED",
Self::SingleUser => "SINGLE_USER",
Self::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>,
/// Bool indicating whether mixer client should be disabled.
/// Default: False
#[prost(bool, optional, tag = "13")]
pub mixer_disabled: ::core::option::Option<bool>,
}
/// 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 {
Self::Unspecified => "POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED",
Self::RunEveryStart => "RUN_EVERY_START",
Self::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(map = "string, string", tag = "1")]
pub system_metrics: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// A set of Shielded Instance options.
/// See [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(map = "string, string", tag = "14")]
pub guest_attributes: ::std::collections::HashMap<
::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(map = "string, string", tag = "15")]
pub metadata: ::std::collections::HashMap<
::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(map = "string, string", tag = "16")]
pub labels: ::std::collections::HashMap<
::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 {
Self::UnspecifiedNicType => "UNSPECIFIED_NIC_TYPE",
Self::VirtioNet => "VIRTIO_NET",
Self::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,
}
}
}
}
/// 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.
#[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(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::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. See [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(map = "string, string", tag = "2")]
pub env: ::std::collections::HashMap<
::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 {
Self::Unspecified => "SCALE_TIER_UNSPECIFIED",
Self::Basic => "BASIC",
Self::Standard1 => "STANDARD_1",
Self::Premium1 => "PREMIUM_1",
Self::BasicGpu => "BASIC_GPU",
Self::BasicTpu => "BASIC_TPU",
Self::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 {
Self::Unspecified => "SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED",
Self::NvidiaTeslaK80 => "NVIDIA_TESLA_K80",
Self::NvidiaTeslaP100 => "NVIDIA_TESLA_P100",
Self::NvidiaTeslaV100 => "NVIDIA_TESLA_V100",
Self::NvidiaTeslaP4 => "NVIDIA_TESLA_P4",
Self::NvidiaTeslaT4 => "NVIDIA_TESLA_T4",
Self::NvidiaTeslaA100 => "NVIDIA_TESLA_A100",
Self::TpuV2 => "TPU_V2",
Self::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 {
Self::Unspecified => "JOB_TYPE_UNSPECIFIED",
Self::VertexAi => "VERTEX_AI",
Self::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 {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Queued => "QUEUED",
Self::Preparing => "PREPARING",
Self::Running => "RUNNING",
Self::Succeeded => "SUCCEEDED",
Self::Failed => "FAILED",
Self::Cancelling => "CANCELLING",
Self::Cancelled => "CANCELLED",
Self::Expired => "EXPIRED",
Self::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,
}
}
}
}
/// 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 {
Self::Unspecified => "TYPE_UNSPECIFIED",
Self::NoReservation => "NO_RESERVATION",
Self::AnyReservation => "ANY_RESERVATION",
Self::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,
/// 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,
/// 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 external 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(map = "string, string", tag = "21")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Custom metadata to apply to this instance.
#[prost(map = "string, string", tag = "22")]
pub metadata: ::std::collections::HashMap<
::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. See [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.
/// See [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`.
#[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 {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Started => "STARTED",
Self::Succeeded => "SUCCEEDED",
Self::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 {
Self::Unspecified => "ACTION_UNSPECIFIED",
Self::Upgrade => "UPGRADE",
Self::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 {
Self::Unspecified => "ACCELERATOR_TYPE_UNSPECIFIED",
Self::NvidiaTeslaK80 => "NVIDIA_TESLA_K80",
Self::NvidiaTeslaP100 => "NVIDIA_TESLA_P100",
Self::NvidiaTeslaV100 => "NVIDIA_TESLA_V100",
Self::NvidiaTeslaP4 => "NVIDIA_TESLA_P4",
Self::NvidiaTeslaT4 => "NVIDIA_TESLA_T4",
Self::NvidiaTeslaA100 => "NVIDIA_TESLA_A100",
Self::NvidiaTeslaT4Vws => "NVIDIA_TESLA_T4_VWS",
Self::NvidiaTeslaP100Vws => "NVIDIA_TESLA_P100_VWS",
Self::NvidiaTeslaP4Vws => "NVIDIA_TESLA_P4_VWS",
Self::TpuV2 => "TPU_V2",
Self::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 {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Starting => "STARTING",
Self::Provisioning => "PROVISIONING",
Self::Active => "ACTIVE",
Self::Stopping => "STOPPING",
Self::Stopped => "STOPPED",
Self::Deleted => "DELETED",
Self::Upgrading => "UPGRADING",
Self::Initializing => "INITIALIZING",
Self::Registering => "REGISTERING",
Self::Suspending => "SUSPENDING",
Self::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 {
Self::Unspecified => "DISK_TYPE_UNSPECIFIED",
Self::PdStandard => "PD_STANDARD",
Self::PdSsd => "PD_SSD",
Self::PdBalanced => "PD_BALANCED",
Self::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 {
Self::Unspecified => "DISK_ENCRYPTION_UNSPECIFIED",
Self::Gmek => "GMEK",
Self::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 {
Self::UnspecifiedNicType => "UNSPECIFIED_NIC_TYPE",
Self::VirtioNet => "VIRTIO_NET",
Self::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 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 {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Enabled => "ENABLED",
Self::Paused => "PAUSED",
Self::Disabled => "DISABLED",
Self::UpdateFailed => "UPDATE_FAILED",
Self::Initializing => "INITIALIZING",
Self::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,
}
}
}
}
/// The data within all Runtime events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuntimeEventData {
/// Optional. The Runtime event payload. Unset for deletion events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<Runtime>,
}
/// The data within all Execution events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionEventData {
/// Optional. The Execution event payload. Unset for deletion events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<Execution>,
}
/// The data within all Instance events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstanceEventData {
/// Optional. The Instance event payload. Unset for deletion events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<Instance>,
}
/// The data within all Schedule events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScheduleEventData {
/// Optional. The Schedule event payload. Unset for deletion events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<Schedule>,
}
/// The data within all Environment events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnvironmentEventData {
/// Optional. The Environment event payload. Unset for deletion events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<Environment>,
}
/// The CloudEvent raised when a Runtime is created.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuntimeCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<RuntimeEventData>,
}
/// The CloudEvent raised when a Runtime is updated.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuntimeUpdatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<RuntimeEventData>,
}
/// The CloudEvent raised when a Runtime is deleted.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuntimeDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<RuntimeEventData>,
}
/// The CloudEvent raised when an Instance is created.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstanceCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<InstanceEventData>,
}
/// The CloudEvent raised when an Instance is deleted.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstanceDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<InstanceEventData>,
}
/// The CloudEvent raised when an Environment is created.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnvironmentCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<EnvironmentEventData>,
}
/// The CloudEvent raised when an Environment is deleted.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnvironmentDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<EnvironmentEventData>,
}
/// The CloudEvent raised when a Schedule is deleted.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScheduleDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<ScheduleEventData>,
}
/// The CloudEvent raised when a Schedule is created.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScheduleCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<ScheduleEventData>,
}
/// The CloudEvent raised when an Execution is deleted.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<ExecutionEventData>,
}
/// The CloudEvent raised when an Execution is created.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<ExecutionEventData>,
}