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
// This file is @generated by prost-build.
/// A message returned from a device.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceMessage {
#[prost(oneof = "device_message::Contents", tags = "1, 2, 3")]
pub contents: ::core::option::Option<device_message::Contents>,
}
/// Nested message and enum types in `DeviceMessage`.
pub mod device_message {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Contents {
/// Information about the device's state.
#[prost(message, tag = "1")]
StatusUpdate(super::StatusUpdate),
/// The result of a device stream from ADB.
#[prost(message, tag = "2")]
StreamStatus(super::StreamStatus),
/// Data from an open stream.
#[prost(message, tag = "3")]
StreamData(super::StreamData),
}
}
/// A message to an ADB server.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdbMessage {
#[prost(oneof = "adb_message::Contents", tags = "1, 2")]
pub contents: ::core::option::Option<adb_message::Contents>,
}
/// Nested message and enum types in `AdbMessage`.
pub mod adb_message {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Contents {
/// Open a new stream.
#[prost(message, tag = "1")]
Open(super::Open),
/// Send data to a stream.
#[prost(message, tag = "2")]
StreamData(super::StreamData),
}
}
/// A StatusUpdate message given over the ADB protocol for the device state.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StatusUpdate {
/// The device's state
#[prost(enumeration = "status_update::DeviceState", tag = "1")]
pub state: i32,
/// A map of properties with information about this device.
#[prost(btree_map = "string, string", tag = "2")]
pub properties: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// A comma-separated list of "features" that this device supports.
#[prost(string, tag = "3")]
pub features: ::prost::alloc::string::String,
}
/// Nested message and enum types in `StatusUpdate`.
pub mod status_update {
/// The state displayed with the ADB Device when running "adb devices"
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DeviceState {
/// The device state is unknown.
Unspecified = 0,
/// The ADB device is in the "device" status.
Device = 1,
/// The ADB device is in the "recovery" status.
Recovery = 2,
/// The ADB device is in the "rescue" status.
Rescue = 3,
/// The ADB device is in the "sideload" status.
Sideload = 4,
/// The ADB device is in the "missing" status.
Missing = 10,
/// The ADB device is in the "offline" status.
Offline = 11,
/// The ADB device is in the "unauthorized" status.
Unauthorized = 12,
/// The ADB device is in the "authorizing" status.
Authorizing = 13,
/// The ADB device is in the "connecting" status.
Connecting = 14,
}
impl DeviceState {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DeviceState::Unspecified => "DEVICE_STATE_UNSPECIFIED",
DeviceState::Device => "DEVICE",
DeviceState::Recovery => "RECOVERY",
DeviceState::Rescue => "RESCUE",
DeviceState::Sideload => "SIDELOAD",
DeviceState::Missing => "MISSING",
DeviceState::Offline => "OFFLINE",
DeviceState::Unauthorized => "UNAUTHORIZED",
DeviceState::Authorizing => "AUTHORIZING",
DeviceState::Connecting => "CONNECTING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEVICE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"DEVICE" => Some(Self::Device),
"RECOVERY" => Some(Self::Recovery),
"RESCUE" => Some(Self::Rescue),
"SIDELOAD" => Some(Self::Sideload),
"MISSING" => Some(Self::Missing),
"OFFLINE" => Some(Self::Offline),
"UNAUTHORIZED" => Some(Self::Unauthorized),
"AUTHORIZING" => Some(Self::Authorizing),
"CONNECTING" => Some(Self::Connecting),
_ => None,
}
}
}
}
/// The result of a stream.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamStatus {
/// The unique ID of this stream, assigned by the client.
#[prost(int32, tag = "1")]
pub stream_id: i32,
/// The result of the stream. Either "Okay" for success or "Fail" for failure.
#[prost(oneof = "stream_status::Status", tags = "2, 3")]
pub status: ::core::option::Option<stream_status::Status>,
}
/// Nested message and enum types in `StreamStatus`.
pub mod stream_status {
/// The result of the stream. Either "Okay" for success or "Fail" for failure.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Status {
/// Okay for success.
#[prost(message, tag = "2")]
Okay(super::Okay),
/// Fail for failure.
#[prost(message, tag = "3")]
Fail(super::Fail),
}
}
/// Message for opening a new stream.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Open {
/// The unique ID that will be used to talk to this stream. This should
/// probably just be a number that increments for each new Open request.
#[prost(int32, tag = "1")]
pub stream_id: i32,
/// An ADB service to use in the new stream.
#[prost(string, tag = "2")]
pub service: ::prost::alloc::string::String,
}
/// Data for a stream.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamData {
/// The unique ID of this stream, assigned by the client.
#[prost(int32, tag = "1")]
pub stream_id: i32,
/// The data of the stream, either bytes or "Close", indicating that the stream
/// is done.
#[prost(oneof = "stream_data::Contents", tags = "2, 3")]
pub contents: ::core::option::Option<stream_data::Contents>,
}
/// Nested message and enum types in `StreamData`.
pub mod stream_data {
/// The data of the stream, either bytes or "Close", indicating that the stream
/// is done.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Contents {
/// Data in the stream.
#[prost(bytes, tag = "2")]
Data(::prost::bytes::Bytes),
/// The stream is closing. EOF.
#[prost(message, tag = "3")]
Close(super::Close),
}
}
/// Message signifying that the stream is open
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Okay {}
/// Message signifying that the stream failed to open
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Fail {
/// A user-displayable failure reason.
#[prost(string, tag = "1")]
pub reason: ::prost::alloc::string::String,
}
/// Message signifying that the stream closed.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Close {}
/// TestMatrix captures all details about a test. It contains the environment
/// configuration, test specification, test executions and overall state and
/// outcome.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestMatrix {
/// Output only. Unique id set by the service.
#[prost(string, tag = "1")]
pub test_matrix_id: ::prost::alloc::string::String,
/// The cloud project that owns the test matrix.
#[prost(string, tag = "7")]
pub project_id: ::prost::alloc::string::String,
/// Information about the client which invoked the test.
#[prost(message, optional, tag = "10")]
pub client_info: ::core::option::Option<ClientInfo>,
/// Required. How to run the test.
#[prost(message, optional, tag = "3")]
pub test_specification: ::core::option::Option<TestSpecification>,
/// Required. The devices the tests are being executed on.
#[prost(message, optional, tag = "4")]
pub environment_matrix: ::core::option::Option<EnvironmentMatrix>,
/// Output only. The list of test executions that the service creates for
/// this matrix.
#[prost(message, repeated, tag = "5")]
pub test_executions: ::prost::alloc::vec::Vec<TestExecution>,
/// Required. Where the results for the matrix are written.
#[prost(message, optional, tag = "6")]
pub result_storage: ::core::option::Option<ResultStorage>,
/// Output only. Indicates the current progress of the test matrix.
#[prost(enumeration = "TestState", tag = "8")]
pub state: i32,
/// Output only. The time this test matrix was initially created.
#[prost(message, optional, tag = "9")]
pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Describes why the matrix is considered invalid.
/// Only useful for matrices in the INVALID state.
#[prost(enumeration = "InvalidMatrixDetails", tag = "11")]
pub invalid_matrix_details: i32,
/// Output only. Details about why a matrix was deemed invalid.
/// If multiple checks can be safely performed, they will be reported but no
/// assumptions should be made about the length of this list.
#[prost(message, repeated, tag = "22")]
pub extended_invalid_matrix_details: ::prost::alloc::vec::Vec<MatrixErrorDetail>,
/// The number of times a TestExecution should be re-attempted if one or more
/// of its test cases fail for any reason.
/// The maximum number of reruns allowed is 10.
///
/// Default is 0, which implies no reruns.
#[prost(int32, tag = "13")]
pub flaky_test_attempts: i32,
/// Output Only. The overall outcome of the test.
/// Only set when the test matrix state is FINISHED.
#[prost(enumeration = "OutcomeSummary", tag = "14")]
pub outcome_summary: i32,
/// If true, only a single attempt at most will be made to run each
/// execution/shard in the matrix. Flaky test attempts are not affected.
///
/// Normally, 2 or more attempts are made if a potential infrastructure issue
/// is detected.
///
/// This feature is for latency sensitive workloads. The incidence of
/// execution failures may be significantly greater for fail-fast matrices
/// and support is more limited because of that expectation.
#[prost(bool, tag = "17")]
pub fail_fast: bool,
}
/// Describes a single error or issue with a matrix.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MatrixErrorDetail {
/// Output only. The reason for the error. This is a constant value in
/// UPPER_SNAKE_CASE that identifies the cause of the error.
#[prost(string, tag = "1")]
pub reason: ::prost::alloc::string::String,
/// Output only. A human-readable message about how the error in the
/// TestMatrix. Expands on the `reason` field with additional details and
/// possible options to fix the issue.
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
}
/// A single test executed in a single environment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestExecution {
/// Output only. Unique id set by the service.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// Output only. Id of the containing TestMatrix.
#[prost(string, tag = "9")]
pub matrix_id: ::prost::alloc::string::String,
/// Output only. The cloud project that owns the test execution.
#[prost(string, tag = "10")]
pub project_id: ::prost::alloc::string::String,
/// Output only. How to run the test.
#[prost(message, optional, tag = "3")]
pub test_specification: ::core::option::Option<TestSpecification>,
/// Output only. Details about the shard.
#[prost(message, optional, tag = "12")]
pub shard: ::core::option::Option<Shard>,
/// Output only. How the host machine(s) are configured.
#[prost(message, optional, tag = "4")]
pub environment: ::core::option::Option<Environment>,
/// Output only. Indicates the current progress of the test execution
/// (e.g., FINISHED).
#[prost(enumeration = "TestState", tag = "5")]
pub state: i32,
/// Output only. Where the results for this execution are written.
#[prost(message, optional, tag = "11")]
pub tool_results_step: ::core::option::Option<ToolResultsStep>,
/// Output only. The time this test execution was initially created.
#[prost(message, optional, tag = "7")]
pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Additional details about the running test.
#[prost(message, optional, tag = "8")]
pub test_details: ::core::option::Option<TestDetails>,
}
/// A description of how to run the test.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestSpecification {
/// Max time a test execution is allowed to run before it is
/// automatically cancelled.
/// The default value is 5 min.
#[prost(message, optional, tag = "1")]
pub test_timeout: ::core::option::Option<::prost_types::Duration>,
/// Disables video recording. May reduce test latency.
#[prost(bool, tag = "10")]
pub disable_video_recording: bool,
/// Disables performance metrics recording. May reduce test latency.
#[prost(bool, tag = "11")]
pub disable_performance_metrics: bool,
/// Test setup requirements.
#[prost(oneof = "test_specification::Setup", tags = "6, 14")]
pub setup: ::core::option::Option<test_specification::Setup>,
/// Required. The type of test to run.
#[prost(oneof = "test_specification::Test", tags = "2, 3, 9, 13, 15, 17")]
pub test: ::core::option::Option<test_specification::Test>,
}
/// Nested message and enum types in `TestSpecification`.
pub mod test_specification {
/// Test setup requirements.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Setup {
/// Test setup requirements for Android e.g. files to install, bootstrap
/// scripts.
#[prost(message, tag = "6")]
TestSetup(super::TestSetup),
/// Test setup requirements for iOS.
#[prost(message, tag = "14")]
IosTestSetup(super::IosTestSetup),
}
/// Required. The type of test to run.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Test {
/// An Android instrumentation test.
#[prost(message, tag = "2")]
AndroidInstrumentationTest(super::AndroidInstrumentationTest),
/// An Android robo test.
#[prost(message, tag = "3")]
AndroidRoboTest(super::AndroidRoboTest),
/// An Android Application with a Test Loop.
#[prost(message, tag = "9")]
AndroidTestLoop(super::AndroidTestLoop),
/// An iOS XCTest, via an .xctestrun file.
#[prost(message, tag = "13")]
IosXcTest(super::IosXcTest),
/// An iOS application with a test loop.
#[prost(message, tag = "15")]
IosTestLoop(super::IosTestLoop),
/// An iOS Robo test.
#[prost(message, tag = "17")]
IosRoboTest(super::IosRoboTest),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SystraceSetup {
/// Systrace duration in seconds.
/// Should be between 1 and 30 seconds. 0 disables systrace.
#[deprecated]
#[prost(int32, tag = "1")]
pub duration_seconds: i32,
}
/// A description of how to set up the Android device prior to running the test.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestSetup {
/// List of files to push to the device before starting the test.
#[prost(message, repeated, tag = "1")]
pub files_to_push: ::prost::alloc::vec::Vec<DeviceFile>,
/// List of directories on the device to upload to GCS at the end of the test;
/// they must be absolute paths under /sdcard, /storage or /data/local/tmp.
/// Path names are restricted to characters a-z A-Z 0-9 _ - . + and /
///
/// Note: The paths /sdcard and /data will be made available and treated as
/// implicit path substitutions. E.g. if /sdcard on a particular device does
/// not map to external storage, the system will replace it with the external
/// storage path prefix for that device.
#[prost(string, repeated, tag = "2")]
pub directories_to_pull: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. Initial setup APKs to install before the app under test is
/// installed. Currently capped at 100.
#[prost(message, repeated, tag = "29")]
pub initial_setup_apks: ::prost::alloc::vec::Vec<Apk>,
/// APKs to install in addition to those being directly tested. These will be
/// installed after the app under test.
/// Currently capped at 100.
#[prost(message, repeated, tag = "3")]
pub additional_apks: ::prost::alloc::vec::Vec<Apk>,
/// The device will be logged in on this account for the duration of the test.
#[prost(message, optional, tag = "4")]
pub account: ::core::option::Option<Account>,
/// The network traffic profile used for running the test.
/// Available network profiles can be queried by using the
/// NETWORK_CONFIGURATION environment type when calling
/// TestEnvironmentDiscoveryService.GetTestEnvironmentCatalog.
#[prost(string, tag = "5")]
pub network_profile: ::prost::alloc::string::String,
/// Environment variables to set for the test (only applicable for
/// instrumentation tests).
#[prost(message, repeated, tag = "6")]
pub environment_variables: ::prost::alloc::vec::Vec<EnvironmentVariable>,
/// Systrace configuration for the run.
/// Deprecated: Systrace used Python 2 which was sunsetted on 2020-01-01.
/// Systrace is no longer supported in the Cloud Testing API, and no Systrace
/// file will be provided in the results.
#[deprecated]
#[prost(message, optional, tag = "9")]
pub systrace: ::core::option::Option<SystraceSetup>,
/// Whether to prevent all runtime permissions to be granted at app install
#[prost(bool, tag = "23")]
pub dont_autogrant_permissions: bool,
}
/// A description of how to set up an iOS device prior to running the test.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IosTestSetup {
/// The network traffic profile used for running the test.
/// Available network profiles can be queried by using the
/// NETWORK_CONFIGURATION environment type when calling
/// TestEnvironmentDiscoveryService.GetTestEnvironmentCatalog.
#[prost(string, tag = "1")]
pub network_profile: ::prost::alloc::string::String,
/// iOS apps to install in addition to those being directly tested.
#[prost(message, repeated, tag = "2")]
pub additional_ipas: ::prost::alloc::vec::Vec<FileReference>,
/// List of files to push to the device before starting the test.
#[prost(message, repeated, tag = "3")]
pub push_files: ::prost::alloc::vec::Vec<IosDeviceFile>,
/// List of directories on the device to upload to Cloud Storage at the end of
/// the test.
///
/// Directories should either be in a shared directory (such as
/// /private/var/mobile/Media) or within an accessible directory inside the
/// app's filesystem (such as /Documents) by specifying the bundle ID.
#[prost(message, repeated, tag = "4")]
pub pull_directories: ::prost::alloc::vec::Vec<IosDeviceFile>,
}
/// A key-value pair passed as an environment variable to the test.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnvironmentVariable {
/// Key for the environment variable.
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
/// Value for the environment variable.
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
/// Identifies an account and how to log into it.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Account {
/// Required. The type of account, based what it's for (e.g. Google) and what
/// its login mechanism is (e.g. username and password).
#[prost(oneof = "account::AccountType", tags = "1")]
pub account_type: ::core::option::Option<account::AccountType>,
}
/// Nested message and enum types in `Account`.
pub mod account {
/// Required. The type of account, based what it's for (e.g. Google) and what
/// its login mechanism is (e.g. username and password).
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum AccountType {
/// An automatic google login account.
#[prost(message, tag = "1")]
GoogleAuto(super::GoogleAuto),
}
}
/// Enables automatic Google account login.
/// If set, the service automatically generates a Google test account and adds
/// it to the device, before executing the test. Note that test accounts might be
/// reused.
/// Many applications show their full set of functionalities when an account is
/// present on the device. Logging into the device with these generated accounts
/// allows testing more functionalities.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GoogleAuto {}
/// An Android package file to install.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Apk {
/// The path to an APK to be installed on the device before the test begins.
#[prost(message, optional, tag = "1")]
pub location: ::core::option::Option<FileReference>,
/// The java package for the APK to be installed.
/// Value is determined by examining the application's manifest.
#[prost(string, tag = "2")]
pub package_name: ::prost::alloc::string::String,
}
/// An Android App Bundle file format, containing a BundleConfig.pb file,
/// a base module directory, zero or more dynamic feature module directories.
/// <p>See <https://developer.android.com/guide/app-bundle/build> for guidance on
/// building App Bundles.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppBundle {
/// Required. Bundle location information.
#[prost(oneof = "app_bundle::Bundle", tags = "1")]
pub bundle: ::core::option::Option<app_bundle::Bundle>,
}
/// Nested message and enum types in `AppBundle`.
pub mod app_bundle {
/// Required. Bundle location information.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Bundle {
/// .aab file representing the app bundle under test.
#[prost(message, tag = "1")]
BundleLocation(super::FileReference),
}
}
/// A single device file description.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceFile {
/// Required.
#[prost(oneof = "device_file::DeviceFile", tags = "1, 2")]
pub device_file: ::core::option::Option<device_file::DeviceFile>,
}
/// Nested message and enum types in `DeviceFile`.
pub mod device_file {
/// Required.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum DeviceFile {
/// A reference to an opaque binary blob file.
#[prost(message, tag = "1")]
ObbFile(super::ObbFile),
/// A reference to a regular file.
#[prost(message, tag = "2")]
RegularFile(super::RegularFile),
}
}
/// An opaque binary blob file to install on the device before the test starts.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObbFile {
/// Required. OBB file name which must conform to the format as specified by
/// Android
/// e.g. \[main|patch\].0300110.com.example.android.obb
/// which will be installed into
/// \<shared-storage\>/Android/obb/\<package-name\>/
/// on the device.
#[prost(string, tag = "1")]
pub obb_file_name: ::prost::alloc::string::String,
/// Required. Opaque Binary Blob (OBB) file(s) to install on the device.
#[prost(message, optional, tag = "2")]
pub obb: ::core::option::Option<FileReference>,
}
/// A file or directory to install on the device before the test starts.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegularFile {
/// Required. The source file.
#[prost(message, optional, tag = "1")]
pub content: ::core::option::Option<FileReference>,
/// Required. Where to put the content on the device. Must be an absolute,
/// allowlisted path. If the file exists, it will be replaced.
/// The following device-side directories and any of their subdirectories are
/// allowlisted:
/// <p>${EXTERNAL_STORAGE}, /sdcard, or /storage</p>
/// <p>${ANDROID_DATA}/local/tmp, or /data/local/tmp</p>
/// <p>Specifying a path outside of these directory trees is invalid.
///
/// <p> The paths /sdcard and /data will be made available and treated as
/// implicit path substitutions. E.g. if /sdcard on a particular device does
/// not map to external storage, the system will replace it with the external
/// storage path prefix for that device and copy the file there.
///
/// <p> It is strongly advised to use the <a href=
/// "<http://developer.android.com/reference/android/os/Environment.html">>
/// Environment API</a> in app and test code to access files on the device in a
/// portable way.
#[prost(string, tag = "2")]
pub device_path: ::prost::alloc::string::String,
}
/// A file or directory to install on the device before the test starts.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IosDeviceFile {
/// The source file
#[prost(message, optional, tag = "1")]
pub content: ::core::option::Option<FileReference>,
/// The bundle id of the app where this file lives.
///
/// iOS apps sandbox their own filesystem, so app files must specify which app
/// installed on the device.
#[prost(string, tag = "2")]
pub bundle_id: ::prost::alloc::string::String,
/// Location of the file on the device, inside the app's sandboxed filesystem
#[prost(string, tag = "3")]
pub device_path: ::prost::alloc::string::String,
}
/// A test of an Android Application with a Test Loop.
/// The intent \<intent-name\> will be implicitly added, since Games is the only
/// user of this api, for the time being.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndroidTestLoop {
/// The java package for the application under test.
/// The default is determined by examining the application's manifest.
#[prost(string, tag = "2")]
pub app_package_id: ::prost::alloc::string::String,
/// The list of scenarios that should be run during the test.
/// The default is all test loops, derived from the application's
/// manifest.
#[prost(int32, repeated, tag = "3")]
pub scenarios: ::prost::alloc::vec::Vec<i32>,
/// The list of scenario labels that should be run during the test.
/// The scenario labels should map to labels defined in the application's
/// manifest. For example, player_experience and
/// com.google.test.loops.player_experience add all of the loops labeled in the
/// manifest with the com.google.test.loops.player_experience name to the
/// execution.
/// Scenarios can also be specified in the scenarios field.
#[prost(string, repeated, tag = "4")]
pub scenario_labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Required. The Android package to test.
#[prost(oneof = "android_test_loop::AppUnderTest", tags = "1, 5")]
pub app_under_test: ::core::option::Option<android_test_loop::AppUnderTest>,
}
/// Nested message and enum types in `AndroidTestLoop`.
pub mod android_test_loop {
/// Required. The Android package to test.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AppUnderTest {
/// The APK for the application under test.
#[prost(message, tag = "1")]
AppApk(super::FileReference),
/// A multi-apk app bundle for the application under test.
#[prost(message, tag = "5")]
AppBundle(super::AppBundle),
}
}
/// A test of an iOS application that uses the XCTest framework.
/// Xcode supports the option to "build for testing", which generates an
/// .xctestrun file that contains a test specification (arguments, test methods,
/// etc). This test type accepts a zip file containing the .xctestrun file and
/// the corresponding contents of the Build/Products directory that contains all
/// the binaries needed to run the tests.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IosXcTest {
/// Required. The .zip containing the .xctestrun file and the contents of the
/// DerivedData/Build/Products directory.
/// The .xctestrun file in this zip is ignored if the xctestrun field is
/// specified.
#[prost(message, optional, tag = "1")]
pub tests_zip: ::core::option::Option<FileReference>,
/// An .xctestrun file that will override the .xctestrun file in the
/// tests zip. Because the .xctestrun file contains environment variables along
/// with test methods to run and/or ignore, this can be useful for sharding
/// tests. Default is taken from the tests zip.
#[prost(message, optional, tag = "2")]
pub xctestrun: ::core::option::Option<FileReference>,
/// The Xcode version that should be used for the test.
/// Use the TestEnvironmentDiscoveryService to get supported options.
/// Defaults to the latest Xcode version Firebase Test Lab supports.
#[prost(string, tag = "3")]
pub xcode_version: ::prost::alloc::string::String,
/// Output only. The bundle id for the application under test.
#[prost(string, tag = "4")]
pub app_bundle_id: ::prost::alloc::string::String,
/// The option to test special app entitlements. Setting this would re-sign the
/// app having special entitlements with an explicit application-identifier.
/// Currently supports testing aps-environment entitlement.
#[prost(bool, tag = "6")]
pub test_special_entitlements: bool,
}
/// A test of an iOS application that implements one or more game loop scenarios.
/// This test type accepts an archived application (.ipa file) and a list of
/// integer scenarios that will be executed on the app sequentially.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IosTestLoop {
/// Required. The .ipa of the application to test.
#[prost(message, optional, tag = "1")]
pub app_ipa: ::core::option::Option<FileReference>,
/// The list of scenarios that should be run during the test. Defaults to the
/// single scenario 0 if unspecified.
#[prost(int32, repeated, tag = "2")]
pub scenarios: ::prost::alloc::vec::Vec<i32>,
/// Output only. The bundle id for the application under test.
#[prost(string, tag = "3")]
pub app_bundle_id: ::prost::alloc::string::String,
}
/// A test that explores an iOS application on an iOS device.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IosRoboTest {
/// Required. The ipa stored at this file should be used to run the test.
#[prost(message, optional, tag = "1")]
pub app_ipa: ::core::option::Option<FileReference>,
/// The bundle ID for the app-under-test.
/// This is determined by examining the application's "Info.plist" file.
#[prost(string, tag = "4")]
pub app_bundle_id: ::prost::alloc::string::String,
/// An optional Roboscript to customize the crawl. See
/// <https://firebase.google.com/docs/test-lab/android/robo-scripts-reference>
/// for more information about Roboscripts.
#[prost(message, optional, tag = "5")]
pub robo_script: ::core::option::Option<FileReference>,
}
/// A test of an Android application that can control an Android component
/// independently of its normal lifecycle.
/// Android instrumentation tests run an application APK and test APK inside the
/// same process on a virtual or physical AndroidDevice. They also specify
/// a test runner class, such as com.google.GoogleTestRunner, which can vary
/// on the specific instrumentation framework chosen.
///
/// See <<https://developer.android.com/training/testing/fundamentals>> for
/// more information on types of Android tests.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndroidInstrumentationTest {
/// Required. The APK containing the test code to be executed.
#[prost(message, optional, tag = "2")]
pub test_apk: ::core::option::Option<FileReference>,
/// The java package for the application under test.
/// The default value is determined by examining the application's manifest.
#[prost(string, tag = "3")]
pub app_package_id: ::prost::alloc::string::String,
/// The java package for the test to be executed.
/// The default value is determined by examining the application's manifest.
#[prost(string, tag = "4")]
pub test_package_id: ::prost::alloc::string::String,
/// The InstrumentationTestRunner class.
/// The default value is determined by examining the application's manifest.
#[prost(string, tag = "5")]
pub test_runner_class: ::prost::alloc::string::String,
/// Each target must be fully qualified with the package name or class name,
/// in one of these formats:
///
/// - "package package_name"
/// - "class package_name.class_name"
/// - "class package_name.class_name#method_name"
///
/// If empty, all targets in the module will be run.
#[prost(string, repeated, tag = "6")]
pub test_targets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The option of whether running each test within its own invocation of
/// instrumentation with Android Test Orchestrator or not.
/// ** Orchestrator is only compatible with AndroidJUnitRunner version 1.1 or
/// higher! **
/// Orchestrator offers the following benefits:
///
/// - No shared state
/// - Crashes are isolated
/// - Logs are scoped per test
///
/// See
/// <<https://developer.android.com/training/testing/junit-runner.html#using-android-test-orchestrator>>
/// for more information about Android Test Orchestrator.
///
/// If not set, the test will be run without the orchestrator.
#[prost(enumeration = "OrchestratorOption", tag = "7")]
pub orchestrator_option: i32,
/// The option to run tests in multiple shards in parallel.
#[prost(message, optional, tag = "9")]
pub sharding_option: ::core::option::Option<ShardingOption>,
/// Required.
#[prost(oneof = "android_instrumentation_test::AppUnderTest", tags = "1, 8")]
pub app_under_test: ::core::option::Option<
android_instrumentation_test::AppUnderTest,
>,
}
/// Nested message and enum types in `AndroidInstrumentationTest`.
pub mod android_instrumentation_test {
/// Required.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AppUnderTest {
/// The APK for the application under test.
#[prost(message, tag = "1")]
AppApk(super::FileReference),
/// A multi-apk app bundle for the application under test.
#[prost(message, tag = "8")]
AppBundle(super::AppBundle),
}
}
/// A test of an android application that explores the application on a virtual
/// or physical Android Device, finding culprits and crashes as it goes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndroidRoboTest {
/// The java package for the application under test.
/// The default value is determined by examining the application's manifest.
#[prost(string, tag = "2")]
pub app_package_id: ::prost::alloc::string::String,
/// The initial activity that should be used to start the app.
#[prost(string, tag = "3")]
pub app_initial_activity: ::prost::alloc::string::String,
/// The max depth of the traversal stack Robo can explore. Needs to be at least
/// 2 to make Robo explore the app beyond the first activity.
/// Default is 50.
#[deprecated]
#[prost(int32, tag = "7")]
pub max_depth: i32,
/// The max number of steps Robo can execute.
/// Default is no limit.
#[deprecated]
#[prost(int32, tag = "8")]
pub max_steps: i32,
/// A set of directives Robo should apply during the crawl.
/// This allows users to customize the crawl. For example, the username and
/// password for a test account can be provided.
#[prost(message, repeated, tag = "11")]
pub robo_directives: ::prost::alloc::vec::Vec<RoboDirective>,
/// The mode in which Robo should run. Most clients should allow the server to
/// populate this field automatically.
#[prost(enumeration = "RoboMode", tag = "14")]
pub robo_mode: i32,
/// A JSON file with a sequence of actions Robo should perform as a prologue
/// for the crawl.
#[prost(message, optional, tag = "13")]
pub robo_script: ::core::option::Option<FileReference>,
/// The intents used to launch the app for the crawl.
/// If none are provided, then the main launcher activity is launched.
/// If some are provided, then only those provided are launched (the main
/// launcher activity must be provided explicitly).
#[prost(message, repeated, tag = "15")]
pub starting_intents: ::prost::alloc::vec::Vec<RoboStartingIntent>,
/// Required.
#[prost(oneof = "android_robo_test::AppUnderTest", tags = "1, 16")]
pub app_under_test: ::core::option::Option<android_robo_test::AppUnderTest>,
}
/// Nested message and enum types in `AndroidRoboTest`.
pub mod android_robo_test {
/// Required.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AppUnderTest {
/// The APK for the application under test.
#[prost(message, tag = "1")]
AppApk(super::FileReference),
/// A multi-apk app bundle for the application under test.
#[prost(message, tag = "16")]
AppBundle(super::AppBundle),
}
}
/// Directs Robo to interact with a specific UI element if it is encountered
/// during the crawl. Currently, Robo can perform text entry or element click.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RoboDirective {
/// Required. The android resource name of the target UI element.
/// For example,
/// in Java: R.string.foo
/// in xml: @string/foo
/// Only the "foo" part is needed.
/// Reference doc:
/// <https://developer.android.com/guide/topics/resources/accessing-resources.html>
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
/// The text that Robo is directed to set. If left empty, the directive will be
/// treated as a CLICK on the element matching the resource_name.
#[prost(string, tag = "2")]
pub input_text: ::prost::alloc::string::String,
/// Required. The type of action that Robo should perform on the specified
/// element.
#[prost(enumeration = "RoboActionType", tag = "3")]
pub action_type: i32,
}
/// Message for specifying the start activities to crawl.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RoboStartingIntent {
/// Timeout in seconds for each intent.
#[prost(message, optional, tag = "3")]
pub timeout: ::core::option::Option<::prost_types::Duration>,
/// Required. Intent details to start an activity.
#[prost(oneof = "robo_starting_intent::StartingIntent", tags = "1, 2, 4")]
pub starting_intent: ::core::option::Option<robo_starting_intent::StartingIntent>,
}
/// Nested message and enum types in `RoboStartingIntent`.
pub mod robo_starting_intent {
/// Required. Intent details to start an activity.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StartingIntent {
/// An intent that starts the main launcher activity.
#[prost(message, tag = "1")]
LauncherActivity(super::LauncherActivityIntent),
/// An intent that starts an activity with specific details.
#[prost(message, tag = "2")]
StartActivity(super::StartActivityIntent),
/// Skips the starting activity
#[prost(message, tag = "4")]
NoActivity(super::NoActivityIntent),
}
}
/// Specifies an intent that starts the main launcher activity.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LauncherActivityIntent {}
/// A starting intent specified by an action, uri, and categories.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartActivityIntent {
/// Action name.
/// Required for START_ACTIVITY.
#[prost(string, tag = "2")]
pub action: ::prost::alloc::string::String,
/// URI for the action.
#[prost(string, tag = "3")]
pub uri: ::prost::alloc::string::String,
/// Intent categories to set on the intent.
#[prost(string, repeated, tag = "4")]
pub categories: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Skips the starting activity
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NoActivityIntent {}
/// The matrix of environments in which the test is to be executed.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnvironmentMatrix {
/// Required. The environment matrix.
#[prost(oneof = "environment_matrix::EnvironmentMatrix", tags = "1, 2, 3")]
pub environment_matrix: ::core::option::Option<
environment_matrix::EnvironmentMatrix,
>,
}
/// Nested message and enum types in `EnvironmentMatrix`.
pub mod environment_matrix {
/// Required. The environment matrix.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EnvironmentMatrix {
/// A matrix of Android devices.
#[prost(message, tag = "1")]
AndroidMatrix(super::AndroidMatrix),
/// A list of Android devices; the test will be run only on the specified
/// devices.
#[prost(message, tag = "2")]
AndroidDeviceList(super::AndroidDeviceList),
/// A list of iOS devices.
#[prost(message, tag = "3")]
IosDeviceList(super::IosDeviceList),
}
}
/// A list of Android device configurations in which the test is to be executed.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndroidDeviceList {
/// Required. A list of Android devices.
#[prost(message, repeated, tag = "1")]
pub android_devices: ::prost::alloc::vec::Vec<AndroidDevice>,
}
/// A list of iOS device configurations in which the test is to be executed.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IosDeviceList {
/// Required. A list of iOS devices.
#[prost(message, repeated, tag = "1")]
pub ios_devices: ::prost::alloc::vec::Vec<IosDevice>,
}
/// A set of Android device configuration permutations is defined by the
/// the cross-product of the given axes. Internally, the given AndroidMatrix
/// will be expanded into a set of AndroidDevices.
///
/// Only supported permutations will be instantiated. Invalid permutations
/// (e.g., incompatible models/versions) are ignored.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndroidMatrix {
/// Required. The ids of the set of Android device to be used.
/// Use the TestEnvironmentDiscoveryService to get supported options.
#[prost(string, repeated, tag = "1")]
pub android_model_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Required. The ids of the set of Android OS version to be used.
/// Use the TestEnvironmentDiscoveryService to get supported options.
#[prost(string, repeated, tag = "2")]
pub android_version_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Required. The set of locales the test device will enable for testing.
/// Use the TestEnvironmentDiscoveryService to get supported options.
#[prost(string, repeated, tag = "3")]
pub locales: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Required. The set of orientations to test with.
/// Use the TestEnvironmentDiscoveryService to get supported options.
#[prost(string, repeated, tag = "4")]
pub orientations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Information about the client which invoked the test.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientInfo {
/// Required. Client name, such as gcloud.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The list of detailed information about client.
#[prost(message, repeated, tag = "2")]
pub client_info_details: ::prost::alloc::vec::Vec<ClientInfoDetail>,
}
/// Key-value pair of detailed information about the client which invoked the
/// test. Examples: {'Version', '1.0'}, {'Release Track', 'BETA'}.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientInfoDetail {
/// Required. The key of detailed client information.
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
/// Required. The value of detailed client information.
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
/// Locations where the results of running the test are stored.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResultStorage {
/// Required.
#[prost(message, optional, tag = "1")]
pub google_cloud_storage: ::core::option::Option<GoogleCloudStorage>,
/// The tool results history that contains the tool results execution that
/// results are written to.
///
/// If not provided, the service will choose an appropriate value.
#[prost(message, optional, tag = "5")]
pub tool_results_history: ::core::option::Option<ToolResultsHistory>,
/// Output only. The tool results execution that results are written to.
#[prost(message, optional, tag = "6")]
pub tool_results_execution: ::core::option::Option<ToolResultsExecution>,
/// Output only. URL to the results in the Firebase Web Console.
#[prost(string, tag = "7")]
pub results_url: ::prost::alloc::string::String,
}
/// Represents a tool results history resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolResultsHistory {
/// Required. The cloud project that owns the tool results history.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Required. A tool results history ID.
#[prost(string, tag = "2")]
pub history_id: ::prost::alloc::string::String,
}
/// Represents a tool results execution resource.
///
/// This has the results of a TestMatrix.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolResultsExecution {
/// Output only. The cloud project that owns the tool results execution.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Output only. A tool results history ID.
#[prost(string, tag = "2")]
pub history_id: ::prost::alloc::string::String,
/// Output only. A tool results execution ID.
#[prost(string, tag = "3")]
pub execution_id: ::prost::alloc::string::String,
}
/// Represents a tool results step resource.
///
/// This has the results of a TestExecution.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolResultsStep {
/// Output only. The cloud project that owns the tool results step.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Output only. A tool results history ID.
#[prost(string, tag = "2")]
pub history_id: ::prost::alloc::string::String,
/// Output only. A tool results execution ID.
#[prost(string, tag = "3")]
pub execution_id: ::prost::alloc::string::String,
/// Output only. A tool results step ID.
#[prost(string, tag = "4")]
pub step_id: ::prost::alloc::string::String,
}
/// A storage location within Google cloud storage (GCS).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GoogleCloudStorage {
/// Required. The path to a directory in GCS that will
/// eventually contain the results for this test.
/// The requesting user must have write access on the bucket in the supplied
/// path.
#[prost(string, tag = "1")]
pub gcs_path: ::prost::alloc::string::String,
}
/// A reference to a file, used for user inputs.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileReference {
/// Required. The file reference.
#[prost(oneof = "file_reference::File", tags = "1")]
pub file: ::core::option::Option<file_reference::File>,
}
/// Nested message and enum types in `FileReference`.
pub mod file_reference {
/// Required. The file reference.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum File {
/// A path to a file in Google Cloud Storage.
/// Example: gs://build-app-1414623860166/app%40debug-unaligned.apk
/// These paths are expected to be url encoded (percent encoding)
#[prost(string, tag = "1")]
GcsPath(::prost::alloc::string::String),
}
}
/// The environment in which the test is run.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Environment {
/// Required. The environment.
#[prost(oneof = "environment::Environment", tags = "1, 2")]
pub environment: ::core::option::Option<environment::Environment>,
}
/// Nested message and enum types in `Environment`.
pub mod environment {
/// Required. The environment.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Environment {
/// An Android device which must be used with an Android test.
#[prost(message, tag = "1")]
AndroidDevice(super::AndroidDevice),
/// An iOS device which must be used with an iOS test.
#[prost(message, tag = "2")]
IosDevice(super::IosDevice),
}
}
/// A single Android device.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndroidDevice {
/// Required. The id of the Android device to be used.
/// Use the TestEnvironmentDiscoveryService to get supported options.
#[prost(string, tag = "1")]
pub android_model_id: ::prost::alloc::string::String,
/// Required. The id of the Android OS version to be used.
/// Use the TestEnvironmentDiscoveryService to get supported options.
#[prost(string, tag = "2")]
pub android_version_id: ::prost::alloc::string::String,
/// Required. The locale the test device used for testing.
/// Use the TestEnvironmentDiscoveryService to get supported options.
#[prost(string, tag = "3")]
pub locale: ::prost::alloc::string::String,
/// Required. How the device is oriented during the test.
/// Use the TestEnvironmentDiscoveryService to get supported options.
#[prost(string, tag = "4")]
pub orientation: ::prost::alloc::string::String,
}
/// A single iOS device.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IosDevice {
/// Required. The id of the iOS device to be used.
/// Use the TestEnvironmentDiscoveryService to get supported options.
#[prost(string, tag = "1")]
pub ios_model_id: ::prost::alloc::string::String,
/// Required. The id of the iOS major software version to be used.
/// Use the TestEnvironmentDiscoveryService to get supported options.
#[prost(string, tag = "2")]
pub ios_version_id: ::prost::alloc::string::String,
/// Required. The locale the test device used for testing.
/// Use the TestEnvironmentDiscoveryService to get supported options.
#[prost(string, tag = "3")]
pub locale: ::prost::alloc::string::String,
/// Required. How the device is oriented during the test.
/// Use the TestEnvironmentDiscoveryService to get supported options.
#[prost(string, tag = "4")]
pub orientation: ::prost::alloc::string::String,
}
/// Additional details about the progress of the running test.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestDetails {
/// Output only. Human-readable, detailed descriptions of the test's progress.
/// For example: "Provisioning a device", "Starting Test".
///
/// During the course of execution new data may be appended
/// to the end of progress_messages.
#[prost(string, repeated, tag = "3")]
pub progress_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Output only. If the TestState is ERROR, then this string will contain
/// human-readable details about the error.
#[prost(string, tag = "4")]
pub error_message: ::prost::alloc::string::String,
}
/// Details behind an invalid request.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct InvalidRequestDetail {
/// The reason behind the error.
#[prost(enumeration = "invalid_request_detail::Reason", tag = "1")]
pub reason: i32,
}
/// Nested message and enum types in `InvalidRequestDetail`.
pub mod invalid_request_detail {
/// Possible invalid request reasons.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Reason {
/// No reason has been specified - the default.
Unspecified = 0,
/// The request is not valid.
RequestInvalid = 1,
/// One or more of the resources specified in the request is too large.
ResourceTooBig = 2,
/// One or more resources specified in the request cannot be found.
ResourceNotFound = 3,
/// This request is not (currently) supported.
Unsupported = 4,
/// This request is not currently implemented.
NotImplemented = 5,
/// The caller has no permission for storing the test results
ResultStoragePermissionDenied = 6,
}
impl Reason {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Reason::Unspecified => "REASON_UNSPECIFIED",
Reason::RequestInvalid => "REQUEST_INVALID",
Reason::ResourceTooBig => "RESOURCE_TOO_BIG",
Reason::ResourceNotFound => "RESOURCE_NOT_FOUND",
Reason::Unsupported => "UNSUPPORTED",
Reason::NotImplemented => "NOT_IMPLEMENTED",
Reason::ResultStoragePermissionDenied => {
"RESULT_STORAGE_PERMISSION_DENIED"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REASON_UNSPECIFIED" => Some(Self::Unspecified),
"REQUEST_INVALID" => Some(Self::RequestInvalid),
"RESOURCE_TOO_BIG" => Some(Self::ResourceTooBig),
"RESOURCE_NOT_FOUND" => Some(Self::ResourceNotFound),
"UNSUPPORTED" => Some(Self::Unsupported),
"NOT_IMPLEMENTED" => Some(Self::NotImplemented),
"RESULT_STORAGE_PERMISSION_DENIED" => {
Some(Self::ResultStoragePermissionDenied)
}
_ => None,
}
}
}
}
/// Options for enabling sharding.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardingOption {
#[prost(oneof = "sharding_option::Option", tags = "1, 2, 3")]
pub option: ::core::option::Option<sharding_option::Option>,
}
/// Nested message and enum types in `ShardingOption`.
pub mod sharding_option {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Option {
/// Uniformly shards test cases given a total number of shards.
#[prost(message, tag = "1")]
UniformSharding(super::UniformSharding),
/// Shards test cases into the specified groups of packages, classes, and/or
/// methods.
#[prost(message, tag = "2")]
ManualSharding(super::ManualSharding),
/// Shards test based on previous test case timing records.
#[prost(message, tag = "3")]
SmartSharding(super::SmartSharding),
}
}
/// Uniformly shards test cases given a total number of shards.
///
/// For instrumentation tests, it will be translated to "-e numShard" and "-e
/// shardIndex" AndroidJUnitRunner arguments. With uniform sharding enabled,
/// specifying either of these sharding arguments via `environment_variables` is
/// invalid.
///
/// Based on the sharding mechanism AndroidJUnitRunner uses, there is no
/// guarantee that test cases will be distributed uniformly across all shards.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UniformSharding {
/// Required. The total number of shards to create. This must always be a
/// positive number that is no greater than the total number of test cases.
/// When you select one or more physical devices, the number of shards must be
/// <= 50. When you select one or more ARM virtual devices, it must be <= 200.
/// When you select only x86 virtual devices, it must be <= 500.
#[prost(int32, tag = "1")]
pub num_shards: i32,
}
/// Shards test cases into the specified groups of packages, classes, and/or
/// methods.
///
/// With manual sharding enabled, specifying test targets via
/// environment_variables or in InstrumentationTest is invalid.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ManualSharding {
/// Required. Group of packages, classes, and/or test methods to be run for
/// each manually-created shard. You must specify at least one shard if this
/// field is present. When you select one or more physical devices, the number
/// of repeated test_targets_for_shard must be <= 50. When you select one or
/// more ARM virtual devices, it must be <= 200. When you select only x86
/// virtual devices, it must be <= 500.
#[prost(message, repeated, tag = "1")]
pub test_targets_for_shard: ::prost::alloc::vec::Vec<TestTargetsForShard>,
}
/// Test targets for a shard.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestTargetsForShard {
/// Group of packages, classes, and/or test methods to be run for each shard.
/// The targets need to be specified in AndroidJUnitRunner argument format. For
/// example, "package com.my.packages" "class com.my.package.MyClass".
///
/// The number of test_targets must be greater than 0.
#[prost(string, repeated, tag = "1")]
pub test_targets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Shards test based on previous test case timing records.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SmartSharding {
/// The amount of time tests within a shard should take.
///
/// Default: 300 seconds (5 minutes).
/// The minimum allowed: 120 seconds (2 minutes).
///
/// The shard count is dynamically set based on time, up to the maximum shard
/// limit (described below). To guarantee at least one test case for each
/// shard, the number of shards will not exceed the number of test cases. Shard
/// duration will be exceeded if:
///
/// - The maximum shard limit is reached and there is more calculated test time
/// remaining to allocate into shards.
/// - Any individual test is estimated to be longer than the targeted shard
/// duration.
///
/// Shard duration is not guaranteed because smart sharding uses test case
/// history and default durations which may not be accurate. The rules for
/// finding the test case timing records are:
///
/// - If the service has processed a test case in the last 30 days, the record
/// of the latest successful test case will be used.
/// - For new test cases, the average duration of other known test cases will
/// be used.
/// - If there are no previous test case timing records available, the default
/// test case duration is 15 seconds.
///
/// Because the actual shard duration can exceed the targeted shard duration,
/// we recommend that you set the targeted value at least 5 minutes less than
/// the maximum allowed test timeout (45 minutes for physical devices and 60
/// minutes for virtual), or that you use the custom test timeout value that
/// you set. This approach avoids cancelling the shard before all tests can
/// finish.
///
/// Note that there is a limit for maximum number of shards. When you select
/// one or more physical devices, the number of shards must be <= 50. When you
/// select one or more ARM virtual devices, it must be <= 200. When you select
/// only x86 virtual devices, it must be <= 500. To guarantee at least one test
/// case for per shard, the number of shards will not exceed the number of test
/// cases. Each shard created counts toward daily test quota.
#[prost(message, optional, tag = "1")]
pub targeted_shard_duration: ::core::option::Option<::prost_types::Duration>,
}
/// Output only. Details about the shard.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Shard {
/// Output only. The index of the shard among all the shards.
#[prost(int32, tag = "1")]
pub shard_index: i32,
/// Output only. The total number of shards.
#[prost(int32, tag = "2")]
pub num_shards: i32,
/// Output only. Test targets for each shard. Only set for manual sharding.
#[prost(message, optional, tag = "3")]
pub test_targets_for_shard: ::core::option::Option<TestTargetsForShard>,
/// Output only. The estimated shard duration based on previous test case
/// timing records, if available.
#[prost(message, optional, tag = "4")]
pub estimated_shard_duration: ::core::option::Option<::prost_types::Duration>,
}
/// Request to submit a matrix of tests for execution.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTestMatrixRequest {
/// The GCE project under which this job will run.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// The matrix of tests that the user wants to run.
#[prost(message, optional, tag = "2")]
pub test_matrix: ::core::option::Option<TestMatrix>,
/// A string id used to detect duplicated requests.
/// Ids are automatically scoped to a project, so
/// users should ensure the ID is unique per-project.
/// A UUID is recommended.
///
/// Optional, but strongly recommended.
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
/// Request to get the Test Matrix with the given id.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTestMatrixRequest {
/// Cloud project that owns the test matrix.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Unique test matrix id which was assigned by the service.
#[prost(string, tag = "2")]
pub test_matrix_id: ::prost::alloc::string::String,
}
/// Request to stop running all of the tests in the specified matrix.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelTestMatrixRequest {
/// Cloud project that owns the test.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Test matrix that will be canceled.
#[prost(string, tag = "2")]
pub test_matrix_id: ::prost::alloc::string::String,
}
/// Response containing the current state of the specified test matrix.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CancelTestMatrixResponse {
/// The current rolled-up state of the test matrix.
/// If this state is already final, then the cancelation request will
/// have no effect.
#[prost(enumeration = "TestState", tag = "1")]
pub test_state: i32,
}
/// Specifies how to execute the test.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrchestratorOption {
/// Default value: the server will choose the mode. Currently implies that
/// the test will run without the orchestrator. In the future,
/// all instrumentation tests will be run with the orchestrator.
/// Using the orchestrator is highly encouraged because of all the benefits it
/// offers.
Unspecified = 0,
/// Run test using orchestrator.
/// ** Only compatible with AndroidJUnitRunner version 1.1 or higher! **
/// Recommended.
UseOrchestrator = 1,
/// Run test without using orchestrator.
DoNotUseOrchestrator = 2,
}
impl OrchestratorOption {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
OrchestratorOption::Unspecified => "ORCHESTRATOR_OPTION_UNSPECIFIED",
OrchestratorOption::UseOrchestrator => "USE_ORCHESTRATOR",
OrchestratorOption::DoNotUseOrchestrator => "DO_NOT_USE_ORCHESTRATOR",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORCHESTRATOR_OPTION_UNSPECIFIED" => Some(Self::Unspecified),
"USE_ORCHESTRATOR" => Some(Self::UseOrchestrator),
"DO_NOT_USE_ORCHESTRATOR" => Some(Self::DoNotUseOrchestrator),
_ => None,
}
}
}
/// The mode in which Robo should run.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RoboMode {
/// This means that the server should choose the mode.
/// Recommended.
Unspecified = 0,
/// Runs Robo in UIAutomator-only mode without app resigning
RoboVersion1 = 1,
/// Runs Robo in standard Espresso with UIAutomator fallback
RoboVersion2 = 2,
}
impl RoboMode {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
RoboMode::Unspecified => "ROBO_MODE_UNSPECIFIED",
RoboMode::RoboVersion1 => "ROBO_VERSION_1",
RoboMode::RoboVersion2 => "ROBO_VERSION_2",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ROBO_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"ROBO_VERSION_1" => Some(Self::RoboVersion1),
"ROBO_VERSION_2" => Some(Self::RoboVersion2),
_ => None,
}
}
}
/// Actions which Robo can perform on UI elements.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RoboActionType {
/// DO NOT USE. For proto versioning only.
ActionTypeUnspecified = 0,
/// Direct Robo to click on the specified element. No-op if specified element
/// is not clickable.
SingleClick = 1,
/// Direct Robo to enter text on the specified element. No-op if specified
/// element is not enabled or does not allow text entry.
EnterText = 2,
/// Direct Robo to ignore interactions with a specific element.
Ignore = 3,
}
impl RoboActionType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
RoboActionType::ActionTypeUnspecified => "ACTION_TYPE_UNSPECIFIED",
RoboActionType::SingleClick => "SINGLE_CLICK",
RoboActionType::EnterText => "ENTER_TEXT",
RoboActionType::Ignore => "IGNORE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ACTION_TYPE_UNSPECIFIED" => Some(Self::ActionTypeUnspecified),
"SINGLE_CLICK" => Some(Self::SingleClick),
"ENTER_TEXT" => Some(Self::EnterText),
"IGNORE" => Some(Self::Ignore),
_ => None,
}
}
}
/// The detailed reason that a Matrix was deemed INVALID.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum InvalidMatrixDetails {
/// Do not use. For proto versioning only.
Unspecified = 0,
/// The matrix is INVALID, but there are no further details available.
DetailsUnavailable = 1,
/// The input app APK could not be parsed.
MalformedApk = 2,
/// The input test APK could not be parsed.
MalformedTestApk = 3,
/// The AndroidManifest.xml could not be found.
NoManifest = 4,
/// The APK manifest does not declare a package name.
NoPackageName = 5,
/// The APK application ID (aka package name) is invalid.
/// See also
/// <https://developer.android.com/studio/build/application-id>
InvalidPackageName = 31,
/// The test package and app package are the same.
TestSameAsApp = 6,
/// The test apk does not declare an instrumentation.
NoInstrumentation = 7,
/// The input app apk does not have a signature.
NoSignature = 20,
/// The test runner class specified by user or in the test APK's manifest file
/// is not compatible with Android Test Orchestrator.
/// Orchestrator is only compatible with AndroidJUnitRunner version 1.1 or
/// higher.
/// Orchestrator can be disabled by using DO_NOT_USE_ORCHESTRATOR
/// OrchestratorOption.
InstrumentationOrchestratorIncompatible = 18,
/// The test APK does not contain the test runner class specified by the user
/// or in the manifest file. This can be caused by one of the following
/// reasons:
///
/// - the user provided a runner class name that's incorrect, or
/// - the test runner isn't built into the test APK (might be in the app APK
/// instead).
NoTestRunnerClass = 19,
/// A main launcher activity could not be found.
NoLauncherActivity = 8,
/// The app declares one or more permissions that are not allowed.
ForbiddenPermissions = 9,
/// There is a conflict in the provided robo_directives.
InvalidRoboDirectives = 10,
/// There is at least one invalid resource name in the provided
/// robo directives
InvalidResourceName = 33,
/// Invalid definition of action in the robo directives
/// (e.g. a click or ignore action includes an input text field)
InvalidDirectiveAction = 34,
/// There is no test loop intent filter, or the one that is given is
/// not formatted correctly.
TestLoopIntentFilterNotFound = 12,
/// The request contains a scenario label that was not declared in the
/// manifest.
ScenarioLabelNotDeclared = 13,
/// There was an error when parsing a label's value.
ScenarioLabelMalformed = 14,
/// The request contains a scenario number that was not declared in the
/// manifest.
ScenarioNotDeclared = 15,
/// Device administrator applications are not allowed.
DeviceAdminReceiver = 17,
/// The zipped XCTest was malformed. The zip did not contain a single
/// .xctestrun file and the contents of the DerivedData/Build/Products
/// directory.
MalformedXcTestZip = 11,
/// The zipped XCTest was built for the iOS simulator rather than for a
/// physical device.
BuiltForIosSimulator = 24,
/// The .xctestrun file did not specify any test targets.
NoTestsInXcTestZip = 25,
/// One or more of the test targets defined in the .xctestrun file specifies
/// "UseDestinationArtifacts", which is disallowed.
UseDestinationArtifacts = 26,
/// XC tests which run on physical devices must have
/// "IsAppHostedTestBundle" == "true" in the xctestrun file.
TestNotAppHosted = 28,
/// An Info.plist file in the XCTest zip could not be parsed.
PlistCannotBeParsed = 30,
/// The APK is marked as "testOnly".
/// Deprecated and not currently used.
TestOnlyApk = 21,
/// The input IPA could not be parsed.
MalformedIpa = 22,
/// The application doesn't register the game loop URL scheme.
MissingUrlScheme = 35,
/// The iOS application bundle (.app) couldn't be processed.
MalformedAppBundle = 36,
/// APK contains no code.
/// See also
/// <https://developer.android.com/guide/topics/manifest/application-element.html#code>
NoCodeApk = 23,
/// Either the provided input APK path was malformed,
/// the APK file does not exist, or the user does not have permission to
/// access the APK file.
InvalidInputApk = 27,
/// APK is built for a preview SDK which is unsupported
InvalidApkPreviewSdk = 29,
/// The matrix expanded to contain too many executions.
MatrixTooLarge = 37,
/// Not enough test quota to run the executions in this matrix.
TestQuotaExceeded = 39,
/// A required cloud service api is not activated.
/// See:
/// <https://firebase.google.com/docs/test-lab/android/continuous#requirements>
ServiceNotActivated = 40,
/// There was an unknown permission issue running this test.
UnknownPermissionError = 41,
}
impl InvalidMatrixDetails {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
InvalidMatrixDetails::Unspecified => "INVALID_MATRIX_DETAILS_UNSPECIFIED",
InvalidMatrixDetails::DetailsUnavailable => "DETAILS_UNAVAILABLE",
InvalidMatrixDetails::MalformedApk => "MALFORMED_APK",
InvalidMatrixDetails::MalformedTestApk => "MALFORMED_TEST_APK",
InvalidMatrixDetails::NoManifest => "NO_MANIFEST",
InvalidMatrixDetails::NoPackageName => "NO_PACKAGE_NAME",
InvalidMatrixDetails::InvalidPackageName => "INVALID_PACKAGE_NAME",
InvalidMatrixDetails::TestSameAsApp => "TEST_SAME_AS_APP",
InvalidMatrixDetails::NoInstrumentation => "NO_INSTRUMENTATION",
InvalidMatrixDetails::NoSignature => "NO_SIGNATURE",
InvalidMatrixDetails::InstrumentationOrchestratorIncompatible => {
"INSTRUMENTATION_ORCHESTRATOR_INCOMPATIBLE"
}
InvalidMatrixDetails::NoTestRunnerClass => "NO_TEST_RUNNER_CLASS",
InvalidMatrixDetails::NoLauncherActivity => "NO_LAUNCHER_ACTIVITY",
InvalidMatrixDetails::ForbiddenPermissions => "FORBIDDEN_PERMISSIONS",
InvalidMatrixDetails::InvalidRoboDirectives => "INVALID_ROBO_DIRECTIVES",
InvalidMatrixDetails::InvalidResourceName => "INVALID_RESOURCE_NAME",
InvalidMatrixDetails::InvalidDirectiveAction => "INVALID_DIRECTIVE_ACTION",
InvalidMatrixDetails::TestLoopIntentFilterNotFound => {
"TEST_LOOP_INTENT_FILTER_NOT_FOUND"
}
InvalidMatrixDetails::ScenarioLabelNotDeclared => {
"SCENARIO_LABEL_NOT_DECLARED"
}
InvalidMatrixDetails::ScenarioLabelMalformed => "SCENARIO_LABEL_MALFORMED",
InvalidMatrixDetails::ScenarioNotDeclared => "SCENARIO_NOT_DECLARED",
InvalidMatrixDetails::DeviceAdminReceiver => "DEVICE_ADMIN_RECEIVER",
InvalidMatrixDetails::MalformedXcTestZip => "MALFORMED_XC_TEST_ZIP",
InvalidMatrixDetails::BuiltForIosSimulator => "BUILT_FOR_IOS_SIMULATOR",
InvalidMatrixDetails::NoTestsInXcTestZip => "NO_TESTS_IN_XC_TEST_ZIP",
InvalidMatrixDetails::UseDestinationArtifacts => "USE_DESTINATION_ARTIFACTS",
InvalidMatrixDetails::TestNotAppHosted => "TEST_NOT_APP_HOSTED",
InvalidMatrixDetails::PlistCannotBeParsed => "PLIST_CANNOT_BE_PARSED",
InvalidMatrixDetails::TestOnlyApk => "TEST_ONLY_APK",
InvalidMatrixDetails::MalformedIpa => "MALFORMED_IPA",
InvalidMatrixDetails::MissingUrlScheme => "MISSING_URL_SCHEME",
InvalidMatrixDetails::MalformedAppBundle => "MALFORMED_APP_BUNDLE",
InvalidMatrixDetails::NoCodeApk => "NO_CODE_APK",
InvalidMatrixDetails::InvalidInputApk => "INVALID_INPUT_APK",
InvalidMatrixDetails::InvalidApkPreviewSdk => "INVALID_APK_PREVIEW_SDK",
InvalidMatrixDetails::MatrixTooLarge => "MATRIX_TOO_LARGE",
InvalidMatrixDetails::TestQuotaExceeded => "TEST_QUOTA_EXCEEDED",
InvalidMatrixDetails::ServiceNotActivated => "SERVICE_NOT_ACTIVATED",
InvalidMatrixDetails::UnknownPermissionError => "UNKNOWN_PERMISSION_ERROR",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INVALID_MATRIX_DETAILS_UNSPECIFIED" => Some(Self::Unspecified),
"DETAILS_UNAVAILABLE" => Some(Self::DetailsUnavailable),
"MALFORMED_APK" => Some(Self::MalformedApk),
"MALFORMED_TEST_APK" => Some(Self::MalformedTestApk),
"NO_MANIFEST" => Some(Self::NoManifest),
"NO_PACKAGE_NAME" => Some(Self::NoPackageName),
"INVALID_PACKAGE_NAME" => Some(Self::InvalidPackageName),
"TEST_SAME_AS_APP" => Some(Self::TestSameAsApp),
"NO_INSTRUMENTATION" => Some(Self::NoInstrumentation),
"NO_SIGNATURE" => Some(Self::NoSignature),
"INSTRUMENTATION_ORCHESTRATOR_INCOMPATIBLE" => {
Some(Self::InstrumentationOrchestratorIncompatible)
}
"NO_TEST_RUNNER_CLASS" => Some(Self::NoTestRunnerClass),
"NO_LAUNCHER_ACTIVITY" => Some(Self::NoLauncherActivity),
"FORBIDDEN_PERMISSIONS" => Some(Self::ForbiddenPermissions),
"INVALID_ROBO_DIRECTIVES" => Some(Self::InvalidRoboDirectives),
"INVALID_RESOURCE_NAME" => Some(Self::InvalidResourceName),
"INVALID_DIRECTIVE_ACTION" => Some(Self::InvalidDirectiveAction),
"TEST_LOOP_INTENT_FILTER_NOT_FOUND" => {
Some(Self::TestLoopIntentFilterNotFound)
}
"SCENARIO_LABEL_NOT_DECLARED" => Some(Self::ScenarioLabelNotDeclared),
"SCENARIO_LABEL_MALFORMED" => Some(Self::ScenarioLabelMalformed),
"SCENARIO_NOT_DECLARED" => Some(Self::ScenarioNotDeclared),
"DEVICE_ADMIN_RECEIVER" => Some(Self::DeviceAdminReceiver),
"MALFORMED_XC_TEST_ZIP" => Some(Self::MalformedXcTestZip),
"BUILT_FOR_IOS_SIMULATOR" => Some(Self::BuiltForIosSimulator),
"NO_TESTS_IN_XC_TEST_ZIP" => Some(Self::NoTestsInXcTestZip),
"USE_DESTINATION_ARTIFACTS" => Some(Self::UseDestinationArtifacts),
"TEST_NOT_APP_HOSTED" => Some(Self::TestNotAppHosted),
"PLIST_CANNOT_BE_PARSED" => Some(Self::PlistCannotBeParsed),
"TEST_ONLY_APK" => Some(Self::TestOnlyApk),
"MALFORMED_IPA" => Some(Self::MalformedIpa),
"MISSING_URL_SCHEME" => Some(Self::MissingUrlScheme),
"MALFORMED_APP_BUNDLE" => Some(Self::MalformedAppBundle),
"NO_CODE_APK" => Some(Self::NoCodeApk),
"INVALID_INPUT_APK" => Some(Self::InvalidInputApk),
"INVALID_APK_PREVIEW_SDK" => Some(Self::InvalidApkPreviewSdk),
"MATRIX_TOO_LARGE" => Some(Self::MatrixTooLarge),
"TEST_QUOTA_EXCEEDED" => Some(Self::TestQuotaExceeded),
"SERVICE_NOT_ACTIVATED" => Some(Self::ServiceNotActivated),
"UNKNOWN_PERMISSION_ERROR" => Some(Self::UnknownPermissionError),
_ => None,
}
}
}
/// The state (i.e., progress) of a test execution or matrix.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TestState {
/// Do not use. For proto versioning only.
Unspecified = 0,
/// The execution or matrix is being validated.
Validating = 8,
/// The execution or matrix is waiting for resources to become available.
Pending = 1,
/// The execution is currently being processed.
///
/// Can only be set on an execution.
Running = 2,
/// The execution or matrix has terminated normally.
///
/// On a matrix this means that the matrix level processing completed normally,
/// but individual executions may be in an ERROR state.
Finished = 3,
/// The execution or matrix has stopped because it encountered an
/// infrastructure failure.
Error = 4,
/// The execution was not run because it corresponds to a unsupported
/// environment.
///
/// Can only be set on an execution.
UnsupportedEnvironment = 5,
/// The execution was not run because the provided inputs are incompatible with
/// the requested environment.
///
/// Example: requested AndroidVersion is lower than APK's minSdkVersion
///
/// Can only be set on an execution.
IncompatibleEnvironment = 9,
/// The execution was not run because the provided inputs are incompatible with
/// the requested architecture.
///
/// Example: requested device does not support running the native code in
/// the supplied APK
///
/// Can only be set on an execution.
IncompatibleArchitecture = 10,
/// The user cancelled the execution.
///
/// Can only be set on an execution.
Cancelled = 6,
/// The execution or matrix was not run because the provided inputs are not
/// valid.
///
/// Examples: input file is not of the expected type, is malformed/corrupt, or
/// was flagged as malware
Invalid = 7,
}
impl TestState {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
TestState::Unspecified => "TEST_STATE_UNSPECIFIED",
TestState::Validating => "VALIDATING",
TestState::Pending => "PENDING",
TestState::Running => "RUNNING",
TestState::Finished => "FINISHED",
TestState::Error => "ERROR",
TestState::UnsupportedEnvironment => "UNSUPPORTED_ENVIRONMENT",
TestState::IncompatibleEnvironment => "INCOMPATIBLE_ENVIRONMENT",
TestState::IncompatibleArchitecture => "INCOMPATIBLE_ARCHITECTURE",
TestState::Cancelled => "CANCELLED",
TestState::Invalid => "INVALID",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TEST_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"VALIDATING" => Some(Self::Validating),
"PENDING" => Some(Self::Pending),
"RUNNING" => Some(Self::Running),
"FINISHED" => Some(Self::Finished),
"ERROR" => Some(Self::Error),
"UNSUPPORTED_ENVIRONMENT" => Some(Self::UnsupportedEnvironment),
"INCOMPATIBLE_ENVIRONMENT" => Some(Self::IncompatibleEnvironment),
"INCOMPATIBLE_ARCHITECTURE" => Some(Self::IncompatibleArchitecture),
"CANCELLED" => Some(Self::Cancelled),
"INVALID" => Some(Self::Invalid),
_ => None,
}
}
}
/// Outcome summary for a finished test matrix.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OutcomeSummary {
/// Do not use. For proto versioning only.
Unspecified = 0,
/// The test matrix run was successful, for instance:
///
/// - All the test cases passed.
/// - Robo did not detect a crash of the application under test.
Success = 1,
/// A run failed, for instance:
///
/// - One or more test cases failed.
/// - A test timed out.
/// - The application under test crashed.
Failure = 2,
/// Something unexpected happened. The run should still be considered
/// unsuccessful but this is likely a transient problem and re-running the
/// test might be successful.
Inconclusive = 3,
/// All tests were skipped, for instance:
///
/// - All device configurations were incompatible.
Skipped = 4,
}
impl OutcomeSummary {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
OutcomeSummary::Unspecified => "OUTCOME_SUMMARY_UNSPECIFIED",
OutcomeSummary::Success => "SUCCESS",
OutcomeSummary::Failure => "FAILURE",
OutcomeSummary::Inconclusive => "INCONCLUSIVE",
OutcomeSummary::Skipped => "SKIPPED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OUTCOME_SUMMARY_UNSPECIFIED" => Some(Self::Unspecified),
"SUCCESS" => Some(Self::Success),
"FAILURE" => Some(Self::Failure),
"INCONCLUSIVE" => Some(Self::Inconclusive),
"SKIPPED" => Some(Self::Skipped),
_ => None,
}
}
}
/// Generated client implementations.
pub mod test_execution_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// A service for requesting test executions and querying their status.
///
/// This service is part of Firebase Test Lab. To learn about how to use the
/// product, and how to integrate it with your system,
/// visit https://firebase.google.com/docs/test-lab.
///
/// Each test execution will wait for available capacity. It will then be
/// invoked as described. The test may be invoked multiple times if an
/// infrastructure failure is detected. Results and other files generated by
/// the test will be stored in an external storage system.
///
/// The TestExecutionService models this behavior using two resource types:
///
/// - TestMatrix: a group of one or more TestExecutions, built by taking a
/// product of values over a pre-defined set of axes. In the case of Android
/// Tests, for example, device model and OS version are two axes of the matrix.
///
/// - TestExecution: a single execution of one or more test targets on a
/// single device. These are created automatically when a TestMatrix is
/// created.
///
/// This service returns any error codes from the canonical error space (i.e.
/// google.rpc.Code). The errors which may be returned are specified on each
/// method. In addition, any method may return UNAVAILABLE or INTERNAL.
#[derive(Debug, Clone)]
pub struct TestExecutionServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> TestExecutionServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> TestExecutionServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
TestExecutionServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Creates and runs a matrix of tests according to the given specifications.
/// Unsupported environments will be returned in the state UNSUPPORTED.
/// A test matrix is limited to use at most 2000 devices in parallel.
///
/// The returned matrix will not yet contain the executions that will be
/// created for this matrix. Execution creation happens later on and will
/// require a call to GetTestMatrix.
///
/// May return any of the following canonical error codes:
///
/// - PERMISSION_DENIED - if the user is not authorized to write to project
/// - INVALID_ARGUMENT - if the request is malformed or if the matrix tries
/// to use too many simultaneous devices.
pub async fn create_test_matrix(
&mut self,
request: impl tonic::IntoRequest<super::CreateTestMatrixRequest>,
) -> std::result::Result<tonic::Response<super::TestMatrix>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.testing.v1.TestExecutionService/CreateTestMatrix",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.testing.v1.TestExecutionService",
"CreateTestMatrix",
),
);
self.inner.unary(req, path, codec).await
}
/// Checks the status of a test matrix and the executions once they
/// are created.
///
/// The test matrix will contain the list of test executions to run if and only
/// if the resultStorage.toolResultsExecution fields have been populated.
///
/// Note: Flaky test executions may be added to the matrix at a later stage.
///
/// May return any of the following canonical error codes:
///
/// - PERMISSION_DENIED - if the user is not authorized to read project
/// - INVALID_ARGUMENT - if the request is malformed
/// - NOT_FOUND - if the Test Matrix does not exist
pub async fn get_test_matrix(
&mut self,
request: impl tonic::IntoRequest<super::GetTestMatrixRequest>,
) -> std::result::Result<tonic::Response<super::TestMatrix>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.testing.v1.TestExecutionService/GetTestMatrix",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.testing.v1.TestExecutionService",
"GetTestMatrix",
),
);
self.inner.unary(req, path, codec).await
}
/// Cancels unfinished test executions in a test matrix.
/// This call returns immediately and cancellation proceeds asynchronously.
/// If the matrix is already final, this operation will have no effect.
///
/// May return any of the following canonical error codes:
///
/// - PERMISSION_DENIED - if the user is not authorized to read project
/// - INVALID_ARGUMENT - if the request is malformed
/// - NOT_FOUND - if the Test Matrix does not exist
pub async fn cancel_test_matrix(
&mut self,
request: impl tonic::IntoRequest<super::CancelTestMatrixRequest>,
) -> std::result::Result<
tonic::Response<super::CancelTestMatrixResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.testing.v1.TestExecutionService/CancelTestMatrix",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.testing.v1.TestExecutionService",
"CancelTestMatrix",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// A Request for the device session from the session service.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDeviceSessionRequest {
/// Required. The Compute Engine project under which this device will be
/// allocated. "projects/{project_id}"
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. A device session to create.
#[prost(message, optional, tag = "2")]
pub device_session: ::core::option::Option<DeviceSession>,
}
/// Request a list of device sessions in the provided parent matching the given
/// filter.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDeviceSessionsRequest {
/// Required. The name of the parent to request, e.g. "projects/{project_id}"
#[prost(string, tag = "4")]
pub parent: ::prost::alloc::string::String,
/// Optional. The maximum number of DeviceSessions to return.
#[prost(int32, tag = "1")]
pub page_size: i32,
/// Optional. A continuation token for paging.
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
/// Optional. If specified, responses will be filtered by the given filter.
/// Allowed fields are: session_state.
#[prost(string, tag = "3")]
pub filter: ::prost::alloc::string::String,
}
/// A list of device sessions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDeviceSessionsResponse {
/// The sessions matching the specified filter in the given cloud project.
#[prost(message, repeated, tag = "1")]
pub device_sessions: ::prost::alloc::vec::Vec<DeviceSession>,
/// A token, which can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// The request object for a Device Session.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDeviceSessionRequest {
/// Required. Name of the DeviceSession, e.g.
/// "projects/{project_id}/deviceSessions/{session_id}"
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// The request object for cancelling a Device Session.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelDeviceSessionRequest {
/// Required. Name of the DeviceSession, e.g.
/// "projects/{project_id}/deviceSessions/{session_id}"
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// The request object for the UpdateDeviceSession RPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDeviceSessionRequest {
/// Required. DeviceSession to update.
/// The device session's `name` field is used to identify the session to update
/// "projects/{project_id}/deviceSessions/{session_id}"
#[prost(message, optional, tag = "1")]
pub device_session: ::core::option::Option<DeviceSession>,
/// Required. The list of fields to update.
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Protobuf message describing the device message, used from several RPCs.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceSession {
/// Optional. Name of the DeviceSession, e.g.
/// "projects/{project_id}/deviceSessions/{session_id}"
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The title of the DeviceSession to be presented in the UI.
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
/// Output only. Current state of the DeviceSession.
#[prost(enumeration = "device_session::SessionState", tag = "3")]
pub state: i32,
/// Output only. The historical state transitions of the session_state message
/// including the current session state.
#[prost(message, repeated, tag = "14")]
pub state_histories: ::prost::alloc::vec::Vec<device_session::SessionStateEvent>,
/// Output only. The interval of time that this device must be interacted with
/// before it transitions from ACTIVE to TIMEOUT_INACTIVITY.
#[prost(message, optional, tag = "7")]
pub inactivity_timeout: ::core::option::Option<::prost_types::Duration>,
/// Output only. The time that the Session was created.
#[prost(message, optional, tag = "8")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The timestamp that the session first became ACTIVE.
#[prost(message, optional, tag = "9")]
pub active_start_time: ::core::option::Option<::prost_types::Timestamp>,
/// Required. The requested device
#[prost(message, optional, tag = "15")]
pub android_device: ::core::option::Option<AndroidDevice>,
#[prost(oneof = "device_session::Expiration", tags = "13, 5")]
pub expiration: ::core::option::Option<device_session::Expiration>,
}
/// Nested message and enum types in `DeviceSession`.
pub mod device_session {
/// A message encapsulating a series of Session states and the time that the
/// DeviceSession first entered those states.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionStateEvent {
/// Output only. The session_state tracked by this event
#[prost(enumeration = "SessionState", tag = "1")]
pub session_state: i32,
/// Output only. The time that the session_state first encountered that
/// state.
#[prost(message, optional, tag = "2")]
pub event_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. A human-readable message to explain the state.
#[prost(string, tag = "3")]
pub state_message: ::prost::alloc::string::String,
}
/// The state that the device session resides.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SessionState {
/// Default value. This value is unused.
Unspecified = 0,
/// Initial state of a session request. The session is being validated for
/// correctness and a device is not yet requested.
Requested = 1,
/// The session has been validated and is in the queue for a device.
Pending = 2,
/// The session has been granted and the device is accepting
/// connections.
Active = 3,
/// The session duration exceeded the device’s reservation time period and
/// timed out automatically.
Expired = 4,
/// The user is finished with the session and it was canceled by the user
/// while the request was still getting allocated or after allocation and
/// during device usage period.
Finished = 5,
/// Unable to complete the session because the device was unavailable and
/// it failed to allocate through the scheduler. For example, a device not
/// in the catalog was requested or the request expired in the allocation
/// queue.
Unavailable = 6,
/// Unable to complete the session for an internal reason, such as an
/// infrastructure failure.
Error = 7,
}
impl SessionState {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
SessionState::Unspecified => "SESSION_STATE_UNSPECIFIED",
SessionState::Requested => "REQUESTED",
SessionState::Pending => "PENDING",
SessionState::Active => "ACTIVE",
SessionState::Expired => "EXPIRED",
SessionState::Finished => "FINISHED",
SessionState::Unavailable => "UNAVAILABLE",
SessionState::Error => "ERROR",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SESSION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"REQUESTED" => Some(Self::Requested),
"PENDING" => Some(Self::Pending),
"ACTIVE" => Some(Self::Active),
"EXPIRED" => Some(Self::Expired),
"FINISHED" => Some(Self::Finished),
"UNAVAILABLE" => Some(Self::Unavailable),
"ERROR" => Some(Self::Error),
_ => None,
}
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Expiration {
/// Optional. The amount of time that a device will be initially allocated
/// for. This can eventually be extended with the UpdateDeviceSession RPC.
/// Default: 15 minutes.
#[prost(message, tag = "13")]
Ttl(::prost_types::Duration),
/// Optional. If the device is still in use at this time, any connections
/// will be ended and the SessionState will transition from ACTIVE to
/// FINISHED.
#[prost(message, tag = "5")]
ExpireTime(::prost_types::Timestamp),
}
}
/// Generated client implementations.
pub mod direct_access_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// A service for allocating devices and interacting with the live-allocated
/// devices.
///
/// This service is part of Firebase Test Lab. To learn about how to use the
/// product, and how to integrate it with your system,
/// visit https://firebase.google.com/docs/test-lab.
///
/// Each Session will wait for available capacity, at a higher
/// priority over Test Execution. When allocated, the session will be exposed
/// through a stream for integration.
///
/// DirectAccessService is currently available as a preview to select developers.
/// You can register today on behalf of you and your team at
/// https://developer.android.com/studio/preview/android-device-streaming
#[derive(Debug, Clone)]
pub struct DirectAccessServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> DirectAccessServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DirectAccessServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
DirectAccessServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// POST /v1/projects/{project_id}/deviceSessions
pub async fn create_device_session(
&mut self,
request: impl tonic::IntoRequest<super::CreateDeviceSessionRequest>,
) -> std::result::Result<tonic::Response<super::DeviceSession>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.testing.v1.DirectAccessService/CreateDeviceSession",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.testing.v1.DirectAccessService",
"CreateDeviceSession",
),
);
self.inner.unary(req, path, codec).await
}
/// GET /v1/projects/{project_id}/deviceSessions
/// Lists device Sessions owned by the project user.
pub async fn list_device_sessions(
&mut self,
request: impl tonic::IntoRequest<super::ListDeviceSessionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListDeviceSessionsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.testing.v1.DirectAccessService/ListDeviceSessions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.testing.v1.DirectAccessService",
"ListDeviceSessions",
),
);
self.inner.unary(req, path, codec).await
}
/// GET /v1/projects/{project_id}/deviceSessions/{device_session_id}
/// Return a DeviceSession, which documents the allocation status and
/// whether the device is allocated. Clients making requests from this API
/// must poll GetDeviceSession.
pub async fn get_device_session(
&mut self,
request: impl tonic::IntoRequest<super::GetDeviceSessionRequest>,
) -> std::result::Result<tonic::Response<super::DeviceSession>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.testing.v1.DirectAccessService/GetDeviceSession",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.testing.v1.DirectAccessService",
"GetDeviceSession",
),
);
self.inner.unary(req, path, codec).await
}
/// POST
/// /v1/projects/{project_id}/deviceSessions/{device_session_id}:cancel
/// Changes the DeviceSession to state FINISHED and terminates all connections.
/// Canceled sessions are not deleted and can be retrieved or
/// listed by the user until they expire based on the 28 day deletion policy.
pub async fn cancel_device_session(
&mut self,
request: impl tonic::IntoRequest<super::CancelDeviceSessionRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.testing.v1.DirectAccessService/CancelDeviceSession",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.testing.v1.DirectAccessService",
"CancelDeviceSession",
),
);
self.inner.unary(req, path, codec).await
}
/// PATCH
/// /v1/projects/{projectId}/deviceSessions/deviceSessionId}:updateDeviceSession
/// Updates the current device session to the fields described by the
/// update_mask.
pub async fn update_device_session(
&mut self,
request: impl tonic::IntoRequest<super::UpdateDeviceSessionRequest>,
) -> std::result::Result<tonic::Response<super::DeviceSession>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.testing.v1.DirectAccessService/UpdateDeviceSession",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.testing.v1.DirectAccessService",
"UpdateDeviceSession",
),
);
self.inner.unary(req, path, codec).await
}
/// Exposes ADB connection for use with the Adb Device Forwarder project
/// if the reserved device supports ADB.
/// gRPC headers are used to authenticate the Connect RPC, as well as
/// associate to a particular device session.
/// In particular, the user must specify the "X-FTL-Session-Name" header.
pub async fn adb_connect(
&mut self,
request: impl tonic::IntoStreamingRequest<Message = super::AdbMessage>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::DeviceMessage>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.testing.v1.DirectAccessService/AdbConnect",
);
let mut req = request.into_streaming_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.testing.v1.DirectAccessService",
"AdbConnect",
),
);
self.inner.streaming(req, path, codec).await
}
}
}
/// A single device IP block
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceIpBlock {
/// An IP address block in CIDR notation eg: 34.68.194.64/29
#[prost(string, tag = "1")]
pub block: ::prost::alloc::string::String,
/// Whether this block is used by physical or virtual devices
#[prost(enumeration = "DeviceForm", tag = "2")]
pub form: i32,
/// The date this block was added to Firebase Test Lab
#[prost(message, optional, tag = "3")]
pub added_date: ::core::option::Option<super::super::super::r#type::Date>,
}
/// Request to list the currently supported values for an environment type.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTestEnvironmentCatalogRequest {
/// Required. The type of environment that should be listed.
#[prost(
enumeration = "get_test_environment_catalog_request::EnvironmentType",
tag = "1"
)]
pub environment_type: i32,
/// For authorization, the cloud project requesting the TestEnvironmentCatalog.
#[prost(string, tag = "2")]
pub project_id: ::prost::alloc::string::String,
}
/// Nested message and enum types in `GetTestEnvironmentCatalogRequest`.
pub mod get_test_environment_catalog_request {
/// Types of environments the Test API supports.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum EnvironmentType {
/// Do not use. For proto versioning only.
Unspecified = 0,
/// A device running a version of the Android OS.
Android = 1,
/// A device running a version of iOS.
Ios = 3,
/// A network configuration to use when running a test.
NetworkConfiguration = 4,
/// The software environment provided by TestExecutionService.
ProvidedSoftware = 5,
/// The IP blocks used by devices in the test environment.
DeviceIpBlocks = 6,
}
impl EnvironmentType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
EnvironmentType::Unspecified => "ENVIRONMENT_TYPE_UNSPECIFIED",
EnvironmentType::Android => "ANDROID",
EnvironmentType::Ios => "IOS",
EnvironmentType::NetworkConfiguration => "NETWORK_CONFIGURATION",
EnvironmentType::ProvidedSoftware => "PROVIDED_SOFTWARE",
EnvironmentType::DeviceIpBlocks => "DEVICE_IP_BLOCKS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ENVIRONMENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ANDROID" => Some(Self::Android),
"IOS" => Some(Self::Ios),
"NETWORK_CONFIGURATION" => Some(Self::NetworkConfiguration),
"PROVIDED_SOFTWARE" => Some(Self::ProvidedSoftware),
"DEVICE_IP_BLOCKS" => Some(Self::DeviceIpBlocks),
_ => None,
}
}
}
}
/// A description of a test environment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TestEnvironmentCatalog {
/// Output only.
#[prost(
oneof = "test_environment_catalog::EnvironmentCatalog",
tags = "1, 3, 4, 5, 6"
)]
pub environment_catalog: ::core::option::Option<
test_environment_catalog::EnvironmentCatalog,
>,
}
/// Nested message and enum types in `TestEnvironmentCatalog`.
pub mod test_environment_catalog {
/// Output only.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EnvironmentCatalog {
/// Supported Android devices.
#[prost(message, tag = "1")]
AndroidDeviceCatalog(super::AndroidDeviceCatalog),
/// Supported iOS devices.
#[prost(message, tag = "3")]
IosDeviceCatalog(super::IosDeviceCatalog),
/// Supported network configurations.
#[prost(message, tag = "4")]
NetworkConfigurationCatalog(super::NetworkConfigurationCatalog),
/// The software test environment provided by TestExecutionService.
#[prost(message, tag = "5")]
SoftwareCatalog(super::ProvidedSoftwareCatalog),
/// The IP blocks used by devices in the test environment.
#[prost(message, tag = "6")]
DeviceIpBlockCatalog(super::DeviceIpBlockCatalog),
}
}
/// List of IP blocks used by the Firebase Test Lab
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceIpBlockCatalog {
/// The device IP blocks used by Firebase Test Lab
#[prost(message, repeated, tag = "1")]
pub ip_blocks: ::prost::alloc::vec::Vec<DeviceIpBlock>,
}
/// The currently supported Android devices.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndroidDeviceCatalog {
/// The set of supported Android device models.
#[prost(message, repeated, tag = "1")]
pub models: ::prost::alloc::vec::Vec<AndroidModel>,
/// The set of supported Android OS versions.
#[prost(message, repeated, tag = "2")]
pub versions: ::prost::alloc::vec::Vec<AndroidVersion>,
/// The set of supported runtime configurations.
#[prost(message, optional, tag = "3")]
pub runtime_configuration: ::core::option::Option<AndroidRuntimeConfiguration>,
}
/// Android configuration that can be selected at the time a test is run.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndroidRuntimeConfiguration {
/// The set of available locales.
#[prost(message, repeated, tag = "1")]
pub locales: ::prost::alloc::vec::Vec<Locale>,
/// The set of available orientations.
#[prost(message, repeated, tag = "2")]
pub orientations: ::prost::alloc::vec::Vec<Orientation>,
}
/// A description of an Android device tests may be run on.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndroidModel {
/// The unique opaque id for this model.
/// Use this for invoking the TestExecutionService.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The human-readable marketing name for this device model.
/// Examples: "Nexus 5", "Galaxy S5".
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
/// The manufacturer of this device.
#[prost(string, tag = "3")]
pub manufacturer: ::prost::alloc::string::String,
/// The company that this device is branded with.
/// Example: "Google", "Samsung".
#[prost(string, tag = "9")]
pub brand: ::prost::alloc::string::String,
/// The name of the industrial design.
/// This corresponds to android.os.Build.DEVICE.
#[prost(string, tag = "10")]
pub codename: ::prost::alloc::string::String,
/// Whether this device is virtual or physical.
#[prost(enumeration = "DeviceForm", tag = "4")]
pub form: i32,
/// Whether this device is a phone, tablet, wearable, etc.
#[prost(enumeration = "DeviceFormFactor", tag = "16")]
pub form_factor: i32,
/// Version-specific information of an Android model.
#[prost(message, repeated, tag = "21")]
pub per_version_info: ::prost::alloc::vec::Vec<PerAndroidVersionInfo>,
/// Screen size in the horizontal (X) dimension measured in pixels.
#[prost(int32, tag = "5")]
pub screen_x: i32,
/// Screen size in the vertical (Y) dimension measured in pixels.
#[prost(int32, tag = "6")]
pub screen_y: i32,
/// Screen density in DPI.
/// This corresponds to ro.sf.lcd_density
#[prost(int32, tag = "12")]
pub screen_density: i32,
/// True if and only if tests with this model are recorded by stitching
/// together screenshots. See use_low_spec_video_recording in device config.
#[prost(bool, tag = "17")]
pub low_fps_video_recording: bool,
/// The set of Android versions this device supports.
#[prost(string, repeated, tag = "7")]
pub supported_version_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The list of supported ABIs for this device.
/// This corresponds to either android.os.Build.SUPPORTED_ABIS (for API level
/// 21 and above) or android.os.Build.CPU_ABI/CPU_ABI2.
/// The most preferred ABI is the first element in the list.
///
/// Elements are optionally prefixed by "version_id:" (where version_id is
/// the id of an AndroidVersion), denoting an ABI that is supported only on
/// a particular version.
#[prost(string, repeated, tag = "11")]
pub supported_abis: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Tags for this dimension.
/// Examples: "default", "preview", "deprecated".
#[prost(string, repeated, tag = "8")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// URL of a thumbnail image (photo) of the device.
#[prost(string, tag = "19")]
pub thumbnail_url: ::prost::alloc::string::String,
}
/// A version of the Android OS.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndroidVersion {
/// An opaque id for this Android version.
/// Use this id to invoke the TestExecutionService.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// A string representing this version of the Android OS.
/// Examples: "4.3", "4.4".
#[prost(string, tag = "2")]
pub version_string: ::prost::alloc::string::String,
/// The API level for this Android version.
/// Examples: 18, 19.
#[prost(int32, tag = "3")]
pub api_level: i32,
/// The code name for this Android version.
/// Examples: "JellyBean", "KitKat".
#[prost(string, tag = "4")]
pub code_name: ::prost::alloc::string::String,
/// The date this Android version became available in the market.
#[prost(message, optional, tag = "5")]
pub release_date: ::core::option::Option<super::super::super::r#type::Date>,
/// Market share for this version.
#[prost(message, optional, tag = "6")]
pub distribution: ::core::option::Option<Distribution>,
/// Tags for this dimension.
/// Examples: "default", "preview", "deprecated".
#[prost(string, repeated, tag = "7")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// A version-specific information of an Android model.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerAndroidVersionInfo {
/// An Android version.
#[prost(string, tag = "1")]
pub version_id: ::prost::alloc::string::String,
/// The number of online devices for an Android version.
#[prost(enumeration = "DeviceCapacity", tag = "2")]
pub device_capacity: i32,
/// Output only. The estimated wait time for a single interactive device
/// session using Direct Access.
#[prost(message, optional, tag = "3")]
pub interactive_device_availability_estimate: ::core::option::Option<
::prost_types::Duration,
>,
/// Output only. Identifies supported clients for DirectAccess for this Android
/// version.
#[prost(message, optional, tag = "4")]
pub direct_access_version_info: ::core::option::Option<DirectAccessVersionInfo>,
}
/// Denotes whether Direct Access is supported, and by which client versions.
///
/// DirectAccessService is currently available as a preview to select developers.
/// You can register today on behalf of you and your team at
/// <https://developer.android.com/studio/preview/android-device-streaming>
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DirectAccessVersionInfo {
/// Whether direct access is supported at all. Clients are expected to
/// filter down the device list to only android models and versions which
/// support Direct Access when that is the user intent.
#[prost(bool, tag = "1")]
pub direct_access_supported: bool,
/// Output only. Indicates client-device compatibility, where a device is known
/// to work only with certain workarounds implemented in the Android Studio
/// client. Expected format "major.minor.micro.patch", e.g.
/// "5921.22.2211.8881706".
#[prost(string, tag = "2")]
pub minimum_android_studio_version: ::prost::alloc::string::String,
}
/// Data about the relative number of devices running a
/// given configuration of the Android platform.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Distribution {
/// Output only. The time this distribution was measured.
#[prost(message, optional, tag = "1")]
pub measurement_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The estimated fraction (0-1) of the total market with this
/// configuration.
#[prost(double, tag = "2")]
pub market_share: f64,
}
/// The currently supported iOS devices.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IosDeviceCatalog {
/// The set of supported iOS device models.
#[prost(message, repeated, tag = "1")]
pub models: ::prost::alloc::vec::Vec<IosModel>,
/// The set of supported iOS software versions.
#[prost(message, repeated, tag = "2")]
pub versions: ::prost::alloc::vec::Vec<IosVersion>,
/// The set of supported Xcode versions.
#[prost(message, repeated, tag = "4")]
pub xcode_versions: ::prost::alloc::vec::Vec<XcodeVersion>,
/// The set of supported runtime configurations.
#[prost(message, optional, tag = "3")]
pub runtime_configuration: ::core::option::Option<IosRuntimeConfiguration>,
}
/// iOS configuration that can be selected at the time a test is run.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IosRuntimeConfiguration {
/// The set of available locales.
#[prost(message, repeated, tag = "1")]
pub locales: ::prost::alloc::vec::Vec<Locale>,
/// The set of available orientations.
#[prost(message, repeated, tag = "2")]
pub orientations: ::prost::alloc::vec::Vec<Orientation>,
}
/// A description of an iOS device tests may be run on.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IosModel {
/// The unique opaque id for this model.
/// Use this for invoking the TestExecutionService.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The human-readable name for this device model.
/// Examples: "iPhone 4s", "iPad Mini 2".
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
/// The set of iOS major software versions this device supports.
#[prost(string, repeated, tag = "3")]
pub supported_version_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Tags for this dimension.
/// Examples: "default", "preview", "deprecated".
#[prost(string, repeated, tag = "4")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Device capabilities.
/// Copied from
/// <https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html>
#[prost(string, repeated, tag = "5")]
pub device_capabilities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Screen size in the horizontal (X) dimension measured in pixels.
#[prost(int32, tag = "7")]
pub screen_x: i32,
/// Screen size in the vertical (Y) dimension measured in pixels.
#[prost(int32, tag = "8")]
pub screen_y: i32,
/// Screen density in DPI.
#[prost(int32, tag = "9")]
pub screen_density: i32,
/// Whether this device is a phone, tablet, wearable, etc.
#[prost(enumeration = "DeviceFormFactor", tag = "6")]
pub form_factor: i32,
/// Version-specific information of an iOS model.
#[prost(message, repeated, tag = "14")]
pub per_version_info: ::prost::alloc::vec::Vec<PerIosVersionInfo>,
}
/// An iOS version.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IosVersion {
/// An opaque id for this iOS version.
/// Use this id to invoke the TestExecutionService.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// An integer representing the major iOS version.
/// Examples: "8", "9".
#[prost(int32, tag = "2")]
pub major_version: i32,
/// An integer representing the minor iOS version.
/// Examples: "1", "2".
#[prost(int32, tag = "4")]
pub minor_version: i32,
/// Tags for this dimension.
/// Examples: "default", "preview", "deprecated".
#[prost(string, repeated, tag = "3")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The available Xcode versions for this version.
#[prost(string, repeated, tag = "5")]
pub supported_xcode_version_ids: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
/// A version-specific information of an iOS model.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerIosVersionInfo {
/// An iOS version.
#[prost(string, tag = "1")]
pub version_id: ::prost::alloc::string::String,
/// The number of online devices for an iOS version.
#[prost(enumeration = "DeviceCapacity", tag = "2")]
pub device_capacity: i32,
}
/// A location/region designation for language.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Locale {
/// The id for this locale.
/// Example: "en_US".
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// A human-friendly name for this language/locale.
/// Example: "English".
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
/// A human-friendly string representing the region for this
/// locale. Example: "United States". Not present for every locale.
#[prost(string, tag = "3")]
pub region: ::prost::alloc::string::String,
/// Tags for this dimension.
/// Example: "default".
#[prost(string, repeated, tag = "4")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Screen orientation of the device.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Orientation {
/// The id for this orientation.
/// Example: "portrait".
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// A human-friendly name for this orientation.
/// Example: "portrait".
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
/// Tags for this dimension.
/// Example: "default".
#[prost(string, repeated, tag = "3")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// An Xcode version that an iOS version is compatible with.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct XcodeVersion {
/// The id for this version.
/// Example: "9.2".
#[prost(string, tag = "1")]
pub version: ::prost::alloc::string::String,
/// Tags for this Xcode version.
/// Example: "default".
#[prost(string, repeated, tag = "2")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkConfigurationCatalog {
#[prost(message, repeated, tag = "1")]
pub configurations: ::prost::alloc::vec::Vec<NetworkConfiguration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkConfiguration {
/// The unique opaque id for this network traffic configuration.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The emulation rule applying to the upload traffic.
#[prost(message, optional, tag = "2")]
pub up_rule: ::core::option::Option<TrafficRule>,
/// The emulation rule applying to the download traffic.
#[prost(message, optional, tag = "3")]
pub down_rule: ::core::option::Option<TrafficRule>,
}
/// Network emulation parameters.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TrafficRule {
/// Packet delay, must be >= 0.
#[prost(message, optional, tag = "1")]
pub delay: ::core::option::Option<::prost_types::Duration>,
/// Packet loss ratio (0.0 - 1.0).
#[prost(float, tag = "2")]
pub packet_loss_ratio: f32,
/// Packet duplication ratio (0.0 - 1.0).
#[prost(float, tag = "3")]
pub packet_duplication_ratio: f32,
/// Bandwidth in kbits/second.
#[prost(float, tag = "4")]
pub bandwidth: f32,
/// Burst size in kbits.
#[prost(float, tag = "5")]
pub burst: f32,
}
/// The currently provided software environment on the devices under test.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProvidedSoftwareCatalog {
/// Deprecated: Use AndroidX Test Orchestrator going forward.
///
/// A string representing the current version of Android Test Orchestrator
/// that is used in the environment. The package is available at
/// <https://maven.google.com/web/index.html#com.android.support.test:orchestrator.>
#[deprecated]
#[prost(string, tag = "1")]
pub orchestrator_version: ::prost::alloc::string::String,
/// A string representing the current version of AndroidX Test Orchestrator
/// that is used in the environment. The package is available at
/// <https://maven.google.com/web/index.html#androidx.test:orchestrator.>
#[prost(string, tag = "2")]
pub androidx_orchestrator_version: ::prost::alloc::string::String,
}
/// Whether the device is physical or virtual.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DeviceForm {
/// Do not use. For proto versioning only.
Unspecified = 0,
/// Android virtual device using Compute Engine native virtualization. Firebase
/// Test Lab only.
Virtual = 1,
/// Actual hardware.
Physical = 2,
/// Android virtual device using emulator in nested virtualization. Equivalent
/// to Android Studio.
Emulator = 3,
}
impl DeviceForm {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DeviceForm::Unspecified => "DEVICE_FORM_UNSPECIFIED",
DeviceForm::Virtual => "VIRTUAL",
DeviceForm::Physical => "PHYSICAL",
DeviceForm::Emulator => "EMULATOR",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEVICE_FORM_UNSPECIFIED" => Some(Self::Unspecified),
"VIRTUAL" => Some(Self::Virtual),
"PHYSICAL" => Some(Self::Physical),
"EMULATOR" => Some(Self::Emulator),
_ => None,
}
}
}
/// The form factor of a device.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DeviceFormFactor {
/// Do not use. For proto versioning only.
Unspecified = 0,
/// This device has the shape of a phone.
Phone = 1,
/// This device has the shape of a tablet.
Tablet = 2,
/// This device has the shape of a watch or other wearable.
Wearable = 3,
}
impl DeviceFormFactor {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DeviceFormFactor::Unspecified => "DEVICE_FORM_FACTOR_UNSPECIFIED",
DeviceFormFactor::Phone => "PHONE",
DeviceFormFactor::Tablet => "TABLET",
DeviceFormFactor::Wearable => "WEARABLE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEVICE_FORM_FACTOR_UNSPECIFIED" => Some(Self::Unspecified),
"PHONE" => Some(Self::Phone),
"TABLET" => Some(Self::Tablet),
"WEARABLE" => Some(Self::Wearable),
_ => None,
}
}
}
/// Capacity based on the number of online devices in the lab.
///
/// Important: device capacity does not directly reflect the length of the
/// queue at a moment in time. It does not take into account current traffic or
/// the state of the devices.
///
/// For physical devices, the number is the average of online devices in the last
/// 30 days.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DeviceCapacity {
/// The value of device capacity is unknown or unset.
Unspecified = 0,
/// Devices that are high in capacity (The lab has a large number of these
/// devices).
///
/// These devices are generally suggested for running a large number of
/// simultaneous tests (e.g. more than 100 tests).
///
/// Please note that high capacity devices do not guarantee short wait times
/// due to several factors:
/// 1. Traffic (how heavily they are used at any given moment)
/// 2. High capacity devices are prioritized for certain usages, which may
/// cause user tests to be slower than selecting other similar device types.
High = 1,
/// Devices that are medium in capacity (The lab has a decent number of these
/// devices, though not as many as high capacity devices).
///
/// These devices are suitable for fewer test runs (e.g. fewer than 100 tests)
/// and only for low shard counts (e.g. less than 10 shards).
Medium = 2,
/// Devices that are low in capacity (The lab has a small number of these
/// devices).
///
/// These devices may be used if users need to test on this specific device
/// model and version. Please note that due to low capacity, the tests may take
/// much longer to finish, especially if a large number of tests are invoked at
/// once. These devices are not suitable for test sharding.
Low = 3,
/// Devices that are completely missing from the lab.
///
/// These devices are unavailable either temporarily or permanently and should
/// not be requested. If the device is also marked as deprecated, this state
/// is very likely permanent.
None = 4,
}
impl DeviceCapacity {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DeviceCapacity::Unspecified => "DEVICE_CAPACITY_UNSPECIFIED",
DeviceCapacity::High => "DEVICE_CAPACITY_HIGH",
DeviceCapacity::Medium => "DEVICE_CAPACITY_MEDIUM",
DeviceCapacity::Low => "DEVICE_CAPACITY_LOW",
DeviceCapacity::None => "DEVICE_CAPACITY_NONE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEVICE_CAPACITY_UNSPECIFIED" => Some(Self::Unspecified),
"DEVICE_CAPACITY_HIGH" => Some(Self::High),
"DEVICE_CAPACITY_MEDIUM" => Some(Self::Medium),
"DEVICE_CAPACITY_LOW" => Some(Self::Low),
"DEVICE_CAPACITY_NONE" => Some(Self::None),
_ => None,
}
}
}
/// Generated client implementations.
pub mod test_environment_discovery_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Service for discovering environments supported by the TestExecutionService.
///
/// Over time the TestService may add or remove devices or configuration options
/// (e.g., when new devices and APIs are released). Clients should check here
/// periodically to discover what options are supported.
///
/// It defines the following resource model:
///
/// - The API a collection of [TestEnvironmentCatalog]
/// [google.devtools.test.v1.TestEnvironmentCatalog] resources, named
/// `testEnvironmentCatalog/*`
///
/// - Each TestEnvironmentCatalog resource describes a set of supported
/// environments.
///
/// - An [AndroidDeviceCatalog][google.devtools.test.v1.AndroidDeviceCatalog]
/// describes supported Android devices. It contains lists of supported
/// [AndroidModels][google.devtools.test.v1.AndroidModel] and
/// [AndroidVersions][google.devtools.test.v1.AndroidVersion] along with a
/// [AndroidRuntimeConfiguration][google.devtools.test.v1.AndroidRuntimeConfiguration].
/// Each AndroidModel contains a list of Versions it supports. All
/// models support all locales and orientations described by the
/// AndroidRuntimeConfiguration
///
/// - An [IosDeviceCatalog][google.devtools.test.v1.IosDeviceCatalog]
/// describes supported iOS devices. It contains lists of supported
/// [IosModels][google.devtools.test.v1.IosModel] and
/// [IosVersions][google.devtools.test.v1.IosVersion] along with a
/// [IosRuntimeConfiguration][google.devtools.test.v1.IosRuntimeConfiguration].
/// Each IosModel contains a list of Versions it supports. All
/// models support all locales and orientations described by the
/// IosRuntimeConfiguration.
#[derive(Debug, Clone)]
pub struct TestEnvironmentDiscoveryServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> TestEnvironmentDiscoveryServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> TestEnvironmentDiscoveryServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
TestEnvironmentDiscoveryServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Gets the catalog of supported test environments.
///
/// May return any of the following canonical error codes:
///
/// - INVALID_ARGUMENT - if the request is malformed
/// - NOT_FOUND - if the environment type does not exist
/// - INTERNAL - if an internal error occurred
pub async fn get_test_environment_catalog(
&mut self,
request: impl tonic::IntoRequest<super::GetTestEnvironmentCatalogRequest>,
) -> std::result::Result<
tonic::Response<super::TestEnvironmentCatalog>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.testing.v1.TestEnvironmentDiscoveryService/GetTestEnvironmentCatalog",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.testing.v1.TestEnvironmentDiscoveryService",
"GetTestEnvironmentCatalog",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Android application details based on application manifest and archive
/// contents.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApkDetail {
#[prost(message, optional, tag = "1")]
pub apk_manifest: ::core::option::Option<ApkManifest>,
}
/// An Android app manifest. See
/// <http://developer.android.com/guide/topics/manifest/manifest-intro.html>
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApkManifest {
/// Full Java-style package name for this application, e.g.
/// "com.example.foo".
#[prost(string, tag = "1")]
pub package_name: ::prost::alloc::string::String,
/// Minimum API level required for the application to run.
#[prost(int32, tag = "2")]
pub min_sdk_version: i32,
/// Maximum API level on which the application is designed to run.
#[prost(int32, tag = "3")]
pub max_sdk_version: i32,
/// Specifies the API Level on which the application is designed to run.
#[prost(int32, tag = "6")]
pub target_sdk_version: i32,
/// User-readable name for the application.
#[prost(string, tag = "4")]
pub application_label: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub intent_filters: ::prost::alloc::vec::Vec<IntentFilter>,
/// Permissions declared to be used by the application
#[prost(string, repeated, tag = "7")]
pub uses_permission: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Version number used internally by the app.
#[prost(int64, tag = "8")]
pub version_code: i64,
/// Version number shown to users.
#[prost(string, tag = "9")]
pub version_name: ::prost::alloc::string::String,
/// Meta-data tags defined in the manifest.
#[prost(message, repeated, tag = "10")]
pub metadata: ::prost::alloc::vec::Vec<Metadata>,
/// Feature usage tags defined in the manifest.
#[prost(message, repeated, tag = "11")]
pub uses_feature: ::prost::alloc::vec::Vec<UsesFeature>,
/// Services contained in the <application> tag.
#[prost(message, repeated, tag = "12")]
pub services: ::prost::alloc::vec::Vec<Service>,
}
/// The <service> section of an <application> tag.
/// <https://developer.android.com/guide/topics/manifest/service-element>
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Service {
/// The android:name value
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Intent filters in the service
#[prost(message, repeated, tag = "2")]
pub intent_filter: ::prost::alloc::vec::Vec<IntentFilter>,
}
/// The <intent-filter> section of an <activity> tag.
/// <https://developer.android.com/guide/topics/manifest/intent-filter-element.html>
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IntentFilter {
/// The android:name value of the <action> tag.
#[prost(string, repeated, tag = "1")]
pub action_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The android:name value of the <category> tag.
#[prost(string, repeated, tag = "2")]
pub category_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The android:mimeType value of the <data> tag.
#[prost(string, tag = "3")]
pub mime_type: ::prost::alloc::string::String,
}
/// A <meta-data> tag within a manifest.
/// <https://developer.android.com/guide/topics/manifest/meta-data-element.html>
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metadata {
/// The android:name value
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The android:value value
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
/// A <uses-feature> tag within a manifest.
/// <https://developer.android.com/guide/topics/manifest/uses-feature-element.html>
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UsesFeature {
/// The android:name value
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The android:required value
#[prost(bool, tag = "2")]
pub is_required: bool,
}
/// A request to get the details of an Android application.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetApkDetailsRequest {
/// Optional. The APK to be parsed for details.
#[prost(message, optional, tag = "1")]
pub location: ::core::option::Option<FileReference>,
/// Optional. The App Bundle to be parsed for details.
#[prost(message, optional, tag = "2")]
pub bundle_location: ::core::option::Option<FileReference>,
}
/// Response containing the details of the specified Android application.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetApkDetailsResponse {
/// Details of the Android App.
#[prost(message, optional, tag = "1")]
pub apk_detail: ::core::option::Option<ApkDetail>,
}
/// Generated client implementations.
pub mod application_detail_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// A service which parses input applications and returns details that can be
/// useful in the context of testing.
#[derive(Debug, Clone)]
pub struct ApplicationDetailServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ApplicationDetailServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ApplicationDetailServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
ApplicationDetailServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Gets the details of an Android application APK.
pub async fn get_apk_details(
&mut self,
request: impl tonic::IntoRequest<super::GetApkDetailsRequest>,
) -> std::result::Result<
tonic::Response<super::GetApkDetailsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.testing.v1.ApplicationDetailService/GetApkDetails",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.devtools.testing.v1.ApplicationDetailService",
"GetApkDetails",
),
);
self.inner.unary(req, path, codec).await
}
}
}