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
// This file is @generated by prost-build.
/// Specifies a build to retry.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetryBuildRequest {
/// The name of the `Build` to retry.
/// Format: `projects/{project}/locations/{location}/builds/{build}`
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
/// Required. ID of the project.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Required. Build ID of the original build.
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
}
/// Specifies a build trigger to run and the source to use.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunBuildTriggerRequest {
/// The name of the `Trigger` to run.
/// Format: `projects/{project}/locations/{location}/triggers/{trigger}`
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
/// Required. ID of the project.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Required. ID of the trigger.
#[prost(string, tag = "2")]
pub trigger_id: ::prost::alloc::string::String,
/// Source to build against this trigger.
/// Branch and tag names cannot consist of regular expressions.
#[prost(message, optional, tag = "3")]
pub source: ::core::option::Option<RepoSource>,
}
/// Location of the source in an archive file in Cloud Storage.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StorageSource {
/// Cloud Storage bucket containing the source (see
/// [Bucket Name
/// Requirements](<https://cloud.google.com/storage/docs/bucket-naming#requirements>)).
#[prost(string, tag = "1")]
pub bucket: ::prost::alloc::string::String,
/// Cloud Storage object containing the source.
///
/// This object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`)
/// containing source to build.
#[prost(string, tag = "2")]
pub object: ::prost::alloc::string::String,
/// Cloud Storage generation for the object. If the generation is
/// omitted, the latest generation will be used.
#[prost(int64, tag = "3")]
pub generation: i64,
/// Option to specify the tool to fetch the source file for the build.
#[prost(enumeration = "storage_source::SourceFetcher", tag = "5")]
pub source_fetcher: i32,
}
/// Nested message and enum types in `StorageSource`.
pub mod storage_source {
/// Specifies the tool to fetch the source file for the build.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SourceFetcher {
/// Unspecified. Defaults to GSUTIL.
Unspecified = 0,
/// Use the "gsutil" tool to download the source file.
Gsutil = 1,
/// Use the Cloud Storage Fetcher tool to download the source file.
GcsFetcher = 2,
}
impl SourceFetcher {
/// 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 {
SourceFetcher::Unspecified => "SOURCE_FETCHER_UNSPECIFIED",
SourceFetcher::Gsutil => "GSUTIL",
SourceFetcher::GcsFetcher => "GCS_FETCHER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOURCE_FETCHER_UNSPECIFIED" => Some(Self::Unspecified),
"GSUTIL" => Some(Self::Gsutil),
"GCS_FETCHER" => Some(Self::GcsFetcher),
_ => None,
}
}
}
}
/// Location of the source in any accessible Git repository.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitSource {
/// Location of the Git repo to build.
///
/// This will be used as a `git remote`, see
/// <https://git-scm.com/docs/git-remote.>
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
/// Directory, relative to the source root, in which to run the build.
///
/// This must be a relative path. If a step's `dir` is specified and is an
/// absolute path, this value is ignored for that step's execution.
#[prost(string, tag = "5")]
pub dir: ::prost::alloc::string::String,
/// The revision to fetch from the Git repository such as a branch, a tag, a
/// commit SHA, or any Git ref.
///
/// Cloud Build uses `git fetch` to fetch the revision from the Git
/// repository; therefore make sure that the string you provide for `revision`
/// is parsable by the command. For information on string values accepted by
/// `git fetch`, see
/// <https://git-scm.com/docs/gitrevisions#_specifying_revisions.> For
/// information on `git fetch`, see <https://git-scm.com/docs/git-fetch.>
#[prost(string, tag = "6")]
pub revision: ::prost::alloc::string::String,
}
/// Location of the source in a Google Cloud Source Repository.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepoSource {
/// ID of the project that owns the Cloud Source Repository. If omitted, the
/// project ID requesting the build is assumed.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Name of the Cloud Source Repository.
#[prost(string, tag = "2")]
pub repo_name: ::prost::alloc::string::String,
/// Directory, relative to the source root, in which to run the build.
///
/// This must be a relative path. If a step's `dir` is specified and is an
/// absolute path, this value is ignored for that step's execution.
#[prost(string, tag = "7")]
pub dir: ::prost::alloc::string::String,
/// Only trigger a build if the revision regex does NOT match the revision
/// regex.
#[prost(bool, tag = "8")]
pub invert_regex: bool,
/// Substitutions to use in a triggered build.
/// Should only be used with RunBuildTrigger
#[prost(btree_map = "string, string", tag = "9")]
pub substitutions: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// A revision within the Cloud Source Repository must be specified in
/// one of these ways.
#[prost(oneof = "repo_source::Revision", tags = "3, 4, 5")]
pub revision: ::core::option::Option<repo_source::Revision>,
}
/// Nested message and enum types in `RepoSource`.
pub mod repo_source {
/// A revision within the Cloud Source Repository must be specified in
/// one of these ways.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Revision {
/// Regex matching branches to build.
///
/// The syntax of the regular expressions accepted is the syntax accepted by
/// RE2 and described at <https://github.com/google/re2/wiki/Syntax>
#[prost(string, tag = "3")]
BranchName(::prost::alloc::string::String),
/// Regex matching tags to build.
///
/// The syntax of the regular expressions accepted is the syntax accepted by
/// RE2 and described at <https://github.com/google/re2/wiki/Syntax>
#[prost(string, tag = "4")]
TagName(::prost::alloc::string::String),
/// Explicit commit SHA to build.
#[prost(string, tag = "5")]
CommitSha(::prost::alloc::string::String),
}
}
/// Location of the source manifest in Cloud Storage.
/// This feature is in Preview; see description
/// [here](<https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher>).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StorageSourceManifest {
/// Cloud Storage bucket containing the source manifest (see [Bucket
/// Name
/// Requirements](<https://cloud.google.com/storage/docs/bucket-naming#requirements>)).
#[prost(string, tag = "1")]
pub bucket: ::prost::alloc::string::String,
/// Cloud Storage object containing the source manifest.
///
/// This object must be a JSON file.
#[prost(string, tag = "2")]
pub object: ::prost::alloc::string::String,
/// Cloud Storage generation for the object. If the generation is
/// omitted, the latest generation will be used.
#[prost(int64, tag = "3")]
pub generation: i64,
}
/// Location of the source in a supported storage service.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Source {
/// Location of source.
#[prost(oneof = "source::Source", tags = "2, 3, 5, 8")]
pub source: ::core::option::Option<source::Source>,
}
/// Nested message and enum types in `Source`.
pub mod source {
/// Location of source.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
/// If provided, get the source from this location in Cloud Storage.
#[prost(message, tag = "2")]
StorageSource(super::StorageSource),
/// If provided, get the source from this location in a Cloud Source
/// Repository.
#[prost(message, tag = "3")]
RepoSource(super::RepoSource),
/// If provided, get the source from this Git repository.
#[prost(message, tag = "5")]
GitSource(super::GitSource),
/// If provided, get the source from this manifest in Cloud Storage.
/// This feature is in Preview; see description
/// [here](<https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher>).
#[prost(message, tag = "8")]
StorageSourceManifest(super::StorageSourceManifest),
}
}
/// An image built by the pipeline.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BuiltImage {
/// Name used to push the container image to Google Container Registry, as
/// presented to `docker push`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Docker Registry 2.0 digest.
#[prost(string, tag = "3")]
pub digest: ::prost::alloc::string::String,
/// Output only. Stores timing information for pushing the specified image.
#[prost(message, optional, tag = "4")]
pub push_timing: ::core::option::Option<TimeSpan>,
}
/// Artifact uploaded using the PythonPackage directive.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadedPythonPackage {
/// URI of the uploaded artifact.
#[prost(string, tag = "1")]
pub uri: ::prost::alloc::string::String,
/// Hash types and values of the Python Artifact.
#[prost(message, optional, tag = "2")]
pub file_hashes: ::core::option::Option<FileHashes>,
/// Output only. Stores timing information for pushing the specified artifact.
#[prost(message, optional, tag = "3")]
pub push_timing: ::core::option::Option<TimeSpan>,
}
/// A Maven artifact uploaded using the MavenArtifact directive.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadedMavenArtifact {
/// URI of the uploaded artifact.
#[prost(string, tag = "1")]
pub uri: ::prost::alloc::string::String,
/// Hash types and values of the Maven Artifact.
#[prost(message, optional, tag = "2")]
pub file_hashes: ::core::option::Option<FileHashes>,
/// Output only. Stores timing information for pushing the specified artifact.
#[prost(message, optional, tag = "3")]
pub push_timing: ::core::option::Option<TimeSpan>,
}
/// An npm package uploaded to Artifact Registry using the NpmPackage
/// directive.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadedNpmPackage {
/// URI of the uploaded npm package.
#[prost(string, tag = "1")]
pub uri: ::prost::alloc::string::String,
/// Hash types and values of the npm package.
#[prost(message, optional, tag = "2")]
pub file_hashes: ::core::option::Option<FileHashes>,
/// Output only. Stores timing information for pushing the specified artifact.
#[prost(message, optional, tag = "3")]
pub push_timing: ::core::option::Option<TimeSpan>,
}
/// A step in the build pipeline.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BuildStep {
/// Required. The name of the container image that will run this particular
/// build step.
///
/// If the image is available in the host's Docker daemon's cache, it
/// will be run directly. If not, the host will attempt to pull the image
/// first, using the builder service account's credentials if necessary.
///
/// The Docker daemon's cache will already have the latest versions of all of
/// the officially supported build steps
/// ([<https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders>)).
/// The Docker daemon will also have cached many of the layers for some popular
/// images, like "ubuntu", "debian", but they will be refreshed at the time you
/// attempt to use them.
///
/// If you built an image in a previous build step, it will be stored in the
/// host's Docker daemon's cache and is available to use as the name for a
/// later build step.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// A list of environment variable definitions to be used when running a step.
///
/// The elements are of the form "KEY=VALUE" for the environment variable "KEY"
/// being given the value "VALUE".
#[prost(string, repeated, tag = "2")]
pub env: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// A list of arguments that will be presented to the step when it is started.
///
/// If the image used to run the step's container has an entrypoint, the `args`
/// are used as arguments to that entrypoint. If the image does not define
/// an entrypoint, the first element in args is used as the entrypoint,
/// and the remainder will be used as arguments.
#[prost(string, repeated, tag = "3")]
pub args: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Working directory to use when running this step's container.
///
/// If this value is a relative path, it is relative to the build's working
/// directory. If this value is absolute, it may be outside the build's working
/// directory, in which case the contents of the path may not be persisted
/// across build step executions, unless a `volume` for that path is specified.
///
/// If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
/// which specifies an absolute path, the `RepoSource` `dir` is ignored for
/// the step's execution.
#[prost(string, tag = "4")]
pub dir: ::prost::alloc::string::String,
/// Unique identifier for this build step, used in `wait_for` to
/// reference this build step as a dependency.
#[prost(string, tag = "5")]
pub id: ::prost::alloc::string::String,
/// The ID(s) of the step(s) that this build step depends on.
/// This build step will not start until all the build steps in `wait_for`
/// have completed successfully. If `wait_for` is empty, this build step will
/// start when all previous build steps in the `Build.Steps` list have
/// completed successfully.
#[prost(string, repeated, tag = "6")]
pub wait_for: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Entrypoint to be used instead of the build step image's default entrypoint.
/// If unset, the image's default entrypoint is used.
#[prost(string, tag = "7")]
pub entrypoint: ::prost::alloc::string::String,
/// A list of environment variables which are encrypted using a Cloud Key
/// Management Service crypto key. These values must be specified in the
/// build's `Secret`.
#[prost(string, repeated, tag = "8")]
pub secret_env: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// List of volumes to mount into the build step.
///
/// Each volume is created as an empty volume prior to execution of the
/// build step. Upon completion of the build, volumes and their contents are
/// discarded.
///
/// Using a named volume in only one step is not valid as it is indicative
/// of a build request with an incorrect configuration.
#[prost(message, repeated, tag = "9")]
pub volumes: ::prost::alloc::vec::Vec<Volume>,
/// Output only. Stores timing information for executing this build step.
#[prost(message, optional, tag = "10")]
pub timing: ::core::option::Option<TimeSpan>,
/// Output only. Stores timing information for pulling this build step's
/// builder image only.
#[prost(message, optional, tag = "13")]
pub pull_timing: ::core::option::Option<TimeSpan>,
/// Time limit for executing this build step. If not defined, the step has no
/// time limit and will be allowed to continue to run until either it completes
/// or the build itself times out.
#[prost(message, optional, tag = "11")]
pub timeout: ::core::option::Option<::prost_types::Duration>,
/// Output only. Status of the build step. At this time, build step status is
/// only updated on build completion; step status is not updated in real-time
/// as the build progresses.
#[prost(enumeration = "build::Status", tag = "12")]
pub status: i32,
/// Allow this build step to fail without failing the entire build.
///
/// If false, the entire build will fail if this step fails. Otherwise, the
/// build will succeed, but this step will still have a failure status.
/// Error information will be reported in the failure_detail field.
#[prost(bool, tag = "14")]
pub allow_failure: bool,
/// Output only. Return code from running the step.
#[prost(int32, tag = "16")]
pub exit_code: i32,
/// Allow this build step to fail without failing the entire build if and
/// only if the exit code is one of the specified codes. If allow_failure
/// is also specified, this field will take precedence.
#[prost(int32, repeated, tag = "18")]
pub allow_exit_codes: ::prost::alloc::vec::Vec<i32>,
/// A shell script to be executed in the step.
///
/// When script is provided, the user cannot specify the entrypoint or args.
#[prost(string, tag = "19")]
pub script: ::prost::alloc::string::String,
/// Option to include built-in and custom substitutions as env variables
/// for this build step. This option will override the global option
/// in BuildOption.
#[prost(bool, optional, tag = "20")]
pub automap_substitutions: ::core::option::Option<bool>,
}
/// Volume describes a Docker container volume which is mounted into build steps
/// in order to persist files across build step execution.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Volume {
/// Name of the volume to mount.
///
/// Volume names must be unique per build step and must be valid names for
/// Docker volumes. Each named volume must be used by at least two build steps.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Path at which to mount the volume.
///
/// Paths must be absolute and cannot conflict with other volume paths on the
/// same build step or with certain reserved volume paths.
#[prost(string, tag = "2")]
pub path: ::prost::alloc::string::String,
}
/// Artifacts created by the build pipeline.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Results {
/// Container images that were built as a part of the build.
#[prost(message, repeated, tag = "2")]
pub images: ::prost::alloc::vec::Vec<BuiltImage>,
/// List of build step digests, in the order corresponding to build step
/// indices.
#[prost(string, repeated, tag = "3")]
pub build_step_images: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Path to the artifact manifest for non-container artifacts uploaded to Cloud
/// Storage. Only populated when artifacts are uploaded to Cloud Storage.
#[prost(string, tag = "4")]
pub artifact_manifest: ::prost::alloc::string::String,
/// Number of non-container artifacts uploaded to Cloud Storage. Only populated
/// when artifacts are uploaded to Cloud Storage.
#[prost(int64, tag = "5")]
pub num_artifacts: i64,
/// List of build step outputs, produced by builder images, in the order
/// corresponding to build step indices.
///
/// [Cloud Builders](<https://cloud.google.com/cloud-build/docs/cloud-builders>)
/// can produce this output by writing to `$BUILDER_OUTPUT/output`.
/// Only the first 4KB of data is stored.
#[prost(bytes = "bytes", repeated, tag = "6")]
pub build_step_outputs: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
/// Time to push all non-container artifacts to Cloud Storage.
#[prost(message, optional, tag = "7")]
pub artifact_timing: ::core::option::Option<TimeSpan>,
/// Python artifacts uploaded to Artifact Registry at the end of the build.
#[prost(message, repeated, tag = "8")]
pub python_packages: ::prost::alloc::vec::Vec<UploadedPythonPackage>,
/// Maven artifacts uploaded to Artifact Registry at the end of the build.
#[prost(message, repeated, tag = "9")]
pub maven_artifacts: ::prost::alloc::vec::Vec<UploadedMavenArtifact>,
/// Npm packages uploaded to Artifact Registry at the end of the build.
#[prost(message, repeated, tag = "12")]
pub npm_packages: ::prost::alloc::vec::Vec<UploadedNpmPackage>,
}
/// An artifact that was uploaded during a build. This
/// is a single record in the artifact manifest JSON file.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArtifactResult {
/// The path of an artifact in a Cloud Storage bucket, with the
/// generation number. For example,
/// `gs://mybucket/path/to/output.jar#generation`.
#[prost(string, tag = "1")]
pub location: ::prost::alloc::string::String,
/// The file hash of the artifact.
#[prost(message, repeated, tag = "2")]
pub file_hash: ::prost::alloc::vec::Vec<FileHashes>,
}
/// A build resource in the Cloud Build API.
///
/// At a high level, a `Build` describes where to find source code, how to build
/// it (for example, the builder image to run on the source), and where to store
/// the built artifacts.
///
/// Fields can include the following variables, which will be expanded when the
/// build is created:
///
/// - $PROJECT_ID: the project ID of the build.
/// - $PROJECT_NUMBER: the project number of the build.
/// - $LOCATION: the location/region of the build.
/// - $BUILD_ID: the autogenerated ID of the build.
/// - $REPO_NAME: the source repository name specified by RepoSource.
/// - $BRANCH_NAME: the branch name specified by RepoSource.
/// - $TAG_NAME: the tag name specified by RepoSource.
/// - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
/// resolved from the specified branch or tag.
/// - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Build {
/// Output only. The 'Build' name with format:
/// `projects/{project}/locations/{location}/builds/{build}`, where {build}
/// is a unique identifier generated by the service.
#[prost(string, tag = "45")]
pub name: ::prost::alloc::string::String,
/// Output only. Unique identifier of the build.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// Output only. ID of the project.
#[prost(string, tag = "16")]
pub project_id: ::prost::alloc::string::String,
/// Output only. Status of the build.
#[prost(enumeration = "build::Status", tag = "2")]
pub status: i32,
/// Output only. Customer-readable message about the current status.
#[prost(string, tag = "24")]
pub status_detail: ::prost::alloc::string::String,
/// The location of the source files to build.
#[prost(message, optional, tag = "3")]
pub source: ::core::option::Option<Source>,
/// Required. The operations to be performed on the workspace.
#[prost(message, repeated, tag = "11")]
pub steps: ::prost::alloc::vec::Vec<BuildStep>,
/// Output only. Results of the build.
#[prost(message, optional, tag = "10")]
pub results: ::core::option::Option<Results>,
/// Output only. Time at which the request to create the build was received.
#[prost(message, optional, tag = "6")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Time at which execution of the build was started.
#[prost(message, optional, tag = "7")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Time at which execution of the build was finished.
///
/// The difference between finish_time and start_time is the duration of the
/// build's execution.
#[prost(message, optional, tag = "8")]
pub finish_time: ::core::option::Option<::prost_types::Timestamp>,
/// Amount of time that this build should be allowed to run, to second
/// granularity. If this amount of time elapses, work on the build will cease
/// and the build status will be `TIMEOUT`.
///
/// `timeout` starts ticking from `startTime`.
///
/// Default time is 60 minutes.
#[prost(message, optional, tag = "12")]
pub timeout: ::core::option::Option<::prost_types::Duration>,
/// A list of images to be pushed upon the successful completion of all build
/// steps.
///
/// The images are pushed using the builder service account's credentials.
///
/// The digests of the pushed images will be stored in the `Build` resource's
/// results field.
///
/// If any of the images fail to be pushed, the build status is marked
/// `FAILURE`.
#[prost(string, repeated, tag = "13")]
pub images: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// TTL in queue for this build. If provided and the build is enqueued longer
/// than this value, the build will expire and the build status will be
/// `EXPIRED`.
///
/// The TTL starts ticking from create_time.
#[prost(message, optional, tag = "40")]
pub queue_ttl: ::core::option::Option<::prost_types::Duration>,
/// Artifacts produced by the build that should be uploaded upon
/// successful completion of all build steps.
#[prost(message, optional, tag = "37")]
pub artifacts: ::core::option::Option<Artifacts>,
/// Cloud Storage bucket where logs should be written (see
/// [Bucket Name
/// Requirements](<https://cloud.google.com/storage/docs/bucket-naming#requirements>)).
/// Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
#[prost(string, tag = "19")]
pub logs_bucket: ::prost::alloc::string::String,
/// Output only. A permanent fixed identifier for source.
#[prost(message, optional, tag = "21")]
pub source_provenance: ::core::option::Option<SourceProvenance>,
/// Output only. The ID of the `BuildTrigger` that triggered this build, if it
/// was triggered automatically.
#[prost(string, tag = "22")]
pub build_trigger_id: ::prost::alloc::string::String,
/// Special options for this build.
#[prost(message, optional, tag = "23")]
pub options: ::core::option::Option<BuildOptions>,
/// Output only. URL to logs for this build in Google Cloud Console.
#[prost(string, tag = "25")]
pub log_url: ::prost::alloc::string::String,
/// Substitutions data for `Build` resource.
#[prost(btree_map = "string, string", tag = "29")]
pub substitutions: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Tags for annotation of a `Build`. These are not docker tags.
#[prost(string, repeated, tag = "31")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Secrets to decrypt using Cloud Key Management Service.
/// Note: Secret Manager is the recommended technique
/// for managing sensitive data with Cloud Build. Use `available_secrets` to
/// configure builds to access secrets from Secret Manager. For instructions,
/// see: <https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets>
#[prost(message, repeated, tag = "32")]
pub secrets: ::prost::alloc::vec::Vec<Secret>,
/// Output only. Stores timing information for phases of the build. Valid keys
/// are:
///
/// * BUILD: time to execute all build steps.
/// * PUSH: time to push all artifacts including docker images and non docker
/// artifacts.
/// * FETCHSOURCE: time to fetch source.
/// * SETUPBUILD: time to set up build.
///
/// If the build does not specify source or images,
/// these keys will not be included.
#[prost(btree_map = "string, message", tag = "33")]
pub timing: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
TimeSpan,
>,
/// Output only. Describes this build's approval configuration, status,
/// and result.
#[prost(message, optional, tag = "44")]
pub approval: ::core::option::Option<BuildApproval>,
/// IAM service account whose credentials will be used at build runtime.
/// Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
/// ACCOUNT can be email address or uniqueId of the service account.
///
#[prost(string, tag = "42")]
pub service_account: ::prost::alloc::string::String,
/// Secrets and secret environment variables.
#[prost(message, optional, tag = "47")]
pub available_secrets: ::core::option::Option<Secrets>,
/// Output only. Non-fatal problems encountered during the execution of the
/// build.
#[prost(message, repeated, tag = "49")]
pub warnings: ::prost::alloc::vec::Vec<build::Warning>,
/// Output only. Contains information about the build when status=FAILURE.
#[prost(message, optional, tag = "51")]
pub failure_info: ::core::option::Option<build::FailureInfo>,
}
/// Nested message and enum types in `Build`.
pub mod build {
/// A non-fatal problem encountered during the execution of the build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Warning {
/// Explanation of the warning generated.
#[prost(string, tag = "1")]
pub text: ::prost::alloc::string::String,
/// The priority for this warning.
#[prost(enumeration = "warning::Priority", tag = "2")]
pub priority: i32,
}
/// Nested message and enum types in `Warning`.
pub mod warning {
/// The relative importance of this warning.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Priority {
/// Should not be used.
Unspecified = 0,
/// e.g. deprecation warnings and alternative feature highlights.
Info = 1,
/// e.g. automated detection of possible issues with the build.
Warning = 2,
/// e.g. alerts that a feature used in the build is pending removal
Alert = 3,
}
impl Priority {
/// 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 {
Priority::Unspecified => "PRIORITY_UNSPECIFIED",
Priority::Info => "INFO",
Priority::Warning => "WARNING",
Priority::Alert => "ALERT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PRIORITY_UNSPECIFIED" => Some(Self::Unspecified),
"INFO" => Some(Self::Info),
"WARNING" => Some(Self::Warning),
"ALERT" => Some(Self::Alert),
_ => None,
}
}
}
}
/// A fatal problem encountered during the execution of the build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FailureInfo {
/// The name of the failure.
#[prost(enumeration = "failure_info::FailureType", tag = "1")]
pub r#type: i32,
/// Explains the failure issue in more detail using hard-coded text.
#[prost(string, tag = "2")]
pub detail: ::prost::alloc::string::String,
}
/// Nested message and enum types in `FailureInfo`.
pub mod failure_info {
/// The name of a fatal problem encountered during the execution of the
/// build.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum FailureType {
/// Type unspecified
Unspecified = 0,
/// Unable to push the image to the repository.
PushFailed = 1,
/// Final image not found.
PushImageNotFound = 2,
/// Unauthorized push of the final image.
PushNotAuthorized = 3,
/// Backend logging failures. Should retry.
LoggingFailure = 4,
/// A build step has failed.
UserBuildStep = 5,
/// The source fetching has failed.
FetchSourceFailed = 6,
}
impl FailureType {
/// 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 {
FailureType::Unspecified => "FAILURE_TYPE_UNSPECIFIED",
FailureType::PushFailed => "PUSH_FAILED",
FailureType::PushImageNotFound => "PUSH_IMAGE_NOT_FOUND",
FailureType::PushNotAuthorized => "PUSH_NOT_AUTHORIZED",
FailureType::LoggingFailure => "LOGGING_FAILURE",
FailureType::UserBuildStep => "USER_BUILD_STEP",
FailureType::FetchSourceFailed => "FETCH_SOURCE_FAILED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FAILURE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PUSH_FAILED" => Some(Self::PushFailed),
"PUSH_IMAGE_NOT_FOUND" => Some(Self::PushImageNotFound),
"PUSH_NOT_AUTHORIZED" => Some(Self::PushNotAuthorized),
"LOGGING_FAILURE" => Some(Self::LoggingFailure),
"USER_BUILD_STEP" => Some(Self::UserBuildStep),
"FETCH_SOURCE_FAILED" => Some(Self::FetchSourceFailed),
_ => None,
}
}
}
}
/// Possible status of a build or build step.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
/// Status of the build is unknown.
Unknown = 0,
/// Build has been created and is pending execution and queuing. It has not
/// been queued.
Pending = 10,
/// Build or step is queued; work has not yet begun.
Queued = 1,
/// Build or step is being executed.
Working = 2,
/// Build or step finished successfully.
Success = 3,
/// Build or step failed to complete successfully.
Failure = 4,
/// Build or step failed due to an internal cause.
InternalError = 5,
/// Build or step took longer than was allowed.
Timeout = 6,
/// Build or step was canceled by a user.
Cancelled = 7,
/// Build was enqueued for longer than the value of `queue_ttl`.
Expired = 9,
}
impl Status {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unknown => "STATUS_UNKNOWN",
Status::Pending => "PENDING",
Status::Queued => "QUEUED",
Status::Working => "WORKING",
Status::Success => "SUCCESS",
Status::Failure => "FAILURE",
Status::InternalError => "INTERNAL_ERROR",
Status::Timeout => "TIMEOUT",
Status::Cancelled => "CANCELLED",
Status::Expired => "EXPIRED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNKNOWN" => Some(Self::Unknown),
"PENDING" => Some(Self::Pending),
"QUEUED" => Some(Self::Queued),
"WORKING" => Some(Self::Working),
"SUCCESS" => Some(Self::Success),
"FAILURE" => Some(Self::Failure),
"INTERNAL_ERROR" => Some(Self::InternalError),
"TIMEOUT" => Some(Self::Timeout),
"CANCELLED" => Some(Self::Cancelled),
"EXPIRED" => Some(Self::Expired),
_ => None,
}
}
}
}
/// Artifacts produced by a build that should be uploaded upon
/// successful completion of all build steps.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Artifacts {
/// A list of images to be pushed upon the successful completion of all build
/// steps.
///
/// The images will be pushed using the builder service account's credentials.
///
/// The digests of the pushed images will be stored in the Build resource's
/// results field.
///
/// If any of the images fail to be pushed, the build is marked FAILURE.
#[prost(string, repeated, tag = "1")]
pub images: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// A list of objects to be uploaded to Cloud Storage upon successful
/// completion of all build steps.
///
/// Files in the workspace matching specified paths globs will be uploaded to
/// the specified Cloud Storage location using the builder service account's
/// credentials.
///
/// The location and generation of the uploaded objects will be stored in the
/// Build resource's results field.
///
/// If any objects fail to be pushed, the build is marked FAILURE.
#[prost(message, optional, tag = "2")]
pub objects: ::core::option::Option<artifacts::ArtifactObjects>,
/// A list of Maven artifacts to be uploaded to Artifact Registry upon
/// successful completion of all build steps.
///
/// Artifacts in the workspace matching specified paths globs will be uploaded
/// to the specified Artifact Registry repository using the builder service
/// account's credentials.
///
/// If any artifacts fail to be pushed, the build is marked FAILURE.
#[prost(message, repeated, tag = "3")]
pub maven_artifacts: ::prost::alloc::vec::Vec<artifacts::MavenArtifact>,
/// A list of Python packages to be uploaded to Artifact Registry upon
/// successful completion of all build steps.
///
/// The build service account credentials will be used to perform the upload.
///
/// If any objects fail to be pushed, the build is marked FAILURE.
#[prost(message, repeated, tag = "5")]
pub python_packages: ::prost::alloc::vec::Vec<artifacts::PythonPackage>,
/// A list of npm packages to be uploaded to Artifact Registry upon
/// successful completion of all build steps.
///
/// Npm packages in the specified paths will be uploaded
/// to the specified Artifact Registry repository using the builder service
/// account's credentials.
///
/// If any packages fail to be pushed, the build is marked FAILURE.
#[prost(message, repeated, tag = "6")]
pub npm_packages: ::prost::alloc::vec::Vec<artifacts::NpmPackage>,
}
/// Nested message and enum types in `Artifacts`.
pub mod artifacts {
/// Files in the workspace to upload to Cloud Storage upon successful
/// completion of all build steps.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArtifactObjects {
/// Cloud Storage bucket and optional object path, in the form
/// "gs://bucket/path/to/somewhere/". (see [Bucket Name
/// Requirements](<https://cloud.google.com/storage/docs/bucket-naming#requirements>)).
///
/// Files in the workspace matching any path pattern will be uploaded to
/// Cloud Storage with this location as a prefix.
#[prost(string, tag = "1")]
pub location: ::prost::alloc::string::String,
/// Path globs used to match files in the build's workspace.
#[prost(string, repeated, tag = "2")]
pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Output only. Stores timing information for pushing all artifact objects.
#[prost(message, optional, tag = "3")]
pub timing: ::core::option::Option<super::TimeSpan>,
}
/// A Maven artifact to upload to Artifact Registry upon successful completion
/// of all build steps.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MavenArtifact {
/// Artifact Registry repository, in the form
/// "<https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY">
///
/// Artifact in the workspace specified by path will be uploaded to
/// Artifact Registry with this location as a prefix.
#[prost(string, tag = "1")]
pub repository: ::prost::alloc::string::String,
/// Path to an artifact in the build's workspace to be uploaded to
/// Artifact Registry.
/// This can be either an absolute path,
/// e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar
/// or a relative path from /workspace,
/// e.g. my-app/target/my-app-1.0.SNAPSHOT.jar.
#[prost(string, tag = "2")]
pub path: ::prost::alloc::string::String,
/// Maven `artifactId` value used when uploading the artifact to Artifact
/// Registry.
#[prost(string, tag = "3")]
pub artifact_id: ::prost::alloc::string::String,
/// Maven `groupId` value used when uploading the artifact to Artifact
/// Registry.
#[prost(string, tag = "4")]
pub group_id: ::prost::alloc::string::String,
/// Maven `version` value used when uploading the artifact to Artifact
/// Registry.
#[prost(string, tag = "5")]
pub version: ::prost::alloc::string::String,
}
/// Python package to upload to Artifact Registry upon successful completion
/// of all build steps. A package can encapsulate multiple objects to be
/// uploaded to a single repository.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PythonPackage {
/// Artifact Registry repository, in the form
/// "<https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY">
///
/// Files in the workspace matching any path pattern will be uploaded to
/// Artifact Registry with this location as a prefix.
#[prost(string, tag = "1")]
pub repository: ::prost::alloc::string::String,
/// Path globs used to match files in the build's workspace. For Python/
/// Twine, this is usually `dist/*`, and sometimes additionally an `.asc`
/// file.
#[prost(string, repeated, tag = "2")]
pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Npm package to upload to Artifact Registry upon successful completion
/// of all build steps.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NpmPackage {
/// Artifact Registry repository, in the form
/// "<https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY">
///
/// Npm package in the workspace specified by path will be zipped and
/// uploaded to Artifact Registry with this location as a prefix.
#[prost(string, tag = "1")]
pub repository: ::prost::alloc::string::String,
/// Path to the package.json.
/// e.g. workspace/path/to/package
#[prost(string, tag = "2")]
pub package_path: ::prost::alloc::string::String,
}
}
/// Start and end times for a build execution phase.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeSpan {
/// Start of time span.
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// End of time span.
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Metadata for build operations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BuildOperationMetadata {
/// The build that the operation is tracking.
#[prost(message, optional, tag = "1")]
pub build: ::core::option::Option<Build>,
}
/// Provenance of the source. Ways to find the original source, or verify that
/// some source was used for this build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceProvenance {
/// A copy of the build's `source.storage_source`, if exists, with any
/// generations resolved.
#[prost(message, optional, tag = "3")]
pub resolved_storage_source: ::core::option::Option<StorageSource>,
/// A copy of the build's `source.repo_source`, if exists, with any
/// revisions resolved.
#[prost(message, optional, tag = "6")]
pub resolved_repo_source: ::core::option::Option<RepoSource>,
/// A copy of the build's `source.storage_source_manifest`, if exists, with any
/// revisions resolved.
/// This feature is in Preview.
#[prost(message, optional, tag = "9")]
pub resolved_storage_source_manifest: ::core::option::Option<StorageSourceManifest>,
/// Output only. Hash(es) of the build source, which can be used to verify that
/// the original source integrity was maintained in the build. Note that
/// `FileHashes` will only be populated if `BuildOptions` has requested a
/// `SourceProvenanceHash`.
///
/// The keys to this map are file paths used as build source and the values
/// contain the hash values for those files.
///
/// If the build source came in a single package such as a gzipped tarfile
/// (`.tar.gz`), the `FileHash` will be for the single path to that file.
#[prost(btree_map = "string, message", tag = "4")]
pub file_hashes: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
FileHashes,
>,
}
/// Container message for hashes of byte content of files, used in
/// SourceProvenance messages to verify integrity of source input to the build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileHashes {
/// Collection of file hashes.
#[prost(message, repeated, tag = "1")]
pub file_hash: ::prost::alloc::vec::Vec<Hash>,
}
/// Container message for hash values.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hash {
/// The type of hash that was performed.
#[prost(enumeration = "hash::HashType", tag = "1")]
pub r#type: i32,
/// The hash value.
#[prost(bytes = "bytes", tag = "2")]
pub value: ::prost::bytes::Bytes,
}
/// Nested message and enum types in `Hash`.
pub mod hash {
/// Specifies the hash algorithm, if any.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum HashType {
/// No hash requested.
None = 0,
/// Use a sha256 hash.
Sha256 = 1,
/// Use a md5 hash.
Md5 = 2,
/// Use a sha512 hash.
Sha512 = 4,
}
impl HashType {
/// 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 {
HashType::None => "NONE",
HashType::Sha256 => "SHA256",
HashType::Md5 => "MD5",
HashType::Sha512 => "SHA512",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NONE" => Some(Self::None),
"SHA256" => Some(Self::Sha256),
"MD5" => Some(Self::Md5),
"SHA512" => Some(Self::Sha512),
_ => None,
}
}
}
}
/// Secrets and secret environment variables.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Secrets {
/// Secrets in Secret Manager and associated secret environment variable.
#[prost(message, repeated, tag = "1")]
pub secret_manager: ::prost::alloc::vec::Vec<SecretManagerSecret>,
/// Secrets encrypted with KMS key and the associated secret environment
/// variable.
#[prost(message, repeated, tag = "2")]
pub inline: ::prost::alloc::vec::Vec<InlineSecret>,
}
/// Pairs a set of secret environment variables mapped to encrypted
/// values with the Cloud KMS key to use to decrypt the value.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InlineSecret {
/// Resource name of Cloud KMS crypto key to decrypt the encrypted value.
/// In format: projects/*/locations/*/keyRings/*/cryptoKeys/*
#[prost(string, tag = "1")]
pub kms_key_name: ::prost::alloc::string::String,
/// Map of environment variable name to its encrypted value.
///
/// Secret environment variables must be unique across all of a build's
/// secrets, and must be used by at least one build step. Values can be at most
/// 64 KB in size. There can be at most 100 secret values across all of a
/// build's secrets.
#[prost(btree_map = "string, bytes", tag = "2")]
pub env_map: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::bytes::Bytes,
>,
}
/// Pairs a secret environment variable with a SecretVersion in Secret Manager.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SecretManagerSecret {
/// Resource name of the SecretVersion. In format:
/// projects/*/secrets/*/versions/*
#[prost(string, tag = "1")]
pub version_name: ::prost::alloc::string::String,
/// Environment variable name to associate with the secret.
/// Secret environment variables must be unique across all of a build's
/// secrets, and must be used by at least one build step.
#[prost(string, tag = "2")]
pub env: ::prost::alloc::string::String,
}
/// Pairs a set of secret environment variables containing encrypted
/// values with the Cloud KMS key to use to decrypt the value.
/// Note: Use `kmsKeyName` with `available_secrets` instead of using
/// `kmsKeyName` with `secret`. For instructions see:
/// <https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.>
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Secret {
/// Cloud KMS key name to use to decrypt these envs.
#[prost(string, tag = "1")]
pub kms_key_name: ::prost::alloc::string::String,
/// Map of environment variable name to its encrypted value.
///
/// Secret environment variables must be unique across all of a build's
/// secrets, and must be used by at least one build step. Values can be at most
/// 64 KB in size. There can be at most 100 secret values across all of a
/// build's secrets.
#[prost(btree_map = "string, bytes", tag = "3")]
pub secret_env: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::bytes::Bytes,
>,
}
/// Request to create a new build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBuildRequest {
/// The parent resource where this build will be created.
/// Format: `projects/{project}/locations/{location}`
#[prost(string, tag = "4")]
pub parent: ::prost::alloc::string::String,
/// Required. ID of the project.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Required. Build resource to create.
#[prost(message, optional, tag = "2")]
pub build: ::core::option::Option<Build>,
}
/// Request to get a build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBuildRequest {
/// The name of the `Build` to retrieve.
/// Format: `projects/{project}/locations/{location}/builds/{build}`
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
/// Required. ID of the project.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Required. ID of the build.
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
}
/// Request to list builds.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBuildsRequest {
/// The parent of the collection of `Builds`.
/// Format: `projects/{project}/locations/{location}`
#[prost(string, tag = "9")]
pub parent: ::prost::alloc::string::String,
/// Required. ID of the project.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Number of results to return in the list.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// The page token for the next page of Builds.
///
/// If unspecified, the first page of results is returned.
///
/// If the token is rejected for any reason, INVALID_ARGUMENT will be thrown.
/// In this case, the token should be discarded, and pagination should be
/// restarted from the first page of results.
///
/// See <https://google.aip.dev/158> for more.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// The raw filter text to constrain the results.
#[prost(string, tag = "8")]
pub filter: ::prost::alloc::string::String,
}
/// Response including listed builds.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBuildsResponse {
/// Builds will be sorted by `create_time`, descending.
#[prost(message, repeated, tag = "1")]
pub builds: ::prost::alloc::vec::Vec<Build>,
/// Token to receive the next page of results.
/// This will be absent if the end of the response list has been reached.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Request to cancel an ongoing build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelBuildRequest {
/// The name of the `Build` to cancel.
/// Format: `projects/{project}/locations/{location}/builds/{build}`
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
/// Required. ID of the project.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Required. ID of the build.
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
}
/// Request to approve or reject a pending build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApproveBuildRequest {
/// Required. Name of the target build.
/// For example: "projects/{$project_id}/builds/{$build_id}"
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Approval decision and metadata.
#[prost(message, optional, tag = "2")]
pub approval_result: ::core::option::Option<ApprovalResult>,
}
/// BuildApproval describes a build's approval configuration, state, and
/// result.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BuildApproval {
/// Output only. The state of this build's approval.
#[prost(enumeration = "build_approval::State", tag = "1")]
pub state: i32,
/// Output only. Configuration for manual approval of this build.
#[prost(message, optional, tag = "2")]
pub config: ::core::option::Option<ApprovalConfig>,
/// Output only. Result of manual approval for this Build.
#[prost(message, optional, tag = "3")]
pub result: ::core::option::Option<ApprovalResult>,
}
/// Nested message and enum types in `BuildApproval`.
pub mod build_approval {
/// Specifies the current state of a build's approval.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// Default enum type. This should not be used.
Unspecified = 0,
/// Build approval is pending.
Pending = 1,
/// Build approval has been approved.
Approved = 2,
/// Build approval has been rejected.
Rejected = 3,
/// Build was cancelled while it was still pending approval.
Cancelled = 5,
}
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::Pending => "PENDING",
State::Approved => "APPROVED",
State::Rejected => "REJECTED",
State::Cancelled => "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 {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"PENDING" => Some(Self::Pending),
"APPROVED" => Some(Self::Approved),
"REJECTED" => Some(Self::Rejected),
"CANCELLED" => Some(Self::Cancelled),
_ => None,
}
}
}
}
/// ApprovalConfig describes configuration for manual approval of a build.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ApprovalConfig {
/// Whether or not approval is needed. If this is set on a build, it will
/// become pending when created, and will need to be explicitly approved
/// to start.
#[prost(bool, tag = "1")]
pub approval_required: bool,
}
/// ApprovalResult describes the decision and associated metadata of a manual
/// approval of a build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApprovalResult {
/// Output only. Email of the user that called the ApproveBuild API to
/// approve or reject a build at the time that the API was called.
#[prost(string, tag = "2")]
pub approver_account: ::prost::alloc::string::String,
/// Output only. The time when the approval decision was made.
#[prost(message, optional, tag = "3")]
pub approval_time: ::core::option::Option<::prost_types::Timestamp>,
/// Required. The decision of this manual approval.
#[prost(enumeration = "approval_result::Decision", tag = "4")]
pub decision: i32,
/// Optional. An optional comment for this manual approval result.
#[prost(string, tag = "5")]
pub comment: ::prost::alloc::string::String,
/// Optional. An optional URL tied to this manual approval result. This field
/// is essentially the same as comment, except that it will be rendered by the
/// UI differently. An example use case is a link to an external job that
/// approved this Build.
#[prost(string, tag = "6")]
pub url: ::prost::alloc::string::String,
}
/// Nested message and enum types in `ApprovalResult`.
pub mod approval_result {
/// Specifies whether or not this manual approval result is to approve
/// or reject a build.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Decision {
/// Default enum type. This should not be used.
Unspecified = 0,
/// Build is approved.
Approved = 1,
/// Build is rejected.
Rejected = 2,
}
impl Decision {
/// 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 {
Decision::Unspecified => "DECISION_UNSPECIFIED",
Decision::Approved => "APPROVED",
Decision::Rejected => "REJECTED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DECISION_UNSPECIFIED" => Some(Self::Unspecified),
"APPROVED" => Some(Self::Approved),
"REJECTED" => Some(Self::Rejected),
_ => None,
}
}
}
}
/// GitRepoSource describes a repo and ref of a code repository.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitRepoSource {
/// The URI of the repo (e.g. <https://github.com/user/repo.git>).
/// Either `uri` or `repository` can be specified and is required.
#[prost(string, tag = "1")]
pub uri: ::prost::alloc::string::String,
/// The branch or tag to use. Must start with "refs/" (required).
#[prost(string, tag = "2")]
pub r#ref: ::prost::alloc::string::String,
/// See RepoType below.
#[prost(enumeration = "git_file_source::RepoType", tag = "3")]
pub repo_type: i32,
/// The source of the SCM repo.
#[prost(oneof = "git_repo_source::Source", tags = "6")]
pub source: ::core::option::Option<git_repo_source::Source>,
/// The resource name of the enterprise config that should be applied
/// to this source.
#[prost(oneof = "git_repo_source::EnterpriseConfig", tags = "4")]
pub enterprise_config: ::core::option::Option<git_repo_source::EnterpriseConfig>,
}
/// Nested message and enum types in `GitRepoSource`.
pub mod git_repo_source {
/// The source of the SCM repo.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
/// The connected repository resource name, in the format
/// `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
/// `repository` can be specified and is required.
#[prost(string, tag = "6")]
Repository(::prost::alloc::string::String),
}
/// The resource name of the enterprise config that should be applied
/// to this source.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EnterpriseConfig {
/// The full resource name of the github enterprise config.
/// Format:
/// `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
/// `projects/{project}/githubEnterpriseConfigs/{id}`.
#[prost(string, tag = "4")]
GithubEnterpriseConfig(::prost::alloc::string::String),
}
}
/// GitFileSource describes a file within a (possibly remote) code repository.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitFileSource {
/// The path of the file, with the repo root as the root of the path.
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
/// The URI of the repo.
/// Either uri or repository can be specified.
/// If unspecified, the repo from which the trigger invocation originated is
/// assumed to be the repo from which to read the specified path.
#[prost(string, tag = "2")]
pub uri: ::prost::alloc::string::String,
/// See RepoType above.
#[prost(enumeration = "git_file_source::RepoType", tag = "3")]
pub repo_type: i32,
/// The branch, tag, arbitrary ref, or SHA version of the repo to use when
/// resolving the filename (optional).
/// This field respects the same syntax/resolution as described here:
/// <https://git-scm.com/docs/gitrevisions>
/// If unspecified, the revision from which the trigger invocation originated
/// is assumed to be the revision from which to read the specified path.
#[prost(string, tag = "4")]
pub revision: ::prost::alloc::string::String,
/// The source of the SCM repo.
#[prost(oneof = "git_file_source::Source", tags = "7")]
pub source: ::core::option::Option<git_file_source::Source>,
/// The resource name of the enterprise config that should be applied
/// to this source.
#[prost(oneof = "git_file_source::EnterpriseConfig", tags = "5")]
pub enterprise_config: ::core::option::Option<git_file_source::EnterpriseConfig>,
}
/// Nested message and enum types in `GitFileSource`.
pub mod git_file_source {
/// The type of the repo, since it may not be explicit from the `repo` field
/// (e.g from a URL).
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RepoType {
/// The default, unknown repo type. Don't use it, instead use one of
/// the other repo types.
Unknown = 0,
/// A Google Cloud Source Repositories-hosted repo.
CloudSourceRepositories = 1,
/// A GitHub-hosted repo not necessarily on "github.com" (i.e. GitHub
/// Enterprise).
Github = 2,
/// A Bitbucket Server-hosted repo.
BitbucketServer = 3,
/// A GitLab-hosted repo.
Gitlab = 4,
}
impl RepoType {
/// 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 {
RepoType::Unknown => "UNKNOWN",
RepoType::CloudSourceRepositories => "CLOUD_SOURCE_REPOSITORIES",
RepoType::Github => "GITHUB",
RepoType::BitbucketServer => "BITBUCKET_SERVER",
RepoType::Gitlab => "GITLAB",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"CLOUD_SOURCE_REPOSITORIES" => Some(Self::CloudSourceRepositories),
"GITHUB" => Some(Self::Github),
"BITBUCKET_SERVER" => Some(Self::BitbucketServer),
"GITLAB" => Some(Self::Gitlab),
_ => None,
}
}
}
/// The source of the SCM repo.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
/// The fully qualified resource name of the Repos API repository.
/// Either URI or repository can be specified.
/// If unspecified, the repo from which the trigger invocation originated is
/// assumed to be the repo from which to read the specified path.
#[prost(string, tag = "7")]
Repository(::prost::alloc::string::String),
}
/// The resource name of the enterprise config that should be applied
/// to this source.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EnterpriseConfig {
/// The full resource name of the github enterprise config.
/// Format:
/// `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
/// `projects/{project}/githubEnterpriseConfigs/{id}`.
#[prost(string, tag = "5")]
GithubEnterpriseConfig(::prost::alloc::string::String),
}
}
/// Configuration for an automated build in response to source repository
/// changes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BuildTrigger {
/// The `Trigger` name with format:
/// `projects/{project}/locations/{location}/triggers/{trigger}`, where
/// {trigger} is a unique identifier generated by the service.
#[prost(string, tag = "34")]
pub resource_name: ::prost::alloc::string::String,
/// Output only. Unique identifier of the trigger.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// Human-readable description of this trigger.
#[prost(string, tag = "10")]
pub description: ::prost::alloc::string::String,
/// User-assigned name of the trigger. Must be unique within the project.
/// Trigger names must meet the following requirements:
///
/// + They must contain only alphanumeric characters and dashes.
/// + They can be 1-64 characters long.
/// + They must begin and end with an alphanumeric character.
#[prost(string, tag = "21")]
pub name: ::prost::alloc::string::String,
/// Tags for annotation of a `BuildTrigger`
#[prost(string, repeated, tag = "19")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Template describing the types of source changes to trigger a build.
///
/// Branch and tag names in trigger templates are interpreted as regular
/// expressions. Any branch or tag change that matches that regular expression
/// will trigger a build.
///
/// Mutually exclusive with `github`.
#[prost(message, optional, tag = "7")]
pub trigger_template: ::core::option::Option<RepoSource>,
/// GitHubEventsConfig describes the configuration of a trigger that creates
/// a build whenever a GitHub event is received.
///
/// Mutually exclusive with `trigger_template`.
#[prost(message, optional, tag = "13")]
pub github: ::core::option::Option<GitHubEventsConfig>,
/// PubsubConfig describes the configuration of a trigger that
/// creates a build whenever a Pub/Sub message is published.
#[prost(message, optional, tag = "29")]
pub pubsub_config: ::core::option::Option<PubsubConfig>,
/// WebhookConfig describes the configuration of a trigger that
/// creates a build whenever a webhook is sent to a trigger's webhook URL.
#[prost(message, optional, tag = "31")]
pub webhook_config: ::core::option::Option<WebhookConfig>,
/// Output only. Time when the trigger was created.
#[prost(message, optional, tag = "5")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// If true, the trigger will never automatically execute a build.
#[prost(bool, tag = "9")]
pub disabled: bool,
/// Substitutions for Build resource. The keys must match the following
/// regular expression: `^_\[A-Z0-9_\]+$`.
#[prost(btree_map = "string, string", tag = "11")]
pub substitutions: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// ignored_files and included_files are file glob matches using
/// <https://golang.org/pkg/path/filepath/#Match> extended with support for "**".
///
/// If ignored_files and changed files are both empty, then they are
/// not used to determine whether or not to trigger a build.
///
/// If ignored_files is not empty, then we ignore any files that match
/// any of the ignored_file globs. If the change has no files that are
/// outside of the ignored_files globs, then we do not trigger a build.
#[prost(string, repeated, tag = "15")]
pub ignored_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// If any of the files altered in the commit pass the ignored_files
/// filter and included_files is empty, then as far as this filter is
/// concerned, we should trigger the build.
///
/// If any of the files altered in the commit pass the ignored_files
/// filter and included_files is not empty, then we make sure that at
/// least one of those files matches a included_files glob. If not,
/// then we do not trigger a build.
#[prost(string, repeated, tag = "16")]
pub included_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. A Common Expression Language string.
#[prost(string, tag = "30")]
pub filter: ::prost::alloc::string::String,
/// The repo and ref of the repository from which to build. This field
/// is used only for those triggers that do not respond to SCM events.
/// Triggers that respond to such events build source at whatever commit
/// caused the event.
/// This field is currently only used by Webhook, Pub/Sub, Manual, and Cron
/// triggers.
#[prost(message, optional, tag = "26")]
pub source_to_build: ::core::option::Option<GitRepoSource>,
/// The service account used for all user-controlled operations including
/// UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
/// If no service account is set, then the standard Cloud Build service account
/// (\[PROJECT_NUM\]@system.gserviceaccount.com) will be used instead.
/// Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
#[prost(string, tag = "33")]
pub service_account: ::prost::alloc::string::String,
/// The configuration of a trigger that creates a build whenever an event from
/// Repo API is received.
#[prost(message, optional, tag = "39")]
pub repository_event_config: ::core::option::Option<RepositoryEventConfig>,
/// Template describing the Build request to make when the trigger is matched.
/// At least one of the template fields must be provided.
#[prost(oneof = "build_trigger::BuildTemplate", tags = "18, 4, 8, 24")]
pub build_template: ::core::option::Option<build_trigger::BuildTemplate>,
}
/// Nested message and enum types in `BuildTrigger`.
pub mod build_trigger {
/// Template describing the Build request to make when the trigger is matched.
/// At least one of the template fields must be provided.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum BuildTemplate {
/// Autodetect build configuration. The following precedence is used (case
/// insensitive):
///
/// 1. cloudbuild.yaml
/// 2. cloudbuild.yml
/// 3. cloudbuild.json
/// 4. Dockerfile
///
/// Currently only available for GitHub App Triggers.
#[prost(bool, tag = "18")]
Autodetect(bool),
/// Contents of the build template.
#[prost(message, tag = "4")]
Build(super::Build),
/// Path, from the source root, to the build configuration file
/// (i.e. cloudbuild.yaml).
#[prost(string, tag = "8")]
Filename(::prost::alloc::string::String),
/// The file source describing the local or remote Build template.
#[prost(message, tag = "24")]
GitFileSource(super::GitFileSource),
}
}
/// The configuration of a trigger that creates a build whenever an event from
/// Repo API is received.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepositoryEventConfig {
/// The resource name of the Repo API resource.
#[prost(string, tag = "1")]
pub repository: ::prost::alloc::string::String,
/// Output only. The type of the SCM vendor the repository points to.
#[prost(enumeration = "repository_event_config::RepositoryType", tag = "2")]
pub repository_type: i32,
/// The types of filter to trigger a build.
#[prost(oneof = "repository_event_config::Filter", tags = "3, 4")]
pub filter: ::core::option::Option<repository_event_config::Filter>,
}
/// Nested message and enum types in `RepositoryEventConfig`.
pub mod repository_event_config {
/// All possible SCM repo types from Repo API.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RepositoryType {
/// If unspecified, RepositoryType defaults to GITHUB.
Unspecified = 0,
/// The SCM repo is GITHUB.
Github = 1,
/// The SCM repo is GITHUB Enterprise.
GithubEnterprise = 2,
/// The SCM repo is GITLAB Enterprise.
GitlabEnterprise = 3,
}
impl RepositoryType {
/// 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 {
RepositoryType::Unspecified => "REPOSITORY_TYPE_UNSPECIFIED",
RepositoryType::Github => "GITHUB",
RepositoryType::GithubEnterprise => "GITHUB_ENTERPRISE",
RepositoryType::GitlabEnterprise => "GITLAB_ENTERPRISE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REPOSITORY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"GITHUB" => Some(Self::Github),
"GITHUB_ENTERPRISE" => Some(Self::GithubEnterprise),
"GITLAB_ENTERPRISE" => Some(Self::GitlabEnterprise),
_ => None,
}
}
}
/// The types of filter to trigger a build.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Filter {
/// Filter to match changes in pull requests.
#[prost(message, tag = "3")]
PullRequest(super::PullRequestFilter),
/// Filter to match changes in refs like branches, tags.
#[prost(message, tag = "4")]
Push(super::PushFilter),
}
}
/// GitHubEventsConfig describes the configuration of a trigger that creates a
/// build whenever a GitHub event is received.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitHubEventsConfig {
/// The installationID that emits the GitHub event.
#[deprecated]
#[prost(int64, tag = "1")]
pub installation_id: i64,
/// Owner of the repository. For example: The owner for
/// <https://github.com/googlecloudplatform/cloud-builders> is
/// "googlecloudplatform".
#[prost(string, tag = "6")]
pub owner: ::prost::alloc::string::String,
/// Name of the repository. For example: The name for
/// <https://github.com/googlecloudplatform/cloud-builders> is "cloud-builders".
#[prost(string, tag = "7")]
pub name: ::prost::alloc::string::String,
/// Filter describing the types of events to trigger a build.
/// Currently supported event types: push, pull_request.
#[prost(oneof = "git_hub_events_config::Event", tags = "4, 5")]
pub event: ::core::option::Option<git_hub_events_config::Event>,
}
/// Nested message and enum types in `GitHubEventsConfig`.
pub mod git_hub_events_config {
/// Filter describing the types of events to trigger a build.
/// Currently supported event types: push, pull_request.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Event {
/// filter to match changes in pull requests.
#[prost(message, tag = "4")]
PullRequest(super::PullRequestFilter),
/// filter to match changes in refs like branches, tags.
#[prost(message, tag = "5")]
Push(super::PushFilter),
}
}
/// PubsubConfig describes the configuration of a trigger that
/// creates a build whenever a Pub/Sub message is published.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PubsubConfig {
/// Output only. Name of the subscription. Format is
/// `projects/{project}/subscriptions/{subscription}`.
#[prost(string, tag = "1")]
pub subscription: ::prost::alloc::string::String,
/// The name of the topic from which this subscription is receiving messages.
/// Format is `projects/{project}/topics/{topic}`.
#[prost(string, tag = "2")]
pub topic: ::prost::alloc::string::String,
/// Service account that will make the push request.
#[prost(string, tag = "3")]
pub service_account_email: ::prost::alloc::string::String,
/// Potential issues with the underlying Pub/Sub subscription configuration.
/// Only populated on get requests.
#[prost(enumeration = "pubsub_config::State", tag = "4")]
pub state: i32,
}
/// Nested message and enum types in `PubsubConfig`.
pub mod pubsub_config {
/// Enumerates potential issues with the underlying Pub/Sub subscription
/// configuration.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// The subscription configuration has not been checked.
Unspecified = 0,
/// The Pub/Sub subscription is properly configured.
Ok = 1,
/// The subscription has been deleted.
SubscriptionDeleted = 2,
/// The topic has been deleted.
TopicDeleted = 3,
/// Some of the subscription's field are misconfigured.
SubscriptionMisconfigured = 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::Ok => "OK",
State::SubscriptionDeleted => "SUBSCRIPTION_DELETED",
State::TopicDeleted => "TOPIC_DELETED",
State::SubscriptionMisconfigured => "SUBSCRIPTION_MISCONFIGURED",
}
}
/// 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),
"OK" => Some(Self::Ok),
"SUBSCRIPTION_DELETED" => Some(Self::SubscriptionDeleted),
"TOPIC_DELETED" => Some(Self::TopicDeleted),
"SUBSCRIPTION_MISCONFIGURED" => Some(Self::SubscriptionMisconfigured),
_ => None,
}
}
}
}
/// WebhookConfig describes the configuration of a trigger that
/// creates a build whenever a webhook is sent to a trigger's webhook URL.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WebhookConfig {
/// Potential issues with the underlying Pub/Sub subscription configuration.
/// Only populated on get requests.
#[prost(enumeration = "webhook_config::State", tag = "4")]
pub state: i32,
/// Auth method specifies how the webhook authenticates with GCP.
#[prost(oneof = "webhook_config::AuthMethod", tags = "3")]
pub auth_method: ::core::option::Option<webhook_config::AuthMethod>,
}
/// Nested message and enum types in `WebhookConfig`.
pub mod webhook_config {
/// Enumerates potential issues with the Secret Manager secret provided by the
/// user.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// The webhook auth configuration not been checked.
Unspecified = 0,
/// The auth configuration is properly setup.
Ok = 1,
/// The secret provided in auth_method has been deleted.
SecretDeleted = 2,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Ok => "OK",
State::SecretDeleted => "SECRET_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 {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"OK" => Some(Self::Ok),
"SECRET_DELETED" => Some(Self::SecretDeleted),
_ => None,
}
}
}
/// Auth method specifies how the webhook authenticates with GCP.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AuthMethod {
/// Required. Resource name for the secret required as a URL parameter.
#[prost(string, tag = "3")]
Secret(::prost::alloc::string::String),
}
}
/// PullRequestFilter contains filter properties for matching GitHub Pull
/// Requests.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PullRequestFilter {
/// Configure builds to run whether a repository owner or collaborator need to
/// comment `/gcbrun`.
#[prost(enumeration = "pull_request_filter::CommentControl", tag = "5")]
pub comment_control: i32,
/// If true, branches that do NOT match the git_ref will trigger a build.
#[prost(bool, tag = "6")]
pub invert_regex: bool,
/// Target refs to match.
/// A target ref is the git reference where the pull request will be applied.
#[prost(oneof = "pull_request_filter::GitRef", tags = "2")]
pub git_ref: ::core::option::Option<pull_request_filter::GitRef>,
}
/// Nested message and enum types in `PullRequestFilter`.
pub mod pull_request_filter {
/// Controls behavior of Pull Request comments.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum CommentControl {
/// Do not require comments on Pull Requests before builds are triggered.
CommentsDisabled = 0,
/// Enforce that repository owners or collaborators must comment on Pull
/// Requests before builds are triggered.
CommentsEnabled = 1,
/// Enforce that repository owners or collaborators must comment on external
/// contributors' Pull Requests before builds are triggered.
CommentsEnabledForExternalContributorsOnly = 2,
}
impl CommentControl {
/// 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 {
CommentControl::CommentsDisabled => "COMMENTS_DISABLED",
CommentControl::CommentsEnabled => "COMMENTS_ENABLED",
CommentControl::CommentsEnabledForExternalContributorsOnly => {
"COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_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 {
"COMMENTS_DISABLED" => Some(Self::CommentsDisabled),
"COMMENTS_ENABLED" => Some(Self::CommentsEnabled),
"COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY" => {
Some(Self::CommentsEnabledForExternalContributorsOnly)
}
_ => None,
}
}
}
/// Target refs to match.
/// A target ref is the git reference where the pull request will be applied.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum GitRef {
/// Regex of branches to match.
///
/// The syntax of the regular expressions accepted is the syntax accepted by
/// RE2 and described at <https://github.com/google/re2/wiki/Syntax>
#[prost(string, tag = "2")]
Branch(::prost::alloc::string::String),
}
}
/// Push contains filter properties for matching GitHub git pushes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PushFilter {
/// When true, only trigger a build if the revision regex does NOT match the
/// git_ref regex.
#[prost(bool, tag = "4")]
pub invert_regex: bool,
/// Modified refs to match.
/// A modified refs are the refs modified by a git push operation.
#[prost(oneof = "push_filter::GitRef", tags = "2, 3")]
pub git_ref: ::core::option::Option<push_filter::GitRef>,
}
/// Nested message and enum types in `PushFilter`.
pub mod push_filter {
/// Modified refs to match.
/// A modified refs are the refs modified by a git push operation.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum GitRef {
/// Regexes matching branches to build.
///
/// The syntax of the regular expressions accepted is the syntax accepted by
/// RE2 and described at <https://github.com/google/re2/wiki/Syntax>
#[prost(string, tag = "2")]
Branch(::prost::alloc::string::String),
/// Regexes matching tags to build.
///
/// The syntax of the regular expressions accepted is the syntax accepted by
/// RE2 and described at <https://github.com/google/re2/wiki/Syntax>
#[prost(string, tag = "3")]
Tag(::prost::alloc::string::String),
}
}
/// Request to create a new `BuildTrigger`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBuildTriggerRequest {
/// The parent resource where this trigger will be created.
/// Format: `projects/{project}/locations/{location}`
#[prost(string, tag = "3")]
pub parent: ::prost::alloc::string::String,
/// Required. ID of the project for which to configure automatic builds.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Required. `BuildTrigger` to create.
#[prost(message, optional, tag = "2")]
pub trigger: ::core::option::Option<BuildTrigger>,
}
/// Returns the `BuildTrigger` with the specified ID.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBuildTriggerRequest {
/// The name of the `Trigger` to retrieve.
/// Format: `projects/{project}/locations/{location}/triggers/{trigger}`
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
/// Required. ID of the project that owns the trigger.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Required. Identifier (`id` or `name`) of the `BuildTrigger` to get.
#[prost(string, tag = "2")]
pub trigger_id: ::prost::alloc::string::String,
}
/// Request to list existing `BuildTriggers`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBuildTriggersRequest {
/// The parent of the collection of `Triggers`.
/// Format: `projects/{project}/locations/{location}`
#[prost(string, tag = "4")]
pub parent: ::prost::alloc::string::String,
/// Required. ID of the project for which to list BuildTriggers.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Number of results to return in the list.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Token to provide to skip to a particular spot in the list.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
/// Response containing existing `BuildTriggers`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBuildTriggersResponse {
/// `BuildTriggers` for the project, sorted by `create_time` descending.
#[prost(message, repeated, tag = "1")]
pub triggers: ::prost::alloc::vec::Vec<BuildTrigger>,
/// Token to receive the next page of results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Request to delete a `BuildTrigger`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBuildTriggerRequest {
/// The name of the `Trigger` to delete.
/// Format: `projects/{project}/locations/{location}/triggers/{trigger}`
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
/// Required. ID of the project that owns the trigger.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Required. ID of the `BuildTrigger` to delete.
#[prost(string, tag = "2")]
pub trigger_id: ::prost::alloc::string::String,
}
/// Request to update an existing `BuildTrigger`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateBuildTriggerRequest {
/// Required. ID of the project that owns the trigger.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Required. ID of the `BuildTrigger` to update.
#[prost(string, tag = "2")]
pub trigger_id: ::prost::alloc::string::String,
/// Required. `BuildTrigger` to update.
#[prost(message, optional, tag = "3")]
pub trigger: ::core::option::Option<BuildTrigger>,
/// Update mask for the resource. If this is set,
/// the server will only update the fields specified in the field mask.
/// Otherwise, a full update of the mutable resource fields will be performed.
#[prost(message, optional, tag = "5")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Optional arguments to enable specific features of builds.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BuildOptions {
/// Requested hash for SourceProvenance.
#[prost(enumeration = "hash::HashType", repeated, tag = "1")]
pub source_provenance_hash: ::prost::alloc::vec::Vec<i32>,
/// Requested verifiability options.
#[prost(enumeration = "build_options::VerifyOption", tag = "2")]
pub requested_verify_option: i32,
/// Compute Engine machine type on which to run the build.
#[prost(enumeration = "build_options::MachineType", tag = "3")]
pub machine_type: i32,
/// Requested disk size for the VM that runs the build. Note that this is *NOT*
/// "disk free"; some of the space will be used by the operating system and
/// build utilities. Also note that this is the minimum disk size that will be
/// allocated for the build -- the build may run with a larger disk than
/// requested. At present, the maximum disk size is 2000GB; builds that request
/// more than the maximum are rejected with an error.
#[prost(int64, tag = "6")]
pub disk_size_gb: i64,
/// Option to specify behavior when there is an error in the substitution
/// checks.
///
/// NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
/// be overridden in the build configuration file.
#[prost(enumeration = "build_options::SubstitutionOption", tag = "4")]
pub substitution_option: i32,
/// Option to specify whether or not to apply bash style string
/// operations to the substitutions.
///
/// NOTE: this is always enabled for triggered builds and cannot be
/// overridden in the build configuration file.
#[prost(bool, tag = "17")]
pub dynamic_substitutions: bool,
/// Option to include built-in and custom substitutions as env variables
/// for all build steps.
#[prost(bool, tag = "22")]
pub automap_substitutions: bool,
/// Option to define build log streaming behavior to Cloud
/// Storage.
#[prost(enumeration = "build_options::LogStreamingOption", tag = "5")]
pub log_streaming_option: i32,
/// This field deprecated; please use `pool.name` instead.
#[deprecated]
#[prost(string, tag = "7")]
pub worker_pool: ::prost::alloc::string::String,
/// Optional. Specification for execution on a `WorkerPool`.
///
/// See [running builds in a private
/// pool](<https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool>)
/// for more information.
#[prost(message, optional, tag = "19")]
pub pool: ::core::option::Option<build_options::PoolOption>,
/// Option to specify the logging mode, which determines if and where build
/// logs are stored.
#[prost(enumeration = "build_options::LoggingMode", tag = "11")]
pub logging: i32,
/// A list of global environment variable definitions that will exist for all
/// build steps in this build. If a variable is defined in both globally and in
/// a build step, the variable will use the build step value.
///
/// The elements are of the form "KEY=VALUE" for the environment variable "KEY"
/// being given the value "VALUE".
#[prost(string, repeated, tag = "12")]
pub env: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// A list of global environment variables, which are encrypted using a Cloud
/// Key Management Service crypto key. These values must be specified in the
/// build's `Secret`. These variables will be available to all build steps
/// in this build.
#[prost(string, repeated, tag = "13")]
pub secret_env: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Global list of volumes to mount for ALL build steps
///
/// Each volume is created as an empty volume prior to starting the build
/// process. Upon completion of the build, volumes and their contents are
/// discarded. Global volume names and paths cannot conflict with the volumes
/// defined a build step.
///
/// Using a global volume in a build with only one step is not valid as
/// it is indicative of a build request with an incorrect configuration.
#[prost(message, repeated, tag = "14")]
pub volumes: ::prost::alloc::vec::Vec<Volume>,
/// Optional. Option to specify how default logs buckets are setup.
#[prost(enumeration = "build_options::DefaultLogsBucketBehavior", tag = "21")]
pub default_logs_bucket_behavior: i32,
}
/// Nested message and enum types in `BuildOptions`.
pub mod build_options {
/// Details about how a build should be executed on a `WorkerPool`.
///
/// See [running builds in a private
/// pool](<https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool>)
/// for more information.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PoolOption {
/// The `WorkerPool` resource to execute the build on.
/// You must have `cloudbuild.workerpools.use` on the project hosting the
/// WorkerPool.
///
/// Format projects/{project}/locations/{location}/workerPools/{workerPoolId}
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Specifies the manner in which the build should be verified, if at all.
///
/// If a verified build is requested, and any part of the process to generate
/// and upload provenance fails, the build will also fail.
///
/// If the build does not request verification then that process may occur, but
/// is not guaranteed to. If it does occur and fails, the build will not fail.
///
/// For more information, see [Viewing Build
/// Provenance](<https://cloud.google.com/build/docs/securing-builds/view-build-provenance>).
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum VerifyOption {
/// Not a verifiable build (the default).
NotVerified = 0,
/// Build must be verified.
Verified = 1,
}
impl VerifyOption {
/// 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 {
VerifyOption::NotVerified => "NOT_VERIFIED",
VerifyOption::Verified => "VERIFIED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NOT_VERIFIED" => Some(Self::NotVerified),
"VERIFIED" => Some(Self::Verified),
_ => None,
}
}
}
/// Supported Compute Engine machine types.
/// For more information, see [Machine
/// types](<https://cloud.google.com/compute/docs/machine-types>).
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum MachineType {
/// Standard machine type.
Unspecified = 0,
/// Highcpu machine with 8 CPUs.
N1Highcpu8 = 1,
/// Highcpu machine with 32 CPUs.
N1Highcpu32 = 2,
/// Highcpu e2 machine with 8 CPUs.
E2Highcpu8 = 5,
/// Highcpu e2 machine with 32 CPUs.
E2Highcpu32 = 6,
/// E2 machine with 1 CPU.
E2Medium = 7,
}
impl MachineType {
/// 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 {
MachineType::Unspecified => "UNSPECIFIED",
MachineType::N1Highcpu8 => "N1_HIGHCPU_8",
MachineType::N1Highcpu32 => "N1_HIGHCPU_32",
MachineType::E2Highcpu8 => "E2_HIGHCPU_8",
MachineType::E2Highcpu32 => "E2_HIGHCPU_32",
MachineType::E2Medium => "E2_MEDIUM",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"N1_HIGHCPU_8" => Some(Self::N1Highcpu8),
"N1_HIGHCPU_32" => Some(Self::N1Highcpu32),
"E2_HIGHCPU_8" => Some(Self::E2Highcpu8),
"E2_HIGHCPU_32" => Some(Self::E2Highcpu32),
"E2_MEDIUM" => Some(Self::E2Medium),
_ => None,
}
}
}
/// Specifies the behavior when there is an error in the substitution checks.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SubstitutionOption {
/// Fails the build if error in substitutions checks, like missing
/// a substitution in the template or in the map.
MustMatch = 0,
/// Do not fail the build if error in substitutions checks.
AllowLoose = 1,
}
impl SubstitutionOption {
/// 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 {
SubstitutionOption::MustMatch => "MUST_MATCH",
SubstitutionOption::AllowLoose => "ALLOW_LOOSE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MUST_MATCH" => Some(Self::MustMatch),
"ALLOW_LOOSE" => Some(Self::AllowLoose),
_ => None,
}
}
}
/// Specifies the behavior when writing build logs to Cloud Storage.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum LogStreamingOption {
/// Service may automatically determine build log streaming behavior.
StreamDefault = 0,
/// Build logs should be streamed to Cloud Storage.
StreamOn = 1,
/// Build logs should not be streamed to Cloud Storage; they will be
/// written when the build is completed.
StreamOff = 2,
}
impl LogStreamingOption {
/// 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 {
LogStreamingOption::StreamDefault => "STREAM_DEFAULT",
LogStreamingOption::StreamOn => "STREAM_ON",
LogStreamingOption::StreamOff => "STREAM_OFF",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STREAM_DEFAULT" => Some(Self::StreamDefault),
"STREAM_ON" => Some(Self::StreamOn),
"STREAM_OFF" => Some(Self::StreamOff),
_ => None,
}
}
}
/// Specifies the logging mode.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum LoggingMode {
/// The service determines the logging mode. The default is `LEGACY`. Do not
/// rely on the default logging behavior as it may change in the future.
LoggingUnspecified = 0,
/// Build logs are stored in Cloud Logging and Cloud Storage.
Legacy = 1,
/// Build logs are stored in Cloud Storage.
GcsOnly = 2,
/// This option is the same as CLOUD_LOGGING_ONLY.
StackdriverOnly = 3,
/// Build logs are stored in Cloud Logging. Selecting this option will not
/// allow [logs
/// streaming](<https://cloud.google.com/sdk/gcloud/reference/builds/log>).
CloudLoggingOnly = 5,
/// Turn off all logging. No build logs will be captured.
None = 4,
}
impl LoggingMode {
/// 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 {
LoggingMode::LoggingUnspecified => "LOGGING_UNSPECIFIED",
LoggingMode::Legacy => "LEGACY",
LoggingMode::GcsOnly => "GCS_ONLY",
LoggingMode::StackdriverOnly => "STACKDRIVER_ONLY",
LoggingMode::CloudLoggingOnly => "CLOUD_LOGGING_ONLY",
LoggingMode::None => "NONE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOGGING_UNSPECIFIED" => Some(Self::LoggingUnspecified),
"LEGACY" => Some(Self::Legacy),
"GCS_ONLY" => Some(Self::GcsOnly),
"STACKDRIVER_ONLY" => Some(Self::StackdriverOnly),
"CLOUD_LOGGING_ONLY" => Some(Self::CloudLoggingOnly),
"NONE" => Some(Self::None),
_ => None,
}
}
}
/// Default GCS log bucket behavior options.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DefaultLogsBucketBehavior {
/// Unspecified.
Unspecified = 0,
/// Bucket is located in user-owned project in the same region as the
/// build. The builder service account must have access to create and write
/// to GCS buckets in the build project.
RegionalUserOwnedBucket = 1,
}
impl DefaultLogsBucketBehavior {
/// 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 {
DefaultLogsBucketBehavior::Unspecified => {
"DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED"
}
DefaultLogsBucketBehavior::RegionalUserOwnedBucket => {
"REGIONAL_USER_OWNED_BUCKET"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
"REGIONAL_USER_OWNED_BUCKET" => Some(Self::RegionalUserOwnedBucket),
_ => None,
}
}
}
}
/// ReceiveTriggerWebhookRequest \[Experimental\] is the request object accepted by
/// the ReceiveTriggerWebhook method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReceiveTriggerWebhookRequest {
/// The name of the `ReceiveTriggerWebhook` to retrieve.
/// Format: `projects/{project}/locations/{location}/triggers/{trigger}`
#[prost(string, tag = "5")]
pub name: ::prost::alloc::string::String,
/// HTTP request body.
#[prost(message, optional, tag = "1")]
pub body: ::core::option::Option<super::super::super::api::HttpBody>,
/// Project in which the specified trigger lives
#[prost(string, tag = "2")]
pub project_id: ::prost::alloc::string::String,
/// Name of the trigger to run the payload against
#[prost(string, tag = "3")]
pub trigger: ::prost::alloc::string::String,
/// Secret token used for authorization if an OAuth token isn't provided.
#[prost(string, tag = "4")]
pub secret: ::prost::alloc::string::String,
}
/// ReceiveTriggerWebhookResponse \[Experimental\] is the response object for the
/// ReceiveTriggerWebhook method.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReceiveTriggerWebhookResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitHubEnterpriseConfig {
/// Optional. The full resource name for the GitHubEnterpriseConfig
/// For example:
/// "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}"
#[prost(string, tag = "7")]
pub name: ::prost::alloc::string::String,
/// The URL of the github enterprise host the configuration is for.
#[prost(string, tag = "3")]
pub host_url: ::prost::alloc::string::String,
/// Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise
/// server.
#[prost(int64, tag = "4")]
pub app_id: i64,
/// Output only. Time when the installation was associated with the project.
#[prost(message, optional, tag = "6")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// The key that should be attached to webhook calls to the ReceiveWebhook
/// endpoint.
#[prost(string, tag = "8")]
pub webhook_key: ::prost::alloc::string::String,
/// Optional. The network to be used when reaching out to the GitHub
/// Enterprise server. The VPC network must be enabled for private
/// service connection. This should be set if the GitHub Enterprise server is
/// hosted on-premises and not reachable by public internet.
/// If this field is left empty, no network peering will occur and calls to
/// the GitHub Enterprise server will be made over the public internet.
/// Must be in the format
/// `projects/{project}/global/networks/{network}`, where {project}
/// is a project number or id and {network} is the name of a
/// VPC network in the project.
#[prost(string, tag = "9")]
pub peered_network: ::prost::alloc::string::String,
/// Names of secrets in Secret Manager.
#[prost(message, optional, tag = "10")]
pub secrets: ::core::option::Option<GitHubEnterpriseSecrets>,
/// Name to display for this config.
#[prost(string, tag = "11")]
pub display_name: ::prost::alloc::string::String,
/// Optional. SSL certificate to use for requests to GitHub Enterprise.
#[prost(string, tag = "12")]
pub ssl_ca: ::prost::alloc::string::String,
}
/// GitHubEnterpriseSecrets represents the names of all necessary secrets in
/// Secret Manager for a GitHub Enterprise server.
/// Format is: projects/<project number>/secrets/<secret name>.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitHubEnterpriseSecrets {
/// The resource name for the private key secret version.
#[prost(string, tag = "5")]
pub private_key_version_name: ::prost::alloc::string::String,
/// The resource name for the webhook secret secret version in Secret Manager.
#[prost(string, tag = "6")]
pub webhook_secret_version_name: ::prost::alloc::string::String,
/// The resource name for the OAuth secret secret version in Secret Manager.
#[prost(string, tag = "7")]
pub oauth_secret_version_name: ::prost::alloc::string::String,
/// The resource name for the OAuth client ID secret version in Secret Manager.
#[prost(string, tag = "8")]
pub oauth_client_id_version_name: ::prost::alloc::string::String,
}
/// Configuration for a `WorkerPool`.
///
/// Cloud Build owns and maintains a pool of workers for general use and have no
/// access to a project's private network. By default, builds submitted to
/// Cloud Build will use a worker from this pool.
///
/// If your build needs access to resources on a private network,
/// create and use a `WorkerPool` to run your builds. Private `WorkerPool`s give
/// your builds access to any single VPC network that you
/// administer, including any on-prem resources connected to that VPC
/// network. For an overview of private pools, see
/// [Private pools
/// overview](<https://cloud.google.com/build/docs/private-pools/private-pools-overview>).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkerPool {
/// Output only. The resource name of the `WorkerPool`, with format
/// `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
/// The value of `{worker_pool}` is provided by `worker_pool_id` in
/// `CreateWorkerPool` request and the value of `{location}` is determined by
/// the endpoint accessed.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// A user-specified, human-readable name for the `WorkerPool`. If provided,
/// this value must be 1-63 characters.
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
/// Output only. A unique identifier for the `WorkerPool`.
#[prost(string, tag = "3")]
pub uid: ::prost::alloc::string::String,
/// User specified annotations. See <https://google.aip.dev/128#annotations>
/// for more details such as format and size limitations.
#[prost(btree_map = "string, string", tag = "4")]
pub annotations: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. Time at which the request to create the `WorkerPool` was
/// received.
#[prost(message, optional, tag = "5")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Time at which the request to update the `WorkerPool` was
/// received.
#[prost(message, optional, tag = "6")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Time at which the request to delete the `WorkerPool` was
/// received.
#[prost(message, optional, tag = "7")]
pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. `WorkerPool` state.
#[prost(enumeration = "worker_pool::State", tag = "8")]
pub state: i32,
/// Output only. Checksum computed by the server. May be sent on update and
/// delete requests to ensure that the client has an up-to-date value before
/// proceeding.
#[prost(string, tag = "11")]
pub etag: ::prost::alloc::string::String,
/// Configuration for the `WorkerPool`.
#[prost(oneof = "worker_pool::Config", tags = "12")]
pub config: ::core::option::Option<worker_pool::Config>,
}
/// Nested message and enum types in `WorkerPool`.
pub mod worker_pool {
/// State of the `WorkerPool`.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// State of the `WorkerPool` is unknown.
Unspecified = 0,
/// `WorkerPool` is being created.
Creating = 1,
/// `WorkerPool` is running.
Running = 2,
/// `WorkerPool` is being deleted: cancelling builds and draining workers.
Deleting = 3,
/// `WorkerPool` is deleted.
Deleted = 4,
/// `WorkerPool` is being updated; new builds cannot be run.
Updating = 5,
}
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::Creating => "CREATING",
State::Running => "RUNNING",
State::Deleting => "DELETING",
State::Deleted => "DELETED",
State::Updating => "UPDATING",
}
}
/// 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),
"CREATING" => Some(Self::Creating),
"RUNNING" => Some(Self::Running),
"DELETING" => Some(Self::Deleting),
"DELETED" => Some(Self::Deleted),
"UPDATING" => Some(Self::Updating),
_ => None,
}
}
}
/// Configuration for the `WorkerPool`.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Config {
/// Legacy Private Pool configuration.
#[prost(message, tag = "12")]
PrivatePoolV1Config(super::PrivatePoolV1Config),
}
}
/// Configuration for a V1 `PrivatePool`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivatePoolV1Config {
/// Machine configuration for the workers in the pool.
#[prost(message, optional, tag = "1")]
pub worker_config: ::core::option::Option<private_pool_v1_config::WorkerConfig>,
/// Network configuration for the pool.
#[prost(message, optional, tag = "2")]
pub network_config: ::core::option::Option<private_pool_v1_config::NetworkConfig>,
}
/// Nested message and enum types in `PrivatePoolV1Config`.
pub mod private_pool_v1_config {
/// Defines the configuration to be used for creating workers in
/// the pool.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkerConfig {
/// Machine type of a worker, such as `e2-medium`.
/// See [Worker pool config
/// file](<https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema>).
/// If left blank, Cloud Build will use a sensible default.
#[prost(string, tag = "1")]
pub machine_type: ::prost::alloc::string::String,
/// Size of the disk attached to the worker, in GB.
/// See [Worker pool config
/// file](<https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema>).
/// Specify a value of up to 2000. If `0` is specified, Cloud Build will use
/// a standard disk size.
#[prost(int64, tag = "2")]
pub disk_size_gb: i64,
}
/// Defines the network configuration for the pool.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkConfig {
/// Required. Immutable. The network definition that the workers are peered
/// to. If this section is left empty, the workers will be peered to
/// `WorkerPool.project_id` on the service producer network. Must be in the
/// format `projects/{project}/global/networks/{network}`, where `{project}`
/// is a project number, such as `12345`, and `{network}` is the name of a
/// VPC network in the project. See
/// [Understanding network configuration
/// options](<https://cloud.google.com/build/docs/private-pools/set-up-private-pool-environment>)
#[prost(string, tag = "1")]
pub peered_network: ::prost::alloc::string::String,
/// Option to configure network egress for the workers.
#[prost(enumeration = "network_config::EgressOption", tag = "2")]
pub egress_option: i32,
/// Immutable. Subnet IP range within the peered network. This is specified
/// in CIDR notation with a slash and the subnet prefix size. You can
/// optionally specify an IP address before the subnet prefix value. e.g.
/// `192.168.0.0/29` would specify an IP range starting at 192.168.0.0 with a
/// prefix size of 29 bits.
/// `/16` would specify a prefix size of 16 bits, with an automatically
/// determined IP within the peered VPC.
/// If unspecified, a value of `/24` will be used.
#[prost(string, tag = "3")]
pub peered_network_ip_range: ::prost::alloc::string::String,
}
/// Nested message and enum types in `NetworkConfig`.
pub mod network_config {
/// Defines the egress option for the pool.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum EgressOption {
/// If set, defaults to PUBLIC_EGRESS.
Unspecified = 0,
/// If set, workers are created without any public address, which prevents
/// network egress to public IPs unless a network proxy is configured.
NoPublicEgress = 1,
/// If set, workers are created with a public address which allows for
/// public internet egress.
PublicEgress = 2,
}
impl EgressOption {
/// 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 {
EgressOption::Unspecified => "EGRESS_OPTION_UNSPECIFIED",
EgressOption::NoPublicEgress => "NO_PUBLIC_EGRESS",
EgressOption::PublicEgress => "PUBLIC_EGRESS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EGRESS_OPTION_UNSPECIFIED" => Some(Self::Unspecified),
"NO_PUBLIC_EGRESS" => Some(Self::NoPublicEgress),
"PUBLIC_EGRESS" => Some(Self::PublicEgress),
_ => None,
}
}
}
}
}
/// Request to create a new `WorkerPool`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateWorkerPoolRequest {
/// Required. The parent resource where this worker pool will be created.
/// Format: `projects/{project}/locations/{location}`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. `WorkerPool` resource to create.
#[prost(message, optional, tag = "2")]
pub worker_pool: ::core::option::Option<WorkerPool>,
/// Required. Immutable. The ID to use for the `WorkerPool`, which will become
/// the final component of the resource name.
///
/// This value should be 1-63 characters, and valid characters
/// are /[a-z][0-9]-/.
#[prost(string, tag = "3")]
pub worker_pool_id: ::prost::alloc::string::String,
/// If set, validate the request and preview the response, but do not actually
/// post it.
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
/// Request to get a `WorkerPool` with the specified name.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetWorkerPoolRequest {
/// Required. The name of the `WorkerPool` to retrieve.
/// Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request to delete a `WorkerPool`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteWorkerPoolRequest {
/// Required. The name of the `WorkerPool` to delete.
/// Format:
/// `projects/{project}/locations/{location}/workerPools/{workerPool}`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. If provided, it must match the server's etag on the workerpool
/// for the request to be processed.
#[prost(string, tag = "2")]
pub etag: ::prost::alloc::string::String,
/// If set to true, and the `WorkerPool` is not found, the request will succeed
/// but no action will be taken on the server.
#[prost(bool, tag = "3")]
pub allow_missing: bool,
/// If set, validate the request and preview the response, but do not actually
/// post it.
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
/// Request to update a `WorkerPool`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateWorkerPoolRequest {
/// Required. The `WorkerPool` to update.
///
/// The `name` field is used to identify the `WorkerPool` to update.
/// Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.
#[prost(message, optional, tag = "1")]
pub worker_pool: ::core::option::Option<WorkerPool>,
/// A mask specifying which fields in `worker_pool` to update.
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// If set, validate the request and preview the response, but do not actually
/// post it.
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
/// Request to list `WorkerPool`s.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListWorkerPoolsRequest {
/// Required. The parent of the collection of `WorkerPools`.
/// Format: `projects/{project}/locations/{location}`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// The maximum number of `WorkerPool`s to return. The service may return
/// fewer than this value. If omitted, the server will use a sensible default.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// A page token, received from a previous `ListWorkerPools` call. Provide this
/// to retrieve the subsequent page.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
/// Response containing existing `WorkerPools`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListWorkerPoolsResponse {
/// `WorkerPools` for the specified project.
#[prost(message, repeated, tag = "1")]
pub worker_pools: ::prost::alloc::vec::Vec<WorkerPool>,
/// Continuation token used to page through large result sets. Provide this
/// value in a subsequent ListWorkerPoolsRequest to return the next page of
/// results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Metadata for the `CreateWorkerPool` operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateWorkerPoolOperationMetadata {
/// The resource name of the `WorkerPool` to create.
/// Format:
/// `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
#[prost(string, tag = "1")]
pub worker_pool: ::prost::alloc::string::String,
/// Time the operation was created.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Time the operation was completed.
#[prost(message, optional, tag = "3")]
pub complete_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Metadata for the `UpdateWorkerPool` operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateWorkerPoolOperationMetadata {
/// The resource name of the `WorkerPool` being updated.
/// Format:
/// `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
#[prost(string, tag = "1")]
pub worker_pool: ::prost::alloc::string::String,
/// Time the operation was created.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Time the operation was completed.
#[prost(message, optional, tag = "3")]
pub complete_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Metadata for the `DeleteWorkerPool` operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteWorkerPoolOperationMetadata {
/// The resource name of the `WorkerPool` being deleted.
/// Format:
/// `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
#[prost(string, tag = "1")]
pub worker_pool: ::prost::alloc::string::String,
/// Time the operation was created.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Time the operation was completed.
#[prost(message, optional, tag = "3")]
pub complete_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Generated client implementations.
pub mod cloud_build_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Creates and manages builds on Google Cloud Platform.
///
/// The main concept used by this API is a `Build`, which describes the location
/// of the source to build, how to build the source, and where to store the
/// built artifacts, if any.
///
/// A user can list previously-requested builds or get builds by their ID to
/// determine the status of the build.
#[derive(Debug, Clone)]
pub struct CloudBuildClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CloudBuildClient<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,
) -> CloudBuildClient<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,
{
CloudBuildClient::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
}
/// Starts a build with the specified configuration.
///
/// This method returns a long-running `Operation`, which includes the build
/// ID. Pass the build ID to `GetBuild` to determine the build status (such as
/// `SUCCESS` or `FAILURE`).
pub async fn create_build(
&mut self,
request: impl tonic::IntoRequest<super::CreateBuildRequest>,
) -> 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.devtools.cloudbuild.v1.CloudBuild/CreateBuild",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"CreateBuild",
),
);
self.inner.unary(req, path, codec).await
}
/// Returns information about a previously requested build.
///
/// The `Build` that is returned includes its status (such as `SUCCESS`,
/// `FAILURE`, or `WORKING`), and timing information.
pub async fn get_build(
&mut self,
request: impl tonic::IntoRequest<super::GetBuildRequest>,
) -> std::result::Result<tonic::Response<super::Build>, 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.devtools.cloudbuild.v1.CloudBuild/GetBuild",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"GetBuild",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists previously requested builds.
///
/// Previously requested builds may still be in-progress, or may have finished
/// successfully or unsuccessfully.
pub async fn list_builds(
&mut self,
request: impl tonic::IntoRequest<super::ListBuildsRequest>,
) -> std::result::Result<
tonic::Response<super::ListBuildsResponse>,
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.devtools.cloudbuild.v1.CloudBuild/ListBuilds",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"ListBuilds",
),
);
self.inner.unary(req, path, codec).await
}
/// Cancels a build in progress.
pub async fn cancel_build(
&mut self,
request: impl tonic::IntoRequest<super::CancelBuildRequest>,
) -> std::result::Result<tonic::Response<super::Build>, 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.devtools.cloudbuild.v1.CloudBuild/CancelBuild",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"CancelBuild",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new build based on the specified build.
///
/// This method creates a new build using the original build request, which may
/// or may not result in an identical build.
///
/// For triggered builds:
///
/// * Triggered builds resolve to a precise revision; therefore a retry of a
/// triggered build will result in a build that uses the same revision.
///
/// For non-triggered builds that specify `RepoSource`:
///
/// * If the original build built from the tip of a branch, the retried build
/// will build from the tip of that branch, which may not be the same revision
/// as the original build.
/// * If the original build specified a commit sha or revision ID, the retried
/// build will use the identical source.
///
/// For builds that specify `StorageSource`:
///
/// * If the original build pulled source from Cloud Storage without
/// specifying the generation of the object, the new build will use the current
/// object, which may be different from the original build source.
/// * If the original build pulled source from Cloud Storage and specified the
/// generation of the object, the new build will attempt to use the same
/// object, which may or may not be available depending on the bucket's
/// lifecycle management settings.
pub async fn retry_build(
&mut self,
request: impl tonic::IntoRequest<super::RetryBuildRequest>,
) -> 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.devtools.cloudbuild.v1.CloudBuild/RetryBuild",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"RetryBuild",
),
);
self.inner.unary(req, path, codec).await
}
/// Approves or rejects a pending build.
///
/// If approved, the returned LRO will be analogous to the LRO returned from
/// a CreateBuild call.
///
/// If rejected, the returned LRO will be immediately done.
pub async fn approve_build(
&mut self,
request: impl tonic::IntoRequest<super::ApproveBuildRequest>,
) -> 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.devtools.cloudbuild.v1.CloudBuild/ApproveBuild",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"ApproveBuild",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new `BuildTrigger`.
///
/// This API is experimental.
pub async fn create_build_trigger(
&mut self,
request: impl tonic::IntoRequest<super::CreateBuildTriggerRequest>,
) -> std::result::Result<tonic::Response<super::BuildTrigger>, 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.devtools.cloudbuild.v1.CloudBuild/CreateBuildTrigger",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"CreateBuildTrigger",
),
);
self.inner.unary(req, path, codec).await
}
/// Returns information about a `BuildTrigger`.
///
/// This API is experimental.
pub async fn get_build_trigger(
&mut self,
request: impl tonic::IntoRequest<super::GetBuildTriggerRequest>,
) -> std::result::Result<tonic::Response<super::BuildTrigger>, 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.devtools.cloudbuild.v1.CloudBuild/GetBuildTrigger",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"GetBuildTrigger",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists existing `BuildTrigger`s.
///
/// This API is experimental.
pub async fn list_build_triggers(
&mut self,
request: impl tonic::IntoRequest<super::ListBuildTriggersRequest>,
) -> std::result::Result<
tonic::Response<super::ListBuildTriggersResponse>,
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.devtools.cloudbuild.v1.CloudBuild/ListBuildTriggers",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"ListBuildTriggers",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a `BuildTrigger` by its project ID and trigger ID.
///
/// This API is experimental.
pub async fn delete_build_trigger(
&mut self,
request: impl tonic::IntoRequest<super::DeleteBuildTriggerRequest>,
) -> std::result::Result<tonic::Response<()>, 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.devtools.cloudbuild.v1.CloudBuild/DeleteBuildTrigger",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"DeleteBuildTrigger",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a `BuildTrigger` by its project ID and trigger ID.
///
/// This API is experimental.
pub async fn update_build_trigger(
&mut self,
request: impl tonic::IntoRequest<super::UpdateBuildTriggerRequest>,
) -> std::result::Result<tonic::Response<super::BuildTrigger>, 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.devtools.cloudbuild.v1.CloudBuild/UpdateBuildTrigger",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"UpdateBuildTrigger",
),
);
self.inner.unary(req, path, codec).await
}
/// Runs a `BuildTrigger` at a particular source revision.
///
/// To run a regional or global trigger, use the POST request
/// that includes the location endpoint in the path (ex.
/// v1/projects/{projectId}/locations/{region}/triggers/{triggerId}:run). The
/// POST request that does not include the location endpoint in the path can
/// only be used when running global triggers.
pub async fn run_build_trigger(
&mut self,
request: impl tonic::IntoRequest<super::RunBuildTriggerRequest>,
) -> 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.devtools.cloudbuild.v1.CloudBuild/RunBuildTrigger",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"RunBuildTrigger",
),
);
self.inner.unary(req, path, codec).await
}
/// ReceiveTriggerWebhook [Experimental] is called when the API receives a
/// webhook request targeted at a specific trigger.
pub async fn receive_trigger_webhook(
&mut self,
request: impl tonic::IntoRequest<super::ReceiveTriggerWebhookRequest>,
) -> std::result::Result<
tonic::Response<super::ReceiveTriggerWebhookResponse>,
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.devtools.cloudbuild.v1.CloudBuild/ReceiveTriggerWebhook",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"ReceiveTriggerWebhook",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a `WorkerPool`.
pub async fn create_worker_pool(
&mut self,
request: impl tonic::IntoRequest<super::CreateWorkerPoolRequest>,
) -> 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.devtools.cloudbuild.v1.CloudBuild/CreateWorkerPool",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"CreateWorkerPool",
),
);
self.inner.unary(req, path, codec).await
}
/// Returns details of a `WorkerPool`.
pub async fn get_worker_pool(
&mut self,
request: impl tonic::IntoRequest<super::GetWorkerPoolRequest>,
) -> std::result::Result<tonic::Response<super::WorkerPool>, 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.devtools.cloudbuild.v1.CloudBuild/GetWorkerPool",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"GetWorkerPool",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a `WorkerPool`.
pub async fn delete_worker_pool(
&mut self,
request: impl tonic::IntoRequest<super::DeleteWorkerPoolRequest>,
) -> 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.devtools.cloudbuild.v1.CloudBuild/DeleteWorkerPool",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"DeleteWorkerPool",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a `WorkerPool`.
pub async fn update_worker_pool(
&mut self,
request: impl tonic::IntoRequest<super::UpdateWorkerPoolRequest>,
) -> 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.devtools.cloudbuild.v1.CloudBuild/UpdateWorkerPool",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"UpdateWorkerPool",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists `WorkerPool`s.
pub async fn list_worker_pools(
&mut self,
request: impl tonic::IntoRequest<super::ListWorkerPoolsRequest>,
) -> std::result::Result<
tonic::Response<super::ListWorkerPoolsResponse>,
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.devtools.cloudbuild.v1.CloudBuild/ListWorkerPools",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.cloudbuild.v1.CloudBuild",
"ListWorkerPools",
),
);
self.inner.unary(req, path, codec).await
}
}
}