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
|
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module GamesV1
# An achievement definition object.
class AchievementDefinition
include Google::Apis::Core::Hashable
# The type of the achievement.
# Corresponds to the JSON property `achievementType`
# @return [String]
attr_accessor :achievement_type
# The description of the achievement.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Experience points which will be earned when unlocking this achievement.
# Corresponds to the JSON property `experiencePoints`
# @return [Fixnum]
attr_accessor :experience_points
# The total steps for an incremental achievement as a string.
# Corresponds to the JSON property `formattedTotalSteps`
# @return [String]
attr_accessor :formatted_total_steps
# The ID of the achievement.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# The initial state of the achievement.
# Corresponds to the JSON property `initialState`
# @return [String]
attr_accessor :initial_state
# Indicates whether the revealed icon image being returned is a default image,
# or is provided by the game.
# Corresponds to the JSON property `isRevealedIconUrlDefault`
# @return [Boolean]
attr_accessor :is_revealed_icon_url_default
alias_method :is_revealed_icon_url_default?, :is_revealed_icon_url_default
# Indicates whether the unlocked icon image being returned is a default image,
# or is game-provided.
# Corresponds to the JSON property `isUnlockedIconUrlDefault`
# @return [Boolean]
attr_accessor :is_unlocked_icon_url_default
alias_method :is_unlocked_icon_url_default?, :is_unlocked_icon_url_default
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#achievementDefinition`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The name of the achievement.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The image URL for the revealed achievement icon.
# Corresponds to the JSON property `revealedIconUrl`
# @return [String]
attr_accessor :revealed_icon_url
# The total steps for an incremental achievement.
# Corresponds to the JSON property `totalSteps`
# @return [Fixnum]
attr_accessor :total_steps
# The image URL for the unlocked achievement icon.
# Corresponds to the JSON property `unlockedIconUrl`
# @return [String]
attr_accessor :unlocked_icon_url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@achievement_type = args[:achievement_type] if args.key?(:achievement_type)
@description = args[:description] if args.key?(:description)
@experience_points = args[:experience_points] if args.key?(:experience_points)
@formatted_total_steps = args[:formatted_total_steps] if args.key?(:formatted_total_steps)
@id = args[:id] if args.key?(:id)
@initial_state = args[:initial_state] if args.key?(:initial_state)
@is_revealed_icon_url_default = args[:is_revealed_icon_url_default] if args.key?(:is_revealed_icon_url_default)
@is_unlocked_icon_url_default = args[:is_unlocked_icon_url_default] if args.key?(:is_unlocked_icon_url_default)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@revealed_icon_url = args[:revealed_icon_url] if args.key?(:revealed_icon_url)
@total_steps = args[:total_steps] if args.key?(:total_steps)
@unlocked_icon_url = args[:unlocked_icon_url] if args.key?(:unlocked_icon_url)
end
end
# A list of achievement definition objects.
class ListAchievementDefinitionsResponse
include Google::Apis::Core::Hashable
# The achievement definitions.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::GamesV1::AchievementDefinition>]
attr_accessor :items
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#achievementDefinitionsListResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token corresponding to the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# An achievement increment response
class AchievementIncrementResponse
include Google::Apis::Core::Hashable
# The current steps recorded for this incremental achievement.
# Corresponds to the JSON property `currentSteps`
# @return [Fixnum]
attr_accessor :current_steps
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#achievementIncrementResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Whether the current steps for the achievement has reached the number of steps
# required to unlock.
# Corresponds to the JSON property `newlyUnlocked`
# @return [Boolean]
attr_accessor :newly_unlocked
alias_method :newly_unlocked?, :newly_unlocked
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@current_steps = args[:current_steps] if args.key?(:current_steps)
@kind = args[:kind] if args.key?(:kind)
@newly_unlocked = args[:newly_unlocked] if args.key?(:newly_unlocked)
end
end
# An achievement reveal response
class AchievementRevealResponse
include Google::Apis::Core::Hashable
# The current state of the achievement for which a reveal was attempted. This
# might be `UNLOCKED` if the achievement was already unlocked.
# Corresponds to the JSON property `currentState`
# @return [String]
attr_accessor :current_state
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#achievementRevealResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@current_state = args[:current_state] if args.key?(:current_state)
@kind = args[:kind] if args.key?(:kind)
end
end
# An achievement set steps at least response.
class AchievementSetStepsAtLeastResponse
include Google::Apis::Core::Hashable
# The current steps recorded for this incremental achievement.
# Corresponds to the JSON property `currentSteps`
# @return [Fixnum]
attr_accessor :current_steps
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#achievementSetStepsAtLeastResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Whether the current steps for the achievement has reached the number of steps
# required to unlock.
# Corresponds to the JSON property `newlyUnlocked`
# @return [Boolean]
attr_accessor :newly_unlocked
alias_method :newly_unlocked?, :newly_unlocked
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@current_steps = args[:current_steps] if args.key?(:current_steps)
@kind = args[:kind] if args.key?(:kind)
@newly_unlocked = args[:newly_unlocked] if args.key?(:newly_unlocked)
end
end
# An achievement unlock response
class AchievementUnlockResponse
include Google::Apis::Core::Hashable
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#achievementUnlockResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Whether this achievement was newly unlocked (that is, whether the unlock
# request for the achievement was the first for the player).
# Corresponds to the JSON property `newlyUnlocked`
# @return [Boolean]
attr_accessor :newly_unlocked
alias_method :newly_unlocked?, :newly_unlocked
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@newly_unlocked = args[:newly_unlocked] if args.key?(:newly_unlocked)
end
end
# A list of achievement update requests.
class AchievementUpdateMultipleRequest
include Google::Apis::Core::Hashable
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#achievementUpdateMultipleRequest`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The individual achievement update requests.
# Corresponds to the JSON property `updates`
# @return [Array<Google::Apis::GamesV1::UpdateAchievementRequest>]
attr_accessor :updates
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@updates = args[:updates] if args.key?(:updates)
end
end
# Response message for UpdateMultipleAchievements rpc.
class AchievementUpdateMultipleResponse
include Google::Apis::Core::Hashable
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#achievementUpdateMultipleResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The updated state of the achievements.
# Corresponds to the JSON property `updatedAchievements`
# @return [Array<Google::Apis::GamesV1::UpdateAchievementResponse>]
attr_accessor :updated_achievements
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@updated_achievements = args[:updated_achievements] if args.key?(:updated_achievements)
end
end
# A request to update an achievement.
class UpdateAchievementRequest
include Google::Apis::Core::Hashable
# The achievement this update is being applied to.
# Corresponds to the JSON property `achievementId`
# @return [String]
attr_accessor :achievement_id
# The payload to request to increment an achievement.
# Corresponds to the JSON property `incrementPayload`
# @return [Google::Apis::GamesV1::GamesAchievementIncrement]
attr_accessor :increment_payload
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#achievementUpdateRequest`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The payload to request to increment an achievement.
# Corresponds to the JSON property `setStepsAtLeastPayload`
# @return [Google::Apis::GamesV1::GamesAchievementSetStepsAtLeast]
attr_accessor :set_steps_at_least_payload
# The type of update being applied.
# Corresponds to the JSON property `updateType`
# @return [String]
attr_accessor :update_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@achievement_id = args[:achievement_id] if args.key?(:achievement_id)
@increment_payload = args[:increment_payload] if args.key?(:increment_payload)
@kind = args[:kind] if args.key?(:kind)
@set_steps_at_least_payload = args[:set_steps_at_least_payload] if args.key?(:set_steps_at_least_payload)
@update_type = args[:update_type] if args.key?(:update_type)
end
end
# An updated achievement.
class UpdateAchievementResponse
include Google::Apis::Core::Hashable
# The achievement this update is was applied to.
# Corresponds to the JSON property `achievementId`
# @return [String]
attr_accessor :achievement_id
# The current state of the achievement.
# Corresponds to the JSON property `currentState`
# @return [String]
attr_accessor :current_state
# The current steps recorded for this achievement if it is incremental.
# Corresponds to the JSON property `currentSteps`
# @return [Fixnum]
attr_accessor :current_steps
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#achievementUpdateResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Whether this achievement was newly unlocked (that is, whether the unlock
# request for the achievement was the first for the player).
# Corresponds to the JSON property `newlyUnlocked`
# @return [Boolean]
attr_accessor :newly_unlocked
alias_method :newly_unlocked?, :newly_unlocked
# Whether the requested updates actually affected the achievement.
# Corresponds to the JSON property `updateOccurred`
# @return [Boolean]
attr_accessor :update_occurred
alias_method :update_occurred?, :update_occurred
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@achievement_id = args[:achievement_id] if args.key?(:achievement_id)
@current_state = args[:current_state] if args.key?(:current_state)
@current_steps = args[:current_steps] if args.key?(:current_steps)
@kind = args[:kind] if args.key?(:kind)
@newly_unlocked = args[:newly_unlocked] if args.key?(:newly_unlocked)
@update_occurred = args[:update_occurred] if args.key?(:update_occurred)
end
end
# The Application resource.
class Application
include Google::Apis::Core::Hashable
# The number of achievements visible to the currently authenticated player.
# Corresponds to the JSON property `achievement_count`
# @return [Fixnum]
attr_accessor :achievement_count
# The assets of the application.
# Corresponds to the JSON property `assets`
# @return [Array<Google::Apis::GamesV1::ImageAsset>]
attr_accessor :assets
# The author of the application.
# Corresponds to the JSON property `author`
# @return [String]
attr_accessor :author
# An application category object.
# Corresponds to the JSON property `category`
# @return [Google::Apis::GamesV1::ApplicationCategory]
attr_accessor :category
# The description of the application.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# A list of features that have been enabled for the application.
# Corresponds to the JSON property `enabledFeatures`
# @return [Array<String>]
attr_accessor :enabled_features
# The ID of the application.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# The instances of the application.
# Corresponds to the JSON property `instances`
# @return [Array<Google::Apis::GamesV1::Instance>]
attr_accessor :instances
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#application`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The last updated timestamp of the application.
# Corresponds to the JSON property `lastUpdatedTimestamp`
# @return [Fixnum]
attr_accessor :last_updated_timestamp
# The number of leaderboards visible to the currently authenticated player.
# Corresponds to the JSON property `leaderboard_count`
# @return [Fixnum]
attr_accessor :leaderboard_count
# The name of the application.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# A hint to the client UI for what color to use as an app-themed color. The
# color is given as an RGB triplet (e.g. "E0E0E0").
# Corresponds to the JSON property `themeColor`
# @return [String]
attr_accessor :theme_color
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@achievement_count = args[:achievement_count] if args.key?(:achievement_count)
@assets = args[:assets] if args.key?(:assets)
@author = args[:author] if args.key?(:author)
@category = args[:category] if args.key?(:category)
@description = args[:description] if args.key?(:description)
@enabled_features = args[:enabled_features] if args.key?(:enabled_features)
@id = args[:id] if args.key?(:id)
@instances = args[:instances] if args.key?(:instances)
@kind = args[:kind] if args.key?(:kind)
@last_updated_timestamp = args[:last_updated_timestamp] if args.key?(:last_updated_timestamp)
@leaderboard_count = args[:leaderboard_count] if args.key?(:leaderboard_count)
@name = args[:name] if args.key?(:name)
@theme_color = args[:theme_color] if args.key?(:theme_color)
end
end
# An application category object.
class ApplicationCategory
include Google::Apis::Core::Hashable
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#applicationCategory`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The primary category.
# Corresponds to the JSON property `primary`
# @return [String]
attr_accessor :primary
# The secondary category.
# Corresponds to the JSON property `secondary`
# @return [String]
attr_accessor :secondary
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@primary = args[:primary] if args.key?(:primary)
@secondary = args[:secondary] if args.key?(:secondary)
end
end
# A third party application verification response resource.
class ApplicationVerifyResponse
include Google::Apis::Core::Hashable
# An alternate ID that was once used for the player that was issued the auth
# token used in this request. (This field is not normally populated.)
# Corresponds to the JSON property `alternate_player_id`
# @return [String]
attr_accessor :alternate_player_id
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#applicationVerifyResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The ID of the player that was issued the auth token used in this request.
# Corresponds to the JSON property `player_id`
# @return [String]
attr_accessor :player_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@alternate_player_id = args[:alternate_player_id] if args.key?(:alternate_player_id)
@kind = args[:kind] if args.key?(:kind)
@player_id = args[:player_id] if args.key?(:player_id)
end
end
# Data related to individual game categories.
class Category
include Google::Apis::Core::Hashable
# The category name.
# Corresponds to the JSON property `category`
# @return [String]
attr_accessor :category
# Experience points earned in this category.
# Corresponds to the JSON property `experiencePoints`
# @return [Fixnum]
attr_accessor :experience_points
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#category`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@category = args[:category] if args.key?(:category)
@experience_points = args[:experience_points] if args.key?(:experience_points)
@kind = args[:kind] if args.key?(:kind)
end
end
# A third party list metagame categories response.
class ListCategoryResponse
include Google::Apis::Core::Hashable
# The list of categories with usage data.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::GamesV1::Category>]
attr_accessor :items
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#categoryListResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token corresponding to the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# Hash-like weak identifier of uploaded content bytes (saved game data blob, or
# cover image). Consistent per player per application per hash version. Within
# the context of a single player/application, it's guaranteed that two identical
# blobs coming from two different uploads will have the same content hash. It's
# extremely likely, though not guaranteed, that if two content hashes are equal,
# the blobs are identical.
class ContentHash
include Google::Apis::Core::Hashable
# Hash-like digest of the content.
# Corresponds to the JSON property `digest`
# @return [String]
attr_accessor :digest
# Version of the Hash encoding algorithm to hash the content.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@digest = args[:digest] if args.key?(:digest)
@version = args[:version] if args.key?(:version)
end
end
# Container for a URL end point of the requested type.
class EndPoint
include Google::Apis::Core::Hashable
# A URL suitable for loading in a web browser for the requested endpoint.
# Corresponds to the JSON property `url`
# @return [String]
attr_accessor :url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@url = args[:url] if args.key?(:url)
end
end
# A batch update failure resource.
class EventBatchRecordFailure
include Google::Apis::Core::Hashable
# The cause for the update failure.
# Corresponds to the JSON property `failureCause`
# @return [String]
attr_accessor :failure_cause
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#eventBatchRecordFailure`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# An event period time range.
# Corresponds to the JSON property `range`
# @return [Google::Apis::GamesV1::EventPeriodRange]
attr_accessor :range
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@failure_cause = args[:failure_cause] if args.key?(:failure_cause)
@kind = args[:kind] if args.key?(:kind)
@range = args[:range] if args.key?(:range)
end
end
# An event child relationship resource.
class EventChild
include Google::Apis::Core::Hashable
# The ID of the child event.
# Corresponds to the JSON property `childId`
# @return [String]
attr_accessor :child_id
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#eventChild`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@child_id = args[:child_id] if args.key?(:child_id)
@kind = args[:kind] if args.key?(:kind)
end
end
# An event definition resource.
class EventDefinition
include Google::Apis::Core::Hashable
# A list of events that are a child of this event.
# Corresponds to the JSON property `childEvents`
# @return [Array<Google::Apis::GamesV1::EventChild>]
attr_accessor :child_events
# Description of what this event represents.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# The name to display for the event.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# The ID of the event.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# The base URL for the image that represents the event.
# Corresponds to the JSON property `imageUrl`
# @return [String]
attr_accessor :image_url
# Indicates whether the icon image being returned is a default image, or is game-
# provided.
# Corresponds to the JSON property `isDefaultImageUrl`
# @return [Boolean]
attr_accessor :is_default_image_url
alias_method :is_default_image_url?, :is_default_image_url
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#eventDefinition`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The visibility of event being tracked in this definition.
# Corresponds to the JSON property `visibility`
# @return [String]
attr_accessor :visibility
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@child_events = args[:child_events] if args.key?(:child_events)
@description = args[:description] if args.key?(:description)
@display_name = args[:display_name] if args.key?(:display_name)
@id = args[:id] if args.key?(:id)
@image_url = args[:image_url] if args.key?(:image_url)
@is_default_image_url = args[:is_default_image_url] if args.key?(:is_default_image_url)
@kind = args[:kind] if args.key?(:kind)
@visibility = args[:visibility] if args.key?(:visibility)
end
end
# A ListDefinitions response.
class ListEventDefinitionResponse
include Google::Apis::Core::Hashable
# The event definitions.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::GamesV1::EventDefinition>]
attr_accessor :items
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#eventDefinitionListResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The pagination token for the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# An event period time range.
class EventPeriodRange
include Google::Apis::Core::Hashable
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#eventPeriodRange`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The time when this update period ends, in millis, since 1970 UTC (Unix Epoch).
# Corresponds to the JSON property `periodEndMillis`
# @return [Fixnum]
attr_accessor :period_end_millis
# The time when this update period begins, in millis, since 1970 UTC (Unix Epoch)
# .
# Corresponds to the JSON property `periodStartMillis`
# @return [Fixnum]
attr_accessor :period_start_millis
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@period_end_millis = args[:period_end_millis] if args.key?(:period_end_millis)
@period_start_millis = args[:period_start_millis] if args.key?(:period_start_millis)
end
end
# An event period update resource.
class EventPeriodUpdate
include Google::Apis::Core::Hashable
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#eventPeriodUpdate`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# An event period time range.
# Corresponds to the JSON property `timePeriod`
# @return [Google::Apis::GamesV1::EventPeriodRange]
attr_accessor :time_period
# The updates being made for this time period.
# Corresponds to the JSON property `updates`
# @return [Array<Google::Apis::GamesV1::UpdateEventRequest>]
attr_accessor :updates
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@time_period = args[:time_period] if args.key?(:time_period)
@updates = args[:updates] if args.key?(:updates)
end
end
# An event update failure resource.
class EventRecordFailure
include Google::Apis::Core::Hashable
# The ID of the event that was not updated.
# Corresponds to the JSON property `eventId`
# @return [String]
attr_accessor :event_id
# The cause for the update failure.
# Corresponds to the JSON property `failureCause`
# @return [String]
attr_accessor :failure_cause
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#eventRecordFailure`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@event_id = args[:event_id] if args.key?(:event_id)
@failure_cause = args[:failure_cause] if args.key?(:failure_cause)
@kind = args[:kind] if args.key?(:kind)
end
end
# An event period update resource.
class EventRecordRequest
include Google::Apis::Core::Hashable
# The current time when this update was sent, in milliseconds, since 1970 UTC (
# Unix Epoch).
# Corresponds to the JSON property `currentTimeMillis`
# @return [Fixnum]
attr_accessor :current_time_millis
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#eventRecordRequest`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The request ID used to identify this attempt to record events.
# Corresponds to the JSON property `requestId`
# @return [Fixnum]
attr_accessor :request_id
# A list of the time period updates being made in this request.
# Corresponds to the JSON property `timePeriods`
# @return [Array<Google::Apis::GamesV1::EventPeriodUpdate>]
attr_accessor :time_periods
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@current_time_millis = args[:current_time_millis] if args.key?(:current_time_millis)
@kind = args[:kind] if args.key?(:kind)
@request_id = args[:request_id] if args.key?(:request_id)
@time_periods = args[:time_periods] if args.key?(:time_periods)
end
end
# An event period update resource.
class UpdateEventRequest
include Google::Apis::Core::Hashable
# The ID of the event being modified in this update.
# Corresponds to the JSON property `definitionId`
# @return [String]
attr_accessor :definition_id
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#eventUpdateRequest`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The number of times this event occurred in this time period.
# Corresponds to the JSON property `updateCount`
# @return [Fixnum]
attr_accessor :update_count
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@definition_id = args[:definition_id] if args.key?(:definition_id)
@kind = args[:kind] if args.key?(:kind)
@update_count = args[:update_count] if args.key?(:update_count)
end
end
# An event period update resource.
class UpdateEventResponse
include Google::Apis::Core::Hashable
# Any batch-wide failures which occurred applying updates.
# Corresponds to the JSON property `batchFailures`
# @return [Array<Google::Apis::GamesV1::EventBatchRecordFailure>]
attr_accessor :batch_failures
# Any failures updating a particular event.
# Corresponds to the JSON property `eventFailures`
# @return [Array<Google::Apis::GamesV1::EventRecordFailure>]
attr_accessor :event_failures
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#eventUpdateResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The current status of any updated events
# Corresponds to the JSON property `playerEvents`
# @return [Array<Google::Apis::GamesV1::PlayerEvent>]
attr_accessor :player_events
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@batch_failures = args[:batch_failures] if args.key?(:batch_failures)
@event_failures = args[:event_failures] if args.key?(:event_failures)
@kind = args[:kind] if args.key?(:kind)
@player_events = args[:player_events] if args.key?(:player_events)
end
end
# The payload to request to increment an achievement.
class GamesAchievementIncrement
include Google::Apis::Core::Hashable
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#GamesAchievementIncrement`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The requestId associated with an increment to an achievement.
# Corresponds to the JSON property `requestId`
# @return [Fixnum]
attr_accessor :request_id
# The number of steps to be incremented.
# Corresponds to the JSON property `steps`
# @return [Fixnum]
attr_accessor :steps
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@request_id = args[:request_id] if args.key?(:request_id)
@steps = args[:steps] if args.key?(:steps)
end
end
# The payload to request to increment an achievement.
class GamesAchievementSetStepsAtLeast
include Google::Apis::Core::Hashable
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#GamesAchievementSetStepsAtLeast`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The minimum number of steps for the achievement to be set to.
# Corresponds to the JSON property `steps`
# @return [Fixnum]
attr_accessor :steps
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@steps = args[:steps] if args.key?(:steps)
end
end
# An image asset object.
class ImageAsset
include Google::Apis::Core::Hashable
# The height of the asset.
# Corresponds to the JSON property `height`
# @return [Fixnum]
attr_accessor :height
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#imageAsset`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The name of the asset.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The URL of the asset.
# Corresponds to the JSON property `url`
# @return [String]
attr_accessor :url
# The width of the asset.
# Corresponds to the JSON property `width`
# @return [Fixnum]
attr_accessor :width
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@height = args[:height] if args.key?(:height)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@url = args[:url] if args.key?(:url)
@width = args[:width] if args.key?(:width)
end
end
# The Instance resource.
class Instance
include Google::Apis::Core::Hashable
# URI which shows where a user can acquire this instance.
# Corresponds to the JSON property `acquisitionUri`
# @return [String]
attr_accessor :acquisition_uri
# The Android instance details resource.
# Corresponds to the JSON property `androidInstance`
# @return [Google::Apis::GamesV1::InstanceAndroidDetails]
attr_accessor :android_instance
# The iOS details resource.
# Corresponds to the JSON property `iosInstance`
# @return [Google::Apis::GamesV1::InstanceIosDetails]
attr_accessor :ios_instance
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#instance`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Localized display name.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The platform type.
# Corresponds to the JSON property `platformType`
# @return [String]
attr_accessor :platform_type
# Flag to show if this game instance supports realtime play.
# Corresponds to the JSON property `realtimePlay`
# @return [Boolean]
attr_accessor :realtime_play
alias_method :realtime_play?, :realtime_play
# Flag to show if this game instance supports turn based play.
# Corresponds to the JSON property `turnBasedPlay`
# @return [Boolean]
attr_accessor :turn_based_play
alias_method :turn_based_play?, :turn_based_play
# The Web details resource.
# Corresponds to the JSON property `webInstance`
# @return [Google::Apis::GamesV1::InstanceWebDetails]
attr_accessor :web_instance
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@acquisition_uri = args[:acquisition_uri] if args.key?(:acquisition_uri)
@android_instance = args[:android_instance] if args.key?(:android_instance)
@ios_instance = args[:ios_instance] if args.key?(:ios_instance)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@platform_type = args[:platform_type] if args.key?(:platform_type)
@realtime_play = args[:realtime_play] if args.key?(:realtime_play)
@turn_based_play = args[:turn_based_play] if args.key?(:turn_based_play)
@web_instance = args[:web_instance] if args.key?(:web_instance)
end
end
# The Android instance details resource.
class InstanceAndroidDetails
include Google::Apis::Core::Hashable
# Flag indicating whether the anti-piracy check is enabled.
# Corresponds to the JSON property `enablePiracyCheck`
# @return [Boolean]
attr_accessor :enable_piracy_check
alias_method :enable_piracy_check?, :enable_piracy_check
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#instanceAndroidDetails`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Android package name which maps to Google Play URL.
# Corresponds to the JSON property `packageName`
# @return [String]
attr_accessor :package_name
# Indicates that this instance is the default for new installations.
# Corresponds to the JSON property `preferred`
# @return [Boolean]
attr_accessor :preferred
alias_method :preferred?, :preferred
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enable_piracy_check = args[:enable_piracy_check] if args.key?(:enable_piracy_check)
@kind = args[:kind] if args.key?(:kind)
@package_name = args[:package_name] if args.key?(:package_name)
@preferred = args[:preferred] if args.key?(:preferred)
end
end
# The iOS details resource.
class InstanceIosDetails
include Google::Apis::Core::Hashable
# Bundle identifier.
# Corresponds to the JSON property `bundleIdentifier`
# @return [String]
attr_accessor :bundle_identifier
# iTunes App ID.
# Corresponds to the JSON property `itunesAppId`
# @return [String]
attr_accessor :itunes_app_id
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#instanceIosDetails`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Indicates that this instance is the default for new installations on iPad
# devices.
# Corresponds to the JSON property `preferredForIpad`
# @return [Boolean]
attr_accessor :preferred_for_ipad
alias_method :preferred_for_ipad?, :preferred_for_ipad
# Indicates that this instance is the default for new installations on iPhone
# devices.
# Corresponds to the JSON property `preferredForIphone`
# @return [Boolean]
attr_accessor :preferred_for_iphone
alias_method :preferred_for_iphone?, :preferred_for_iphone
# Flag to indicate if this instance supports iPad.
# Corresponds to the JSON property `supportIpad`
# @return [Boolean]
attr_accessor :support_ipad
alias_method :support_ipad?, :support_ipad
# Flag to indicate if this instance supports iPhone.
# Corresponds to the JSON property `supportIphone`
# @return [Boolean]
attr_accessor :support_iphone
alias_method :support_iphone?, :support_iphone
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bundle_identifier = args[:bundle_identifier] if args.key?(:bundle_identifier)
@itunes_app_id = args[:itunes_app_id] if args.key?(:itunes_app_id)
@kind = args[:kind] if args.key?(:kind)
@preferred_for_ipad = args[:preferred_for_ipad] if args.key?(:preferred_for_ipad)
@preferred_for_iphone = args[:preferred_for_iphone] if args.key?(:preferred_for_iphone)
@support_ipad = args[:support_ipad] if args.key?(:support_ipad)
@support_iphone = args[:support_iphone] if args.key?(:support_iphone)
end
end
# The Web details resource.
class InstanceWebDetails
include Google::Apis::Core::Hashable
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#instanceWebDetails`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Launch URL for the game.
# Corresponds to the JSON property `launchUrl`
# @return [String]
attr_accessor :launch_url
# Indicates that this instance is the default for new installations.
# Corresponds to the JSON property `preferred`
# @return [Boolean]
attr_accessor :preferred
alias_method :preferred?, :preferred
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@launch_url = args[:launch_url] if args.key?(:launch_url)
@preferred = args[:preferred] if args.key?(:preferred)
end
end
# The Leaderboard resource.
class Leaderboard
include Google::Apis::Core::Hashable
# The icon for the leaderboard.
# Corresponds to the JSON property `iconUrl`
# @return [String]
attr_accessor :icon_url
# The leaderboard ID.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Indicates whether the icon image being returned is a default image, or is game-
# provided.
# Corresponds to the JSON property `isIconUrlDefault`
# @return [Boolean]
attr_accessor :is_icon_url_default
alias_method :is_icon_url_default?, :is_icon_url_default
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#leaderboard`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The name of the leaderboard.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# How scores are ordered.
# Corresponds to the JSON property `order`
# @return [String]
attr_accessor :order
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@icon_url = args[:icon_url] if args.key?(:icon_url)
@id = args[:id] if args.key?(:id)
@is_icon_url_default = args[:is_icon_url_default] if args.key?(:is_icon_url_default)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@order = args[:order] if args.key?(:order)
end
end
# The Leaderboard Entry resource.
class LeaderboardEntry
include Google::Apis::Core::Hashable
# The localized string for the numerical value of this score.
# Corresponds to the JSON property `formattedScore`
# @return [String]
attr_accessor :formatted_score
# The localized string for the rank of this score for this leaderboard.
# Corresponds to the JSON property `formattedScoreRank`
# @return [String]
attr_accessor :formatted_score_rank
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#leaderboardEntry`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# A Player resource.
# Corresponds to the JSON property `player`
# @return [Google::Apis::GamesV1::Player]
attr_accessor :player
# The rank of this score for this leaderboard.
# Corresponds to the JSON property `scoreRank`
# @return [Fixnum]
attr_accessor :score_rank
# Additional information about the score. Values must contain no more than 64
# URI-safe characters as defined by section 2.3 of RFC 3986.
# Corresponds to the JSON property `scoreTag`
# @return [String]
attr_accessor :score_tag
# The numerical value of this score.
# Corresponds to the JSON property `scoreValue`
# @return [Fixnum]
attr_accessor :score_value
# The time span of this high score.
# Corresponds to the JSON property `timeSpan`
# @return [String]
attr_accessor :time_span
# The timestamp at which this score was recorded, in milliseconds since the
# epoch in UTC.
# Corresponds to the JSON property `writeTimestampMillis`
# @return [Fixnum]
attr_accessor :write_timestamp_millis
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@formatted_score = args[:formatted_score] if args.key?(:formatted_score)
@formatted_score_rank = args[:formatted_score_rank] if args.key?(:formatted_score_rank)
@kind = args[:kind] if args.key?(:kind)
@player = args[:player] if args.key?(:player)
@score_rank = args[:score_rank] if args.key?(:score_rank)
@score_tag = args[:score_tag] if args.key?(:score_tag)
@score_value = args[:score_value] if args.key?(:score_value)
@time_span = args[:time_span] if args.key?(:time_span)
@write_timestamp_millis = args[:write_timestamp_millis] if args.key?(:write_timestamp_millis)
end
end
# A list of leaderboard objects.
class ListLeaderboardResponse
include Google::Apis::Core::Hashable
# The leaderboards.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::GamesV1::Leaderboard>]
attr_accessor :items
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#leaderboardListResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token corresponding to the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# A score rank in a leaderboard.
class LeaderboardScoreRank
include Google::Apis::Core::Hashable
# The number of scores in the leaderboard as a string.
# Corresponds to the JSON property `formattedNumScores`
# @return [String]
attr_accessor :formatted_num_scores
# The rank in the leaderboard as a string.
# Corresponds to the JSON property `formattedRank`
# @return [String]
attr_accessor :formatted_rank
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#leaderboardScoreRank`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The number of scores in the leaderboard.
# Corresponds to the JSON property `numScores`
# @return [Fixnum]
attr_accessor :num_scores
# The rank in the leaderboard.
# Corresponds to the JSON property `rank`
# @return [Fixnum]
attr_accessor :rank
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@formatted_num_scores = args[:formatted_num_scores] if args.key?(:formatted_num_scores)
@formatted_rank = args[:formatted_rank] if args.key?(:formatted_rank)
@kind = args[:kind] if args.key?(:kind)
@num_scores = args[:num_scores] if args.key?(:num_scores)
@rank = args[:rank] if args.key?(:rank)
end
end
# A ListScores response.
class LeaderboardScores
include Google::Apis::Core::Hashable
# The scores in the leaderboard.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::GamesV1::LeaderboardEntry>]
attr_accessor :items
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#leaderboardScores`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The pagination token for the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# The total number of scores in the leaderboard.
# Corresponds to the JSON property `numScores`
# @return [Fixnum]
attr_accessor :num_scores
# The Leaderboard Entry resource.
# Corresponds to the JSON property `playerScore`
# @return [Google::Apis::GamesV1::LeaderboardEntry]
attr_accessor :player_score
# The pagination token for the previous page of results.
# Corresponds to the JSON property `prevPageToken`
# @return [String]
attr_accessor :prev_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@num_scores = args[:num_scores] if args.key?(:num_scores)
@player_score = args[:player_score] if args.key?(:player_score)
@prev_page_token = args[:prev_page_token] if args.key?(:prev_page_token)
end
end
# The metagame config resource
class MetagameConfig
include Google::Apis::Core::Hashable
# Current version of the metagame configuration data. When this data is updated,
# the version number will be increased by one.
# Corresponds to the JSON property `currentVersion`
# @return [Fixnum]
attr_accessor :current_version
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#metagameConfig`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The list of player levels.
# Corresponds to the JSON property `playerLevels`
# @return [Array<Google::Apis::GamesV1::PlayerLevel>]
attr_accessor :player_levels
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@current_version = args[:current_version] if args.key?(:current_version)
@kind = args[:kind] if args.key?(:kind)
@player_levels = args[:player_levels] if args.key?(:player_levels)
end
end
# A Player resource.
class Player
include Google::Apis::Core::Hashable
# The base URL for the image that represents the player.
# Corresponds to the JSON property `avatarImageUrl`
# @return [String]
attr_accessor :avatar_image_url
# The url to the landscape mode player banner image.
# Corresponds to the JSON property `bannerUrlLandscape`
# @return [String]
attr_accessor :banner_url_landscape
# The url to the portrait mode player banner image.
# Corresponds to the JSON property `bannerUrlPortrait`
# @return [String]
attr_accessor :banner_url_portrait
# The name to display for the player.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# 1P/3P metadata about the player's experience.
# Corresponds to the JSON property `experienceInfo`
# @return [Google::Apis::GamesV1::PlayerExperienceInfo]
attr_accessor :experience_info
# The friend status of the given player, relative to the requester. This is
# unset if the player is not sharing their friends list with the game.
# Corresponds to the JSON property `friendStatus`
# @return [String]
attr_accessor :friend_status
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#player`
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# A representation of the individual components of the name.
# Corresponds to the JSON property `name`
# @return [Google::Apis::GamesV1::Player::Name]
attr_accessor :name
# The player ID that was used for this player the first time they signed into
# the game in question. This is only populated for calls to player.get for the
# requesting player, only if the player ID has subsequently changed, and only to
# clients that support remapping player IDs.
# Corresponds to the JSON property `originalPlayerId`
# @return [String]
attr_accessor :original_player_id
# The ID of the player.
# Corresponds to the JSON property `playerId`
# @return [String]
attr_accessor :player_id
# Profile settings
# Corresponds to the JSON property `profileSettings`
# @return [Google::Apis::GamesV1::ProfileSettings]
attr_accessor :profile_settings
# The player's title rewarded for their game activities.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@avatar_image_url = args[:avatar_image_url] if args.key?(:avatar_image_url)
@banner_url_landscape = args[:banner_url_landscape] if args.key?(:banner_url_landscape)
@banner_url_portrait = args[:banner_url_portrait] if args.key?(:banner_url_portrait)
@display_name = args[:display_name] if args.key?(:display_name)
@experience_info = args[:experience_info] if args.key?(:experience_info)
@friend_status = args[:friend_status] if args.key?(:friend_status)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@original_player_id = args[:original_player_id] if args.key?(:original_player_id)
@player_id = args[:player_id] if args.key?(:player_id)
@profile_settings = args[:profile_settings] if args.key?(:profile_settings)
@title = args[:title] if args.key?(:title)
end
# A representation of the individual components of the name.
class Name
include Google::Apis::Core::Hashable
# The family name of this player. In some places, this is known as the last name.
# Corresponds to the JSON property `familyName`
# @return [String]
attr_accessor :family_name
# The given name of this player. In some places, this is known as the first name.
# Corresponds to the JSON property `givenName`
# @return [String]
attr_accessor :given_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@family_name = args[:family_name] if args.key?(:family_name)
@given_name = args[:given_name] if args.key?(:given_name)
end
end
end
# An achievement object.
class PlayerAchievement
include Google::Apis::Core::Hashable
# The state of the achievement.
# Corresponds to the JSON property `achievementState`
# @return [String]
attr_accessor :achievement_state
# The current steps for an incremental achievement.
# Corresponds to the JSON property `currentSteps`
# @return [Fixnum]
attr_accessor :current_steps
# Experience points earned for the achievement. This field is absent for
# achievements that have not yet been unlocked and 0 for achievements that have
# been unlocked by testers but that are unpublished.
# Corresponds to the JSON property `experiencePoints`
# @return [Fixnum]
attr_accessor :experience_points
# The current steps for an incremental achievement as a string.
# Corresponds to the JSON property `formattedCurrentStepsString`
# @return [String]
attr_accessor :formatted_current_steps_string
# The ID of the achievement.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#playerAchievement`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The timestamp of the last modification to this achievement's state.
# Corresponds to the JSON property `lastUpdatedTimestamp`
# @return [Fixnum]
attr_accessor :last_updated_timestamp
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@achievement_state = args[:achievement_state] if args.key?(:achievement_state)
@current_steps = args[:current_steps] if args.key?(:current_steps)
@experience_points = args[:experience_points] if args.key?(:experience_points)
@formatted_current_steps_string = args[:formatted_current_steps_string] if args.key?(:formatted_current_steps_string)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@last_updated_timestamp = args[:last_updated_timestamp] if args.key?(:last_updated_timestamp)
end
end
# A list of achievement objects.
class ListPlayerAchievementResponse
include Google::Apis::Core::Hashable
# The achievements.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::GamesV1::PlayerAchievement>]
attr_accessor :items
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#playerAchievementListResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token corresponding to the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# An event status resource.
class PlayerEvent
include Google::Apis::Core::Hashable
# The ID of the event definition.
# Corresponds to the JSON property `definitionId`
# @return [String]
attr_accessor :definition_id
# The current number of times this event has occurred, as a string. The
# formatting of this string depends on the configuration of your event in the
# Play Games Developer Console.
# Corresponds to the JSON property `formattedNumEvents`
# @return [String]
attr_accessor :formatted_num_events
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#playerEvent`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The current number of times this event has occurred.
# Corresponds to the JSON property `numEvents`
# @return [Fixnum]
attr_accessor :num_events
# The ID of the player.
# Corresponds to the JSON property `playerId`
# @return [String]
attr_accessor :player_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@definition_id = args[:definition_id] if args.key?(:definition_id)
@formatted_num_events = args[:formatted_num_events] if args.key?(:formatted_num_events)
@kind = args[:kind] if args.key?(:kind)
@num_events = args[:num_events] if args.key?(:num_events)
@player_id = args[:player_id] if args.key?(:player_id)
end
end
# A ListByPlayer response.
class ListPlayerEventResponse
include Google::Apis::Core::Hashable
# The player events.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::GamesV1::PlayerEvent>]
attr_accessor :items
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#playerEventListResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The pagination token for the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# 1P/3P metadata about the player's experience.
class PlayerExperienceInfo
include Google::Apis::Core::Hashable
# The current number of experience points for the player.
# Corresponds to the JSON property `currentExperiencePoints`
# @return [Fixnum]
attr_accessor :current_experience_points
# 1P/3P metadata about a user's level.
# Corresponds to the JSON property `currentLevel`
# @return [Google::Apis::GamesV1::PlayerLevel]
attr_accessor :current_level
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#playerExperienceInfo`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The timestamp when the player was leveled up, in millis since Unix epoch UTC.
# Corresponds to the JSON property `lastLevelUpTimestampMillis`
# @return [Fixnum]
attr_accessor :last_level_up_timestamp_millis
# 1P/3P metadata about a user's level.
# Corresponds to the JSON property `nextLevel`
# @return [Google::Apis::GamesV1::PlayerLevel]
attr_accessor :next_level
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@current_experience_points = args[:current_experience_points] if args.key?(:current_experience_points)
@current_level = args[:current_level] if args.key?(:current_level)
@kind = args[:kind] if args.key?(:kind)
@last_level_up_timestamp_millis = args[:last_level_up_timestamp_millis] if args.key?(:last_level_up_timestamp_millis)
@next_level = args[:next_level] if args.key?(:next_level)
end
end
# A player leaderboard score object.
class PlayerLeaderboardScore
include Google::Apis::Core::Hashable
# A score rank in a leaderboard.
# Corresponds to the JSON property `friendsRank`
# @return [Google::Apis::GamesV1::LeaderboardScoreRank]
attr_accessor :friends_rank
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#playerLeaderboardScore`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The ID of the leaderboard this score is in.
# Corresponds to the JSON property `leaderboard_id`
# @return [String]
attr_accessor :leaderboard_id
# A score rank in a leaderboard.
# Corresponds to the JSON property `publicRank`
# @return [Google::Apis::GamesV1::LeaderboardScoreRank]
attr_accessor :public_rank
# The formatted value of this score.
# Corresponds to the JSON property `scoreString`
# @return [String]
attr_accessor :score_string
# Additional information about the score. Values must contain no more than 64
# URI-safe characters as defined by section 2.3 of RFC 3986.
# Corresponds to the JSON property `scoreTag`
# @return [String]
attr_accessor :score_tag
# The numerical value of this score.
# Corresponds to the JSON property `scoreValue`
# @return [Fixnum]
attr_accessor :score_value
# A score rank in a leaderboard.
# Corresponds to the JSON property `socialRank`
# @return [Google::Apis::GamesV1::LeaderboardScoreRank]
attr_accessor :social_rank
# The time span of this score.
# Corresponds to the JSON property `timeSpan`
# @return [String]
attr_accessor :time_span
# The timestamp at which this score was recorded, in milliseconds since the
# epoch in UTC.
# Corresponds to the JSON property `writeTimestamp`
# @return [Fixnum]
attr_accessor :write_timestamp
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@friends_rank = args[:friends_rank] if args.key?(:friends_rank)
@kind = args[:kind] if args.key?(:kind)
@leaderboard_id = args[:leaderboard_id] if args.key?(:leaderboard_id)
@public_rank = args[:public_rank] if args.key?(:public_rank)
@score_string = args[:score_string] if args.key?(:score_string)
@score_tag = args[:score_tag] if args.key?(:score_tag)
@score_value = args[:score_value] if args.key?(:score_value)
@social_rank = args[:social_rank] if args.key?(:social_rank)
@time_span = args[:time_span] if args.key?(:time_span)
@write_timestamp = args[:write_timestamp] if args.key?(:write_timestamp)
end
end
# A list of player leaderboard scores.
class ListPlayerLeaderboardScoreResponse
include Google::Apis::Core::Hashable
# The leaderboard scores.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::GamesV1::PlayerLeaderboardScore>]
attr_accessor :items
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#playerLeaderboardScoreListResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The pagination token for the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# A Player resource.
# Corresponds to the JSON property `player`
# @return [Google::Apis::GamesV1::Player]
attr_accessor :player
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@player = args[:player] if args.key?(:player)
end
end
# 1P/3P metadata about a user's level.
class PlayerLevel
include Google::Apis::Core::Hashable
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#playerLevel`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The level for the user.
# Corresponds to the JSON property `level`
# @return [Fixnum]
attr_accessor :level
# The maximum experience points for this level.
# Corresponds to the JSON property `maxExperiencePoints`
# @return [Fixnum]
attr_accessor :max_experience_points
# The minimum experience points for this level.
# Corresponds to the JSON property `minExperiencePoints`
# @return [Fixnum]
attr_accessor :min_experience_points
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@level = args[:level] if args.key?(:level)
@max_experience_points = args[:max_experience_points] if args.key?(:max_experience_points)
@min_experience_points = args[:min_experience_points] if args.key?(:min_experience_points)
end
end
# A third party player list response.
class ListPlayerResponse
include Google::Apis::Core::Hashable
# The players.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::GamesV1::Player>]
attr_accessor :items
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#playerListResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token corresponding to the next page of results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# A player score.
class PlayerScore
include Google::Apis::Core::Hashable
# The formatted score for this player score.
# Corresponds to the JSON property `formattedScore`
# @return [String]
attr_accessor :formatted_score
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#playerScore`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The numerical value for this player score.
# Corresponds to the JSON property `score`
# @return [Fixnum]
attr_accessor :score
# Additional information about this score. Values will contain no more than 64
# URI-safe characters as defined by section 2.3 of RFC 3986.
# Corresponds to the JSON property `scoreTag`
# @return [String]
attr_accessor :score_tag
# The time span for this player score.
# Corresponds to the JSON property `timeSpan`
# @return [String]
attr_accessor :time_span
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@formatted_score = args[:formatted_score] if args.key?(:formatted_score)
@kind = args[:kind] if args.key?(:kind)
@score = args[:score] if args.key?(:score)
@score_tag = args[:score_tag] if args.key?(:score_tag)
@time_span = args[:time_span] if args.key?(:time_span)
end
end
# A list of score submission statuses.
class ListPlayerScoreResponse
include Google::Apis::Core::Hashable
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#playerScoreListResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The score submissions statuses.
# Corresponds to the JSON property `submittedScores`
# @return [Array<Google::Apis::GamesV1::PlayerScoreResponse>]
attr_accessor :submitted_scores
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@submitted_scores = args[:submitted_scores] if args.key?(:submitted_scores)
end
end
# A list of leaderboard entry resources.
class PlayerScoreResponse
include Google::Apis::Core::Hashable
# The time spans where the submitted score is better than the existing score for
# that time span.
# Corresponds to the JSON property `beatenScoreTimeSpans`
# @return [Array<String>]
attr_accessor :beaten_score_time_spans
# The formatted value of the submitted score.
# Corresponds to the JSON property `formattedScore`
# @return [String]
attr_accessor :formatted_score
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#playerScoreResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The leaderboard ID that this score was submitted to.
# Corresponds to the JSON property `leaderboardId`
# @return [String]
attr_accessor :leaderboard_id
# Additional information about this score. Values will contain no more than 64
# URI-safe characters as defined by section 2.3 of RFC 3986.
# Corresponds to the JSON property `scoreTag`
# @return [String]
attr_accessor :score_tag
# The scores in time spans that have not been beaten. As an example, the
# submitted score may be better than the player's `DAILY` score, but not better
# than the player's scores for the `WEEKLY` or `ALL_TIME` time spans.
# Corresponds to the JSON property `unbeatenScores`
# @return [Array<Google::Apis::GamesV1::PlayerScore>]
attr_accessor :unbeaten_scores
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@beaten_score_time_spans = args[:beaten_score_time_spans] if args.key?(:beaten_score_time_spans)
@formatted_score = args[:formatted_score] if args.key?(:formatted_score)
@kind = args[:kind] if args.key?(:kind)
@leaderboard_id = args[:leaderboard_id] if args.key?(:leaderboard_id)
@score_tag = args[:score_tag] if args.key?(:score_tag)
@unbeaten_scores = args[:unbeaten_scores] if args.key?(:unbeaten_scores)
end
end
# A list of score submission requests.
class PlayerScoreSubmissionList
include Google::Apis::Core::Hashable
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#playerScoreSubmissionList`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The score submissions.
# Corresponds to the JSON property `scores`
# @return [Array<Google::Apis::GamesV1::ScoreSubmission>]
attr_accessor :scores
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@scores = args[:scores] if args.key?(:scores)
end
end
# Profile settings
class ProfileSettings
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `friendsListVisibility`
# @return [String]
attr_accessor :friends_list_visibility
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#profileSettings`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Whether the player's profile is visible to the currently signed in player.
# Corresponds to the JSON property `profileVisible`
# @return [Boolean]
attr_accessor :profile_visible
alias_method :profile_visible?, :profile_visible
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@friends_list_visibility = args[:friends_list_visibility] if args.key?(:friends_list_visibility)
@kind = args[:kind] if args.key?(:kind)
@profile_visible = args[:profile_visible] if args.key?(:profile_visible)
end
end
# Request for ResolveSnapshotHead RPC.
class ResolveSnapshotHeadRequest
include Google::Apis::Core::Hashable
# Required. The automatic resolution policy. All conflicts are resolved in
# chronological order, starting from the/ least recent. If the comparison metric
# is equal for the tentative head and the conflict, the head wins.
# Corresponds to the JSON property `resolutionPolicy`
# @return [String]
attr_accessor :resolution_policy
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@resolution_policy = args[:resolution_policy] if args.key?(:resolution_policy)
end
end
# Response for ResolveSnapshotHead RPC.
class ResolveSnapshotHeadResponse
include Google::Apis::Core::Hashable
# A snapshot represents a saved game state referred to using the developer-
# provided snapshot_id (think of it as a file's path). The set of attributes and
# binary data for a specific state is called a revision. Each revision is itself
# immutable, and referred to by a snapshot_revision_id. At any time, a snapshot
# has a "head" revision, and updates are made against that revision. If a
# snapshot update is received that isn't against the current head revision, then
# instead of changing the head revision it will result in a conflicting revision
# that must be specifically resolved.
# Corresponds to the JSON property `snapshot`
# @return [Google::Apis::GamesV1::SnapshotExtended]
attr_accessor :snapshot
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@snapshot = args[:snapshot] if args.key?(:snapshot)
end
end
# A third party checking a revision response.
class CheckRevisionResponse
include Google::Apis::Core::Hashable
# The version of the API this client revision should use when calling API
# methods.
# Corresponds to the JSON property `apiVersion`
# @return [String]
attr_accessor :api_version
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#revisionCheckResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The result of the revision check.
# Corresponds to the JSON property `revisionStatus`
# @return [String]
attr_accessor :revision_status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@api_version = args[:api_version] if args.key?(:api_version)
@kind = args[:kind] if args.key?(:kind)
@revision_status = args[:revision_status] if args.key?(:revision_status)
end
end
# A request to submit a score to leaderboards.
class ScoreSubmission
include Google::Apis::Core::Hashable
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#scoreSubmission`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The leaderboard this score is being submitted to.
# Corresponds to the JSON property `leaderboardId`
# @return [String]
attr_accessor :leaderboard_id
# The new score being submitted.
# Corresponds to the JSON property `score`
# @return [Fixnum]
attr_accessor :score
# Additional information about this score. Values will contain no more than 64
# URI-safe characters as defined by section 2.3 of RFC 3986.
# Corresponds to the JSON property `scoreTag`
# @return [String]
attr_accessor :score_tag
# Signature Values will contain URI-safe characters as defined by section 2.3 of
# RFC 3986.
# Corresponds to the JSON property `signature`
# @return [String]
attr_accessor :signature
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@leaderboard_id = args[:leaderboard_id] if args.key?(:leaderboard_id)
@score = args[:score] if args.key?(:score)
@score_tag = args[:score_tag] if args.key?(:score_tag)
@signature = args[:signature] if args.key?(:signature)
end
end
# An snapshot object.
class Snapshot
include Google::Apis::Core::Hashable
# An image of a snapshot.
# Corresponds to the JSON property `coverImage`
# @return [Google::Apis::GamesV1::SnapshotImage]
attr_accessor :cover_image
# The description of this snapshot.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# The ID of the file underlying this snapshot in the Drive API. Only present if
# the snapshot is a view on a Drive file and the file is owned by the caller.
# Corresponds to the JSON property `driveId`
# @return [String]
attr_accessor :drive_id
# The duration associated with this snapshot, in millis.
# Corresponds to the JSON property `durationMillis`
# @return [Fixnum]
attr_accessor :duration_millis
# The ID of the snapshot.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#snapshot`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The timestamp (in millis since Unix epoch) of the last modification to this
# snapshot.
# Corresponds to the JSON property `lastModifiedMillis`
# @return [Fixnum]
attr_accessor :last_modified_millis
# The progress value (64-bit integer set by developer) associated with this
# snapshot.
# Corresponds to the JSON property `progressValue`
# @return [Fixnum]
attr_accessor :progress_value
# The title of this snapshot.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
# The type of this snapshot.
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# The unique name provided when the snapshot was created.
# Corresponds to the JSON property `uniqueName`
# @return [String]
attr_accessor :unique_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cover_image = args[:cover_image] if args.key?(:cover_image)
@description = args[:description] if args.key?(:description)
@drive_id = args[:drive_id] if args.key?(:drive_id)
@duration_millis = args[:duration_millis] if args.key?(:duration_millis)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@last_modified_millis = args[:last_modified_millis] if args.key?(:last_modified_millis)
@progress_value = args[:progress_value] if args.key?(:progress_value)
@title = args[:title] if args.key?(:title)
@type = args[:type] if args.key?(:type)
@unique_name = args[:unique_name] if args.key?(:unique_name)
end
end
# Identifies a snapshot cover image resource. The image is provided by the game.
class SnapshotCoverImageResource
include Google::Apis::Core::Hashable
# Output only. Hash-like weak identifier of the uploaded image bytes, consistent
# per player per application per hash version. Within the context of a single
# player/application, it's guaranteed that two identical images coming from two
# different uploads will have the same content hash for the same hash algorithm
# version. It's extremely likely, though not guaranteed, that if two content
# hashes are equal, the images are identical. More than one content hash can be
# returned if more than one hash versions are supported.
# Corresponds to the JSON property `contentHash`
# @return [Array<Google::Apis::GamesV1::ContentHash>]
attr_accessor :content_hash
# Output only. A URL the client can use to download the image. May vary across
# requests, and only guaranteed to be valid for a short time after it is
# returned.
# Corresponds to the JSON property `downloadUrl`
# @return [String]
attr_accessor :download_url
# The height of the image in pixels.
# Corresponds to the JSON property `height`
# @return [Fixnum]
attr_accessor :height
# The MIME type of the image.
# Corresponds to the JSON property `mimeType`
# @return [String]
attr_accessor :mime_type
# The ID of the image resource. It's guaranteed that if two IDs are equal then
# the contents are equal as well. It's not guaranteed that two identical blobs
# coming from separate uploads have the same ID. The resource ID can only be
# used within the application, user and resource type it was originally returned
# for. For example, it's not possible to use SnapshotDataResource's resource ID
# as the resource_id of a SnapshotCoverImageResource, even if the blob is a
# valid image file.
# Corresponds to the JSON property `resourceId`
# @return [String]
attr_accessor :resource_id
# The width of the image in pixels.
# Corresponds to the JSON property `width`
# @return [Fixnum]
attr_accessor :width
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@content_hash = args[:content_hash] if args.key?(:content_hash)
@download_url = args[:download_url] if args.key?(:download_url)
@height = args[:height] if args.key?(:height)
@mime_type = args[:mime_type] if args.key?(:mime_type)
@resource_id = args[:resource_id] if args.key?(:resource_id)
@width = args[:width] if args.key?(:width)
end
end
# Identifies a snapshot data resource. The data is provided by the game.
class SnapshotDataResource
include Google::Apis::Core::Hashable
# Output only. Hash-like weak identifier of the uploaded blob, consistent per
# player per application per hash version. Within the context of a single player/
# application, it's guaranteed that two identical blobs coming from two
# different uploads will have the same content hash for the same hash algorithm
# version. It's extremely likely, though not guaranteed, that if two content
# hashes are equal, the blobs are identical. More than one content hash can be
# returned if more than one hash versions are supported.
# Corresponds to the JSON property `contentHash`
# @return [Array<Google::Apis::GamesV1::ContentHash>]
attr_accessor :content_hash
# Output only. A URL that the client can use to download the blob. May vary
# across requests, and only guaranteed to be valid for a short time after it is
# returned.
# Corresponds to the JSON property `downloadUrl`
# @return [String]
attr_accessor :download_url
# The ID of the blob resource. It's guaranteed that if two IDs are equal then
# the contents are equal as well. It's not guaranteed that two identical blobs
# coming from separate uploads have the same resource ID. The resource ID can
# only be used within the application, user and resource type it was originally
# returned for. For example, it's not possible to use SnapshotDataResource's
# resource ID as the resource_id of a SnapshotCoverImageResource, even if the
# blob is a valid image file.
# Corresponds to the JSON property `resourceId`
# @return [String]
attr_accessor :resource_id
# Output only. Size of the saved game blob in bytes.
# Corresponds to the JSON property `size`
# @return [Fixnum]
attr_accessor :size
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@content_hash = args[:content_hash] if args.key?(:content_hash)
@download_url = args[:download_url] if args.key?(:download_url)
@resource_id = args[:resource_id] if args.key?(:resource_id)
@size = args[:size] if args.key?(:size)
end
end
# A snapshot represents a saved game state referred to using the developer-
# provided snapshot_id (think of it as a file's path). The set of attributes and
# binary data for a specific state is called a revision. Each revision is itself
# immutable, and referred to by a snapshot_revision_id. At any time, a snapshot
# has a "head" revision, and updates are made against that revision. If a
# snapshot update is received that isn't against the current head revision, then
# instead of changing the head revision it will result in a conflicting revision
# that must be specifically resolved.
class SnapshotExtended
include Google::Apis::Core::Hashable
# A list of conflicting revisions. Only set if explicitly requested (e.g. using
# a field mask or a request flag), or if the RPC guarantees that this field is
# set. The conflicting revisions are sorted chronologically by their server
# creation time (oldest first). If there are too many conflicting revisions to
# return all of them in a single request this will only contain the first batch.
# In such case, the presented conflicting revisions must be resolved first in
# order to fetch the next batch.
# Corresponds to the JSON property `conflictingRevisions`
# @return [Array<Google::Apis::GamesV1::SnapshotRevision>]
attr_accessor :conflicting_revisions
# An indicator whether the snapshot has any conflicting revisions or not. Always
# set.
# Corresponds to the JSON property `hasConflictingRevisions`
# @return [Boolean]
attr_accessor :has_conflicting_revisions
alias_method :has_conflicting_revisions?, :has_conflicting_revisions
# A Snapshot revision resource. Snapshot revisions are immutable.
# Corresponds to the JSON property `headRevision`
# @return [Google::Apis::GamesV1::SnapshotRevision]
attr_accessor :head_revision
# An identifier of the snapshot,developer-specified.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@conflicting_revisions = args[:conflicting_revisions] if args.key?(:conflicting_revisions)
@has_conflicting_revisions = args[:has_conflicting_revisions] if args.key?(:has_conflicting_revisions)
@head_revision = args[:head_revision] if args.key?(:head_revision)
@name = args[:name] if args.key?(:name)
end
end
# An image of a snapshot.
class SnapshotImage
include Google::Apis::Core::Hashable
# The height of the image.
# Corresponds to the JSON property `height`
# @return [Fixnum]
attr_accessor :height
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#snapshotImage`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The MIME type of the image.
# Corresponds to the JSON property `mime_type`
# @return [String]
attr_accessor :mime_type
# The URL of the image. This URL may be invalidated at any time and should not
# be cached.
# Corresponds to the JSON property `url`
# @return [String]
attr_accessor :url
# The width of the image.
# Corresponds to the JSON property `width`
# @return [Fixnum]
attr_accessor :width
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@height = args[:height] if args.key?(:height)
@kind = args[:kind] if args.key?(:kind)
@mime_type = args[:mime_type] if args.key?(:mime_type)
@url = args[:url] if args.key?(:url)
@width = args[:width] if args.key?(:width)
end
end
# A third party list snapshots response.
class ListSnapshotResponse
include Google::Apis::Core::Hashable
# The snapshots.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::GamesV1::Snapshot>]
attr_accessor :items
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#snapshotListResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Token corresponding to the next page of results. If there are no more results,
# the token is omitted.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
# Metadata about a snapshot revision. Snapshot metadata is immutable - a
# metadata change corresponds to a new snapshot revision.
class SnapshotMetadata
include Google::Apis::Core::Hashable
# The description of this snapshot.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# The device that created the current revision.
# Corresponds to the JSON property `deviceName`
# @return [String]
attr_accessor :device_name
# The duration associated with this snapshot. Values with sub-millisecond
# precision can be rounded or trimmed to the closest millisecond.
# Corresponds to the JSON property `duration`
# @return [String]
attr_accessor :duration
# The timestamp of the last modification to this snapshot. Values with sub-
# millisecond precision can be rounded or trimmed to the closest millisecond.
# Corresponds to the JSON property `lastModifyTime`
# @return [String]
attr_accessor :last_modify_time
# The progress value (64-bit integer set by developer) associated with this
# snapshot.
# Corresponds to the JSON property `progressValue`
# @return [Fixnum]
attr_accessor :progress_value
# The title of this snapshot.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@description = args[:description] if args.key?(:description)
@device_name = args[:device_name] if args.key?(:device_name)
@duration = args[:duration] if args.key?(:duration)
@last_modify_time = args[:last_modify_time] if args.key?(:last_modify_time)
@progress_value = args[:progress_value] if args.key?(:progress_value)
@title = args[:title] if args.key?(:title)
end
end
# A Snapshot revision resource. Snapshot revisions are immutable.
class SnapshotRevision
include Google::Apis::Core::Hashable
# Identifies a snapshot data resource. The data is provided by the game.
# Corresponds to the JSON property `blob`
# @return [Google::Apis::GamesV1::SnapshotDataResource]
attr_accessor :blob
# Identifies a snapshot cover image resource. The image is provided by the game.
# Corresponds to the JSON property `coverImage`
# @return [Google::Apis::GamesV1::SnapshotCoverImageResource]
attr_accessor :cover_image
# Output only. A server generated identifier of the snapshot revision.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Metadata about a snapshot revision. Snapshot metadata is immutable - a
# metadata change corresponds to a new snapshot revision.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::GamesV1::SnapshotMetadata]
attr_accessor :metadata
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@blob = args[:blob] if args.key?(:blob)
@cover_image = args[:cover_image] if args.key?(:cover_image)
@id = args[:id] if args.key?(:id)
@metadata = args[:metadata] if args.key?(:metadata)
end
end
# A third party stats resource.
class StatsResponse
include Google::Apis::Core::Hashable
# Average session length in minutes of the player. E.g., 1, 30, 60, ... . Not
# populated if there is not enough information.
# Corresponds to the JSON property `avg_session_length_minutes`
# @return [Float]
attr_accessor :avg_session_length_minutes
# The probability of the player not returning to play the game in the next day.
# E.g., 0, 0.1, 0.5, ..., 1.0. Not populated if there is not enough information.
# Corresponds to the JSON property `churn_probability`
# @return [Float]
attr_accessor :churn_probability
# Number of days since the player last played this game. E.g., 0, 1, 5, 10, ... .
# Not populated if there is not enough information.
# Corresponds to the JSON property `days_since_last_played`
# @return [Fixnum]
attr_accessor :days_since_last_played
# The probability of the player going to spend beyond a threshold amount of
# money. E.g., 0, 0.25, 0.50, 0.75. Not populated if there is not enough
# information.
# Corresponds to the JSON property `high_spender_probability`
# @return [Float]
attr_accessor :high_spender_probability
# Uniquely identifies the type of this resource. Value is always the fixed
# string `games#statsResponse`.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Number of in-app purchases made by the player in this game. E.g., 0, 1, 5, 10,
# ... . Not populated if there is not enough information.
# Corresponds to the JSON property `num_purchases`
# @return [Fixnum]
attr_accessor :num_purchases
# The approximate number of sessions of the player within the last 28 days,
# where a session begins when the player is connected to Play Games Services and
# ends when they are disconnected. E.g., 0, 1, 5, 10, ... . Not populated if
# there is not enough information.
# Corresponds to the JSON property `num_sessions`
# @return [Fixnum]
attr_accessor :num_sessions
# The approximation of the sessions percentile of the player within the last 30
# days, where a session begins when the player is connected to Play Games
# Services and ends when they are disconnected. E.g., 0, 0.25, 0.5, 0.75. Not
# populated if there is not enough information.
# Corresponds to the JSON property `num_sessions_percentile`
# @return [Float]
attr_accessor :num_sessions_percentile
# The approximate spend percentile of the player in this game. E.g., 0, 0.25, 0.
# 5, 0.75. Not populated if there is not enough information.
# Corresponds to the JSON property `spend_percentile`
# @return [Float]
attr_accessor :spend_percentile
# The probability of the player going to spend the game in the next seven days.
# E.g., 0, 0.25, 0.50, 0.75. Not populated if there is not enough information.
# Corresponds to the JSON property `spend_probability`
# @return [Float]
attr_accessor :spend_probability
# The predicted amount of money that the player going to spend in the next 28
# days. E.g., 1, 30, 60, ... . Not populated if there is not enough information.
# Corresponds to the JSON property `total_spend_next_28_days`
# @return [Float]
attr_accessor :total_spend_next_28_days
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@avg_session_length_minutes = args[:avg_session_length_minutes] if args.key?(:avg_session_length_minutes)
@churn_probability = args[:churn_probability] if args.key?(:churn_probability)
@days_since_last_played = args[:days_since_last_played] if args.key?(:days_since_last_played)
@high_spender_probability = args[:high_spender_probability] if args.key?(:high_spender_probability)
@kind = args[:kind] if args.key?(:kind)
@num_purchases = args[:num_purchases] if args.key?(:num_purchases)
@num_sessions = args[:num_sessions] if args.key?(:num_sessions)
@num_sessions_percentile = args[:num_sessions_percentile] if args.key?(:num_sessions_percentile)
@spend_percentile = args[:spend_percentile] if args.key?(:spend_percentile)
@spend_probability = args[:spend_probability] if args.key?(:spend_probability)
@total_spend_next_28_days = args[:total_spend_next_28_days] if args.key?(:total_spend_next_28_days)
end
end
end
end
end
|