1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775
// This file is @generated by prost-build.
/// Holds a single traffic routing entry for the Service. Allocations can be done
/// to a specific Revision name, or pointing to the latest Ready Revision.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TrafficTarget {
/// The allocation type for this traffic target.
#[prost(enumeration = "TrafficTargetAllocationType", tag = "1")]
pub r#type: i32,
/// Revision to which to send this portion of traffic, if traffic allocation is
/// by revision.
#[prost(string, tag = "2")]
pub revision: ::prost::alloc::string::String,
/// Specifies percent of the traffic to this Revision.
/// This defaults to zero if unspecified.
#[prost(int32, tag = "3")]
pub percent: i32,
/// Indicates a string to be part of the URI to exclusively reference this
/// target.
#[prost(string, tag = "4")]
pub tag: ::prost::alloc::string::String,
}
/// Represents the observed state of a single `TrafficTarget` entry.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TrafficTargetStatus {
/// The allocation type for this traffic target.
#[prost(enumeration = "TrafficTargetAllocationType", tag = "1")]
pub r#type: i32,
/// Revision to which this traffic is sent.
#[prost(string, tag = "2")]
pub revision: ::prost::alloc::string::String,
/// Specifies percent of the traffic to this Revision.
#[prost(int32, tag = "3")]
pub percent: i32,
/// Indicates the string used in the URI to exclusively reference this target.
#[prost(string, tag = "4")]
pub tag: ::prost::alloc::string::String,
/// Displays the target URI.
#[prost(string, tag = "5")]
pub uri: ::prost::alloc::string::String,
}
/// The type of instance allocation.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TrafficTargetAllocationType {
/// Unspecified instance allocation type.
Unspecified = 0,
/// Allocates instances to the Service's latest ready Revision.
Latest = 1,
/// Allocates instances to a Revision by name.
Revision = 2,
}
impl TrafficTargetAllocationType {
/// 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 {
TrafficTargetAllocationType::Unspecified => {
"TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED"
}
TrafficTargetAllocationType::Latest => {
"TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST"
}
TrafficTargetAllocationType::Revision => {
"TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST" => Some(Self::Latest),
"TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION" => Some(Self::Revision),
_ => None,
}
}
}
/// A single application container.
/// This specifies both the container to run, the command to run in the container
/// and the arguments to supply to it.
/// Note that additional arguments can be supplied by the system to the container
/// at runtime.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Container {
/// Name of the container specified as a DNS_LABEL (RFC 1123).
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. Name of the container image in Dockerhub, Google Artifact
/// Registry, or Google Container Registry. If the host is not provided,
/// Dockerhub is assumed.
#[prost(string, tag = "2")]
pub image: ::prost::alloc::string::String,
/// Entrypoint array. Not executed within a shell.
/// The docker image's ENTRYPOINT is used if this is not provided.
#[prost(string, repeated, tag = "3")]
pub command: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Arguments to the entrypoint.
/// The docker image's CMD is used if this is not provided.
#[prost(string, repeated, tag = "4")]
pub args: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// List of environment variables to set in the container.
#[prost(message, repeated, tag = "5")]
pub env: ::prost::alloc::vec::Vec<EnvVar>,
/// Compute Resource requirements by this container.
#[prost(message, optional, tag = "6")]
pub resources: ::core::option::Option<ResourceRequirements>,
/// List of ports to expose from the container. Only a single port can be
/// specified. The specified ports must be listening on all interfaces
/// (0.0.0.0) within the container to be accessible.
///
/// If omitted, a port number will be chosen and passed to the container
/// through the PORT environment variable for the container to listen on.
#[prost(message, repeated, tag = "7")]
pub ports: ::prost::alloc::vec::Vec<ContainerPort>,
/// Volume to mount into the container's filesystem.
#[prost(message, repeated, tag = "8")]
pub volume_mounts: ::prost::alloc::vec::Vec<VolumeMount>,
/// Container's working directory.
/// If not specified, the container runtime's default will be used, which
/// might be configured in the container image.
#[prost(string, tag = "9")]
pub working_dir: ::prost::alloc::string::String,
/// Periodic probe of container liveness.
/// Container will be restarted if the probe fails.
#[prost(message, optional, tag = "10")]
pub liveness_probe: ::core::option::Option<Probe>,
/// Startup probe of application within the container.
/// All other probes are disabled if a startup probe is provided, until it
/// succeeds. Container will not be added to service endpoints if the probe
/// fails.
#[prost(message, optional, tag = "11")]
pub startup_probe: ::core::option::Option<Probe>,
/// Names of the containers that must start before this container.
#[prost(string, repeated, tag = "12")]
pub depends_on: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// ResourceRequirements describes the compute resource requirements.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceRequirements {
/// Only `memory` and `cpu` keys in the map are supported.
///
/// <p>Notes:
/// * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4
/// CPU requires at least 2Gi of memory. For more information, go to
/// <https://cloud.google.com/run/docs/configuring/cpu.>
/// * For supported 'memory' values and syntax, go to
/// <https://cloud.google.com/run/docs/configuring/memory-limits>
#[prost(btree_map = "string, string", tag = "1")]
pub limits: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Determines whether CPU is only allocated during requests (true by default).
/// However, if ResourceRequirements is set, the caller must explicitly
/// set this field to true to preserve the default behavior.
#[prost(bool, tag = "2")]
pub cpu_idle: bool,
/// Determines whether CPU should be boosted on startup of a new container
/// instance above the requested CPU threshold, this can help reduce cold-start
/// latency.
#[prost(bool, tag = "3")]
pub startup_cpu_boost: bool,
}
/// EnvVar represents an environment variable present in a Container.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnvVar {
/// Required. Name of the environment variable. Must not exceed 32768
/// characters.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(oneof = "env_var::Values", tags = "2, 3")]
pub values: ::core::option::Option<env_var::Values>,
}
/// Nested message and enum types in `EnvVar`.
pub mod env_var {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Values {
/// Variable references $(VAR_NAME) are expanded
/// using the previous defined environment variables in the container and
/// any route environment variables. If a variable cannot be resolved,
/// the reference in the input string will be unchanged. The $(VAR_NAME)
/// syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
/// references will never be expanded, regardless of whether the variable
/// exists or not.
/// Defaults to "", and the maximum length is 32768 bytes.
#[prost(string, tag = "2")]
Value(::prost::alloc::string::String),
/// Source for the environment variable's value.
#[prost(message, tag = "3")]
ValueSource(super::EnvVarSource),
}
}
/// EnvVarSource represents a source for the value of an EnvVar.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnvVarSource {
/// Selects a secret and a specific version from Cloud Secret Manager.
#[prost(message, optional, tag = "1")]
pub secret_key_ref: ::core::option::Option<SecretKeySelector>,
}
/// SecretEnvVarSource represents a source for the value of an EnvVar.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SecretKeySelector {
/// Required. The name of the secret in Cloud Secret Manager.
/// Format: {secret_name} if the secret is in the same project.
/// projects/{project}/secrets/{secret_name} if the secret is
/// in a different project.
#[prost(string, tag = "1")]
pub secret: ::prost::alloc::string::String,
/// The Cloud Secret Manager secret version.
/// Can be 'latest' for the latest version, an integer for a specific version,
/// or a version alias.
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
}
/// ContainerPort represents a network port in a single container.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContainerPort {
/// If specified, used to specify which protocol to use.
/// Allowed values are "http1" and "h2c".
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Port number the container listens on.
/// This must be a valid TCP port number, 0 < container_port < 65536.
#[prost(int32, tag = "3")]
pub container_port: i32,
}
/// VolumeMount describes a mounting of a Volume within a container.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VolumeMount {
/// Required. This must match the Name of a Volume.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. Path within the container at which the volume should be mounted.
/// Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must
/// otherwise be `/cloudsql`. All instances defined in the Volume will be
/// available as `/cloudsql/\[instance\]`. For more information on Cloud SQL
/// volumes, visit <https://cloud.google.com/sql/docs/mysql/connect-run>
#[prost(string, tag = "3")]
pub mount_path: ::prost::alloc::string::String,
}
/// Volume represents a named volume in a container.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Volume {
/// Required. Volume's name.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(oneof = "volume::VolumeType", tags = "2, 3, 4, 5, 6")]
pub volume_type: ::core::option::Option<volume::VolumeType>,
}
/// Nested message and enum types in `Volume`.
pub mod volume {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum VolumeType {
/// Secret represents a secret that should populate this volume.
#[prost(message, tag = "2")]
Secret(super::SecretVolumeSource),
/// For Cloud SQL volumes, contains the specific instances that should be
/// mounted. Visit <https://cloud.google.com/sql/docs/mysql/connect-run> for
/// more information on how to connect Cloud SQL and Cloud Run.
#[prost(message, tag = "3")]
CloudSqlInstance(super::CloudSqlInstance),
/// Ephemeral storage used as a shared volume.
#[prost(message, tag = "4")]
EmptyDir(super::EmptyDirVolumeSource),
/// For NFS Voumes, contains the path to the nfs Volume
#[prost(message, tag = "5")]
Nfs(super::NfsVolumeSource),
/// Persistent storage backed by a Google Cloud Storage bucket.
#[prost(message, tag = "6")]
Gcs(super::GcsVolumeSource),
}
}
/// The secret's value will be presented as the content of a file whose
/// name is defined in the item path. If no items are defined, the name of
/// the file is the secret.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SecretVolumeSource {
/// Required. The name of the secret in Cloud Secret Manager.
/// Format: {secret} if the secret is in the same project.
/// projects/{project}/secrets/{secret} if the secret is
/// in a different project.
#[prost(string, tag = "1")]
pub secret: ::prost::alloc::string::String,
/// If unspecified, the volume will expose a file whose name is the
/// secret, relative to VolumeMount.mount_path.
/// If specified, the key will be used as the version to fetch from Cloud
/// Secret Manager and the path will be the name of the file exposed in the
/// volume. When items are defined, they must specify a path and a version.
#[prost(message, repeated, tag = "2")]
pub items: ::prost::alloc::vec::Vec<VersionToPath>,
/// Integer representation of mode bits to use on created files by default.
/// Must be a value between 0000 and 0777 (octal), defaulting to 0444.
/// Directories within the path are not affected by this setting.
///
/// Notes
///
/// * Internally, a umask of 0222 will be applied to any non-zero value.
/// * This is an integer representation of the mode bits. So, the octal
/// integer value should look exactly as the chmod numeric notation with a
/// leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or
/// 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or
/// 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493
/// (base-10).
/// * This might be in conflict with other options that affect the
/// file mode, like fsGroup, and the result can be other mode bits set.
///
/// This might be in conflict with other options that affect the
/// file mode, like fsGroup, and as a result, other mode bits could be set.
#[prost(int32, tag = "3")]
pub default_mode: i32,
}
/// VersionToPath maps a specific version of a secret to a relative file to mount
/// to, relative to VolumeMount's mount_path.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VersionToPath {
/// Required. The relative path of the secret in the container.
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
/// The Cloud Secret Manager secret version.
/// Can be 'latest' for the latest value, or an integer or a secret alias for a
/// specific version.
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
/// Integer octal mode bits to use on this file, must be a value between
/// 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be
/// used.
///
/// Notes
///
/// * Internally, a umask of 0222 will be applied to any non-zero value.
/// * This is an integer representation of the mode bits. So, the octal
/// integer value should look exactly as the chmod numeric notation with a
/// leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or
/// 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or
/// 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493
/// (base-10).
/// * This might be in conflict with other options that affect the
/// file mode, like fsGroup, and the result can be other mode bits set.
#[prost(int32, tag = "3")]
pub mode: i32,
}
/// Represents a set of Cloud SQL instances. Each one will be available under
/// /cloudsql/\[instance\]. Visit
/// <https://cloud.google.com/sql/docs/mysql/connect-run> for more information on
/// how to connect Cloud SQL and Cloud Run.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudSqlInstance {
/// The Cloud SQL instance connection names, as can be found in
/// <https://console.cloud.google.com/sql/instances.> Visit
/// <https://cloud.google.com/sql/docs/mysql/connect-run> for more information on
/// how to connect Cloud SQL and Cloud Run. Format:
/// {project}:{location}:{instance}
#[prost(string, repeated, tag = "1")]
pub instances: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// In memory (tmpfs) ephemeral storage.
/// It is ephemeral in the sense that when the sandbox is taken down, the data is
/// destroyed with it (it does not persist across sandbox runs).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EmptyDirVolumeSource {
/// The medium on which the data is stored. Acceptable values today is only
/// MEMORY or none. When none, the default will currently be backed by memory
/// but could change over time. +optional
#[prost(enumeration = "empty_dir_volume_source::Medium", tag = "1")]
pub medium: i32,
/// Limit on the storage usable by this EmptyDir volume.
/// The size limit is also applicable for memory medium.
/// The maximum usage on memory medium EmptyDir would be the minimum value
/// between the SizeLimit specified here and the sum of memory limits of all
/// containers. The default is nil which means that the limit is undefined.
/// More info:
/// <https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume.>
/// Info in Kubernetes:
/// <https://kubernetes.io/docs/concepts/storage/volumes/#emptydir>
#[prost(string, tag = "2")]
pub size_limit: ::prost::alloc::string::String,
}
/// Nested message and enum types in `EmptyDirVolumeSource`.
pub mod empty_dir_volume_source {
/// The different types of medium supported for EmptyDir.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Medium {
/// When not specified, falls back to the default implementation which
/// is currently in memory (this may change over time).
Unspecified = 0,
/// Explicitly set the EmptyDir to be in memory. Uses tmpfs.
Memory = 1,
}
impl Medium {
/// 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 {
Medium::Unspecified => "MEDIUM_UNSPECIFIED",
Medium::Memory => "MEMORY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MEDIUM_UNSPECIFIED" => Some(Self::Unspecified),
"MEMORY" => Some(Self::Memory),
_ => None,
}
}
}
}
/// Represents an NFS mount.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NfsVolumeSource {
/// Hostname or IP address of the NFS server
#[prost(string, tag = "1")]
pub server: ::prost::alloc::string::String,
/// Path that is exported by the NFS server.
#[prost(string, tag = "2")]
pub path: ::prost::alloc::string::String,
/// If true, the volume will be mounted as read only for all mounts.
#[prost(bool, tag = "3")]
pub read_only: bool,
}
/// Represents a volume backed by a Cloud Storage bucket using Cloud Storage
/// FUSE.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcsVolumeSource {
/// Cloud Storage Bucket name.
#[prost(string, tag = "1")]
pub bucket: ::prost::alloc::string::String,
/// If true, the volume will be mounted as read only for all mounts.
#[prost(bool, tag = "2")]
pub read_only: bool,
}
/// Probe describes a health check to be performed against a container to
/// determine whether it is alive or ready to receive traffic.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Probe {
/// Optional. Number of seconds after the container has started before the
/// probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum
/// value for liveness probe is 3600. Maximum value for startup probe is 240.
#[prost(int32, tag = "1")]
pub initial_delay_seconds: i32,
/// Optional. Number of seconds after which the probe times out.
/// Defaults to 1 second. Minimum value is 1. Maximum value is 3600.
/// Must be smaller than period_seconds.
#[prost(int32, tag = "2")]
pub timeout_seconds: i32,
/// Optional. How often (in seconds) to perform the probe.
/// Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe
/// is 3600. Maximum value for startup probe is 240.
/// Must be greater or equal than timeout_seconds.
#[prost(int32, tag = "3")]
pub period_seconds: i32,
/// Optional. Minimum consecutive failures for the probe to be considered
/// failed after having succeeded. Defaults to 3. Minimum value is 1.
#[prost(int32, tag = "4")]
pub failure_threshold: i32,
#[prost(oneof = "probe::ProbeType", tags = "5, 6, 7")]
pub probe_type: ::core::option::Option<probe::ProbeType>,
}
/// Nested message and enum types in `Probe`.
pub mod probe {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ProbeType {
/// Optional. HTTPGet specifies the http request to perform.
/// Exactly one of httpGet, tcpSocket, or grpc must be specified.
#[prost(message, tag = "5")]
HttpGet(super::HttpGetAction),
/// Optional. TCPSocket specifies an action involving a TCP port.
/// Exactly one of httpGet, tcpSocket, or grpc must be specified.
#[prost(message, tag = "6")]
TcpSocket(super::TcpSocketAction),
/// Optional. GRPC specifies an action involving a gRPC port.
/// Exactly one of httpGet, tcpSocket, or grpc must be specified.
#[prost(message, tag = "7")]
Grpc(super::GrpcAction),
}
}
/// HTTPGetAction describes an action based on HTTP Get requests.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpGetAction {
/// Optional. Path to access on the HTTP server. Defaults to '/'.
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
/// Optional. Custom headers to set in the request. HTTP allows repeated
/// headers.
#[prost(message, repeated, tag = "4")]
pub http_headers: ::prost::alloc::vec::Vec<HttpHeader>,
/// Optional. Port number to access on the container. Must be in the range 1 to
/// 65535. If not specified, defaults to the exposed port of the container,
/// which is the value of container.ports\[0\].containerPort.
#[prost(int32, tag = "5")]
pub port: i32,
}
/// HTTPHeader describes a custom header to be used in HTTP probes
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpHeader {
/// Required. The header field name
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. The header field value
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
/// TCPSocketAction describes an action based on opening a socket
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TcpSocketAction {
/// Optional. Port number to access on the container. Must be in the range 1 to
/// 65535. If not specified, defaults to the exposed port of the container,
/// which is the value of container.ports\[0\].containerPort.
#[prost(int32, tag = "1")]
pub port: i32,
}
/// GRPCAction describes an action involving a GRPC port.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GrpcAction {
/// Optional. Port number of the gRPC service. Number must be in the range 1 to
/// 65535. If not specified, defaults to the exposed port of the container,
/// which is the value of container.ports\[0\].containerPort.
#[prost(int32, tag = "1")]
pub port: i32,
/// Optional. Service is the name of the service to place in the gRPC
/// HealthCheckRequest (see
/// <https://github.com/grpc/grpc/blob/master/doc/health-checking.md> ). If this
/// is not specified, the default behavior is defined by gRPC.
#[prost(string, tag = "2")]
pub service: ::prost::alloc::string::String,
}
/// VPC Access settings. For more information on sending traffic to a VPC
/// network, visit <https://cloud.google.com/run/docs/configuring/connecting-vpc.>
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VpcAccess {
/// VPC Access connector name.
/// Format: projects/{project}/locations/{location}/connectors/{connector},
/// where {project} can be project id or number.
/// For more information on sending traffic to a VPC network via a connector,
/// visit <https://cloud.google.com/run/docs/configuring/vpc-connectors.>
#[prost(string, tag = "1")]
pub connector: ::prost::alloc::string::String,
/// Optional. Traffic VPC egress settings. If not provided, it defaults to
/// PRIVATE_RANGES_ONLY.
#[prost(enumeration = "vpc_access::VpcEgress", tag = "2")]
pub egress: i32,
/// Optional. Direct VPC egress settings. Currently only single network
/// interface is supported.
#[prost(message, repeated, tag = "3")]
pub network_interfaces: ::prost::alloc::vec::Vec<vpc_access::NetworkInterface>,
}
/// Nested message and enum types in `VpcAccess`.
pub mod vpc_access {
/// Direct VPC egress settings.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkInterface {
/// Optional. The VPC network that the Cloud Run resource will be able to
/// send traffic to. At least one of network or subnetwork must be specified.
/// If both network and subnetwork are specified, the given VPC subnetwork
/// must belong to the given VPC network. If network is not specified, it
/// will be looked up from the subnetwork.
#[prost(string, tag = "1")]
pub network: ::prost::alloc::string::String,
/// Optional. The VPC subnetwork that the Cloud Run resource will get IPs
/// from. At least one of network or subnetwork must be specified. If both
/// network and subnetwork are specified, the given VPC subnetwork must
/// belong to the given VPC network. If subnetwork is not specified, the
/// subnetwork with the same name with the network will be used.
#[prost(string, tag = "2")]
pub subnetwork: ::prost::alloc::string::String,
/// Optional. Network tags applied to this Cloud Run resource.
#[prost(string, repeated, tag = "3")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Egress options for VPC access.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum VpcEgress {
/// Unspecified
Unspecified = 0,
/// All outbound traffic is routed through the VPC connector.
AllTraffic = 1,
/// Only private IP ranges are routed through the VPC connector.
PrivateRangesOnly = 2,
}
impl VpcEgress {
/// 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 {
VpcEgress::Unspecified => "VPC_EGRESS_UNSPECIFIED",
VpcEgress::AllTraffic => "ALL_TRAFFIC",
VpcEgress::PrivateRangesOnly => "PRIVATE_RANGES_ONLY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VPC_EGRESS_UNSPECIFIED" => Some(Self::Unspecified),
"ALL_TRAFFIC" => Some(Self::AllTraffic),
"PRIVATE_RANGES_ONLY" => Some(Self::PrivateRangesOnly),
_ => None,
}
}
}
}
/// Settings for Binary Authorization feature.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BinaryAuthorization {
/// Optional. If present, indicates to use Breakglass using this justification.
/// If use_default is False, then it must be empty.
/// For more information on breakglass, see
/// <https://cloud.google.com/binary-authorization/docs/using-breakglass>
#[prost(string, tag = "2")]
pub breakglass_justification: ::prost::alloc::string::String,
#[prost(oneof = "binary_authorization::BinauthzMethod", tags = "1, 3")]
pub binauthz_method: ::core::option::Option<binary_authorization::BinauthzMethod>,
}
/// Nested message and enum types in `BinaryAuthorization`.
pub mod binary_authorization {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum BinauthzMethod {
/// Optional. If True, indicates to use the default project's binary
/// authorization policy. If False, binary authorization will be disabled.
#[prost(bool, tag = "1")]
UseDefault(bool),
/// Optional. The path to a binary authorization policy.
/// Format: projects/{project}/platforms/cloudRun/{policy-name}
#[prost(string, tag = "3")]
Policy(::prost::alloc::string::String),
}
}
/// Settings for revision-level scaling settings.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RevisionScaling {
/// Optional. Minimum number of serving instances that this resource should
/// have.
#[prost(int32, tag = "1")]
pub min_instance_count: i32,
/// Optional. Maximum number of serving instances that this resource should
/// have.
#[prost(int32, tag = "2")]
pub max_instance_count: i32,
}
/// Scaling settings applied at the service level rather than
/// at the revision level.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ServiceScaling {
/// Optional. total min instances for the service. This number of instances is
/// divided among all revisions with specified traffic based on the percent
/// of traffic they are receiving. (BETA)
#[prost(int32, tag = "1")]
pub min_instance_count: i32,
}
/// Allowed ingress traffic for the Container.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IngressTraffic {
/// Unspecified
Unspecified = 0,
/// All inbound traffic is allowed.
All = 1,
/// Only internal traffic is allowed.
InternalOnly = 2,
/// Both internal and Google Cloud Load Balancer traffic is allowed.
InternalLoadBalancer = 3,
}
impl IngressTraffic {
/// 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 {
IngressTraffic::Unspecified => "INGRESS_TRAFFIC_UNSPECIFIED",
IngressTraffic::All => "INGRESS_TRAFFIC_ALL",
IngressTraffic::InternalOnly => "INGRESS_TRAFFIC_INTERNAL_ONLY",
IngressTraffic::InternalLoadBalancer => {
"INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INGRESS_TRAFFIC_UNSPECIFIED" => Some(Self::Unspecified),
"INGRESS_TRAFFIC_ALL" => Some(Self::All),
"INGRESS_TRAFFIC_INTERNAL_ONLY" => Some(Self::InternalOnly),
"INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER" => Some(Self::InternalLoadBalancer),
_ => None,
}
}
}
/// Alternatives for execution environments.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExecutionEnvironment {
/// Unspecified
Unspecified = 0,
/// Uses the First Generation environment.
Gen1 = 1,
/// Uses Second Generation environment.
Gen2 = 2,
}
impl ExecutionEnvironment {
/// 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 {
ExecutionEnvironment::Unspecified => "EXECUTION_ENVIRONMENT_UNSPECIFIED",
ExecutionEnvironment::Gen1 => "EXECUTION_ENVIRONMENT_GEN1",
ExecutionEnvironment::Gen2 => "EXECUTION_ENVIRONMENT_GEN2",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EXECUTION_ENVIRONMENT_UNSPECIFIED" => Some(Self::Unspecified),
"EXECUTION_ENVIRONMENT_GEN1" => Some(Self::Gen1),
"EXECUTION_ENVIRONMENT_GEN2" => Some(Self::Gen2),
_ => None,
}
}
}
/// Specifies behavior if an encryption key used by a resource is revoked.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EncryptionKeyRevocationAction {
/// Unspecified
Unspecified = 0,
/// Prevents the creation of new instances.
PreventNew = 1,
/// Shuts down existing instances, and prevents creation of new ones.
Shutdown = 2,
}
impl EncryptionKeyRevocationAction {
/// 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 {
EncryptionKeyRevocationAction::Unspecified => {
"ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED"
}
EncryptionKeyRevocationAction::PreventNew => "PREVENT_NEW",
EncryptionKeyRevocationAction::Shutdown => "SHUTDOWN",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED" => Some(Self::Unspecified),
"PREVENT_NEW" => Some(Self::PreventNew),
"SHUTDOWN" => Some(Self::Shutdown),
_ => None,
}
}
}
/// TaskTemplate describes the data a task should have when created
/// from a template.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TaskTemplate {
/// Holds the single container that defines the unit of execution for this
/// task.
#[prost(message, repeated, tag = "1")]
pub containers: ::prost::alloc::vec::Vec<Container>,
/// Optional. A list of Volumes to make available to containers.
#[prost(message, repeated, tag = "2")]
pub volumes: ::prost::alloc::vec::Vec<Volume>,
/// Optional. Max allowed time duration the Task may be active before the
/// system will actively try to mark it failed and kill associated containers.
/// This applies per attempt of a task, meaning each retry can run for the full
/// timeout. Defaults to 600 seconds.
#[prost(message, optional, tag = "4")]
pub timeout: ::core::option::Option<::prost_types::Duration>,
/// Optional. Email address of the IAM service account associated with the Task
/// of a Job. The service account represents the identity of the running task,
/// and determines what permissions the task has. If not provided, the task
/// will use the project's default service account.
#[prost(string, tag = "5")]
pub service_account: ::prost::alloc::string::String,
/// Optional. The execution environment being used to host this Task.
#[prost(enumeration = "ExecutionEnvironment", tag = "6")]
pub execution_environment: i32,
/// A reference to a customer managed encryption key (CMEK) to use to encrypt
/// this container image. For more information, go to
/// <https://cloud.google.com/run/docs/securing/using-cmek>
#[prost(string, tag = "7")]
pub encryption_key: ::prost::alloc::string::String,
/// Optional. VPC Access configuration to use for this Task. For more
/// information, visit
/// <https://cloud.google.com/run/docs/configuring/connecting-vpc.>
#[prost(message, optional, tag = "8")]
pub vpc_access: ::core::option::Option<VpcAccess>,
#[prost(oneof = "task_template::Retries", tags = "3")]
pub retries: ::core::option::Option<task_template::Retries>,
}
/// Nested message and enum types in `TaskTemplate`.
pub mod task_template {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Retries {
/// Number of retries allowed per Task, before marking this Task failed.
/// Defaults to 3.
#[prost(int32, tag = "3")]
MaxRetries(i32),
}
}
/// Effective settings for the current revision
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RevisionScalingStatus {
/// The current number of min instances provisioned for this revision.
#[prost(int32, tag = "1")]
pub desired_min_instance_count: i32,
}
/// RevisionTemplate describes the data a revision should have when created from
/// a template.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RevisionTemplate {
/// Optional. The unique name for the revision. If this field is omitted, it
/// will be automatically generated based on the Service name.
#[prost(string, tag = "1")]
pub revision: ::prost::alloc::string::String,
/// Optional. Unstructured key value map that can be used to organize and
/// categorize objects. User-provided labels are shared with Google's billing
/// system, so they can be used to filter, or break down billing charges by
/// team, component, environment, state, etc. For more information, visit
/// <https://cloud.google.com/resource-manager/docs/creating-managing-labels> or
/// <https://cloud.google.com/run/docs/configuring/labels.>
///
/// <p>Cloud Run API v2 does not support labels with `run.googleapis.com`,
/// `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
/// namespaces, and they will be rejected. All system labels in v1 now have a
/// corresponding field in v2 RevisionTemplate.
#[prost(btree_map = "string, string", tag = "2")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Optional. Unstructured key value map that may be set by external tools to
/// store and arbitrary metadata. They are not queryable and should be
/// preserved when modifying objects.
///
/// <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`,
/// `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
/// namespaces, and they will be rejected. All system annotations in v1 now
/// have a corresponding field in v2 RevisionTemplate.
///
/// <p>This field follows Kubernetes annotations' namespacing, limits, and
/// rules.
#[prost(btree_map = "string, string", tag = "3")]
pub annotations: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Optional. Scaling settings for this Revision.
#[prost(message, optional, tag = "4")]
pub scaling: ::core::option::Option<RevisionScaling>,
/// Optional. VPC Access configuration to use for this Revision. For more
/// information, visit
/// <https://cloud.google.com/run/docs/configuring/connecting-vpc.>
#[prost(message, optional, tag = "6")]
pub vpc_access: ::core::option::Option<VpcAccess>,
/// Optional. Max allowed time for an instance to respond to a request.
#[prost(message, optional, tag = "8")]
pub timeout: ::core::option::Option<::prost_types::Duration>,
/// Optional. Email address of the IAM service account associated with the
/// revision of the service. The service account represents the identity of the
/// running revision, and determines what permissions the revision has. If not
/// provided, the revision will use the project's default service account.
#[prost(string, tag = "9")]
pub service_account: ::prost::alloc::string::String,
/// Holds the single container that defines the unit of execution for this
/// Revision.
#[prost(message, repeated, tag = "10")]
pub containers: ::prost::alloc::vec::Vec<Container>,
/// Optional. A list of Volumes to make available to containers.
#[prost(message, repeated, tag = "11")]
pub volumes: ::prost::alloc::vec::Vec<Volume>,
/// Optional. The sandbox environment to host this Revision.
#[prost(enumeration = "ExecutionEnvironment", tag = "13")]
pub execution_environment: i32,
/// A reference to a customer managed encryption key (CMEK) to use to encrypt
/// this container image. For more information, go to
/// <https://cloud.google.com/run/docs/securing/using-cmek>
#[prost(string, tag = "14")]
pub encryption_key: ::prost::alloc::string::String,
/// Optional. Sets the maximum number of requests that each serving instance
/// can receive.
#[prost(int32, tag = "15")]
pub max_instance_request_concurrency: i32,
/// Optional. Enable session affinity.
#[prost(bool, tag = "19")]
pub session_affinity: bool,
/// Optional. Disables health checking containers during deployment.
#[prost(bool, tag = "20")]
pub health_check_disabled: bool,
}
/// Defines a status condition for a resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Condition {
/// type is used to communicate the status of the reconciliation process.
/// See also:
/// <https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting>
/// Types common to all resources include:
/// * "Ready": True when the Resource is ready.
#[prost(string, tag = "1")]
pub r#type: ::prost::alloc::string::String,
/// State of the condition.
#[prost(enumeration = "condition::State", tag = "2")]
pub state: i32,
/// Human readable message indicating details about the current status.
#[prost(string, tag = "3")]
pub message: ::prost::alloc::string::String,
/// Last time the condition transitioned from one status to another.
#[prost(message, optional, tag = "4")]
pub last_transition_time: ::core::option::Option<::prost_types::Timestamp>,
/// How to interpret failures of this condition, one of Error, Warning, Info
#[prost(enumeration = "condition::Severity", tag = "5")]
pub severity: i32,
/// The reason for this condition. Depending on the condition type,
/// it will populate one of these fields.
/// Successful conditions cannot have a reason.
#[prost(oneof = "condition::Reasons", tags = "6, 9, 11")]
pub reasons: ::core::option::Option<condition::Reasons>,
}
/// Nested message and enum types in `Condition`.
pub mod condition {
/// Represents the possible Condition states.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// The default value. This value is used if the state is omitted.
Unspecified = 0,
/// Transient state: Reconciliation has not started yet.
ConditionPending = 1,
/// Transient state: reconciliation is still in progress.
ConditionReconciling = 2,
/// Terminal state: Reconciliation did not succeed.
ConditionFailed = 3,
/// Terminal state: Reconciliation completed successfully.
ConditionSucceeded = 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::ConditionPending => "CONDITION_PENDING",
State::ConditionReconciling => "CONDITION_RECONCILING",
State::ConditionFailed => "CONDITION_FAILED",
State::ConditionSucceeded => "CONDITION_SUCCEEDED",
}
}
/// 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),
"CONDITION_PENDING" => Some(Self::ConditionPending),
"CONDITION_RECONCILING" => Some(Self::ConditionReconciling),
"CONDITION_FAILED" => Some(Self::ConditionFailed),
"CONDITION_SUCCEEDED" => Some(Self::ConditionSucceeded),
_ => None,
}
}
}
/// Represents the severity of the condition failures.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Severity {
/// Unspecified severity
Unspecified = 0,
/// Error severity.
Error = 1,
/// Warning severity.
Warning = 2,
/// Info severity.
Info = 3,
}
impl Severity {
/// 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 {
Severity::Unspecified => "SEVERITY_UNSPECIFIED",
Severity::Error => "ERROR",
Severity::Warning => "WARNING",
Severity::Info => "INFO",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
"ERROR" => Some(Self::Error),
"WARNING" => Some(Self::Warning),
"INFO" => Some(Self::Info),
_ => None,
}
}
}
/// Reasons common to all types of conditions.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum CommonReason {
/// Default value.
Undefined = 0,
/// Reason unknown. Further details will be in message.
Unknown = 1,
/// Revision creation process failed.
RevisionFailed = 3,
/// Timed out waiting for completion.
ProgressDeadlineExceeded = 4,
/// The container image path is incorrect.
ContainerMissing = 6,
/// Insufficient permissions on the container image.
ContainerPermissionDenied = 7,
/// Container image is not authorized by policy.
ContainerImageUnauthorized = 8,
/// Container image policy authorization check failed.
ContainerImageAuthorizationCheckFailed = 9,
/// Insufficient permissions on encryption key.
EncryptionKeyPermissionDenied = 10,
/// Permission check on encryption key failed.
EncryptionKeyCheckFailed = 11,
/// At least one Access check on secrets failed.
SecretsAccessCheckFailed = 12,
/// Waiting for operation to complete.
WaitingForOperation = 13,
/// System will retry immediately.
ImmediateRetry = 14,
/// System will retry later; current attempt failed.
PostponedRetry = 15,
/// An internal error occurred. Further information may be in the message.
Internal = 16,
}
impl CommonReason {
/// 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 {
CommonReason::Undefined => "COMMON_REASON_UNDEFINED",
CommonReason::Unknown => "UNKNOWN",
CommonReason::RevisionFailed => "REVISION_FAILED",
CommonReason::ProgressDeadlineExceeded => "PROGRESS_DEADLINE_EXCEEDED",
CommonReason::ContainerMissing => "CONTAINER_MISSING",
CommonReason::ContainerPermissionDenied => "CONTAINER_PERMISSION_DENIED",
CommonReason::ContainerImageUnauthorized => {
"CONTAINER_IMAGE_UNAUTHORIZED"
}
CommonReason::ContainerImageAuthorizationCheckFailed => {
"CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED"
}
CommonReason::EncryptionKeyPermissionDenied => {
"ENCRYPTION_KEY_PERMISSION_DENIED"
}
CommonReason::EncryptionKeyCheckFailed => "ENCRYPTION_KEY_CHECK_FAILED",
CommonReason::SecretsAccessCheckFailed => "SECRETS_ACCESS_CHECK_FAILED",
CommonReason::WaitingForOperation => "WAITING_FOR_OPERATION",
CommonReason::ImmediateRetry => "IMMEDIATE_RETRY",
CommonReason::PostponedRetry => "POSTPONED_RETRY",
CommonReason::Internal => "INTERNAL",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"COMMON_REASON_UNDEFINED" => Some(Self::Undefined),
"UNKNOWN" => Some(Self::Unknown),
"REVISION_FAILED" => Some(Self::RevisionFailed),
"PROGRESS_DEADLINE_EXCEEDED" => Some(Self::ProgressDeadlineExceeded),
"CONTAINER_MISSING" => Some(Self::ContainerMissing),
"CONTAINER_PERMISSION_DENIED" => Some(Self::ContainerPermissionDenied),
"CONTAINER_IMAGE_UNAUTHORIZED" => Some(Self::ContainerImageUnauthorized),
"CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED" => {
Some(Self::ContainerImageAuthorizationCheckFailed)
}
"ENCRYPTION_KEY_PERMISSION_DENIED" => {
Some(Self::EncryptionKeyPermissionDenied)
}
"ENCRYPTION_KEY_CHECK_FAILED" => Some(Self::EncryptionKeyCheckFailed),
"SECRETS_ACCESS_CHECK_FAILED" => Some(Self::SecretsAccessCheckFailed),
"WAITING_FOR_OPERATION" => Some(Self::WaitingForOperation),
"IMMEDIATE_RETRY" => Some(Self::ImmediateRetry),
"POSTPONED_RETRY" => Some(Self::PostponedRetry),
"INTERNAL" => Some(Self::Internal),
_ => None,
}
}
}
/// Reasons specific to Revision resource.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RevisionReason {
/// Default value.
Undefined = 0,
/// Revision in Pending state.
Pending = 1,
/// Revision is in Reserve state.
Reserve = 2,
/// Revision is Retired.
Retired = 3,
/// Revision is being retired.
Retiring = 4,
/// Revision is being recreated.
Recreating = 5,
/// There was a health check error.
HealthCheckContainerError = 6,
/// Health check failed due to user error from customized path of the
/// container. System will retry.
CustomizedPathResponsePending = 7,
/// A revision with min_instance_count > 0 was created and is reserved, but
/// it was not configured to serve traffic, so it's not live. This can also
/// happen momentarily during traffic migration.
MinInstancesNotProvisioned = 8,
/// The maximum allowed number of active revisions has been reached.
ActiveRevisionLimitReached = 9,
/// There was no deployment defined.
/// This value is no longer used, but Services created in older versions of
/// the API might contain this value.
NoDeployment = 10,
/// A revision's container has no port specified since the revision is of a
/// manually scaled service with 0 instance count
HealthCheckSkipped = 11,
/// A revision with min_instance_count > 0 was created and is waiting for
/// enough instances to begin a traffic migration.
MinInstancesWarming = 12,
}
impl RevisionReason {
/// 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 {
RevisionReason::Undefined => "REVISION_REASON_UNDEFINED",
RevisionReason::Pending => "PENDING",
RevisionReason::Reserve => "RESERVE",
RevisionReason::Retired => "RETIRED",
RevisionReason::Retiring => "RETIRING",
RevisionReason::Recreating => "RECREATING",
RevisionReason::HealthCheckContainerError => {
"HEALTH_CHECK_CONTAINER_ERROR"
}
RevisionReason::CustomizedPathResponsePending => {
"CUSTOMIZED_PATH_RESPONSE_PENDING"
}
RevisionReason::MinInstancesNotProvisioned => {
"MIN_INSTANCES_NOT_PROVISIONED"
}
RevisionReason::ActiveRevisionLimitReached => {
"ACTIVE_REVISION_LIMIT_REACHED"
}
RevisionReason::NoDeployment => "NO_DEPLOYMENT",
RevisionReason::HealthCheckSkipped => "HEALTH_CHECK_SKIPPED",
RevisionReason::MinInstancesWarming => "MIN_INSTANCES_WARMING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REVISION_REASON_UNDEFINED" => Some(Self::Undefined),
"PENDING" => Some(Self::Pending),
"RESERVE" => Some(Self::Reserve),
"RETIRED" => Some(Self::Retired),
"RETIRING" => Some(Self::Retiring),
"RECREATING" => Some(Self::Recreating),
"HEALTH_CHECK_CONTAINER_ERROR" => Some(Self::HealthCheckContainerError),
"CUSTOMIZED_PATH_RESPONSE_PENDING" => {
Some(Self::CustomizedPathResponsePending)
}
"MIN_INSTANCES_NOT_PROVISIONED" => Some(Self::MinInstancesNotProvisioned),
"ACTIVE_REVISION_LIMIT_REACHED" => Some(Self::ActiveRevisionLimitReached),
"NO_DEPLOYMENT" => Some(Self::NoDeployment),
"HEALTH_CHECK_SKIPPED" => Some(Self::HealthCheckSkipped),
"MIN_INSTANCES_WARMING" => Some(Self::MinInstancesWarming),
_ => None,
}
}
}
/// Reasons specific to Execution resource.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ExecutionReason {
/// Default value.
Undefined = 0,
/// Internal system error getting execution status. System will retry.
JobStatusServicePollingError = 1,
/// A task reached its retry limit and the last attempt failed due to the
/// user container exiting with a non-zero exit code.
NonZeroExitCode = 2,
/// The execution was cancelled by users.
Cancelled = 3,
/// The execution is in the process of being cancelled.
Cancelling = 4,
/// The execution was deleted.
Deleted = 5,
}
impl ExecutionReason {
/// 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 {
ExecutionReason::Undefined => "EXECUTION_REASON_UNDEFINED",
ExecutionReason::JobStatusServicePollingError => {
"JOB_STATUS_SERVICE_POLLING_ERROR"
}
ExecutionReason::NonZeroExitCode => "NON_ZERO_EXIT_CODE",
ExecutionReason::Cancelled => "CANCELLED",
ExecutionReason::Cancelling => "CANCELLING",
ExecutionReason::Deleted => "DELETED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EXECUTION_REASON_UNDEFINED" => Some(Self::Undefined),
"JOB_STATUS_SERVICE_POLLING_ERROR" => {
Some(Self::JobStatusServicePollingError)
}
"NON_ZERO_EXIT_CODE" => Some(Self::NonZeroExitCode),
"CANCELLED" => Some(Self::Cancelled),
"CANCELLING" => Some(Self::Cancelling),
"DELETED" => Some(Self::Deleted),
_ => None,
}
}
}
/// The reason for this condition. Depending on the condition type,
/// it will populate one of these fields.
/// Successful conditions cannot have a reason.
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Reasons {
/// Output only. A common (service-level) reason for this condition.
#[prost(enumeration = "CommonReason", tag = "6")]
Reason(i32),
/// Output only. A reason for the revision condition.
#[prost(enumeration = "RevisionReason", tag = "9")]
RevisionReason(i32),
/// Output only. A reason for the execution condition.
#[prost(enumeration = "ExecutionReason", tag = "11")]
ExecutionReason(i32),
}
}
/// Request message for obtaining a Task by its full name.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTaskRequest {
/// Required. The full name of the Task.
/// Format:
/// projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task}
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for retrieving a list of Tasks.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTasksRequest {
/// Required. The Execution from which the Tasks should be listed.
/// To list all Tasks across Executions of a Job, use "-" instead of Execution
/// name. To list all Tasks across Jobs, use "-" instead of Job name. Format:
/// projects/{project}/locations/{location}/jobs/{job}/executions/{execution}
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum number of Tasks to return in this call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token received from a previous call to ListTasks.
/// All other parameters must match.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// If true, returns deleted (but unexpired) resources along with active ones.
#[prost(bool, tag = "4")]
pub show_deleted: bool,
}
/// Response message containing a list of Tasks.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTasksResponse {
/// The resulting list of Tasks.
#[prost(message, repeated, tag = "1")]
pub tasks: ::prost::alloc::vec::Vec<Task>,
/// A token indicating there are more items than page_size. Use it in the next
/// ListTasks request to continue.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Task represents a single run of a container to completion.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Task {
/// Output only. The unique name of this Task.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. Server assigned unique identifier for the Task. The value is a
/// UUID4 string and guaranteed to remain unchanged until the resource is
/// deleted.
#[prost(string, tag = "2")]
pub uid: ::prost::alloc::string::String,
/// Output only. A number that monotonically increases every time the user
/// modifies the desired state.
#[prost(int64, tag = "3")]
pub generation: i64,
/// Output only. Unstructured key value map that can be used to organize and
/// categorize objects. User-provided labels are shared with Google's billing
/// system, so they can be used to filter, or break down billing charges by
/// team, component, environment, state, etc. For more information, visit
/// <https://cloud.google.com/resource-manager/docs/creating-managing-labels> or
/// <https://cloud.google.com/run/docs/configuring/labels>
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. Unstructured key value map that may
/// be set by external tools to store and arbitrary metadata.
/// They are not queryable and should be preserved
/// when modifying objects.
#[prost(btree_map = "string, string", tag = "5")]
pub annotations: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. Represents time when the task was created by the system.
/// It is not guaranteed to be set in happens-before order across separate
/// operations.
#[prost(message, optional, tag = "6")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Represents time when the task was scheduled to run by the
/// system. It is not guaranteed to be set in happens-before order across
/// separate operations.
#[prost(message, optional, tag = "34")]
pub scheduled_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Represents time when the task started to run.
/// It is not guaranteed to be set in happens-before order across separate
/// operations.
#[prost(message, optional, tag = "27")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Represents time when the Task was completed. It is not
/// guaranteed to be set in happens-before order across separate operations.
#[prost(message, optional, tag = "7")]
pub completion_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The last-modified time.
#[prost(message, optional, tag = "8")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. For a deleted resource, the deletion time. It is only
/// populated as a response to a Delete request.
#[prost(message, optional, tag = "9")]
pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. For a deleted resource, the time after which it will be
/// permamently deleted. It is only populated as a response to a Delete
/// request.
#[prost(message, optional, tag = "10")]
pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The name of the parent Job.
#[prost(string, tag = "12")]
pub job: ::prost::alloc::string::String,
/// Output only. The name of the parent Execution.
#[prost(string, tag = "13")]
pub execution: ::prost::alloc::string::String,
/// Holds the single container that defines the unit of execution for this
/// task.
#[prost(message, repeated, tag = "14")]
pub containers: ::prost::alloc::vec::Vec<Container>,
/// A list of Volumes to make available to containers.
#[prost(message, repeated, tag = "15")]
pub volumes: ::prost::alloc::vec::Vec<Volume>,
/// Number of retries allowed per Task, before marking this Task failed.
#[prost(int32, tag = "16")]
pub max_retries: i32,
/// Max allowed time duration the Task may be active before the system will
/// actively try to mark it failed and kill associated containers. This applies
/// per attempt of a task, meaning each retry can run for the full timeout.
#[prost(message, optional, tag = "17")]
pub timeout: ::core::option::Option<::prost_types::Duration>,
/// Email address of the IAM service account associated with the Task of a
/// Job. The service account represents the identity of the
/// running task, and determines what permissions the task has. If
/// not provided, the task will use the project's default service account.
#[prost(string, tag = "18")]
pub service_account: ::prost::alloc::string::String,
/// The execution environment being used to host this Task.
#[prost(enumeration = "ExecutionEnvironment", tag = "20")]
pub execution_environment: i32,
/// Output only. Indicates whether the resource's reconciliation is still in
/// progress. See comments in `Job.reconciling` for additional information on
/// reconciliation process in Cloud Run.
#[prost(bool, tag = "21")]
pub reconciling: bool,
/// Output only. The Condition of this Task, containing its readiness status,
/// and detailed error information in case it did not reach the desired state.
#[prost(message, repeated, tag = "22")]
pub conditions: ::prost::alloc::vec::Vec<Condition>,
/// Output only. The generation of this Task. See comments in `Job.reconciling`
/// for additional information on reconciliation process in Cloud Run.
#[prost(int64, tag = "23")]
pub observed_generation: i64,
/// Output only. Index of the Task, unique per execution, and beginning at 0.
#[prost(int32, tag = "24")]
pub index: i32,
/// Output only. The number of times this Task was retried.
/// Tasks are retried when they fail up to the maxRetries limit.
#[prost(int32, tag = "25")]
pub retried: i32,
/// Output only. Result of the last attempt of this Task.
#[prost(message, optional, tag = "26")]
pub last_attempt_result: ::core::option::Option<TaskAttemptResult>,
/// Output only. A reference to a customer managed encryption key (CMEK) to use
/// to encrypt this container image. For more information, go to
/// <https://cloud.google.com/run/docs/securing/using-cmek>
#[prost(string, tag = "28")]
pub encryption_key: ::prost::alloc::string::String,
/// Output only. VPC Access configuration to use for this Task. For more
/// information, visit
/// <https://cloud.google.com/run/docs/configuring/connecting-vpc.>
#[prost(message, optional, tag = "29")]
pub vpc_access: ::core::option::Option<VpcAccess>,
/// Output only. URI where logs for this execution can be found in Cloud
/// Console.
#[prost(string, tag = "32")]
pub log_uri: ::prost::alloc::string::String,
/// Output only. Reserved for future use.
#[prost(bool, tag = "33")]
pub satisfies_pzs: bool,
/// Output only. A system-generated fingerprint for this version of the
/// resource. May be used to detect modification conflict during updates.
#[prost(string, tag = "99")]
pub etag: ::prost::alloc::string::String,
}
/// Result of a task attempt.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TaskAttemptResult {
/// Output only. The status of this attempt.
/// If the status code is OK, then the attempt succeeded.
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::super::super::rpc::Status>,
/// Output only. The exit code of this attempt.
/// This may be unset if the container was unable to exit cleanly with a code
/// due to some other failure.
/// See status field for possible failure details.
#[prost(int32, tag = "2")]
pub exit_code: i32,
}
/// Generated client implementations.
pub mod tasks_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Cloud Run Task Control Plane API.
#[derive(Debug, Clone)]
pub struct TasksClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> TasksClient<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,
) -> TasksClient<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,
{
TasksClient::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
}
/// Gets information about a Task.
pub async fn get_task(
&mut self,
request: impl tonic::IntoRequest<super::GetTaskRequest>,
) -> std::result::Result<tonic::Response<super::Task>, 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.run.v2.Tasks/GetTask",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Tasks", "GetTask"));
self.inner.unary(req, path, codec).await
}
/// Lists Tasks from an Execution of a Job.
pub async fn list_tasks(
&mut self,
request: impl tonic::IntoRequest<super::ListTasksRequest>,
) -> std::result::Result<
tonic::Response<super::ListTasksResponse>,
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.run.v2.Tasks/ListTasks",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Tasks", "ListTasks"));
self.inner.unary(req, path, codec).await
}
}
}
/// Request message for obtaining a Execution by its full name.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetExecutionRequest {
/// Required. The full name of the Execution.
/// Format:
/// `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
/// where `{project}` can be project id or number.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for retrieving a list of Executions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutionsRequest {
/// Required. The Execution from which the Executions should be listed.
/// To list all Executions across Jobs, use "-" instead of Job name.
/// Format: `projects/{project}/locations/{location}/jobs/{job}`, where
/// `{project}` can be project id or number.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum number of Executions to return in this call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token received from a previous call to ListExecutions.
/// All other parameters must match.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// If true, returns deleted (but unexpired) resources along with active ones.
#[prost(bool, tag = "4")]
pub show_deleted: bool,
}
/// Response message containing a list of Executions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutionsResponse {
/// The resulting list of Executions.
#[prost(message, repeated, tag = "1")]
pub executions: ::prost::alloc::vec::Vec<Execution>,
/// A token indicating there are more items than page_size. Use it in the next
/// ListExecutions request to continue.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for deleting an Execution.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteExecutionRequest {
/// Required. The name of the Execution to delete.
/// Format:
/// `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
/// where `{project}` can be project id or number.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Indicates that the request should be validated without actually
/// deleting any resources.
#[prost(bool, tag = "2")]
pub validate_only: bool,
/// A system-generated fingerprint for this version of the resource.
/// This may be used to detect modification conflict during updates.
#[prost(string, tag = "3")]
pub etag: ::prost::alloc::string::String,
}
/// Request message for deleting an Execution.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelExecutionRequest {
/// Required. The name of the Execution to cancel.
/// Format:
/// `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
/// where `{project}` can be project id or number.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Indicates that the request should be validated without actually
/// cancelling any resources.
#[prost(bool, tag = "2")]
pub validate_only: bool,
/// A system-generated fingerprint for this version of the resource.
/// This may be used to detect modification conflict during updates.
#[prost(string, tag = "3")]
pub etag: ::prost::alloc::string::String,
}
/// Execution represents the configuration of a single execution. A execution an
/// immutable resource that references a container image which is run to
/// completion.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Execution {
/// Output only. The unique name of this Execution.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. Server assigned unique identifier for the Execution. The value
/// is a UUID4 string and guaranteed to remain unchanged until the resource is
/// deleted.
#[prost(string, tag = "2")]
pub uid: ::prost::alloc::string::String,
/// Output only. A number that monotonically increases every time the user
/// modifies the desired state.
#[prost(int64, tag = "3")]
pub generation: i64,
/// Output only. Unstructured key value map that can be used to organize and
/// categorize objects. User-provided labels are shared with Google's billing
/// system, so they can be used to filter, or break down billing charges by
/// team, component, environment, state, etc. For more information, visit
/// <https://cloud.google.com/resource-manager/docs/creating-managing-labels> or
/// <https://cloud.google.com/run/docs/configuring/labels>
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. Unstructured key value map that may
/// be set by external tools to store and arbitrary metadata.
/// They are not queryable and should be preserved
/// when modifying objects.
#[prost(btree_map = "string, string", tag = "5")]
pub annotations: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. Represents time when the execution was acknowledged by the
/// execution controller. It is not guaranteed to be set in happens-before
/// order across separate operations.
#[prost(message, optional, tag = "6")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Represents time when the execution started to run.
/// It is not guaranteed to be set in happens-before order across separate
/// operations.
#[prost(message, optional, tag = "22")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Represents time when the execution was completed. It is not
/// guaranteed to be set in happens-before order across separate operations.
#[prost(message, optional, tag = "7")]
pub completion_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The last-modified time.
#[prost(message, optional, tag = "8")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. For a deleted resource, the deletion time. It is only
/// populated as a response to a Delete request.
#[prost(message, optional, tag = "9")]
pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. For a deleted resource, the time after which it will be
/// permamently deleted. It is only populated as a response to a Delete
/// request.
#[prost(message, optional, tag = "10")]
pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
/// The least stable launch stage needed to create this resource, as defined by
/// [Google Cloud Platform Launch
/// Stages](<https://cloud.google.com/terms/launch-stages>). Cloud Run supports
/// `ALPHA`, `BETA`, and `GA`.
/// <p>Note that this value might not be what was used
/// as input. For example, if ALPHA was provided as input in the parent
/// resource, but only BETA and GA-level features are were, this field will be
/// BETA.
#[prost(enumeration = "super::super::super::api::LaunchStage", tag = "11")]
pub launch_stage: i32,
/// Output only. The name of the parent Job.
#[prost(string, tag = "12")]
pub job: ::prost::alloc::string::String,
/// Output only. Specifies the maximum desired number of tasks the execution
/// should run at any given time. Must be <= task_count. The actual number of
/// tasks running in steady state will be less than this number when
/// ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when
/// the work left to do is less than max parallelism.
#[prost(int32, tag = "13")]
pub parallelism: i32,
/// Output only. Specifies the desired number of tasks the execution should
/// run. Setting to 1 means that parallelism is limited to 1 and the success of
/// that task signals the success of the execution.
#[prost(int32, tag = "14")]
pub task_count: i32,
/// Output only. The template used to create tasks for this execution.
#[prost(message, optional, tag = "15")]
pub template: ::core::option::Option<TaskTemplate>,
/// Output only. Indicates whether the resource's reconciliation is still in
/// progress. See comments in `Job.reconciling` for additional information on
/// reconciliation process in Cloud Run.
#[prost(bool, tag = "16")]
pub reconciling: bool,
/// Output only. The Condition of this Execution, containing its readiness
/// status, and detailed error information in case it did not reach the desired
/// state.
#[prost(message, repeated, tag = "17")]
pub conditions: ::prost::alloc::vec::Vec<Condition>,
/// Output only. The generation of this Execution. See comments in
/// `reconciling` for additional information on reconciliation process in Cloud
/// Run.
#[prost(int64, tag = "18")]
pub observed_generation: i64,
/// Output only. The number of actively running tasks.
#[prost(int32, tag = "19")]
pub running_count: i32,
/// Output only. The number of tasks which reached phase Succeeded.
#[prost(int32, tag = "20")]
pub succeeded_count: i32,
/// Output only. The number of tasks which reached phase Failed.
#[prost(int32, tag = "21")]
pub failed_count: i32,
/// Output only. The number of tasks which reached phase Cancelled.
#[prost(int32, tag = "24")]
pub cancelled_count: i32,
/// Output only. The number of tasks which have retried at least once.
#[prost(int32, tag = "25")]
pub retried_count: i32,
/// Output only. URI where logs for this execution can be found in Cloud
/// Console.
#[prost(string, tag = "26")]
pub log_uri: ::prost::alloc::string::String,
/// Output only. Reserved for future use.
#[prost(bool, tag = "27")]
pub satisfies_pzs: bool,
/// Output only. A system-generated fingerprint for this version of the
/// resource. May be used to detect modification conflict during updates.
#[prost(string, tag = "99")]
pub etag: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod executions_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Cloud Run Execution Control Plane API.
#[derive(Debug, Clone)]
pub struct ExecutionsClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ExecutionsClient<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,
) -> ExecutionsClient<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,
{
ExecutionsClient::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
}
/// Gets information about an Execution.
pub async fn get_execution(
&mut self,
request: impl tonic::IntoRequest<super::GetExecutionRequest>,
) -> std::result::Result<tonic::Response<super::Execution>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.run.v2.Executions/GetExecution",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.run.v2.Executions", "GetExecution"),
);
self.inner.unary(req, path, codec).await
}
/// Lists Executions from a Job. Results are sorted by creation time,
/// descending.
pub async fn list_executions(
&mut self,
request: impl tonic::IntoRequest<super::ListExecutionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListExecutionsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.run.v2.Executions/ListExecutions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.run.v2.Executions", "ListExecutions"),
);
self.inner.unary(req, path, codec).await
}
/// Deletes an Execution.
pub async fn delete_execution(
&mut self,
request: impl tonic::IntoRequest<super::DeleteExecutionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.run.v2.Executions/DeleteExecution",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.run.v2.Executions", "DeleteExecution"),
);
self.inner.unary(req, path, codec).await
}
/// Cancels an Execution.
pub async fn cancel_execution(
&mut self,
request: impl tonic::IntoRequest<super::CancelExecutionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.run.v2.Executions/CancelExecution",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.run.v2.Executions", "CancelExecution"),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Request message for obtaining a Revision by its full name.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRevisionRequest {
/// Required. The full name of the Revision.
/// Format:
/// projects/{project}/locations/{location}/services/{service}/revisions/{revision}
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for retrieving a list of Revisions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRevisionsRequest {
/// Required. The Service from which the Revisions should be listed.
/// To list all Revisions across Services, use "-" instead of Service name.
/// Format:
/// projects/{project}/locations/{location}/services/{service}
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum number of revisions to return in this call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token received from a previous call to ListRevisions.
/// All other parameters must match.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// If true, returns deleted (but unexpired) resources along with active ones.
#[prost(bool, tag = "4")]
pub show_deleted: bool,
}
/// Response message containing a list of Revisions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRevisionsResponse {
/// The resulting list of Revisions.
#[prost(message, repeated, tag = "1")]
pub revisions: ::prost::alloc::vec::Vec<Revision>,
/// A token indicating there are more items than page_size. Use it in the next
/// ListRevisions request to continue.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for deleting a retired Revision.
/// Revision lifecycle is usually managed by making changes to the parent
/// Service. Only retired revisions can be deleted with this API.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRevisionRequest {
/// Required. The name of the Revision to delete.
/// Format:
/// projects/{project}/locations/{location}/services/{service}/revisions/{revision}
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Indicates that the request should be validated without actually
/// deleting any resources.
#[prost(bool, tag = "2")]
pub validate_only: bool,
/// A system-generated fingerprint for this version of the
/// resource. This may be used to detect modification conflict during updates.
#[prost(string, tag = "3")]
pub etag: ::prost::alloc::string::String,
}
/// A Revision is an immutable snapshot of code and configuration. A Revision
/// references a container image. Revisions are only created by updates to its
/// parent Service.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Revision {
/// Output only. The unique name of this Revision.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. Server assigned unique identifier for the Revision. The value
/// is a UUID4 string and guaranteed to remain unchanged until the resource is
/// deleted.
#[prost(string, tag = "2")]
pub uid: ::prost::alloc::string::String,
/// Output only. A number that monotonically increases every time the user
/// modifies the desired state.
#[prost(int64, tag = "3")]
pub generation: i64,
/// Output only. Unstructured key value map that can be used to organize and
/// categorize objects. User-provided labels are shared with Google's billing
/// system, so they can be used to filter, or break down billing charges by
/// team, component, environment, state, etc. For more information, visit
/// <https://cloud.google.com/resource-manager/docs/creating-managing-labels> or
/// <https://cloud.google.com/run/docs/configuring/labels.>
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. Unstructured key value map that may
/// be set by external tools to store and arbitrary metadata.
/// They are not queryable and should be preserved
/// when modifying objects.
#[prost(btree_map = "string, string", tag = "5")]
pub annotations: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. The creation time.
#[prost(message, optional, tag = "6")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The last-modified time.
#[prost(message, optional, tag = "7")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. For a deleted resource, the deletion time. It is only
/// populated as a response to a Delete request.
#[prost(message, optional, tag = "8")]
pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. For a deleted resource, the time after which it will be
/// permamently deleted. It is only populated as a response to a Delete
/// request.
#[prost(message, optional, tag = "9")]
pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
/// The least stable launch stage needed to create this resource, as defined by
/// [Google Cloud Platform Launch
/// Stages](<https://cloud.google.com/terms/launch-stages>). Cloud Run supports
/// `ALPHA`, `BETA`, and `GA`.
/// <p>Note that this value might not be what was used
/// as input. For example, if ALPHA was provided as input in the parent
/// resource, but only BETA and GA-level features are were, this field will be
/// BETA.
#[prost(enumeration = "super::super::super::api::LaunchStage", tag = "10")]
pub launch_stage: i32,
/// Output only. The name of the parent service.
#[prost(string, tag = "11")]
pub service: ::prost::alloc::string::String,
/// Scaling settings for this revision.
#[prost(message, optional, tag = "12")]
pub scaling: ::core::option::Option<RevisionScaling>,
/// VPC Access configuration for this Revision. For more information, visit
/// <https://cloud.google.com/run/docs/configuring/connecting-vpc.>
#[prost(message, optional, tag = "13")]
pub vpc_access: ::core::option::Option<VpcAccess>,
/// Sets the maximum number of requests that each serving instance can receive.
#[prost(int32, tag = "34")]
pub max_instance_request_concurrency: i32,
/// Max allowed time for an instance to respond to a request.
#[prost(message, optional, tag = "15")]
pub timeout: ::core::option::Option<::prost_types::Duration>,
/// Email address of the IAM service account associated with the revision of
/// the service. The service account represents the identity of the running
/// revision, and determines what permissions the revision has.
#[prost(string, tag = "16")]
pub service_account: ::prost::alloc::string::String,
/// Holds the single container that defines the unit of execution for this
/// Revision.
#[prost(message, repeated, tag = "17")]
pub containers: ::prost::alloc::vec::Vec<Container>,
/// A list of Volumes to make available to containers.
#[prost(message, repeated, tag = "18")]
pub volumes: ::prost::alloc::vec::Vec<Volume>,
/// The execution environment being used to host this Revision.
#[prost(enumeration = "ExecutionEnvironment", tag = "20")]
pub execution_environment: i32,
/// A reference to a customer managed encryption key (CMEK) to use to encrypt
/// this container image. For more information, go to
/// <https://cloud.google.com/run/docs/securing/using-cmek>
#[prost(string, tag = "21")]
pub encryption_key: ::prost::alloc::string::String,
/// The action to take if the encryption key is revoked.
#[prost(enumeration = "EncryptionKeyRevocationAction", tag = "23")]
pub encryption_key_revocation_action: i32,
/// If encryption_key_revocation_action is SHUTDOWN, the duration before
/// shutting down all instances. The minimum increment is 1 hour.
#[prost(message, optional, tag = "24")]
pub encryption_key_shutdown_duration: ::core::option::Option<
::prost_types::Duration,
>,
/// Output only. Indicates whether the resource's reconciliation is still in
/// progress. See comments in `Service.reconciling` for additional information
/// on reconciliation process in Cloud Run.
#[prost(bool, tag = "30")]
pub reconciling: bool,
/// Output only. The Condition of this Revision, containing its readiness
/// status, and detailed error information in case it did not reach a serving
/// state.
#[prost(message, repeated, tag = "31")]
pub conditions: ::prost::alloc::vec::Vec<Condition>,
/// Output only. The generation of this Revision currently serving traffic. See
/// comments in `reconciling` for additional information on reconciliation
/// process in Cloud Run.
#[prost(int64, tag = "32")]
pub observed_generation: i64,
/// Output only. The Google Console URI to obtain logs for the Revision.
#[prost(string, tag = "33")]
pub log_uri: ::prost::alloc::string::String,
/// Output only. Reserved for future use.
#[prost(bool, tag = "37")]
pub satisfies_pzs: bool,
/// Enable session affinity.
#[prost(bool, tag = "38")]
pub session_affinity: bool,
/// Output only. The current effective scaling settings for the revision.
#[prost(message, optional, tag = "39")]
pub scaling_status: ::core::option::Option<RevisionScalingStatus>,
/// Output only. A system-generated fingerprint for this version of the
/// resource. May be used to detect modification conflict during updates.
#[prost(string, tag = "99")]
pub etag: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod revisions_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Cloud Run Revision Control Plane API.
#[derive(Debug, Clone)]
pub struct RevisionsClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> RevisionsClient<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,
) -> RevisionsClient<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,
{
RevisionsClient::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
}
/// Gets information about a Revision.
pub async fn get_revision(
&mut self,
request: impl tonic::IntoRequest<super::GetRevisionRequest>,
) -> std::result::Result<tonic::Response<super::Revision>, 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.run.v2.Revisions/GetRevision",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Revisions", "GetRevision"));
self.inner.unary(req, path, codec).await
}
/// Lists Revisions from a given Service, or from a given location. Results
/// are sorted by creation time, descending.
pub async fn list_revisions(
&mut self,
request: impl tonic::IntoRequest<super::ListRevisionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListRevisionsResponse>,
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.run.v2.Revisions/ListRevisions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.run.v2.Revisions", "ListRevisions"),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a Revision.
pub async fn delete_revision(
&mut self,
request: impl tonic::IntoRequest<super::DeleteRevisionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.run.v2.Revisions/DeleteRevision",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.run.v2.Revisions", "DeleteRevision"),
);
self.inner.unary(req, path, codec).await
}
}
}
/// ExecutionTemplate describes the data an execution should have when created
/// from a template.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionTemplate {
/// Unstructured key value map that can be used to organize and categorize
/// objects.
/// User-provided labels are shared with Google's billing system, so they can
/// be used to filter, or break down billing charges by team, component,
/// environment, state, etc. For more information, visit
/// <https://cloud.google.com/resource-manager/docs/creating-managing-labels> or
/// <https://cloud.google.com/run/docs/configuring/labels.>
///
/// <p>Cloud Run API v2 does not support labels with `run.googleapis.com`,
/// `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
/// namespaces, and they will be rejected. All system labels in v1 now have a
/// corresponding field in v2 ExecutionTemplate.
#[prost(btree_map = "string, string", tag = "1")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Unstructured key value map that may be set by external tools to store and
/// arbitrary metadata. They are not queryable and should be preserved
/// when modifying objects.
///
/// <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`,
/// `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
/// namespaces, and they will be rejected. All system annotations in v1 now
/// have a corresponding field in v2 ExecutionTemplate.
///
/// <p>This field follows Kubernetes annotations' namespacing, limits, and
/// rules.
#[prost(btree_map = "string, string", tag = "2")]
pub annotations: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Specifies the maximum desired number of tasks the execution should run at
/// given time. Must be <= task_count.
/// When the job is run, if this field is 0 or unset, the maximum possible
/// value will be used for that execution.
/// The actual number of tasks running in steady state will be less than this
/// number when there are fewer tasks waiting to be completed remaining,
/// i.e. when the work left to do is less than max parallelism.
#[prost(int32, tag = "3")]
pub parallelism: i32,
/// Specifies the desired number of tasks the execution should run.
/// Setting to 1 means that parallelism is limited to 1 and the success of
/// that task signals the success of the execution. Defaults to 1.
#[prost(int32, tag = "4")]
pub task_count: i32,
/// Required. Describes the task(s) that will be created when executing an
/// execution.
#[prost(message, optional, tag = "5")]
pub template: ::core::option::Option<TaskTemplate>,
}
/// Request message for creating a Job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateJobRequest {
/// Required. The location and project in which this Job should be created.
/// Format: projects/{project}/locations/{location}, where {project} can be
/// project id or number.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The Job instance to create.
#[prost(message, optional, tag = "2")]
pub job: ::core::option::Option<Job>,
/// Required. The unique identifier for the Job. The name of the job becomes
/// {parent}/jobs/{job_id}.
#[prost(string, tag = "3")]
pub job_id: ::prost::alloc::string::String,
/// Indicates that the request should be validated and default values
/// populated, without persisting the request or creating any resources.
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
/// Request message for obtaining a Job by its full name.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetJobRequest {
/// Required. The full name of the Job.
/// Format: projects/{project}/locations/{location}/jobs/{job}, where {project}
/// can be project id or number.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for updating a Job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateJobRequest {
/// Required. The Job to be updated.
#[prost(message, optional, tag = "1")]
pub job: ::core::option::Option<Job>,
/// Indicates that the request should be validated and default values
/// populated, without persisting the request or updating any resources.
#[prost(bool, tag = "3")]
pub validate_only: bool,
/// Optional. If set to true, and if the Job does not exist, it will create a
/// new one. Caller must have both create and update permissions for this call
/// if this is set to true.
#[prost(bool, tag = "4")]
pub allow_missing: bool,
}
/// Request message for retrieving a list of Jobs.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListJobsRequest {
/// Required. The location and project to list resources on.
/// Format: projects/{project}/locations/{location}, where {project} can be
/// project id or number.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum number of Jobs to return in this call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token received from a previous call to ListJobs.
/// All other parameters must match.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// If true, returns deleted (but unexpired) resources along with active ones.
#[prost(bool, tag = "4")]
pub show_deleted: bool,
}
/// Response message containing a list of Jobs.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListJobsResponse {
/// The resulting list of Jobs.
#[prost(message, repeated, tag = "1")]
pub jobs: ::prost::alloc::vec::Vec<Job>,
/// A token indicating there are more items than page_size. Use it in the next
/// ListJobs request to continue.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Request message to delete a Job by its full name.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteJobRequest {
/// Required. The full name of the Job.
/// Format: projects/{project}/locations/{location}/jobs/{job}, where {project}
/// can be project id or number.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Indicates that the request should be validated without actually
/// deleting any resources.
#[prost(bool, tag = "3")]
pub validate_only: bool,
/// A system-generated fingerprint for this version of the
/// resource. May be used to detect modification conflict during updates.
#[prost(string, tag = "4")]
pub etag: ::prost::alloc::string::String,
}
/// Request message to create a new Execution of a Job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunJobRequest {
/// Required. The full name of the Job.
/// Format: projects/{project}/locations/{location}/jobs/{job}, where {project}
/// can be project id or number.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Indicates that the request should be validated without actually
/// deleting any resources.
#[prost(bool, tag = "2")]
pub validate_only: bool,
/// A system-generated fingerprint for this version of the
/// resource. May be used to detect modification conflict during updates.
#[prost(string, tag = "3")]
pub etag: ::prost::alloc::string::String,
/// Overrides specification for a given execution of a job. If provided,
/// overrides will be applied to update the execution or task spec.
#[prost(message, optional, tag = "4")]
pub overrides: ::core::option::Option<run_job_request::Overrides>,
}
/// Nested message and enum types in `RunJobRequest`.
pub mod run_job_request {
/// RunJob Overrides that contains Execution fields to be overridden.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Overrides {
/// Per container override specification.
#[prost(message, repeated, tag = "1")]
pub container_overrides: ::prost::alloc::vec::Vec<overrides::ContainerOverride>,
/// Optional. The desired number of tasks the execution should run. Will
/// replace existing task_count value.
#[prost(int32, tag = "2")]
pub task_count: i32,
/// Duration in seconds the task may be active before the system will
/// actively try to mark it failed and kill associated containers. Will
/// replace existing timeout_seconds value.
#[prost(message, optional, tag = "4")]
pub timeout: ::core::option::Option<::prost_types::Duration>,
}
/// Nested message and enum types in `Overrides`.
pub mod overrides {
/// Per-container override specification.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContainerOverride {
/// The name of the container specified as a DNS_LABEL.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. Arguments to the entrypoint. Will replace existing args for
/// override.
#[prost(string, repeated, tag = "2")]
pub args: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// List of environment variables to set in the container. Will be merged
/// with existing env for override.
#[prost(message, repeated, tag = "3")]
pub env: ::prost::alloc::vec::Vec<super::super::EnvVar>,
/// Optional. True if the intention is to clear out existing args list.
#[prost(bool, tag = "4")]
pub clear_args: bool,
}
}
}
/// Job represents the configuration of a single job, which references a
/// container image that is run to completion.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Job {
/// The fully qualified name of this Job.
///
/// Format:
/// projects/{project}/locations/{location}/jobs/{job}
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. Server assigned unique identifier for the Execution. The value
/// is a UUID4 string and guaranteed to remain unchanged until the resource is
/// deleted.
#[prost(string, tag = "2")]
pub uid: ::prost::alloc::string::String,
/// Output only. A number that monotonically increases every time the user
/// modifies the desired state.
#[prost(int64, tag = "3")]
pub generation: i64,
/// Unstructured key value map that can be used to organize and categorize
/// objects.
/// User-provided labels are shared with Google's billing system, so they can
/// be used to filter, or break down billing charges by team, component,
/// environment, state, etc. For more information, visit
/// <https://cloud.google.com/resource-manager/docs/creating-managing-labels> or
/// <https://cloud.google.com/run/docs/configuring/labels.>
///
/// <p>Cloud Run API v2 does not support labels with `run.googleapis.com`,
/// `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
/// namespaces, and they will be rejected. All system labels in v1 now have a
/// corresponding field in v2 Job.
#[prost(btree_map = "string, string", tag = "4")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Unstructured key value map that may
/// be set by external tools to store and arbitrary metadata.
/// They are not queryable and should be preserved
/// when modifying objects.
///
/// <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`,
/// `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
/// namespaces, and they will be rejected on new resources. All system
/// annotations in v1 now have a corresponding field in v2 Job.
///
/// <p>This field follows Kubernetes annotations' namespacing, limits, and
/// rules.
#[prost(btree_map = "string, string", tag = "5")]
pub annotations: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. The creation time.
#[prost(message, optional, tag = "6")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The last-modified time.
#[prost(message, optional, tag = "7")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The deletion time. It is only populated as a response to a
/// Delete request.
#[prost(message, optional, tag = "8")]
pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. For a deleted resource, the time after which it will be
/// permamently deleted.
#[prost(message, optional, tag = "9")]
pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Email address of the authenticated creator.
#[prost(string, tag = "10")]
pub creator: ::prost::alloc::string::String,
/// Output only. Email address of the last authenticated modifier.
#[prost(string, tag = "11")]
pub last_modifier: ::prost::alloc::string::String,
/// Arbitrary identifier for the API client.
#[prost(string, tag = "12")]
pub client: ::prost::alloc::string::String,
/// Arbitrary version identifier for the API client.
#[prost(string, tag = "13")]
pub client_version: ::prost::alloc::string::String,
/// The launch stage as defined by [Google Cloud Platform
/// Launch Stages](<https://cloud.google.com/terms/launch-stages>).
/// Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA
/// is assumed.
/// Set the launch stage to a preview stage on input to allow use of preview
/// features in that stage. On read (or output), describes whether the resource
/// uses preview features.
/// <p>
/// For example, if ALPHA is provided as input, but only BETA and GA-level
/// features are used, this field will be BETA on output.
#[prost(enumeration = "super::super::super::api::LaunchStage", tag = "14")]
pub launch_stage: i32,
/// Settings for the Binary Authorization feature.
#[prost(message, optional, tag = "15")]
pub binary_authorization: ::core::option::Option<BinaryAuthorization>,
/// Required. The template used to create executions for this Job.
#[prost(message, optional, tag = "16")]
pub template: ::core::option::Option<ExecutionTemplate>,
/// Output only. The generation of this Job. See comments in `reconciling` for
/// additional information on reconciliation process in Cloud Run.
#[prost(int64, tag = "17")]
pub observed_generation: i64,
/// Output only. The Condition of this Job, containing its readiness status,
/// and detailed error information in case it did not reach the desired state.
#[prost(message, optional, tag = "18")]
pub terminal_condition: ::core::option::Option<Condition>,
/// Output only. The Conditions of all other associated sub-resources. They
/// contain additional diagnostics information in case the Job does not reach
/// its desired state. See comments in `reconciling` for additional information
/// on reconciliation process in Cloud Run.
#[prost(message, repeated, tag = "19")]
pub conditions: ::prost::alloc::vec::Vec<Condition>,
/// Output only. Number of executions created for this job.
#[prost(int32, tag = "20")]
pub execution_count: i32,
/// Output only. Name of the last created execution.
#[prost(message, optional, tag = "22")]
pub latest_created_execution: ::core::option::Option<ExecutionReference>,
/// Output only. Returns true if the Job is currently being acted upon by the
/// system to bring it into the desired state.
///
/// When a new Job is created, or an existing one is updated, Cloud Run
/// will asynchronously perform all necessary steps to bring the Job to the
/// desired state. This process is called reconciliation.
/// While reconciliation is in process, `observed_generation` and
/// `latest_succeeded_execution`, will have transient values that might
/// mismatch the intended state: Once reconciliation is over (and this field is
/// false), there are two possible outcomes: reconciliation succeeded and the
/// state matches the Job, or there was an error, and reconciliation failed.
/// This state can be found in `terminal_condition.state`.
///
/// If reconciliation succeeded, the following fields will match:
/// `observed_generation` and `generation`, `latest_succeeded_execution` and
/// `latest_created_execution`.
///
/// If reconciliation failed, `observed_generation` and
/// `latest_succeeded_execution` will have the state of the last succeeded
/// execution or empty for newly created Job. Additional information on the
/// failure can be found in `terminal_condition` and `conditions`.
#[prost(bool, tag = "23")]
pub reconciling: bool,
/// Output only. Reserved for future use.
#[prost(bool, tag = "25")]
pub satisfies_pzs: bool,
/// Output only. A system-generated fingerprint for this version of the
/// resource. May be used to detect modification conflict during updates.
#[prost(string, tag = "99")]
pub etag: ::prost::alloc::string::String,
#[prost(oneof = "job::CreateExecution", tags = "26, 27")]
pub create_execution: ::core::option::Option<job::CreateExecution>,
}
/// Nested message and enum types in `Job`.
pub mod job {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum CreateExecution {
/// A unique string used as a suffix creating a new execution. The Job will
/// become ready when the execution is successfully started.
/// The sum of job name and token length must be fewer than 63 characters.
#[prost(string, tag = "26")]
StartExecutionToken(::prost::alloc::string::String),
/// A unique string used as a suffix for creating a new execution. The Job
/// will become ready when the execution is successfully completed.
/// The sum of job name and token length must be fewer than 63 characters.
#[prost(string, tag = "27")]
RunExecutionToken(::prost::alloc::string::String),
}
}
/// Reference to an Execution. Use /Executions.GetExecution with the given name
/// to get full execution including the latest status.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionReference {
/// Name of the execution.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Creation timestamp of the execution.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Creation timestamp of the execution.
#[prost(message, optional, tag = "3")]
pub completion_time: ::core::option::Option<::prost_types::Timestamp>,
/// The deletion time of the execution. It is only
/// populated as a response to a Delete request.
#[prost(message, optional, tag = "5")]
pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
/// Status for the execution completion.
#[prost(enumeration = "execution_reference::CompletionStatus", tag = "4")]
pub completion_status: i32,
}
/// Nested message and enum types in `ExecutionReference`.
pub mod execution_reference {
/// Possible execution completion status.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum CompletionStatus {
/// The default value. This value is used if the state is omitted.
Unspecified = 0,
/// Job execution has succeeded.
ExecutionSucceeded = 1,
/// Job execution has failed.
ExecutionFailed = 2,
/// Job execution is running normally.
ExecutionRunning = 3,
/// Waiting for backing resources to be provisioned.
ExecutionPending = 4,
/// Job execution has been cancelled by the user.
ExecutionCancelled = 5,
}
impl CompletionStatus {
/// 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 {
CompletionStatus::Unspecified => "COMPLETION_STATUS_UNSPECIFIED",
CompletionStatus::ExecutionSucceeded => "EXECUTION_SUCCEEDED",
CompletionStatus::ExecutionFailed => "EXECUTION_FAILED",
CompletionStatus::ExecutionRunning => "EXECUTION_RUNNING",
CompletionStatus::ExecutionPending => "EXECUTION_PENDING",
CompletionStatus::ExecutionCancelled => "EXECUTION_CANCELLED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"COMPLETION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"EXECUTION_SUCCEEDED" => Some(Self::ExecutionSucceeded),
"EXECUTION_FAILED" => Some(Self::ExecutionFailed),
"EXECUTION_RUNNING" => Some(Self::ExecutionRunning),
"EXECUTION_PENDING" => Some(Self::ExecutionPending),
"EXECUTION_CANCELLED" => Some(Self::ExecutionCancelled),
_ => None,
}
}
}
}
/// Generated client implementations.
pub mod jobs_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Cloud Run Job Control Plane API.
#[derive(Debug, Clone)]
pub struct JobsClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> JobsClient<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,
) -> JobsClient<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,
{
JobsClient::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
}
/// Creates a Job.
pub async fn create_job(
&mut self,
request: impl tonic::IntoRequest<super::CreateJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.run.v2.Jobs/CreateJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Jobs", "CreateJob"));
self.inner.unary(req, path, codec).await
}
/// Gets information about a Job.
pub async fn get_job(
&mut self,
request: impl tonic::IntoRequest<super::GetJobRequest>,
) -> std::result::Result<tonic::Response<super::Job>, 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.run.v2.Jobs/GetJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Jobs", "GetJob"));
self.inner.unary(req, path, codec).await
}
/// Lists Jobs. Results are sorted by creation time, descending.
pub async fn list_jobs(
&mut self,
request: impl tonic::IntoRequest<super::ListJobsRequest>,
) -> std::result::Result<
tonic::Response<super::ListJobsResponse>,
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.run.v2.Jobs/ListJobs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Jobs", "ListJobs"));
self.inner.unary(req, path, codec).await
}
/// Updates a Job.
pub async fn update_job(
&mut self,
request: impl tonic::IntoRequest<super::UpdateJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.run.v2.Jobs/UpdateJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Jobs", "UpdateJob"));
self.inner.unary(req, path, codec).await
}
/// Deletes a Job.
pub async fn delete_job(
&mut self,
request: impl tonic::IntoRequest<super::DeleteJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.run.v2.Jobs/DeleteJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Jobs", "DeleteJob"));
self.inner.unary(req, path, codec).await
}
/// Triggers creation of a new Execution of this Job.
pub async fn run_job(
&mut self,
request: impl tonic::IntoRequest<super::RunJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.run.v2.Jobs/RunJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Jobs", "RunJob"));
self.inner.unary(req, path, codec).await
}
/// Gets the IAM Access Control policy currently in effect for the given Job.
/// This result does not include any inherited policies.
pub async fn get_iam_policy(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::super::iam::v1::GetIamPolicyRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::super::iam::v1::Policy>,
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.run.v2.Jobs/GetIamPolicy",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Jobs", "GetIamPolicy"));
self.inner.unary(req, path, codec).await
}
/// Sets the IAM Access control policy for the specified Job. Overwrites
/// any existing policy.
pub async fn set_iam_policy(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::super::iam::v1::SetIamPolicyRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::super::iam::v1::Policy>,
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.run.v2.Jobs/SetIamPolicy",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Jobs", "SetIamPolicy"));
self.inner.unary(req, path, codec).await
}
/// Returns permissions that a caller has on the specified Project.
///
/// There are no permissions required for making this API call.
pub async fn test_iam_permissions(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::super::iam::v1::TestIamPermissionsRequest,
>,
) -> std::result::Result<
tonic::Response<
super::super::super::super::iam::v1::TestIamPermissionsResponse,
>,
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.run.v2.Jobs/TestIamPermissions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.run.v2.Jobs", "TestIamPermissions"),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Request message for creating a Service.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateServiceRequest {
/// Required. The location and project in which this service should be created.
/// Format: projects/{project}/locations/{location}, where {project} can be
/// project id or number. Only lowercase characters, digits, and hyphens.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The Service instance to create.
#[prost(message, optional, tag = "2")]
pub service: ::core::option::Option<Service>,
/// Required. The unique identifier for the Service. It must begin with letter,
/// and cannot end with hyphen; must contain fewer than 50 characters.
/// The name of the service becomes {parent}/services/{service_id}.
#[prost(string, tag = "3")]
pub service_id: ::prost::alloc::string::String,
/// Indicates that the request should be validated and default values
/// populated, without persisting the request or creating any resources.
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
/// Request message for updating a service.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateServiceRequest {
/// Optional. The list of fields to be updated.
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Required. The Service to be updated.
#[prost(message, optional, tag = "1")]
pub service: ::core::option::Option<Service>,
/// Indicates that the request should be validated and default values
/// populated, without persisting the request or updating any resources.
#[prost(bool, tag = "3")]
pub validate_only: bool,
/// Optional. If set to true, and if the Service does not exist, it will create
/// a new one. The caller must have 'run.services.create' permissions if this
/// is set to true and the Service does not exist.
#[prost(bool, tag = "4")]
pub allow_missing: bool,
}
/// Request message for retrieving a list of Services.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServicesRequest {
/// Required. The location and project to list resources on.
/// Location must be a valid Google Cloud region, and cannot be the "-"
/// wildcard. Format: projects/{project}/locations/{location}, where {project}
/// can be project id or number.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Maximum number of Services to return in this call.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token received from a previous call to ListServices.
/// All other parameters must match.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// If true, returns deleted (but unexpired) resources along with active ones.
#[prost(bool, tag = "4")]
pub show_deleted: bool,
}
/// Response message containing a list of Services.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServicesResponse {
/// The resulting list of Services.
#[prost(message, repeated, tag = "1")]
pub services: ::prost::alloc::vec::Vec<Service>,
/// A token indicating there are more items than page_size. Use it in the next
/// ListServices request to continue.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for obtaining a Service by its full name.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetServiceRequest {
/// Required. The full name of the Service.
/// Format: projects/{project}/locations/{location}/services/{service}, where
/// {project} can be project id or number.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message to delete a Service by its full name.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteServiceRequest {
/// Required. The full name of the Service.
/// Format: projects/{project}/locations/{location}/services/{service}, where
/// {project} can be project id or number.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Indicates that the request should be validated without actually
/// deleting any resources.
#[prost(bool, tag = "2")]
pub validate_only: bool,
/// A system-generated fingerprint for this version of the
/// resource. May be used to detect modification conflict during updates.
#[prost(string, tag = "3")]
pub etag: ::prost::alloc::string::String,
}
/// Service acts as a top-level container that manages a set of
/// configurations and revision templates which implement a network service.
/// Service exists to provide a singular abstraction which can be access
/// controlled, reasoned about, and which encapsulates software lifecycle
/// decisions such as rollout policy and team resource ownership.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Service {
/// The fully qualified name of this Service. In CreateServiceRequest, this
/// field is ignored, and instead composed from CreateServiceRequest.parent and
/// CreateServiceRequest.service_id.
///
/// Format:
/// projects/{project}/locations/{location}/services/{service_id}
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// User-provided description of the Service. This field currently has a
/// 512-character limit.
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
/// Output only. Server assigned unique identifier for the trigger. The value
/// is a UUID4 string and guaranteed to remain unchanged until the resource is
/// deleted.
#[prost(string, tag = "3")]
pub uid: ::prost::alloc::string::String,
/// Output only. A number that monotonically increases every time the user
/// modifies the desired state.
/// Please note that unlike v1, this is an int64 value. As with most Google
/// APIs, its JSON representation will be a `string` instead of an `integer`.
#[prost(int64, tag = "4")]
pub generation: i64,
/// Optional. Unstructured key value map that can be used to organize and
/// categorize objects. User-provided labels are shared with Google's billing
/// system, so they can be used to filter, or break down billing charges by
/// team, component, environment, state, etc. For more information, visit
/// <https://cloud.google.com/resource-manager/docs/creating-managing-labels> or
/// <https://cloud.google.com/run/docs/configuring/labels.>
///
/// <p>Cloud Run API v2 does not support labels with `run.googleapis.com`,
/// `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
/// namespaces, and they will be rejected. All system labels in v1 now have a
/// corresponding field in v2 Service.
#[prost(btree_map = "string, string", tag = "5")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Optional. Unstructured key value map that may be set by external tools to
/// store and arbitrary metadata. They are not queryable and should be
/// preserved when modifying objects.
///
/// <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`,
/// `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
/// namespaces, and they will be rejected in new resources. All system
/// annotations in v1 now have a corresponding field in v2 Service.
///
/// <p>This field follows Kubernetes
/// annotations' namespacing, limits, and rules.
#[prost(btree_map = "string, string", tag = "6")]
pub annotations: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. The creation time.
#[prost(message, optional, tag = "7")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The last-modified time.
#[prost(message, optional, tag = "8")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The deletion time. It is only populated as a response to a
/// Delete request.
#[prost(message, optional, tag = "9")]
pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. For a deleted resource, the time after which it will be
/// permamently deleted.
#[prost(message, optional, tag = "10")]
pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Email address of the authenticated creator.
#[prost(string, tag = "11")]
pub creator: ::prost::alloc::string::String,
/// Output only. Email address of the last authenticated modifier.
#[prost(string, tag = "12")]
pub last_modifier: ::prost::alloc::string::String,
/// Arbitrary identifier for the API client.
#[prost(string, tag = "13")]
pub client: ::prost::alloc::string::String,
/// Arbitrary version identifier for the API client.
#[prost(string, tag = "14")]
pub client_version: ::prost::alloc::string::String,
/// Optional. Provides the ingress settings for this Service. On output,
/// returns the currently observed ingress settings, or
/// INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.
#[prost(enumeration = "IngressTraffic", tag = "15")]
pub ingress: i32,
/// Optional. The launch stage as defined by [Google Cloud Platform
/// Launch Stages](<https://cloud.google.com/terms/launch-stages>).
/// Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA
/// is assumed.
/// Set the launch stage to a preview stage on input to allow use of preview
/// features in that stage. On read (or output), describes whether the resource
/// uses preview features.
/// <p>
/// For example, if ALPHA is provided as input, but only BETA and GA-level
/// features are used, this field will be BETA on output.
#[prost(enumeration = "super::super::super::api::LaunchStage", tag = "16")]
pub launch_stage: i32,
/// Optional. Settings for the Binary Authorization feature.
#[prost(message, optional, tag = "17")]
pub binary_authorization: ::core::option::Option<BinaryAuthorization>,
/// Required. The template used to create revisions for this Service.
#[prost(message, optional, tag = "18")]
pub template: ::core::option::Option<RevisionTemplate>,
/// Optional. Specifies how to distribute traffic over a collection of
/// Revisions belonging to the Service. If traffic is empty or not provided,
/// defaults to 100% traffic to the latest `Ready` Revision.
#[prost(message, repeated, tag = "19")]
pub traffic: ::prost::alloc::vec::Vec<TrafficTarget>,
/// Optional. Specifies service-level scaling settings
#[prost(message, optional, tag = "20")]
pub scaling: ::core::option::Option<ServiceScaling>,
/// Optional. Disables public resolution of the default URI of this service.
#[prost(bool, tag = "22")]
pub default_uri_disabled: bool,
/// Output only. The generation of this Service currently serving traffic. See
/// comments in `reconciling` for additional information on reconciliation
/// process in Cloud Run. Please note that unlike v1, this is an int64 value.
/// As with most Google APIs, its JSON representation will be a `string`
/// instead of an `integer`.
#[prost(int64, tag = "30")]
pub observed_generation: i64,
/// Output only. The Condition of this Service, containing its readiness
/// status, and detailed error information in case it did not reach a serving
/// state. See comments in `reconciling` for additional information on
/// reconciliation process in Cloud Run.
#[prost(message, optional, tag = "31")]
pub terminal_condition: ::core::option::Option<Condition>,
/// Output only. The Conditions of all other associated sub-resources. They
/// contain additional diagnostics information in case the Service does not
/// reach its Serving state. See comments in `reconciling` for additional
/// information on reconciliation process in Cloud Run.
#[prost(message, repeated, tag = "32")]
pub conditions: ::prost::alloc::vec::Vec<Condition>,
/// Output only. Name of the latest revision that is serving traffic. See
/// comments in `reconciling` for additional information on reconciliation
/// process in Cloud Run.
#[prost(string, tag = "33")]
pub latest_ready_revision: ::prost::alloc::string::String,
/// Output only. Name of the last created revision. See comments in
/// `reconciling` for additional information on reconciliation process in Cloud
/// Run.
#[prost(string, tag = "34")]
pub latest_created_revision: ::prost::alloc::string::String,
/// Output only. Detailed status information for corresponding traffic targets.
/// See comments in `reconciling` for additional information on reconciliation
/// process in Cloud Run.
#[prost(message, repeated, tag = "35")]
pub traffic_statuses: ::prost::alloc::vec::Vec<TrafficTargetStatus>,
/// Output only. The main URI in which this Service is serving traffic.
#[prost(string, tag = "36")]
pub uri: ::prost::alloc::string::String,
/// One or more custom audiences that you want this service to support. Specify
/// each custom audience as the full URL in a string. The custom audiences are
/// encoded in the token and used to authenticate requests. For more
/// information, see
/// <https://cloud.google.com/run/docs/configuring/custom-audiences.>
#[prost(string, repeated, tag = "37")]
pub custom_audiences: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Output only. Reserved for future use.
#[prost(bool, tag = "38")]
pub satisfies_pzs: bool,
/// Output only. Returns true if the Service is currently being acted upon by
/// the system to bring it into the desired state.
///
/// When a new Service is created, or an existing one is updated, Cloud Run
/// will asynchronously perform all necessary steps to bring the Service to the
/// desired serving state. This process is called reconciliation.
/// While reconciliation is in process, `observed_generation`,
/// `latest_ready_revison`, `traffic_statuses`, and `uri` will have transient
/// values that might mismatch the intended state: Once reconciliation is over
/// (and this field is false), there are two possible outcomes: reconciliation
/// succeeded and the serving state matches the Service, or there was an error,
/// and reconciliation failed. This state can be found in
/// `terminal_condition.state`.
///
/// If reconciliation succeeded, the following fields will match: `traffic` and
/// `traffic_statuses`, `observed_generation` and `generation`,
/// `latest_ready_revision` and `latest_created_revision`.
///
/// If reconciliation failed, `traffic_statuses`, `observed_generation`, and
/// `latest_ready_revision` will have the state of the last serving revision,
/// or empty for newly created Services. Additional information on the failure
/// can be found in `terminal_condition` and `conditions`.
#[prost(bool, tag = "98")]
pub reconciling: bool,
/// Output only. A system-generated fingerprint for this version of the
/// resource. May be used to detect modification conflict during updates.
#[prost(string, tag = "99")]
pub etag: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod services_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Cloud Run Service Control Plane API
#[derive(Debug, Clone)]
pub struct ServicesClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ServicesClient<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,
) -> ServicesClient<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,
{
ServicesClient::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
}
/// Creates a new Service in a given project and location.
pub async fn create_service(
&mut self,
request: impl tonic::IntoRequest<super::CreateServiceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.run.v2.Services/CreateService",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.run.v2.Services", "CreateService"),
);
self.inner.unary(req, path, codec).await
}
/// Gets information about a Service.
pub async fn get_service(
&mut self,
request: impl tonic::IntoRequest<super::GetServiceRequest>,
) -> std::result::Result<tonic::Response<super::Service>, 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.run.v2.Services/GetService",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Services", "GetService"));
self.inner.unary(req, path, codec).await
}
/// Lists Services. Results are sorted by creation time, descending.
pub async fn list_services(
&mut self,
request: impl tonic::IntoRequest<super::ListServicesRequest>,
) -> std::result::Result<
tonic::Response<super::ListServicesResponse>,
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.run.v2.Services/ListServices",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Services", "ListServices"));
self.inner.unary(req, path, codec).await
}
/// Updates a Service.
pub async fn update_service(
&mut self,
request: impl tonic::IntoRequest<super::UpdateServiceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.run.v2.Services/UpdateService",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.run.v2.Services", "UpdateService"),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a Service.
/// This will cause the Service to stop serving traffic and will delete all
/// revisions.
pub async fn delete_service(
&mut self,
request: impl tonic::IntoRequest<super::DeleteServiceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.run.v2.Services/DeleteService",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.run.v2.Services", "DeleteService"),
);
self.inner.unary(req, path, codec).await
}
/// Gets the IAM Access Control policy currently in effect for the given
/// Cloud Run Service. This result does not include any inherited policies.
pub async fn get_iam_policy(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::super::iam::v1::GetIamPolicyRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::super::iam::v1::Policy>,
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.run.v2.Services/GetIamPolicy",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Services", "GetIamPolicy"));
self.inner.unary(req, path, codec).await
}
/// Sets the IAM Access control policy for the specified Service. Overwrites
/// any existing policy.
pub async fn set_iam_policy(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::super::iam::v1::SetIamPolicyRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::super::iam::v1::Policy>,
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.run.v2.Services/SetIamPolicy",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("google.cloud.run.v2.Services", "SetIamPolicy"));
self.inner.unary(req, path, codec).await
}
/// Returns permissions that a caller has on the specified Project.
///
/// There are no permissions required for making this API call.
pub async fn test_iam_permissions(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::super::iam::v1::TestIamPermissionsRequest,
>,
) -> std::result::Result<
tonic::Response<
super::super::super::super::iam::v1::TestIamPermissionsResponse,
>,
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.run.v2.Services/TestIamPermissions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.cloud.run.v2.Services", "TestIamPermissions"),
);
self.inner.unary(req, path, codec).await
}
}
}