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
// This file is @generated by prost-build.
/// Request for the `ListTrustConfigs` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTrustConfigsRequest {
/// Required. The project and location from which the TrustConfigs should be
/// listed, specified in the format `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum number of TrustConfigs to return per call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// The value returned by the last `ListTrustConfigsResponse`. Indicates
/// that this is a continuation of a prior `ListTrustConfigs` call, and that
/// the system should return the next page of data.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Filter expression to restrict the TrustConfigs returned.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// A list of TrustConfig field names used to specify the order of the
/// returned results. The default sorting order is ascending. To specify
/// descending order for a field, add a suffix `" desc"`.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response for the `ListTrustConfigs` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTrustConfigsResponse {
/// A list of TrustConfigs for the parent resource.
#[prost(message, repeated, tag = "1")]
pub trust_configs: ::prost::alloc::vec::Vec<TrustConfig>,
/// If there might be more results than those appearing in this response, then
/// `next_page_token` is included. To get the next set of results, call this
/// method again using the value of `next_page_token` as `page_token`.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for the `GetTrustConfig` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTrustConfigRequest {
/// Required. A name of the TrustConfig to describe. Must be in the format
/// `projects/*/locations/*/trustConfigs/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for the `CreateTrustConfig` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTrustConfigRequest {
/// Required. The parent resource of the TrustConfig. Must be in the format
/// `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. A user-provided name of the TrustConfig. Must match the regexp
/// `\[a-z0-9-\]{1,63}`.
#[prost(string, tag = "2")]
pub trust_config_id: ::prost::alloc::string::String,
/// Required. A definition of the TrustConfig to create.
#[prost(message, optional, tag = "3")]
pub trust_config: ::core::option::Option<TrustConfig>,
}
/// Request for the `UpdateTrustConfig` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateTrustConfigRequest {
/// Required. A definition of the TrustConfig to update.
#[prost(message, optional, tag = "1")]
pub trust_config: ::core::option::Option<TrustConfig>,
/// Required. The update mask applies to the resource. For the `FieldMask`
/// definition, see
/// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.>
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request for the `DeleteTrustConfig` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteTrustConfigRequest {
/// Required. A name of the TrustConfig to delete. Must be in the format
/// `projects/*/locations/*/trustConfigs/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The current etag of the TrustConfig.
/// If an etag is provided and does not match the current etag of the resource,
/// deletion will be blocked and an ABORTED error will be returned.
#[prost(string, tag = "2")]
pub etag: ::prost::alloc::string::String,
}
/// Defines a trust config.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TrustConfig {
/// A user-defined name of the trust config. TrustConfig names must be
/// unique globally and match pattern
/// `projects/*/locations/*/trustConfigs/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The creation timestamp of a TrustConfig.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The last update timestamp of a TrustConfig.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Set of labels associated with a TrustConfig.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// One or more paragraphs of text description of a TrustConfig.
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
/// This checksum is computed by the server based on the value of other
/// fields, and may be sent on update and delete requests to ensure the
/// client has an up-to-date value before proceeding.
#[prost(string, tag = "6")]
pub etag: ::prost::alloc::string::String,
/// Set of trust stores to perform validation against.
///
/// This field is supported when TrustConfig is configured with Load Balancers,
/// currently not supported for SPIFFE certificate validation.
///
/// Only one TrustStore specified is currently allowed.
#[prost(message, repeated, tag = "8")]
pub trust_stores: ::prost::alloc::vec::Vec<trust_config::TrustStore>,
}
/// Nested message and enum types in `TrustConfig`.
pub mod trust_config {
/// Defines a trust anchor.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TrustAnchor {
#[prost(oneof = "trust_anchor::Kind", tags = "1")]
pub kind: ::core::option::Option<trust_anchor::Kind>,
}
/// Nested message and enum types in `TrustAnchor`.
pub mod trust_anchor {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
/// PEM root certificate of the PKI used for validation.
///
/// Each certificate provided in PEM format may occupy up to 5kB.
#[prost(string, tag = "1")]
PemCertificate(::prost::alloc::string::String),
}
}
/// Defines an intermediate CA.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IntermediateCa {
#[prost(oneof = "intermediate_ca::Kind", tags = "1")]
pub kind: ::core::option::Option<intermediate_ca::Kind>,
}
/// Nested message and enum types in `IntermediateCA`.
pub mod intermediate_ca {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
/// PEM intermediate certificate used for building up paths
/// for validation.
///
/// Each certificate provided in PEM format may occupy up to 5kB.
#[prost(string, tag = "1")]
PemCertificate(::prost::alloc::string::String),
}
}
/// Defines a trust store.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TrustStore {
/// List of Trust Anchors to be used while performing validation
/// against a given TrustStore.
#[prost(message, repeated, tag = "1")]
pub trust_anchors: ::prost::alloc::vec::Vec<TrustAnchor>,
/// Set of intermediate CA certificates used for the path building
/// phase of chain validation.
///
/// The field is currently not supported if TrustConfig is used for the
/// workload certificate feature.
#[prost(message, repeated, tag = "2")]
pub intermediate_cas: ::prost::alloc::vec::Vec<IntermediateCa>,
}
}
/// Request for the `ListCertificateIssuanceConfigs` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificateIssuanceConfigsRequest {
/// Required. The project and location from which the certificate should be
/// listed, specified in the format `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum number of certificate configs to return per call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// The value returned by the last `ListCertificateIssuanceConfigsResponse`.
/// Indicates that this is a continuation of a prior
/// `ListCertificateIssuanceConfigs` call, and that the system should return
/// the next page of data.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Filter expression to restrict the Certificates Configs returned.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// A list of Certificate Config field names used to specify the order of the
/// returned results. The default sorting order is ascending. To specify
/// descending order for a field, add a suffix `" desc"`.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response for the `ListCertificateIssuanceConfigs` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificateIssuanceConfigsResponse {
/// A list of certificate configs for the parent resource.
#[prost(message, repeated, tag = "1")]
pub certificate_issuance_configs: ::prost::alloc::vec::Vec<
CertificateIssuanceConfig,
>,
/// If there might be more results than those appearing in this response, then
/// `next_page_token` is included. To get the next set of results, call this
/// method again using the value of `next_page_token` as `page_token`.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for the `GetCertificateIssuanceConfig` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCertificateIssuanceConfigRequest {
/// Required. A name of the certificate issuance config to describe. Must be in
/// the format `projects/*/locations/*/certificateIssuanceConfigs/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for the `CreateCertificateIssuanceConfig` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCertificateIssuanceConfigRequest {
/// Required. The parent resource of the certificate issuance config. Must be
/// in the format `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. A user-provided name of the certificate config.
#[prost(string, tag = "2")]
pub certificate_issuance_config_id: ::prost::alloc::string::String,
/// Required. A definition of the certificate issuance config to create.
#[prost(message, optional, tag = "3")]
pub certificate_issuance_config: ::core::option::Option<CertificateIssuanceConfig>,
}
/// Request for the `DeleteCertificateIssuanceConfig` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCertificateIssuanceConfigRequest {
/// Required. A name of the certificate issuance config to delete. Must be in
/// the format `projects/*/locations/*/certificateIssuanceConfigs/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// CertificateIssuanceConfig specifies how to issue and manage a certificate.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateIssuanceConfig {
/// A user-defined name of the certificate issuance config.
/// CertificateIssuanceConfig names must be unique globally and match pattern
/// `projects/*/locations/*/certificateIssuanceConfigs/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The creation timestamp of a CertificateIssuanceConfig.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The last update timestamp of a CertificateIssuanceConfig.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Set of labels associated with a CertificateIssuanceConfig.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// One or more paragraphs of text description of a CertificateIssuanceConfig.
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
/// Required. The CA that issues the workload certificate. It includes the CA
/// address, type, authentication to CA service, etc.
#[prost(message, optional, tag = "6")]
pub certificate_authority_config: ::core::option::Option<
certificate_issuance_config::CertificateAuthorityConfig,
>,
/// Required. Workload certificate lifetime requested.
#[prost(message, optional, tag = "7")]
pub lifetime: ::core::option::Option<::prost_types::Duration>,
/// Required. Specifies the percentage of elapsed time of the certificate
/// lifetime to wait before renewing the certificate. Must be a number between
/// 1-99, inclusive.
#[prost(int32, tag = "8")]
pub rotation_window_percentage: i32,
/// Required. The key algorithm to use when generating the private key.
#[prost(enumeration = "certificate_issuance_config::KeyAlgorithm", tag = "9")]
pub key_algorithm: i32,
}
/// Nested message and enum types in `CertificateIssuanceConfig`.
pub mod certificate_issuance_config {
/// The CA that issues the workload certificate. It includes CA address, type,
/// authentication to CA service, etc.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateAuthorityConfig {
#[prost(oneof = "certificate_authority_config::Kind", tags = "1")]
pub kind: ::core::option::Option<certificate_authority_config::Kind>,
}
/// Nested message and enum types in `CertificateAuthorityConfig`.
pub mod certificate_authority_config {
/// Contains information required to contact CA service.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateAuthorityServiceConfig {
/// Required. A CA pool resource used to issue a certificate.
/// The CA pool string has a relative resource path following the form
/// "projects/{project}/locations/{location}/caPools/{ca_pool}".
#[prost(string, tag = "1")]
pub ca_pool: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
/// Defines a CertificateAuthorityServiceConfig.
#[prost(message, tag = "1")]
CertificateAuthorityServiceConfig(CertificateAuthorityServiceConfig),
}
}
/// The type of keypair to generate.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum KeyAlgorithm {
/// Unspecified key algorithm.
Unspecified = 0,
/// Specifies RSA with a 2048-bit modulus.
Rsa2048 = 1,
/// Specifies ECDSA with curve P256.
EcdsaP256 = 4,
}
impl KeyAlgorithm {
/// 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 {
KeyAlgorithm::Unspecified => "KEY_ALGORITHM_UNSPECIFIED",
KeyAlgorithm::Rsa2048 => "RSA_2048",
KeyAlgorithm::EcdsaP256 => "ECDSA_P256",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"KEY_ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified),
"RSA_2048" => Some(Self::Rsa2048),
"ECDSA_P256" => Some(Self::EcdsaP256),
_ => None,
}
}
}
}
/// Request for the `ListCertificates` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificatesRequest {
/// Required. The project and location from which the certificate should be
/// listed, specified in the format `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum number of certificates to return per call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// The value returned by the last `ListCertificatesResponse`. Indicates that
/// this is a continuation of a prior `ListCertificates` call, and that the
/// system should return the next page of data.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Filter expression to restrict the Certificates returned.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// A list of Certificate field names used to specify the order of the returned
/// results. The default sorting order is ascending. To specify descending
/// order for a field, add a suffix `" desc"`.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response for the `ListCertificates` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificatesResponse {
/// A list of certificates for the parent resource.
#[prost(message, repeated, tag = "1")]
pub certificates: ::prost::alloc::vec::Vec<Certificate>,
/// If there might be more results than those appearing in this response, then
/// `next_page_token` is included. To get the next set of results, call this
/// method again using the value of `next_page_token` as `page_token`.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// A list of locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for the `GetCertificate` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCertificateRequest {
/// Required. A name of the certificate to describe. Must be in the format
/// `projects/*/locations/*/certificates/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for the `CreateCertificate` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCertificateRequest {
/// Required. The parent resource of the certificate. Must be in the format
/// `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. A user-provided name of the certificate.
#[prost(string, tag = "2")]
pub certificate_id: ::prost::alloc::string::String,
/// Required. A definition of the certificate to create.
#[prost(message, optional, tag = "3")]
pub certificate: ::core::option::Option<Certificate>,
}
/// Request for the `UpdateCertificate` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCertificateRequest {
/// Required. A definition of the certificate to update.
#[prost(message, optional, tag = "1")]
pub certificate: ::core::option::Option<Certificate>,
/// Required. The update mask applies to the resource. For the `FieldMask`
/// definition, see
/// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.>
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request for the `DeleteCertificate` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCertificateRequest {
/// Required. A name of the certificate to delete. Must be in the format
/// `projects/*/locations/*/certificates/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for the `ListCertificateMaps` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificateMapsRequest {
/// Required. The project and location from which the certificate maps should
/// be listed, specified in the format `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum number of certificate maps to return per call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// The value returned by the last `ListCertificateMapsResponse`. Indicates
/// that this is a continuation of a prior `ListCertificateMaps` call, and that
/// the system should return the next page of data.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Filter expression to restrict the Certificates Maps returned.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// A list of Certificate Map field names used to specify the order of the
/// returned results. The default sorting order is ascending. To specify
/// descending order for a field, add a suffix `" desc"`.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response for the `ListCertificateMaps` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificateMapsResponse {
/// A list of certificate maps for the parent resource.
#[prost(message, repeated, tag = "1")]
pub certificate_maps: ::prost::alloc::vec::Vec<CertificateMap>,
/// If there might be more results than those appearing in this response, then
/// `next_page_token` is included. To get the next set of results, call this
/// method again using the value of `next_page_token` as `page_token`.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for the `GetCertificateMap` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCertificateMapRequest {
/// Required. A name of the certificate map to describe. Must be in the format
/// `projects/*/locations/*/certificateMaps/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for the `CreateCertificateMap` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCertificateMapRequest {
/// Required. The parent resource of the certificate map. Must be in the format
/// `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. A user-provided name of the certificate map.
#[prost(string, tag = "2")]
pub certificate_map_id: ::prost::alloc::string::String,
/// Required. A definition of the certificate map to create.
#[prost(message, optional, tag = "3")]
pub certificate_map: ::core::option::Option<CertificateMap>,
}
/// Request for the `UpdateCertificateMap` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCertificateMapRequest {
/// Required. A definition of the certificate map to update.
#[prost(message, optional, tag = "1")]
pub certificate_map: ::core::option::Option<CertificateMap>,
/// Required. The update mask applies to the resource. For the `FieldMask`
/// definition, see
/// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.>
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request for the `DeleteCertificateMap` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCertificateMapRequest {
/// Required. A name of the certificate map to delete. Must be in the format
/// `projects/*/locations/*/certificateMaps/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for the `ListCertificateMapEntries` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificateMapEntriesRequest {
/// Required. The project, location and certificate map from which the
/// certificate map entries should be listed, specified in the format
/// `projects/*/locations/*/certificateMaps/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum number of certificate map entries to return. The service may return
/// fewer than this value.
/// If unspecified, at most 50 certificate map entries will be returned.
/// The maximum value is 1000; values above 1000 will be coerced to 1000.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// The value returned by the last `ListCertificateMapEntriesResponse`.
/// Indicates that this is a continuation of a prior
/// `ListCertificateMapEntries` call, and that the system should return the
/// next page of data.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Filter expression to restrict the returned Certificate Map Entries.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// A list of Certificate Map Entry field names used to specify
/// the order of the returned results. The default sorting order is ascending.
/// To specify descending order for a field, add a suffix `" desc"`.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response for the `ListCertificateMapEntries` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificateMapEntriesResponse {
/// A list of certificate map entries for the parent resource.
#[prost(message, repeated, tag = "1")]
pub certificate_map_entries: ::prost::alloc::vec::Vec<CertificateMapEntry>,
/// If there might be more results than those appearing in this response, then
/// `next_page_token` is included. To get the next set of results, call this
/// method again using the value of `next_page_token` as `page_token`.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for the `GetCertificateMapEntry` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCertificateMapEntryRequest {
/// Required. A name of the certificate map entry to describe. Must be in the
/// format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for the `CreateCertificateMapEntry` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCertificateMapEntryRequest {
/// Required. The parent resource of the certificate map entry. Must be in the
/// format `projects/*/locations/*/certificateMaps/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. A user-provided name of the certificate map entry.
#[prost(string, tag = "2")]
pub certificate_map_entry_id: ::prost::alloc::string::String,
/// Required. A definition of the certificate map entry to create.
#[prost(message, optional, tag = "3")]
pub certificate_map_entry: ::core::option::Option<CertificateMapEntry>,
}
/// Request for the `UpdateCertificateMapEntry` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCertificateMapEntryRequest {
/// Required. A definition of the certificate map entry to create map entry.
#[prost(message, optional, tag = "1")]
pub certificate_map_entry: ::core::option::Option<CertificateMapEntry>,
/// Required. The update mask applies to the resource. For the `FieldMask`
/// definition, see
/// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.>
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request for the `DeleteCertificateMapEntry` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCertificateMapEntryRequest {
/// Required. A name of the certificate map entry to delete. Must be in the
/// format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for the `ListDnsAuthorizations` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDnsAuthorizationsRequest {
/// Required. The project and location from which the dns authorizations should
/// be listed, specified in the format `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum number of dns authorizations to return per call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// The value returned by the last `ListDnsAuthorizationsResponse`. Indicates
/// that this is a continuation of a prior `ListDnsAuthorizations` call, and
/// that the system should return the next page of data.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Filter expression to restrict the Dns Authorizations returned.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// A list of Dns Authorization field names used to specify the order of the
/// returned results. The default sorting order is ascending. To specify
/// descending order for a field, add a suffix `" desc"`.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response for the `ListDnsAuthorizations` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDnsAuthorizationsResponse {
/// A list of dns authorizations for the parent resource.
#[prost(message, repeated, tag = "1")]
pub dns_authorizations: ::prost::alloc::vec::Vec<DnsAuthorization>,
/// If there might be more results than those appearing in this response, then
/// `next_page_token` is included. To get the next set of results, call this
/// method again using the value of `next_page_token` as `page_token`.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for the `GetDnsAuthorization` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDnsAuthorizationRequest {
/// Required. A name of the dns authorization to describe. Must be in the
/// format `projects/*/locations/*/dnsAuthorizations/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for the `CreateDnsAuthorization` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDnsAuthorizationRequest {
/// Required. The parent resource of the dns authorization. Must be in the
/// format `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. A user-provided name of the dns authorization.
#[prost(string, tag = "2")]
pub dns_authorization_id: ::prost::alloc::string::String,
/// Required. A definition of the dns authorization to create.
#[prost(message, optional, tag = "3")]
pub dns_authorization: ::core::option::Option<DnsAuthorization>,
}
/// Request for the `UpdateDnsAuthorization` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDnsAuthorizationRequest {
/// Required. A definition of the dns authorization to update.
#[prost(message, optional, tag = "1")]
pub dns_authorization: ::core::option::Option<DnsAuthorization>,
/// Required. The update mask applies to the resource. For the `FieldMask`
/// definition, see
/// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.>
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request for the `DeleteDnsAuthorization` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDnsAuthorizationRequest {
/// Required. A name of the dns authorization to delete. Must be in the format
/// `projects/*/locations/*/dnsAuthorizations/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Represents the metadata of the long-running operation. Output only.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
/// The time the operation was created.
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// The time the operation finished running.
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// Server-defined resource path for the target of the operation.
#[prost(string, tag = "3")]
pub target: ::prost::alloc::string::String,
/// Name of the verb executed by the operation.
#[prost(string, tag = "4")]
pub verb: ::prost::alloc::string::String,
/// Human-readable status of the operation, if any.
#[prost(string, tag = "5")]
pub status_message: ::prost::alloc::string::String,
/// Identifies whether the user has requested cancellation
/// of the operation. Operations that have successfully been cancelled
/// have [Operation.error][] value with a
/// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
/// `Code.CANCELLED`.
#[prost(bool, tag = "6")]
pub requested_cancellation: bool,
/// API version used to start the operation.
#[prost(string, tag = "7")]
pub api_version: ::prost::alloc::string::String,
}
/// Defines TLS certificate.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Certificate {
/// A user-defined name of the certificate. Certificate names must be unique
/// globally and match pattern `projects/*/locations/*/certificates/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// One or more paragraphs of text description of a certificate.
#[prost(string, tag = "8")]
pub description: ::prost::alloc::string::String,
/// Output only. The creation timestamp of a Certificate.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The last update timestamp of a Certificate.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Set of labels associated with a Certificate.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. The list of Subject Alternative Names of dnsName type defined
/// in the certificate (see RFC 5280 4.2.1.6). Managed certificates that
/// haven't been provisioned yet have this field populated with a value of the
/// managed.domains field.
#[prost(string, repeated, tag = "6")]
pub san_dnsnames: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Output only. The PEM-encoded certificate chain.
#[prost(string, tag = "9")]
pub pem_certificate: ::prost::alloc::string::String,
/// Output only. The expiry timestamp of a Certificate.
#[prost(message, optional, tag = "7")]
pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
/// Immutable. The scope of the certificate.
#[prost(enumeration = "certificate::Scope", tag = "12")]
pub scope: i32,
#[prost(oneof = "certificate::Type", tags = "5, 11")]
pub r#type: ::core::option::Option<certificate::Type>,
}
/// Nested message and enum types in `Certificate`.
pub mod certificate {
/// Certificate data for a SelfManaged Certificate.
/// SelfManaged Certificates are uploaded by the user. Updating such
/// certificates before they expire remains the user's responsibility.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SelfManagedCertificate {
/// Input only. The PEM-encoded certificate chain.
/// Leaf certificate comes first, followed by intermediate ones if any.
#[prost(string, tag = "1")]
pub pem_certificate: ::prost::alloc::string::String,
/// Input only. The PEM-encoded private key of the leaf certificate.
#[prost(string, tag = "2")]
pub pem_private_key: ::prost::alloc::string::String,
}
/// Configuration and state of a Managed Certificate.
/// Certificate Manager provisions and renews Managed Certificates
/// automatically, for as long as it's authorized to do so.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ManagedCertificate {
/// Immutable. The domains for which a managed SSL certificate will be
/// generated. Wildcard domains are only supported with DNS challenge
/// resolution.
#[prost(string, repeated, tag = "1")]
pub domains: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Immutable. Authorizations that will be used for performing domain
/// authorization.
#[prost(string, repeated, tag = "2")]
pub dns_authorizations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Immutable. The resource name for a
/// [CertificateIssuanceConfig][google.cloud.certificatemanager.v1.CertificateIssuanceConfig]
/// used to configure private PKI certificates in the format
/// `projects/*/locations/*/certificateIssuanceConfigs/*`.
/// If this field is not set, the certificates will instead be publicly
/// signed as documented at
/// <https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa.>
#[prost(string, tag = "6")]
pub issuance_config: ::prost::alloc::string::String,
/// Output only. State of the managed certificate resource.
#[prost(enumeration = "managed_certificate::State", tag = "4")]
pub state: i32,
/// Output only. Information about issues with provisioning a Managed
/// Certificate.
#[prost(message, optional, tag = "3")]
pub provisioning_issue: ::core::option::Option<
managed_certificate::ProvisioningIssue,
>,
/// Output only. Detailed state of the latest authorization attempt for each
/// domain specified for managed certificate resource.
#[prost(message, repeated, tag = "5")]
pub authorization_attempt_info: ::prost::alloc::vec::Vec<
managed_certificate::AuthorizationAttemptInfo,
>,
}
/// Nested message and enum types in `ManagedCertificate`.
pub mod managed_certificate {
/// Information about issues with provisioning a Managed Certificate.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProvisioningIssue {
/// Output only. Reason for provisioning failures.
#[prost(enumeration = "provisioning_issue::Reason", tag = "1")]
pub reason: i32,
/// Output only. Human readable explanation about the issue. Provided to
/// help address the configuration issues. Not guaranteed to be stable. For
/// programmatic access use Reason enum.
#[prost(string, tag = "2")]
pub details: ::prost::alloc::string::String,
}
/// Nested message and enum types in `ProvisioningIssue`.
pub mod provisioning_issue {
/// Reason for provisioning failures.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Reason {
/// Reason is unspecified.
Unspecified = 0,
/// Certificate provisioning failed due to an issue with one or more of
/// the domains on the certificate.
/// For details of which domains failed, consult the
/// `authorization_attempt_info` field.
AuthorizationIssue = 1,
/// Exceeded Certificate Authority quotas or internal rate limits of the
/// system. Provisioning may take longer to complete.
RateLimited = 2,
}
impl Reason {
/// 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 {
Reason::Unspecified => "REASON_UNSPECIFIED",
Reason::AuthorizationIssue => "AUTHORIZATION_ISSUE",
Reason::RateLimited => "RATE_LIMITED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REASON_UNSPECIFIED" => Some(Self::Unspecified),
"AUTHORIZATION_ISSUE" => Some(Self::AuthorizationIssue),
"RATE_LIMITED" => Some(Self::RateLimited),
_ => None,
}
}
}
}
/// State of the latest attempt to authorize a domain for certificate
/// issuance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthorizationAttemptInfo {
/// Domain name of the authorization attempt.
#[prost(string, tag = "1")]
pub domain: ::prost::alloc::string::String,
/// Output only. State of the domain for managed certificate issuance.
#[prost(enumeration = "authorization_attempt_info::State", tag = "2")]
pub state: i32,
/// Output only. Reason for failure of the authorization attempt for the
/// domain.
#[prost(
enumeration = "authorization_attempt_info::FailureReason",
tag = "3"
)]
pub failure_reason: i32,
/// Output only. Human readable explanation for reaching the state.
/// Provided to help address the configuration issues. Not guaranteed to be
/// stable. For programmatic access use FailureReason enum.
#[prost(string, tag = "4")]
pub details: ::prost::alloc::string::String,
}
/// Nested message and enum types in `AuthorizationAttemptInfo`.
pub mod authorization_attempt_info {
/// State of the domain for managed certificate issuance.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// State is unspecified.
Unspecified = 0,
/// Certificate provisioning for this domain is under way. Google Cloud
/// will attempt to authorize the domain.
Authorizing = 1,
/// A managed certificate can be provisioned, no issues for this domain.
Authorized = 6,
/// Attempt to authorize the domain failed. This prevents the Managed
/// Certificate from being issued.
/// See `failure_reason` and `details` fields for more information.
Failed = 7,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Authorizing => "AUTHORIZING",
State::Authorized => "AUTHORIZED",
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),
"AUTHORIZING" => Some(Self::Authorizing),
"AUTHORIZED" => Some(Self::Authorized),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
/// Reason for failure of the authorization attempt for the domain.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum FailureReason {
/// FailureReason is unspecified.
Unspecified = 0,
/// There was a problem with the user's DNS or load balancer
/// configuration for this domain.
Config = 1,
/// Certificate issuance forbidden by an explicit CAA record for the
/// domain or a failure to check CAA records for the domain.
Caa = 2,
/// Reached a CA or internal rate-limit for the domain,
/// e.g. for certificates per top-level private domain.
RateLimited = 3,
}
impl FailureReason {
/// 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 {
FailureReason::Unspecified => "FAILURE_REASON_UNSPECIFIED",
FailureReason::Config => "CONFIG",
FailureReason::Caa => "CAA",
FailureReason::RateLimited => "RATE_LIMITED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FAILURE_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"CONFIG" => Some(Self::Config),
"CAA" => Some(Self::Caa),
"RATE_LIMITED" => Some(Self::RateLimited),
_ => None,
}
}
}
}
/// State of the managed certificate resource.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// State is unspecified.
Unspecified = 0,
/// Certificate Manager attempts to provision or renew the certificate.
/// If the process takes longer than expected, consult the
/// `provisioning_issue` field.
Provisioning = 1,
/// Multiple certificate provisioning attempts failed and Certificate
/// Manager gave up. To try again, delete and create a new managed
/// Certificate resource.
/// For details see the `provisioning_issue` field.
Failed = 2,
/// The certificate management is working, and a certificate has been
/// provisioned.
Active = 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::Provisioning => "PROVISIONING",
State::Failed => "FAILED",
State::Active => "ACTIVE",
}
}
/// 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),
"PROVISIONING" => Some(Self::Provisioning),
"FAILED" => Some(Self::Failed),
"ACTIVE" => Some(Self::Active),
_ => None,
}
}
}
}
/// Certificate scope.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Scope {
/// Certificates with default scope are served from core Google data centers.
/// If unsure, choose this option.
Default = 0,
/// Certificates with scope EDGE_CACHE are special-purposed certificates,
/// served from Edge Points of Presence.
/// See <https://cloud.google.com/vpc/docs/edge-locations.>
EdgeCache = 1,
/// Certificates with ALL_REGIONS scope are served from all Google Cloud
/// regions. See <https://cloud.google.com/compute/docs/regions-zones.>
AllRegions = 2,
}
impl Scope {
/// 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 {
Scope::Default => "DEFAULT",
Scope::EdgeCache => "EDGE_CACHE",
Scope::AllRegions => "ALL_REGIONS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEFAULT" => Some(Self::Default),
"EDGE_CACHE" => Some(Self::EdgeCache),
"ALL_REGIONS" => Some(Self::AllRegions),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
/// If set, defines data of a self-managed certificate.
#[prost(message, tag = "5")]
SelfManaged(SelfManagedCertificate),
/// If set, contains configuration and state of a managed certificate.
#[prost(message, tag = "11")]
Managed(ManagedCertificate),
}
}
/// Defines a collection of certificate configurations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateMap {
/// A user-defined name of the Certificate Map. Certificate Map names must be
/// unique globally and match pattern
/// `projects/*/locations/*/certificateMaps/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// One or more paragraphs of text description of a certificate map.
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
/// Output only. The creation timestamp of a Certificate Map.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The update timestamp of a Certificate Map.
#[prost(message, optional, tag = "6")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Set of labels associated with a Certificate Map.
#[prost(btree_map = "string, string", tag = "3")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. A list of GCLB targets that use this Certificate Map.
/// A Target Proxy is only present on this list if it's attached to a
/// Forwarding Rule.
#[prost(message, repeated, tag = "4")]
pub gclb_targets: ::prost::alloc::vec::Vec<certificate_map::GclbTarget>,
}
/// Nested message and enum types in `CertificateMap`.
pub mod certificate_map {
/// Describes a Target Proxy that uses this Certificate Map.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GclbTarget {
/// Output only. IP configurations for this Target Proxy where the
/// Certificate Map is serving.
#[prost(message, repeated, tag = "2")]
pub ip_configs: ::prost::alloc::vec::Vec<gclb_target::IpConfig>,
/// A Target Proxy to which this map is attached to.
#[prost(oneof = "gclb_target::TargetProxy", tags = "1, 3")]
pub target_proxy: ::core::option::Option<gclb_target::TargetProxy>,
}
/// Nested message and enum types in `GclbTarget`.
pub mod gclb_target {
/// Defines IP configuration where this Certificate Map is serving.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IpConfig {
/// Output only. An external IP address.
#[prost(string, tag = "1")]
pub ip_address: ::prost::alloc::string::String,
/// Output only. Ports.
#[prost(uint32, repeated, packed = "false", tag = "3")]
pub ports: ::prost::alloc::vec::Vec<u32>,
}
/// A Target Proxy to which this map is attached to.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum TargetProxy {
/// Output only. This field returns the resource name in the following
/// format:
/// `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
#[prost(string, tag = "1")]
TargetHttpsProxy(::prost::alloc::string::String),
/// Output only. This field returns the resource name in the following
/// format:
/// `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
#[prost(string, tag = "3")]
TargetSslProxy(::prost::alloc::string::String),
}
}
}
/// Defines a certificate map entry.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateMapEntry {
/// A user-defined name of the Certificate Map Entry. Certificate Map Entry
/// names must be unique globally and match pattern
/// `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// One or more paragraphs of text description of a certificate map entry.
#[prost(string, tag = "9")]
pub description: ::prost::alloc::string::String,
/// Output only. The creation timestamp of a Certificate Map Entry.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The update timestamp of a Certificate Map Entry.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Set of labels associated with a Certificate Map Entry.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// A set of Certificates defines for the given `hostname`. There can be
/// defined up to four certificates in each Certificate Map Entry. Each
/// certificate must match pattern `projects/*/locations/*/certificates/*`.
#[prost(string, repeated, tag = "7")]
pub certificates: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Output only. A serving state of this Certificate Map Entry.
#[prost(enumeration = "ServingState", tag = "8")]
pub state: i32,
#[prost(oneof = "certificate_map_entry::Match", tags = "5, 10")]
pub r#match: ::core::option::Option<certificate_map_entry::Match>,
}
/// Nested message and enum types in `CertificateMapEntry`.
pub mod certificate_map_entry {
/// Defines predefined cases other than SNI-hostname match when this
/// configuration should be applied.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Matcher {
/// A matcher has't been recognized.
Unspecified = 0,
/// A primary certificate that is served when SNI wasn't specified in the
/// request or SNI couldn't be found in the map.
Primary = 1,
}
impl Matcher {
/// 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 {
Matcher::Unspecified => "MATCHER_UNSPECIFIED",
Matcher::Primary => "PRIMARY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MATCHER_UNSPECIFIED" => Some(Self::Unspecified),
"PRIMARY" => Some(Self::Primary),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Match {
/// A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
/// (`*.example.com`) for a set of hostnames with common suffix. Used as
/// Server Name Indication (SNI) for selecting a proper certificate.
#[prost(string, tag = "5")]
Hostname(::prost::alloc::string::String),
/// A predefined matcher for particular cases, other than SNI selection.
#[prost(enumeration = "Matcher", tag = "10")]
Matcher(i32),
}
}
/// A DnsAuthorization resource describes a way to perform domain authorization
/// for certificate issuance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DnsAuthorization {
/// A user-defined name of the dns authorization. DnsAuthorization names must
/// be unique globally and match pattern
/// `projects/*/locations/*/dnsAuthorizations/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The creation timestamp of a DnsAuthorization.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The last update timestamp of a DnsAuthorization.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Set of labels associated with a DnsAuthorization.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// One or more paragraphs of text description of a DnsAuthorization.
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
/// Required. Immutable. A domain that is being authorized. A DnsAuthorization
/// resource covers a single domain and its wildcard, e.g. authorization for
/// `example.com` can be used to issue certificates for `example.com` and
/// `*.example.com`.
#[prost(string, tag = "6")]
pub domain: ::prost::alloc::string::String,
/// Output only. DNS Resource Record that needs to be added to DNS
/// configuration.
#[prost(message, optional, tag = "10")]
pub dns_resource_record: ::core::option::Option<
dns_authorization::DnsResourceRecord,
>,
/// Immutable. Type of DnsAuthorization. If unset during resource creation the
/// following default will be used:
/// - in location global: FIXED_RECORD.
#[prost(enumeration = "dns_authorization::Type", tag = "11")]
pub r#type: i32,
}
/// Nested message and enum types in `DnsAuthorization`.
pub mod dns_authorization {
/// The structure describing the DNS Resource Record that needs to be added
/// to DNS configuration for the authorization to be usable by
/// certificate.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DnsResourceRecord {
/// Output only. Fully qualified name of the DNS Resource Record.
/// e.g. `_acme-challenge.example.com`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. Type of the DNS Resource Record.
/// Currently always set to "CNAME".
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
/// Output only. Data of the DNS Resource Record.
#[prost(string, tag = "3")]
pub data: ::prost::alloc::string::String,
}
/// DnsAuthorization type.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// Type is unspecified.
Unspecified = 0,
/// FIXED_RECORD DNS authorization uses DNS-01 validation method.
FixedRecord = 1,
/// PER_PROJECT_RECORD DNS authorization allows for independent management
/// of Google-managed certificates with DNS authorization across multiple
/// projects.
PerProjectRecord = 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::FixedRecord => "FIXED_RECORD",
Type::PerProjectRecord => "PER_PROJECT_RECORD",
}
}
/// 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),
"FIXED_RECORD" => Some(Self::FixedRecord),
"PER_PROJECT_RECORD" => Some(Self::PerProjectRecord),
_ => None,
}
}
}
}
/// Defines set of serving states associated with a resource.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ServingState {
/// The status is undefined.
Unspecified = 0,
/// The configuration is serving.
Active = 1,
/// Update is in progress. Some frontends may serve this configuration.
Pending = 2,
}
impl ServingState {
/// 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 {
ServingState::Unspecified => "SERVING_STATE_UNSPECIFIED",
ServingState::Active => "ACTIVE",
ServingState::Pending => "PENDING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SERVING_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"ACTIVE" => Some(Self::Active),
"PENDING" => Some(Self::Pending),
_ => None,
}
}
}
/// Generated client implementations.
pub mod certificate_manager_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// API Overview
///
/// Certificates Manager API allows customers to see and manage all their TLS
/// certificates.
///
/// Certificates Manager API service provides methods to manage certificates,
/// group them into collections, and create serving configuration that can be
/// easily applied to other Cloud resources e.g. Target Proxies.
///
/// Data Model
///
/// The Certificates Manager service exposes the following resources:
///
/// * `Certificate` that describes a single TLS certificate.
/// * `CertificateMap` that describes a collection of certificates that can be
/// attached to a target resource.
/// * `CertificateMapEntry` that describes a single configuration entry that
/// consists of a SNI and a group of certificates. It's a subresource of
/// CertificateMap.
///
/// Certificate, CertificateMap and CertificateMapEntry IDs
/// have to fully match the regexp `[a-z0-9-]{1,63}`. In other words,
/// - only lower case letters, digits, and hyphen are allowed
/// - length of the resource ID has to be in [1,63] range.
///
/// Provides methods to manage Cloud Certificate Manager entities.
#[derive(Debug, Clone)]
pub struct CertificateManagerClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CertificateManagerClient<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,
) -> CertificateManagerClient<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,
{
CertificateManagerClient::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 Certificates in a given project and location.
pub async fn list_certificates(
&mut self,
request: impl tonic::IntoRequest<super::ListCertificatesRequest>,
) -> std::result::Result<
tonic::Response<super::ListCertificatesResponse>,
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.certificatemanager.v1.CertificateManager/ListCertificates",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"ListCertificates",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single Certificate.
pub async fn get_certificate(
&mut self,
request: impl tonic::IntoRequest<super::GetCertificateRequest>,
) -> std::result::Result<tonic::Response<super::Certificate>, 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.certificatemanager.v1.CertificateManager/GetCertificate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"GetCertificate",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new Certificate in a given project and location.
pub async fn create_certificate(
&mut self,
request: impl tonic::IntoRequest<super::CreateCertificateRequest>,
) -> 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.certificatemanager.v1.CertificateManager/CreateCertificate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"CreateCertificate",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a Certificate.
pub async fn update_certificate(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCertificateRequest>,
) -> 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.certificatemanager.v1.CertificateManager/UpdateCertificate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"UpdateCertificate",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single Certificate.
pub async fn delete_certificate(
&mut self,
request: impl tonic::IntoRequest<super::DeleteCertificateRequest>,
) -> 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.certificatemanager.v1.CertificateManager/DeleteCertificate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"DeleteCertificate",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists CertificateMaps in a given project and location.
pub async fn list_certificate_maps(
&mut self,
request: impl tonic::IntoRequest<super::ListCertificateMapsRequest>,
) -> std::result::Result<
tonic::Response<super::ListCertificateMapsResponse>,
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.certificatemanager.v1.CertificateManager/ListCertificateMaps",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"ListCertificateMaps",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single CertificateMap.
pub async fn get_certificate_map(
&mut self,
request: impl tonic::IntoRequest<super::GetCertificateMapRequest>,
) -> std::result::Result<tonic::Response<super::CertificateMap>, 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.certificatemanager.v1.CertificateManager/GetCertificateMap",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"GetCertificateMap",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new CertificateMap in a given project and location.
pub async fn create_certificate_map(
&mut self,
request: impl tonic::IntoRequest<super::CreateCertificateMapRequest>,
) -> 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.certificatemanager.v1.CertificateManager/CreateCertificateMap",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"CreateCertificateMap",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a CertificateMap.
pub async fn update_certificate_map(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCertificateMapRequest>,
) -> 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.certificatemanager.v1.CertificateManager/UpdateCertificateMap",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"UpdateCertificateMap",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single CertificateMap. A Certificate Map can't be deleted
/// if it contains Certificate Map Entries. Remove all the entries from
/// the map before calling this method.
pub async fn delete_certificate_map(
&mut self,
request: impl tonic::IntoRequest<super::DeleteCertificateMapRequest>,
) -> 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.certificatemanager.v1.CertificateManager/DeleteCertificateMap",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"DeleteCertificateMap",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists CertificateMapEntries in a given project and location.
pub async fn list_certificate_map_entries(
&mut self,
request: impl tonic::IntoRequest<super::ListCertificateMapEntriesRequest>,
) -> std::result::Result<
tonic::Response<super::ListCertificateMapEntriesResponse>,
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.certificatemanager.v1.CertificateManager/ListCertificateMapEntries",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"ListCertificateMapEntries",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single CertificateMapEntry.
pub async fn get_certificate_map_entry(
&mut self,
request: impl tonic::IntoRequest<super::GetCertificateMapEntryRequest>,
) -> std::result::Result<
tonic::Response<super::CertificateMapEntry>,
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.certificatemanager.v1.CertificateManager/GetCertificateMapEntry",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"GetCertificateMapEntry",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new CertificateMapEntry in a given project and location.
pub async fn create_certificate_map_entry(
&mut self,
request: impl tonic::IntoRequest<super::CreateCertificateMapEntryRequest>,
) -> 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.certificatemanager.v1.CertificateManager/CreateCertificateMapEntry",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"CreateCertificateMapEntry",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a CertificateMapEntry.
pub async fn update_certificate_map_entry(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCertificateMapEntryRequest>,
) -> 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.certificatemanager.v1.CertificateManager/UpdateCertificateMapEntry",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"UpdateCertificateMapEntry",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single CertificateMapEntry.
pub async fn delete_certificate_map_entry(
&mut self,
request: impl tonic::IntoRequest<super::DeleteCertificateMapEntryRequest>,
) -> 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.certificatemanager.v1.CertificateManager/DeleteCertificateMapEntry",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"DeleteCertificateMapEntry",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists DnsAuthorizations in a given project and location.
pub async fn list_dns_authorizations(
&mut self,
request: impl tonic::IntoRequest<super::ListDnsAuthorizationsRequest>,
) -> std::result::Result<
tonic::Response<super::ListDnsAuthorizationsResponse>,
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.certificatemanager.v1.CertificateManager/ListDnsAuthorizations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"ListDnsAuthorizations",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single DnsAuthorization.
pub async fn get_dns_authorization(
&mut self,
request: impl tonic::IntoRequest<super::GetDnsAuthorizationRequest>,
) -> std::result::Result<
tonic::Response<super::DnsAuthorization>,
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.certificatemanager.v1.CertificateManager/GetDnsAuthorization",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"GetDnsAuthorization",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new DnsAuthorization in a given project and location.
pub async fn create_dns_authorization(
&mut self,
request: impl tonic::IntoRequest<super::CreateDnsAuthorizationRequest>,
) -> 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.certificatemanager.v1.CertificateManager/CreateDnsAuthorization",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"CreateDnsAuthorization",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a DnsAuthorization.
pub async fn update_dns_authorization(
&mut self,
request: impl tonic::IntoRequest<super::UpdateDnsAuthorizationRequest>,
) -> 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.certificatemanager.v1.CertificateManager/UpdateDnsAuthorization",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"UpdateDnsAuthorization",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single DnsAuthorization.
pub async fn delete_dns_authorization(
&mut self,
request: impl tonic::IntoRequest<super::DeleteDnsAuthorizationRequest>,
) -> 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.certificatemanager.v1.CertificateManager/DeleteDnsAuthorization",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"DeleteDnsAuthorization",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists CertificateIssuanceConfigs in a given project and location.
pub async fn list_certificate_issuance_configs(
&mut self,
request: impl tonic::IntoRequest<
super::ListCertificateIssuanceConfigsRequest,
>,
) -> std::result::Result<
tonic::Response<super::ListCertificateIssuanceConfigsResponse>,
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.certificatemanager.v1.CertificateManager/ListCertificateIssuanceConfigs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"ListCertificateIssuanceConfigs",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single CertificateIssuanceConfig.
pub async fn get_certificate_issuance_config(
&mut self,
request: impl tonic::IntoRequest<super::GetCertificateIssuanceConfigRequest>,
) -> std::result::Result<
tonic::Response<super::CertificateIssuanceConfig>,
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.certificatemanager.v1.CertificateManager/GetCertificateIssuanceConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"GetCertificateIssuanceConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new CertificateIssuanceConfig in a given project and location.
pub async fn create_certificate_issuance_config(
&mut self,
request: impl tonic::IntoRequest<
super::CreateCertificateIssuanceConfigRequest,
>,
) -> 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.certificatemanager.v1.CertificateManager/CreateCertificateIssuanceConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"CreateCertificateIssuanceConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single CertificateIssuanceConfig.
pub async fn delete_certificate_issuance_config(
&mut self,
request: impl tonic::IntoRequest<
super::DeleteCertificateIssuanceConfigRequest,
>,
) -> 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.certificatemanager.v1.CertificateManager/DeleteCertificateIssuanceConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"DeleteCertificateIssuanceConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists TrustConfigs in a given project and location.
pub async fn list_trust_configs(
&mut self,
request: impl tonic::IntoRequest<super::ListTrustConfigsRequest>,
) -> std::result::Result<
tonic::Response<super::ListTrustConfigsResponse>,
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.certificatemanager.v1.CertificateManager/ListTrustConfigs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"ListTrustConfigs",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single TrustConfig.
pub async fn get_trust_config(
&mut self,
request: impl tonic::IntoRequest<super::GetTrustConfigRequest>,
) -> std::result::Result<tonic::Response<super::TrustConfig>, 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.certificatemanager.v1.CertificateManager/GetTrustConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"GetTrustConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new TrustConfig in a given project and location.
pub async fn create_trust_config(
&mut self,
request: impl tonic::IntoRequest<super::CreateTrustConfigRequest>,
) -> 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.certificatemanager.v1.CertificateManager/CreateTrustConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"CreateTrustConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a TrustConfig.
pub async fn update_trust_config(
&mut self,
request: impl tonic::IntoRequest<super::UpdateTrustConfigRequest>,
) -> 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.certificatemanager.v1.CertificateManager/UpdateTrustConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"UpdateTrustConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single TrustConfig.
pub async fn delete_trust_config(
&mut self,
request: impl tonic::IntoRequest<super::DeleteTrustConfigRequest>,
) -> 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.certificatemanager.v1.CertificateManager/DeleteTrustConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.certificatemanager.v1.CertificateManager",
"DeleteTrustConfig",
),
);
self.inner.unary(req, path, codec).await
}
}
}