1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829
/// Represents a hardware accelerator type. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum AcceleratorType { /// Unspecified accelerator type, which means no accelerator. Unspecified = 0, /// Nvidia Tesla K80 GPU. NvidiaTeslaK80 = 1, /// Nvidia Tesla P100 GPU. NvidiaTeslaP100 = 2, /// Nvidia Tesla V100 GPU. NvidiaTeslaV100 = 3, /// Nvidia Tesla P4 GPU. NvidiaTeslaP4 = 4, /// Nvidia Tesla T4 GPU. NvidiaTeslaT4 = 5, /// TPU v2. TpuV2 = 6, /// TPU v3. TpuV3 = 7, } /// References an API call. It contains more information about long running /// operation and Jobs that are triggered by the API call. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UserActionReference { /// The method name of the API RPC call. For example, /// "/google.cloud.aiplatform.{apiVersion}.DatasetService.CreateDataset" #[prost(string, tag = "3")] pub method: std::string::String, #[prost(oneof = "user_action_reference::Reference", tags = "1, 2")] pub reference: ::std::option::Option<user_action_reference::Reference>, } pub mod user_action_reference { #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Reference { /// For API calls that return a long running operation. /// Resource name of the long running operation. /// Format: /// 'projects/{project}/locations/{location}/operations/{operation}' #[prost(string, tag = "1")] Operation(std::string::String), /// For API calls that start a LabelingJob. /// Resource name of the LabelingJob. /// Format: /// 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}' #[prost(string, tag = "2")] DataLabelingJob(std::string::String), } } /// Used to assign specific AnnotationSpec to a particular area of a DataItem or /// the whole part of the DataItem. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Annotation { /// Output only. Resource name of the Annotation. #[prost(string, tag = "1")] pub name: std::string::String, /// Required. Google Cloud Storage URI points to a YAML file describing [payload][google.cloud.aiplatform.v1.Annotation.payload]. The /// schema is defined as an [OpenAPI 3.0.2 Schema /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). /// The schema files that can be used here are found in /// gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the /// chosen schema must be consistent with the parent Dataset's /// [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri]. #[prost(string, tag = "2")] pub payload_schema_uri: std::string::String, /// Required. The schema of the payload can be found in /// [payload_schema][google.cloud.aiplatform.v1.Annotation.payload_schema_uri]. #[prost(message, optional, tag = "3")] pub payload: ::std::option::Option<::prost_types::Value>, /// Output only. Timestamp when this Annotation was created. #[prost(message, optional, tag = "4")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Timestamp when this Annotation was last updated. #[prost(message, optional, tag = "7")] pub update_time: ::std::option::Option<::prost_types::Timestamp>, /// Optional. Used to perform consistent read-modify-write updates. If not set, a blind /// "overwrite" update happens. #[prost(string, tag = "8")] pub etag: std::string::String, /// Output only. The source of the Annotation. #[prost(message, optional, tag = "5")] pub annotation_source: ::std::option::Option<UserActionReference>, /// Optional. The labels with user-defined metadata to organize your Annotations. /// /// Label keys and values can be no longer than 64 characters /// (Unicode codepoints), can only contain lowercase letters, numeric /// characters, underscores and dashes. International characters are allowed. /// No more than 64 user labels can be associated with one Annotation(System /// labels are excluded). /// /// See https://goo.gl/xmQnxf for more information and examples of labels. /// System reserved label keys are prefixed with "aiplatform.googleapis.com/" /// and are immutable. Following system labels exist for each Annotation: /// /// * "aiplatform.googleapis.com/annotation_set_name": /// optional, name of the UI's annotation set this Annotation belongs to. /// If not set, the Annotation is not visible in the UI. /// /// * "aiplatform.googleapis.com/payload_schema": /// output only, its value is the [payload_schema's][google.cloud.aiplatform.v1.Annotation.payload_schema_uri] /// title. #[prost(map = "string, string", tag = "6")] pub labels: ::std::collections::HashMap<std::string::String, std::string::String>, } /// Identifies a concept with which DataItems may be annotated with. #[derive(Clone, PartialEq, ::prost::Message)] pub struct AnnotationSpec { /// Output only. Resource name of the AnnotationSpec. #[prost(string, tag = "1")] pub name: std::string::String, /// Required. The user-defined name of the AnnotationSpec. /// The name can be up to 128 characters long and can be consist of any UTF-8 /// characters. #[prost(string, tag = "2")] pub display_name: std::string::String, /// Output only. Timestamp when this AnnotationSpec was created. #[prost(message, optional, tag = "3")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Timestamp when AnnotationSpec was last updated. #[prost(message, optional, tag = "4")] pub update_time: ::std::option::Option<::prost_types::Timestamp>, /// Optional. Used to perform consistent read-modify-write updates. If not set, a blind /// "overwrite" update happens. #[prost(string, tag = "5")] pub etag: std::string::String, } /// Success and error statistics of processing multiple entities /// (for example, DataItems or structured data rows) in batch. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CompletionStats { /// Output only. The number of entities that had been processed successfully. #[prost(int64, tag = "1")] pub successful_count: i64, /// Output only. The number of entities for which any error was encountered. #[prost(int64, tag = "2")] pub failed_count: i64, /// Output only. In cases when enough errors are encountered a job, pipeline, or operation /// may be failed as a whole. Below is the number of entities for which the /// processing had not been finished (either in successful or failed state). /// Set to -1 if the number is unknown (for example, the operation failed /// before the total entity number could be collected). #[prost(int64, tag = "3")] pub incomplete_count: i64, } /// Represents a customer-managed encryption key spec that can be applied to /// a top-level resource. #[derive(Clone, PartialEq, ::prost::Message)] pub struct EncryptionSpec { /// Required. The Cloud KMS resource identifier of the customer managed encryption key /// used to protect a resource. Has the form: /// `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. /// The key needs to be in the same region as where the compute resource is /// created. #[prost(string, tag = "1")] pub kms_key_name: std::string::String, } /// The Google Cloud Storage location for the input content. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GcsSource { /// Required. Google Cloud Storage URI(-s) to the input file(s). May contain /// wildcards. For more information on wildcards, see /// https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames. #[prost(string, repeated, tag = "1")] pub uris: ::std::vec::Vec<std::string::String>, } /// The Google Cloud Storage location where the output is to be written to. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GcsDestination { /// Required. Google Cloud Storage URI to output directory. If the uri doesn't end with /// '/', a '/' will be automatically appended. The directory is created if it /// doesn't exist. #[prost(string, tag = "1")] pub output_uri_prefix: std::string::String, } /// The BigQuery location for the input content. #[derive(Clone, PartialEq, ::prost::Message)] pub struct BigQuerySource { /// Required. BigQuery URI to a table, up to 2000 characters long. /// Accepted forms: /// /// * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. #[prost(string, tag = "1")] pub input_uri: std::string::String, } /// The BigQuery location for the output content. #[derive(Clone, PartialEq, ::prost::Message)] pub struct BigQueryDestination { /// Required. BigQuery URI to a project or table, up to 2000 characters long. /// /// When only the project is specified, the Dataset and Table is created. /// When the full table reference is specified, the Dataset must exist and /// table must not exist. /// /// Accepted forms: /// /// * BigQuery path. For example: /// `bq://projectId` or `bq://projectId.bqDatasetId.bqTableId`. #[prost(string, tag = "1")] pub output_uri: std::string::String, } /// The Container Registry location for the container image. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ContainerRegistryDestination { /// Required. Container Registry URI of a container image. /// Only Google Container Registry and Artifact Registry are supported now. /// Accepted forms: /// /// * Google Container Registry path. For example: /// `gcr.io/projectId/imageName:tag`. /// /// * Artifact Registry path. For example: /// `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`. /// /// If a tag is not specified, "latest" will be used as the default tag. #[prost(string, tag = "1")] pub output_uri: std::string::String, } /// Describes the state of a job. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum JobState { /// The job state is unspecified. Unspecified = 0, /// The job has been just created or resumed and processing has not yet begun. Queued = 1, /// The service is preparing to run the job. Pending = 2, /// The job is in progress. Running = 3, /// The job completed successfully. Succeeded = 4, /// The job failed. Failed = 5, /// The job is being cancelled. From this state the job may only go to /// either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`. Cancelling = 6, /// The job has been cancelled. Cancelled = 7, /// The job has been stopped, and can be resumed. Paused = 8, } /// Specification of a single machine. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MachineSpec { /// Immutable. The type of the machine. /// /// See the [list of machine types supported for /// prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) /// /// See the [list of machine types supported for custom /// training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). /// /// For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default /// value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of /// [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required. #[prost(string, tag = "1")] pub machine_type: std::string::String, /// Immutable. The type of accelerator(s) that may be attached to the machine as per /// [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count]. #[prost(enumeration = "AcceleratorType", tag = "2")] pub accelerator_type: i32, /// The number of accelerators to attach to the machine. #[prost(int32, tag = "3")] pub accelerator_count: i32, } /// A description of resources that are dedicated to a DeployedModel, and /// that need a higher degree of manual configuration. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DedicatedResources { /// Required. Immutable. The specification of a single machine used by the prediction. #[prost(message, optional, tag = "1")] pub machine_spec: ::std::option::Option<MachineSpec>, /// Required. Immutable. The minimum number of machine replicas this DeployedModel will be always /// deployed on. If traffic against it increases, it may dynamically be /// deployed onto more replicas, and as traffic decreases, some of these extra /// replicas may be freed. /// Note: if [machine_spec.accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count] is /// above 0, currently the model will be always deployed precisely on /// [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count]. #[prost(int32, tag = "2")] pub min_replica_count: i32, /// Immutable. The maximum number of replicas this DeployedModel may be deployed on when /// the traffic against it increases. If the requested value is too large, /// the deployment will error, but if deployment succeeds then the ability /// to scale the model to that many replicas is guaranteed (barring service /// outages). If traffic against the DeployedModel increases beyond what its /// replicas at maximum may handle, a portion of the traffic will be dropped. /// If this value is not provided, will use [min_replica_count][google.cloud.aiplatform.v1.DedicatedResources.min_replica_count] as the /// default value. #[prost(int32, tag = "3")] pub max_replica_count: i32, } /// A description of resources that to large degree are decided by Vertex AI, /// and require only a modest additional configuration. /// Each Model supporting these resources documents its specific guidelines. #[derive(Clone, PartialEq, ::prost::Message)] pub struct AutomaticResources { /// Immutable. The minimum number of replicas this DeployedModel will be always deployed /// on. If traffic against it increases, it may dynamically be deployed onto /// more replicas up to [max_replica_count][google.cloud.aiplatform.v1.AutomaticResources.max_replica_count], and as traffic decreases, some /// of these extra replicas may be freed. /// If the requested value is too large, the deployment will error. #[prost(int32, tag = "1")] pub min_replica_count: i32, /// Immutable. The maximum number of replicas this DeployedModel may be deployed on when /// the traffic against it increases. If the requested value is too large, /// the deployment will error, but if deployment succeeds then the ability /// to scale the model to that many replicas is guaranteed (barring service /// outages). If traffic against the DeployedModel increases beyond what its /// replicas at maximum may handle, a portion of the traffic will be dropped. /// If this value is not provided, a no upper bound for scaling under heavy /// traffic will be assume, though Vertex AI may be unable to scale beyond /// certain replica number. #[prost(int32, tag = "2")] pub max_replica_count: i32, } /// A description of resources that are used for performing batch operations, are /// dedicated to a Model, and need manual configuration. #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchDedicatedResources { /// Required. Immutable. The specification of a single machine. #[prost(message, optional, tag = "1")] pub machine_spec: ::std::option::Option<MachineSpec>, /// Immutable. The number of machine replicas used at the start of the batch operation. /// If not set, Vertex AI decides starting number, not greater than /// [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count] #[prost(int32, tag = "2")] pub starting_replica_count: i32, /// Immutable. The maximum number of machine replicas the batch operation may be scaled /// to. The default value is 10. #[prost(int32, tag = "3")] pub max_replica_count: i32, } /// Statistics information about resource consumption. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResourcesConsumed { /// Output only. The number of replica hours used. Note that many replicas may run in /// parallel, and additionally any given work may be queued for some time. /// Therefore this value is not strictly related to wall time. #[prost(double, tag = "1")] pub replica_hours: f64, } /// Represents the spec of disk options. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DiskSpec { /// Type of the boot disk (default is "pd-ssd"). /// Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or /// "pd-standard" (Persistent Disk Hard Disk Drive). #[prost(string, tag = "1")] pub boot_disk_type: std::string::String, /// Size in GB of the boot disk (default is 100GB). #[prost(int32, tag = "2")] pub boot_disk_size_gb: i32, } /// Manual batch tuning parameters. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ManualBatchTuningParameters { /// Immutable. The number of the records (e.g. instances) of the operation given in /// each batch to a machine replica. Machine type, and size of a single /// record should be considered when setting this parameter, higher value /// speeds up the batch operation's execution, but too high value will result /// in a whole batch not fitting in a machine's memory, and the whole /// operation will fail. /// The default value is 4. #[prost(int32, tag = "1")] pub batch_size: i32, } /// A job that uses a [Model][google.cloud.aiplatform.v1.BatchPredictionJob.model] to produce predictions /// on multiple [input instances][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If /// predictions for significant portion of the instances fail, the job may finish /// without attempting predictions for all remaining instances. #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchPredictionJob { /// Output only. Resource name of the BatchPredictionJob. #[prost(string, tag = "1")] pub name: std::string::String, /// Required. The user-defined name of this BatchPredictionJob. #[prost(string, tag = "2")] pub display_name: std::string::String, /// Required. The name of the Model that produces the predictions via this job, /// must share the same ancestor Location. /// Starting this job has no impact on any existing deployments of the Model /// and their resources. #[prost(string, tag = "3")] pub model: std::string::String, /// Required. Input configuration of the instances on which predictions are performed. /// The schema of any single instance may be specified via /// the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] /// [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. #[prost(message, optional, tag = "4")] pub input_config: ::std::option::Option<batch_prediction_job::InputConfig>, /// The parameters that govern the predictions. The schema of the parameters /// may be specified via the [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] /// [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. #[prost(message, optional, tag = "5")] pub model_parameters: ::std::option::Option<::prost_types::Value>, /// Required. The Configuration specifying where output predictions should /// be written. /// The schema of any single prediction may be specified as a concatenation /// of [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] /// [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] /// and /// [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri]. #[prost(message, optional, tag = "6")] pub output_config: ::std::option::Option<batch_prediction_job::OutputConfig>, /// The config of resources used by the Model during the batch prediction. If /// the Model [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types] /// DEDICATED_RESOURCES this config may be provided (and the job will use these /// resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config /// must be provided. #[prost(message, optional, tag = "7")] pub dedicated_resources: ::std::option::Option<BatchDedicatedResources>, /// Immutable. Parameters configuring the batch behavior. Currently only applicable when /// [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] are used (in other cases Vertex AI does /// the tuning itself). #[prost(message, optional, tag = "8")] pub manual_batch_tuning_parameters: ::std::option::Option<ManualBatchTuningParameters>, /// Output only. Information further describing the output of this job. #[prost(message, optional, tag = "9")] pub output_info: ::std::option::Option<batch_prediction_job::OutputInfo>, /// Output only. The detailed state of the job. #[prost(enumeration = "JobState", tag = "10")] pub state: i32, /// Output only. Only populated when the job's state is JOB_STATE_FAILED or /// JOB_STATE_CANCELLED. #[prost(message, optional, tag = "11")] pub error: ::std::option::Option<super::super::super::rpc::Status>, /// Output only. Partial failures encountered. /// For example, single files that can't be read. /// This field never exceeds 20 entries. /// Status details fields contain standard GCP error details. #[prost(message, repeated, tag = "12")] pub partial_failures: ::std::vec::Vec<super::super::super::rpc::Status>, /// Output only. Information about resources that had been consumed by this job. /// Provided in real time at best effort basis, as well as a final value /// once the job completes. /// /// Note: This field currently may be not populated for batch predictions that /// use AutoML Models. #[prost(message, optional, tag = "13")] pub resources_consumed: ::std::option::Option<ResourcesConsumed>, /// Output only. Statistics on completed and failed prediction instances. #[prost(message, optional, tag = "14")] pub completion_stats: ::std::option::Option<CompletionStats>, /// Output only. Time when the BatchPredictionJob was created. #[prost(message, optional, tag = "15")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the BatchPredictionJob for the first time entered the /// `JOB_STATE_RUNNING` state. #[prost(message, optional, tag = "16")] pub start_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the BatchPredictionJob entered any of the following states: /// `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. #[prost(message, optional, tag = "17")] pub end_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the BatchPredictionJob was most recently updated. #[prost(message, optional, tag = "18")] pub update_time: ::std::option::Option<::prost_types::Timestamp>, /// The labels with user-defined metadata to organize BatchPredictionJobs. /// /// Label keys and values can be no longer than 64 characters /// (Unicode codepoints), can only contain lowercase letters, numeric /// characters, underscores and dashes. International characters are allowed. /// /// See https://goo.gl/xmQnxf for more information and examples of labels. #[prost(map = "string, string", tag = "19")] pub labels: ::std::collections::HashMap<std::string::String, std::string::String>, /// Customer-managed encryption key options for a BatchPredictionJob. If this /// is set, then all resources created by the BatchPredictionJob will be /// encrypted with the provided encryption key. #[prost(message, optional, tag = "24")] pub encryption_spec: ::std::option::Option<EncryptionSpec>, } pub mod batch_prediction_job { /// Configures the input to [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. /// See [Model.supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] for Model's supported input /// formats, and how instances should be expressed via any of them. #[derive(Clone, PartialEq, ::prost::Message)] pub struct InputConfig { /// Required. The format in which instances are given, must be one of the /// [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] /// [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats]. #[prost(string, tag = "1")] pub instances_format: std::string::String, /// Required. The source of the input. #[prost(oneof = "input_config::Source", tags = "2, 3")] pub source: ::std::option::Option<input_config::Source>, } pub mod input_config { /// Required. The source of the input. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Source { /// The Cloud Storage location for the input instances. #[prost(message, tag = "2")] GcsSource(super::super::GcsSource), /// The BigQuery location of the input table. /// The schema of the table should be in the format described by the given /// context OpenAPI Schema, if one is provided. The table may contain /// additional columns that are not described by the schema, and they will /// be ignored. #[prost(message, tag = "3")] BigquerySource(super::super::BigQuerySource), } } /// Configures the output of [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. /// See [Model.supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats] for supported output /// formats, and how predictions are expressed via any of them. #[derive(Clone, PartialEq, ::prost::Message)] pub struct OutputConfig { /// Required. The format in which Vertex AI gives the predictions, must be one of the /// [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] /// [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats]. #[prost(string, tag = "1")] pub predictions_format: std::string::String, /// Required. The destination of the output. #[prost(oneof = "output_config::Destination", tags = "2, 3")] pub destination: ::std::option::Option<output_config::Destination>, } pub mod output_config { /// Required. The destination of the output. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Destination { /// The Cloud Storage location of the directory where the output is /// to be written to. In the given directory a new directory is created. /// Its name is `prediction-<model-display-name>-<job-create-time>`, /// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. /// Inside of it files `predictions_0001.<extension>`, /// `predictions_0002.<extension>`, ..., `predictions_N.<extension>` /// are created where `<extension>` depends on chosen /// [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total /// number of successfully predicted instances. /// If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] /// and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata /// defined then each such file contains predictions as per the /// [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format]. /// If prediction for any instance failed (partially or completely), then /// an additional `errors_0001.<extension>`, `errors_0002.<extension>`,..., /// `errors_N.<extension>` files are created (N depends on total number /// of failed predictions). These files contain the failed instances, /// as per their schema, followed by an additional `error` field which as /// value has /// [`google.rpc.Status`](Status) /// containing only `code` and `message` fields. #[prost(message, tag = "2")] GcsDestination(super::super::GcsDestination), /// The BigQuery project or dataset location where the output is to be /// written to. If project is provided, a new dataset is created with name /// `prediction_<model-display-name>_<job-create-time>` /// where <model-display-name> is made /// BigQuery-dataset-name compatible (for example, most special characters /// become underscores), and timestamp is in /// YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset /// two tables will be created, `predictions`, and `errors`. /// If the Model has both [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] /// and [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] schemata /// defined then the tables have columns as follows: The `predictions` /// table contains instances for which the prediction succeeded, it /// has columns as per a concatenation of the Model's instance and /// prediction schemata. The `errors` table contains rows for which the /// prediction has failed, it has instance columns, as per the /// instance schema, followed by a single "errors" column, which as values /// has [`google.rpc.Status`](Status) /// represented as a STRUCT, and containing only `code` and `message`. #[prost(message, tag = "3")] BigqueryDestination(super::super::BigQueryDestination), } } /// Further describes this job's output. /// Supplements [output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct OutputInfo { /// The output location into which prediction output is written. #[prost(oneof = "output_info::OutputLocation", tags = "1, 2")] pub output_location: ::std::option::Option<output_info::OutputLocation>, } pub mod output_info { /// The output location into which prediction output is written. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum OutputLocation { /// Output only. The full path of the Cloud Storage directory created, into which /// the prediction output is written. #[prost(string, tag = "1")] GcsOutputDirectory(std::string::String), /// Output only. The path of the BigQuery dataset created, in /// `bq://projectId.bqDatasetId` /// format, into which the prediction output is written. #[prost(string, tag = "2")] BigqueryOutputDataset(std::string::String), } } } /// Represents an environment variable present in a Container or Python Module. #[derive(Clone, PartialEq, ::prost::Message)] pub struct EnvVar { /// Required. Name of the environment variable. Must be a valid C identifier. #[prost(string, tag = "1")] pub name: std::string::String, /// Required. Variables that reference a $(VAR_NAME) are expanded /// using the previous defined environment variables in the container and /// any service environment variables. If a variable cannot be resolved, /// the reference in the input string will be unchanged. The $(VAR_NAME) /// syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped /// references will never be expanded, regardless of whether the variable /// exists or not. #[prost(string, tag = "2")] pub value: std::string::String, } /// Represents a job that runs custom workloads such as a Docker container or a /// Python package. A CustomJob can have multiple worker pools and each worker /// pool can have its own machine and input spec. A CustomJob will be cleaned up /// once the job enters terminal state (failed or succeeded). #[derive(Clone, PartialEq, ::prost::Message)] pub struct CustomJob { /// Output only. Resource name of a CustomJob. #[prost(string, tag = "1")] pub name: std::string::String, /// Required. The display name of the CustomJob. /// The name can be up to 128 characters long and can be consist of any UTF-8 /// characters. #[prost(string, tag = "2")] pub display_name: std::string::String, /// Required. Job spec. #[prost(message, optional, tag = "4")] pub job_spec: ::std::option::Option<CustomJobSpec>, /// Output only. The detailed state of the job. #[prost(enumeration = "JobState", tag = "5")] pub state: i32, /// Output only. Time when the CustomJob was created. #[prost(message, optional, tag = "6")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the CustomJob for the first time entered the /// `JOB_STATE_RUNNING` state. #[prost(message, optional, tag = "7")] pub start_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the CustomJob entered any of the following states: /// `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. #[prost(message, optional, tag = "8")] pub end_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the CustomJob was most recently updated. #[prost(message, optional, tag = "9")] pub update_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Only populated when job's state is `JOB_STATE_FAILED` or /// `JOB_STATE_CANCELLED`. #[prost(message, optional, tag = "10")] pub error: ::std::option::Option<super::super::super::rpc::Status>, /// The labels with user-defined metadata to organize CustomJobs. /// /// Label keys and values can be no longer than 64 characters /// (Unicode codepoints), can only contain lowercase letters, numeric /// characters, underscores and dashes. International characters are allowed. /// /// See https://goo.gl/xmQnxf for more information and examples of labels. #[prost(map = "string, string", tag = "11")] pub labels: ::std::collections::HashMap<std::string::String, std::string::String>, /// Customer-managed encryption key options for a CustomJob. If this is set, /// then all resources created by the CustomJob will be encrypted with the /// provided encryption key. #[prost(message, optional, tag = "12")] pub encryption_spec: ::std::option::Option<EncryptionSpec>, } /// Represents the spec of a CustomJob. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CustomJobSpec { /// Required. The spec of the worker pools including machine type and Docker image. /// All worker pools except the first one are optional and can be skipped by /// providing an empty value. #[prost(message, repeated, tag = "1")] pub worker_pool_specs: ::std::vec::Vec<WorkerPoolSpec>, /// Scheduling options for a CustomJob. #[prost(message, optional, tag = "3")] pub scheduling: ::std::option::Option<Scheduling>, /// Specifies the service account for workload run-as account. /// Users submitting jobs must have act-as permission on this run-as account. /// If unspecified, the [AI Platform Custom Code Service /// Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) /// for the CustomJob's project is used. #[prost(string, tag = "4")] pub service_account: std::string::String, /// The full name of the Compute Engine /// [network](/compute/docs/networks-and-firewalls#networks) to which the Job /// should be peered. For example, `projects/12345/global/networks/myVPC`. /// [Format](/compute/docs/reference/rest/v1/networks/insert) /// is of the form `projects/{project}/global/networks/{network}`. /// Where {project} is a project number, as in `12345`, and {network} is a /// network name. /// /// Private services access must already be configured for the network. If left /// unspecified, the job is not peered with any network. #[prost(string, tag = "5")] pub network: std::string::String, /// The Cloud Storage location to store the output of this CustomJob or /// HyperparameterTuningJob. For HyperparameterTuningJob, /// the baseOutputDirectory of /// each child CustomJob backing a Trial is set to a subdirectory of name /// [id][google.cloud.aiplatform.v1.Trial.id] under its parent HyperparameterTuningJob's /// baseOutputDirectory. /// /// The following Vertex AI environment variables will be passed to /// containers or python modules when this field is set: /// /// For CustomJob: /// /// * AIP_MODEL_DIR = `<base_output_directory>/model/` /// * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/` /// * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/` /// /// For CustomJob backing a Trial of HyperparameterTuningJob: /// /// * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/` /// * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/` /// * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/` #[prost(message, optional, tag = "6")] pub base_output_directory: ::std::option::Option<GcsDestination>, } /// Represents the spec of a worker pool in a job. #[derive(Clone, PartialEq, ::prost::Message)] pub struct WorkerPoolSpec { /// Optional. Immutable. The specification of a single machine. #[prost(message, optional, tag = "1")] pub machine_spec: ::std::option::Option<MachineSpec>, /// Optional. The number of worker replicas to use for this worker pool. #[prost(int64, tag = "2")] pub replica_count: i64, /// Disk spec. #[prost(message, optional, tag = "5")] pub disk_spec: ::std::option::Option<DiskSpec>, /// The custom task to be executed in this worker pool. #[prost(oneof = "worker_pool_spec::Task", tags = "6, 7")] pub task: ::std::option::Option<worker_pool_spec::Task>, } pub mod worker_pool_spec { /// The custom task to be executed in this worker pool. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Task { /// The custom container task. #[prost(message, tag = "6")] ContainerSpec(super::ContainerSpec), /// The Python packaged task. #[prost(message, tag = "7")] PythonPackageSpec(super::PythonPackageSpec), } } /// The spec of a Container. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ContainerSpec { /// Required. The URI of a container image in the Container Registry that is to be run on /// each worker replica. #[prost(string, tag = "1")] pub image_uri: std::string::String, /// The command to be invoked when the container is started. /// It overrides the entrypoint instruction in Dockerfile when provided. #[prost(string, repeated, tag = "2")] pub command: ::std::vec::Vec<std::string::String>, /// The arguments to be passed when starting the container. #[prost(string, repeated, tag = "3")] pub args: ::std::vec::Vec<std::string::String>, /// Environment variables to be passed to the container. #[prost(message, repeated, tag = "4")] pub env: ::std::vec::Vec<EnvVar>, } /// The spec of a Python packaged code. #[derive(Clone, PartialEq, ::prost::Message)] pub struct PythonPackageSpec { /// Required. The URI of a container image in Artifact Registry that will run the /// provided Python package. Vertex AI provides a wide range of executor /// images with pre-installed packages to meet users' various use cases. See /// the list of [pre-built containers for /// training](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). /// You must use an image from this list. #[prost(string, tag = "1")] pub executor_image_uri: std::string::String, /// Required. The Google Cloud Storage location of the Python package files which are /// the training program and its dependent packages. /// The maximum number of package URIs is 100. #[prost(string, repeated, tag = "2")] pub package_uris: ::std::vec::Vec<std::string::String>, /// Required. The Python module name to run after installing the packages. #[prost(string, tag = "3")] pub python_module: std::string::String, /// Command line arguments to be passed to the Python task. #[prost(string, repeated, tag = "4")] pub args: ::std::vec::Vec<std::string::String>, /// Environment variables to be passed to the python module. #[prost(message, repeated, tag = "5")] pub env: ::std::vec::Vec<EnvVar>, } /// All parameters related to queuing and scheduling of custom jobs. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Scheduling { /// The maximum job running time. The default is 7 days. #[prost(message, optional, tag = "1")] pub timeout: ::std::option::Option<::prost_types::Duration>, /// Restarts the entire CustomJob if a worker gets restarted. /// This feature can be used by distributed training jobs that are not /// resilient to workers leaving and joining a job. #[prost(bool, tag = "3")] pub restart_job_on_worker_restart: bool, } /// A piece of data in a Dataset. Could be an image, a video, a document or plain /// text. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DataItem { /// Output only. The resource name of the DataItem. #[prost(string, tag = "1")] pub name: std::string::String, /// Output only. Timestamp when this DataItem was created. #[prost(message, optional, tag = "2")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Timestamp when this DataItem was last updated. #[prost(message, optional, tag = "6")] pub update_time: ::std::option::Option<::prost_types::Timestamp>, /// Optional. The labels with user-defined metadata to organize your DataItems. /// /// Label keys and values can be no longer than 64 characters /// (Unicode codepoints), can only contain lowercase letters, numeric /// characters, underscores and dashes. International characters are allowed. /// No more than 64 user labels can be associated with one DataItem(System /// labels are excluded). /// /// See https://goo.gl/xmQnxf for more information and examples of labels. /// System reserved label keys are prefixed with "aiplatform.googleapis.com/" /// and are immutable. #[prost(map = "string, string", tag = "3")] pub labels: ::std::collections::HashMap<std::string::String, std::string::String>, /// Required. The data that the DataItem represents (for example, an image or a text /// snippet). The schema of the payload is stored in the parent Dataset's /// [metadata schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] dataItemSchemaUri field. #[prost(message, optional, tag = "4")] pub payload: ::std::option::Option<::prost_types::Value>, /// Optional. Used to perform consistent read-modify-write updates. If not set, a blind /// "overwrite" update happens. #[prost(string, tag = "7")] pub etag: std::string::String, } /// SpecialistPool represents customers' own workforce to work on their data /// labeling jobs. It includes a group of specialist managers who are responsible /// for managing the labelers in this pool as well as customers' data labeling /// jobs associated with this pool. /// Customers create specialist pool as well as start data labeling jobs on /// Cloud, managers and labelers work with the jobs using CrowdCompute console. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SpecialistPool { /// Required. The resource name of the SpecialistPool. #[prost(string, tag = "1")] pub name: std::string::String, /// Required. The user-defined name of the SpecialistPool. /// The name can be up to 128 characters long and can be consist of any UTF-8 /// characters. /// This field should be unique on project-level. #[prost(string, tag = "2")] pub display_name: std::string::String, /// Output only. The number of Specialists in this SpecialistPool. #[prost(int32, tag = "3")] pub specialist_managers_count: i32, /// The email addresses of the specialists in the SpecialistPool. #[prost(string, repeated, tag = "4")] pub specialist_manager_emails: ::std::vec::Vec<std::string::String>, /// Output only. The resource name of the pending data labeling jobs. #[prost(string, repeated, tag = "5")] pub pending_data_labeling_jobs: ::std::vec::Vec<std::string::String>, } /// DataLabelingJob is used to trigger a human labeling job on unlabeled data /// from the following Dataset: #[derive(Clone, PartialEq, ::prost::Message)] pub struct DataLabelingJob { /// Output only. Resource name of the DataLabelingJob. #[prost(string, tag = "1")] pub name: std::string::String, /// Required. The user-defined name of the DataLabelingJob. /// The name can be up to 128 characters long and can be consist of any UTF-8 /// characters. /// Display name of a DataLabelingJob. #[prost(string, tag = "2")] pub display_name: std::string::String, /// Required. Dataset resource names. Right now we only support labeling from a single /// Dataset. /// Format: /// `projects/{project}/locations/{location}/datasets/{dataset}` #[prost(string, repeated, tag = "3")] pub datasets: ::std::vec::Vec<std::string::String>, /// Labels to assign to annotations generated by this DataLabelingJob. /// /// Label keys and values can be no longer than 64 characters /// (Unicode codepoints), can only contain lowercase letters, numeric /// characters, underscores and dashes. International characters are allowed. /// See https://goo.gl/xmQnxf for more information and examples of labels. /// System reserved label keys are prefixed with "aiplatform.googleapis.com/" /// and are immutable. #[prost(map = "string, string", tag = "12")] pub annotation_labels: ::std::collections::HashMap<std::string::String, std::string::String>, /// Required. Number of labelers to work on each DataItem. #[prost(int32, tag = "4")] pub labeler_count: i32, /// Required. The Google Cloud Storage location of the instruction pdf. This pdf is /// shared with labelers, and provides detailed description on how to label /// DataItems in Datasets. #[prost(string, tag = "5")] pub instruction_uri: std::string::String, /// Required. Points to a YAML file stored on Google Cloud Storage describing the /// config for a specific type of DataLabelingJob. /// The schema files that can be used here are found in the /// https://storage.googleapis.com/google-cloud-aiplatform bucket in the /// /schema/datalabelingjob/inputs/ folder. #[prost(string, tag = "6")] pub inputs_schema_uri: std::string::String, /// Required. Input config parameters for the DataLabelingJob. #[prost(message, optional, tag = "7")] pub inputs: ::std::option::Option<::prost_types::Value>, /// Output only. The detailed state of the job. #[prost(enumeration = "JobState", tag = "8")] pub state: i32, /// Output only. Current labeling job progress percentage scaled in interval [0, 100], /// indicating the percentage of DataItems that has been finished. #[prost(int32, tag = "13")] pub labeling_progress: i32, /// Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to /// date. #[prost(message, optional, tag = "14")] pub current_spend: ::std::option::Option<super::super::super::r#type::Money>, /// Output only. Timestamp when this DataLabelingJob was created. #[prost(message, optional, tag = "9")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Timestamp when this DataLabelingJob was updated most recently. #[prost(message, optional, tag = "10")] pub update_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. DataLabelingJob errors. It is only populated when job's state is /// `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`. #[prost(message, optional, tag = "22")] pub error: ::std::option::Option<super::super::super::rpc::Status>, /// The labels with user-defined metadata to organize your DataLabelingJobs. /// /// Label keys and values can be no longer than 64 characters /// (Unicode codepoints), can only contain lowercase letters, numeric /// characters, underscores and dashes. International characters are allowed. /// /// See https://goo.gl/xmQnxf for more information and examples of labels. /// System reserved label keys are prefixed with "aiplatform.googleapis.com/" /// and are immutable. Following system labels exist for each DataLabelingJob: /// /// * "aiplatform.googleapis.com/schema": output only, its value is the /// [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s title. #[prost(map = "string, string", tag = "11")] pub labels: ::std::collections::HashMap<std::string::String, std::string::String>, /// The SpecialistPools' resource names associated with this job. #[prost(string, repeated, tag = "16")] pub specialist_pools: ::std::vec::Vec<std::string::String>, /// Customer-managed encryption key spec for a DataLabelingJob. If set, this /// DataLabelingJob will be secured by this key. /// /// Note: Annotations created in the DataLabelingJob are associated with /// the EncryptionSpec of the Dataset they are exported to. #[prost(message, optional, tag = "20")] pub encryption_spec: ::std::option::Option<EncryptionSpec>, /// Parameters that configure the active learning pipeline. Active learning /// will label the data incrementally via several iterations. For every /// iteration, it will select a batch of data based on the sampling strategy. #[prost(message, optional, tag = "21")] pub active_learning_config: ::std::option::Option<ActiveLearningConfig>, } /// Parameters that configure the active learning pipeline. Active learning will /// label the data incrementally by several iterations. For every iteration, it /// will select a batch of data based on the sampling strategy. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ActiveLearningConfig { /// Active learning data sampling config. For every active learning labeling /// iteration, it will select a batch of data based on the sampling strategy. #[prost(message, optional, tag = "3")] pub sample_config: ::std::option::Option<SampleConfig>, /// CMLE training config. For every active learning labeling iteration, system /// will train a machine learning model on CMLE. The trained model will be used /// by data sampling algorithm to select DataItems. #[prost(message, optional, tag = "4")] pub training_config: ::std::option::Option<TrainingConfig>, /// Required. Max human labeling DataItems. The rest part will be labeled by /// machine. #[prost(oneof = "active_learning_config::HumanLabelingBudget", tags = "1, 2")] pub human_labeling_budget: ::std::option::Option<active_learning_config::HumanLabelingBudget>, } pub mod active_learning_config { /// Required. Max human labeling DataItems. The rest part will be labeled by /// machine. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum HumanLabelingBudget { /// Max number of human labeled DataItems. #[prost(int64, tag = "1")] MaxDataItemCount(i64), /// Max percent of total DataItems for human labeling. #[prost(int32, tag = "2")] MaxDataItemPercentage(i32), } } /// Active learning data sampling config. For every active learning labeling /// iteration, it will select a batch of data based on the sampling strategy. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SampleConfig { /// Field to choose sampling strategy. Sampling strategy will decide which data /// should be selected for human labeling in every batch. #[prost(enumeration = "sample_config::SampleStrategy", tag = "5")] pub sample_strategy: i32, /// Decides sample size for the initial batch. initial_batch_sample_percentage /// is used by default. #[prost(oneof = "sample_config::InitialBatchSampleSize", tags = "1")] pub initial_batch_sample_size: ::std::option::Option<sample_config::InitialBatchSampleSize>, /// Decides sample size for the following batches. /// following_batch_sample_percentage is used by default. #[prost(oneof = "sample_config::FollowingBatchSampleSize", tags = "3")] pub following_batch_sample_size: ::std::option::Option<sample_config::FollowingBatchSampleSize>, } pub mod sample_config { /// Sample strategy decides which subset of DataItems should be selected for /// human labeling in every batch. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum SampleStrategy { /// Default will be treated as UNCERTAINTY. Unspecified = 0, /// Sample the most uncertain data to label. Uncertainty = 1, } /// Decides sample size for the initial batch. initial_batch_sample_percentage /// is used by default. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum InitialBatchSampleSize { /// The percentage of data needed to be labeled in the first batch. #[prost(int32, tag = "1")] InitialBatchSamplePercentage(i32), } /// Decides sample size for the following batches. /// following_batch_sample_percentage is used by default. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum FollowingBatchSampleSize { /// The percentage of data needed to be labeled in each following batch /// (except the first batch). #[prost(int32, tag = "3")] FollowingBatchSamplePercentage(i32), } } /// CMLE training config. For every active learning labeling iteration, system /// will train a machine learning model on CMLE. The trained model will be used /// by data sampling algorithm to select DataItems. #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrainingConfig { /// The timeout hours for the CMLE training job, expressed in milli hours /// i.e. 1,000 value in this field means 1 hour. #[prost(int64, tag = "1")] pub timeout_training_milli_hours: i64, } /// A collection of DataItems and Annotations on them. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Dataset { /// Output only. The resource name of the Dataset. #[prost(string, tag = "1")] pub name: std::string::String, /// Required. The user-defined name of the Dataset. /// The name can be up to 128 characters long and can be consist of any UTF-8 /// characters. #[prost(string, tag = "2")] pub display_name: std::string::String, /// Required. Points to a YAML file stored on Google Cloud Storage describing additional /// information about the Dataset. /// The schema is defined as an OpenAPI 3.0.2 Schema Object. /// The schema files that can be used here are found in /// gs://google-cloud-aiplatform/schema/dataset/metadata/. #[prost(string, tag = "3")] pub metadata_schema_uri: std::string::String, /// Required. Additional information about the Dataset. #[prost(message, optional, tag = "8")] pub metadata: ::std::option::Option<::prost_types::Value>, /// Output only. Timestamp when this Dataset was created. #[prost(message, optional, tag = "4")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Timestamp when this Dataset was last updated. #[prost(message, optional, tag = "5")] pub update_time: ::std::option::Option<::prost_types::Timestamp>, /// Used to perform consistent read-modify-write updates. If not set, a blind /// "overwrite" update happens. #[prost(string, tag = "6")] pub etag: std::string::String, /// The labels with user-defined metadata to organize your Datasets. /// /// Label keys and values can be no longer than 64 characters /// (Unicode codepoints), can only contain lowercase letters, numeric /// characters, underscores and dashes. International characters are allowed. /// No more than 64 user labels can be associated with one Dataset (System /// labels are excluded). /// /// See https://goo.gl/xmQnxf for more information and examples of labels. /// System reserved label keys are prefixed with "aiplatform.googleapis.com/" /// and are immutable. Following system labels exist for each Dataset: /// /// * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its /// value is the [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] title. #[prost(map = "string, string", tag = "7")] pub labels: ::std::collections::HashMap<std::string::String, std::string::String>, /// Customer-managed encryption key spec for a Dataset. If set, this Dataset /// and all sub-resources of this Dataset will be secured by this key. #[prost(message, optional, tag = "11")] pub encryption_spec: ::std::option::Option<EncryptionSpec>, } /// Describes the location from where we import data into a Dataset, together /// with the labels that will be applied to the DataItems and the Annotations. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImportDataConfig { /// Labels that will be applied to newly imported DataItems. If an identical /// DataItem as one being imported already exists in the Dataset, then these /// labels will be appended to these of the already existing one, and if labels /// with identical key is imported before, the old label value will be /// overwritten. If two DataItems are identical in the same import data /// operation, the labels will be combined and if key collision happens in this /// case, one of the values will be picked randomly. Two DataItems are /// considered identical if their content bytes are identical (e.g. image bytes /// or pdf bytes). /// These labels will be overridden by Annotation labels specified inside index /// file referenced by [import_schema_uri][google.cloud.aiplatform.v1.ImportDataConfig.import_schema_uri], e.g. jsonl file. #[prost(map = "string, string", tag = "2")] pub data_item_labels: ::std::collections::HashMap<std::string::String, std::string::String>, /// Required. Points to a YAML file stored on Google Cloud Storage describing the import /// format. Validation will be done against the schema. The schema is defined /// as an [OpenAPI 3.0.2 Schema /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). #[prost(string, tag = "4")] pub import_schema_uri: std::string::String, /// The source of the input. #[prost(oneof = "import_data_config::Source", tags = "1")] pub source: ::std::option::Option<import_data_config::Source>, } pub mod import_data_config { /// The source of the input. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Source { /// The Google Cloud Storage location for the input content. #[prost(message, tag = "1")] GcsSource(super::GcsSource), } } /// Describes what part of the Dataset is to be exported, the destination of /// the export and how to export. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportDataConfig { /// A filter on Annotations of the Dataset. Only Annotations on to-be-exported /// DataItems(specified by [data_items_filter][]) that match this filter will /// be exported. The filter syntax is the same as in /// [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations]. #[prost(string, tag = "2")] pub annotations_filter: std::string::String, /// The destination of the output. #[prost(oneof = "export_data_config::Destination", tags = "1")] pub destination: ::std::option::Option<export_data_config::Destination>, } pub mod export_data_config { /// The destination of the output. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Destination { /// The Google Cloud Storage location where the output is to be written to. /// In the given directory a new directory will be created with name: /// `export-data-<dataset-display-name>-<timestamp-of-export-call>` where /// timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export /// output will be written into that directory. Inside that directory, /// annotations with the same schema will be grouped into sub directories /// which are named with the corresponding annotations' schema title. Inside /// these sub directories, a schema.yaml will be created to describe the /// output format. #[prost(message, tag = "1")] GcsDestination(super::GcsDestination), } } /// Generic Metadata shared by all operations. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenericOperationMetadata { /// Output only. Partial failures encountered. /// E.g. single files that couldn't be read. /// This field should never exceed 20 entries. /// Status details field will contain standard GCP error details. #[prost(message, repeated, tag = "1")] pub partial_failures: ::std::vec::Vec<super::super::super::rpc::Status>, /// Output only. Time when the operation was created. #[prost(message, optional, tag = "2")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the operation was updated for the last time. /// If the operation has finished (successfully or not), this is the finish /// time. #[prost(message, optional, tag = "3")] pub update_time: ::std::option::Option<::prost_types::Timestamp>, } /// Details of operations that perform deletes of any entities. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteOperationMetadata { /// The common part of the operation metadata. #[prost(message, optional, tag = "1")] pub generic_metadata: ::std::option::Option<GenericOperationMetadata>, } /// Points to a DeployedModel. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeployedModelRef { /// Immutable. A resource name of an Endpoint. #[prost(string, tag = "1")] pub endpoint: std::string::String, /// Immutable. An ID of a DeployedModel in the above Endpoint. #[prost(string, tag = "2")] pub deployed_model_id: std::string::String, } /// A trained machine learning Model. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Model { /// The resource name of the Model. #[prost(string, tag = "1")] pub name: std::string::String, /// Required. The display name of the Model. /// The name can be up to 128 characters long and can be consist of any UTF-8 /// characters. #[prost(string, tag = "2")] pub display_name: std::string::String, /// The description of the Model. #[prost(string, tag = "3")] pub description: std::string::String, /// The schemata that describe formats of the Model's predictions and /// explanations as given and returned via /// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] and [PredictionService.Explain][]. #[prost(message, optional, tag = "4")] pub predict_schemata: ::std::option::Option<PredictSchemata>, /// Immutable. Points to a YAML file stored on Google Cloud Storage describing additional /// information about the Model, that is specific to it. Unset if the Model /// does not have any additional information. /// The schema is defined as an OpenAPI 3.0.2 [Schema /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). /// AutoML Models always have this field populated by Vertex AI, if no /// additional metadata is needed, this field is set to an empty string. /// Note: The URI given on output will be immutable and probably different, /// including the URI scheme, than the one given on input. The output URI will /// point to a location where the user only has a read access. #[prost(string, tag = "5")] pub metadata_schema_uri: std::string::String, /// Immutable. An additional information about the Model; the schema of the metadata can /// be found in [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri]. /// Unset if the Model does not have any additional information. #[prost(message, optional, tag = "6")] pub metadata: ::std::option::Option<::prost_types::Value>, /// Output only. The formats in which this Model may be exported. If empty, this Model is /// not available for export. #[prost(message, repeated, tag = "20")] pub supported_export_formats: ::std::vec::Vec<model::ExportFormat>, /// Output only. The resource name of the TrainingPipeline that uploaded this Model, if any. #[prost(string, tag = "7")] pub training_pipeline: std::string::String, /// Input only. The specification of the container that is to be used when deploying /// this Model. The specification is ingested upon /// [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], and all binaries it contains are copied /// and stored internally by Vertex AI. /// Not present for AutoML Models. #[prost(message, optional, tag = "9")] pub container_spec: ::std::option::Option<ModelContainerSpec>, /// Immutable. The path to the directory containing the Model artifact and any of its /// supporting files. /// Not present for AutoML Models. #[prost(string, tag = "26")] pub artifact_uri: std::string::String, /// Output only. When this Model is deployed, its prediction resources are described by the /// `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] object. /// Because not all Models support all resource configuration types, the /// configuration types this Model supports are listed here. If no /// configuration types are listed, the Model cannot be deployed to an /// [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not support /// online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or /// [PredictionService.Explain][]). Such a Model can serve predictions by /// using a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], if it has at least one entry each in /// [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] and /// [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats]. #[prost( enumeration = "model::DeploymentResourcesType", repeated, packed = "false", tag = "10" )] pub supported_deployment_resources_types: ::std::vec::Vec<i32>, /// Output only. The formats this Model supports in /// [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. If /// [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] exists, the instances /// should be given as per that schema. /// /// The possible formats are: /// /// * `jsonl` /// The JSON Lines format, where each instance is a single line. Uses /// [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source]. /// /// * `csv` /// The CSV format, where each instance is a single comma-separated line. /// The first line in the file is the header, containing comma-separated field /// names. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source]. /// /// * `tf-record` /// The TFRecord format, where each instance is a single record in tfrecord /// syntax. Uses [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source]. /// /// * `tf-record-gzip` /// Similar to `tf-record`, but the file is gzipped. Uses /// [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source]. /// /// * `bigquery` /// Each instance is a single row in BigQuery. Uses /// [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source]. /// /// * `file-list` /// Each line of the file is the location of an instance to process, uses /// `gcs_source` field of the /// [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] object. /// /// /// If this Model doesn't support any of these formats it means it cannot be /// used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has /// [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online /// predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or /// [PredictionService.Explain][]. #[prost(string, repeated, tag = "11")] pub supported_input_storage_formats: ::std::vec::Vec<std::string::String>, /// Output only. The formats this Model supports in /// [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. If both /// [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] and /// [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] exist, the predictions /// are returned together with their instances. In other words, the /// prediction has the original instance data first, followed /// by the actual prediction content (as per the schema). /// /// The possible formats are: /// /// * `jsonl` /// The JSON Lines format, where each prediction is a single line. Uses /// [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination]. /// /// * `csv` /// The CSV format, where each prediction is a single comma-separated line. /// The first line in the file is the header, containing comma-separated field /// names. Uses /// [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination]. /// /// * `bigquery` /// Each prediction is a single row in a BigQuery table, uses /// [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination] /// . /// /// /// If this Model doesn't support any of these formats it means it cannot be /// used with a [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. However, if it has /// [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], it could serve online /// predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] or /// [PredictionService.Explain][]. #[prost(string, repeated, tag = "12")] pub supported_output_storage_formats: ::std::vec::Vec<std::string::String>, /// Output only. Timestamp when this Model was uploaded into Vertex AI. #[prost(message, optional, tag = "13")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Timestamp when this Model was most recently updated. #[prost(message, optional, tag = "14")] pub update_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. The pointers to DeployedModels created from this Model. Note that /// Model could have been deployed to Endpoints in different Locations. #[prost(message, repeated, tag = "15")] pub deployed_models: ::std::vec::Vec<DeployedModelRef>, /// Used to perform consistent read-modify-write updates. If not set, a blind /// "overwrite" update happens. #[prost(string, tag = "16")] pub etag: std::string::String, /// The labels with user-defined metadata to organize your Models. /// /// Label keys and values can be no longer than 64 characters /// (Unicode codepoints), can only contain lowercase letters, numeric /// characters, underscores and dashes. International characters are allowed. /// /// See https://goo.gl/xmQnxf for more information and examples of labels. #[prost(map = "string, string", tag = "17")] pub labels: ::std::collections::HashMap<std::string::String, std::string::String>, /// Customer-managed encryption key spec for a Model. If set, this /// Model and all sub-resources of this Model will be secured by this key. #[prost(message, optional, tag = "24")] pub encryption_spec: ::std::option::Option<EncryptionSpec>, } pub mod model { /// Represents export format supported by the Model. /// All formats export to Google Cloud Storage. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportFormat { /// Output only. The ID of the export format. /// The possible format IDs are: /// /// * `tflite` /// Used for Android mobile devices. /// /// * `edgetpu-tflite` /// Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices. /// /// * `tf-saved-model` /// A tensorflow model in SavedModel format. /// /// * `tf-js` /// A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used /// in the browser and in Node.js using JavaScript. /// /// * `core-ml` /// Used for iOS mobile devices. /// /// * `custom-trained` /// A Model that was uploaded or trained by custom code. #[prost(string, tag = "1")] pub id: std::string::String, /// Output only. The content of this Model that may be exported. #[prost( enumeration = "export_format::ExportableContent", repeated, packed = "false", tag = "2" )] pub exportable_contents: ::std::vec::Vec<i32>, } pub mod export_format { /// The Model content that can be exported. #[derive( Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration, )] #[repr(i32)] pub enum ExportableContent { /// Should not be used. Unspecified = 0, /// Model artifact and any of its supported files. Will be exported to the /// location specified by the `artifactDestination` field of the /// [ExportModelRequest.output_config][google.cloud.aiplatform.v1.ExportModelRequest.output_config] object. Artifact = 1, /// The container image that is to be used when deploying this Model. Will /// be exported to the location specified by the `imageDestination` field /// of the [ExportModelRequest.output_config][google.cloud.aiplatform.v1.ExportModelRequest.output_config] object. Image = 2, } } /// Identifies a type of Model's prediction resources. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum DeploymentResourcesType { /// Should not be used. Unspecified = 0, /// Resources that are dedicated to the [DeployedModel][google.cloud.aiplatform.v1.DeployedModel], and that need a /// higher degree of manual configuration. DedicatedResources = 1, /// Resources that to large degree are decided by Vertex AI, and require /// only a modest additional configuration. AutomaticResources = 2, } } /// Contains the schemata used in Model's predictions and explanations via /// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict], [PredictionService.Explain][] and /// [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct PredictSchemata { /// Immutable. Points to a YAML file stored on Google Cloud Storage describing the format /// of a single instance, which are used in [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances], /// [ExplainRequest.instances][] and /// [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. /// The schema is defined as an OpenAPI 3.0.2 [Schema /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). /// AutoML Models always have this field populated by Vertex AI. /// Note: The URI given on output will be immutable and probably different, /// including the URI scheme, than the one given on input. The output URI will /// point to a location where the user only has a read access. #[prost(string, tag = "1")] pub instance_schema_uri: std::string::String, /// Immutable. Points to a YAML file stored on Google Cloud Storage describing the /// parameters of prediction and explanation via /// [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters], [ExplainRequest.parameters][] and /// [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters]. /// The schema is defined as an OpenAPI 3.0.2 [Schema /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). /// AutoML Models always have this field populated by Vertex AI, if no /// parameters are supported, then it is set to an empty string. /// Note: The URI given on output will be immutable and probably different, /// including the URI scheme, than the one given on input. The output URI will /// point to a location where the user only has a read access. #[prost(string, tag = "2")] pub parameters_schema_uri: std::string::String, /// Immutable. Points to a YAML file stored on Google Cloud Storage describing the format /// of a single prediction produced by this Model, which are returned via /// [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions], [ExplainResponse.explanations][], and /// [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. /// The schema is defined as an OpenAPI 3.0.2 [Schema /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). /// AutoML Models always have this field populated by Vertex AI. /// Note: The URI given on output will be immutable and probably different, /// including the URI scheme, than the one given on input. The output URI will /// point to a location where the user only has a read access. #[prost(string, tag = "3")] pub prediction_schema_uri: std::string::String, } /// Specification of a container for serving predictions. Some fields in this /// message correspond to fields in the [Kubernetes Container v1 core /// specification](https://v1-18.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core). #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModelContainerSpec { /// Required. Immutable. URI of the Docker image to be used as the custom container for serving /// predictions. This URI must identify an image in Artifact Registry or /// Container Registry. Learn more about the [container publishing /// requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), /// including permissions requirements for the AI Platform Service Agent. /// /// The container image is ingested upon [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], stored /// internally, and this original path is afterwards not used. /// /// To learn about the requirements for the Docker image itself, see /// [Custom container /// requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). /// /// You can use the URI to one of Vertex AI's [pre-built container images for /// prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) /// in this field. #[prost(string, tag = "1")] pub image_uri: std::string::String, /// Immutable. Specifies the command that runs when the container starts. This overrides /// the container's /// [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint). /// Specify this field as an array of executable and arguments, similar to a /// Docker `ENTRYPOINT`'s "exec" form, not its "shell" form. /// /// If you do not specify this field, then the container's `ENTRYPOINT` runs, /// in conjunction with the [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] field or the /// container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd), /// if either exists. If this field is not specified and the container does not /// have an `ENTRYPOINT`, then refer to the Docker documentation about [how /// `CMD` and `ENTRYPOINT` /// interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). /// /// If you specify this field, then you can also specify the `args` field to /// provide additional arguments for this command. However, if you specify this /// field, then the container's `CMD` is ignored. See the /// [Kubernetes documentation about how the /// `command` and `args` fields interact with a container's `ENTRYPOINT` and /// `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). /// /// In this field, you can reference [environment variables set by Vertex /// AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) /// and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field. /// You cannot reference environment variables set in the Docker image. In /// order for environment variables to be expanded, reference them by using the /// following syntax: /// <code>$(<var>VARIABLE_NAME</var>)</code> /// Note that this differs from Bash variable expansion, which does not use /// parentheses. If a variable cannot be resolved, the reference in the input /// string is used unchanged. To avoid variable expansion, you can escape this /// syntax with `$$`; for example: /// <code>$$(<var>VARIABLE_NAME</var>)</code> /// This field corresponds to the `command` field of the Kubernetes Containers /// [v1 core /// API](https://v1-18.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core). #[prost(string, repeated, tag = "2")] pub command: ::std::vec::Vec<std::string::String>, /// Immutable. Specifies arguments for the command that runs when the container starts. /// This overrides the container's /// [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify /// this field as an array of executable and arguments, similar to a Docker /// `CMD`'s "default parameters" form. /// /// If you don't specify this field but do specify the /// [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] field, then the command from the /// `command` field runs without any additional arguments. See the /// [Kubernetes documentation about how the /// `command` and `args` fields interact with a container's `ENTRYPOINT` and /// `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). /// /// If you don't specify this field and don't specify the `command` field, /// then the container's /// [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and /// `CMD` determine what runs based on their default behavior. See the Docker /// documentation about [how `CMD` and `ENTRYPOINT` /// interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). /// /// In this field, you can reference [environment variables /// set by Vertex /// AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) /// and environment variables set in the [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] field. /// You cannot reference environment variables set in the Docker image. In /// order for environment variables to be expanded, reference them by using the /// following syntax: /// <code>$(<var>VARIABLE_NAME</var>)</code> /// Note that this differs from Bash variable expansion, which does not use /// parentheses. If a variable cannot be resolved, the reference in the input /// string is used unchanged. To avoid variable expansion, you can escape this /// syntax with `$$`; for example: /// <code>$$(<var>VARIABLE_NAME</var>)</code> /// This field corresponds to the `args` field of the Kubernetes Containers /// [v1 core /// API](https://v1-18.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core). #[prost(string, repeated, tag = "3")] pub args: ::std::vec::Vec<std::string::String>, /// Immutable. List of environment variables to set in the container. After the container /// starts running, code running in the container can read these environment /// variables. /// /// Additionally, the [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] and /// [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] fields can reference these variables. Later /// entries in this list can also reference earlier entries. For example, the /// following example sets the variable `VAR_2` to have the value `foo bar`: /// /// ```json /// [ /// { /// "name": "VAR_1", /// "value": "foo" /// }, /// { /// "name": "VAR_2", /// "value": "$(VAR_1) bar" /// } /// ] /// ``` /// /// If you switch the order of the variables in the example, then the expansion /// does not occur. /// /// This field corresponds to the `env` field of the Kubernetes Containers /// [v1 core /// API](https://v1-18.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core). #[prost(message, repeated, tag = "4")] pub env: ::std::vec::Vec<EnvVar>, /// Immutable. List of ports to expose from the container. Vertex AI sends any /// prediction requests that it receives to the first port on this list. AI /// Platform also sends /// [liveness and health /// checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) /// to this port. /// /// If you do not specify this field, it defaults to following value: /// /// ```json /// [ /// { /// "containerPort": 8080 /// } /// ] /// ``` /// /// Vertex AI does not use ports other than the first one listed. This field /// corresponds to the `ports` field of the Kubernetes Containers /// [v1 core /// API](https://v1-18.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core). #[prost(message, repeated, tag = "5")] pub ports: ::std::vec::Vec<Port>, /// Immutable. HTTP path on the container to send prediction requests to. Vertex AI /// forwards requests sent using /// [projects.locations.endpoints.predict][google.cloud.aiplatform.v1.PredictionService.Predict] to this /// path on the container's IP address and port. Vertex AI then returns the /// container's response in the API response. /// /// For example, if you set this field to `/foo`, then when Vertex AI /// receives a prediction request, it forwards the request body in a POST /// request to the `/foo` path on the port of your container specified by the /// first value of this `ModelContainerSpec`'s /// [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field. /// /// If you don't specify this field, it defaults to the following value when /// you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]: /// <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code> /// The placeholders in this value are replaced as follows: /// /// * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the /// Endpoint.name][] field of the Endpoint where this Model has been /// deployed. (Vertex AI makes this value available to your container code /// as the [`AIP_ENDPOINT_ID` environment /// variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) /// /// * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`. /// (Vertex AI makes this value available to your container code /// as the [`AIP_DEPLOYED_MODEL_ID` environment /// variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) #[prost(string, tag = "6")] pub predict_route: std::string::String, /// Immutable. HTTP path on the container to send health checks to. Vertex AI /// intermittently sends GET requests to this path on the container's IP /// address and port to check that the container is healthy. Read more about /// [health /// checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). /// /// For example, if you set this field to `/bar`, then Vertex AI /// intermittently sends a GET request to the `/bar` path on the port of your /// container specified by the first value of this `ModelContainerSpec`'s /// [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] field. /// /// If you don't specify this field, it defaults to the following value when /// you [deploy this Model to an Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]: /// <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code> /// The placeholders in this value are replaced as follows: /// /// * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the /// Endpoint.name][] field of the Endpoint where this Model has been /// deployed. (Vertex AI makes this value available to your container code /// as the [`AIP_ENDPOINT_ID` environment /// variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) /// /// * <var>DEPLOYED_MODEL</var>: [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] of the `DeployedModel`. /// (Vertex AI makes this value available to your container code as the /// [`AIP_DEPLOYED_MODEL_ID` environment /// variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) #[prost(string, tag = "7")] pub health_route: std::string::String, } /// Represents a network port in a container. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Port { /// The number of the port to expose on the pod's IP address. /// Must be a valid port number, between 1 and 65535 inclusive. #[prost(int32, tag = "3")] pub container_port: i32, } /// Describes the state of a pipeline. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum PipelineState { /// The pipeline state is unspecified. Unspecified = 0, /// The pipeline has been created or resumed, and processing has not yet /// begun. Queued = 1, /// The service is preparing to run the pipeline. Pending = 2, /// The pipeline is in progress. Running = 3, /// The pipeline completed successfully. Succeeded = 4, /// The pipeline failed. Failed = 5, /// The pipeline is being cancelled. From this state, the pipeline may only go /// to either PIPELINE_STATE_SUCCEEDED, PIPELINE_STATE_FAILED or /// PIPELINE_STATE_CANCELLED. Cancelling = 6, /// The pipeline has been cancelled. Cancelled = 7, /// The pipeline has been stopped, and can be resumed. Paused = 8, } /// The TrainingPipeline orchestrates tasks associated with training a Model. It /// always executes the training task, and optionally may also /// export data from Vertex AI's Dataset which becomes the training input, /// [upload][google.cloud.aiplatform.v1.ModelService.UploadModel] the Model to Vertex AI, and evaluate the /// Model. #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrainingPipeline { /// Output only. Resource name of the TrainingPipeline. #[prost(string, tag = "1")] pub name: std::string::String, /// Required. The user-defined name of this TrainingPipeline. #[prost(string, tag = "2")] pub display_name: std::string::String, /// Specifies Vertex AI owned input data that may be used for training the /// Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make /// clear whether this config is used and if there are any special requirements /// on how it should be filled. If nothing about this config is mentioned in /// the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that the /// TrainingPipeline does not depend on this configuration. #[prost(message, optional, tag = "3")] pub input_data_config: ::std::option::Option<InputDataConfig>, /// Required. A Google Cloud Storage path to the YAML file that defines the training task /// which is responsible for producing the model artifact, and may also include /// additional auxiliary work. /// The definition files that can be used here are found in /// gs://google-cloud-aiplatform/schema/trainingjob/definition/. /// Note: The URI given on output will be immutable and probably different, /// including the URI scheme, than the one given on input. The output URI will /// point to a location where the user only has a read access. #[prost(string, tag = "4")] pub training_task_definition: std::string::String, /// Required. The training task's parameter(s), as specified in the /// [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s `inputs`. #[prost(message, optional, tag = "5")] pub training_task_inputs: ::std::option::Option<::prost_types::Value>, /// Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]'s /// `metadata`. This metadata is an auxiliary runtime and final information /// about the training task. While the pipeline is running this information is /// populated only at a best effort basis. Only present if the /// pipeline's [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] contains `metadata` object. #[prost(message, optional, tag = "6")] pub training_task_metadata: ::std::option::Option<::prost_types::Value>, /// Describes the Model that may be uploaded (via [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel]) /// by this TrainingPipeline. The TrainingPipeline's /// [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition] should make clear whether this Model /// description should be populated, and if there are any special requirements /// regarding how it should be filled. If nothing is mentioned in the /// [training_task_definition][google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition], then it should be assumed that this field /// should not be filled and the training task either uploads the Model without /// a need of this information, or that training task does not support /// uploading a Model as part of the pipeline. /// When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and /// the trained Model had been uploaded into Vertex AI, then the /// model_to_upload's resource [name][google.cloud.aiplatform.v1.Model.name] is populated. The Model /// is always uploaded into the Project and Location in which this pipeline /// is. #[prost(message, optional, tag = "7")] pub model_to_upload: ::std::option::Option<Model>, /// Output only. The detailed state of the pipeline. #[prost(enumeration = "PipelineState", tag = "9")] pub state: i32, /// Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or /// `PIPELINE_STATE_CANCELLED`. #[prost(message, optional, tag = "10")] pub error: ::std::option::Option<super::super::super::rpc::Status>, /// Output only. Time when the TrainingPipeline was created. #[prost(message, optional, tag = "11")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the TrainingPipeline for the first time entered the /// `PIPELINE_STATE_RUNNING` state. #[prost(message, optional, tag = "12")] pub start_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the TrainingPipeline entered any of the following states: /// `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`, /// `PIPELINE_STATE_CANCELLED`. #[prost(message, optional, tag = "13")] pub end_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the TrainingPipeline was most recently updated. #[prost(message, optional, tag = "14")] pub update_time: ::std::option::Option<::prost_types::Timestamp>, /// The labels with user-defined metadata to organize TrainingPipelines. /// /// Label keys and values can be no longer than 64 characters /// (Unicode codepoints), can only contain lowercase letters, numeric /// characters, underscores and dashes. International characters are allowed. /// /// See https://goo.gl/xmQnxf for more information and examples of labels. #[prost(map = "string, string", tag = "15")] pub labels: ::std::collections::HashMap<std::string::String, std::string::String>, /// Customer-managed encryption key spec for a TrainingPipeline. If set, this /// TrainingPipeline will be secured by this key. /// /// Note: Model trained by this TrainingPipeline is also secured by this key if /// [model_to_upload][google.cloud.aiplatform.v1.TrainingPipeline.encryption_spec] is not set separately. #[prost(message, optional, tag = "18")] pub encryption_spec: ::std::option::Option<EncryptionSpec>, } /// Specifies Vertex AI owned input data to be used for training, and /// possibly evaluating, the Model. #[derive(Clone, PartialEq, ::prost::Message)] pub struct InputDataConfig { /// Required. The ID of the Dataset in the same Project and Location which data will be /// used to train the Model. The Dataset must use schema compatible with /// Model being trained, and what is compatible should be described in the /// used TrainingPipeline's [training_task_definition] /// [google.cloud.aiplatform.v1.TrainingPipeline.training_task_definition]. /// For tabular Datasets, all their data is exported to training, to pick /// and choose from. #[prost(string, tag = "1")] pub dataset_id: std::string::String, /// Applicable only to Datasets that have DataItems and Annotations. /// /// A filter on Annotations of the Dataset. Only Annotations that both /// match this filter and belong to DataItems not ignored by the split method /// are used in respectively training, validation or test role, depending on /// the role of the DataItem they are on (for the auto-assigned that role is /// decided by Vertex AI). A filter with same syntax as the one used in /// [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations] may be used, but note /// here it filters across all Annotations of the Dataset, and not just within /// a single DataItem. #[prost(string, tag = "6")] pub annotations_filter: std::string::String, /// Applicable only to custom training with Datasets that have DataItems and /// Annotations. /// /// Cloud Storage URI that points to a YAML file describing the annotation /// schema. The schema is defined as an OpenAPI 3.0.2 [Schema /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). /// The schema files that can be used here are found in /// gs://google-cloud-aiplatform/schema/dataset/annotation/ , note that the /// chosen schema must be consistent with /// [metadata][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] of the Dataset specified by /// [dataset_id][google.cloud.aiplatform.v1.InputDataConfig.dataset_id]. /// /// Only Annotations that both match this schema and belong to DataItems not /// ignored by the split method are used in respectively training, validation /// or test role, depending on the role of the DataItem they are on. /// /// When used in conjunction with [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter], the Annotations used /// for training are filtered by both [annotations_filter][google.cloud.aiplatform.v1.InputDataConfig.annotations_filter] and /// [annotation_schema_uri][google.cloud.aiplatform.v1.InputDataConfig.annotation_schema_uri]. #[prost(string, tag = "9")] pub annotation_schema_uri: std::string::String, /// The instructions how the input data should be split between the /// training, validation and test sets. /// If no split type is provided, the [fraction_split][google.cloud.aiplatform.v1.InputDataConfig.fraction_split] is used by default. #[prost(oneof = "input_data_config::Split", tags = "2, 3, 4, 5")] pub split: ::std::option::Option<input_data_config::Split>, /// Only applicable to Custom and Hyperparameter Tuning TrainingPipelines. /// /// The destination of the training data to be written to. /// /// Supported destination file formats: /// * For non-tabular data: "jsonl". /// * For tabular data: "csv" and "bigquery". /// /// The following Vertex AI environment variables are passed to containers /// or python modules of the training task when this field is set: /// /// * AIP_DATA_FORMAT : Exported data format. /// * AIP_TRAINING_DATA_URI : Sharded exported training data uris. /// * AIP_VALIDATION_DATA_URI : Sharded exported validation data uris. /// * AIP_TEST_DATA_URI : Sharded exported test data uris. #[prost(oneof = "input_data_config::Destination", tags = "8, 10")] pub destination: ::std::option::Option<input_data_config::Destination>, } pub mod input_data_config { /// The instructions how the input data should be split between the /// training, validation and test sets. /// If no split type is provided, the [fraction_split][google.cloud.aiplatform.v1.InputDataConfig.fraction_split] is used by default. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Split { /// Split based on fractions defining the size of each set. #[prost(message, tag = "2")] FractionSplit(super::FractionSplit), /// Split based on the provided filters for each set. #[prost(message, tag = "3")] FilterSplit(super::FilterSplit), /// Supported only for tabular Datasets. /// /// Split based on a predefined key. #[prost(message, tag = "4")] PredefinedSplit(super::PredefinedSplit), /// Supported only for tabular Datasets. /// /// Split based on the timestamp of the input data pieces. #[prost(message, tag = "5")] TimestampSplit(super::TimestampSplit), } /// Only applicable to Custom and Hyperparameter Tuning TrainingPipelines. /// /// The destination of the training data to be written to. /// /// Supported destination file formats: /// * For non-tabular data: "jsonl". /// * For tabular data: "csv" and "bigquery". /// /// The following Vertex AI environment variables are passed to containers /// or python modules of the training task when this field is set: /// /// * AIP_DATA_FORMAT : Exported data format. /// * AIP_TRAINING_DATA_URI : Sharded exported training data uris. /// * AIP_VALIDATION_DATA_URI : Sharded exported validation data uris. /// * AIP_TEST_DATA_URI : Sharded exported test data uris. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Destination { /// The Cloud Storage location where the training data is to be /// written to. In the given directory a new directory is created with /// name: /// `dataset-<dataset-id>-<annotation-type>-<timestamp-of-training-call>` /// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. /// All training input data is written into that directory. /// /// The Vertex AI environment variables representing Cloud Storage /// data URIs are represented in the Cloud Storage wildcard /// format to support sharded data. e.g.: "gs://.../training-*.jsonl" /// /// * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data /// * AIP_TRAINING_DATA_URI = /// "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/training-*.${AIP_DATA_FORMAT}" /// /// * AIP_VALIDATION_DATA_URI = /// "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/validation-*.${AIP_DATA_FORMAT}" /// /// * AIP_TEST_DATA_URI = /// "gcs_destination/dataset-<dataset-id>-<annotation-type>-<time>/test-*.${AIP_DATA_FORMAT}" #[prost(message, tag = "8")] GcsDestination(super::GcsDestination), /// Only applicable to custom training with tabular Dataset with BigQuery /// source. /// /// The BigQuery project location where the training data is to be written /// to. In the given project a new dataset is created with name /// `dataset_<dataset-id>_<annotation-type>_<timestamp-of-training-call>` /// where timestamp is in YYYY_MM_DDThh_mm_ss_sssZ format. All training /// input data is written into that dataset. In the dataset three /// tables are created, `training`, `validation` and `test`. /// /// * AIP_DATA_FORMAT = "bigquery". /// * AIP_TRAINING_DATA_URI = /// "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.training" /// /// * AIP_VALIDATION_DATA_URI = /// "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.validation" /// /// * AIP_TEST_DATA_URI = /// "bigquery_destination.dataset_<dataset-id>_<annotation-type>_<time>.test" #[prost(message, tag = "10")] BigqueryDestination(super::BigQueryDestination), } } /// Assigns the input data to training, validation, and test sets as per the /// given fractions. Any of `training_fraction`, `validation_fraction` and /// `test_fraction` may optionally be provided, they must sum to up to 1. If the /// provided ones sum to less than 1, the remainder is assigned to sets as /// decided by Vertex AI. If none of the fractions are set, by default roughly /// 80% of data is used for training, 10% for validation, and 10% for test. #[derive(Clone, PartialEq, ::prost::Message)] pub struct FractionSplit { /// The fraction of the input data that is to be used to train the Model. #[prost(double, tag = "1")] pub training_fraction: f64, /// The fraction of the input data that is to be used to validate the Model. #[prost(double, tag = "2")] pub validation_fraction: f64, /// The fraction of the input data that is to be used to evaluate the Model. #[prost(double, tag = "3")] pub test_fraction: f64, } /// Assigns input data to training, validation, and test sets based on the given /// filters, data pieces not matched by any filter are ignored. Currently only /// supported for Datasets containing DataItems. /// If any of the filters in this message are to match nothing, then they can be /// set as '-' (the minus sign). /// /// Supported only for unstructured Datasets. /// #[derive(Clone, PartialEq, ::prost::Message)] pub struct FilterSplit { /// Required. A filter on DataItems of the Dataset. DataItems that match /// this filter are used to train the Model. A filter with same syntax /// as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a /// single DataItem is matched by more than one of the FilterSplit filters, /// then it is assigned to the first set that applies to it in the /// training, validation, test order. #[prost(string, tag = "1")] pub training_filter: std::string::String, /// Required. A filter on DataItems of the Dataset. DataItems that match /// this filter are used to validate the Model. A filter with same syntax /// as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a /// single DataItem is matched by more than one of the FilterSplit filters, /// then it is assigned to the first set that applies to it in the /// training, validation, test order. #[prost(string, tag = "2")] pub validation_filter: std::string::String, /// Required. A filter on DataItems of the Dataset. DataItems that match /// this filter are used to test the Model. A filter with same syntax /// as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems] may be used. If a /// single DataItem is matched by more than one of the FilterSplit filters, /// then it is assigned to the first set that applies to it in the /// training, validation, test order. #[prost(string, tag = "3")] pub test_filter: std::string::String, } /// Assigns input data to training, validation, and test sets based on the /// value of a provided key. /// /// Supported only for tabular Datasets. #[derive(Clone, PartialEq, ::prost::Message)] pub struct PredefinedSplit { /// Required. The key is a name of one of the Dataset's data columns. /// The value of the key (either the label's value or value in the column) /// must be one of {`training`, `validation`, `test`}, and it defines to which /// set the given piece of data is assigned. If for a piece of data the key /// is not present or has an invalid value, that piece is ignored by the /// pipeline. #[prost(string, tag = "1")] pub key: std::string::String, } /// Assigns input data to training, validation, and test sets based on a /// provided timestamps. The youngest data pieces are assigned to training set, /// next to validation set, and the oldest to the test set. /// /// Supported only for tabular Datasets. #[derive(Clone, PartialEq, ::prost::Message)] pub struct TimestampSplit { /// The fraction of the input data that is to be used to train the Model. #[prost(double, tag = "1")] pub training_fraction: f64, /// The fraction of the input data that is to be used to validate the Model. #[prost(double, tag = "2")] pub validation_fraction: f64, /// The fraction of the input data that is to be used to evaluate the Model. #[prost(double, tag = "3")] pub test_fraction: f64, /// Required. The key is a name of one of the Dataset's data columns. /// The values of the key (the values in the column) must be in RFC 3339 /// `date-time` format, where `time-offset` = `"Z"` /// (e.g. 1985-04-12T23:20:50.52Z). If for a piece of data the key is not /// present or has an invalid value, that piece is ignored by the pipeline. #[prost(string, tag = "4")] pub key: std::string::String, } /// Request message for [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateDatasetRequest { /// Required. The resource name of the Location to create the Dataset in. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// Required. The Dataset to create. #[prost(message, optional, tag = "2")] pub dataset: ::std::option::Option<Dataset>, } /// Runtime operation information for [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateDatasetOperationMetadata { /// The operation generic information. #[prost(message, optional, tag = "1")] pub generic_metadata: ::std::option::Option<GenericOperationMetadata>, } /// Request message for [DatasetService.GetDataset][google.cloud.aiplatform.v1.DatasetService.GetDataset]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetDatasetRequest { /// Required. The name of the Dataset resource. #[prost(string, tag = "1")] pub name: std::string::String, /// Mask specifying which fields to read. #[prost(message, optional, tag = "2")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, } /// Request message for [DatasetService.UpdateDataset][google.cloud.aiplatform.v1.DatasetService.UpdateDataset]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateDatasetRequest { /// Required. The Dataset which replaces the resource on the server. #[prost(message, optional, tag = "1")] pub dataset: ::std::option::Option<Dataset>, /// Required. The update mask applies to the resource. /// For the `FieldMask` definition, see [google.protobuf.FieldMask][google.protobuf.FieldMask]. /// Updatable fields: /// /// * `display_name` /// * `description` /// * `labels` #[prost(message, optional, tag = "2")] pub update_mask: ::std::option::Option<::prost_types::FieldMask>, } /// Request message for [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListDatasetsRequest { /// Required. The name of the Dataset's parent resource. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// An expression for filtering the results of the request. For field names /// both snake_case and camelCase are supported. /// /// * `display_name`: supports = and != /// * `metadata_schema_uri`: supports = and != /// * `labels` supports general map functions that is: /// * `labels.key=value` - key:value equality /// * `labels.key:* or labels:key - key existence /// * A key including a space must be quoted. `labels."a key"`. /// /// Some examples: /// * `displayName="myDisplayName"` /// * `labels.myKey="myValue"` #[prost(string, tag = "2")] pub filter: std::string::String, /// The standard list page size. #[prost(int32, tag = "3")] pub page_size: i32, /// The standard list page token. #[prost(string, tag = "4")] pub page_token: std::string::String, /// Mask specifying which fields to read. #[prost(message, optional, tag = "5")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, /// A comma-separated list of fields to order by, sorted in ascending order. /// Use "desc" after a field name for descending. /// Supported fields: /// * `display_name` /// * `create_time` /// * `update_time` #[prost(string, tag = "6")] pub order_by: std::string::String, } /// Response message for [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListDatasetsResponse { /// A list of Datasets that matches the specified filter in the request. #[prost(message, repeated, tag = "1")] pub datasets: ::std::vec::Vec<Dataset>, /// The standard List next-page token. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } /// Request message for [DatasetService.DeleteDataset][google.cloud.aiplatform.v1.DatasetService.DeleteDataset]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteDatasetRequest { /// Required. The resource name of the Dataset to delete. /// Format: /// `projects/{project}/locations/{location}/datasets/{dataset}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImportDataRequest { /// Required. The name of the Dataset resource. /// Format: /// `projects/{project}/locations/{location}/datasets/{dataset}` #[prost(string, tag = "1")] pub name: std::string::String, /// Required. The desired input locations. The contents of all input locations will be /// imported in one batch. #[prost(message, repeated, tag = "2")] pub import_configs: ::std::vec::Vec<ImportDataConfig>, } /// Response message for [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImportDataResponse {} /// Runtime operation information for [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImportDataOperationMetadata { /// The common part of the operation metadata. #[prost(message, optional, tag = "1")] pub generic_metadata: ::std::option::Option<GenericOperationMetadata>, } /// Request message for [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportDataRequest { /// Required. The name of the Dataset resource. /// Format: /// `projects/{project}/locations/{location}/datasets/{dataset}` #[prost(string, tag = "1")] pub name: std::string::String, /// Required. The desired output location. #[prost(message, optional, tag = "2")] pub export_config: ::std::option::Option<ExportDataConfig>, } /// Response message for [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportDataResponse { /// All of the files that are exported in this export operation. #[prost(string, repeated, tag = "1")] pub exported_files: ::std::vec::Vec<std::string::String>, } /// Runtime operation information for [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportDataOperationMetadata { /// The common part of the operation metadata. #[prost(message, optional, tag = "1")] pub generic_metadata: ::std::option::Option<GenericOperationMetadata>, /// A Google Cloud Storage directory which path ends with '/'. The exported /// data is stored in the directory. #[prost(string, tag = "2")] pub gcs_output_directory: std::string::String, } /// Request message for [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListDataItemsRequest { /// Required. The resource name of the Dataset to list DataItems from. /// Format: /// `projects/{project}/locations/{location}/datasets/{dataset}` #[prost(string, tag = "1")] pub parent: std::string::String, /// The standard list filter. #[prost(string, tag = "2")] pub filter: std::string::String, /// The standard list page size. #[prost(int32, tag = "3")] pub page_size: i32, /// The standard list page token. #[prost(string, tag = "4")] pub page_token: std::string::String, /// Mask specifying which fields to read. #[prost(message, optional, tag = "5")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, /// A comma-separated list of fields to order by, sorted in ascending order. /// Use "desc" after a field name for descending. #[prost(string, tag = "6")] pub order_by: std::string::String, } /// Response message for [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListDataItemsResponse { /// A list of DataItems that matches the specified filter in the request. #[prost(message, repeated, tag = "1")] pub data_items: ::std::vec::Vec<DataItem>, /// The standard List next-page token. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } /// Request message for [DatasetService.GetAnnotationSpec][google.cloud.aiplatform.v1.DatasetService.GetAnnotationSpec]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetAnnotationSpecRequest { /// Required. The name of the AnnotationSpec resource. /// Format: /// `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` #[prost(string, tag = "1")] pub name: std::string::String, /// Mask specifying which fields to read. #[prost(message, optional, tag = "2")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, } /// Request message for [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListAnnotationsRequest { /// Required. The resource name of the DataItem to list Annotations from. /// Format: /// `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}` #[prost(string, tag = "1")] pub parent: std::string::String, /// The standard list filter. #[prost(string, tag = "2")] pub filter: std::string::String, /// The standard list page size. #[prost(int32, tag = "3")] pub page_size: i32, /// The standard list page token. #[prost(string, tag = "4")] pub page_token: std::string::String, /// Mask specifying which fields to read. #[prost(message, optional, tag = "5")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, /// A comma-separated list of fields to order by, sorted in ascending order. /// Use "desc" after a field name for descending. #[prost(string, tag = "6")] pub order_by: std::string::String, } /// Response message for [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListAnnotationsResponse { /// A list of Annotations that matches the specified filter in the request. #[prost(message, repeated, tag = "1")] pub annotations: ::std::vec::Vec<Annotation>, /// The standard List next-page token. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } #[doc = r" Generated client implementations."] pub mod dataset_service_client { #![allow(unused_variables, dead_code, missing_docs)] use tonic::codegen::*; pub struct DatasetServiceClient<T> { inner: tonic::client::Grpc<T>, } impl DatasetServiceClient<tonic::transport::Channel> { #[doc = r" Attempt to create a new client by connecting to a given endpoint."] pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> where D: std::convert::TryInto<tonic::transport::Endpoint>, D::Error: Into<StdError>, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl<T> DatasetServiceClient<T> where T: tonic::client::GrpcService<tonic::body::BoxBody>, T::ResponseBody: Body + HttpBody + Send + 'static, T::Error: Into<StdError>, <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self { let inner = tonic::client::Grpc::with_interceptor(inner, interceptor); Self { inner } } #[doc = " Creates a Dataset."] pub async fn create_dataset( &mut self, request: impl tonic::IntoRequest<super::CreateDatasetRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.DatasetService/CreateDataset", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Gets a Dataset."] pub async fn get_dataset( &mut self, request: impl tonic::IntoRequest<super::GetDatasetRequest>, ) -> Result<tonic::Response<super::Dataset>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.DatasetService/GetDataset", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Updates a Dataset."] pub async fn update_dataset( &mut self, request: impl tonic::IntoRequest<super::UpdateDatasetRequest>, ) -> Result<tonic::Response<super::Dataset>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.DatasetService/UpdateDataset", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Lists Datasets in a Location."] pub async fn list_datasets( &mut self, request: impl tonic::IntoRequest<super::ListDatasetsRequest>, ) -> Result<tonic::Response<super::ListDatasetsResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.DatasetService/ListDatasets", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Deletes a Dataset."] pub async fn delete_dataset( &mut self, request: impl tonic::IntoRequest<super::DeleteDatasetRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.DatasetService/DeleteDataset", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Imports data into a Dataset."] pub async fn import_data( &mut self, request: impl tonic::IntoRequest<super::ImportDataRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.DatasetService/ImportData", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Exports data from a Dataset."] pub async fn export_data( &mut self, request: impl tonic::IntoRequest<super::ExportDataRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.DatasetService/ExportData", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Lists DataItems in a Dataset."] pub async fn list_data_items( &mut self, request: impl tonic::IntoRequest<super::ListDataItemsRequest>, ) -> Result<tonic::Response<super::ListDataItemsResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.DatasetService/ListDataItems", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Gets an AnnotationSpec."] pub async fn get_annotation_spec( &mut self, request: impl tonic::IntoRequest<super::GetAnnotationSpecRequest>, ) -> Result<tonic::Response<super::AnnotationSpec>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.DatasetService/GetAnnotationSpec", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Lists Annotations belongs to a dataitem"] pub async fn list_annotations( &mut self, request: impl tonic::IntoRequest<super::ListAnnotationsRequest>, ) -> Result<tonic::Response<super::ListAnnotationsResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.DatasetService/ListAnnotations", ); self.inner.unary(request.into_request(), path, codec).await } } impl<T: Clone> Clone for DatasetServiceClient<T> { fn clone(&self) -> Self { Self { inner: self.inner.clone(), } } } impl<T> std::fmt::Debug for DatasetServiceClient<T> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "DatasetServiceClient {{ ... }}") } } } /// Models are deployed into it, and afterwards Endpoint is called to obtain /// predictions and explanations. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Endpoint { /// Output only. The resource name of the Endpoint. #[prost(string, tag = "1")] pub name: std::string::String, /// Required. The display name of the Endpoint. /// The name can be up to 128 characters long and can be consist of any UTF-8 /// characters. #[prost(string, tag = "2")] pub display_name: std::string::String, /// The description of the Endpoint. #[prost(string, tag = "3")] pub description: std::string::String, /// Output only. The models deployed in this Endpoint. /// To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and /// [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively. #[prost(message, repeated, tag = "4")] pub deployed_models: ::std::vec::Vec<DeployedModel>, /// A map from a DeployedModel's ID to the percentage of this Endpoint's /// traffic that should be forwarded to that DeployedModel. /// /// If a DeployedModel's ID is not listed in this map, then it receives no /// traffic. /// /// The traffic percentage values must add up to 100, or map must be empty if /// the Endpoint is to not accept any traffic at a moment. #[prost(map = "string, int32", tag = "5")] pub traffic_split: ::std::collections::HashMap<std::string::String, i32>, /// Used to perform consistent read-modify-write updates. If not set, a blind /// "overwrite" update happens. #[prost(string, tag = "6")] pub etag: std::string::String, /// The labels with user-defined metadata to organize your Endpoints. /// /// Label keys and values can be no longer than 64 characters /// (Unicode codepoints), can only contain lowercase letters, numeric /// characters, underscores and dashes. International characters are allowed. /// /// See https://goo.gl/xmQnxf for more information and examples of labels. #[prost(map = "string, string", tag = "7")] pub labels: ::std::collections::HashMap<std::string::String, std::string::String>, /// Output only. Timestamp when this Endpoint was created. #[prost(message, optional, tag = "8")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Timestamp when this Endpoint was last updated. #[prost(message, optional, tag = "9")] pub update_time: ::std::option::Option<::prost_types::Timestamp>, /// Customer-managed encryption key spec for an Endpoint. If set, this /// Endpoint and all sub-resources of this Endpoint will be secured by /// this key. #[prost(message, optional, tag = "10")] pub encryption_spec: ::std::option::Option<EncryptionSpec>, } /// A deployment of a Model. Endpoints contain one or more DeployedModels. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeployedModel { /// Output only. The ID of the DeployedModel. #[prost(string, tag = "1")] pub id: std::string::String, /// Required. The name of the Model that this is the deployment of. Note that the Model /// may be in a different location than the DeployedModel's Endpoint. #[prost(string, tag = "2")] pub model: std::string::String, /// The display name of the DeployedModel. If not provided upon creation, /// the Model's display_name is used. #[prost(string, tag = "3")] pub display_name: std::string::String, /// Output only. Timestamp when the DeployedModel was created. #[prost(message, optional, tag = "6")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// The service account that the DeployedModel's container runs as. Specify the /// email address of the service account. If this service account is not /// specified, the container runs as a service account that doesn't have access /// to the resource project. /// /// Users deploying the Model must have the `iam.serviceAccounts.actAs` /// permission on this service account. #[prost(string, tag = "11")] pub service_account: std::string::String, /// For custom-trained Models and AutoML Tabular Models, the container of the /// DeployedModel instances will send `stderr` and `stdout` streams to /// Stackdriver Logging by default. Please note that the logs incur cost, /// which are subject to [Cloud Logging /// pricing](https://cloud.google.com/stackdriver/pricing). /// /// User can disable container logging by setting this flag to true. #[prost(bool, tag = "15")] pub disable_container_logging: bool, /// These logs are like standard server access logs, containing /// information like timestamp and latency for each prediction request. /// /// Note that Stackdriver logs may incur a cost, especially if your project /// receives prediction requests at a high queries per second rate (QPS). /// Estimate your costs before enabling this option. #[prost(bool, tag = "13")] pub enable_access_logging: bool, /// The prediction (for example, the machine) resources that the DeployedModel /// uses. The user is billed for the resources (at least their minimal amount) /// even if the DeployedModel receives no traffic. /// Not all Models support all resources types. See /// [Model.supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]. #[prost(oneof = "deployed_model::PredictionResources", tags = "7, 8")] pub prediction_resources: ::std::option::Option<deployed_model::PredictionResources>, } pub mod deployed_model { /// The prediction (for example, the machine) resources that the DeployedModel /// uses. The user is billed for the resources (at least their minimal amount) /// even if the DeployedModel receives no traffic. /// Not all Models support all resources types. See /// [Model.supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types]. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum PredictionResources { /// A description of resources that are dedicated to the DeployedModel, and /// that need a higher degree of manual configuration. #[prost(message, tag = "7")] DedicatedResources(super::DedicatedResources), /// A description of resources that to large degree are decided by AI /// Platform, and require only a modest additional configuration. #[prost(message, tag = "8")] AutomaticResources(super::AutomaticResources), } } /// Request message for [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateEndpointRequest { /// Required. The resource name of the Location to create the Endpoint in. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// Required. The Endpoint to create. #[prost(message, optional, tag = "2")] pub endpoint: ::std::option::Option<Endpoint>, } /// Runtime operation information for [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateEndpointOperationMetadata { /// The operation generic information. #[prost(message, optional, tag = "1")] pub generic_metadata: ::std::option::Option<GenericOperationMetadata>, } /// Request message for [EndpointService.GetEndpoint][google.cloud.aiplatform.v1.EndpointService.GetEndpoint] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetEndpointRequest { /// Required. The name of the Endpoint resource. /// Format: /// `projects/{project}/locations/{location}/endpoints/{endpoint}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListEndpointsRequest { /// Required. The resource name of the Location from which to list the Endpoints. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// Optional. An expression for filtering the results of the request. For field names /// both snake_case and camelCase are supported. /// /// * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, /// i.e. the last segment of the Endpoint's [resource name][google.cloud.aiplatform.v1.Endpoint.name]. /// * `display_name` supports = and, != /// * `labels` supports general map functions that is: /// * `labels.key=value` - key:value equality /// * `labels.key:* or labels:key - key existence /// * A key including a space must be quoted. `labels."a key"`. /// /// Some examples: /// * `endpoint=1` /// * `displayName="myDisplayName"` /// * `labels.myKey="myValue"` #[prost(string, tag = "2")] pub filter: std::string::String, /// Optional. The standard list page size. #[prost(int32, tag = "3")] pub page_size: i32, /// Optional. The standard list page token. /// Typically obtained via /// [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListEndpointsResponse.next_page_token] of the previous /// [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints] call. #[prost(string, tag = "4")] pub page_token: std::string::String, /// Optional. Mask specifying which fields to read. #[prost(message, optional, tag = "5")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, /// A comma-separated list of fields to order by, sorted in ascending order. /// Use "desc" after a field name for descending. /// Supported fields: /// * `display_name` /// * `create_time` /// * `update_time` /// /// Example: `display_name, create_time desc`. #[prost(string, tag = "6")] pub order_by: std::string::String, } /// Response message for [EndpointService.ListEndpoints][google.cloud.aiplatform.v1.EndpointService.ListEndpoints]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListEndpointsResponse { /// List of Endpoints in the requested page. #[prost(message, repeated, tag = "1")] pub endpoints: ::std::vec::Vec<Endpoint>, /// A token to retrieve the next page of results. /// Pass to [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListEndpointsRequest.page_token] to obtain that page. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } /// Request message for [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateEndpointRequest { /// Required. The Endpoint which replaces the resource on the server. #[prost(message, optional, tag = "1")] pub endpoint: ::std::option::Option<Endpoint>, /// Required. The update mask applies to the resource. See [google.protobuf.FieldMask][google.protobuf.FieldMask]. #[prost(message, optional, tag = "2")] pub update_mask: ::std::option::Option<::prost_types::FieldMask>, } /// Request message for [EndpointService.DeleteEndpoint][google.cloud.aiplatform.v1.EndpointService.DeleteEndpoint]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteEndpointRequest { /// Required. The name of the Endpoint resource to be deleted. /// Format: /// `projects/{project}/locations/{location}/endpoints/{endpoint}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeployModelRequest { /// Required. The name of the Endpoint resource into which to deploy a Model. /// Format: /// `projects/{project}/locations/{location}/endpoints/{endpoint}` #[prost(string, tag = "1")] pub endpoint: std::string::String, /// Required. The DeployedModel to be created within the Endpoint. Note that /// [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated for the DeployedModel to start /// receiving traffic, either as part of this call, or via /// [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint]. #[prost(message, optional, tag = "2")] pub deployed_model: ::std::option::Option<DeployedModel>, /// A map from a DeployedModel's ID to the percentage of this Endpoint's /// traffic that should be forwarded to that DeployedModel. /// /// If this field is non-empty, then the Endpoint's /// [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. /// To refer to the ID of the just being deployed Model, a "0" should be used, /// and the actual ID of the new DeployedModel will be filled in its place by /// this method. The traffic percentage values must add up to 100. /// /// If this field is empty, then the Endpoint's /// [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated. #[prost(map = "string, int32", tag = "3")] pub traffic_split: ::std::collections::HashMap<std::string::String, i32>, } /// Response message for [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeployModelResponse { /// The DeployedModel that had been deployed in the Endpoint. #[prost(message, optional, tag = "1")] pub deployed_model: ::std::option::Option<DeployedModel>, } /// Runtime operation information for [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeployModelOperationMetadata { /// The operation generic information. #[prost(message, optional, tag = "1")] pub generic_metadata: ::std::option::Option<GenericOperationMetadata>, } /// Request message for [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UndeployModelRequest { /// Required. The name of the Endpoint resource from which to undeploy a Model. /// Format: /// `projects/{project}/locations/{location}/endpoints/{endpoint}` #[prost(string, tag = "1")] pub endpoint: std::string::String, /// Required. The ID of the DeployedModel to be undeployed from the Endpoint. #[prost(string, tag = "2")] pub deployed_model_id: std::string::String, /// If this field is provided, then the Endpoint's /// [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with it. If /// last DeployedModel is being undeployed from the Endpoint, the /// [Endpoint.traffic_split] will always end up empty when this call returns. /// A DeployedModel will be successfully undeployed only if it doesn't have /// any traffic assigned to it when this method executes, or if this field /// unassigns any traffic to it. #[prost(map = "string, int32", tag = "3")] pub traffic_split: ::std::collections::HashMap<std::string::String, i32>, } /// Response message for [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UndeployModelResponse {} /// Runtime operation information for [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UndeployModelOperationMetadata { /// The operation generic information. #[prost(message, optional, tag = "1")] pub generic_metadata: ::std::option::Option<GenericOperationMetadata>, } #[doc = r" Generated client implementations."] pub mod endpoint_service_client { #![allow(unused_variables, dead_code, missing_docs)] use tonic::codegen::*; pub struct EndpointServiceClient<T> { inner: tonic::client::Grpc<T>, } impl EndpointServiceClient<tonic::transport::Channel> { #[doc = r" Attempt to create a new client by connecting to a given endpoint."] pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> where D: std::convert::TryInto<tonic::transport::Endpoint>, D::Error: Into<StdError>, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl<T> EndpointServiceClient<T> where T: tonic::client::GrpcService<tonic::body::BoxBody>, T::ResponseBody: Body + HttpBody + Send + 'static, T::Error: Into<StdError>, <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self { let inner = tonic::client::Grpc::with_interceptor(inner, interceptor); Self { inner } } #[doc = " Creates an Endpoint."] pub async fn create_endpoint( &mut self, request: impl tonic::IntoRequest<super::CreateEndpointRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.EndpointService/CreateEndpoint", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Gets an Endpoint."] pub async fn get_endpoint( &mut self, request: impl tonic::IntoRequest<super::GetEndpointRequest>, ) -> Result<tonic::Response<super::Endpoint>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.EndpointService/GetEndpoint", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Lists Endpoints in a Location."] pub async fn list_endpoints( &mut self, request: impl tonic::IntoRequest<super::ListEndpointsRequest>, ) -> Result<tonic::Response<super::ListEndpointsResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.EndpointService/ListEndpoints", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Updates an Endpoint."] pub async fn update_endpoint( &mut self, request: impl tonic::IntoRequest<super::UpdateEndpointRequest>, ) -> Result<tonic::Response<super::Endpoint>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.EndpointService/UpdateEndpoint", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Deletes an Endpoint."] pub async fn delete_endpoint( &mut self, request: impl tonic::IntoRequest<super::DeleteEndpointRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.EndpointService/DeleteEndpoint", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Deploys a Model into this Endpoint, creating a DeployedModel within it."] pub async fn deploy_model( &mut self, request: impl tonic::IntoRequest<super::DeployModelRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.EndpointService/DeployModel", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Undeploys a Model from an Endpoint, removing a DeployedModel from it, and"] #[doc = " freeing all resources it's using."] pub async fn undeploy_model( &mut self, request: impl tonic::IntoRequest<super::UndeployModelRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.EndpointService/UndeployModel", ); self.inner.unary(request.into_request(), path, codec).await } } impl<T: Clone> Clone for EndpointServiceClient<T> { fn clone(&self) -> Self { Self { inner: self.inner.clone(), } } } impl<T> std::fmt::Debug for EndpointServiceClient<T> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "EndpointServiceClient {{ ... }}") } } } /// A message representing a Trial. A Trial contains a unique set of Parameters /// that has been or will be evaluated, along with the objective metrics got by /// running the Trial. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Trial { /// Output only. The identifier of the Trial assigned by the service. #[prost(string, tag = "2")] pub id: std::string::String, /// Output only. The detailed state of the Trial. #[prost(enumeration = "trial::State", tag = "3")] pub state: i32, /// Output only. The parameters of the Trial. #[prost(message, repeated, tag = "4")] pub parameters: ::std::vec::Vec<trial::Parameter>, /// Output only. The final measurement containing the objective value. #[prost(message, optional, tag = "5")] pub final_measurement: ::std::option::Option<Measurement>, /// Output only. Time when the Trial was started. #[prost(message, optional, tag = "7")] pub start_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`. #[prost(message, optional, tag = "8")] pub end_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. The CustomJob name linked to the Trial. /// It's set for a HyperparameterTuningJob's Trial. #[prost(string, tag = "11")] pub custom_job: std::string::String, } pub mod trial { /// A message representing a parameter to be tuned. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Parameter { /// Output only. The ID of the parameter. The parameter should be defined in /// [StudySpec's Parameters][google.cloud.aiplatform.v1.StudySpec.parameters]. #[prost(string, tag = "1")] pub parameter_id: std::string::String, /// Output only. The value of the parameter. /// `number_value` will be set if a parameter defined in StudySpec is /// in type 'INTEGER', 'DOUBLE' or 'DISCRETE'. /// `string_value` will be set if a parameter defined in StudySpec is /// in type 'CATEGORICAL'. #[prost(message, optional, tag = "2")] pub value: ::std::option::Option<::prost_types::Value>, } /// Describes a Trial state. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum State { /// The Trial state is unspecified. Unspecified = 0, /// Indicates that a specific Trial has been requested, but it has not yet /// been suggested by the service. Requested = 1, /// Indicates that the Trial has been suggested. Active = 2, /// Indicates that the Trial should stop according to the service. Stopping = 3, /// Indicates that the Trial is completed successfully. Succeeded = 4, /// Indicates that the Trial should not be attempted again. /// The service will set a Trial to INFEASIBLE when it's done but missing /// the final_measurement. Infeasible = 5, } } /// Represents specification of a Study. #[derive(Clone, PartialEq, ::prost::Message)] pub struct StudySpec { /// Required. Metric specs for the Study. #[prost(message, repeated, tag = "1")] pub metrics: ::std::vec::Vec<study_spec::MetricSpec>, /// Required. The set of parameters to tune. #[prost(message, repeated, tag = "2")] pub parameters: ::std::vec::Vec<study_spec::ParameterSpec>, /// The search algorithm specified for the Study. #[prost(enumeration = "study_spec::Algorithm", tag = "3")] pub algorithm: i32, /// The observation noise level of the study. /// Currently only supported by the Vizier service. Not supported by /// HyperparamterTuningJob or TrainingPipeline. #[prost(enumeration = "study_spec::ObservationNoise", tag = "6")] pub observation_noise: i32, /// Describe which measurement selection type will be used #[prost(enumeration = "study_spec::MeasurementSelectionType", tag = "7")] pub measurement_selection_type: i32, } pub mod study_spec { /// Represents a metric to optimize. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MetricSpec { /// Required. The ID of the metric. Must not contain whitespaces and must be unique /// amongst all MetricSpecs. #[prost(string, tag = "1")] pub metric_id: std::string::String, /// Required. The optimization goal of the metric. #[prost(enumeration = "metric_spec::GoalType", tag = "2")] pub goal: i32, } pub mod metric_spec { /// The available types of optimization goals. #[derive( Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration, )] #[repr(i32)] pub enum GoalType { /// Goal Type will default to maximize. Unspecified = 0, /// Maximize the goal metric. Maximize = 1, /// Minimize the goal metric. Minimize = 2, } } /// Represents a single parameter to optimize. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParameterSpec { /// Required. The ID of the parameter. Must not contain whitespaces and must be unique /// amongst all ParameterSpecs. #[prost(string, tag = "1")] pub parameter_id: std::string::String, /// How the parameter should be scaled. /// Leave unset for `CATEGORICAL` parameters. #[prost(enumeration = "parameter_spec::ScaleType", tag = "6")] pub scale_type: i32, /// A conditional parameter node is active if the parameter's value matches /// the conditional node's parent_value_condition. /// /// If two items in conditional_parameter_specs have the same name, they /// must have disjoint parent_value_condition. #[prost(message, repeated, tag = "10")] pub conditional_parameter_specs: ::std::vec::Vec<parameter_spec::ConditionalParameterSpec>, #[prost(oneof = "parameter_spec::ParameterValueSpec", tags = "2, 3, 4, 5")] pub parameter_value_spec: ::std::option::Option<parameter_spec::ParameterValueSpec>, } pub mod parameter_spec { /// Value specification for a parameter in `DOUBLE` type. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DoubleValueSpec { /// Required. Inclusive minimum value of the parameter. #[prost(double, tag = "1")] pub min_value: f64, /// Required. Inclusive maximum value of the parameter. #[prost(double, tag = "2")] pub max_value: f64, } /// Value specification for a parameter in `INTEGER` type. #[derive(Clone, PartialEq, ::prost::Message)] pub struct IntegerValueSpec { /// Required. Inclusive minimum value of the parameter. #[prost(int64, tag = "1")] pub min_value: i64, /// Required. Inclusive maximum value of the parameter. #[prost(int64, tag = "2")] pub max_value: i64, } /// Value specification for a parameter in `CATEGORICAL` type. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CategoricalValueSpec { /// Required. The list of possible categories. #[prost(string, repeated, tag = "1")] pub values: ::std::vec::Vec<std::string::String>, } /// Value specification for a parameter in `DISCRETE` type. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DiscreteValueSpec { /// Required. A list of possible values. /// The list should be in increasing order and at least 1e-10 apart. /// For instance, this parameter might have possible settings of 1.5, 2.5, /// and 4.0. This list should not contain more than 1,000 values. #[prost(double, repeated, packed = "false", tag = "1")] pub values: ::std::vec::Vec<f64>, } /// Represents a parameter spec with condition from its parent parameter. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConditionalParameterSpec { /// Required. The spec for a conditional parameter. #[prost(message, optional, tag = "1")] pub parameter_spec: ::std::option::Option<super::ParameterSpec>, /// A set of parameter values from the parent ParameterSpec's feasible /// space. #[prost( oneof = "conditional_parameter_spec::ParentValueCondition", tags = "2, 3, 4" )] pub parent_value_condition: ::std::option::Option<conditional_parameter_spec::ParentValueCondition>, } pub mod conditional_parameter_spec { /// Represents the spec to match discrete values from parent parameter. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DiscreteValueCondition { /// Required. Matches values of the parent parameter of 'DISCRETE' type. /// All values must exist in `discrete_value_spec` of parent parameter. /// /// The Epsilon of the value matching is 1e-10. #[prost(double, repeated, packed = "false", tag = "1")] pub values: ::std::vec::Vec<f64>, } /// Represents the spec to match integer values from parent parameter. #[derive(Clone, PartialEq, ::prost::Message)] pub struct IntValueCondition { /// Required. Matches values of the parent parameter of 'INTEGER' type. /// All values must lie in `integer_value_spec` of parent parameter. #[prost(int64, repeated, packed = "false", tag = "1")] pub values: ::std::vec::Vec<i64>, } /// Represents the spec to match categorical values from parent parameter. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CategoricalValueCondition { /// Required. Matches values of the parent parameter of 'CATEGORICAL' type. /// All values must exist in `categorical_value_spec` of parent /// parameter. #[prost(string, repeated, tag = "1")] pub values: ::std::vec::Vec<std::string::String>, } /// A set of parameter values from the parent ParameterSpec's feasible /// space. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum ParentValueCondition { /// The spec for matching values from a parent parameter of /// `DISCRETE` type. #[prost(message, tag = "2")] ParentDiscreteValues(DiscreteValueCondition), /// The spec for matching values from a parent parameter of `INTEGER` /// type. #[prost(message, tag = "3")] ParentIntValues(IntValueCondition), /// The spec for matching values from a parent parameter of /// `CATEGORICAL` type. #[prost(message, tag = "4")] ParentCategoricalValues(CategoricalValueCondition), } } /// The type of scaling that should be applied to this parameter. #[derive( Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration, )] #[repr(i32)] pub enum ScaleType { /// By default, no scaling is applied. Unspecified = 0, /// Scales the feasible space to (0, 1) linearly. UnitLinearScale = 1, /// Scales the feasible space logarithmically to (0, 1). The entire /// feasible space must be strictly positive. UnitLogScale = 2, /// Scales the feasible space "reverse" logarithmically to (0, 1). The /// result is that values close to the top of the feasible space are spread /// out more than points near the bottom. The entire feasible space must be /// strictly positive. UnitReverseLogScale = 3, } #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum ParameterValueSpec { /// The value spec for a 'DOUBLE' parameter. #[prost(message, tag = "2")] DoubleValueSpec(DoubleValueSpec), /// The value spec for an 'INTEGER' parameter. #[prost(message, tag = "3")] IntegerValueSpec(IntegerValueSpec), /// The value spec for a 'CATEGORICAL' parameter. #[prost(message, tag = "4")] CategoricalValueSpec(CategoricalValueSpec), /// The value spec for a 'DISCRETE' parameter. #[prost(message, tag = "5")] DiscreteValueSpec(DiscreteValueSpec), } } /// The available search algorithms for the Study. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum Algorithm { /// The default algorithm used by Vertex AI for [hyperparameter /// tuning](https://cloud.google.com/vertex-ai/docs/training/hyperparameter-tuning-overview) /// and [Vertex Vizier](https://cloud.google.com/vertex-ai/docs/vizier). Unspecified = 0, /// Simple grid search within the feasible space. To use grid search, /// all parameters must be `INTEGER`, `CATEGORICAL`, or `DISCRETE`. GridSearch = 2, /// Simple random search within the feasible space. RandomSearch = 3, } /// Describes the noise level of the repeated observations. /// /// "Noisy" means that the repeated observations with the same Trial parameters /// may lead to different metric evaluations. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ObservationNoise { /// The default noise level chosen by Vertex AI. Unspecified = 0, /// Vertex AI assumes that the objective function is (nearly) /// perfectly reproducible, and will never repeat the same Trial /// parameters. Low = 1, /// Vertex AI will estimate the amount of noise in metric /// evaluations, it may repeat the same Trial parameters more than once. High = 2, } /// This indicates which measurement to use if/when the service automatically /// selects the final measurement from previously reported intermediate /// measurements. Choose this based on two considerations: /// A) Do you expect your measurements to monotonically improve? /// If so, choose LAST_MEASUREMENT. On the other hand, if you're in a /// situation where your system can "over-train" and you expect the /// performance to get better for a while but then start declining, /// choose BEST_MEASUREMENT. /// B) Are your measurements significantly noisy and/or irreproducible? /// If so, BEST_MEASUREMENT will tend to be over-optimistic, and it /// may be better to choose LAST_MEASUREMENT. /// If both or neither of (A) and (B) apply, it doesn't matter which /// selection type is chosen. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum MeasurementSelectionType { /// Will be treated as LAST_MEASUREMENT. Unspecified = 0, /// Use the last measurement reported. LastMeasurement = 1, /// Use the best measurement reported. BestMeasurement = 2, } } /// A message representing a Measurement of a Trial. A Measurement contains /// the Metrics got by executing a Trial using suggested hyperparameter /// values. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Measurement { /// Output only. The number of steps the machine learning model has been trained for. /// Must be non-negative. #[prost(int64, tag = "2")] pub step_count: i64, /// Output only. A list of metrics got by evaluating the objective functions using suggested /// Parameter values. #[prost(message, repeated, tag = "3")] pub metrics: ::std::vec::Vec<measurement::Metric>, } pub mod measurement { /// A message representing a metric in the measurement. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Metric { /// Output only. The ID of the Metric. The Metric should be defined in /// [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics]. #[prost(string, tag = "1")] pub metric_id: std::string::String, /// Output only. The value for this metric. #[prost(double, tag = "2")] pub value: f64, } } /// Represents a HyperparameterTuningJob. A HyperparameterTuningJob /// has a Study specification and multiple CustomJobs with identical /// CustomJob specification. #[derive(Clone, PartialEq, ::prost::Message)] pub struct HyperparameterTuningJob { /// Output only. Resource name of the HyperparameterTuningJob. #[prost(string, tag = "1")] pub name: std::string::String, /// Required. The display name of the HyperparameterTuningJob. /// The name can be up to 128 characters long and can be consist of any UTF-8 /// characters. #[prost(string, tag = "2")] pub display_name: std::string::String, /// Required. Study configuration of the HyperparameterTuningJob. #[prost(message, optional, tag = "4")] pub study_spec: ::std::option::Option<StudySpec>, /// Required. The desired total number of Trials. #[prost(int32, tag = "5")] pub max_trial_count: i32, /// Required. The desired number of Trials to run in parallel. #[prost(int32, tag = "6")] pub parallel_trial_count: i32, /// The number of failed Trials that need to be seen before failing /// the HyperparameterTuningJob. /// /// If set to 0, Vertex AI decides how many Trials must fail /// before the whole job fails. #[prost(int32, tag = "7")] pub max_failed_trial_count: i32, /// Required. The spec of a trial job. The same spec applies to the CustomJobs created /// in all the trials. #[prost(message, optional, tag = "8")] pub trial_job_spec: ::std::option::Option<CustomJobSpec>, /// Output only. Trials of the HyperparameterTuningJob. #[prost(message, repeated, tag = "9")] pub trials: ::std::vec::Vec<Trial>, /// Output only. The detailed state of the job. #[prost(enumeration = "JobState", tag = "10")] pub state: i32, /// Output only. Time when the HyperparameterTuningJob was created. #[prost(message, optional, tag = "11")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the HyperparameterTuningJob for the first time entered the /// `JOB_STATE_RUNNING` state. #[prost(message, optional, tag = "12")] pub start_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the HyperparameterTuningJob entered any of the following states: /// `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. #[prost(message, optional, tag = "13")] pub end_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Time when the HyperparameterTuningJob was most recently updated. #[prost(message, optional, tag = "14")] pub update_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Only populated when job's state is JOB_STATE_FAILED or /// JOB_STATE_CANCELLED. #[prost(message, optional, tag = "15")] pub error: ::std::option::Option<super::super::super::rpc::Status>, /// The labels with user-defined metadata to organize HyperparameterTuningJobs. /// /// Label keys and values can be no longer than 64 characters /// (Unicode codepoints), can only contain lowercase letters, numeric /// characters, underscores and dashes. International characters are allowed. /// /// See https://goo.gl/xmQnxf for more information and examples of labels. #[prost(map = "string, string", tag = "16")] pub labels: ::std::collections::HashMap<std::string::String, std::string::String>, /// Customer-managed encryption key options for a HyperparameterTuningJob. /// If this is set, then all resources created by the HyperparameterTuningJob /// will be encrypted with the provided encryption key. #[prost(message, optional, tag = "17")] pub encryption_spec: ::std::option::Option<EncryptionSpec>, } /// Request message for [JobService.CreateCustomJob][google.cloud.aiplatform.v1.JobService.CreateCustomJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateCustomJobRequest { /// Required. The resource name of the Location to create the CustomJob in. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// Required. The CustomJob to create. #[prost(message, optional, tag = "2")] pub custom_job: ::std::option::Option<CustomJob>, } /// Request message for [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetCustomJobRequest { /// Required. The name of the CustomJob resource. /// Format: /// `projects/{project}/locations/{location}/customJobs/{custom_job}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListCustomJobsRequest { /// Required. The resource name of the Location to list the CustomJobs from. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// The standard list filter. /// /// Supported fields: /// /// * `display_name` supports = and !=. /// /// * `state` supports = and !=. /// /// Some examples of using the filter are: /// /// * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"` /// /// * `state="JOB_STATE_RUNNING" OR display_name="my_job"` /// /// * `NOT display_name="my_job"` /// /// * `state="JOB_STATE_FAILED"` #[prost(string, tag = "2")] pub filter: std::string::String, /// The standard list page size. #[prost(int32, tag = "3")] pub page_size: i32, /// The standard list page token. /// Typically obtained via /// [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token] of the previous /// [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] call. #[prost(string, tag = "4")] pub page_token: std::string::String, /// Mask specifying which fields to read. #[prost(message, optional, tag = "5")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, } /// Response message for [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListCustomJobsResponse { /// List of CustomJobs in the requested page. #[prost(message, repeated, tag = "1")] pub custom_jobs: ::std::vec::Vec<CustomJob>, /// A token to retrieve the next page of results. /// Pass to [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token] to obtain that page. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } /// Request message for [JobService.DeleteCustomJob][google.cloud.aiplatform.v1.JobService.DeleteCustomJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteCustomJobRequest { /// Required. The name of the CustomJob resource to be deleted. /// Format: /// `projects/{project}/locations/{location}/customJobs/{custom_job}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [JobService.CancelCustomJob][google.cloud.aiplatform.v1.JobService.CancelCustomJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CancelCustomJobRequest { /// Required. The name of the CustomJob to cancel. /// Format: /// `projects/{project}/locations/{location}/customJobs/{custom_job}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [JobService.CreateDataLabelingJob][google.cloud.aiplatform.v1.JobService.CreateDataLabelingJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateDataLabelingJobRequest { /// Required. The parent of the DataLabelingJob. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// Required. The DataLabelingJob to create. #[prost(message, optional, tag = "2")] pub data_labeling_job: ::std::option::Option<DataLabelingJob>, } /// Request message for [JobService.GetDataLabelingJob][google.cloud.aiplatform.v1.JobService.GetDataLabelingJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetDataLabelingJobRequest { /// Required. The name of the DataLabelingJob. /// Format: /// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListDataLabelingJobsRequest { /// Required. The parent of the DataLabelingJob. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// The standard list filter. /// /// Supported fields: /// /// * `display_name` supports = and !=. /// /// * `state` supports = and !=. /// /// Some examples of using the filter are: /// /// * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"` /// /// * `state="JOB_STATE_RUNNING" OR display_name="my_job"` /// /// * `NOT display_name="my_job"` /// /// * `state="JOB_STATE_FAILED"` #[prost(string, tag = "2")] pub filter: std::string::String, /// The standard list page size. #[prost(int32, tag = "3")] pub page_size: i32, /// The standard list page token. #[prost(string, tag = "4")] pub page_token: std::string::String, /// Mask specifying which fields to read. FieldMask represents a set of /// symbolic field paths. For example, the mask can be `paths: "name"`. The /// "name" here is a field in DataLabelingJob. /// If this field is not set, all fields of the DataLabelingJob are returned. #[prost(message, optional, tag = "5")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, /// A comma-separated list of fields to order by, sorted in ascending order by /// default. /// Use `desc` after a field name for descending. #[prost(string, tag = "6")] pub order_by: std::string::String, } /// Response message for [JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListDataLabelingJobsResponse { /// A list of DataLabelingJobs that matches the specified filter in the /// request. #[prost(message, repeated, tag = "1")] pub data_labeling_jobs: ::std::vec::Vec<DataLabelingJob>, /// The standard List next-page token. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } /// Request message for [JobService.DeleteDataLabelingJob][google.cloud.aiplatform.v1.JobService.DeleteDataLabelingJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteDataLabelingJobRequest { /// Required. The name of the DataLabelingJob to be deleted. /// Format: /// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [JobService.CancelDataLabelingJob][google.cloud.aiplatform.v1.JobService.CancelDataLabelingJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CancelDataLabelingJobRequest { /// Required. The name of the DataLabelingJob. /// Format: /// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [JobService.CreateHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CreateHyperparameterTuningJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateHyperparameterTuningJobRequest { /// Required. The resource name of the Location to create the HyperparameterTuningJob in. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// Required. The HyperparameterTuningJob to create. #[prost(message, optional, tag = "2")] pub hyperparameter_tuning_job: ::std::option::Option<HyperparameterTuningJob>, } /// Request message for [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetHyperparameterTuningJobRequest { /// Required. The name of the HyperparameterTuningJob resource. /// Format: /// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListHyperparameterTuningJobsRequest { /// Required. The resource name of the Location to list the HyperparameterTuningJobs /// from. Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// The standard list filter. /// /// Supported fields: /// /// * `display_name` supports = and !=. /// /// * `state` supports = and !=. /// /// Some examples of using the filter are: /// /// * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"` /// /// * `state="JOB_STATE_RUNNING" OR display_name="my_job"` /// /// * `NOT display_name="my_job"` /// /// * `state="JOB_STATE_FAILED"` #[prost(string, tag = "2")] pub filter: std::string::String, /// The standard list page size. #[prost(int32, tag = "3")] pub page_size: i32, /// The standard list page token. /// Typically obtained via /// [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token] of the previous /// [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] call. #[prost(string, tag = "4")] pub page_token: std::string::String, /// Mask specifying which fields to read. #[prost(message, optional, tag = "5")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, } /// Response message for [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListHyperparameterTuningJobsResponse { /// List of HyperparameterTuningJobs in the requested page. /// [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] of the jobs will be not be returned. #[prost(message, repeated, tag = "1")] pub hyperparameter_tuning_jobs: ::std::vec::Vec<HyperparameterTuningJob>, /// A token to retrieve the next page of results. /// Pass to [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token] to obtain that /// page. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } /// Request message for [JobService.DeleteHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.DeleteHyperparameterTuningJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteHyperparameterTuningJobRequest { /// Required. The name of the HyperparameterTuningJob resource to be deleted. /// Format: /// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [JobService.CancelHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CancelHyperparameterTuningJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CancelHyperparameterTuningJobRequest { /// Required. The name of the HyperparameterTuningJob to cancel. /// Format: /// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [JobService.CreateBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CreateBatchPredictionJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateBatchPredictionJobRequest { /// Required. The resource name of the Location to create the BatchPredictionJob in. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// Required. The BatchPredictionJob to create. #[prost(message, optional, tag = "2")] pub batch_prediction_job: ::std::option::Option<BatchPredictionJob>, } /// Request message for [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBatchPredictionJobRequest { /// Required. The name of the BatchPredictionJob resource. /// Format: /// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListBatchPredictionJobsRequest { /// Required. The resource name of the Location to list the BatchPredictionJobs /// from. Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// The standard list filter. /// /// Supported fields: /// /// * `display_name` supports = and !=. /// /// * `state` supports = and !=. /// /// * `model_display_name` supports = and != /// /// Some examples of using the filter are: /// /// * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"` /// /// * `state="JOB_STATE_RUNNING" OR display_name="my_job"` /// /// * `NOT display_name="my_job"` /// /// * `state="JOB_STATE_FAILED"` #[prost(string, tag = "2")] pub filter: std::string::String, /// The standard list page size. #[prost(int32, tag = "3")] pub page_size: i32, /// The standard list page token. /// Typically obtained via /// [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token] of the previous /// [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] call. #[prost(string, tag = "4")] pub page_token: std::string::String, /// Mask specifying which fields to read. #[prost(message, optional, tag = "5")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, } /// Response message for [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListBatchPredictionJobsResponse { /// List of BatchPredictionJobs in the requested page. #[prost(message, repeated, tag = "1")] pub batch_prediction_jobs: ::std::vec::Vec<BatchPredictionJob>, /// A token to retrieve the next page of results. /// Pass to [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token] to obtain that /// page. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } /// Request message for [JobService.DeleteBatchPredictionJob][google.cloud.aiplatform.v1.JobService.DeleteBatchPredictionJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteBatchPredictionJobRequest { /// Required. The name of the BatchPredictionJob resource to be deleted. /// Format: /// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [JobService.CancelBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CancelBatchPredictionJob]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CancelBatchPredictionJobRequest { /// Required. The name of the BatchPredictionJob to cancel. /// Format: /// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` #[prost(string, tag = "1")] pub name: std::string::String, } #[doc = r" Generated client implementations."] pub mod job_service_client { #![allow(unused_variables, dead_code, missing_docs)] use tonic::codegen::*; #[doc = " A service for creating and managing Vertex AI's jobs."] pub struct JobServiceClient<T> { inner: tonic::client::Grpc<T>, } impl JobServiceClient<tonic::transport::Channel> { #[doc = r" Attempt to create a new client by connecting to a given endpoint."] pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> where D: std::convert::TryInto<tonic::transport::Endpoint>, D::Error: Into<StdError>, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl<T> JobServiceClient<T> where T: tonic::client::GrpcService<tonic::body::BoxBody>, T::ResponseBody: Body + HttpBody + Send + 'static, T::Error: Into<StdError>, <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self { let inner = tonic::client::Grpc::with_interceptor(inner, interceptor); Self { inner } } #[doc = " Creates a CustomJob. A created CustomJob right away"] #[doc = " will be attempted to be run."] pub async fn create_custom_job( &mut self, request: impl tonic::IntoRequest<super::CreateCustomJobRequest>, ) -> Result<tonic::Response<super::CustomJob>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/CreateCustomJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Gets a CustomJob."] pub async fn get_custom_job( &mut self, request: impl tonic::IntoRequest<super::GetCustomJobRequest>, ) -> Result<tonic::Response<super::CustomJob>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/GetCustomJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Lists CustomJobs in a Location."] pub async fn list_custom_jobs( &mut self, request: impl tonic::IntoRequest<super::ListCustomJobsRequest>, ) -> Result<tonic::Response<super::ListCustomJobsResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/ListCustomJobs", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Deletes a CustomJob."] pub async fn delete_custom_job( &mut self, request: impl tonic::IntoRequest<super::DeleteCustomJobRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/DeleteCustomJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Cancels a CustomJob."] #[doc = " Starts asynchronous cancellation on the CustomJob. The server"] #[doc = " makes a best effort to cancel the job, but success is not"] #[doc = " guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or"] #[doc = " other methods to check whether the cancellation succeeded or whether the"] #[doc = " job completed despite cancellation. On successful cancellation,"] #[doc = " the CustomJob is not deleted; instead it becomes a job with"] #[doc = " a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,"] #[doc = " corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to"] #[doc = " `CANCELLED`."] pub async fn cancel_custom_job( &mut self, request: impl tonic::IntoRequest<super::CancelCustomJobRequest>, ) -> 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.cloud.aiplatform.v1.JobService/CancelCustomJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Creates a DataLabelingJob."] pub async fn create_data_labeling_job( &mut self, request: impl tonic::IntoRequest<super::CreateDataLabelingJobRequest>, ) -> Result<tonic::Response<super::DataLabelingJob>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/CreateDataLabelingJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Gets a DataLabelingJob."] pub async fn get_data_labeling_job( &mut self, request: impl tonic::IntoRequest<super::GetDataLabelingJobRequest>, ) -> Result<tonic::Response<super::DataLabelingJob>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/GetDataLabelingJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Lists DataLabelingJobs in a Location."] pub async fn list_data_labeling_jobs( &mut self, request: impl tonic::IntoRequest<super::ListDataLabelingJobsRequest>, ) -> Result<tonic::Response<super::ListDataLabelingJobsResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/ListDataLabelingJobs", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Deletes a DataLabelingJob."] pub async fn delete_data_labeling_job( &mut self, request: impl tonic::IntoRequest<super::DeleteDataLabelingJobRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/DeleteDataLabelingJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Cancels a DataLabelingJob. Success of cancellation is not guaranteed."] pub async fn cancel_data_labeling_job( &mut self, request: impl tonic::IntoRequest<super::CancelDataLabelingJobRequest>, ) -> 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.cloud.aiplatform.v1.JobService/CancelDataLabelingJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Creates a HyperparameterTuningJob"] pub async fn create_hyperparameter_tuning_job( &mut self, request: impl tonic::IntoRequest<super::CreateHyperparameterTuningJobRequest>, ) -> Result<tonic::Response<super::HyperparameterTuningJob>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/CreateHyperparameterTuningJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Gets a HyperparameterTuningJob"] pub async fn get_hyperparameter_tuning_job( &mut self, request: impl tonic::IntoRequest<super::GetHyperparameterTuningJobRequest>, ) -> Result<tonic::Response<super::HyperparameterTuningJob>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/GetHyperparameterTuningJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Lists HyperparameterTuningJobs in a Location."] pub async fn list_hyperparameter_tuning_jobs( &mut self, request: impl tonic::IntoRequest<super::ListHyperparameterTuningJobsRequest>, ) -> Result<tonic::Response<super::ListHyperparameterTuningJobsResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/ListHyperparameterTuningJobs", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Deletes a HyperparameterTuningJob."] pub async fn delete_hyperparameter_tuning_job( &mut self, request: impl tonic::IntoRequest<super::DeleteHyperparameterTuningJobRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/DeleteHyperparameterTuningJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Cancels a HyperparameterTuningJob."] #[doc = " Starts asynchronous cancellation on the HyperparameterTuningJob. The server"] #[doc = " makes a best effort to cancel the job, but success is not"] #[doc = " guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or"] #[doc = " other methods to check whether the cancellation succeeded or whether the"] #[doc = " job completed despite cancellation. On successful cancellation,"] #[doc = " the HyperparameterTuningJob is not deleted; instead it becomes a job with"] #[doc = " a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code]"] #[doc = " of 1, corresponding to `Code.CANCELLED`, and"] #[doc = " [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to `CANCELLED`."] pub async fn cancel_hyperparameter_tuning_job( &mut self, request: impl tonic::IntoRequest<super::CancelHyperparameterTuningJobRequest>, ) -> 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.cloud.aiplatform.v1.JobService/CancelHyperparameterTuningJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Creates a BatchPredictionJob. A BatchPredictionJob once created will"] #[doc = " right away be attempted to start."] pub async fn create_batch_prediction_job( &mut self, request: impl tonic::IntoRequest<super::CreateBatchPredictionJobRequest>, ) -> Result<tonic::Response<super::BatchPredictionJob>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/CreateBatchPredictionJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Gets a BatchPredictionJob"] pub async fn get_batch_prediction_job( &mut self, request: impl tonic::IntoRequest<super::GetBatchPredictionJobRequest>, ) -> Result<tonic::Response<super::BatchPredictionJob>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/GetBatchPredictionJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Lists BatchPredictionJobs in a Location."] pub async fn list_batch_prediction_jobs( &mut self, request: impl tonic::IntoRequest<super::ListBatchPredictionJobsRequest>, ) -> Result<tonic::Response<super::ListBatchPredictionJobsResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/ListBatchPredictionJobs", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Deletes a BatchPredictionJob. Can only be called on jobs that already"] #[doc = " finished."] pub async fn delete_batch_prediction_job( &mut self, request: impl tonic::IntoRequest<super::DeleteBatchPredictionJobRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.JobService/DeleteBatchPredictionJob", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Cancels a BatchPredictionJob."] #[doc = ""] #[doc = " Starts asynchronous cancellation on the BatchPredictionJob. The server"] #[doc = " makes the best effort to cancel the job, but success is not"] #[doc = " guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or"] #[doc = " other methods to check whether the cancellation succeeded or whether the"] #[doc = " job completed despite cancellation. On a successful cancellation,"] #[doc = " the BatchPredictionJob is not deleted;instead its"] #[doc = " [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already"] #[doc = " outputted by the job are not deleted."] pub async fn cancel_batch_prediction_job( &mut self, request: impl tonic::IntoRequest<super::CancelBatchPredictionJobRequest>, ) -> 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.cloud.aiplatform.v1.JobService/CancelBatchPredictionJob", ); self.inner.unary(request.into_request(), path, codec).await } } impl<T: Clone> Clone for JobServiceClient<T> { fn clone(&self) -> Self { Self { inner: self.inner.clone(), } } } impl<T> std::fmt::Debug for JobServiceClient<T> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "JobServiceClient {{ ... }}") } } } /// Represents one resource that exists in automl.googleapis.com, /// datalabeling.googleapis.com or ml.googleapis.com. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigratableResource { /// Output only. Timestamp when the last migration attempt on this MigratableResource /// started. Will not be set if there's no migration attempt on this /// MigratableResource. #[prost(message, optional, tag = "5")] pub last_migrate_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. Timestamp when this MigratableResource was last updated. #[prost(message, optional, tag = "6")] pub last_update_time: ::std::option::Option<::prost_types::Timestamp>, #[prost(oneof = "migratable_resource::Resource", tags = "1, 2, 3, 4")] pub resource: ::std::option::Option<migratable_resource::Resource>, } pub mod migratable_resource { /// Represents one model Version in ml.googleapis.com. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MlEngineModelVersion { /// The ml.googleapis.com endpoint that this model Version currently lives /// in. /// Example values: /// /// * ml.googleapis.com /// * us-centrall-ml.googleapis.com /// * europe-west4-ml.googleapis.com /// * asia-east1-ml.googleapis.com #[prost(string, tag = "1")] pub endpoint: std::string::String, /// Full resource name of ml engine model Version. /// Format: `projects/{project}/models/{model}/versions/{version}`. #[prost(string, tag = "2")] pub version: std::string::String, } /// Represents one Model in automl.googleapis.com. #[derive(Clone, PartialEq, ::prost::Message)] pub struct AutomlModel { /// Full resource name of automl Model. /// Format: /// `projects/{project}/locations/{location}/models/{model}`. #[prost(string, tag = "1")] pub model: std::string::String, /// The Model's display name in automl.googleapis.com. #[prost(string, tag = "3")] pub model_display_name: std::string::String, } /// Represents one Dataset in automl.googleapis.com. #[derive(Clone, PartialEq, ::prost::Message)] pub struct AutomlDataset { /// Full resource name of automl Dataset. /// Format: /// `projects/{project}/locations/{location}/datasets/{dataset}`. #[prost(string, tag = "1")] pub dataset: std::string::String, /// The Dataset's display name in automl.googleapis.com. #[prost(string, tag = "4")] pub dataset_display_name: std::string::String, } /// Represents one Dataset in datalabeling.googleapis.com. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DataLabelingDataset { /// Full resource name of data labeling Dataset. /// Format: /// `projects/{project}/datasets/{dataset}`. #[prost(string, tag = "1")] pub dataset: std::string::String, /// The Dataset's display name in datalabeling.googleapis.com. #[prost(string, tag = "4")] pub dataset_display_name: std::string::String, /// The migratable AnnotatedDataset in datalabeling.googleapis.com belongs to /// the data labeling Dataset. #[prost(message, repeated, tag = "3")] pub data_labeling_annotated_datasets: ::std::vec::Vec<data_labeling_dataset::DataLabelingAnnotatedDataset>, } pub mod data_labeling_dataset { /// Represents one AnnotatedDataset in datalabeling.googleapis.com. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DataLabelingAnnotatedDataset { /// Full resource name of data labeling AnnotatedDataset. /// Format: /// `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`. #[prost(string, tag = "1")] pub annotated_dataset: std::string::String, /// The AnnotatedDataset's display name in datalabeling.googleapis.com. #[prost(string, tag = "3")] pub annotated_dataset_display_name: std::string::String, } } #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Resource { /// Output only. Represents one Version in ml.googleapis.com. #[prost(message, tag = "1")] MlEngineModelVersion(MlEngineModelVersion), /// Output only. Represents one Model in automl.googleapis.com. #[prost(message, tag = "2")] AutomlModel(AutomlModel), /// Output only. Represents one Dataset in automl.googleapis.com. #[prost(message, tag = "3")] AutomlDataset(AutomlDataset), /// Output only. Represents one Dataset in datalabeling.googleapis.com. #[prost(message, tag = "4")] DataLabelingDataset(DataLabelingDataset), } } /// Request message for [MigrationService.SearchMigratableResources][google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchMigratableResourcesRequest { /// Required. The location that the migratable resources should be searched from. /// It's the Vertex AI location that the resources can be migrated to, not /// the resources' original location. /// Format: /// `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// The standard page size. /// The default and maximum value is 100. #[prost(int32, tag = "2")] pub page_size: i32, /// The standard page token. #[prost(string, tag = "3")] pub page_token: std::string::String, /// A filter for your search. You can use the following types of filters: /// /// * Resource type filters. The following strings filter for a specific type /// of [MigratableResource][google.cloud.aiplatform.v1.MigratableResource]: /// * `ml_engine_model_version:*` /// * `automl_model:*` /// * `automl_dataset:*` /// * `data_labeling_dataset:*` /// * "Migrated or not" filters. The following strings filter for resources /// that either have or have not already been migrated: /// * `last_migrate_time:*` filters for migrated resources. /// * `NOT last_migrate_time:*` filters for not yet migrated resources. #[prost(string, tag = "4")] pub filter: std::string::String, } /// Response message for [MigrationService.SearchMigratableResources][google.cloud.aiplatform.v1.MigrationService.SearchMigratableResources]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchMigratableResourcesResponse { /// All migratable resources that can be migrated to the /// location specified in the request. #[prost(message, repeated, tag = "1")] pub migratable_resources: ::std::vec::Vec<MigratableResource>, /// The standard next-page token. /// The migratable_resources may not fill page_size in /// SearchMigratableResourcesRequest even when there are subsequent pages. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } /// Request message for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchMigrateResourcesRequest { /// Required. The location of the migrated resource will live in. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// Required. The request messages specifying the resources to migrate. /// They must be in the same location as the destination. /// Up to 50 resources can be migrated in one batch. #[prost(message, repeated, tag = "2")] pub migrate_resource_requests: ::std::vec::Vec<MigrateResourceRequest>, } /// Config of migrating one resource from automl.googleapis.com, /// datalabeling.googleapis.com and ml.googleapis.com to Vertex AI. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateResourceRequest { #[prost(oneof = "migrate_resource_request::Request", tags = "1, 2, 3, 4")] pub request: ::std::option::Option<migrate_resource_request::Request>, } pub mod migrate_resource_request { /// Config for migrating version in ml.googleapis.com to Vertex AI's Model. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateMlEngineModelVersionConfig { /// Required. The ml.googleapis.com endpoint that this model version should be migrated /// from. /// Example values: /// /// * ml.googleapis.com /// /// * us-centrall-ml.googleapis.com /// /// * europe-west4-ml.googleapis.com /// /// * asia-east1-ml.googleapis.com #[prost(string, tag = "1")] pub endpoint: std::string::String, /// Required. Full resource name of ml engine model version. /// Format: `projects/{project}/models/{model}/versions/{version}`. #[prost(string, tag = "2")] pub model_version: std::string::String, /// Required. Display name of the model in Vertex AI. /// System will pick a display name if unspecified. #[prost(string, tag = "3")] pub model_display_name: std::string::String, } /// Config for migrating Model in automl.googleapis.com to Vertex AI's Model. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateAutomlModelConfig { /// Required. Full resource name of automl Model. /// Format: /// `projects/{project}/locations/{location}/models/{model}`. #[prost(string, tag = "1")] pub model: std::string::String, /// Optional. Display name of the model in Vertex AI. /// System will pick a display name if unspecified. #[prost(string, tag = "2")] pub model_display_name: std::string::String, } /// Config for migrating Dataset in automl.googleapis.com to Vertex AI's /// Dataset. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateAutomlDatasetConfig { /// Required. Full resource name of automl Dataset. /// Format: /// `projects/{project}/locations/{location}/datasets/{dataset}`. #[prost(string, tag = "1")] pub dataset: std::string::String, /// Required. Display name of the Dataset in Vertex AI. /// System will pick a display name if unspecified. #[prost(string, tag = "2")] pub dataset_display_name: std::string::String, } /// Config for migrating Dataset in datalabeling.googleapis.com to AI /// Platform's Dataset. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateDataLabelingDatasetConfig { /// Required. Full resource name of data labeling Dataset. /// Format: /// `projects/{project}/datasets/{dataset}`. #[prost(string, tag = "1")] pub dataset: std::string::String, /// Optional. Display name of the Dataset in Vertex AI. /// System will pick a display name if unspecified. #[prost(string, tag = "2")] pub dataset_display_name: std::string::String, /// Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to /// Vertex AI's SavedQuery. The specified AnnotatedDatasets have to belong /// to the datalabeling Dataset. #[prost(message, repeated, tag = "3")] pub migrate_data_labeling_annotated_dataset_configs: ::std::vec::Vec< migrate_data_labeling_dataset_config::MigrateDataLabelingAnnotatedDatasetConfig, >, } pub mod migrate_data_labeling_dataset_config { /// Config for migrating AnnotatedDataset in datalabeling.googleapis.com to /// Vertex AI's SavedQuery. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateDataLabelingAnnotatedDatasetConfig { /// Required. Full resource name of data labeling AnnotatedDataset. /// Format: /// `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`. #[prost(string, tag = "1")] pub annotated_dataset: std::string::String, } } #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Request { /// Config for migrating Version in ml.googleapis.com to Vertex AI's Model. #[prost(message, tag = "1")] MigrateMlEngineModelVersionConfig(MigrateMlEngineModelVersionConfig), /// Config for migrating Model in automl.googleapis.com to Vertex AI's /// Model. #[prost(message, tag = "2")] MigrateAutomlModelConfig(MigrateAutomlModelConfig), /// Config for migrating Dataset in automl.googleapis.com to Vertex AI's /// Dataset. #[prost(message, tag = "3")] MigrateAutomlDatasetConfig(MigrateAutomlDatasetConfig), /// Config for migrating Dataset in datalabeling.googleapis.com to /// Vertex AI's Dataset. #[prost(message, tag = "4")] MigrateDataLabelingDatasetConfig(MigrateDataLabelingDatasetConfig), } } /// Response message for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchMigrateResourcesResponse { /// Successfully migrated resources. #[prost(message, repeated, tag = "1")] pub migrate_resource_responses: ::std::vec::Vec<MigrateResourceResponse>, } /// Describes a successfully migrated resource. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateResourceResponse { /// Before migration, the identifier in ml.googleapis.com, /// automl.googleapis.com or datalabeling.googleapis.com. #[prost(message, optional, tag = "3")] pub migratable_resource: ::std::option::Option<MigratableResource>, /// After migration, the resource name in Vertex AI. #[prost(oneof = "migrate_resource_response::MigratedResource", tags = "1, 2")] pub migrated_resource: ::std::option::Option<migrate_resource_response::MigratedResource>, } pub mod migrate_resource_response { /// After migration, the resource name in Vertex AI. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum MigratedResource { /// Migrated Dataset's resource name. #[prost(string, tag = "1")] Dataset(std::string::String), /// Migrated Model's resource name. #[prost(string, tag = "2")] Model(std::string::String), } } /// Runtime operation information for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1.MigrationService.BatchMigrateResources]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchMigrateResourcesOperationMetadata { /// The common part of the operation metadata. #[prost(message, optional, tag = "1")] pub generic_metadata: ::std::option::Option<GenericOperationMetadata>, /// Partial results that reflect the latest migration operation progress. #[prost(message, repeated, tag = "2")] pub partial_results: ::std::vec::Vec<batch_migrate_resources_operation_metadata::PartialResult>, } pub mod batch_migrate_resources_operation_metadata { /// Represents a partial result in batch migration operation for one /// [MigrateResourceRequest][google.cloud.aiplatform.v1.MigrateResourceRequest]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct PartialResult { /// It's the same as the value in /// [MigrateResourceRequest.migrate_resource_requests][]. #[prost(message, optional, tag = "1")] pub request: ::std::option::Option<super::MigrateResourceRequest>, /// If the resource's migration is ongoing, none of the result will be set. /// If the resource's migration is finished, either error or one of the /// migrated resource name will be filled. #[prost(oneof = "partial_result::Result", tags = "2, 3, 4")] pub result: ::std::option::Option<partial_result::Result>, } pub mod partial_result { /// If the resource's migration is ongoing, none of the result will be set. /// If the resource's migration is finished, either error or one of the /// migrated resource name will be filled. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { /// The error result of the migration request in case of failure. #[prost(message, tag = "2")] Error(super::super::super::super::super::rpc::Status), /// Migrated model resource name. #[prost(string, tag = "3")] Model(std::string::String), /// Migrated dataset resource name. #[prost(string, tag = "4")] Dataset(std::string::String), } } } #[doc = r" Generated client implementations."] pub mod migration_service_client { #![allow(unused_variables, dead_code, missing_docs)] use tonic::codegen::*; #[doc = " A service that migrates resources from automl.googleapis.com,"] #[doc = " datalabeling.googleapis.com and ml.googleapis.com to Vertex AI."] pub struct MigrationServiceClient<T> { inner: tonic::client::Grpc<T>, } impl MigrationServiceClient<tonic::transport::Channel> { #[doc = r" Attempt to create a new client by connecting to a given endpoint."] pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> where D: std::convert::TryInto<tonic::transport::Endpoint>, D::Error: Into<StdError>, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl<T> MigrationServiceClient<T> where T: tonic::client::GrpcService<tonic::body::BoxBody>, T::ResponseBody: Body + HttpBody + Send + 'static, T::Error: Into<StdError>, <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self { let inner = tonic::client::Grpc::with_interceptor(inner, interceptor); Self { inner } } #[doc = " Searches all of the resources in automl.googleapis.com,"] #[doc = " datalabeling.googleapis.com and ml.googleapis.com that can be migrated to"] #[doc = " Vertex AI's given location."] pub async fn search_migratable_resources( &mut self, request: impl tonic::IntoRequest<super::SearchMigratableResourcesRequest>, ) -> Result<tonic::Response<super::SearchMigratableResourcesResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.MigrationService/SearchMigratableResources", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Batch migrates resources from ml.googleapis.com, automl.googleapis.com,"] #[doc = " and datalabeling.googleapis.com to Vertex AI."] pub async fn batch_migrate_resources( &mut self, request: impl tonic::IntoRequest<super::BatchMigrateResourcesRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.MigrationService/BatchMigrateResources", ); self.inner.unary(request.into_request(), path, codec).await } } impl<T: Clone> Clone for MigrationServiceClient<T> { fn clone(&self) -> Self { Self { inner: self.inner.clone(), } } } impl<T> std::fmt::Debug for MigrationServiceClient<T> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "MigrationServiceClient {{ ... }}") } } } /// A collection of metrics calculated by comparing Model's predictions on all of /// the test data against annotations from the test data. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModelEvaluation { /// Output only. The resource name of the ModelEvaluation. #[prost(string, tag = "1")] pub name: std::string::String, /// Output only. Points to a YAML file stored on Google Cloud Storage describing the /// [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is /// defined as an OpenAPI 3.0.2 [Schema /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). #[prost(string, tag = "2")] pub metrics_schema_uri: std::string::String, /// Output only. Evaluation metrics of the Model. The schema of the metrics is stored in /// [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri] #[prost(message, optional, tag = "3")] pub metrics: ::std::option::Option<::prost_types::Value>, /// Output only. Timestamp when this ModelEvaluation was created. #[prost(message, optional, tag = "4")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, /// Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of /// ModelEvaluationSlices. The dimensions can be used as the filter of the /// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] request, in the form of /// `slice.dimension = <dimension>`. #[prost(string, repeated, tag = "5")] pub slice_dimensions: ::std::vec::Vec<std::string::String>, } /// A collection of metrics calculated by comparing Model's predictions on a /// slice of the test data against ground truth annotations. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ModelEvaluationSlice { /// Output only. The resource name of the ModelEvaluationSlice. #[prost(string, tag = "1")] pub name: std::string::String, /// Output only. The slice of the test data that is used to evaluate the Model. #[prost(message, optional, tag = "2")] pub slice: ::std::option::Option<model_evaluation_slice::Slice>, /// Output only. Points to a YAML file stored on Google Cloud Storage describing the /// [metrics][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics] of this ModelEvaluationSlice. The /// schema is defined as an OpenAPI 3.0.2 [Schema /// Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). #[prost(string, tag = "3")] pub metrics_schema_uri: std::string::String, /// Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored /// in [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri] #[prost(message, optional, tag = "4")] pub metrics: ::std::option::Option<::prost_types::Value>, /// Output only. Timestamp when this ModelEvaluationSlice was created. #[prost(message, optional, tag = "5")] pub create_time: ::std::option::Option<::prost_types::Timestamp>, } pub mod model_evaluation_slice { /// Definition of a slice. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Slice { /// Output only. The dimension of the slice. /// Well-known dimensions are: /// * `annotationSpec`: This slice is on the test data that has either /// ground truth or prediction with [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name] /// equals to [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value]. #[prost(string, tag = "1")] pub dimension: std::string::String, /// Output only. The value of the dimension in this slice. #[prost(string, tag = "2")] pub value: std::string::String, } } /// Request message for [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UploadModelRequest { /// Required. The resource name of the Location into which to upload the Model. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// Required. The Model to create. #[prost(message, optional, tag = "2")] pub model: ::std::option::Option<Model>, } /// Details of [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel] operation. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UploadModelOperationMetadata { /// The common part of the operation metadata. #[prost(message, optional, tag = "1")] pub generic_metadata: ::std::option::Option<GenericOperationMetadata>, } /// Response message of [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel] operation. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UploadModelResponse { /// The name of the uploaded Model resource. /// Format: `projects/{project}/locations/{location}/models/{model}` #[prost(string, tag = "1")] pub model: std::string::String, } /// Request message for [ModelService.GetModel][google.cloud.aiplatform.v1.ModelService.GetModel]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetModelRequest { /// Required. The name of the Model resource. /// Format: `projects/{project}/locations/{location}/models/{model}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListModelsRequest { /// Required. The resource name of the Location to list the Models from. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// An expression for filtering the results of the request. For field names /// both snake_case and camelCase are supported. /// /// * `model` supports = and !=. `model` represents the Model ID, /// i.e. the last segment of the Model's [resource name][google.cloud.aiplatform.v1.Model.name]. /// * `display_name` supports = and != /// * `labels` supports general map functions that is: /// * `labels.key=value` - key:value equality /// * `labels.key:* or labels:key - key existence /// * A key including a space must be quoted. `labels."a key"`. /// /// Some examples: /// * `model=1234` /// * `displayName="myDisplayName"` /// * `labels.myKey="myValue"` #[prost(string, tag = "2")] pub filter: std::string::String, /// The standard list page size. #[prost(int32, tag = "3")] pub page_size: i32, /// The standard list page token. /// Typically obtained via /// [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token] of the previous /// [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] call. #[prost(string, tag = "4")] pub page_token: std::string::String, /// Mask specifying which fields to read. #[prost(message, optional, tag = "5")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, /// A comma-separated list of fields to order by, sorted in ascending order. /// Use "desc" after a field name for descending. /// Supported fields: /// * `display_name` /// * `create_time` /// * `update_time` /// /// Example: `display_name, create_time desc`. #[prost(string, tag = "6")] pub order_by: std::string::String, } /// Response message for [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListModelsResponse { /// List of Models in the requested page. #[prost(message, repeated, tag = "1")] pub models: ::std::vec::Vec<Model>, /// A token to retrieve next page of results. /// Pass to [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token] to obtain that page. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } /// Request message for [ModelService.UpdateModel][google.cloud.aiplatform.v1.ModelService.UpdateModel]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateModelRequest { /// Required. The Model which replaces the resource on the server. #[prost(message, optional, tag = "1")] pub model: ::std::option::Option<Model>, /// Required. The update mask applies to the resource. /// For the `FieldMask` definition, see [google.protobuf.FieldMask][google.protobuf.FieldMask]. #[prost(message, optional, tag = "2")] pub update_mask: ::std::option::Option<::prost_types::FieldMask>, } /// Request message for [ModelService.DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteModelRequest { /// Required. The name of the Model resource to be deleted. /// Format: `projects/{project}/locations/{location}/models/{model}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportModelRequest { /// Required. The resource name of the Model to export. /// Format: `projects/{project}/locations/{location}/models/{model}` #[prost(string, tag = "1")] pub name: std::string::String, /// Required. The desired output location and configuration. #[prost(message, optional, tag = "2")] pub output_config: ::std::option::Option<export_model_request::OutputConfig>, } pub mod export_model_request { /// Output configuration for the Model export. #[derive(Clone, PartialEq, ::prost::Message)] pub struct OutputConfig { /// The ID of the format in which the Model must be exported. Each Model /// lists the [export formats it supports][google.cloud.aiplatform.v1.Model.supported_export_formats]. /// If no value is provided here, then the first from the list of the Model's /// supported formats is used by default. #[prost(string, tag = "1")] pub export_format_id: std::string::String, /// The Cloud Storage location where the Model artifact is to be /// written to. Under the directory given as the destination a new one with /// name "`model-export-<model-display-name>-<timestamp-of-export-call>`", /// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, /// will be created. Inside, the Model and any of its supporting files /// will be written. /// This field should only be set when the `exportableContent` field of the /// [Model.supported_export_formats] object contains `ARTIFACT`. #[prost(message, optional, tag = "3")] pub artifact_destination: ::std::option::Option<super::GcsDestination>, /// The Google Container Registry or Artifact Registry uri where the /// Model container image will be copied to. /// This field should only be set when the `exportableContent` field of the /// [Model.supported_export_formats] object contains `IMAGE`. #[prost(message, optional, tag = "4")] pub image_destination: ::std::option::Option<super::ContainerRegistryDestination>, } } /// Details of [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] operation. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportModelOperationMetadata { /// The common part of the operation metadata. #[prost(message, optional, tag = "1")] pub generic_metadata: ::std::option::Option<GenericOperationMetadata>, /// Output only. Information further describing the output of this Model export. #[prost(message, optional, tag = "2")] pub output_info: ::std::option::Option<export_model_operation_metadata::OutputInfo>, } pub mod export_model_operation_metadata { /// Further describes the output of the ExportModel. Supplements /// [ExportModelRequest.OutputConfig][google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct OutputInfo { /// Output only. If the Model artifact is being exported to Google Cloud Storage this is /// the full path of the directory created, into which the Model files are /// being written to. #[prost(string, tag = "2")] pub artifact_output_uri: std::string::String, /// Output only. If the Model image is being exported to Google Container Registry or /// Artifact Registry this is the full path of the image created. #[prost(string, tag = "3")] pub image_output_uri: std::string::String, } } /// Response message of [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] operation. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportModelResponse {} /// Request message for [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1.ModelService.GetModelEvaluation]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetModelEvaluationRequest { /// Required. The name of the ModelEvaluation resource. /// Format: /// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListModelEvaluationsRequest { /// Required. The resource name of the Model to list the ModelEvaluations from. /// Format: `projects/{project}/locations/{location}/models/{model}` #[prost(string, tag = "1")] pub parent: std::string::String, /// The standard list filter. #[prost(string, tag = "2")] pub filter: std::string::String, /// The standard list page size. #[prost(int32, tag = "3")] pub page_size: i32, /// The standard list page token. /// Typically obtained via /// [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token] of the previous /// [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations] call. #[prost(string, tag = "4")] pub page_token: std::string::String, /// Mask specifying which fields to read. #[prost(message, optional, tag = "5")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, } /// Response message for [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListModelEvaluationsResponse { /// List of ModelEvaluations in the requested page. #[prost(message, repeated, tag = "1")] pub model_evaluations: ::std::vec::Vec<ModelEvaluation>, /// A token to retrieve next page of results. /// Pass to [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token] to obtain that page. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } /// Request message for [ModelService.GetModelEvaluationSlice][google.cloud.aiplatform.v1.ModelService.GetModelEvaluationSlice]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetModelEvaluationSliceRequest { /// Required. The name of the ModelEvaluationSlice resource. /// Format: /// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListModelEvaluationSlicesRequest { /// Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices /// from. Format: /// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` #[prost(string, tag = "1")] pub parent: std::string::String, /// The standard list filter. /// /// * `slice.dimension` - for =. #[prost(string, tag = "2")] pub filter: std::string::String, /// The standard list page size. #[prost(int32, tag = "3")] pub page_size: i32, /// The standard list page token. /// Typically obtained via /// [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token] of the previous /// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] call. #[prost(string, tag = "4")] pub page_token: std::string::String, /// Mask specifying which fields to read. #[prost(message, optional, tag = "5")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, } /// Response message for [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListModelEvaluationSlicesResponse { /// List of ModelEvaluations in the requested page. #[prost(message, repeated, tag = "1")] pub model_evaluation_slices: ::std::vec::Vec<ModelEvaluationSlice>, /// A token to retrieve next page of results. /// Pass to [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token] to obtain that /// page. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } #[doc = r" Generated client implementations."] pub mod model_service_client { #![allow(unused_variables, dead_code, missing_docs)] use tonic::codegen::*; #[doc = " A service for managing Vertex AI's machine learning Models."] pub struct ModelServiceClient<T> { inner: tonic::client::Grpc<T>, } impl ModelServiceClient<tonic::transport::Channel> { #[doc = r" Attempt to create a new client by connecting to a given endpoint."] pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> where D: std::convert::TryInto<tonic::transport::Endpoint>, D::Error: Into<StdError>, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl<T> ModelServiceClient<T> where T: tonic::client::GrpcService<tonic::body::BoxBody>, T::ResponseBody: Body + HttpBody + Send + 'static, T::Error: Into<StdError>, <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self { let inner = tonic::client::Grpc::with_interceptor(inner, interceptor); Self { inner } } #[doc = " Uploads a Model artifact into Vertex AI."] pub async fn upload_model( &mut self, request: impl tonic::IntoRequest<super::UploadModelRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.ModelService/UploadModel", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Gets a Model."] pub async fn get_model( &mut self, request: impl tonic::IntoRequest<super::GetModelRequest>, ) -> Result<tonic::Response<super::Model>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.ModelService/GetModel", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Lists Models in a Location."] pub async fn list_models( &mut self, request: impl tonic::IntoRequest<super::ListModelsRequest>, ) -> Result<tonic::Response<super::ListModelsResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.ModelService/ListModels", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Updates a Model."] pub async fn update_model( &mut self, request: impl tonic::IntoRequest<super::UpdateModelRequest>, ) -> Result<tonic::Response<super::Model>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.ModelService/UpdateModel", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Deletes a Model."] #[doc = " Note: Model can only be deleted if there are no DeployedModels created"] #[doc = " from it."] pub async fn delete_model( &mut self, request: impl tonic::IntoRequest<super::DeleteModelRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.ModelService/DeleteModel", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Exports a trained, exportable, Model to a location specified by the"] #[doc = " user. A Model is considered to be exportable if it has at least one"] #[doc = " [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats]."] pub async fn export_model( &mut self, request: impl tonic::IntoRequest<super::ExportModelRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.ModelService/ExportModel", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Gets a ModelEvaluation."] pub async fn get_model_evaluation( &mut self, request: impl tonic::IntoRequest<super::GetModelEvaluationRequest>, ) -> Result<tonic::Response<super::ModelEvaluation>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.ModelService/GetModelEvaluation", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Lists ModelEvaluations in a Model."] pub async fn list_model_evaluations( &mut self, request: impl tonic::IntoRequest<super::ListModelEvaluationsRequest>, ) -> Result<tonic::Response<super::ListModelEvaluationsResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.ModelService/ListModelEvaluations", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Gets a ModelEvaluationSlice."] pub async fn get_model_evaluation_slice( &mut self, request: impl tonic::IntoRequest<super::GetModelEvaluationSliceRequest>, ) -> Result<tonic::Response<super::ModelEvaluationSlice>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.ModelService/GetModelEvaluationSlice", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Lists ModelEvaluationSlices in a ModelEvaluation."] pub async fn list_model_evaluation_slices( &mut self, request: impl tonic::IntoRequest<super::ListModelEvaluationSlicesRequest>, ) -> Result<tonic::Response<super::ListModelEvaluationSlicesResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.ModelService/ListModelEvaluationSlices", ); self.inner.unary(request.into_request(), path, codec).await } } impl<T: Clone> Clone for ModelServiceClient<T> { fn clone(&self) -> Self { Self { inner: self.inner.clone(), } } } impl<T> std::fmt::Debug for ModelServiceClient<T> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "ModelServiceClient {{ ... }}") } } } /// Request message for [PipelineService.CreateTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.CreateTrainingPipeline]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateTrainingPipelineRequest { /// Required. The resource name of the Location to create the TrainingPipeline in. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// Required. The TrainingPipeline to create. #[prost(message, optional, tag = "2")] pub training_pipeline: ::std::option::Option<TrainingPipeline>, } /// Request message for [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTrainingPipelineRequest { /// Required. The name of the TrainingPipeline resource. /// Format: /// `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListTrainingPipelinesRequest { /// Required. The resource name of the Location to list the TrainingPipelines from. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// The standard list filter. /// Supported fields: /// /// * `display_name` supports = and !=. /// /// * `state` supports = and !=. /// /// Some examples of using the filter are: /// /// * `state="PIPELINE_STATE_SUCCEEDED" AND display_name="my_pipeline"` /// /// * `state="PIPELINE_STATE_RUNNING" OR display_name="my_pipeline"` /// /// * `NOT display_name="my_pipeline"` /// /// * `state="PIPELINE_STATE_FAILED"` #[prost(string, tag = "2")] pub filter: std::string::String, /// The standard list page size. #[prost(int32, tag = "3")] pub page_size: i32, /// The standard list page token. /// Typically obtained via /// [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token] of the previous /// [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] call. #[prost(string, tag = "4")] pub page_token: std::string::String, /// Mask specifying which fields to read. #[prost(message, optional, tag = "5")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, } /// Response message for [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListTrainingPipelinesResponse { /// List of TrainingPipelines in the requested page. #[prost(message, repeated, tag = "1")] pub training_pipelines: ::std::vec::Vec<TrainingPipeline>, /// A token to retrieve the next page of results. /// Pass to [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token] to obtain that page. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } /// Request message for [PipelineService.DeleteTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.DeleteTrainingPipeline]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteTrainingPipelineRequest { /// Required. The name of the TrainingPipeline resource to be deleted. /// Format: /// `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [PipelineService.CancelTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.CancelTrainingPipeline]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CancelTrainingPipelineRequest { /// Required. The name of the TrainingPipeline to cancel. /// Format: /// `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}` #[prost(string, tag = "1")] pub name: std::string::String, } #[doc = r" Generated client implementations."] pub mod pipeline_service_client { #![allow(unused_variables, dead_code, missing_docs)] use tonic::codegen::*; #[doc = " A service for creating and managing Vertex AI's pipelines. This includes both"] #[doc = " `TrainingPipeline` resources (used for AutoML and custom training) and"] #[doc = " `PipelineJob` resources (used for Vertex Pipelines)."] pub struct PipelineServiceClient<T> { inner: tonic::client::Grpc<T>, } impl PipelineServiceClient<tonic::transport::Channel> { #[doc = r" Attempt to create a new client by connecting to a given endpoint."] pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> where D: std::convert::TryInto<tonic::transport::Endpoint>, D::Error: Into<StdError>, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl<T> PipelineServiceClient<T> where T: tonic::client::GrpcService<tonic::body::BoxBody>, T::ResponseBody: Body + HttpBody + Send + 'static, T::Error: Into<StdError>, <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self { let inner = tonic::client::Grpc::with_interceptor(inner, interceptor); Self { inner } } #[doc = " Creates a TrainingPipeline. A created TrainingPipeline right away will be"] #[doc = " attempted to be run."] pub async fn create_training_pipeline( &mut self, request: impl tonic::IntoRequest<super::CreateTrainingPipelineRequest>, ) -> Result<tonic::Response<super::TrainingPipeline>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.PipelineService/CreateTrainingPipeline", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Gets a TrainingPipeline."] pub async fn get_training_pipeline( &mut self, request: impl tonic::IntoRequest<super::GetTrainingPipelineRequest>, ) -> Result<tonic::Response<super::TrainingPipeline>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.PipelineService/GetTrainingPipeline", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Lists TrainingPipelines in a Location."] pub async fn list_training_pipelines( &mut self, request: impl tonic::IntoRequest<super::ListTrainingPipelinesRequest>, ) -> Result<tonic::Response<super::ListTrainingPipelinesResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.PipelineService/ListTrainingPipelines", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Deletes a TrainingPipeline."] pub async fn delete_training_pipeline( &mut self, request: impl tonic::IntoRequest<super::DeleteTrainingPipelineRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.PipelineService/DeleteTrainingPipeline", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Cancels a TrainingPipeline."] #[doc = " Starts asynchronous cancellation on the TrainingPipeline. The server"] #[doc = " makes a best effort to cancel the pipeline, but success is not"] #[doc = " guaranteed. Clients can use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline] or"] #[doc = " other methods to check whether the cancellation succeeded or whether the"] #[doc = " pipeline completed despite cancellation. On successful cancellation,"] #[doc = " the TrainingPipeline is not deleted; instead it becomes a pipeline with"] #[doc = " a [TrainingPipeline.error][google.cloud.aiplatform.v1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,"] #[doc = " corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1.TrainingPipeline.state] is set to"] #[doc = " `CANCELLED`."] pub async fn cancel_training_pipeline( &mut self, request: impl tonic::IntoRequest<super::CancelTrainingPipelineRequest>, ) -> 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.cloud.aiplatform.v1.PipelineService/CancelTrainingPipeline", ); self.inner.unary(request.into_request(), path, codec).await } } impl<T: Clone> Clone for PipelineServiceClient<T> { fn clone(&self) -> Self { Self { inner: self.inner.clone(), } } } impl<T> std::fmt::Debug for PipelineServiceClient<T> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "PipelineServiceClient {{ ... }}") } } } /// Request message for [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct PredictRequest { /// Required. The name of the Endpoint requested to serve the prediction. /// Format: /// `projects/{project}/locations/{location}/endpoints/{endpoint}` #[prost(string, tag = "1")] pub endpoint: std::string::String, /// Required. The instances that are the input to the prediction call. /// A DeployedModel may have an upper limit on the number of instances it /// supports per request, and when it is exceeded the prediction call errors /// in case of AutoML Models, or, in case of customer created Models, the /// behaviour is as documented by that Model. /// The schema of any single instance may be specified via Endpoint's /// DeployedModels' [Model's][google.cloud.aiplatform.v1.DeployedModel.model] /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] /// [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. #[prost(message, repeated, tag = "2")] pub instances: ::std::vec::Vec<::prost_types::Value>, /// The parameters that govern the prediction. The schema of the parameters may /// be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model] /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] /// [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. #[prost(message, optional, tag = "3")] pub parameters: ::std::option::Option<::prost_types::Value>, } /// Response message for [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct PredictResponse { /// The predictions that are the output of the predictions call. /// The schema of any single prediction may be specified via Endpoint's /// DeployedModels' [Model's ][google.cloud.aiplatform.v1.DeployedModel.model] /// [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] /// [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri]. #[prost(message, repeated, tag = "1")] pub predictions: ::std::vec::Vec<::prost_types::Value>, /// ID of the Endpoint's DeployedModel that served this prediction. #[prost(string, tag = "2")] pub deployed_model_id: std::string::String, } #[doc = r" Generated client implementations."] pub mod prediction_service_client { #![allow(unused_variables, dead_code, missing_docs)] use tonic::codegen::*; #[doc = " A service for online predictions and explanations."] pub struct PredictionServiceClient<T> { inner: tonic::client::Grpc<T>, } impl PredictionServiceClient<tonic::transport::Channel> { #[doc = r" Attempt to create a new client by connecting to a given endpoint."] pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> where D: std::convert::TryInto<tonic::transport::Endpoint>, D::Error: Into<StdError>, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl<T> PredictionServiceClient<T> where T: tonic::client::GrpcService<tonic::body::BoxBody>, T::ResponseBody: Body + HttpBody + Send + 'static, T::Error: Into<StdError>, <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self { let inner = tonic::client::Grpc::with_interceptor(inner, interceptor); Self { inner } } #[doc = " Perform an online prediction."] pub async fn predict( &mut self, request: impl tonic::IntoRequest<super::PredictRequest>, ) -> Result<tonic::Response<super::PredictResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.PredictionService/Predict", ); self.inner.unary(request.into_request(), path, codec).await } } impl<T: Clone> Clone for PredictionServiceClient<T> { fn clone(&self) -> Self { Self { inner: self.inner.clone(), } } } impl<T> std::fmt::Debug for PredictionServiceClient<T> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "PredictionServiceClient {{ ... }}") } } } /// Request message for [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSpecialistPoolRequest { /// Required. The parent Project name for the new SpecialistPool. /// The form is `projects/{project}/locations/{location}`. #[prost(string, tag = "1")] pub parent: std::string::String, /// Required. The SpecialistPool to create. #[prost(message, optional, tag = "2")] pub specialist_pool: ::std::option::Option<SpecialistPool>, } /// Runtime operation information for /// [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSpecialistPoolOperationMetadata { /// The operation generic information. #[prost(message, optional, tag = "1")] pub generic_metadata: ::std::option::Option<GenericOperationMetadata>, } /// Request message for [SpecialistPoolService.GetSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.GetSpecialistPool]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSpecialistPoolRequest { /// Required. The name of the SpecialistPool resource. /// The form is /// `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`. #[prost(string, tag = "1")] pub name: std::string::String, } /// Request message for [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSpecialistPoolsRequest { /// Required. The name of the SpecialistPool's parent resource. /// Format: `projects/{project}/locations/{location}` #[prost(string, tag = "1")] pub parent: std::string::String, /// The standard list page size. #[prost(int32, tag = "2")] pub page_size: i32, /// The standard list page token. /// Typically obtained by [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token] of /// the previous [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools] call. Return /// first page if empty. #[prost(string, tag = "3")] pub page_token: std::string::String, /// Mask specifying which fields to read. FieldMask represents a set of #[prost(message, optional, tag = "4")] pub read_mask: ::std::option::Option<::prost_types::FieldMask>, } /// Response message for [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSpecialistPoolsResponse { /// A list of SpecialistPools that matches the specified filter in the request. #[prost(message, repeated, tag = "1")] pub specialist_pools: ::std::vec::Vec<SpecialistPool>, /// The standard List next-page token. #[prost(string, tag = "2")] pub next_page_token: std::string::String, } /// Request message for [SpecialistPoolService.DeleteSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.DeleteSpecialistPool]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSpecialistPoolRequest { /// Required. The resource name of the SpecialistPool to delete. Format: /// `projects/{project}/locations/{location}/specialistPools/{specialist_pool}` #[prost(string, tag = "1")] pub name: std::string::String, /// If set to true, any specialist managers in this SpecialistPool will also be /// deleted. (Otherwise, the request will only work if the SpecialistPool has /// no specialist managers.) #[prost(bool, tag = "2")] pub force: bool, } /// Request message for [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateSpecialistPoolRequest { /// Required. The SpecialistPool which replaces the resource on the server. #[prost(message, optional, tag = "1")] pub specialist_pool: ::std::option::Option<SpecialistPool>, /// Required. The update mask applies to the resource. #[prost(message, optional, tag = "2")] pub update_mask: ::std::option::Option<::prost_types::FieldMask>, } /// Runtime operation metadata for /// [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateSpecialistPoolOperationMetadata { /// Output only. The name of the SpecialistPool to which the specialists are being added. /// Format: /// `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}` #[prost(string, tag = "1")] pub specialist_pool: std::string::String, /// The operation generic information. #[prost(message, optional, tag = "2")] pub generic_metadata: ::std::option::Option<GenericOperationMetadata>, } #[doc = r" Generated client implementations."] pub mod specialist_pool_service_client { #![allow(unused_variables, dead_code, missing_docs)] use tonic::codegen::*; #[doc = " A service for creating and managing Customer SpecialistPools."] #[doc = " When customers start Data Labeling jobs, they can reuse/create Specialist"] #[doc = " Pools to bring their own Specialists to label the data."] #[doc = " Customers can add/remove Managers for the Specialist Pool on Cloud console,"] #[doc = " then Managers will get email notifications to manage Specialists and tasks on"] #[doc = " CrowdCompute console."] pub struct SpecialistPoolServiceClient<T> { inner: tonic::client::Grpc<T>, } impl SpecialistPoolServiceClient<tonic::transport::Channel> { #[doc = r" Attempt to create a new client by connecting to a given endpoint."] pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> where D: std::convert::TryInto<tonic::transport::Endpoint>, D::Error: Into<StdError>, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl<T> SpecialistPoolServiceClient<T> where T: tonic::client::GrpcService<tonic::body::BoxBody>, T::ResponseBody: Body + HttpBody + Send + 'static, T::Error: Into<StdError>, <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self { let inner = tonic::client::Grpc::with_interceptor(inner, interceptor); Self { inner } } #[doc = " Creates a SpecialistPool."] pub async fn create_specialist_pool( &mut self, request: impl tonic::IntoRequest<super::CreateSpecialistPoolRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.SpecialistPoolService/CreateSpecialistPool", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Gets a SpecialistPool."] pub async fn get_specialist_pool( &mut self, request: impl tonic::IntoRequest<super::GetSpecialistPoolRequest>, ) -> Result<tonic::Response<super::SpecialistPool>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.SpecialistPoolService/GetSpecialistPool", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Lists SpecialistPools in a Location."] pub async fn list_specialist_pools( &mut self, request: impl tonic::IntoRequest<super::ListSpecialistPoolsRequest>, ) -> Result<tonic::Response<super::ListSpecialistPoolsResponse>, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.SpecialistPoolService/ListSpecialistPools", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Deletes a SpecialistPool as well as all Specialists in the pool."] pub async fn delete_specialist_pool( &mut self, request: impl tonic::IntoRequest<super::DeleteSpecialistPoolRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.SpecialistPoolService/DeleteSpecialistPool", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Updates a SpecialistPool."] pub async fn update_specialist_pool( &mut self, request: impl tonic::IntoRequest<super::UpdateSpecialistPoolRequest>, ) -> Result< tonic::Response<super::super::super::super::longrunning::Operation>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.aiplatform.v1.SpecialistPoolService/UpdateSpecialistPool", ); self.inner.unary(request.into_request(), path, codec).await } } impl<T: Clone> Clone for SpecialistPoolServiceClient<T> { fn clone(&self) -> Self { Self { inner: self.inner.clone(), } } } impl<T> std::fmt::Debug for SpecialistPoolServiceClient<T> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "SpecialistPoolServiceClient {{ ... }}") } } }