1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451
// This file is @generated by prost-build.
/// A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] represents an individual Certificate Authority.
/// A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateAuthority {
/// Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
/// format `projects/*/locations/*/certificateAuthorities/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. Immutable. The [Type][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
#[prost(enumeration = "certificate_authority::Type", tag = "2")]
pub r#type: i32,
/// Required. Immutable. The [Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
#[prost(enumeration = "certificate_authority::Tier", tag = "3")]
pub tier: i32,
/// Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
#[prost(message, optional, tag = "4")]
pub config: ::core::option::Option<CertificateConfig>,
/// Required. The desired lifetime of the CA certificate. Used to create the
/// "not_before_time" and "not_after_time" fields inside an X.509
/// certificate.
#[prost(message, optional, tag = "5")]
pub lifetime: ::core::option::Option<::prost_types::Duration>,
/// Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this
/// [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key
/// is also used to sign the self-signed CA certificate. Otherwise, it
/// is used to sign a CSR.
#[prost(message, optional, tag = "6")]
pub key_spec: ::core::option::Option<certificate_authority::KeyVersionSpec>,
/// Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing
/// [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
#[prost(message, optional, tag = "7")]
pub certificate_policy: ::core::option::Option<
certificate_authority::CertificateAuthorityPolicy,
>,
/// Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate]
/// from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
#[prost(message, optional, tag = "8")]
pub issuing_options: ::core::option::Option<certificate_authority::IssuingOptions>,
/// Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set
/// with the subordinate configuration, which describes its issuers. This may
/// be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate.
#[prost(message, optional, tag = "19")]
pub subordinate_config: ::core::option::Option<SubordinateConfig>,
/// Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
#[prost(enumeration = "certificate_authority::State", tag = "10")]
pub state: i32,
/// Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current
/// [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer
/// is the final element (consistent with RFC 5246). For a self-signed CA, this
/// will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate.
#[prost(string, repeated, tag = "9")]
pub pem_ca_certificates: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate
/// and its issuers. Ordered as self-to-root.
#[prost(message, repeated, tag = "12")]
pub ca_certificate_descriptions: ::prost::alloc::vec::Vec<CertificateDescription>,
/// Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will
/// publish content, such as the CA certificate and CRLs. This must be a bucket
/// name, without any prefixes (such as `gs://`) or suffixes (such as
/// `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
/// would simply specify `my-bucket`. If not specified, a managed bucket will
/// be created.
#[prost(string, tag = "13")]
pub gcs_bucket: ::prost::alloc::string::String,
/// Output only. URLs for accessing content published by this CA, such as the CA certificate
/// and CRLs.
#[prost(message, optional, tag = "14")]
pub access_urls: ::core::option::Option<certificate_authority::AccessUrls>,
/// Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created.
#[prost(message, optional, tag = "15")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated.
#[prost(message, optional, tag = "16")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if
/// scheduled for deletion.
#[prost(message, optional, tag = "17")]
pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
/// Optional. Labels with user-defined metadata.
#[prost(btree_map = "string, string", tag = "18")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// Nested message and enum types in `CertificateAuthority`.
pub mod certificate_authority {
/// Options that affect all certificates issued by a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct IssuingOptions {
/// Required. When true, includes a URL to the issuing CA certificate in the
/// "authority information access" X.509 extension.
#[prost(bool, tag = "1")]
pub include_ca_cert_url: bool,
/// Required. When true, includes a URL to the CRL corresponding to certificates
/// issued from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
/// CRLs will expire 7 days from their creation. However, we will rebuild
/// daily. CRLs are also rebuilt shortly after a certificate is revoked.
#[prost(bool, tag = "2")]
pub include_crl_access_url: bool,
}
/// The issuing policy for a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
/// [Certificates][google.cloud.security.privateca.v1beta1.Certificate] will not be successfully issued from this
/// [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] if they violate the policy.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateAuthorityPolicy {
/// Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all
/// [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
/// match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty
/// field, any value will be allowed for that field.
#[prost(message, repeated, tag = "3")]
pub allowed_locations_and_organizations: ::prost::alloc::vec::Vec<
super::Subject,
>,
/// Optional. If any value is specified here, then all
/// [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
/// match at least one listed value. If no value is specified, all values
/// will be allowed for this fied. Glob patterns are also supported.
#[prost(string, repeated, tag = "4")]
pub allowed_common_names: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
/// Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all
/// [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must
/// match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value
/// is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames]
/// field.
#[prost(message, optional, tag = "5")]
pub allowed_sans: ::core::option::Option<
certificate_authority_policy::AllowedSubjectAltNames,
>,
/// Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that
/// if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s
/// requested maximum_lifetime, the effective lifetime will be explicitly
/// truncated.
#[prost(message, optional, tag = "6")]
pub maximum_lifetime: ::core::option::Option<::prost_types::Duration>,
/// Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be
/// used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
#[prost(message, optional, tag = "8")]
pub allowed_issuance_modes: ::core::option::Option<
certificate_authority_policy::IssuanceModes,
>,
/// Allowed configurations or a single configuration for all issued
/// certificates.
#[prost(oneof = "certificate_authority_policy::ConfigPolicy", tags = "1, 2")]
pub config_policy: ::core::option::Option<
certificate_authority_policy::ConfigPolicy,
>,
}
/// Nested message and enum types in `CertificateAuthorityPolicy`.
pub mod certificate_authority_policy {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllowedConfigList {
/// Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
/// must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a
/// [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be
/// allowed for that field.
#[prost(message, repeated, tag = "1")]
pub allowed_config_values: ::prost::alloc::vec::Vec<
super::super::ReusableConfigWrapper,
>,
}
/// [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] specifies the allowed values for
/// [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames] by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] when issuing
/// [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllowedSubjectAltNames {
/// Optional. Contains valid, fully-qualified host names. Glob patterns are also
/// supported. To allow an explicit wildcard certificate, escape with
/// backlash (i.e. `\*`).
/// E.g. for globbed entries: `*bar.com` will allow `foo.bar.com`, but not
/// `*.bar.com`, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set.
/// E.g. for wildcard entries: `\*.bar.com` will allow `*.bar.com`, but not
/// `foo.bar.com`.
#[prost(string, repeated, tag = "1")]
pub allowed_dns_names: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
/// Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To
/// match across path seperators (i.e. '/') use the double star glob
/// pattern (i.e. '**').
#[prost(string, repeated, tag = "2")]
pub allowed_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also
/// supported.
#[prost(string, repeated, tag = "3")]
pub allowed_email_addresses: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
/// Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6
/// addresses and subnet ranges. Subnet ranges are specified using the
/// '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns
/// are supported only for ip address entries (i.e. not for subnet ranges).
#[prost(string, repeated, tag = "4")]
pub allowed_ips: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. Specifies if glob patterns used for [allowed_dns_names][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allowed_dns_names] allows
/// wildcard certificates.
#[prost(bool, tag = "5")]
pub allow_globbing_dns_wildcards: bool,
/// Optional. Specifies if to allow custom X509Extension values.
#[prost(bool, tag = "6")]
pub allow_custom_sans: bool,
}
/// [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] specifies the allowed ways in which
/// [Certificates][google.cloud.security.privateca.v1beta1.Certificate] may be requested from this
/// [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct IssuanceModes {
/// Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by
/// specifying a CSR.
#[prost(bool, tag = "1")]
pub allow_csr_based_issuance: bool,
/// Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by
/// specifying a [CertificateConfig][google.cloud.security.privateca.v1beta1.CertificateConfig].
#[prost(bool, tag = "2")]
pub allow_config_based_issuance: bool,
}
/// Allowed configurations or a single configuration for all issued
/// certificates.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ConfigPolicy {
/// Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
/// must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list.
#[prost(message, tag = "1")]
AllowedConfigList(AllowedConfigList),
/// Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
/// will use the provided configuration values, overwriting any requested
/// configuration values.
#[prost(message, tag = "2")]
OverwriteConfigValues(super::super::ReusableConfigWrapper),
}
}
/// URLs where a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will publish content.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccessUrls {
/// The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate is
/// published. This will only be set for CAs that have been activated.
#[prost(string, tag = "1")]
pub ca_certificate_access_url: ::prost::alloc::string::String,
/// The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CRLs are published. This
/// will only be set for CAs that have been activated.
#[prost(string, tag = "2")]
pub crl_access_url: ::prost::alloc::string::String,
}
/// A Cloud KMS key configuration that a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will use.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyVersionSpec {
#[prost(oneof = "key_version_spec::KeyVersion", tags = "1, 2")]
pub key_version: ::core::option::Option<key_version_spec::KeyVersion>,
}
/// Nested message and enum types in `KeyVersionSpec`.
pub mod key_version_spec {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum KeyVersion {
/// Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the
/// format
/// `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
/// This option enables full flexibility in the key's capabilities and
/// properties.
#[prost(string, tag = "1")]
CloudKmsKeyVersion(::prost::alloc::string::String),
/// Required. The algorithm to use for creating a managed Cloud KMS key for a for a
/// simplified experience. All managed keys will be have their
/// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
#[prost(enumeration = "super::SignHashAlgorithm", tag = "2")]
Algorithm(i32),
}
}
/// The type of a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], indicating its issuing chain.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// Not specified.
Unspecified = 0,
/// Self-signed CA.
SelfSigned = 1,
/// Subordinate CA. Could be issued by a Private CA [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
/// or an unmanaged CA.
Subordinate = 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::SelfSigned => "SELF_SIGNED",
Type::Subordinate => "SUBORDINATE",
}
}
/// 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),
"SELF_SIGNED" => Some(Self::SelfSigned),
"SUBORDINATE" => Some(Self::Subordinate),
_ => None,
}
}
}
/// The tier of a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], indicating its supported
/// functionality and/or billing SKU.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Tier {
/// Not specified.
Unspecified = 0,
/// Enterprise tier.
Enterprise = 1,
/// DevOps tier.
Devops = 2,
}
impl Tier {
/// 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 {
Tier::Unspecified => "TIER_UNSPECIFIED",
Tier::Enterprise => "ENTERPRISE",
Tier::Devops => "DEVOPS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TIER_UNSPECIFIED" => Some(Self::Unspecified),
"ENTERPRISE" => Some(Self::Enterprise),
"DEVOPS" => Some(Self::Devops),
_ => None,
}
}
}
/// The state of a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], indicating if it can be used.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// Not specified.
Unspecified = 0,
/// Certificates can be issued from this CA. CRLs will be generated for this
/// CA.
Enabled = 1,
/// Certificates cannot be issued from this CA. CRLs will still be generated.
Disabled = 2,
/// Certificates cannot be issued from this CA. CRLs will not be generated.
PendingActivation = 3,
/// Certificates cannot be issued from this CA. CRLs will not be generated.
PendingDeletion = 4,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Enabled => "ENABLED",
State::Disabled => "DISABLED",
State::PendingActivation => "PENDING_ACTIVATION",
State::PendingDeletion => "PENDING_DELETION",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"ENABLED" => Some(Self::Enabled),
"DISABLED" => Some(Self::Disabled),
"PENDING_ACTIVATION" => Some(Self::PendingActivation),
"PENDING_DELETION" => Some(Self::PendingDeletion),
_ => None,
}
}
}
/// The algorithm of a Cloud KMS CryptoKeyVersion of a
/// [CryptoKey][google.cloud.kms.v1.CryptoKey] with the
/// [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value
/// `ASYMMETRIC_SIGN`. These values correspond to the
/// [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
/// values. For RSA signing algorithms, the PSS algorithms should be preferred,
/// use PKCS1 algorithms if required for compatibility. For further
/// recommandations, see
/// <https://cloud.google.com/kms/docs/algorithms#algorithm_recommendations.>
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SignHashAlgorithm {
/// Not specified.
Unspecified = 0,
/// maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256
RsaPss2048Sha256 = 1,
/// maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256
RsaPss3072Sha256 = 2,
/// maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256
RsaPss4096Sha256 = 3,
/// maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256
RsaPkcs12048Sha256 = 6,
/// maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256
RsaPkcs13072Sha256 = 7,
/// maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256
RsaPkcs14096Sha256 = 8,
/// maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256
EcP256Sha256 = 4,
/// maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384
EcP384Sha384 = 5,
}
impl SignHashAlgorithm {
/// 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 {
SignHashAlgorithm::Unspecified => "SIGN_HASH_ALGORITHM_UNSPECIFIED",
SignHashAlgorithm::RsaPss2048Sha256 => "RSA_PSS_2048_SHA256",
SignHashAlgorithm::RsaPss3072Sha256 => "RSA_PSS_3072_SHA256",
SignHashAlgorithm::RsaPss4096Sha256 => "RSA_PSS_4096_SHA256",
SignHashAlgorithm::RsaPkcs12048Sha256 => "RSA_PKCS1_2048_SHA256",
SignHashAlgorithm::RsaPkcs13072Sha256 => "RSA_PKCS1_3072_SHA256",
SignHashAlgorithm::RsaPkcs14096Sha256 => "RSA_PKCS1_4096_SHA256",
SignHashAlgorithm::EcP256Sha256 => "EC_P256_SHA256",
SignHashAlgorithm::EcP384Sha384 => "EC_P384_SHA384",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SIGN_HASH_ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified),
"RSA_PSS_2048_SHA256" => Some(Self::RsaPss2048Sha256),
"RSA_PSS_3072_SHA256" => Some(Self::RsaPss3072Sha256),
"RSA_PSS_4096_SHA256" => Some(Self::RsaPss4096Sha256),
"RSA_PKCS1_2048_SHA256" => Some(Self::RsaPkcs12048Sha256),
"RSA_PKCS1_3072_SHA256" => Some(Self::RsaPkcs13072Sha256),
"RSA_PKCS1_4096_SHA256" => Some(Self::RsaPkcs14096Sha256),
"EC_P256_SHA256" => Some(Self::EcP256Sha256),
"EC_P384_SHA384" => Some(Self::EcP384Sha384),
_ => None,
}
}
}
}
/// A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] corresponds to a signed X.509 certificate
/// Revocation List (CRL). A CRL contains the serial numbers of certificates that
/// should no longer be trusted.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateRevocationList {
/// Output only. The resource path for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in
/// the format
/// `projects/*/locations/*/certificateAuthorities/*/
/// certificateRevocationLists/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The CRL sequence number that appears in pem_crl.
#[prost(int64, tag = "2")]
pub sequence_number: i64,
/// Output only. The revoked serial numbers that appear in pem_crl.
#[prost(message, repeated, tag = "3")]
pub revoked_certificates: ::prost::alloc::vec::Vec<
certificate_revocation_list::RevokedCertificate,
>,
/// Output only. The PEM-encoded X.509 CRL.
#[prost(string, tag = "4")]
pub pem_crl: ::prost::alloc::string::String,
/// Output only. The location where 'pem_crl' can be accessed.
#[prost(string, tag = "5")]
pub access_url: ::prost::alloc::string::String,
/// Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
#[prost(enumeration = "certificate_revocation_list::State", tag = "6")]
pub state: i32,
/// Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was created.
#[prost(message, optional, tag = "7")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was updated.
#[prost(message, optional, tag = "8")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Optional. Labels with user-defined metadata.
#[prost(btree_map = "string, string", tag = "9")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// Nested message and enum types in `CertificateRevocationList`.
pub mod certificate_revocation_list {
/// Describes a revoked [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RevokedCertificate {
/// The resource path for the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
/// `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
#[prost(string, tag = "1")]
pub certificate: ::prost::alloc::string::String,
/// The serial number of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
#[prost(string, tag = "2")]
pub hex_serial_number: ::prost::alloc::string::String,
/// The reason the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
#[prost(enumeration = "super::RevocationReason", tag = "3")]
pub revocation_reason: i32,
}
/// The state of a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], indicating if it is current.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// Not specified.
Unspecified = 0,
/// The [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] is up to date.
Active = 1,
/// The [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] is no longer current.
Superseded = 2,
}
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::Active => "ACTIVE",
State::Superseded => "SUPERSEDED",
}
}
/// 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),
"ACTIVE" => Some(Self::Active),
"SUPERSEDED" => Some(Self::Superseded),
_ => None,
}
}
}
}
/// A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] corresponds to a signed X.509 certificate issued by a
/// [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Certificate {
/// Output only. The resource path for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
/// `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. Immutable. The desired lifetime of a certificate. Used to create the
/// "not_before_time" and "not_after_time" fields inside an X.509
/// certificate. Note that the lifetime may be truncated if it would extend
/// past the life of any certificate authority in the issuing chain.
#[prost(message, optional, tag = "4")]
pub lifetime: ::core::option::Option<::prost_types::Duration>,
/// Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This
/// [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present.
#[prost(message, optional, tag = "5")]
pub revocation_details: ::core::option::Option<certificate::RevocationDetails>,
/// Output only. The pem-encoded, signed X.509 certificate.
#[prost(string, tag = "6")]
pub pem_certificate: ::prost::alloc::string::String,
/// Output only. A structured description of the issued X.509 certificate.
#[prost(message, optional, tag = "7")]
pub certificate_description: ::core::option::Option<CertificateDescription>,
/// Output only. The chain that may be used to verify the X.509 certificate. Expected to be
/// in issuer-to-root order according to RFC 5246.
#[prost(string, repeated, tag = "8")]
pub pem_certificate_chain: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created.
#[prost(message, optional, tag = "9")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated.
#[prost(message, optional, tag = "10")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Optional. Labels with user-defined metadata.
#[prost(btree_map = "string, string", tag = "11")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// The config used to create a signed X.509 certificate.
#[prost(oneof = "certificate::CertificateConfig", tags = "2, 3")]
pub certificate_config: ::core::option::Option<certificate::CertificateConfig>,
}
/// Nested message and enum types in `Certificate`.
pub mod certificate {
/// Describes fields that are relavent to the revocation of a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RevocationDetails {
/// Indicates why a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
#[prost(enumeration = "super::RevocationReason", tag = "1")]
pub revocation_state: i32,
/// The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked.
#[prost(message, optional, tag = "2")]
pub revocation_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// The config used to create a signed X.509 certificate.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum CertificateConfig {
/// Immutable. A pem-encoded X.509 certificate signing request (CSR).
#[prost(string, tag = "2")]
PemCsr(::prost::alloc::string::String),
/// Immutable. A description of the certificate and key that does not require X.509 or
/// ASN.1.
#[prost(message, tag = "3")]
Config(super::CertificateConfig),
}
}
/// A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] refers to a managed [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues]. Those, in
/// turn, are used to describe certain fields of an X.509 certificate, such as
/// the key usage fields, fields specific to CA certificates, certificate policy
/// extensions and custom extensions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReusableConfig {
/// Output only. The resource path for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
/// `projects/*/locations/*/reusableConfigs/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. The config values.
#[prost(message, optional, tag = "2")]
pub values: ::core::option::Option<ReusableConfigValues>,
/// Optional. A human-readable description of scenarios these ReusableConfigValues may be
/// compatible with.
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
/// Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created.
#[prost(message, optional, tag = "4")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated.
#[prost(message, optional, tag = "5")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Optional. Labels with user-defined metadata.
#[prost(btree_map = "string, string", tag = "6")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// A [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] is used to describe certain fields of an
/// X.509 certificate, such as the key usage fields, fields specific to CA
/// certificates, certificate policy extensions and custom extensions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReusableConfigValues {
/// Optional. Indicates the intended use for keys that correspond to a certificate.
#[prost(message, optional, tag = "1")]
pub key_usage: ::core::option::Option<KeyUsage>,
/// Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are
/// relevant in a CA certificate.
#[prost(message, optional, tag = "2")]
pub ca_options: ::core::option::Option<reusable_config_values::CaOptions>,
/// Optional. Describes the X.509 certificate policy object identifiers, per
/// <https://tools.ietf.org/html/rfc5280#section-4.2.1.4.>
#[prost(message, repeated, tag = "3")]
pub policy_ids: ::prost::alloc::vec::Vec<ObjectId>,
/// Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
/// that appear in the "Authority Information Access" extension in the
/// certificate.
#[prost(string, repeated, tag = "4")]
pub aia_ocsp_servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. Describes custom X.509 extensions.
#[prost(message, repeated, tag = "5")]
pub additional_extensions: ::prost::alloc::vec::Vec<X509Extension>,
}
/// Nested message and enum types in `ReusableConfigValues`.
pub mod reusable_config_values {
/// Describes values that are relevant in a CA certificate.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CaOptions {
/// Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
/// value is missing, the extension will be omitted from the CA certificate.
#[prost(message, optional, tag = "1")]
pub is_ca: ::core::option::Option<bool>,
/// Optional. Refers to the path length restriction X.509 extension. For a CA
/// certificate, this value describes the depth of subordinate CA
/// certificates that are allowed.
/// If this value is less than 0, the request will fail.
/// If this value is missing, the max path length will be omitted from the
/// CA certificate.
#[prost(message, optional, tag = "2")]
pub max_issuer_path_length: ::core::option::Option<i32>,
}
}
/// A [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] describes values that may assist in creating an
/// X.509 certificate, or a reference to a pre-defined set of values.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReusableConfigWrapper {
/// Reusable or inline config values.
#[prost(oneof = "reusable_config_wrapper::ConfigValues", tags = "1, 2")]
pub config_values: ::core::option::Option<reusable_config_wrapper::ConfigValues>,
}
/// Nested message and enum types in `ReusableConfigWrapper`.
pub mod reusable_config_wrapper {
/// Reusable or inline config values.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ConfigValues {
/// Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
/// `projects/*/locations/*/reusableConfigs/*`.
#[prost(string, tag = "1")]
ReusableConfig(::prost::alloc::string::String),
/// Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
#[prost(message, tag = "2")]
ReusableConfigValues(super::ReusableConfigValues),
}
}
/// Describes a subordinate CA's issuers. This is either a resource path to a
/// known issuing [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], or a PEM issuer certificate chain.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubordinateConfig {
#[prost(oneof = "subordinate_config::SubordinateConfig", tags = "1, 2")]
pub subordinate_config: ::core::option::Option<
subordinate_config::SubordinateConfig,
>,
}
/// Nested message and enum types in `SubordinateConfig`.
pub mod subordinate_config {
/// This message describes a subordinate CA's issuer certificate chain. This
/// wrapper exists for compatibility reasons.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubordinateConfigChain {
/// Required. Expected to be in leaf-to-root order according to RFC 5246.
#[prost(string, repeated, tag = "1")]
pub pem_certificates: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SubordinateConfig {
/// Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the same project that
/// was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. This field
/// is used for information and usability purposes only. The resource name
/// is in the format `projects/*/locations/*/certificateAuthorities/*`.
#[prost(string, tag = "1")]
CertificateAuthority(::prost::alloc::string::String),
/// Required. Contains the PEM certificate chain for the issuers of this
/// [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself.
#[prost(message, tag = "2")]
PemIssuerChain(SubordinateConfigChain),
}
}
/// A [PublicKey][google.cloud.security.privateca.v1beta1.PublicKey] describes a public key.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PublicKey {
/// Required. The type of public key.
#[prost(enumeration = "public_key::KeyType", tag = "1")]
pub r#type: i32,
/// Required. A public key. Padding and encoding varies by 'KeyType' and is described
/// along with the KeyType values.
#[prost(bytes = "bytes", tag = "2")]
pub key: ::prost::bytes::Bytes,
}
/// Nested message and enum types in `PublicKey`.
pub mod public_key {
/// Types of public keys that are supported.
/// At a minimum, we support RSA and ECDSA, for the key sizes or curves listed:
/// <https://cloud.google.com/kms/docs/algorithms#asymmetric_signing_algorithms>
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum KeyType {
/// Default unspecified value.
Unspecified = 0,
/// A PEM-encoded PKCS#1/RFC 3447 RSAPrivateKey structure.
PemRsaKey = 1,
/// A PEM-encoded compressed NIST P-256/secp256r1/prime256v1 or P-384 key.
PemEcKey = 2,
}
impl KeyType {
/// 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 {
KeyType::Unspecified => "KEY_TYPE_UNSPECIFIED",
KeyType::PemRsaKey => "PEM_RSA_KEY",
KeyType::PemEcKey => "PEM_EC_KEY",
}
}
/// 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_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PEM_RSA_KEY" => Some(Self::PemRsaKey),
"PEM_EC_KEY" => Some(Self::PemEcKey),
_ => None,
}
}
}
}
/// A [CertificateConfig][google.cloud.security.privateca.v1beta1.CertificateConfig] describes an X.509 certificate or CSR that is to be
/// created, as an alternative to using ASN.1.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateConfig {
/// Required. Specifies some of the values in a certificate that are related to the
/// subject.
#[prost(message, optional, tag = "1")]
pub subject_config: ::core::option::Option<certificate_config::SubjectConfig>,
/// Required. Describes how some of the technical fields in a certificate should be
/// populated.
#[prost(message, optional, tag = "2")]
pub reusable_config: ::core::option::Option<ReusableConfigWrapper>,
/// Optional. The public key that corresponds to this config. This is, for example, used
/// when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a
/// self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR.
#[prost(message, optional, tag = "3")]
pub public_key: ::core::option::Option<PublicKey>,
}
/// Nested message and enum types in `CertificateConfig`.
pub mod certificate_config {
/// These values are used to create the distinguished name and subject
/// alternative name fields in an X.509 certificate.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubjectConfig {
/// Required. Contains distinguished name fields such as the location and organization.
#[prost(message, optional, tag = "1")]
pub subject: ::core::option::Option<super::Subject>,
/// Optional. The "common name" of the distinguished name.
#[prost(string, tag = "2")]
pub common_name: ::prost::alloc::string::String,
/// Optional. The subject alternative name fields.
#[prost(message, optional, tag = "3")]
pub subject_alt_name: ::core::option::Option<super::SubjectAltNames>,
}
}
/// A [CertificateDescription][google.cloud.security.privateca.v1beta1.CertificateDescription] describes an X.509 certificate or CSR that has
/// been issued, as an alternative to using ASN.1 / X.509.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateDescription {
/// Describes some of the values in a certificate that are related to the
/// subject and lifetime.
#[prost(message, optional, tag = "1")]
pub subject_description: ::core::option::Option<
certificate_description::SubjectDescription,
>,
/// Describes some of the technical fields in a certificate.
#[prost(message, optional, tag = "2")]
pub config_values: ::core::option::Option<ReusableConfigValues>,
/// The public key that corresponds to an issued certificate.
#[prost(message, optional, tag = "3")]
pub public_key: ::core::option::Option<PublicKey>,
/// Provides a means of identifiying certificates that contain a particular
/// public key, per <https://tools.ietf.org/html/rfc5280#section-4.2.1.2.>
#[prost(message, optional, tag = "4")]
pub subject_key_id: ::core::option::Option<certificate_description::KeyId>,
/// Identifies the subject_key_id of the parent certificate, per
/// <https://tools.ietf.org/html/rfc5280#section-4.2.1.1>
#[prost(message, optional, tag = "5")]
pub authority_key_id: ::core::option::Option<certificate_description::KeyId>,
/// Describes a list of locations to obtain CRL information, i.e.
/// the DistributionPoint.fullName described by
/// <https://tools.ietf.org/html/rfc5280#section-4.2.1.13>
#[prost(string, repeated, tag = "6")]
pub crl_distribution_points: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
/// Describes lists of issuer CA certificate URLs that appear in the
/// "Authority Information Access" extension in the certificate.
#[prost(string, repeated, tag = "7")]
pub aia_issuing_certificate_urls: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
/// The hash of the x.509 certificate.
#[prost(message, optional, tag = "8")]
pub cert_fingerprint: ::core::option::Option<
certificate_description::CertificateFingerprint,
>,
}
/// Nested message and enum types in `CertificateDescription`.
pub mod certificate_description {
/// These values describe fields in an issued X.509 certificate such as the
/// distinguished name, subject alternative names, serial number, and lifetime.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubjectDescription {
/// Contains distinguished name fields such as the location and organization.
#[prost(message, optional, tag = "1")]
pub subject: ::core::option::Option<super::Subject>,
/// The "common name" of the distinguished name.
#[prost(string, tag = "2")]
pub common_name: ::prost::alloc::string::String,
/// The subject alternative name fields.
#[prost(message, optional, tag = "3")]
pub subject_alt_name: ::core::option::Option<super::SubjectAltNames>,
/// The serial number encoded in lowercase hexadecimal.
#[prost(string, tag = "4")]
pub hex_serial_number: ::prost::alloc::string::String,
/// For convenience, the actual lifetime of an issued certificate.
/// Corresponds to 'not_after_time' - 'not_before_time'.
#[prost(message, optional, tag = "5")]
pub lifetime: ::core::option::Option<::prost_types::Duration>,
/// The time at which the certificate becomes valid.
#[prost(message, optional, tag = "6")]
pub not_before_time: ::core::option::Option<::prost_types::Timestamp>,
/// The time at which the certificate expires.
#[prost(message, optional, tag = "7")]
pub not_after_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// A KeyId identifies a specific public key, usually by hashing the public
/// key.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyId {
/// Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most
/// likely the 160 bit SHA-1 hash of the public key.
#[prost(string, tag = "1")]
pub key_id: ::prost::alloc::string::String,
}
/// A group of fingerprints for the x509 certificate.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateFingerprint {
/// The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.
#[prost(string, tag = "1")]
pub sha256_hash: ::prost::alloc::string::String,
}
}
/// An [ObjectId][google.cloud.security.privateca.v1beta1.ObjectId] specifies an object identifier (OID). These provide context
/// and describe types in ASN.1 messages.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectId {
/// Required. The parts of an OID path. The most significant parts of the path come
/// first.
#[prost(int32, repeated, packed = "false", tag = "1")]
pub object_id_path: ::prost::alloc::vec::Vec<i32>,
}
/// An [X509Extension][google.cloud.security.privateca.v1beta1.X509Extension] specifies an X.509 extension, which may be used in
/// different parts of X.509 objects like certificates, CSRs, and CRLs.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct X509Extension {
/// Required. The OID for this X.509 extension.
#[prost(message, optional, tag = "1")]
pub object_id: ::core::option::Option<ObjectId>,
/// Required. Indicates whether or not this extension is critical (i.e., if the client
/// does not know how to handle this extension, the client should consider this
/// to be an error).
#[prost(bool, tag = "2")]
pub critical: bool,
/// Required. The value of this X.509 extension.
#[prost(bytes = "bytes", tag = "3")]
pub value: ::prost::bytes::Bytes,
}
/// A [KeyUsage][google.cloud.security.privateca.v1beta1.KeyUsage] describes key usage values that may appear in an X.509
/// certificate.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyUsage {
/// Describes high-level ways in which a key may be used.
#[prost(message, optional, tag = "1")]
pub base_key_usage: ::core::option::Option<key_usage::KeyUsageOptions>,
/// Detailed scenarios in which a key may be used.
#[prost(message, optional, tag = "2")]
pub extended_key_usage: ::core::option::Option<key_usage::ExtendedKeyUsageOptions>,
/// Used to describe extended key usages that are not listed in the
/// [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message.
#[prost(message, repeated, tag = "3")]
pub unknown_extended_key_usages: ::prost::alloc::vec::Vec<ObjectId>,
}
/// Nested message and enum types in `KeyUsage`.
pub mod key_usage {
/// [KeyUsage.KeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions] corresponds to the key usage values
/// described in <https://tools.ietf.org/html/rfc5280#section-4.2.1.3.>
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct KeyUsageOptions {
/// The key may be used for digital signatures.
#[prost(bool, tag = "1")]
pub digital_signature: bool,
/// The key may be used for cryptographic commitments. Note that this may
/// also be referred to as "non-repudiation".
#[prost(bool, tag = "2")]
pub content_commitment: bool,
/// The key may be used to encipher other keys.
#[prost(bool, tag = "3")]
pub key_encipherment: bool,
/// The key may be used to encipher data.
#[prost(bool, tag = "4")]
pub data_encipherment: bool,
/// The key may be used in a key agreement protocol.
#[prost(bool, tag = "5")]
pub key_agreement: bool,
/// The key may be used to sign certificates.
#[prost(bool, tag = "6")]
pub cert_sign: bool,
/// The key may be used sign certificate revocation lists.
#[prost(bool, tag = "7")]
pub crl_sign: bool,
/// The key may be used to encipher only.
#[prost(bool, tag = "8")]
pub encipher_only: bool,
/// The key may be used to decipher only.
#[prost(bool, tag = "9")]
pub decipher_only: bool,
}
/// [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] has fields that correspond to
/// certain common OIDs that could be specified as an extended key usage value.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ExtendedKeyUsageOptions {
/// Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW
/// server authentication", though regularly used for non-WWW TLS.
#[prost(bool, tag = "1")]
pub server_auth: bool,
/// Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW
/// client authentication", though regularly used for non-WWW TLS.
#[prost(bool, tag = "2")]
pub client_auth: bool,
/// Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of
/// downloadable executable code client authentication".
#[prost(bool, tag = "3")]
pub code_signing: bool,
/// Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email
/// protection".
#[prost(bool, tag = "4")]
pub email_protection: bool,
/// Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding
/// the hash of an object to a time".
#[prost(bool, tag = "5")]
pub time_stamping: bool,
/// Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing
/// OCSP responses".
#[prost(bool, tag = "6")]
pub ocsp_signing: bool,
}
}
/// [Subject][google.cloud.security.privateca.v1beta1.Subject] describes parts of a distinguished name that, in turn,
/// describes the subject of the certificate.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Subject {
/// The country code of the subject.
#[prost(string, tag = "1")]
pub country_code: ::prost::alloc::string::String,
/// The organization of the subject.
#[prost(string, tag = "2")]
pub organization: ::prost::alloc::string::String,
/// The organizational_unit of the subject.
#[prost(string, tag = "3")]
pub organizational_unit: ::prost::alloc::string::String,
/// The locality or city of the subject.
#[prost(string, tag = "4")]
pub locality: ::prost::alloc::string::String,
/// The province, territory, or regional state of the subject.
#[prost(string, tag = "5")]
pub province: ::prost::alloc::string::String,
/// The street address of the subject.
#[prost(string, tag = "6")]
pub street_address: ::prost::alloc::string::String,
/// The postal code of the subject.
#[prost(string, tag = "7")]
pub postal_code: ::prost::alloc::string::String,
}
/// [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames] corresponds to a more modern way of listing what
/// the asserted identity is in a certificate (i.e., compared to the "common
/// name" in the distinguished name).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubjectAltNames {
/// Contains only valid, fully-qualified host names.
#[prost(string, repeated, tag = "1")]
pub dns_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Contains only valid RFC 3986 URIs.
#[prost(string, repeated, tag = "2")]
pub uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Contains only valid RFC 2822 E-mail addresses.
#[prost(string, repeated, tag = "3")]
pub email_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
#[prost(string, repeated, tag = "4")]
pub ip_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Contains additional subject alternative name values.
#[prost(message, repeated, tag = "5")]
pub custom_sans: ::prost::alloc::vec::Vec<X509Extension>,
}
/// A [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] indicates whether a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] has been revoked,
/// and the reason for revocation. These correspond to standard revocation
/// reasons from RFC 5280. Note that the enum labels and values in this
/// definition are not the same ASN.1 values defined in RFC 5280. These values
/// will be translated to the correct ASN.1 values when a CRL is created.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RevocationReason {
/// Default unspecified value. This value does indicate that a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]
/// has been revoked, but that a reason has not been recorded.
Unspecified = 0,
/// Key material for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] may have leaked.
KeyCompromise = 1,
/// The key material for a certificate authority in the issuing path may have
/// leaked.
CertificateAuthorityCompromise = 2,
/// The subject or other attributes in this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] have changed.
AffiliationChanged = 3,
/// This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] has been superseded.
Superseded = 4,
/// This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] or entities in the issuing path have ceased to
/// operate.
CessationOfOperation = 5,
/// This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] should not be considered valid, it is expected that it
/// may become valid in the future.
CertificateHold = 6,
/// This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] no longer has permission to assert the listed
/// attributes.
PrivilegeWithdrawn = 7,
/// The authority which determines appropriate attributes for a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]
/// may have been compromised.
AttributeAuthorityCompromise = 8,
}
impl RevocationReason {
/// 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 {
RevocationReason::Unspecified => "REVOCATION_REASON_UNSPECIFIED",
RevocationReason::KeyCompromise => "KEY_COMPROMISE",
RevocationReason::CertificateAuthorityCompromise => {
"CERTIFICATE_AUTHORITY_COMPROMISE"
}
RevocationReason::AffiliationChanged => "AFFILIATION_CHANGED",
RevocationReason::Superseded => "SUPERSEDED",
RevocationReason::CessationOfOperation => "CESSATION_OF_OPERATION",
RevocationReason::CertificateHold => "CERTIFICATE_HOLD",
RevocationReason::PrivilegeWithdrawn => "PRIVILEGE_WITHDRAWN",
RevocationReason::AttributeAuthorityCompromise => {
"ATTRIBUTE_AUTHORITY_COMPROMISE"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REVOCATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"KEY_COMPROMISE" => Some(Self::KeyCompromise),
"CERTIFICATE_AUTHORITY_COMPROMISE" => {
Some(Self::CertificateAuthorityCompromise)
}
"AFFILIATION_CHANGED" => Some(Self::AffiliationChanged),
"SUPERSEDED" => Some(Self::Superseded),
"CESSATION_OF_OPERATION" => Some(Self::CessationOfOperation),
"CERTIFICATE_HOLD" => Some(Self::CertificateHold),
"PRIVILEGE_WITHDRAWN" => Some(Self::PrivilegeWithdrawn),
"ATTRIBUTE_AUTHORITY_COMPROMISE" => Some(Self::AttributeAuthorityCompromise),
_ => None,
}
}
}
/// Request message for [CertificateAuthorityService.CreateCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCertificateRequest {
/// Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
/// associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format
/// `projects/*/locations/*/certificateAuthorities/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. It must be unique within a location and match the regular
/// expression `\[a-zA-Z0-9_-\]{1,63}`. This field is required when using a
/// [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier],
/// but is optional and its value is ignored otherwise.
#[prost(string, tag = "2")]
pub certificate_id: ::prost::alloc::string::String,
/// Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values.
#[prost(message, optional, tag = "3")]
pub certificate: ::core::option::Option<Certificate>,
/// Optional. An ID to identify requests. Specify a unique request ID so that if you must
/// retry your request, the server will know to ignore the request if it has
/// already been completed. The server will guarantee that for at least 60
/// minutes since the first request.
///
/// For example, consider a situation where you make an initial request and t
/// he request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [CertificateAuthorityService.GetCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCertificateRequest {
/// Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificatesRequest {
/// Required. The resource name of the location associated with the
/// [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format
/// `projects/*/locations/*/certificateauthorities/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. Limit on the number of
/// [Certificates][google.cloud.security.privateca.v1beta1.Certificate] to include in the
/// response. Further [Certificates][google.cloud.security.privateca.v1beta1.Certificate] can subsequently be obtained
/// by including the
/// [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token] in a subsequent
/// request. If unspecified, the server will pick an appropriate default.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Optional. Pagination token, returned earlier via
/// [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token].
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Optional. Only include resources that match the filter in the response. For details
/// on supported filters and syntax, see [Certificates Filtering
/// documentation](<https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support>).
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Optional. Specify how the results should be sorted. For details on supported fields
/// and syntax, see [Certificates Sorting
/// documentation](<https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support>).
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response message for [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificatesResponse {
/// The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
#[prost(message, repeated, tag = "1")]
pub certificates: ::prost::alloc::vec::Vec<Certificate>,
/// A token to retrieve next page of results. Pass this value in
/// [ListCertificatesRequest.next_page_token][] to retrieve the
/// next page of results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// A list of locations (e.g. "us-west1") that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request message for
/// [CertificateAuthorityService.RevokeCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RevokeCertificateRequest {
/// Required. The resource name for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the
/// format `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate.
#[prost(enumeration = "RevocationReason", tag = "2")]
pub reason: i32,
/// Optional. An ID to identify requests. Specify a unique request ID so that if you must
/// retry your request, the server will know to ignore the request if it has
/// already been completed. The server will guarantee that for at least 60
/// minutes since the first request.
///
/// For example, consider a situation where you make an initial request and t
/// he request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for [CertificateAuthorityService.UpdateCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCertificateRequest {
/// Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values.
#[prost(message, optional, tag = "1")]
pub certificate: ::core::option::Option<Certificate>,
/// Required. A list of fields to be updated in this request.
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Optional. An ID to identify requests. Specify a unique request ID so that if you must
/// retry your request, the server will know to ignore the request if it has
/// already been completed. The server will guarantee that for at least 60
/// minutes since the first request.
///
/// For example, consider a situation where you make an initial request and t
/// he request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [CertificateAuthorityService.ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivateCertificateAuthorityRequest {
/// Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
/// format `projects/*/locations/*/certificateAuthorities/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. The signed CA certificate issued from
/// [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr].
#[prost(string, tag = "2")]
pub pem_ca_certificate: ::prost::alloc::string::String,
/// Required. Must include information about the issuer of 'pem_ca_certificate', and any
/// further issuers until the self-signed CA.
#[prost(message, optional, tag = "3")]
pub subordinate_config: ::core::option::Option<SubordinateConfig>,
/// Optional. An ID to identify requests. Specify a unique request ID so that if you must
/// retry your request, the server will know to ignore the request if it has
/// already been completed. The server will guarantee that for at least 60
/// minutes since the first request.
///
/// For example, consider a situation where you make an initial request and t
/// he request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [CertificateAuthorityService.CreateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCertificateAuthorityRequest {
/// Required. The resource name of the location associated with the
/// [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
/// `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. It must be unique within a location and match the regular
/// expression `\[a-zA-Z0-9_-\]{1,63}`
#[prost(string, tag = "2")]
pub certificate_authority_id: ::prost::alloc::string::String,
/// Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values.
#[prost(message, optional, tag = "3")]
pub certificate_authority: ::core::option::Option<CertificateAuthority>,
/// Optional. An ID to identify requests. Specify a unique request ID so that if you must
/// retry your request, the server will know to ignore the request if it has
/// already been completed. The server will guarantee that for at least 60
/// minutes since the first request.
///
/// For example, consider a situation where you make an initial request and t
/// he request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [CertificateAuthorityService.DisableCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DisableCertificateAuthorityRequest {
/// Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
/// format `projects/*/locations/*/certificateAuthorities/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. An ID to identify requests. Specify a unique request ID so that if you must
/// retry your request, the server will know to ignore the request if it has
/// already been completed. The server will guarantee that for at least 60
/// minutes since the first request.
///
/// For example, consider a situation where you make an initial request and t
/// he request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [CertificateAuthorityService.EnableCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnableCertificateAuthorityRequest {
/// Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
/// format `projects/*/locations/*/certificateAuthorities/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. An ID to identify requests. Specify a unique request ID so that if you must
/// retry your request, the server will know to ignore the request if it has
/// already been completed. The server will guarantee that for at least 60
/// minutes since the first request.
///
/// For example, consider a situation where you make an initial request and t
/// he request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchCertificateAuthorityCsrRequest {
/// Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
/// format `projects/*/locations/*/certificateAuthorities/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Response message for
/// [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchCertificateAuthorityCsrResponse {
/// Output only. The PEM-encoded signed certificate signing request (CSR).
#[prost(string, tag = "1")]
pub pem_csr: ::prost::alloc::string::String,
}
/// Request message for [CertificateAuthorityService.GetCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCertificateAuthorityRequest {
/// Required. The [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
/// get.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for
/// [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificateAuthoritiesRequest {
/// Required. The resource name of the location associated with the
/// [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format
/// `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. Limit on the number of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
/// include in the response.
/// Further [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] can subsequently be
/// obtained by including the
/// [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token] in a subsequent
/// request. If unspecified, the server will pick an appropriate default.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Optional. Pagination token, returned earlier via
/// [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token].
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Optional. Only include resources that match the filter in the response.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Optional. Specify how the results should be sorted.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response message for
/// [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificateAuthoritiesResponse {
/// The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
#[prost(message, repeated, tag = "1")]
pub certificate_authorities: ::prost::alloc::vec::Vec<CertificateAuthority>,
/// A token to retrieve next page of results. Pass this value in
/// [ListCertificateAuthoritiesRequest.next_page_token][] to retrieve the next
/// page of results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// A list of locations (e.g. "us-west1") that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request message for
/// [CertificateAuthorityService.RestoreCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreCertificateAuthorityRequest {
/// Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
/// format `projects/*/locations/*/certificateAuthorities/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. An ID to identify requests. Specify a unique request ID so that if you must
/// retry your request, the server will know to ignore the request if it has
/// already been completed. The server will guarantee that for at least 60
/// minutes since the first request.
///
/// For example, consider a situation where you make an initial request and t
/// he request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [CertificateAuthorityService.ScheduleDeleteCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScheduleDeleteCertificateAuthorityRequest {
/// Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
/// format `projects/*/locations/*/certificateAuthorities/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. An ID to identify requests. Specify a unique request ID so that if you must
/// retry your request, the server will know to ignore the request if it has
/// already been completed. The server will guarantee that for at least 60
/// minutes since the first request.
///
/// For example, consider a situation where you make an initial request and t
/// he request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [CertificateAuthorityService.UpdateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCertificateAuthorityRequest {
/// Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values.
#[prost(message, optional, tag = "1")]
pub certificate_authority: ::core::option::Option<CertificateAuthority>,
/// Required. A list of fields to be updated in this request.
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Optional. An ID to identify requests. Specify a unique request ID so that if you must
/// retry your request, the server will know to ignore the request if it has
/// already been completed. The server will guarantee that for at least 60
/// minutes since the first request.
///
/// For example, consider a situation where you make an initial request and t
/// he request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [CertificateAuthorityService.GetCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCertificateRevocationListRequest {
/// Required. The [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the
/// [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for
/// [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificateRevocationListsRequest {
/// Required. The resource name of the location associated with the
/// [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format
/// `projects/*/locations/*/certificateauthorities/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. Limit on the number of
/// [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to include in the
/// response. Further [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
/// can subsequently be obtained by including the
/// [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token] in a subsequent
/// request. If unspecified, the server will pick an appropriate default.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Optional. Pagination token, returned earlier via
/// [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token].
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Optional. Only include resources that match the filter in the response.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Optional. Specify how the results should be sorted.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response message for
/// [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCertificateRevocationListsResponse {
/// The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
#[prost(message, repeated, tag = "1")]
pub certificate_revocation_lists: ::prost::alloc::vec::Vec<
CertificateRevocationList,
>,
/// A token to retrieve next page of results. Pass this value in
/// [ListCertificateRevocationListsRequest.next_page_token][] to retrieve the
/// next page of results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// A list of locations (e.g. "us-west1") that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request message for
/// [CertificateAuthorityService.UpdateCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCertificateRevocationListRequest {
/// Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values.
#[prost(message, optional, tag = "1")]
pub certificate_revocation_list: ::core::option::Option<CertificateRevocationList>,
/// Required. A list of fields to be updated in this request.
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Optional. An ID to identify requests. Specify a unique request ID so that if you must
/// retry your request, the server will know to ignore the request if it has
/// already been completed. The server will guarantee that for at least 60
/// minutes since the first request.
///
/// For example, consider a situation where you make an initial request and t
/// he request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [CertificateAuthorityService.GetReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetReusableConfigRequest {
/// Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for
/// [CertificateAuthorityService.ListReusableConfigs][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListReusableConfigsRequest {
/// Required. The resource name of the location associated with the
/// [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
/// `projects/*/locations/*`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. Limit on the number of
/// [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] to include in the response.
/// Further [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] can subsequently be
/// obtained by including the
/// [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token] in a subsequent request. If
/// unspecified, the server will pick an appropriate default.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Optional. Pagination token, returned earlier via
/// [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token].
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Optional. Only include resources that match the filter in the response.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Optional. Specify how the results should be sorted.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response message for
/// [CertificateAuthorityService.ListReusableConfigs][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListReusableConfigsResponse {
/// The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
#[prost(message, repeated, tag = "1")]
pub reusable_configs: ::prost::alloc::vec::Vec<ReusableConfig>,
/// A token to retrieve next page of results. Pass this value in
/// [ListReusableConfigsRequest.next_page_token][] to retrieve
/// the next page of results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// A list of locations (e.g. "us-west1") that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Represents the metadata of the long-running operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
/// Output only. The time the operation was created.
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time the operation finished running.
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Server-defined resource path for the target of the operation.
#[prost(string, tag = "3")]
pub target: ::prost::alloc::string::String,
/// Output only. Name of the verb executed by the operation.
#[prost(string, tag = "4")]
pub verb: ::prost::alloc::string::String,
/// Output only. Human-readable status of the operation, if any.
#[prost(string, tag = "5")]
pub status_message: ::prost::alloc::string::String,
/// Output only. 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,
/// Output only. API version used to start the operation.
#[prost(string, tag = "7")]
pub api_version: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod certificate_authority_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// [Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private
/// certificate authorities and issued certificates.
#[derive(Debug, Clone)]
pub struct CertificateAuthorityServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CertificateAuthorityServiceClient<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,
) -> CertificateAuthorityServiceClient<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,
{
CertificateAuthorityServiceClient::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
}
/// Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular
/// [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
pub async fn create_certificate(
&mut self,
request: impl tonic::IntoRequest<super::CreateCertificateRequest>,
) -> 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.security.privateca.v1beta1.CertificateAuthorityService/CreateCertificate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"CreateCertificate",
),
);
self.inner.unary(req, path, codec).await
}
/// Returns a [Certificate][google.cloud.security.privateca.v1beta1.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.security.privateca.v1beta1.CertificateAuthorityService/GetCertificate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"GetCertificate",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
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.security.privateca.v1beta1.CertificateAuthorityService/ListCertificates",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"ListCertificates",
),
);
self.inner.unary(req, path, codec).await
}
/// Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
pub async fn revoke_certificate(
&mut self,
request: impl tonic::IntoRequest<super::RevokeCertificateRequest>,
) -> 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.security.privateca.v1beta1.CertificateAuthorityService/RevokeCertificate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"RevokeCertificate",
),
);
self.inner.unary(req, path, codec).await
}
/// Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. Currently, the only field you can update is the
/// [labels][google.cloud.security.privateca.v1beta1.Certificate.labels] field.
pub async fn update_certificate(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCertificateRequest>,
) -> 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.security.privateca.v1beta1.CertificateAuthorityService/UpdateCertificate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"UpdateCertificate",
),
);
self.inner.unary(req, path, codec).await
}
/// Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state
/// [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is
/// of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the
/// parent Certificate Authority signs a certificate signing request from
/// [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation
/// process.
pub async fn activate_certificate_authority(
&mut self,
request: impl tonic::IntoRequest<super::ActivateCertificateAuthorityRequest>,
) -> std::result::Result<
tonic::Response<super::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.security.privateca.v1beta1.CertificateAuthorityService/ActivateCertificateAuthority",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"ActivateCertificateAuthority",
),
);
self.inner.unary(req, path, codec).await
}
/// Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.
pub async fn create_certificate_authority(
&mut self,
request: impl tonic::IntoRequest<super::CreateCertificateAuthorityRequest>,
) -> std::result::Result<
tonic::Response<super::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.security.privateca.v1beta1.CertificateAuthorityService/CreateCertificateAuthority",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"CreateCertificateAuthority",
),
);
self.inner.unary(req, path, codec).await
}
/// Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
pub async fn disable_certificate_authority(
&mut self,
request: impl tonic::IntoRequest<super::DisableCertificateAuthorityRequest>,
) -> std::result::Result<
tonic::Response<super::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.security.privateca.v1beta1.CertificateAuthorityService/DisableCertificateAuthority",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"DisableCertificateAuthority",
),
);
self.inner.unary(req, path, codec).await
}
/// Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
pub async fn enable_certificate_authority(
&mut self,
request: impl tonic::IntoRequest<super::EnableCertificateAuthorityRequest>,
) -> std::result::Result<
tonic::Response<super::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.security.privateca.v1beta1.CertificateAuthorityService/EnableCertificateAuthority",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"EnableCertificateAuthority",
),
);
self.inner.unary(req, path, codec).await
}
/// Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
/// that is in state
/// [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is
/// of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must
/// then be signed by the desired parent Certificate Authority, which could be
/// another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem
/// certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].
pub async fn fetch_certificate_authority_csr(
&mut self,
request: impl tonic::IntoRequest<super::FetchCertificateAuthorityCsrRequest>,
) -> std::result::Result<
tonic::Response<super::FetchCertificateAuthorityCsrResponse>,
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.security.privateca.v1beta1.CertificateAuthorityService/FetchCertificateAuthorityCsr",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"FetchCertificateAuthorityCsr",
),
);
self.inner.unary(req, path, codec).await
}
/// Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
pub async fn get_certificate_authority(
&mut self,
request: impl tonic::IntoRequest<super::GetCertificateAuthorityRequest>,
) -> std::result::Result<
tonic::Response<super::CertificateAuthority>,
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.security.privateca.v1beta1.CertificateAuthorityService/GetCertificateAuthority",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"GetCertificateAuthority",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
pub async fn list_certificate_authorities(
&mut self,
request: impl tonic::IntoRequest<super::ListCertificateAuthoritiesRequest>,
) -> std::result::Result<
tonic::Response<super::ListCertificateAuthoritiesResponse>,
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.security.privateca.v1beta1.CertificateAuthorityService/ListCertificateAuthorities",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"ListCertificateAuthorities",
),
);
self.inner.unary(req, path, codec).await
}
/// Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.
pub async fn restore_certificate_authority(
&mut self,
request: impl tonic::IntoRequest<super::RestoreCertificateAuthorityRequest>,
) -> std::result::Result<
tonic::Response<super::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.security.privateca.v1beta1.CertificateAuthorityService/RestoreCertificateAuthority",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"RestoreCertificateAuthority",
),
);
self.inner.unary(req, path, codec).await
}
/// Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.
pub async fn schedule_delete_certificate_authority(
&mut self,
request: impl tonic::IntoRequest<
super::ScheduleDeleteCertificateAuthorityRequest,
>,
) -> std::result::Result<
tonic::Response<super::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.security.privateca.v1beta1.CertificateAuthorityService/ScheduleDeleteCertificateAuthority",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"ScheduleDeleteCertificateAuthority",
),
);
self.inner.unary(req, path, codec).await
}
/// Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
pub async fn update_certificate_authority(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCertificateAuthorityRequest>,
) -> std::result::Result<
tonic::Response<super::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.security.privateca.v1beta1.CertificateAuthorityService/UpdateCertificateAuthority",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"UpdateCertificateAuthority",
),
);
self.inner.unary(req, path, codec).await
}
/// Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
pub async fn get_certificate_revocation_list(
&mut self,
request: impl tonic::IntoRequest<super::GetCertificateRevocationListRequest>,
) -> std::result::Result<
tonic::Response<super::CertificateRevocationList>,
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.security.privateca.v1beta1.CertificateAuthorityService/GetCertificateRevocationList",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"GetCertificateRevocationList",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
pub async fn list_certificate_revocation_lists(
&mut self,
request: impl tonic::IntoRequest<
super::ListCertificateRevocationListsRequest,
>,
) -> std::result::Result<
tonic::Response<super::ListCertificateRevocationListsResponse>,
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.security.privateca.v1beta1.CertificateAuthorityService/ListCertificateRevocationLists",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"ListCertificateRevocationLists",
),
);
self.inner.unary(req, path, codec).await
}
/// Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
pub async fn update_certificate_revocation_list(
&mut self,
request: impl tonic::IntoRequest<
super::UpdateCertificateRevocationListRequest,
>,
) -> std::result::Result<
tonic::Response<super::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.security.privateca.v1beta1.CertificateAuthorityService/UpdateCertificateRevocationList",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"UpdateCertificateRevocationList",
),
);
self.inner.unary(req, path, codec).await
}
/// Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
pub async fn get_reusable_config(
&mut self,
request: impl tonic::IntoRequest<super::GetReusableConfigRequest>,
) -> std::result::Result<tonic::Response<super::ReusableConfig>, 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.security.privateca.v1beta1.CertificateAuthorityService/GetReusableConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"GetReusableConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
pub async fn list_reusable_configs(
&mut self,
request: impl tonic::IntoRequest<super::ListReusableConfigsRequest>,
) -> std::result::Result<
tonic::Response<super::ListReusableConfigsResponse>,
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.security.privateca.v1beta1.CertificateAuthorityService/ListReusableConfigs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.security.privateca.v1beta1.CertificateAuthorityService",
"ListReusableConfigs",
),
);
self.inner.unary(req, path, codec).await
}
}
}