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
// This file is @generated by prost-build.
/// A Google Distributed Cloud Edge Kubernetes cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Cluster {
/// Required. The resource name of the cluster.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The time when the cluster was created.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time when the cluster was last updated.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Labels associated with this resource.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Required. Fleet configuration.
#[prost(message, optional, tag = "11")]
pub fleet: ::core::option::Option<Fleet>,
/// Required. Cluster-wide networking configuration.
#[prost(message, optional, tag = "7")]
pub networking: ::core::option::Option<ClusterNetworking>,
/// Required. Immutable. RBAC policy that will be applied and managed by GEC.
#[prost(message, optional, tag = "9")]
pub authorization: ::core::option::Option<Authorization>,
/// Optional. The default maximum number of pods per node used if a maximum
/// value is not specified explicitly for a node pool in this cluster. If
/// unspecified, the Kubernetes default value will be used.
#[prost(int32, tag = "8")]
pub default_max_pods_per_node: i32,
/// Output only. The IP address of the Kubernetes API server.
#[prost(string, tag = "6")]
pub endpoint: ::prost::alloc::string::String,
/// Output only. The port number of the Kubernetes API server.
#[prost(int32, tag = "19")]
pub port: i32,
/// Output only. The PEM-encoded public certificate of the cluster's CA.
#[prost(string, tag = "10")]
pub cluster_ca_certificate: ::prost::alloc::string::String,
/// Optional. Cluster-wide maintenance policy configuration.
#[prost(message, optional, tag = "12")]
pub maintenance_policy: ::core::option::Option<MaintenancePolicy>,
/// Output only. The control plane release version
#[prost(string, tag = "13")]
pub control_plane_version: ::prost::alloc::string::String,
/// Output only. The lowest release version among all worker nodes. This field
/// can be empty if the cluster does not have any worker nodes.
#[prost(string, tag = "14")]
pub node_version: ::prost::alloc::string::String,
/// Optional. The configuration of the cluster control plane.
#[prost(message, optional, tag = "15")]
pub control_plane: ::core::option::Option<cluster::ControlPlane>,
/// Optional. The configuration of the system add-ons.
#[prost(message, optional, tag = "16")]
pub system_addons_config: ::core::option::Option<cluster::SystemAddonsConfig>,
/// Optional. IPv4 address pools for cluster data plane external load
/// balancing.
#[prost(string, repeated, tag = "17")]
pub external_load_balancer_ipv4_address_pools: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
/// Optional. Remote control plane disk encryption options. This field is only
/// used when enabling CMEK support.
#[prost(message, optional, tag = "18")]
pub control_plane_encryption: ::core::option::Option<
cluster::ControlPlaneEncryption,
>,
/// Output only. The current status of the cluster.
#[prost(enumeration = "cluster::Status", tag = "20")]
pub status: i32,
/// Output only. All the maintenance events scheduled for the cluster,
/// including the ones ongoing, planned for the future and done in the past (up
/// to 90 days).
#[prost(message, repeated, tag = "21")]
pub maintenance_events: ::prost::alloc::vec::Vec<cluster::MaintenanceEvent>,
/// Optional. The target cluster version. For example: "1.5.0".
#[prost(string, tag = "22")]
pub target_version: ::prost::alloc::string::String,
/// Optional. The release channel a cluster is subscribed to.
#[prost(enumeration = "cluster::ReleaseChannel", tag = "23")]
pub release_channel: i32,
/// Optional. Configuration of the cluster survivability, e.g., for the case
/// when network connectivity is lost. Note: This only applies to local control
/// plane clusters.
#[prost(message, optional, tag = "24")]
pub survivability_config: ::core::option::Option<cluster::SurvivabilityConfig>,
/// Optional. IPv6 address pools for cluster data plane external load
/// balancing.
#[prost(string, repeated, tag = "25")]
pub external_load_balancer_ipv6_address_pools: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
/// Nested message and enum types in `Cluster`.
pub mod cluster {
/// Configuration of the cluster control plane.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ControlPlane {
#[prost(oneof = "control_plane::Config", tags = "1, 2")]
pub config: ::core::option::Option<control_plane::Config>,
}
/// Nested message and enum types in `ControlPlane`.
pub mod control_plane {
/// Configuration specific to clusters with a control plane hosted remotely.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Remote {}
/// Configuration specific to clusters with a control plane hosted locally.
///
/// Warning: Local control plane clusters must be created in their own
/// project. Local control plane clusters cannot coexist in the same
/// project with any other type of clusters, including non-GDCE clusters.
/// Mixing local control plane GDCE clusters with any other type of
/// clusters in the same project can result in data loss.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Local {
/// Name of the Google Distributed Cloud Edge zones where this node pool
/// will be created. For example: `us-central1-edge-customer-a`.
#[prost(string, tag = "1")]
pub node_location: ::prost::alloc::string::String,
/// The number of nodes to serve as replicas of the Control Plane.
#[prost(int32, tag = "2")]
pub node_count: i32,
/// Only machines matching this filter will be allowed to host control
/// plane nodes. The filtering language accepts strings like "name=<name>",
/// and is documented here: [AIP-160](<https://google.aip.dev/160>).
#[prost(string, tag = "3")]
pub machine_filter: ::prost::alloc::string::String,
/// Policy configuration about how user applications are deployed.
#[prost(enumeration = "SharedDeploymentPolicy", tag = "4")]
pub shared_deployment_policy: i32,
}
/// Represents the policy configuration about how user applications are
/// deployed.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SharedDeploymentPolicy {
/// Unspecified.
Unspecified = 0,
/// User applications can be deployed both on control plane and worker
/// nodes.
Allowed = 1,
/// User applications can not be deployed on control plane nodes and can
/// only be deployed on worker nodes.
Disallowed = 2,
}
impl SharedDeploymentPolicy {
/// 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 {
SharedDeploymentPolicy::Unspecified => {
"SHARED_DEPLOYMENT_POLICY_UNSPECIFIED"
}
SharedDeploymentPolicy::Allowed => "ALLOWED",
SharedDeploymentPolicy::Disallowed => "DISALLOWED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SHARED_DEPLOYMENT_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
"ALLOWED" => Some(Self::Allowed),
"DISALLOWED" => Some(Self::Disallowed),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Config {
/// Remote control plane configuration.
#[prost(message, tag = "1")]
Remote(Remote),
/// Local control plane configuration.
///
/// Warning: Local control plane clusters must be created in their own
/// project. Local control plane clusters cannot coexist in the same
/// project with any other type of clusters, including non-GDCE clusters.
/// Mixing local control plane GDCE clusters with any other type of
/// clusters in the same project can result in data loss.
#[prost(message, tag = "2")]
Local(Local),
}
}
/// Config that customers are allowed to define for GDCE system add-ons.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SystemAddonsConfig {
/// Optional. Config for Ingress.
#[prost(message, optional, tag = "1")]
pub ingress: ::core::option::Option<system_addons_config::Ingress>,
}
/// Nested message and enum types in `SystemAddonsConfig`.
pub mod system_addons_config {
/// Config for the Ingress add-on which allows customers to create an Ingress
/// object to manage external access to the servers in a cluster. The add-on
/// consists of istiod and istio-ingress.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Ingress {
/// Optional. Whether Ingress is disabled.
#[prost(bool, tag = "1")]
pub disabled: bool,
/// Optional. Ingress VIP.
#[prost(string, tag = "2")]
pub ipv4_vip: ::prost::alloc::string::String,
}
}
/// Configuration for Customer-managed KMS key support for remote control plane
/// cluster disk encryption.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ControlPlaneEncryption {
/// Immutable. The Cloud KMS CryptoKey e.g.
/// projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
/// to use for protecting control plane disks. If not specified, a
/// Google-managed key will be used instead.
#[prost(string, tag = "1")]
pub kms_key: ::prost::alloc::string::String,
/// Output only. The Cloud KMS CryptoKeyVersion currently in use for
/// protecting control plane disks. Only applicable if kms_key is set.
#[prost(string, tag = "2")]
pub kms_key_active_version: ::prost::alloc::string::String,
/// Output only. Availability of the Cloud KMS CryptoKey. If not
/// `KEY_AVAILABLE`, then nodes may go offline as they cannot access their
/// local data. This can be caused by a lack of permissions to use the key,
/// or if the key is disabled or deleted.
#[prost(enumeration = "super::KmsKeyState", tag = "3")]
pub kms_key_state: i32,
/// Output only. Error status returned by Cloud KMS when using this key. This
/// field may be populated only if `kms_key_state` is not
/// `KMS_KEY_STATE_KEY_AVAILABLE`. If populated, this field contains the
/// error status reported by Cloud KMS.
#[prost(message, optional, tag = "4")]
pub kms_status: ::core::option::Option<super::super::super::super::rpc::Status>,
}
/// A Maintenance Event is an operation that could cause temporary disruptions
/// to the cluster workloads, including Google-driven or user-initiated cluster
/// upgrades, user-initiated cluster configuration changes that require
/// restarting nodes, etc.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenanceEvent {
/// Output only. UUID of the maintenance event.
#[prost(string, tag = "1")]
pub uuid: ::prost::alloc::string::String,
/// Output only. The target version of the cluster.
#[prost(string, tag = "2")]
pub target_version: ::prost::alloc::string::String,
/// Output only. The operation for running the maintenance event. Specified
/// in the format projects/*/locations/*/operations/*. If the maintenance
/// event is split into multiple operations (e.g. due to maintenance
/// windows), the latest one is recorded.
#[prost(string, tag = "3")]
pub operation: ::prost::alloc::string::String,
/// Output only. The type of the maintenance event.
#[prost(enumeration = "maintenance_event::Type", tag = "4")]
pub r#type: i32,
/// Output only. The schedule of the maintenance event.
#[prost(enumeration = "maintenance_event::Schedule", tag = "5")]
pub schedule: i32,
/// Output only. The state of the maintenance event.
#[prost(enumeration = "maintenance_event::State", tag = "6")]
pub state: i32,
/// Output only. The time when the maintenance event request was created.
#[prost(message, optional, tag = "7")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time when the maintenance event started.
#[prost(message, optional, tag = "8")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time when the maintenance event ended, either
/// successfully or not. If the maintenance event is split into multiple
/// maintenance windows, end_time is only updated when the whole flow ends.
#[prost(message, optional, tag = "9")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time when the maintenance event message was updated.
#[prost(message, optional, tag = "10")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `MaintenanceEvent`.
pub mod maintenance_event {
/// Indicates the maintenance event type.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// Unspecified.
Unspecified = 0,
/// Upgrade initiated by users.
UserInitiatedUpgrade = 1,
/// Upgrade driven by Google.
GoogleDrivenUpgrade = 2,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::UserInitiatedUpgrade => "USER_INITIATED_UPGRADE",
Type::GoogleDrivenUpgrade => "GOOGLE_DRIVEN_UPGRADE",
}
}
/// 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),
"USER_INITIATED_UPGRADE" => Some(Self::UserInitiatedUpgrade),
"GOOGLE_DRIVEN_UPGRADE" => Some(Self::GoogleDrivenUpgrade),
_ => None,
}
}
}
/// Indicates when the maintenance event should be performed.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Schedule {
/// Unspecified.
Unspecified = 0,
/// Immediately after receiving the request.
Immediately = 1,
}
impl Schedule {
/// 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 {
Schedule::Unspecified => "SCHEDULE_UNSPECIFIED",
Schedule::Immediately => "IMMEDIATELY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SCHEDULE_UNSPECIFIED" => Some(Self::Unspecified),
"IMMEDIATELY" => Some(Self::Immediately),
_ => None,
}
}
}
/// Indicates the maintenance event state.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// Unspecified.
Unspecified = 0,
/// The maintenance event is ongoing. The cluster might be unusable.
Reconciling = 1,
/// The maintenance event succeeded.
Succeeded = 2,
/// The maintenance event failed.
Failed = 3,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Reconciling => "RECONCILING",
State::Succeeded => "SUCCEEDED",
State::Failed => "FAILED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"RECONCILING" => Some(Self::Reconciling),
"SUCCEEDED" => Some(Self::Succeeded),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
}
/// Configuration of the cluster survivability, e.g., for the case when network
/// connectivity is lost.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SurvivabilityConfig {
/// Optional. Time period that allows the cluster nodes to be rebooted and
/// become functional without network connectivity to Google. The default 0
/// means not allowed. The maximum is 7 days.
#[prost(message, optional, tag = "1")]
pub offline_reboot_ttl: ::core::option::Option<::prost_types::Duration>,
}
/// Indicates the status of the cluster.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
/// Status unknown.
Unspecified = 0,
/// The cluster is being created.
Provisioning = 1,
/// The cluster is created and fully usable.
Running = 2,
/// The cluster is being deleted.
Deleting = 3,
/// The status indicates that some errors occurred while reconciling/deleting
/// the cluster.
Error = 4,
/// The cluster is undergoing some work such as version upgrades, etc.
Reconciling = 5,
}
impl Status {
/// 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 {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::Provisioning => "PROVISIONING",
Status::Running => "RUNNING",
Status::Deleting => "DELETING",
Status::Error => "ERROR",
Status::Reconciling => "RECONCILING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"PROVISIONING" => Some(Self::Provisioning),
"RUNNING" => Some(Self::Running),
"DELETING" => Some(Self::Deleting),
"ERROR" => Some(Self::Error),
"RECONCILING" => Some(Self::Reconciling),
_ => None,
}
}
}
/// The release channel a cluster is subscribed to.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ReleaseChannel {
/// Unspecified release channel. This will default to the REGULAR channel.
Unspecified = 0,
/// No release channel.
None = 1,
/// Regular release channel.
Regular = 2,
}
impl ReleaseChannel {
/// 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 {
ReleaseChannel::Unspecified => "RELEASE_CHANNEL_UNSPECIFIED",
ReleaseChannel::None => "NONE",
ReleaseChannel::Regular => "REGULAR",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RELEASE_CHANNEL_UNSPECIFIED" => Some(Self::Unspecified),
"NONE" => Some(Self::None),
"REGULAR" => Some(Self::Regular),
_ => None,
}
}
}
}
/// Cluster-wide networking configuration.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterNetworking {
/// Required. All pods in the cluster are assigned an RFC1918 IPv4 address from
/// these blocks. Only a single block is supported. This field cannot be
/// changed after creation.
#[prost(string, repeated, tag = "1")]
pub cluster_ipv4_cidr_blocks: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
/// Required. All services in the cluster are assigned an RFC1918 IPv4 address
/// from these blocks. Only a single block is supported. This field cannot be
/// changed after creation.
#[prost(string, repeated, tag = "2")]
pub services_ipv4_cidr_blocks: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
/// Fleet related configuration.
///
/// Fleets are a Google Cloud concept for logically organizing clusters,
/// letting you use and manage multi-cluster capabilities and apply
/// consistent policies across your systems.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Fleet {
/// Required. The name of the Fleet host project where this cluster will be
/// registered.
///
/// Project names are formatted as
/// `projects/<project-number>`.
#[prost(string, tag = "1")]
pub project: ::prost::alloc::string::String,
/// Output only. The name of the managed Hub Membership resource associated to
/// this cluster.
///
/// Membership names are formatted as
/// `projects/<project-number>/locations/global/membership/<cluster-id>`.
#[prost(string, tag = "2")]
pub membership: ::prost::alloc::string::String,
}
/// A user principal for an RBAC policy.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterUser {
/// Required. An active Google username.
#[prost(string, tag = "1")]
pub username: ::prost::alloc::string::String,
}
/// RBAC policy that will be applied and managed by GEC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Authorization {
/// Required. User that will be granted the cluster-admin role on the cluster,
/// providing full access to the cluster. Currently, this is a singular field,
/// but will be expanded to allow multiple admins in the future.
#[prost(message, optional, tag = "1")]
pub admin_users: ::core::option::Option<ClusterUser>,
}
/// A set of Kubernetes nodes in a cluster with common configuration and
/// specification.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodePool {
/// Required. The resource name of the node pool.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The time when the node pool was created.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time when the node pool was last updated.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Labels associated with this resource.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Name of the Google Distributed Cloud Edge zone where this node pool will be
/// created. For example: `us-central1-edge-customer-a`.
#[prost(string, tag = "8")]
pub node_location: ::prost::alloc::string::String,
/// Required. The number of nodes in the pool.
#[prost(int32, tag = "6")]
pub node_count: i32,
/// Only machines matching this filter will be allowed to join the node pool.
/// The filtering language accepts strings like "name=<name>", and is
/// documented in more detail in [AIP-160](<https://google.aip.dev/160>).
#[prost(string, tag = "7")]
pub machine_filter: ::prost::alloc::string::String,
/// Optional. Local disk encryption options. This field is only used when
/// enabling CMEK support.
#[prost(message, optional, tag = "9")]
pub local_disk_encryption: ::core::option::Option<node_pool::LocalDiskEncryption>,
/// Output only. The lowest release version among all worker nodes.
#[prost(string, tag = "10")]
pub node_version: ::prost::alloc::string::String,
/// Optional. Configuration for each node in the NodePool
#[prost(message, optional, tag = "11")]
pub node_config: ::core::option::Option<node_pool::NodeConfig>,
}
/// Nested message and enum types in `NodePool`.
pub mod node_pool {
/// Configuration for CMEK support for edge machine local disk encryption.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocalDiskEncryption {
/// Immutable. The Cloud KMS CryptoKey e.g.
/// projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
/// to use for protecting node local disks. If not specified, a
/// Google-managed key will be used instead.
#[prost(string, tag = "1")]
pub kms_key: ::prost::alloc::string::String,
/// Output only. The Cloud KMS CryptoKeyVersion currently in use for
/// protecting node local disks. Only applicable if kms_key is set.
#[prost(string, tag = "2")]
pub kms_key_active_version: ::prost::alloc::string::String,
/// Output only. Availability of the Cloud KMS CryptoKey. If not
/// `KEY_AVAILABLE`, then nodes may go offline as they cannot access their
/// local data. This can be caused by a lack of permissions to use the key,
/// or if the key is disabled or deleted.
#[prost(enumeration = "super::KmsKeyState", tag = "3")]
pub kms_key_state: i32,
/// Output only. Error status returned by Cloud KMS when using this key. This
/// field may be populated only if `kms_key_state` is not
/// `KMS_KEY_STATE_KEY_AVAILABLE`. If populated, this field contains the
/// error status reported by Cloud KMS.
#[prost(message, optional, tag = "4")]
pub kms_status: ::core::option::Option<super::super::super::super::rpc::Status>,
}
/// Configuration for each node in the NodePool
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeConfig {
/// Optional. The Kubernetes node labels
#[prost(btree_map = "string, string", tag = "1")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
}
/// A Google Distributed Cloud Edge machine capable of acting as a Kubernetes
/// node.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Machine {
/// Required. The resource name of the machine.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The time when the node pool was created.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time when the node pool was last updated.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Labels associated with this resource.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Canonical resource name of the node that this machine is responsible for
/// hosting e.g.
/// projects/{project}/locations/{location}/clusters/{cluster_id}/nodePools/{pool_id}/{node},
/// Or empty if the machine is not assigned to assume the role of a node.
///
/// For control plane nodes hosted on edge machines, this will return
/// the following format:
/// "projects/{project}/locations/{location}/clusters/{cluster_id}/controlPlaneNodes/{node}".
#[prost(string, tag = "5")]
pub hosted_node: ::prost::alloc::string::String,
/// The Google Distributed Cloud Edge zone of this machine.
#[prost(string, tag = "6")]
pub zone: ::prost::alloc::string::String,
/// Output only. The software version of the machine.
#[prost(string, tag = "7")]
pub version: ::prost::alloc::string::String,
/// Output only. Whether the machine is disabled. If disabled, the machine is
/// unable to enter service.
#[prost(bool, tag = "8")]
pub disabled: bool,
}
/// A VPN connection .
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VpnConnection {
/// Required. The resource name of VPN connection
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The time when the VPN connection was created.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time when the VPN connection was last updated.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Labels associated with this resource.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the
/// customer needs to configure NAT such that only one external IP maps to the
/// GMEC Anthos cluster. This is empty if NAT is not used.
#[prost(string, tag = "5")]
pub nat_gateway_ip: ::prost::alloc::string::String,
/// Dynamic routing mode of the VPC network, `regional` or `global`.
#[deprecated]
#[prost(enumeration = "vpn_connection::BgpRoutingMode", tag = "6")]
pub bgp_routing_mode: i32,
/// The canonical Cluster name to connect to. It is in the form of
/// projects/{project}/locations/{location}/clusters/{cluster}.
#[prost(string, tag = "7")]
pub cluster: ::prost::alloc::string::String,
/// The network ID of VPC to connect to.
#[prost(string, tag = "8")]
pub vpc: ::prost::alloc::string::String,
/// Optional. Project detail of the VPC network. Required if VPC is in a
/// different project than the cluster project.
#[prost(message, optional, tag = "11")]
pub vpc_project: ::core::option::Option<vpn_connection::VpcProject>,
/// Whether this VPN connection has HA enabled on cluster side. If enabled,
/// when creating VPN connection we will attempt to use 2 ANG floating IPs.
#[prost(bool, tag = "9")]
pub enable_high_availability: bool,
/// Optional. The VPN connection Cloud Router name.
#[prost(string, tag = "12")]
pub router: ::prost::alloc::string::String,
/// Output only. The created connection details.
#[prost(message, optional, tag = "10")]
pub details: ::core::option::Option<vpn_connection::Details>,
}
/// Nested message and enum types in `VpnConnection`.
pub mod vpn_connection {
/// Project detail of the VPC network.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VpcProject {
/// The project of the VPC to connect to. If not specified, it is the same as
/// the cluster project.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Optional. The service account in the VPC project configured by user. It
/// is used to create/delete Cloud Router and Cloud HA VPNs for VPN
/// connection. If this SA is changed during/after a VPN connection is
/// created, you need to remove the Cloud Router and Cloud VPN resources in
/// |project_id|. It is in the form of
/// service-{project_number}@gcp-sa-edgecontainer.iam.gserviceaccount.com.
#[deprecated]
#[prost(string, tag = "2")]
pub service_account: ::prost::alloc::string::String,
}
/// The created connection details.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Details {
/// The state of this connection.
#[prost(enumeration = "details::State", tag = "1")]
pub state: i32,
/// The error message. This is only populated when state=ERROR.
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
/// The Cloud Router info.
#[prost(message, optional, tag = "3")]
pub cloud_router: ::core::option::Option<details::CloudRouter>,
/// Each connection has multiple Cloud VPN gateways.
#[prost(message, repeated, tag = "4")]
pub cloud_vpns: ::prost::alloc::vec::Vec<details::CloudVpn>,
}
/// Nested message and enum types in `Details`.
pub mod details {
/// The Cloud Router info.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudRouter {
/// The associated Cloud Router name.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// The Cloud VPN info.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudVpn {
/// The created Cloud VPN gateway name.
#[prost(string, tag = "1")]
pub gateway: ::prost::alloc::string::String,
}
/// The current connection state.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// Unknown.
Unspecified = 0,
/// Connected.
Connected = 1,
/// Still connecting.
Connecting = 2,
/// Error occurred.
Error = 3,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Connected => "STATE_CONNECTED",
State::Connecting => "STATE_CONNECTING",
State::Error => "STATE_ERROR",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"STATE_CONNECTED" => Some(Self::Connected),
"STATE_CONNECTING" => Some(Self::Connecting),
"STATE_ERROR" => Some(Self::Error),
_ => None,
}
}
}
}
/// Routing mode.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum BgpRoutingMode {
/// Unknown.
Unspecified = 0,
/// Regional mode.
Regional = 1,
/// Global mode.
Global = 2,
}
impl BgpRoutingMode {
/// 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 {
BgpRoutingMode::Unspecified => "BGP_ROUTING_MODE_UNSPECIFIED",
BgpRoutingMode::Regional => "REGIONAL",
BgpRoutingMode::Global => "GLOBAL",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BGP_ROUTING_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"REGIONAL" => Some(Self::Regional),
"GLOBAL" => Some(Self::Global),
_ => None,
}
}
}
}
/// Metadata for a given
/// [google.cloud.location.Location][google.cloud.location.Location].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocationMetadata {
/// The set of available Google Distributed Cloud Edge zones in the location.
/// The map is keyed by the lowercase ID of each zone.
#[prost(btree_map = "string, message", tag = "1")]
pub available_zones: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
ZoneMetadata,
>,
}
/// A Google Distributed Cloud Edge zone where edge machines are located.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ZoneMetadata {
/// Quota for resources in this zone.
#[prost(message, repeated, tag = "1")]
pub quota: ::prost::alloc::vec::Vec<Quota>,
/// The map keyed by rack name and has value of RackType.
#[prost(btree_map = "string, enumeration(zone_metadata::RackType)", tag = "2")]
pub rack_types: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
i32,
>,
}
/// Nested message and enum types in `ZoneMetadata`.
pub mod zone_metadata {
/// Type of the rack.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RackType {
/// Unspecified rack type, single rack also belongs to this type.
Unspecified = 0,
/// Base rack type, a pair of two modified Config-1 racks containing
/// Aggregation switches.
Base = 1,
/// Expansion rack type, also known as standalone racks,
/// added by customers on demand.
Expansion = 2,
}
impl RackType {
/// 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 {
RackType::Unspecified => "RACK_TYPE_UNSPECIFIED",
RackType::Base => "BASE",
RackType::Expansion => "EXPANSION",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RACK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"BASE" => Some(Self::Base),
"EXPANSION" => Some(Self::Expansion),
_ => None,
}
}
}
}
/// Represents quota for Edge Container resources.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Quota {
/// Name of the quota metric.
#[prost(string, tag = "1")]
pub metric: ::prost::alloc::string::String,
/// Quota limit for this metric.
#[prost(double, tag = "2")]
pub limit: f64,
/// Current usage of this metric.
#[prost(double, tag = "3")]
pub usage: f64,
}
/// Maintenance policy configuration.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenancePolicy {
/// Specifies the maintenance window in which maintenance may be performed.
#[prost(message, optional, tag = "1")]
pub window: ::core::option::Option<MaintenanceWindow>,
}
/// Maintenance window configuration
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenanceWindow {
/// Configuration of a recurring maintenance window.
#[prost(message, optional, tag = "1")]
pub recurring_window: ::core::option::Option<RecurringTimeWindow>,
}
/// Represents an arbitrary window of time that recurs.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecurringTimeWindow {
/// The window of the first recurrence.
#[prost(message, optional, tag = "1")]
pub window: ::core::option::Option<TimeWindow>,
/// An RRULE (<https://tools.ietf.org/html/rfc5545#section-3.8.5.3>) for how
/// this window recurs. They go on for the span of time between the start and
/// end time.
#[prost(string, tag = "2")]
pub recurrence: ::prost::alloc::string::String,
}
/// Represents an arbitrary window of time.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeWindow {
/// The time that the window first starts.
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// The time that the window ends. The end time must take place after the
/// start time.
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Server configuration for supported versions and release channels.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerConfig {
/// Output only. Mapping from release channel to channel config.
#[prost(btree_map = "string, message", tag = "1")]
pub channels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
ChannelConfig,
>,
/// Output only. Supported versions, e.g.: \["1.4.0", "1.5.0"\].
#[prost(message, repeated, tag = "2")]
pub versions: ::prost::alloc::vec::Vec<Version>,
/// Output only. Default version, e.g.: "1.4.0".
#[prost(string, tag = "3")]
pub default_version: ::prost::alloc::string::String,
}
/// Configuration for a release channel.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelConfig {
/// Output only. Default version for this release channel, e.g.: "1.4.0".
#[prost(string, tag = "1")]
pub default_version: ::prost::alloc::string::String,
}
/// Version of a cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Version {
/// Output only. Name of the version, e.g.: "1.4.0".
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Represents the accessibility state of a customer-managed KMS key used for
/// CMEK integration.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum KmsKeyState {
/// Unspecified.
Unspecified = 0,
/// The key is available for use, and dependent resources should be accessible.
KeyAvailable = 1,
/// The key is unavailable for an unspecified reason. Dependent resources may
/// be inaccessible.
KeyUnavailable = 2,
}
impl KmsKeyState {
/// 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 {
KmsKeyState::Unspecified => "KMS_KEY_STATE_UNSPECIFIED",
KmsKeyState::KeyAvailable => "KMS_KEY_STATE_KEY_AVAILABLE",
KmsKeyState::KeyUnavailable => "KMS_KEY_STATE_KEY_UNAVAILABLE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"KMS_KEY_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"KMS_KEY_STATE_KEY_AVAILABLE" => Some(Self::KeyAvailable),
"KMS_KEY_STATE_KEY_UNAVAILABLE" => Some(Self::KeyUnavailable),
_ => None,
}
}
}
/// Long-running operation metadata for Edge Container API methods.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
/// The time the operation was created.
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// The time the operation finished running.
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// Server-defined resource path for the target of the operation.
#[prost(string, tag = "3")]
pub target: ::prost::alloc::string::String,
/// The verb executed by the operation.
#[prost(string, tag = "4")]
pub verb: ::prost::alloc::string::String,
/// Human-readable status of the operation, if any.
#[prost(string, tag = "5")]
pub status_message: ::prost::alloc::string::String,
/// Identifies whether the user has requested cancellation of the operation.
/// Operations that have successfully been cancelled have [Operation.error][]
/// value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
/// corresponding to `Code.CANCELLED`.
#[prost(bool, tag = "6")]
pub requested_cancellation: bool,
/// API version used to start the operation.
#[prost(string, tag = "7")]
pub api_version: ::prost::alloc::string::String,
/// Warnings that do not block the operation, but still hold relevant
/// information for the end user to receive.
#[prost(string, repeated, tag = "8")]
pub warnings: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Lists clusters in a location.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClustersRequest {
/// Required. The parent location, which owns this collection of clusters.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// The maximum number of resources to list.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token received from previous list request.
/// A page token received from previous list request.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Only resources matching this filter will be listed.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Specifies the order in which resources will be listed.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// List of clusters in a location.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClustersResponse {
/// Clusters in the location.
#[prost(message, repeated, tag = "1")]
pub clusters: ::prost::alloc::vec::Vec<Cluster>,
/// A token to retrieve next page of results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Gets a cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetClusterRequest {
/// Required. The resource name of the cluster.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Creates a cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterRequest {
/// Required. The parent location where this cluster will be created.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. A client-specified unique identifier for the cluster.
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
/// Required. The cluster to create.
#[prost(message, optional, tag = "3")]
pub cluster: ::core::option::Option<Cluster>,
/// A unique identifier for this request. Restricted to 36 ASCII characters. A
/// random UUID is recommended. This request is only idempotent if
/// `request_id` is provided.
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
/// Updates a cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterRequest {
/// Field mask is used to specify the fields to be overwritten in the
/// Cluster resource by the update.
/// The fields specified in the update_mask are relative to the resource, not
/// the full request. A field will be overwritten if it is in the mask. If the
/// user does not provide a mask then all fields will be overwritten.
#[prost(message, optional, tag = "1")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// The updated cluster.
#[prost(message, optional, tag = "2")]
pub cluster: ::core::option::Option<Cluster>,
/// A unique identifier for this request. Restricted to 36 ASCII characters.
/// A random UUID is recommended.
/// This request is only idempotent if `request_id` is provided.
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
/// Upgrades a cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpgradeClusterRequest {
/// Required. The resource name of the cluster.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. The version the cluster is going to be upgraded to.
#[prost(string, tag = "2")]
pub target_version: ::prost::alloc::string::String,
/// The schedule for the upgrade.
#[prost(enumeration = "upgrade_cluster_request::Schedule", tag = "3")]
pub schedule: i32,
/// A unique identifier for this request. Restricted to 36 ASCII characters. A
/// random UUID is recommended. This request is only idempotent if
/// `request_id` is provided.
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
/// Nested message and enum types in `UpgradeClusterRequest`.
pub mod upgrade_cluster_request {
/// Represents the schedule about when the cluster is going to be upgraded.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Schedule {
/// Unspecified. The default is to upgrade the cluster immediately which is
/// the only option today.
Unspecified = 0,
/// The cluster is going to be upgraded immediately after receiving the
/// request.
Immediately = 1,
}
impl Schedule {
/// 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 {
Schedule::Unspecified => "SCHEDULE_UNSPECIFIED",
Schedule::Immediately => "IMMEDIATELY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SCHEDULE_UNSPECIFIED" => Some(Self::Unspecified),
"IMMEDIATELY" => Some(Self::Immediately),
_ => None,
}
}
}
}
/// Deletes a cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterRequest {
/// Required. The resource name of the cluster.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// A unique identifier for this request. Restricted to 36 ASCII characters. A
/// random UUID is recommended. This request is only idempotent if
/// `request_id` is provided.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Generates an access token for a cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateAccessTokenRequest {
/// Required. The resource name of the cluster.
#[prost(string, tag = "1")]
pub cluster: ::prost::alloc::string::String,
}
/// An access token for a cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateAccessTokenResponse {
/// Output only. Access token to authenticate to k8s api-server.
#[prost(string, tag = "1")]
pub access_token: ::prost::alloc::string::String,
/// Output only. Timestamp at which the token will expire.
#[prost(message, optional, tag = "2")]
pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Generates an offline credential(offline) for a cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateOfflineCredentialRequest {
/// Required. The resource name of the cluster.
#[prost(string, tag = "1")]
pub cluster: ::prost::alloc::string::String,
}
/// An offline credential for a cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateOfflineCredentialResponse {
/// Output only. Client certificate to authenticate to k8s api-server.
#[prost(string, tag = "1")]
pub client_certificate: ::prost::alloc::string::String,
/// Output only. Client private key to authenticate to k8s api-server.
#[prost(string, tag = "2")]
pub client_key: ::prost::alloc::string::String,
/// Output only. Client's identity.
#[prost(string, tag = "3")]
pub user_id: ::prost::alloc::string::String,
/// Output only. Timestamp at which this credential will expire.
#[prost(message, optional, tag = "4")]
pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Lists node pools in a cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNodePoolsRequest {
/// Required. The parent cluster, which owns this collection of node pools.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// The maximum number of resources to list.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token received from previous list request.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Only resources matching this filter will be listed.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Specifies the order in which resources will be listed.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// List of node pools in a cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNodePoolsResponse {
/// Node pools in the cluster.
#[prost(message, repeated, tag = "1")]
pub node_pools: ::prost::alloc::vec::Vec<NodePool>,
/// A token to retrieve next page of results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Gets a node pool.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNodePoolRequest {
/// Required. The resource name of the node pool.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Creates a node pool.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateNodePoolRequest {
/// Required. The parent cluster where this node pool will be created.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. A client-specified unique identifier for the node pool.
#[prost(string, tag = "2")]
pub node_pool_id: ::prost::alloc::string::String,
/// Required. The node pool to create.
#[prost(message, optional, tag = "3")]
pub node_pool: ::core::option::Option<NodePool>,
/// A unique identifier for this request. Restricted to 36 ASCII characters. A
/// random UUID is recommended. This request is only idempotent if
/// `request_id` is provided.
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
/// Updates a node pool.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateNodePoolRequest {
/// Field mask is used to specify the fields to be overwritten in the
/// NodePool resource by the update.
/// The fields specified in the update_mask are relative to the resource, not
/// the full request. A field will be overwritten if it is in the mask. If the
/// user does not provide a mask then all fields will be overwritten.
#[prost(message, optional, tag = "1")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// The updated node pool.
#[prost(message, optional, tag = "2")]
pub node_pool: ::core::option::Option<NodePool>,
/// A unique identifier for this request. Restricted to 36 ASCII characters. A
/// random UUID is recommended. This request is only idempotent if
/// `request_id` is provided.
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
/// Deletes a node pool.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteNodePoolRequest {
/// Required. The resource name of the node pool.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// A unique identifier for this request. Restricted to 36 ASCII characters. A
/// random UUID is recommended. This request is only idempotent if
/// `request_id` is provided.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Lists machines in a site.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMachinesRequest {
/// Required. The parent site, which owns this collection of machines.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// The maximum number of resources to list.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token received from previous list request.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Only resources matching this filter will be listed.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Specifies the order in which resources will be listed.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// List of machines in a site.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMachinesResponse {
/// Machines in the site.
#[prost(message, repeated, tag = "1")]
pub machines: ::prost::alloc::vec::Vec<Machine>,
/// A token to retrieve next page of results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Gets a machine.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMachineRequest {
/// Required. The resource name of the machine.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Lists VPN connections.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVpnConnectionsRequest {
/// Required. The parent location, which owns this collection of VPN
/// connections.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// The maximum number of resources to list.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token received from previous list request.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Only resources matching this filter will be listed.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Specifies the order in which resources will be listed.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// List of VPN connections in a location.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVpnConnectionsResponse {
/// VpnConnections in the location.
#[prost(message, repeated, tag = "1")]
pub vpn_connections: ::prost::alloc::vec::Vec<VpnConnection>,
/// A token to retrieve next page of results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Gets a VPN connection.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVpnConnectionRequest {
/// Required. The resource name of the vpn connection.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Creates a VPN connection.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateVpnConnectionRequest {
/// Required. The parent location where this vpn connection will be created.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The VPN connection identifier.
#[prost(string, tag = "2")]
pub vpn_connection_id: ::prost::alloc::string::String,
/// Required. The VPN connection to create.
#[prost(message, optional, tag = "3")]
pub vpn_connection: ::core::option::Option<VpnConnection>,
/// A unique identifier for this request. Restricted to 36 ASCII characters. A
/// random UUID is recommended. This request is only idempotent if
/// `request_id` is provided.
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
/// Deletes a vpn connection.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteVpnConnectionRequest {
/// Required. The resource name of the vpn connection.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// A unique identifier for this request. Restricted to 36 ASCII characters. A
/// random UUID is recommended. This request is only idempotent if
/// `request_id` is provided.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Gets the server config.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetServerConfigRequest {
/// Required. The name (project and location) of the server config to get,
/// specified in the format `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod edge_container_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// EdgeContainer API provides management of Kubernetes Clusters on Google Edge
/// Cloud deployments.
#[derive(Debug, Clone)]
pub struct EdgeContainerClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> EdgeContainerClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> EdgeContainerClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
EdgeContainerClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Lists Clusters in a given project and location.
pub async fn list_clusters(
&mut self,
request: impl tonic::IntoRequest<super::ListClustersRequest>,
) -> std::result::Result<
tonic::Response<super::ListClustersResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/ListClusters",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"ListClusters",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single Cluster.
pub async fn get_cluster(
&mut self,
request: impl tonic::IntoRequest<super::GetClusterRequest>,
) -> std::result::Result<tonic::Response<super::Cluster>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/GetCluster",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"GetCluster",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new Cluster in a given project and location.
pub async fn create_cluster(
&mut self,
request: impl tonic::IntoRequest<super::CreateClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/CreateCluster",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"CreateCluster",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the parameters of a single Cluster.
pub async fn update_cluster(
&mut self,
request: impl tonic::IntoRequest<super::UpdateClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/UpdateCluster",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"UpdateCluster",
),
);
self.inner.unary(req, path, codec).await
}
/// Upgrades a single cluster.
pub async fn upgrade_cluster(
&mut self,
request: impl tonic::IntoRequest<super::UpgradeClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/UpgradeCluster",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"UpgradeCluster",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single Cluster.
pub async fn delete_cluster(
&mut self,
request: impl tonic::IntoRequest<super::DeleteClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/DeleteCluster",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"DeleteCluster",
),
);
self.inner.unary(req, path, codec).await
}
/// Generates an access token for a Cluster.
pub async fn generate_access_token(
&mut self,
request: impl tonic::IntoRequest<super::GenerateAccessTokenRequest>,
) -> std::result::Result<
tonic::Response<super::GenerateAccessTokenResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/GenerateAccessToken",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"GenerateAccessToken",
),
);
self.inner.unary(req, path, codec).await
}
/// Generates an offline credential for a Cluster.
pub async fn generate_offline_credential(
&mut self,
request: impl tonic::IntoRequest<super::GenerateOfflineCredentialRequest>,
) -> std::result::Result<
tonic::Response<super::GenerateOfflineCredentialResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/GenerateOfflineCredential",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"GenerateOfflineCredential",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists NodePools in a given project and location.
pub async fn list_node_pools(
&mut self,
request: impl tonic::IntoRequest<super::ListNodePoolsRequest>,
) -> std::result::Result<
tonic::Response<super::ListNodePoolsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/ListNodePools",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"ListNodePools",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single NodePool.
pub async fn get_node_pool(
&mut self,
request: impl tonic::IntoRequest<super::GetNodePoolRequest>,
) -> std::result::Result<tonic::Response<super::NodePool>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/GetNodePool",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"GetNodePool",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new NodePool in a given project and location.
pub async fn create_node_pool(
&mut self,
request: impl tonic::IntoRequest<super::CreateNodePoolRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/CreateNodePool",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"CreateNodePool",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the parameters of a single NodePool.
pub async fn update_node_pool(
&mut self,
request: impl tonic::IntoRequest<super::UpdateNodePoolRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/UpdateNodePool",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"UpdateNodePool",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single NodePool.
pub async fn delete_node_pool(
&mut self,
request: impl tonic::IntoRequest<super::DeleteNodePoolRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/DeleteNodePool",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"DeleteNodePool",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists Machines in a given project and location.
pub async fn list_machines(
&mut self,
request: impl tonic::IntoRequest<super::ListMachinesRequest>,
) -> std::result::Result<
tonic::Response<super::ListMachinesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/ListMachines",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"ListMachines",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single Machine.
pub async fn get_machine(
&mut self,
request: impl tonic::IntoRequest<super::GetMachineRequest>,
) -> std::result::Result<tonic::Response<super::Machine>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/GetMachine",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"GetMachine",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists VPN connections in a given project and location.
pub async fn list_vpn_connections(
&mut self,
request: impl tonic::IntoRequest<super::ListVpnConnectionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListVpnConnectionsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/ListVpnConnections",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"ListVpnConnections",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single VPN connection.
pub async fn get_vpn_connection(
&mut self,
request: impl tonic::IntoRequest<super::GetVpnConnectionRequest>,
) -> std::result::Result<tonic::Response<super::VpnConnection>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/GetVpnConnection",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"GetVpnConnection",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new VPN connection in a given project and location.
pub async fn create_vpn_connection(
&mut self,
request: impl tonic::IntoRequest<super::CreateVpnConnectionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/CreateVpnConnection",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"CreateVpnConnection",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single VPN connection.
pub async fn delete_vpn_connection(
&mut self,
request: impl tonic::IntoRequest<super::DeleteVpnConnectionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/DeleteVpnConnection",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"DeleteVpnConnection",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets the server config.
pub async fn get_server_config(
&mut self,
request: impl tonic::IntoRequest<super::GetServerConfigRequest>,
) -> std::result::Result<tonic::Response<super::ServerConfig>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.edgecontainer.v1.EdgeContainer/GetServerConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.edgecontainer.v1.EdgeContainer",
"GetServerConfig",
),
);
self.inner.unary(req, path, codec).await
}
}
}