google-api-client 0.8.6 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (537) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +23 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +58 -2
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +38 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +189 -147
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +1088 -0
  15. data/api_names_out.yaml +26978 -0
  16. data/bin/generate-api +109 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1335 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +446 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +872 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  21. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +3025 -0
  22. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1240 -0
  23. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +1446 -0
  24. data/generated/google/apis/adexchangebuyer_v1_4.rb +35 -0
  25. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  26. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +347 -0
  27. data/generated/google/apis/adexchangeseller_v2_0/service.rb +668 -0
  28. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  29. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  30. data/generated/google/apis/admin_datatransfer_v1/representations.rb +130 -0
  31. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  32. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  33. data/generated/google/apis/admin_directory_v1/classes.rb +3141 -0
  34. data/generated/google/apis/admin_directory_v1/representations.rb +1147 -0
  35. data/generated/google/apis/admin_directory_v1/service.rb +3818 -0
  36. data/generated/google/apis/admin_directory_v1.rb +113 -0
  37. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  38. data/generated/google/apis/admin_reports_v1/representations.rb +257 -0
  39. data/generated/google/apis/admin_reports_v1/service.rb +336 -0
  40. data/generated/google/apis/admin_reports_v1.rb +38 -0
  41. data/generated/google/apis/adsense_v1_4/classes.rb +1280 -0
  42. data/generated/google/apis/adsense_v1_4/representations.rb +555 -0
  43. data/generated/google/apis/adsense_v1_4/service.rb +1714 -0
  44. data/generated/google/apis/adsense_v1_4.rb +38 -0
  45. data/generated/google/apis/adsensehost_v4_1/classes.rb +837 -0
  46. data/generated/google/apis/adsensehost_v4_1/representations.rb +367 -0
  47. data/generated/google/apis/adsensehost_v4_1/service.rb +1164 -0
  48. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  49. data/generated/google/apis/analytics_v3/classes.rb +5118 -0
  50. data/generated/google/apis/analytics_v3/representations.rb +1850 -0
  51. data/generated/google/apis/analytics_v3/service.rb +3568 -0
  52. data/generated/google/apis/analytics_v3.rb +49 -0
  53. data/generated/google/apis/androidenterprise_v1/classes.rb +1443 -0
  54. data/generated/google/apis/androidenterprise_v1/representations.rb +614 -0
  55. data/generated/google/apis/androidenterprise_v1/service.rb +2607 -0
  56. data/generated/google/apis/androidenterprise_v1.rb +35 -0
  57. data/generated/google/apis/androidpublisher_v2/classes.rb +1411 -0
  58. data/generated/google/apis/androidpublisher_v2/representations.rb +738 -0
  59. data/generated/google/apis/androidpublisher_v2/service.rb +2338 -0
  60. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  61. data/generated/google/apis/appengine_v1beta4/classes.rb +1585 -0
  62. data/generated/google/apis/appengine_v1beta4/representations.rb +542 -0
  63. data/generated/google/apis/appengine_v1beta4/service.rb +477 -0
  64. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  65. data/generated/google/apis/appengine_v1beta5/classes.rb +1544 -0
  66. data/generated/google/apis/appengine_v1beta5/representations.rb +594 -0
  67. data/generated/google/apis/appengine_v1beta5/service.rb +521 -0
  68. data/generated/google/apis/appengine_v1beta5.rb +35 -0
  69. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  70. data/generated/google/apis/appsactivity_v1/representations.rb +206 -0
  71. data/generated/google/apis/appsactivity_v1/service.rb +128 -0
  72. data/generated/google/apis/appsactivity_v1.rb +46 -0
  73. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  74. data/generated/google/apis/appstate_v1/representations.rb +87 -0
  75. data/generated/google/apis/appstate_v1/service.rb +260 -0
  76. data/generated/google/apis/appstate_v1.rb +34 -0
  77. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  78. data/generated/google/apis/autoscaler_v1beta2/representations.rb +313 -0
  79. data/generated/google/apis/autoscaler_v1beta2/service.rb +478 -0
  80. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  81. data/generated/google/apis/bigquery_v2/classes.rb +2503 -0
  82. data/generated/google/apis/bigquery_v2/representations.rb +914 -0
  83. data/generated/google/apis/bigquery_v2/service.rb +982 -0
  84. data/generated/google/apis/bigquery_v2.rb +52 -0
  85. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  86. data/generated/google/apis/blogger_v3/representations.rb +632 -0
  87. data/generated/google/apis/blogger_v3/service.rb +1587 -0
  88. data/generated/google/apis/blogger_v3.rb +37 -0
  89. data/generated/google/apis/books_v1/classes.rb +4006 -0
  90. data/generated/google/apis/books_v1/representations.rb +1742 -0
  91. data/generated/google/apis/books_v1/service.rb +2293 -0
  92. data/generated/google/apis/books_v1.rb +34 -0
  93. data/generated/google/apis/calendar_v3/classes.rb +1742 -0
  94. data/generated/google/apis/calendar_v3/representations.rb +631 -0
  95. data/generated/google/apis/calendar_v3/service.rb +1968 -0
  96. data/generated/google/apis/calendar_v3.rb +37 -0
  97. data/generated/google/apis/civicinfo_v2/classes.rb +1127 -0
  98. data/generated/google/apis/civicinfo_v2/representations.rb +423 -0
  99. data/generated/google/apis/civicinfo_v2/service.rb +279 -0
  100. data/generated/google/apis/civicinfo_v2.rb +31 -0
  101. data/generated/google/apis/classroom_v1/classes.rb +512 -0
  102. data/generated/google/apis/classroom_v1/representations.rb +245 -0
  103. data/generated/google/apis/classroom_v1/service.rb +970 -0
  104. data/generated/google/apis/classroom_v1.rb +49 -0
  105. data/generated/google/apis/classroom_v1beta1/classes.rb +447 -0
  106. data/generated/google/apis/classroom_v1beta1/representations.rb +190 -0
  107. data/generated/google/apis/classroom_v1beta1/service.rb +791 -0
  108. data/generated/google/apis/classroom_v1beta1.rb +49 -0
  109. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  110. data/generated/google/apis/cloudbilling_v1/representations.rb +87 -0
  111. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  112. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  113. data/generated/google/apis/cloudbuild_v1/classes.rb +521 -0
  114. data/generated/google/apis/cloudbuild_v1/representations.rb +214 -0
  115. data/generated/google/apis/cloudbuild_v1/service.rb +278 -0
  116. data/generated/google/apis/cloudbuild_v1.rb +35 -0
  117. data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
  118. data/generated/google/apis/clouddebugger_v2/representations.rb +464 -0
  119. data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
  120. data/generated/google/apis/clouddebugger_v2.rb +41 -0
  121. data/generated/google/apis/cloudlatencytest_v2/classes.rb +195 -0
  122. data/generated/google/apis/cloudlatencytest_v2/representations.rb +127 -0
  123. data/generated/google/apis/cloudlatencytest_v2/service.rb +135 -0
  124. data/generated/google/apis/cloudlatencytest_v2.rb +34 -0
  125. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  126. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +353 -0
  127. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +452 -0
  128. data/generated/google/apis/cloudmonitoring_v2beta2.rb +37 -0
  129. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +450 -0
  130. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +226 -0
  131. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +626 -0
  132. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  133. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  134. data/generated/google/apis/cloudtrace_v1/representations.rb +102 -0
  135. data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
  136. data/generated/google/apis/cloudtrace_v1.rb +35 -0
  137. data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
  138. data/generated/google/apis/clouduseraccounts_beta/representations.rb +351 -0
  139. data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
  140. data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
  141. data/generated/google/apis/compute_beta/classes.rb +9741 -0
  142. data/generated/google/apis/compute_beta/representations.rb +3649 -0
  143. data/generated/google/apis/compute_beta/service.rb +10636 -0
  144. data/generated/google/apis/compute_beta.rb +49 -0
  145. data/generated/google/apis/compute_v1/classes.rb +9095 -0
  146. data/generated/google/apis/compute_v1/representations.rb +3389 -0
  147. data/generated/google/apis/compute_v1/service.rb +9627 -0
  148. data/generated/google/apis/compute_v1.rb +49 -0
  149. data/generated/google/apis/container_v1/classes.rb +463 -0
  150. data/generated/google/apis/container_v1/representations.rb +195 -0
  151. data/generated/google/apis/container_v1/service.rb +367 -0
  152. data/generated/google/apis/container_v1.rb +35 -0
  153. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  154. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  155. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  156. data/generated/google/apis/container_v1beta1.rb +35 -0
  157. data/generated/google/apis/content_v2/classes.rb +6114 -0
  158. data/generated/google/apis/content_v2/representations.rb +2624 -0
  159. data/generated/google/apis/content_v2/service.rb +2338 -0
  160. data/generated/google/apis/content_v2.rb +35 -0
  161. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  162. data/generated/google/apis/coordinate_v1/representations.rb +321 -0
  163. data/generated/google/apis/coordinate_v1/service.rb +678 -0
  164. data/generated/google/apis/coordinate_v1.rb +37 -0
  165. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  166. data/generated/google/apis/customsearch_v1/representations.rb +302 -0
  167. data/generated/google/apis/customsearch_v1/service.rb +207 -0
  168. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  169. data/generated/google/apis/dataproc_v1/classes.rb +1590 -0
  170. data/generated/google/apis/dataproc_v1/representations.rb +653 -0
  171. data/generated/google/apis/dataproc_v1/service.rb +719 -0
  172. data/generated/google/apis/dataproc_v1.rb +43 -0
  173. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  174. data/generated/google/apis/datastore_v1beta2/representations.rb +594 -0
  175. data/generated/google/apis/datastore_v1beta2/service.rb +294 -0
  176. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  177. data/generated/google/apis/deploymentmanager_v2/classes.rb +1162 -0
  178. data/generated/google/apis/deploymentmanager_v2/representations.rb +508 -0
  179. data/generated/google/apis/deploymentmanager_v2/service.rb +862 -0
  180. data/generated/google/apis/deploymentmanager_v2.rb +44 -0
  181. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +843 -0
  182. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +306 -0
  183. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +689 -0
  184. data/generated/google/apis/deploymentmanager_v2beta2.rb +44 -0
  185. data/generated/google/apis/dfareporting_v2_1/classes.rb +10770 -0
  186. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  187. data/generated/google/apis/dfareporting_v2_1/service.rb +8585 -0
  188. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  189. data/generated/google/apis/dfareporting_v2_3/classes.rb +10830 -0
  190. data/generated/google/apis/dfareporting_v2_3/representations.rb +3829 -0
  191. data/generated/google/apis/dfareporting_v2_3/service.rb +8581 -0
  192. data/generated/google/apis/dfareporting_v2_3.rb +37 -0
  193. data/generated/google/apis/discovery_v1/classes.rb +961 -0
  194. data/generated/google/apis/discovery_v1/representations.rb +397 -0
  195. data/generated/google/apis/discovery_v1/service.rb +142 -0
  196. data/generated/google/apis/discovery_v1.rb +32 -0
  197. data/generated/google/apis/dns_v1/classes.rb +406 -0
  198. data/generated/google/apis/dns_v1/representations.rb +167 -0
  199. data/generated/google/apis/dns_v1/service.rb +454 -0
  200. data/generated/google/apis/dns_v1.rb +44 -0
  201. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +802 -0
  202. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +371 -0
  203. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +374 -0
  204. data/generated/google/apis/doubleclickbidmanager_v1.rb +31 -0
  205. data/generated/google/apis/doubleclicksearch_v2/classes.rb +958 -0
  206. data/generated/google/apis/doubleclicksearch_v2/representations.rb +350 -0
  207. data/generated/google/apis/doubleclicksearch_v2/service.rb +480 -0
  208. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  209. data/generated/google/apis/drive_v2/classes.rb +2569 -0
  210. data/generated/google/apis/drive_v2/representations.rb +878 -0
  211. data/generated/google/apis/drive_v2/service.rb +2740 -0
  212. data/generated/google/apis/drive_v2.rb +58 -0
  213. data/generated/google/apis/drive_v3/classes.rb +1541 -0
  214. data/generated/google/apis/drive_v3/representations.rb +548 -0
  215. data/generated/google/apis/drive_v3/service.rb +1542 -0
  216. data/generated/google/apis/drive_v3.rb +55 -0
  217. data/generated/google/apis/fitness_v1/classes.rb +885 -0
  218. data/generated/google/apis/fitness_v1/representations.rb +360 -0
  219. data/generated/google/apis/fitness_v1/service.rb +675 -0
  220. data/generated/google/apis/fitness_v1.rb +49 -0
  221. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  222. data/generated/google/apis/fusiontables_v2/representations.rb +457 -0
  223. data/generated/google/apis/fusiontables_v2/service.rb +1463 -0
  224. data/generated/google/apis/fusiontables_v2.rb +37 -0
  225. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  226. data/generated/google/apis/games_configuration_v1configuration/representations.rb +228 -0
  227. data/generated/google/apis/games_configuration_v1configuration/service.rb +565 -0
  228. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  229. data/generated/google/apis/games_management_v1management/classes.rb +533 -0
  230. data/generated/google/apis/games_management_v1management/representations.rb +262 -0
  231. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  232. data/generated/google/apis/games_management_v1management.rb +37 -0
  233. data/generated/google/apis/games_v1/classes.rb +4626 -0
  234. data/generated/google/apis/games_v1/representations.rb +1783 -0
  235. data/generated/google/apis/games_v1/service.rb +2290 -0
  236. data/generated/google/apis/games_v1.rb +40 -0
  237. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  238. data/generated/google/apis/gan_v1beta1/representations.rb +462 -0
  239. data/generated/google/apis/gan_v1beta1/service.rb +682 -0
  240. data/generated/google/apis/gan_v1beta1.rb +31 -0
  241. data/generated/google/apis/genomics_v1/classes.rb +2609 -0
  242. data/generated/google/apis/genomics_v1/representations.rb +1029 -0
  243. data/generated/google/apis/genomics_v1/service.rb +1676 -0
  244. data/generated/google/apis/genomics_v1.rb +49 -0
  245. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  246. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  247. data/generated/google/apis/genomics_v1beta2/service.rb +2392 -0
  248. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  249. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  250. data/generated/google/apis/gmail_v1/representations.rb +383 -0
  251. data/generated/google/apis/gmail_v1/service.rb +1470 -0
  252. data/generated/google/apis/gmail_v1.rb +52 -0
  253. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  254. data/generated/google/apis/groupsmigration_v1/representations.rb +40 -0
  255. data/generated/google/apis/groupsmigration_v1/service.rb +110 -0
  256. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  257. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  258. data/generated/google/apis/groupssettings_v1/representations.rb +66 -0
  259. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  260. data/generated/google/apis/groupssettings_v1.rb +34 -0
  261. data/generated/google/apis/identitytoolkit_v3/classes.rb +1637 -0
  262. data/generated/google/apis/identitytoolkit_v3/representations.rb +618 -0
  263. data/generated/google/apis/identitytoolkit_v3/service.rb +616 -0
  264. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  265. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  266. data/generated/google/apis/kgsearch_v1/representations.rb +41 -0
  267. data/generated/google/apis/kgsearch_v1/service.rb +111 -0
  268. data/{spec/google/api_client/request_spec.rb → generated/google/apis/kgsearch_v1.rb} +16 -13
  269. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  270. data/generated/google/apis/licensing_v1/representations.rb +74 -0
  271. data/generated/google/apis/licensing_v1/service.rb +369 -0
  272. data/generated/google/apis/licensing_v1.rb +34 -0
  273. data/generated/google/apis/logging_v1beta3/classes.rb +1079 -0
  274. data/generated/google/apis/logging_v1beta3/representations.rb +366 -0
  275. data/generated/google/apis/logging_v1beta3/service.rb +1001 -0
  276. data/generated/google/apis/logging_v1beta3.rb +47 -0
  277. data/generated/google/apis/logging_v2beta1/classes.rb +990 -0
  278. data/generated/google/apis/logging_v2beta1/representations.rb +377 -0
  279. data/generated/google/apis/logging_v2beta1/service.rb +547 -0
  280. data/generated/google/apis/logging_v2beta1.rb +47 -0
  281. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  282. data/generated/google/apis/manager_v1beta2/representations.rb +606 -0
  283. data/generated/google/apis/manager_v1beta2/service.rb +372 -0
  284. data/generated/google/apis/manager_v1beta2.rb +53 -0
  285. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  286. data/generated/google/apis/mirror_v1/representations.rb +390 -0
  287. data/generated/google/apis/mirror_v1/service.rb +977 -0
  288. data/generated/google/apis/mirror_v1.rb +37 -0
  289. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  290. data/generated/google/apis/oauth2_v2/representations.rb +102 -0
  291. data/generated/google/apis/oauth2_v2/service.rb +199 -0
  292. data/generated/google/apis/oauth2_v2.rb +43 -0
  293. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  294. data/generated/google/apis/pagespeedonline_v2/representations.rb +272 -0
  295. data/generated/google/apis/pagespeedonline_v2/service.rb +119 -0
  296. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  297. data/generated/google/apis/partners_v2/classes.rb +942 -0
  298. data/generated/google/apis/partners_v2/representations.rb +454 -0
  299. data/generated/google/apis/partners_v2/service.rb +400 -0
  300. data/generated/google/apis/partners_v2.rb +32 -0
  301. data/generated/google/apis/people_v1/classes.rb +1521 -0
  302. data/generated/google/apis/people_v1/representations.rb +663 -0
  303. data/generated/google/apis/people_v1/service.rb +189 -0
  304. data/generated/google/apis/people_v1.rb +59 -0
  305. data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
  306. data/generated/google/apis/plus_domains_v1/representations.rb +1111 -0
  307. data/generated/google/apis/plus_domains_v1/service.rb +904 -0
  308. data/generated/google/apis/plus_domains_v1.rb +61 -0
  309. data/generated/google/apis/plus_v1/classes.rb +2094 -0
  310. data/generated/google/apis/plus_v1/representations.rb +907 -0
  311. data/generated/google/apis/plus_v1/service.rb +470 -0
  312. data/generated/google/apis/plus_v1.rb +43 -0
  313. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  314. data/generated/google/apis/prediction_v1_6/representations.rb +369 -0
  315. data/generated/google/apis/prediction_v1_6/service.rb +380 -0
  316. data/generated/google/apis/prediction_v1_6.rb +44 -0
  317. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
  318. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +312 -0
  319. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
  320. data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
  321. data/generated/google/apis/pubsub_v1/classes.rb +614 -0
  322. data/generated/google/apis/pubsub_v1/representations.rb +323 -0
  323. data/generated/google/apis/pubsub_v1/service.rb +774 -0
  324. data/generated/google/apis/pubsub_v1.rb +37 -0
  325. data/generated/google/apis/pubsub_v1beta2/classes.rb +620 -0
  326. data/generated/google/apis/pubsub_v1beta2/representations.rb +282 -0
  327. data/generated/google/apis/pubsub_v1beta2/service.rb +774 -0
  328. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  329. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  330. data/generated/google/apis/qpx_express_v1/representations.rb +472 -0
  331. data/generated/google/apis/qpx_express_v1/service.rb +100 -0
  332. data/generated/google/apis/qpx_express_v1.rb +31 -0
  333. data/generated/google/apis/replicapool_v1beta2/classes.rb +631 -0
  334. data/generated/google/apis/replicapool_v1beta2/representations.rb +264 -0
  335. data/generated/google/apis/replicapool_v1beta2/service.rb +608 -0
  336. data/generated/google/apis/replicapool_v1beta2.rb +44 -0
  337. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +733 -0
  338. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +294 -0
  339. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +508 -0
  340. data/generated/google/apis/replicapoolupdater_v1beta1.rb +44 -0
  341. data/generated/google/apis/reseller_v1/classes.rb +526 -0
  342. data/generated/google/apis/reseller_v1/representations.rb +223 -0
  343. data/generated/google/apis/reseller_v1/service.rb +623 -0
  344. data/generated/google/apis/reseller_v1.rb +37 -0
  345. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  346. data/generated/google/apis/resourceviews_v1beta2/representations.rb +301 -0
  347. data/generated/google/apis/resourceviews_v1beta2/service.rb +563 -0
  348. data/generated/google/apis/resourceviews_v1beta2.rb +50 -0
  349. data/generated/google/apis/script_v1/classes.rb +259 -0
  350. data/generated/google/apis/script_v1/representations.rb +118 -0
  351. data/generated/google/apis/script_v1/service.rb +98 -0
  352. data/generated/google/apis/script_v1.rb +61 -0
  353. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  354. data/generated/google/apis/site_verification_v1/representations.rb +113 -0
  355. data/generated/google/apis/site_verification_v1/service.rb +315 -0
  356. data/generated/google/apis/site_verification_v1.rb +37 -0
  357. data/generated/google/apis/sqladmin_v1beta4/classes.rb +2030 -0
  358. data/generated/google/apis/sqladmin_v1beta4/representations.rb +856 -0
  359. data/generated/google/apis/sqladmin_v1beta4/service.rb +1625 -0
  360. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  361. data/generated/google/apis/storage_v1/classes.rb +1222 -0
  362. data/generated/google/apis/storage_v1/representations.rb +497 -0
  363. data/generated/google/apis/storage_v1/service.rb +1903 -0
  364. data/generated/google/apis/storage_v1.rb +46 -0
  365. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  366. data/generated/google/apis/storagetransfer_v1/representations.rb +418 -0
  367. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  368. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  369. data/generated/google/apis/tagmanager_v1/classes.rb +1494 -0
  370. data/generated/google/apis/tagmanager_v1/representations.rb +611 -0
  371. data/generated/google/apis/tagmanager_v1/service.rb +2119 -0
  372. data/generated/google/apis/tagmanager_v1.rb +52 -0
  373. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  374. data/generated/google/apis/taskqueue_v1beta2/representations.rb +126 -0
  375. data/generated/google/apis/taskqueue_v1beta2/service.rb +408 -0
  376. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  377. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  378. data/generated/google/apis/tasks_v1/representations.rb +125 -0
  379. data/generated/google/apis/tasks_v1/service.rb +643 -0
  380. data/generated/google/apis/tasks_v1.rb +37 -0
  381. data/generated/google/apis/translate_v2/classes.rb +168 -0
  382. data/generated/google/apis/translate_v2/representations.rb +121 -0
  383. data/generated/google/apis/translate_v2/service.rb +182 -0
  384. data/generated/google/apis/translate_v2.rb +31 -0
  385. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  386. data/generated/google/apis/urlshortener_v1/representations.rb +121 -0
  387. data/generated/google/apis/urlshortener_v1/service.rb +176 -0
  388. data/generated/google/apis/urlshortener_v1.rb +34 -0
  389. data/generated/google/apis/vision_v1/classes.rb +1259 -0
  390. data/generated/google/apis/vision_v1/representations.rb +418 -0
  391. data/generated/google/apis/vision_v1/service.rb +91 -0
  392. data/generated/google/apis/vision_v1.rb +37 -0
  393. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  394. data/generated/google/apis/webmasters_v3/representations.rb +282 -0
  395. data/generated/google/apis/webmasters_v3/service.rb +573 -0
  396. data/generated/google/apis/webmasters_v3.rb +37 -0
  397. data/generated/google/apis/youtube_analytics_v1/classes.rb +546 -0
  398. data/generated/google/apis/youtube_analytics_v1/representations.rb +273 -0
  399. data/generated/google/apis/youtube_analytics_v1/service.rb +562 -0
  400. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  401. data/generated/google/apis/youtube_v3/classes.rb +8071 -0
  402. data/generated/google/apis/youtube_v3/representations.rb +3134 -0
  403. data/generated/google/apis/youtube_v3/service.rb +4403 -0
  404. data/generated/google/apis/youtube_v3.rb +49 -0
  405. data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
  406. data/generated/google/apis/youtubereporting_v1/representations.rb +144 -0
  407. data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
  408. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  409. data/google-api-client.gemspec +25 -39
  410. data/lib/google/api_client/auth/installed_app.rb +7 -5
  411. data/lib/google/api_client/auth/key_utils.rb +1 -0
  412. data/lib/google/api_client/auth/storage.rb +4 -2
  413. data/lib/google/api_client/auth/storages/file_store.rb +2 -3
  414. data/lib/google/api_client/auth/storages/redis_store.rb +7 -2
  415. data/lib/google/api_client/client_secrets.rb +7 -9
  416. data/lib/google/apis/core/api_command.rb +136 -0
  417. data/lib/google/apis/core/base_service.rb +317 -0
  418. data/lib/google/apis/core/batch.rb +239 -0
  419. data/lib/google/apis/core/download.rb +94 -0
  420. data/lib/google/apis/core/hashable.rb +44 -0
  421. data/lib/google/apis/core/http_client_adapter.rb +82 -0
  422. data/lib/google/apis/core/http_command.rb +328 -0
  423. data/lib/google/apis/core/json_representation.rb +145 -0
  424. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  425. data/lib/google/apis/core/multipart.rb +187 -0
  426. data/lib/google/apis/core/upload.rb +289 -0
  427. data/lib/google/{api_client → apis}/errors.rb +39 -28
  428. data/lib/google/apis/generator/annotator.rb +295 -0
  429. data/lib/google/apis/generator/helpers.rb +74 -0
  430. data/lib/google/apis/generator/model.rb +143 -0
  431. data/lib/google/apis/generator/template.rb +124 -0
  432. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  433. data/lib/google/apis/generator/templates/_method.tmpl +92 -0
  434. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  435. data/lib/google/apis/generator/templates/_representation_stub.tmpl +17 -0
  436. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  437. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  438. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  439. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  440. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  441. data/lib/google/apis/generator.rb +70 -0
  442. data/lib/google/apis/options.rb +85 -0
  443. data/lib/google/apis/version.rb +39 -0
  444. data/lib/google/apis.rb +48 -0
  445. data/rakelib/metrics.rake +22 -0
  446. data/rakelib/rubocop.rake +10 -0
  447. data/rakelib/spec.rake +11 -0
  448. data/rakelib/yard.rake +11 -0
  449. data/samples/cli/Gemfile +7 -0
  450. data/samples/cli/README.md +51 -0
  451. data/samples/cli/google-api-samples +32 -0
  452. data/samples/cli/lib/base_cli.rb +95 -0
  453. data/samples/cli/lib/samples/analytics.rb +62 -0
  454. data/samples/cli/lib/samples/androidpublisher.rb +47 -0
  455. data/samples/cli/lib/samples/calendar.rb +83 -0
  456. data/samples/cli/lib/samples/drive.rb +82 -0
  457. data/samples/cli/lib/samples/gmail.rb +50 -0
  458. data/samples/cli/lib/samples/pubsub.rb +114 -0
  459. data/samples/cli/lib/samples/translate.rb +44 -0
  460. data/samples/cli/lib/samples/you_tube.rb +44 -0
  461. data/samples/web/Gemfile +7 -0
  462. data/samples/web/README.md +44 -0
  463. data/samples/web/app.rb +120 -0
  464. data/samples/web/views/calendar.erb +34 -0
  465. data/{lib/google/api_client/service_account.rb → samples/web/views/drive.erb} +20 -8
  466. data/samples/web/views/home.erb +35 -0
  467. data/samples/web/views/layout.erb +40 -0
  468. data/script/generate +100 -0
  469. data/script/package +8 -0
  470. data/script/release +15 -0
  471. data/spec/fixtures/files/api_names.yaml +3 -0
  472. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  473. data/spec/fixtures/files/child/.gitignore +0 -0
  474. data/spec/fixtures/files/client_secrets.json +1 -0
  475. data/spec/fixtures/files/invalid.json +1 -0
  476. data/spec/fixtures/files/test.blah +1 -0
  477. data/spec/fixtures/files/test.txt +1 -0
  478. data/spec/fixtures/files/test_api.json +440 -0
  479. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  480. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  481. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  482. data/spec/google/api_client/client_secrets_spec.rb +338 -2
  483. data/spec/google/apis/core/api_command_spec.rb +209 -0
  484. data/spec/google/apis/core/batch_spec.rb +142 -0
  485. data/spec/google/apis/core/download_spec.rb +103 -0
  486. data/spec/google/apis/core/hashable_spec.rb +60 -0
  487. data/spec/google/apis/core/http_command_spec.rb +303 -0
  488. data/spec/google/apis/core/json_representation_spec.rb +199 -0
  489. data/spec/google/apis/core/service_spec.rb +247 -0
  490. data/spec/google/apis/core/upload_spec.rb +300 -0
  491. data/{lib/google/api_client/discovery.rb → spec/google/apis/generated_spec.rb} +13 -5
  492. data/spec/google/apis/generator/generator_spec.rb +324 -0
  493. data/spec/google/apis/logging_spec.rb +45 -0
  494. data/spec/google/apis/options_spec.rb +40 -0
  495. data/spec/integration_tests/adsense_spec.rb +29 -0
  496. data/spec/integration_tests/drive_spec.rb +35 -0
  497. data/spec/integration_tests/pubsub_spec.rb +48 -0
  498. data/spec/integration_tests/url_shortener_spec.rb +45 -0
  499. data/spec/spec_helper/load_path_spec.rb +33 -0
  500. data/spec/spec_helper.rb +131 -44
  501. data/third_party/hurley_patches.rb +103 -0
  502. metadata +563 -188
  503. data/lib/compat/multi_json.rb +0 -19
  504. data/lib/google/api_client/auth/file_storage.rb +0 -59
  505. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  506. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  507. data/lib/google/api_client/batch.rb +0 -326
  508. data/lib/google/api_client/charset.rb +0 -33
  509. data/lib/google/api_client/discovery/api.rb +0 -310
  510. data/lib/google/api_client/discovery/media.rb +0 -77
  511. data/lib/google/api_client/discovery/method.rb +0 -363
  512. data/lib/google/api_client/discovery/resource.rb +0 -156
  513. data/lib/google/api_client/discovery/schema.rb +0 -117
  514. data/lib/google/api_client/environment.rb +0 -42
  515. data/lib/google/api_client/gzip.rb +0 -28
  516. data/lib/google/api_client/logging.rb +0 -32
  517. data/lib/google/api_client/media.rb +0 -259
  518. data/lib/google/api_client/railtie.rb +0 -18
  519. data/lib/google/api_client/request.rb +0 -350
  520. data/lib/google/api_client/result.rb +0 -255
  521. data/lib/google/api_client/service/batch.rb +0 -110
  522. data/lib/google/api_client/service/request.rb +0 -144
  523. data/lib/google/api_client/service/resource.rb +0 -40
  524. data/lib/google/api_client/service/result.rb +0 -162
  525. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  526. data/lib/google/api_client/service/stub_generator.rb +0 -61
  527. data/lib/google/api_client/service.rb +0 -233
  528. data/lib/google/api_client.rb +0 -750
  529. data/spec/google/api_client/batch_spec.rb +0 -248
  530. data/spec/google/api_client/discovery_spec.rb +0 -708
  531. data/spec/google/api_client/gzip_spec.rb +0 -98
  532. data/spec/google/api_client/media_spec.rb +0 -178
  533. data/spec/google/api_client/result_spec.rb +0 -207
  534. data/spec/google/api_client/service_account_spec.rb +0 -169
  535. data/spec/google/api_client/service_spec.rb +0 -618
  536. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  537. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,4626 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module GamesV1
24
+
25
+ # This is a JSON template for an achievement definition object.
26
+ class AchievementDefinition
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # The type of the achievement.
30
+ # Possible values are:
31
+ # - "STANDARD" - Achievement is either locked or unlocked.
32
+ # - "INCREMENTAL" - Achievement is incremental.
33
+ # Corresponds to the JSON property `achievementType`
34
+ # @return [String]
35
+ attr_accessor :achievement_type
36
+
37
+ # The description of the achievement.
38
+ # Corresponds to the JSON property `description`
39
+ # @return [String]
40
+ attr_accessor :description
41
+
42
+ # Experience points which will be earned when unlocking this achievement.
43
+ # Corresponds to the JSON property `experiencePoints`
44
+ # @return [String]
45
+ attr_accessor :experience_points
46
+
47
+ # The total steps for an incremental achievement as a string.
48
+ # Corresponds to the JSON property `formattedTotalSteps`
49
+ # @return [String]
50
+ attr_accessor :formatted_total_steps
51
+
52
+ # The ID of the achievement.
53
+ # Corresponds to the JSON property `id`
54
+ # @return [String]
55
+ attr_accessor :id
56
+
57
+ # The initial state of the achievement.
58
+ # Possible values are:
59
+ # - "HIDDEN" - Achievement is hidden.
60
+ # - "REVEALED" - Achievement is revealed.
61
+ # - "UNLOCKED" - Achievement is unlocked.
62
+ # Corresponds to the JSON property `initialState`
63
+ # @return [String]
64
+ attr_accessor :initial_state
65
+
66
+ # Indicates whether the revealed icon image being returned is a default image,
67
+ # or is provided by the game.
68
+ # Corresponds to the JSON property `isRevealedIconUrlDefault`
69
+ # @return [Boolean]
70
+ attr_accessor :is_revealed_icon_url_default
71
+ alias_method :is_revealed_icon_url_default?, :is_revealed_icon_url_default
72
+
73
+ # Indicates whether the unlocked icon image being returned is a default image,
74
+ # or is game-provided.
75
+ # Corresponds to the JSON property `isUnlockedIconUrlDefault`
76
+ # @return [Boolean]
77
+ attr_accessor :is_unlocked_icon_url_default
78
+ alias_method :is_unlocked_icon_url_default?, :is_unlocked_icon_url_default
79
+
80
+ # Uniquely identifies the type of this resource. Value is always the fixed
81
+ # string games#achievementDefinition.
82
+ # Corresponds to the JSON property `kind`
83
+ # @return [String]
84
+ attr_accessor :kind
85
+
86
+ # The name of the achievement.
87
+ # Corresponds to the JSON property `name`
88
+ # @return [String]
89
+ attr_accessor :name
90
+
91
+ # The image URL for the revealed achievement icon.
92
+ # Corresponds to the JSON property `revealedIconUrl`
93
+ # @return [String]
94
+ attr_accessor :revealed_icon_url
95
+
96
+ # The total steps for an incremental achievement.
97
+ # Corresponds to the JSON property `totalSteps`
98
+ # @return [Fixnum]
99
+ attr_accessor :total_steps
100
+
101
+ # The image URL for the unlocked achievement icon.
102
+ # Corresponds to the JSON property `unlockedIconUrl`
103
+ # @return [String]
104
+ attr_accessor :unlocked_icon_url
105
+
106
+ def initialize(**args)
107
+ update!(**args)
108
+ end
109
+
110
+ # Update properties of this object
111
+ def update!(**args)
112
+ @achievement_type = args[:achievement_type] if args.key?(:achievement_type)
113
+ @description = args[:description] if args.key?(:description)
114
+ @experience_points = args[:experience_points] if args.key?(:experience_points)
115
+ @formatted_total_steps = args[:formatted_total_steps] if args.key?(:formatted_total_steps)
116
+ @id = args[:id] if args.key?(:id)
117
+ @initial_state = args[:initial_state] if args.key?(:initial_state)
118
+ @is_revealed_icon_url_default = args[:is_revealed_icon_url_default] if args.key?(:is_revealed_icon_url_default)
119
+ @is_unlocked_icon_url_default = args[:is_unlocked_icon_url_default] if args.key?(:is_unlocked_icon_url_default)
120
+ @kind = args[:kind] if args.key?(:kind)
121
+ @name = args[:name] if args.key?(:name)
122
+ @revealed_icon_url = args[:revealed_icon_url] if args.key?(:revealed_icon_url)
123
+ @total_steps = args[:total_steps] if args.key?(:total_steps)
124
+ @unlocked_icon_url = args[:unlocked_icon_url] if args.key?(:unlocked_icon_url)
125
+ end
126
+ end
127
+
128
+ # This is a JSON template for a list of achievement definition objects.
129
+ class ListAchievementDefinitionsResponse
130
+ include Google::Apis::Core::Hashable
131
+
132
+ # The achievement definitions.
133
+ # Corresponds to the JSON property `items`
134
+ # @return [Array<Google::Apis::GamesV1::AchievementDefinition>]
135
+ attr_accessor :items
136
+
137
+ # Uniquely identifies the type of this resource. Value is always the fixed
138
+ # string games#achievementDefinitionsListResponse.
139
+ # Corresponds to the JSON property `kind`
140
+ # @return [String]
141
+ attr_accessor :kind
142
+
143
+ # Token corresponding to the next page of results.
144
+ # Corresponds to the JSON property `nextPageToken`
145
+ # @return [String]
146
+ attr_accessor :next_page_token
147
+
148
+ def initialize(**args)
149
+ update!(**args)
150
+ end
151
+
152
+ # Update properties of this object
153
+ def update!(**args)
154
+ @items = args[:items] if args.key?(:items)
155
+ @kind = args[:kind] if args.key?(:kind)
156
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
157
+ end
158
+ end
159
+
160
+ # This is a JSON template for an achievement increment response
161
+ class AchievementIncrementResponse
162
+ include Google::Apis::Core::Hashable
163
+
164
+ # The current steps recorded for this incremental achievement.
165
+ # Corresponds to the JSON property `currentSteps`
166
+ # @return [Fixnum]
167
+ attr_accessor :current_steps
168
+
169
+ # Uniquely identifies the type of this resource. Value is always the fixed
170
+ # string games#achievementIncrementResponse.
171
+ # Corresponds to the JSON property `kind`
172
+ # @return [String]
173
+ attr_accessor :kind
174
+
175
+ # Whether the the current steps for the achievement has reached the number of
176
+ # steps required to unlock.
177
+ # Corresponds to the JSON property `newlyUnlocked`
178
+ # @return [Boolean]
179
+ attr_accessor :newly_unlocked
180
+ alias_method :newly_unlocked?, :newly_unlocked
181
+
182
+ def initialize(**args)
183
+ update!(**args)
184
+ end
185
+
186
+ # Update properties of this object
187
+ def update!(**args)
188
+ @current_steps = args[:current_steps] if args.key?(:current_steps)
189
+ @kind = args[:kind] if args.key?(:kind)
190
+ @newly_unlocked = args[:newly_unlocked] if args.key?(:newly_unlocked)
191
+ end
192
+ end
193
+
194
+ # This is a JSON template for an achievement reveal response
195
+ class AchievementRevealResponse
196
+ include Google::Apis::Core::Hashable
197
+
198
+ # The current state of the achievement for which a reveal was attempted. This
199
+ # might be UNLOCKED if the achievement was already unlocked.
200
+ # Possible values are:
201
+ # - "REVEALED" - Achievement is revealed.
202
+ # - "UNLOCKED" - Achievement is unlocked.
203
+ # Corresponds to the JSON property `currentState`
204
+ # @return [String]
205
+ attr_accessor :current_state
206
+
207
+ # Uniquely identifies the type of this resource. Value is always the fixed
208
+ # string games#achievementRevealResponse.
209
+ # Corresponds to the JSON property `kind`
210
+ # @return [String]
211
+ attr_accessor :kind
212
+
213
+ def initialize(**args)
214
+ update!(**args)
215
+ end
216
+
217
+ # Update properties of this object
218
+ def update!(**args)
219
+ @current_state = args[:current_state] if args.key?(:current_state)
220
+ @kind = args[:kind] if args.key?(:kind)
221
+ end
222
+ end
223
+
224
+ # This is a JSON template for an achievement set steps at least response.
225
+ class AchievementSetStepsAtLeastResponse
226
+ include Google::Apis::Core::Hashable
227
+
228
+ # The current steps recorded for this incremental achievement.
229
+ # Corresponds to the JSON property `currentSteps`
230
+ # @return [Fixnum]
231
+ attr_accessor :current_steps
232
+
233
+ # Uniquely identifies the type of this resource. Value is always the fixed
234
+ # string games#achievementSetStepsAtLeastResponse.
235
+ # Corresponds to the JSON property `kind`
236
+ # @return [String]
237
+ attr_accessor :kind
238
+
239
+ # Whether the the current steps for the achievement has reached the number of
240
+ # steps required to unlock.
241
+ # Corresponds to the JSON property `newlyUnlocked`
242
+ # @return [Boolean]
243
+ attr_accessor :newly_unlocked
244
+ alias_method :newly_unlocked?, :newly_unlocked
245
+
246
+ def initialize(**args)
247
+ update!(**args)
248
+ end
249
+
250
+ # Update properties of this object
251
+ def update!(**args)
252
+ @current_steps = args[:current_steps] if args.key?(:current_steps)
253
+ @kind = args[:kind] if args.key?(:kind)
254
+ @newly_unlocked = args[:newly_unlocked] if args.key?(:newly_unlocked)
255
+ end
256
+ end
257
+
258
+ # This is a JSON template for an achievement unlock response
259
+ class AchievementUnlockResponse
260
+ include Google::Apis::Core::Hashable
261
+
262
+ # Uniquely identifies the type of this resource. Value is always the fixed
263
+ # string games#achievementUnlockResponse.
264
+ # Corresponds to the JSON property `kind`
265
+ # @return [String]
266
+ attr_accessor :kind
267
+
268
+ # Whether this achievement was newly unlocked (that is, whether the unlock
269
+ # request for the achievement was the first for the player).
270
+ # Corresponds to the JSON property `newlyUnlocked`
271
+ # @return [Boolean]
272
+ attr_accessor :newly_unlocked
273
+ alias_method :newly_unlocked?, :newly_unlocked
274
+
275
+ def initialize(**args)
276
+ update!(**args)
277
+ end
278
+
279
+ # Update properties of this object
280
+ def update!(**args)
281
+ @kind = args[:kind] if args.key?(:kind)
282
+ @newly_unlocked = args[:newly_unlocked] if args.key?(:newly_unlocked)
283
+ end
284
+ end
285
+
286
+ # This is a JSON template for a list of achievement update requests.
287
+ class AchievementUpdateMultipleRequest
288
+ include Google::Apis::Core::Hashable
289
+
290
+ # Uniquely identifies the type of this resource. Value is always the fixed
291
+ # string games#achievementUpdateMultipleRequest.
292
+ # Corresponds to the JSON property `kind`
293
+ # @return [String]
294
+ attr_accessor :kind
295
+
296
+ # The individual achievement update requests.
297
+ # Corresponds to the JSON property `updates`
298
+ # @return [Array<Google::Apis::GamesV1::UpdateAchievementRequest>]
299
+ attr_accessor :updates
300
+
301
+ def initialize(**args)
302
+ update!(**args)
303
+ end
304
+
305
+ # Update properties of this object
306
+ def update!(**args)
307
+ @kind = args[:kind] if args.key?(:kind)
308
+ @updates = args[:updates] if args.key?(:updates)
309
+ end
310
+ end
311
+
312
+ # This is a JSON template for an achievement unlock response.
313
+ class AchievementUpdateMultipleResponse
314
+ include Google::Apis::Core::Hashable
315
+
316
+ # Uniquely identifies the type of this resource. Value is always the fixed
317
+ # string games#achievementUpdateListResponse.
318
+ # Corresponds to the JSON property `kind`
319
+ # @return [String]
320
+ attr_accessor :kind
321
+
322
+ # The updated state of the achievements.
323
+ # Corresponds to the JSON property `updatedAchievements`
324
+ # @return [Array<Google::Apis::GamesV1::UpdateAchievementResponse>]
325
+ attr_accessor :updated_achievements
326
+
327
+ def initialize(**args)
328
+ update!(**args)
329
+ end
330
+
331
+ # Update properties of this object
332
+ def update!(**args)
333
+ @kind = args[:kind] if args.key?(:kind)
334
+ @updated_achievements = args[:updated_achievements] if args.key?(:updated_achievements)
335
+ end
336
+ end
337
+
338
+ # This is a JSON template for a request to update an achievement.
339
+ class UpdateAchievementRequest
340
+ include Google::Apis::Core::Hashable
341
+
342
+ # The achievement this update is being applied to.
343
+ # Corresponds to the JSON property `achievementId`
344
+ # @return [String]
345
+ attr_accessor :achievement_id
346
+
347
+ # This is a JSON template for the payload to request to increment an achievement.
348
+ # Corresponds to the JSON property `incrementPayload`
349
+ # @return [Google::Apis::GamesV1::GamesAchievementIncrement]
350
+ attr_accessor :increment_payload
351
+
352
+ # Uniquely identifies the type of this resource. Value is always the fixed
353
+ # string games#achievementUpdateRequest.
354
+ # Corresponds to the JSON property `kind`
355
+ # @return [String]
356
+ attr_accessor :kind
357
+
358
+ # This is a JSON template for the payload to request to increment an achievement.
359
+ # Corresponds to the JSON property `setStepsAtLeastPayload`
360
+ # @return [Google::Apis::GamesV1::GamesAchievementSetStepsAtLeast]
361
+ attr_accessor :set_steps_at_least_payload
362
+
363
+ # The type of update being applied.
364
+ # Possible values are:
365
+ # - "REVEAL" - Achievement is revealed.
366
+ # - "UNLOCK" - Achievement is unlocked.
367
+ # - "INCREMENT" - Achievement is incremented.
368
+ # - "SET_STEPS_AT_LEAST" - Achievement progress is set to at least the passed
369
+ # value.
370
+ # Corresponds to the JSON property `updateType`
371
+ # @return [String]
372
+ attr_accessor :update_type
373
+
374
+ def initialize(**args)
375
+ update!(**args)
376
+ end
377
+
378
+ # Update properties of this object
379
+ def update!(**args)
380
+ @achievement_id = args[:achievement_id] if args.key?(:achievement_id)
381
+ @increment_payload = args[:increment_payload] if args.key?(:increment_payload)
382
+ @kind = args[:kind] if args.key?(:kind)
383
+ @set_steps_at_least_payload = args[:set_steps_at_least_payload] if args.key?(:set_steps_at_least_payload)
384
+ @update_type = args[:update_type] if args.key?(:update_type)
385
+ end
386
+ end
387
+
388
+ # This is a JSON template for an achievement update response.
389
+ class UpdateAchievementResponse
390
+ include Google::Apis::Core::Hashable
391
+
392
+ # The achievement this update is was applied to.
393
+ # Corresponds to the JSON property `achievementId`
394
+ # @return [String]
395
+ attr_accessor :achievement_id
396
+
397
+ # The current state of the achievement.
398
+ # Possible values are:
399
+ # - "HIDDEN" - Achievement is hidden.
400
+ # - "REVEALED" - Achievement is revealed.
401
+ # - "UNLOCKED" - Achievement is unlocked.
402
+ # Corresponds to the JSON property `currentState`
403
+ # @return [String]
404
+ attr_accessor :current_state
405
+
406
+ # The current steps recorded for this achievement if it is incremental.
407
+ # Corresponds to the JSON property `currentSteps`
408
+ # @return [Fixnum]
409
+ attr_accessor :current_steps
410
+
411
+ # Uniquely identifies the type of this resource. Value is always the fixed
412
+ # string games#achievementUpdateResponse.
413
+ # Corresponds to the JSON property `kind`
414
+ # @return [String]
415
+ attr_accessor :kind
416
+
417
+ # Whether this achievement was newly unlocked (that is, whether the unlock
418
+ # request for the achievement was the first for the player).
419
+ # Corresponds to the JSON property `newlyUnlocked`
420
+ # @return [Boolean]
421
+ attr_accessor :newly_unlocked
422
+ alias_method :newly_unlocked?, :newly_unlocked
423
+
424
+ # Whether the requested updates actually affected the achievement.
425
+ # Corresponds to the JSON property `updateOccurred`
426
+ # @return [Boolean]
427
+ attr_accessor :update_occurred
428
+ alias_method :update_occurred?, :update_occurred
429
+
430
+ def initialize(**args)
431
+ update!(**args)
432
+ end
433
+
434
+ # Update properties of this object
435
+ def update!(**args)
436
+ @achievement_id = args[:achievement_id] if args.key?(:achievement_id)
437
+ @current_state = args[:current_state] if args.key?(:current_state)
438
+ @current_steps = args[:current_steps] if args.key?(:current_steps)
439
+ @kind = args[:kind] if args.key?(:kind)
440
+ @newly_unlocked = args[:newly_unlocked] if args.key?(:newly_unlocked)
441
+ @update_occurred = args[:update_occurred] if args.key?(:update_occurred)
442
+ end
443
+ end
444
+
445
+ # This is a JSON template for aggregate stats.
446
+ class AggregateStats
447
+ include Google::Apis::Core::Hashable
448
+
449
+ # The number of messages sent between a pair of peers.
450
+ # Corresponds to the JSON property `count`
451
+ # @return [String]
452
+ attr_accessor :count
453
+
454
+ # Uniquely identifies the type of this resource. Value is always the fixed
455
+ # string games#aggregateStats.
456
+ # Corresponds to the JSON property `kind`
457
+ # @return [String]
458
+ attr_accessor :kind
459
+
460
+ # The maximum amount.
461
+ # Corresponds to the JSON property `max`
462
+ # @return [String]
463
+ attr_accessor :max
464
+
465
+ # The minimum amount.
466
+ # Corresponds to the JSON property `min`
467
+ # @return [String]
468
+ attr_accessor :min
469
+
470
+ # The total number of bytes sent for messages between a pair of peers.
471
+ # Corresponds to the JSON property `sum`
472
+ # @return [String]
473
+ attr_accessor :sum
474
+
475
+ def initialize(**args)
476
+ update!(**args)
477
+ end
478
+
479
+ # Update properties of this object
480
+ def update!(**args)
481
+ @count = args[:count] if args.key?(:count)
482
+ @kind = args[:kind] if args.key?(:kind)
483
+ @max = args[:max] if args.key?(:max)
484
+ @min = args[:min] if args.key?(:min)
485
+ @sum = args[:sum] if args.key?(:sum)
486
+ end
487
+ end
488
+
489
+ # This is a JSON template for an anonymous player
490
+ class AnonymousPlayer
491
+ include Google::Apis::Core::Hashable
492
+
493
+ # The base URL for the image to display for the anonymous player.
494
+ # Corresponds to the JSON property `avatarImageUrl`
495
+ # @return [String]
496
+ attr_accessor :avatar_image_url
497
+
498
+ # The name to display for the anonymous player.
499
+ # Corresponds to the JSON property `displayName`
500
+ # @return [String]
501
+ attr_accessor :display_name
502
+
503
+ # Uniquely identifies the type of this resource. Value is always the fixed
504
+ # string games#anonymousPlayer.
505
+ # Corresponds to the JSON property `kind`
506
+ # @return [String]
507
+ attr_accessor :kind
508
+
509
+ def initialize(**args)
510
+ update!(**args)
511
+ end
512
+
513
+ # Update properties of this object
514
+ def update!(**args)
515
+ @avatar_image_url = args[:avatar_image_url] if args.key?(:avatar_image_url)
516
+ @display_name = args[:display_name] if args.key?(:display_name)
517
+ @kind = args[:kind] if args.key?(:kind)
518
+ end
519
+ end
520
+
521
+ # This is a JSON template for the Application resource.
522
+ class Application
523
+ include Google::Apis::Core::Hashable
524
+
525
+ # The number of achievements visible to the currently authenticated player.
526
+ # Corresponds to the JSON property `achievement_count`
527
+ # @return [Fixnum]
528
+ attr_accessor :achievement_count
529
+
530
+ # The assets of the application.
531
+ # Corresponds to the JSON property `assets`
532
+ # @return [Array<Google::Apis::GamesV1::ImageAsset>]
533
+ attr_accessor :assets
534
+
535
+ # The author of the application.
536
+ # Corresponds to the JSON property `author`
537
+ # @return [String]
538
+ attr_accessor :author
539
+
540
+ # This is a JSON template for an application category object.
541
+ # Corresponds to the JSON property `category`
542
+ # @return [Google::Apis::GamesV1::ApplicationCategory]
543
+ attr_accessor :category
544
+
545
+ # The description of the application.
546
+ # Corresponds to the JSON property `description`
547
+ # @return [String]
548
+ attr_accessor :description
549
+
550
+ # A list of features that have been enabled for the application.
551
+ # Possible values are:
552
+ # - "SNAPSHOTS" - Snapshots has been enabled
553
+ # Corresponds to the JSON property `enabledFeatures`
554
+ # @return [Array<String>]
555
+ attr_accessor :enabled_features
556
+
557
+ # The ID of the application.
558
+ # Corresponds to the JSON property `id`
559
+ # @return [String]
560
+ attr_accessor :id
561
+
562
+ # The instances of the application.
563
+ # Corresponds to the JSON property `instances`
564
+ # @return [Array<Google::Apis::GamesV1::Instance>]
565
+ attr_accessor :instances
566
+
567
+ # Uniquely identifies the type of this resource. Value is always the fixed
568
+ # string games#application.
569
+ # Corresponds to the JSON property `kind`
570
+ # @return [String]
571
+ attr_accessor :kind
572
+
573
+ # The last updated timestamp of the application.
574
+ # Corresponds to the JSON property `lastUpdatedTimestamp`
575
+ # @return [String]
576
+ attr_accessor :last_updated_timestamp
577
+
578
+ # The number of leaderboards visible to the currently authenticated player.
579
+ # Corresponds to the JSON property `leaderboard_count`
580
+ # @return [Fixnum]
581
+ attr_accessor :leaderboard_count
582
+
583
+ # The name of the application.
584
+ # Corresponds to the JSON property `name`
585
+ # @return [String]
586
+ attr_accessor :name
587
+
588
+ # A hint to the client UI for what color to use as an app-themed color. The
589
+ # color is given as an RGB triplet (e.g. "E0E0E0").
590
+ # Corresponds to the JSON property `themeColor`
591
+ # @return [String]
592
+ attr_accessor :theme_color
593
+
594
+ def initialize(**args)
595
+ update!(**args)
596
+ end
597
+
598
+ # Update properties of this object
599
+ def update!(**args)
600
+ @achievement_count = args[:achievement_count] if args.key?(:achievement_count)
601
+ @assets = args[:assets] if args.key?(:assets)
602
+ @author = args[:author] if args.key?(:author)
603
+ @category = args[:category] if args.key?(:category)
604
+ @description = args[:description] if args.key?(:description)
605
+ @enabled_features = args[:enabled_features] if args.key?(:enabled_features)
606
+ @id = args[:id] if args.key?(:id)
607
+ @instances = args[:instances] if args.key?(:instances)
608
+ @kind = args[:kind] if args.key?(:kind)
609
+ @last_updated_timestamp = args[:last_updated_timestamp] if args.key?(:last_updated_timestamp)
610
+ @leaderboard_count = args[:leaderboard_count] if args.key?(:leaderboard_count)
611
+ @name = args[:name] if args.key?(:name)
612
+ @theme_color = args[:theme_color] if args.key?(:theme_color)
613
+ end
614
+ end
615
+
616
+ # This is a JSON template for an application category object.
617
+ class ApplicationCategory
618
+ include Google::Apis::Core::Hashable
619
+
620
+ # Uniquely identifies the type of this resource. Value is always the fixed
621
+ # string games#applicationCategory.
622
+ # Corresponds to the JSON property `kind`
623
+ # @return [String]
624
+ attr_accessor :kind
625
+
626
+ # The primary category.
627
+ # Corresponds to the JSON property `primary`
628
+ # @return [String]
629
+ attr_accessor :primary
630
+
631
+ # The secondary category.
632
+ # Corresponds to the JSON property `secondary`
633
+ # @return [String]
634
+ attr_accessor :secondary
635
+
636
+ def initialize(**args)
637
+ update!(**args)
638
+ end
639
+
640
+ # Update properties of this object
641
+ def update!(**args)
642
+ @kind = args[:kind] if args.key?(:kind)
643
+ @primary = args[:primary] if args.key?(:primary)
644
+ @secondary = args[:secondary] if args.key?(:secondary)
645
+ end
646
+ end
647
+
648
+ # This is a JSON template for a third party application verification response
649
+ # resource.
650
+ class ApplicationVerifyResponse
651
+ include Google::Apis::Core::Hashable
652
+
653
+ # Uniquely identifies the type of this resource. Value is always the fixed
654
+ # string games#applicationVerifyResponse.
655
+ # Corresponds to the JSON property `kind`
656
+ # @return [String]
657
+ attr_accessor :kind
658
+
659
+ # The ID of the player that was issued the auth token used in this request.
660
+ # Corresponds to the JSON property `player_id`
661
+ # @return [String]
662
+ attr_accessor :player_id
663
+
664
+ def initialize(**args)
665
+ update!(**args)
666
+ end
667
+
668
+ # Update properties of this object
669
+ def update!(**args)
670
+ @kind = args[:kind] if args.key?(:kind)
671
+ @player_id = args[:player_id] if args.key?(:player_id)
672
+ end
673
+ end
674
+
675
+ # This is a JSON template for data related to individual game categories.
676
+ class Category
677
+ include Google::Apis::Core::Hashable
678
+
679
+ # The category name.
680
+ # Corresponds to the JSON property `category`
681
+ # @return [String]
682
+ attr_accessor :category
683
+
684
+ # Experience points earned in this category.
685
+ # Corresponds to the JSON property `experiencePoints`
686
+ # @return [String]
687
+ attr_accessor :experience_points
688
+
689
+ # Uniquely identifies the type of this resource. Value is always the fixed
690
+ # string games#category.
691
+ # Corresponds to the JSON property `kind`
692
+ # @return [String]
693
+ attr_accessor :kind
694
+
695
+ def initialize(**args)
696
+ update!(**args)
697
+ end
698
+
699
+ # Update properties of this object
700
+ def update!(**args)
701
+ @category = args[:category] if args.key?(:category)
702
+ @experience_points = args[:experience_points] if args.key?(:experience_points)
703
+ @kind = args[:kind] if args.key?(:kind)
704
+ end
705
+ end
706
+
707
+ # This is a JSON template for a list of category data objects.
708
+ class ListCategoryResponse
709
+ include Google::Apis::Core::Hashable
710
+
711
+ # The list of categories with usage data.
712
+ # Corresponds to the JSON property `items`
713
+ # @return [Array<Google::Apis::GamesV1::Category>]
714
+ attr_accessor :items
715
+
716
+ # Uniquely identifies the type of this resource. Value is always the fixed
717
+ # string games#categoryListResponse.
718
+ # Corresponds to the JSON property `kind`
719
+ # @return [String]
720
+ attr_accessor :kind
721
+
722
+ # Token corresponding to the next page of results.
723
+ # Corresponds to the JSON property `nextPageToken`
724
+ # @return [String]
725
+ attr_accessor :next_page_token
726
+
727
+ def initialize(**args)
728
+ update!(**args)
729
+ end
730
+
731
+ # Update properties of this object
732
+ def update!(**args)
733
+ @items = args[:items] if args.key?(:items)
734
+ @kind = args[:kind] if args.key?(:kind)
735
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
736
+ end
737
+ end
738
+
739
+ # This is a JSON template for a batch update failure resource.
740
+ class EventBatchRecordFailure
741
+ include Google::Apis::Core::Hashable
742
+
743
+ # The cause for the update failure.
744
+ # Possible values are:
745
+ # - "TOO_LARGE": A batch request was issued with more events than are allowed in
746
+ # a single batch.
747
+ # - "TIME_PERIOD_EXPIRED": A batch was sent with data too far in the past to
748
+ # record.
749
+ # - "TIME_PERIOD_SHORT": A batch was sent with a time range that was too short.
750
+ # - "TIME_PERIOD_LONG": A batch was sent with a time range that was too long.
751
+ # - "ALREADY_UPDATED": An attempt was made to record a batch of data which was
752
+ # already seen.
753
+ # - "RECORD_RATE_HIGH": An attempt was made to record data faster than the
754
+ # server will apply updates.
755
+ # Corresponds to the JSON property `failureCause`
756
+ # @return [String]
757
+ attr_accessor :failure_cause
758
+
759
+ # Uniquely identifies the type of this resource. Value is always the fixed
760
+ # string games#eventBatchRecordFailure.
761
+ # Corresponds to the JSON property `kind`
762
+ # @return [String]
763
+ attr_accessor :kind
764
+
765
+ # This is a JSON template for an event period time range.
766
+ # Corresponds to the JSON property `range`
767
+ # @return [Google::Apis::GamesV1::EventPeriodRange]
768
+ attr_accessor :range
769
+
770
+ def initialize(**args)
771
+ update!(**args)
772
+ end
773
+
774
+ # Update properties of this object
775
+ def update!(**args)
776
+ @failure_cause = args[:failure_cause] if args.key?(:failure_cause)
777
+ @kind = args[:kind] if args.key?(:kind)
778
+ @range = args[:range] if args.key?(:range)
779
+ end
780
+ end
781
+
782
+ # This is a JSON template for an event child relationship resource.
783
+ class EventChild
784
+ include Google::Apis::Core::Hashable
785
+
786
+ # The ID of the child event.
787
+ # Corresponds to the JSON property `childId`
788
+ # @return [String]
789
+ attr_accessor :child_id
790
+
791
+ # Uniquely identifies the type of this resource. Value is always the fixed
792
+ # string games#eventChild.
793
+ # Corresponds to the JSON property `kind`
794
+ # @return [String]
795
+ attr_accessor :kind
796
+
797
+ def initialize(**args)
798
+ update!(**args)
799
+ end
800
+
801
+ # Update properties of this object
802
+ def update!(**args)
803
+ @child_id = args[:child_id] if args.key?(:child_id)
804
+ @kind = args[:kind] if args.key?(:kind)
805
+ end
806
+ end
807
+
808
+ # This is a JSON template for an event definition resource.
809
+ class EventDefinition
810
+ include Google::Apis::Core::Hashable
811
+
812
+ # A list of events that are a child of this event.
813
+ # Corresponds to the JSON property `childEvents`
814
+ # @return [Array<Google::Apis::GamesV1::EventChild>]
815
+ attr_accessor :child_events
816
+
817
+ # Description of what this event represents.
818
+ # Corresponds to the JSON property `description`
819
+ # @return [String]
820
+ attr_accessor :description
821
+
822
+ # The name to display for the event.
823
+ # Corresponds to the JSON property `displayName`
824
+ # @return [String]
825
+ attr_accessor :display_name
826
+
827
+ # The ID of the event.
828
+ # Corresponds to the JSON property `id`
829
+ # @return [String]
830
+ attr_accessor :id
831
+
832
+ # The base URL for the image that represents the event.
833
+ # Corresponds to the JSON property `imageUrl`
834
+ # @return [String]
835
+ attr_accessor :image_url
836
+
837
+ # Indicates whether the icon image being returned is a default image, or is game-
838
+ # provided.
839
+ # Corresponds to the JSON property `isDefaultImageUrl`
840
+ # @return [Boolean]
841
+ attr_accessor :is_default_image_url
842
+ alias_method :is_default_image_url?, :is_default_image_url
843
+
844
+ # Uniquely identifies the type of this resource. Value is always the fixed
845
+ # string games#eventDefinition.
846
+ # Corresponds to the JSON property `kind`
847
+ # @return [String]
848
+ attr_accessor :kind
849
+
850
+ # The visibility of event being tracked in this definition.
851
+ # Possible values are:
852
+ # - "REVEALED": This event should be visible to all users.
853
+ # - "HIDDEN": This event should only be shown to users that have recorded this
854
+ # event at least once.
855
+ # Corresponds to the JSON property `visibility`
856
+ # @return [String]
857
+ attr_accessor :visibility
858
+
859
+ def initialize(**args)
860
+ update!(**args)
861
+ end
862
+
863
+ # Update properties of this object
864
+ def update!(**args)
865
+ @child_events = args[:child_events] if args.key?(:child_events)
866
+ @description = args[:description] if args.key?(:description)
867
+ @display_name = args[:display_name] if args.key?(:display_name)
868
+ @id = args[:id] if args.key?(:id)
869
+ @image_url = args[:image_url] if args.key?(:image_url)
870
+ @is_default_image_url = args[:is_default_image_url] if args.key?(:is_default_image_url)
871
+ @kind = args[:kind] if args.key?(:kind)
872
+ @visibility = args[:visibility] if args.key?(:visibility)
873
+ end
874
+ end
875
+
876
+ # This is a JSON template for a ListDefinitions response.
877
+ class ListEventDefinitionResponse
878
+ include Google::Apis::Core::Hashable
879
+
880
+ # The event definitions.
881
+ # Corresponds to the JSON property `items`
882
+ # @return [Array<Google::Apis::GamesV1::EventDefinition>]
883
+ attr_accessor :items
884
+
885
+ # Uniquely identifies the type of this resource. Value is always the fixed
886
+ # string games#eventDefinitionListResponse.
887
+ # Corresponds to the JSON property `kind`
888
+ # @return [String]
889
+ attr_accessor :kind
890
+
891
+ # The pagination token for the next page of results.
892
+ # Corresponds to the JSON property `nextPageToken`
893
+ # @return [String]
894
+ attr_accessor :next_page_token
895
+
896
+ def initialize(**args)
897
+ update!(**args)
898
+ end
899
+
900
+ # Update properties of this object
901
+ def update!(**args)
902
+ @items = args[:items] if args.key?(:items)
903
+ @kind = args[:kind] if args.key?(:kind)
904
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
905
+ end
906
+ end
907
+
908
+ # This is a JSON template for an event period time range.
909
+ class EventPeriodRange
910
+ include Google::Apis::Core::Hashable
911
+
912
+ # Uniquely identifies the type of this resource. Value is always the fixed
913
+ # string games#eventPeriodRange.
914
+ # Corresponds to the JSON property `kind`
915
+ # @return [String]
916
+ attr_accessor :kind
917
+
918
+ # The time when this update period ends, in millis, since 1970 UTC (Unix Epoch).
919
+ # Corresponds to the JSON property `periodEndMillis`
920
+ # @return [String]
921
+ attr_accessor :period_end_millis
922
+
923
+ # The time when this update period begins, in millis, since 1970 UTC (Unix Epoch)
924
+ # .
925
+ # Corresponds to the JSON property `periodStartMillis`
926
+ # @return [String]
927
+ attr_accessor :period_start_millis
928
+
929
+ def initialize(**args)
930
+ update!(**args)
931
+ end
932
+
933
+ # Update properties of this object
934
+ def update!(**args)
935
+ @kind = args[:kind] if args.key?(:kind)
936
+ @period_end_millis = args[:period_end_millis] if args.key?(:period_end_millis)
937
+ @period_start_millis = args[:period_start_millis] if args.key?(:period_start_millis)
938
+ end
939
+ end
940
+
941
+ # This is a JSON template for an event period update resource.
942
+ class EventPeriodUpdate
943
+ include Google::Apis::Core::Hashable
944
+
945
+ # Uniquely identifies the type of this resource. Value is always the fixed
946
+ # string games#eventPeriodUpdate.
947
+ # Corresponds to the JSON property `kind`
948
+ # @return [String]
949
+ attr_accessor :kind
950
+
951
+ # This is a JSON template for an event period time range.
952
+ # Corresponds to the JSON property `timePeriod`
953
+ # @return [Google::Apis::GamesV1::EventPeriodRange]
954
+ attr_accessor :time_period
955
+
956
+ # The updates being made for this time period.
957
+ # Corresponds to the JSON property `updates`
958
+ # @return [Array<Google::Apis::GamesV1::UpdateEventRequest>]
959
+ attr_accessor :updates
960
+
961
+ def initialize(**args)
962
+ update!(**args)
963
+ end
964
+
965
+ # Update properties of this object
966
+ def update!(**args)
967
+ @kind = args[:kind] if args.key?(:kind)
968
+ @time_period = args[:time_period] if args.key?(:time_period)
969
+ @updates = args[:updates] if args.key?(:updates)
970
+ end
971
+ end
972
+
973
+ # This is a JSON template for an event update failure resource.
974
+ class EventRecordFailure
975
+ include Google::Apis::Core::Hashable
976
+
977
+ # The ID of the event that was not updated.
978
+ # Corresponds to the JSON property `eventId`
979
+ # @return [String]
980
+ attr_accessor :event_id
981
+
982
+ # The cause for the update failure.
983
+ # Possible values are:
984
+ # - "NOT_FOUND" - An attempt was made to set an event that was not defined.
985
+ # - "INVALID_UPDATE_VALUE" - An attempt was made to increment an event by a non-
986
+ # positive value.
987
+ # Corresponds to the JSON property `failureCause`
988
+ # @return [String]
989
+ attr_accessor :failure_cause
990
+
991
+ # Uniquely identifies the type of this resource. Value is always the fixed
992
+ # string games#eventRecordFailure.
993
+ # Corresponds to the JSON property `kind`
994
+ # @return [String]
995
+ attr_accessor :kind
996
+
997
+ def initialize(**args)
998
+ update!(**args)
999
+ end
1000
+
1001
+ # Update properties of this object
1002
+ def update!(**args)
1003
+ @event_id = args[:event_id] if args.key?(:event_id)
1004
+ @failure_cause = args[:failure_cause] if args.key?(:failure_cause)
1005
+ @kind = args[:kind] if args.key?(:kind)
1006
+ end
1007
+ end
1008
+
1009
+ # This is a JSON template for an event period update resource.
1010
+ class EventRecordRequest
1011
+ include Google::Apis::Core::Hashable
1012
+
1013
+ # The current time when this update was sent, in milliseconds, since 1970 UTC (
1014
+ # Unix Epoch).
1015
+ # Corresponds to the JSON property `currentTimeMillis`
1016
+ # @return [String]
1017
+ attr_accessor :current_time_millis
1018
+
1019
+ # Uniquely identifies the type of this resource. Value is always the fixed
1020
+ # string games#eventRecordRequest.
1021
+ # Corresponds to the JSON property `kind`
1022
+ # @return [String]
1023
+ attr_accessor :kind
1024
+
1025
+ # The request ID used to identify this attempt to record events.
1026
+ # Corresponds to the JSON property `requestId`
1027
+ # @return [String]
1028
+ attr_accessor :request_id
1029
+
1030
+ # A list of the time period updates being made in this request.
1031
+ # Corresponds to the JSON property `timePeriods`
1032
+ # @return [Array<Google::Apis::GamesV1::EventPeriodUpdate>]
1033
+ attr_accessor :time_periods
1034
+
1035
+ def initialize(**args)
1036
+ update!(**args)
1037
+ end
1038
+
1039
+ # Update properties of this object
1040
+ def update!(**args)
1041
+ @current_time_millis = args[:current_time_millis] if args.key?(:current_time_millis)
1042
+ @kind = args[:kind] if args.key?(:kind)
1043
+ @request_id = args[:request_id] if args.key?(:request_id)
1044
+ @time_periods = args[:time_periods] if args.key?(:time_periods)
1045
+ end
1046
+ end
1047
+
1048
+ # This is a JSON template for an event period update resource.
1049
+ class UpdateEventRequest
1050
+ include Google::Apis::Core::Hashable
1051
+
1052
+ # The ID of the event being modified in this update.
1053
+ # Corresponds to the JSON property `definitionId`
1054
+ # @return [String]
1055
+ attr_accessor :definition_id
1056
+
1057
+ # Uniquely identifies the type of this resource. Value is always the fixed
1058
+ # string games#eventUpdateRequest.
1059
+ # Corresponds to the JSON property `kind`
1060
+ # @return [String]
1061
+ attr_accessor :kind
1062
+
1063
+ # The number of times this event occurred in this time period.
1064
+ # Corresponds to the JSON property `updateCount`
1065
+ # @return [String]
1066
+ attr_accessor :update_count
1067
+
1068
+ def initialize(**args)
1069
+ update!(**args)
1070
+ end
1071
+
1072
+ # Update properties of this object
1073
+ def update!(**args)
1074
+ @definition_id = args[:definition_id] if args.key?(:definition_id)
1075
+ @kind = args[:kind] if args.key?(:kind)
1076
+ @update_count = args[:update_count] if args.key?(:update_count)
1077
+ end
1078
+ end
1079
+
1080
+ # This is a JSON template for an event period update resource.
1081
+ class UpdateEventResponse
1082
+ include Google::Apis::Core::Hashable
1083
+
1084
+ # Any batch-wide failures which occurred applying updates.
1085
+ # Corresponds to the JSON property `batchFailures`
1086
+ # @return [Array<Google::Apis::GamesV1::EventBatchRecordFailure>]
1087
+ attr_accessor :batch_failures
1088
+
1089
+ # Any failures updating a particular event.
1090
+ # Corresponds to the JSON property `eventFailures`
1091
+ # @return [Array<Google::Apis::GamesV1::EventRecordFailure>]
1092
+ attr_accessor :event_failures
1093
+
1094
+ # Uniquely identifies the type of this resource. Value is always the fixed
1095
+ # string games#eventUpdateResponse.
1096
+ # Corresponds to the JSON property `kind`
1097
+ # @return [String]
1098
+ attr_accessor :kind
1099
+
1100
+ # The current status of any updated events
1101
+ # Corresponds to the JSON property `playerEvents`
1102
+ # @return [Array<Google::Apis::GamesV1::PlayerEvent>]
1103
+ attr_accessor :player_events
1104
+
1105
+ def initialize(**args)
1106
+ update!(**args)
1107
+ end
1108
+
1109
+ # Update properties of this object
1110
+ def update!(**args)
1111
+ @batch_failures = args[:batch_failures] if args.key?(:batch_failures)
1112
+ @event_failures = args[:event_failures] if args.key?(:event_failures)
1113
+ @kind = args[:kind] if args.key?(:kind)
1114
+ @player_events = args[:player_events] if args.key?(:player_events)
1115
+ end
1116
+ end
1117
+
1118
+ # This is a JSON template for the payload to request to increment an achievement.
1119
+ class GamesAchievementIncrement
1120
+ include Google::Apis::Core::Hashable
1121
+
1122
+ # Uniquely identifies the type of this resource. Value is always the fixed
1123
+ # string games#GamesAchievementIncrement.
1124
+ # Corresponds to the JSON property `kind`
1125
+ # @return [String]
1126
+ attr_accessor :kind
1127
+
1128
+ # The requestId associated with an increment to an achievement.
1129
+ # Corresponds to the JSON property `requestId`
1130
+ # @return [String]
1131
+ attr_accessor :request_id
1132
+
1133
+ # The number of steps to be incremented.
1134
+ # Corresponds to the JSON property `steps`
1135
+ # @return [Fixnum]
1136
+ attr_accessor :steps
1137
+
1138
+ def initialize(**args)
1139
+ update!(**args)
1140
+ end
1141
+
1142
+ # Update properties of this object
1143
+ def update!(**args)
1144
+ @kind = args[:kind] if args.key?(:kind)
1145
+ @request_id = args[:request_id] if args.key?(:request_id)
1146
+ @steps = args[:steps] if args.key?(:steps)
1147
+ end
1148
+ end
1149
+
1150
+ # This is a JSON template for the payload to request to increment an achievement.
1151
+ class GamesAchievementSetStepsAtLeast
1152
+ include Google::Apis::Core::Hashable
1153
+
1154
+ # Uniquely identifies the type of this resource. Value is always the fixed
1155
+ # string games#GamesAchievementSetStepsAtLeast.
1156
+ # Corresponds to the JSON property `kind`
1157
+ # @return [String]
1158
+ attr_accessor :kind
1159
+
1160
+ # The minimum number of steps for the achievement to be set to.
1161
+ # Corresponds to the JSON property `steps`
1162
+ # @return [Fixnum]
1163
+ attr_accessor :steps
1164
+
1165
+ def initialize(**args)
1166
+ update!(**args)
1167
+ end
1168
+
1169
+ # Update properties of this object
1170
+ def update!(**args)
1171
+ @kind = args[:kind] if args.key?(:kind)
1172
+ @steps = args[:steps] if args.key?(:steps)
1173
+ end
1174
+ end
1175
+
1176
+ # This is a JSON template for an image asset object.
1177
+ class ImageAsset
1178
+ include Google::Apis::Core::Hashable
1179
+
1180
+ # The height of the asset.
1181
+ # Corresponds to the JSON property `height`
1182
+ # @return [Fixnum]
1183
+ attr_accessor :height
1184
+
1185
+ # Uniquely identifies the type of this resource. Value is always the fixed
1186
+ # string games#imageAsset.
1187
+ # Corresponds to the JSON property `kind`
1188
+ # @return [String]
1189
+ attr_accessor :kind
1190
+
1191
+ # The name of the asset.
1192
+ # Corresponds to the JSON property `name`
1193
+ # @return [String]
1194
+ attr_accessor :name
1195
+
1196
+ # The URL of the asset.
1197
+ # Corresponds to the JSON property `url`
1198
+ # @return [String]
1199
+ attr_accessor :url
1200
+
1201
+ # The width of the asset.
1202
+ # Corresponds to the JSON property `width`
1203
+ # @return [Fixnum]
1204
+ attr_accessor :width
1205
+
1206
+ def initialize(**args)
1207
+ update!(**args)
1208
+ end
1209
+
1210
+ # Update properties of this object
1211
+ def update!(**args)
1212
+ @height = args[:height] if args.key?(:height)
1213
+ @kind = args[:kind] if args.key?(:kind)
1214
+ @name = args[:name] if args.key?(:name)
1215
+ @url = args[:url] if args.key?(:url)
1216
+ @width = args[:width] if args.key?(:width)
1217
+ end
1218
+ end
1219
+
1220
+ # This is a JSON template for the Instance resource.
1221
+ class Instance
1222
+ include Google::Apis::Core::Hashable
1223
+
1224
+ # URI which shows where a user can acquire this instance.
1225
+ # Corresponds to the JSON property `acquisitionUri`
1226
+ # @return [String]
1227
+ attr_accessor :acquisition_uri
1228
+
1229
+ # This is a JSON template for the Android instance details resource.
1230
+ # Corresponds to the JSON property `androidInstance`
1231
+ # @return [Google::Apis::GamesV1::InstanceAndroidDetails]
1232
+ attr_accessor :android_instance
1233
+
1234
+ # This is a JSON template for the iOS details resource.
1235
+ # Corresponds to the JSON property `iosInstance`
1236
+ # @return [Google::Apis::GamesV1::InstanceIosDetails]
1237
+ attr_accessor :ios_instance
1238
+
1239
+ # Uniquely identifies the type of this resource. Value is always the fixed
1240
+ # string games#instance.
1241
+ # Corresponds to the JSON property `kind`
1242
+ # @return [String]
1243
+ attr_accessor :kind
1244
+
1245
+ # Localized display name.
1246
+ # Corresponds to the JSON property `name`
1247
+ # @return [String]
1248
+ attr_accessor :name
1249
+
1250
+ # The platform type.
1251
+ # Possible values are:
1252
+ # - "ANDROID" - Instance is for Android.
1253
+ # - "IOS" - Instance is for iOS
1254
+ # - "WEB_APP" - Instance is for Web App.
1255
+ # Corresponds to the JSON property `platformType`
1256
+ # @return [String]
1257
+ attr_accessor :platform_type
1258
+
1259
+ # Flag to show if this game instance supports realtime play.
1260
+ # Corresponds to the JSON property `realtimePlay`
1261
+ # @return [Boolean]
1262
+ attr_accessor :realtime_play
1263
+ alias_method :realtime_play?, :realtime_play
1264
+
1265
+ # Flag to show if this game instance supports turn based play.
1266
+ # Corresponds to the JSON property `turnBasedPlay`
1267
+ # @return [Boolean]
1268
+ attr_accessor :turn_based_play
1269
+ alias_method :turn_based_play?, :turn_based_play
1270
+
1271
+ # This is a JSON template for the Web details resource.
1272
+ # Corresponds to the JSON property `webInstance`
1273
+ # @return [Google::Apis::GamesV1::InstanceWebDetails]
1274
+ attr_accessor :web_instance
1275
+
1276
+ def initialize(**args)
1277
+ update!(**args)
1278
+ end
1279
+
1280
+ # Update properties of this object
1281
+ def update!(**args)
1282
+ @acquisition_uri = args[:acquisition_uri] if args.key?(:acquisition_uri)
1283
+ @android_instance = args[:android_instance] if args.key?(:android_instance)
1284
+ @ios_instance = args[:ios_instance] if args.key?(:ios_instance)
1285
+ @kind = args[:kind] if args.key?(:kind)
1286
+ @name = args[:name] if args.key?(:name)
1287
+ @platform_type = args[:platform_type] if args.key?(:platform_type)
1288
+ @realtime_play = args[:realtime_play] if args.key?(:realtime_play)
1289
+ @turn_based_play = args[:turn_based_play] if args.key?(:turn_based_play)
1290
+ @web_instance = args[:web_instance] if args.key?(:web_instance)
1291
+ end
1292
+ end
1293
+
1294
+ # This is a JSON template for the Android instance details resource.
1295
+ class InstanceAndroidDetails
1296
+ include Google::Apis::Core::Hashable
1297
+
1298
+ # Flag indicating whether the anti-piracy check is enabled.
1299
+ # Corresponds to the JSON property `enablePiracyCheck`
1300
+ # @return [Boolean]
1301
+ attr_accessor :enable_piracy_check
1302
+ alias_method :enable_piracy_check?, :enable_piracy_check
1303
+
1304
+ # Uniquely identifies the type of this resource. Value is always the fixed
1305
+ # string games#instanceAndroidDetails.
1306
+ # Corresponds to the JSON property `kind`
1307
+ # @return [String]
1308
+ attr_accessor :kind
1309
+
1310
+ # Android package name which maps to Google Play URL.
1311
+ # Corresponds to the JSON property `packageName`
1312
+ # @return [String]
1313
+ attr_accessor :package_name
1314
+
1315
+ # Indicates that this instance is the default for new installations.
1316
+ # Corresponds to the JSON property `preferred`
1317
+ # @return [Boolean]
1318
+ attr_accessor :preferred
1319
+ alias_method :preferred?, :preferred
1320
+
1321
+ def initialize(**args)
1322
+ update!(**args)
1323
+ end
1324
+
1325
+ # Update properties of this object
1326
+ def update!(**args)
1327
+ @enable_piracy_check = args[:enable_piracy_check] if args.key?(:enable_piracy_check)
1328
+ @kind = args[:kind] if args.key?(:kind)
1329
+ @package_name = args[:package_name] if args.key?(:package_name)
1330
+ @preferred = args[:preferred] if args.key?(:preferred)
1331
+ end
1332
+ end
1333
+
1334
+ # This is a JSON template for the iOS details resource.
1335
+ class InstanceIosDetails
1336
+ include Google::Apis::Core::Hashable
1337
+
1338
+ # Bundle identifier.
1339
+ # Corresponds to the JSON property `bundleIdentifier`
1340
+ # @return [String]
1341
+ attr_accessor :bundle_identifier
1342
+
1343
+ # iTunes App ID.
1344
+ # Corresponds to the JSON property `itunesAppId`
1345
+ # @return [String]
1346
+ attr_accessor :itunes_app_id
1347
+
1348
+ # Uniquely identifies the type of this resource. Value is always the fixed
1349
+ # string games#instanceIosDetails.
1350
+ # Corresponds to the JSON property `kind`
1351
+ # @return [String]
1352
+ attr_accessor :kind
1353
+
1354
+ # Indicates that this instance is the default for new installations on iPad
1355
+ # devices.
1356
+ # Corresponds to the JSON property `preferredForIpad`
1357
+ # @return [Boolean]
1358
+ attr_accessor :preferred_for_ipad
1359
+ alias_method :preferred_for_ipad?, :preferred_for_ipad
1360
+
1361
+ # Indicates that this instance is the default for new installations on iPhone
1362
+ # devices.
1363
+ # Corresponds to the JSON property `preferredForIphone`
1364
+ # @return [Boolean]
1365
+ attr_accessor :preferred_for_iphone
1366
+ alias_method :preferred_for_iphone?, :preferred_for_iphone
1367
+
1368
+ # Flag to indicate if this instance supports iPad.
1369
+ # Corresponds to the JSON property `supportIpad`
1370
+ # @return [Boolean]
1371
+ attr_accessor :support_ipad
1372
+ alias_method :support_ipad?, :support_ipad
1373
+
1374
+ # Flag to indicate if this instance supports iPhone.
1375
+ # Corresponds to the JSON property `supportIphone`
1376
+ # @return [Boolean]
1377
+ attr_accessor :support_iphone
1378
+ alias_method :support_iphone?, :support_iphone
1379
+
1380
+ def initialize(**args)
1381
+ update!(**args)
1382
+ end
1383
+
1384
+ # Update properties of this object
1385
+ def update!(**args)
1386
+ @bundle_identifier = args[:bundle_identifier] if args.key?(:bundle_identifier)
1387
+ @itunes_app_id = args[:itunes_app_id] if args.key?(:itunes_app_id)
1388
+ @kind = args[:kind] if args.key?(:kind)
1389
+ @preferred_for_ipad = args[:preferred_for_ipad] if args.key?(:preferred_for_ipad)
1390
+ @preferred_for_iphone = args[:preferred_for_iphone] if args.key?(:preferred_for_iphone)
1391
+ @support_ipad = args[:support_ipad] if args.key?(:support_ipad)
1392
+ @support_iphone = args[:support_iphone] if args.key?(:support_iphone)
1393
+ end
1394
+ end
1395
+
1396
+ # This is a JSON template for the Web details resource.
1397
+ class InstanceWebDetails
1398
+ include Google::Apis::Core::Hashable
1399
+
1400
+ # Uniquely identifies the type of this resource. Value is always the fixed
1401
+ # string games#instanceWebDetails.
1402
+ # Corresponds to the JSON property `kind`
1403
+ # @return [String]
1404
+ attr_accessor :kind
1405
+
1406
+ # Launch URL for the game.
1407
+ # Corresponds to the JSON property `launchUrl`
1408
+ # @return [String]
1409
+ attr_accessor :launch_url
1410
+
1411
+ # Indicates that this instance is the default for new installations.
1412
+ # Corresponds to the JSON property `preferred`
1413
+ # @return [Boolean]
1414
+ attr_accessor :preferred
1415
+ alias_method :preferred?, :preferred
1416
+
1417
+ def initialize(**args)
1418
+ update!(**args)
1419
+ end
1420
+
1421
+ # Update properties of this object
1422
+ def update!(**args)
1423
+ @kind = args[:kind] if args.key?(:kind)
1424
+ @launch_url = args[:launch_url] if args.key?(:launch_url)
1425
+ @preferred = args[:preferred] if args.key?(:preferred)
1426
+ end
1427
+ end
1428
+
1429
+ # This is a JSON template for the Leaderboard resource.
1430
+ class Leaderboard
1431
+ include Google::Apis::Core::Hashable
1432
+
1433
+ # The icon for the leaderboard.
1434
+ # Corresponds to the JSON property `iconUrl`
1435
+ # @return [String]
1436
+ attr_accessor :icon_url
1437
+
1438
+ # The leaderboard ID.
1439
+ # Corresponds to the JSON property `id`
1440
+ # @return [String]
1441
+ attr_accessor :id
1442
+
1443
+ # Indicates whether the icon image being returned is a default image, or is game-
1444
+ # provided.
1445
+ # Corresponds to the JSON property `isIconUrlDefault`
1446
+ # @return [Boolean]
1447
+ attr_accessor :is_icon_url_default
1448
+ alias_method :is_icon_url_default?, :is_icon_url_default
1449
+
1450
+ # Uniquely identifies the type of this resource. Value is always the fixed
1451
+ # string games#leaderboard.
1452
+ # Corresponds to the JSON property `kind`
1453
+ # @return [String]
1454
+ attr_accessor :kind
1455
+
1456
+ # The name of the leaderboard.
1457
+ # Corresponds to the JSON property `name`
1458
+ # @return [String]
1459
+ attr_accessor :name
1460
+
1461
+ # How scores are ordered.
1462
+ # Possible values are:
1463
+ # - "LARGER_IS_BETTER" - Larger values are better; scores are sorted in
1464
+ # descending order.
1465
+ # - "SMALLER_IS_BETTER" - Smaller values are better; scores are sorted in
1466
+ # ascending order.
1467
+ # Corresponds to the JSON property `order`
1468
+ # @return [String]
1469
+ attr_accessor :order
1470
+
1471
+ def initialize(**args)
1472
+ update!(**args)
1473
+ end
1474
+
1475
+ # Update properties of this object
1476
+ def update!(**args)
1477
+ @icon_url = args[:icon_url] if args.key?(:icon_url)
1478
+ @id = args[:id] if args.key?(:id)
1479
+ @is_icon_url_default = args[:is_icon_url_default] if args.key?(:is_icon_url_default)
1480
+ @kind = args[:kind] if args.key?(:kind)
1481
+ @name = args[:name] if args.key?(:name)
1482
+ @order = args[:order] if args.key?(:order)
1483
+ end
1484
+ end
1485
+
1486
+ # This is a JSON template for the Leaderboard Entry resource.
1487
+ class LeaderboardEntry
1488
+ include Google::Apis::Core::Hashable
1489
+
1490
+ # The localized string for the numerical value of this score.
1491
+ # Corresponds to the JSON property `formattedScore`
1492
+ # @return [String]
1493
+ attr_accessor :formatted_score
1494
+
1495
+ # The localized string for the rank of this score for this leaderboard.
1496
+ # Corresponds to the JSON property `formattedScoreRank`
1497
+ # @return [String]
1498
+ attr_accessor :formatted_score_rank
1499
+
1500
+ # Uniquely identifies the type of this resource. Value is always the fixed
1501
+ # string games#leaderboardEntry.
1502
+ # Corresponds to the JSON property `kind`
1503
+ # @return [String]
1504
+ attr_accessor :kind
1505
+
1506
+ # This is a JSON template for a Player resource.
1507
+ # Corresponds to the JSON property `player`
1508
+ # @return [Google::Apis::GamesV1::Player]
1509
+ attr_accessor :player
1510
+
1511
+ # The rank of this score for this leaderboard.
1512
+ # Corresponds to the JSON property `scoreRank`
1513
+ # @return [String]
1514
+ attr_accessor :score_rank
1515
+
1516
+ # Additional information about the score. Values must contain no more than 64
1517
+ # URI-safe characters as defined by section 2.3 of RFC 3986.
1518
+ # Corresponds to the JSON property `scoreTag`
1519
+ # @return [String]
1520
+ attr_accessor :score_tag
1521
+
1522
+ # The numerical value of this score.
1523
+ # Corresponds to the JSON property `scoreValue`
1524
+ # @return [String]
1525
+ attr_accessor :score_value
1526
+
1527
+ # The time span of this high score.
1528
+ # Possible values are:
1529
+ # - "ALL_TIME" - The score is an all-time high score.
1530
+ # - "WEEKLY" - The score is a weekly high score.
1531
+ # - "DAILY" - The score is a daily high score.
1532
+ # Corresponds to the JSON property `timeSpan`
1533
+ # @return [String]
1534
+ attr_accessor :time_span
1535
+
1536
+ # The timestamp at which this score was recorded, in milliseconds since the
1537
+ # epoch in UTC.
1538
+ # Corresponds to the JSON property `writeTimestampMillis`
1539
+ # @return [String]
1540
+ attr_accessor :write_timestamp_millis
1541
+
1542
+ def initialize(**args)
1543
+ update!(**args)
1544
+ end
1545
+
1546
+ # Update properties of this object
1547
+ def update!(**args)
1548
+ @formatted_score = args[:formatted_score] if args.key?(:formatted_score)
1549
+ @formatted_score_rank = args[:formatted_score_rank] if args.key?(:formatted_score_rank)
1550
+ @kind = args[:kind] if args.key?(:kind)
1551
+ @player = args[:player] if args.key?(:player)
1552
+ @score_rank = args[:score_rank] if args.key?(:score_rank)
1553
+ @score_tag = args[:score_tag] if args.key?(:score_tag)
1554
+ @score_value = args[:score_value] if args.key?(:score_value)
1555
+ @time_span = args[:time_span] if args.key?(:time_span)
1556
+ @write_timestamp_millis = args[:write_timestamp_millis] if args.key?(:write_timestamp_millis)
1557
+ end
1558
+ end
1559
+
1560
+ # This is a JSON template for a list of leaderboard objects.
1561
+ class ListLeaderboardResponse
1562
+ include Google::Apis::Core::Hashable
1563
+
1564
+ # The leaderboards.
1565
+ # Corresponds to the JSON property `items`
1566
+ # @return [Array<Google::Apis::GamesV1::Leaderboard>]
1567
+ attr_accessor :items
1568
+
1569
+ # Uniquely identifies the type of this resource. Value is always the fixed
1570
+ # string games#leaderboardListResponse.
1571
+ # Corresponds to the JSON property `kind`
1572
+ # @return [String]
1573
+ attr_accessor :kind
1574
+
1575
+ # Token corresponding to the next page of results.
1576
+ # Corresponds to the JSON property `nextPageToken`
1577
+ # @return [String]
1578
+ attr_accessor :next_page_token
1579
+
1580
+ def initialize(**args)
1581
+ update!(**args)
1582
+ end
1583
+
1584
+ # Update properties of this object
1585
+ def update!(**args)
1586
+ @items = args[:items] if args.key?(:items)
1587
+ @kind = args[:kind] if args.key?(:kind)
1588
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1589
+ end
1590
+ end
1591
+
1592
+ # This is a JSON template for a score rank in a leaderboard.
1593
+ class LeaderboardScoreRank
1594
+ include Google::Apis::Core::Hashable
1595
+
1596
+ # The number of scores in the leaderboard as a string.
1597
+ # Corresponds to the JSON property `formattedNumScores`
1598
+ # @return [String]
1599
+ attr_accessor :formatted_num_scores
1600
+
1601
+ # The rank in the leaderboard as a string.
1602
+ # Corresponds to the JSON property `formattedRank`
1603
+ # @return [String]
1604
+ attr_accessor :formatted_rank
1605
+
1606
+ # Uniquely identifies the type of this resource. Value is always the fixed
1607
+ # string games#leaderboardScoreRank.
1608
+ # Corresponds to the JSON property `kind`
1609
+ # @return [String]
1610
+ attr_accessor :kind
1611
+
1612
+ # The number of scores in the leaderboard.
1613
+ # Corresponds to the JSON property `numScores`
1614
+ # @return [String]
1615
+ attr_accessor :num_scores
1616
+
1617
+ # The rank in the leaderboard.
1618
+ # Corresponds to the JSON property `rank`
1619
+ # @return [String]
1620
+ attr_accessor :rank
1621
+
1622
+ def initialize(**args)
1623
+ update!(**args)
1624
+ end
1625
+
1626
+ # Update properties of this object
1627
+ def update!(**args)
1628
+ @formatted_num_scores = args[:formatted_num_scores] if args.key?(:formatted_num_scores)
1629
+ @formatted_rank = args[:formatted_rank] if args.key?(:formatted_rank)
1630
+ @kind = args[:kind] if args.key?(:kind)
1631
+ @num_scores = args[:num_scores] if args.key?(:num_scores)
1632
+ @rank = args[:rank] if args.key?(:rank)
1633
+ end
1634
+ end
1635
+
1636
+ # This is a JSON template for a ListScores response.
1637
+ class LeaderboardScores
1638
+ include Google::Apis::Core::Hashable
1639
+
1640
+ # The scores in the leaderboard.
1641
+ # Corresponds to the JSON property `items`
1642
+ # @return [Array<Google::Apis::GamesV1::LeaderboardEntry>]
1643
+ attr_accessor :items
1644
+
1645
+ # Uniquely identifies the type of this resource. Value is always the fixed
1646
+ # string games#leaderboardScores.
1647
+ # Corresponds to the JSON property `kind`
1648
+ # @return [String]
1649
+ attr_accessor :kind
1650
+
1651
+ # The pagination token for the next page of results.
1652
+ # Corresponds to the JSON property `nextPageToken`
1653
+ # @return [String]
1654
+ attr_accessor :next_page_token
1655
+
1656
+ # The total number of scores in the leaderboard.
1657
+ # Corresponds to the JSON property `numScores`
1658
+ # @return [String]
1659
+ attr_accessor :num_scores
1660
+
1661
+ # This is a JSON template for the Leaderboard Entry resource.
1662
+ # Corresponds to the JSON property `playerScore`
1663
+ # @return [Google::Apis::GamesV1::LeaderboardEntry]
1664
+ attr_accessor :player_score
1665
+
1666
+ # The pagination token for the previous page of results.
1667
+ # Corresponds to the JSON property `prevPageToken`
1668
+ # @return [String]
1669
+ attr_accessor :prev_page_token
1670
+
1671
+ def initialize(**args)
1672
+ update!(**args)
1673
+ end
1674
+
1675
+ # Update properties of this object
1676
+ def update!(**args)
1677
+ @items = args[:items] if args.key?(:items)
1678
+ @kind = args[:kind] if args.key?(:kind)
1679
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1680
+ @num_scores = args[:num_scores] if args.key?(:num_scores)
1681
+ @player_score = args[:player_score] if args.key?(:player_score)
1682
+ @prev_page_token = args[:prev_page_token] if args.key?(:prev_page_token)
1683
+ end
1684
+ end
1685
+
1686
+ # This is a JSON template for the metagame config resource
1687
+ class MetagameConfig
1688
+ include Google::Apis::Core::Hashable
1689
+
1690
+ # Current version of the metagame configuration data. When this data is updated,
1691
+ # the version number will be increased by one.
1692
+ # Corresponds to the JSON property `currentVersion`
1693
+ # @return [Fixnum]
1694
+ attr_accessor :current_version
1695
+
1696
+ # Uniquely identifies the type of this resource. Value is always the fixed
1697
+ # string games#metagameConfig.
1698
+ # Corresponds to the JSON property `kind`
1699
+ # @return [String]
1700
+ attr_accessor :kind
1701
+
1702
+ # The list of player levels.
1703
+ # Corresponds to the JSON property `playerLevels`
1704
+ # @return [Array<Google::Apis::GamesV1::PlayerLevel>]
1705
+ attr_accessor :player_levels
1706
+
1707
+ def initialize(**args)
1708
+ update!(**args)
1709
+ end
1710
+
1711
+ # Update properties of this object
1712
+ def update!(**args)
1713
+ @current_version = args[:current_version] if args.key?(:current_version)
1714
+ @kind = args[:kind] if args.key?(:kind)
1715
+ @player_levels = args[:player_levels] if args.key?(:player_levels)
1716
+ end
1717
+ end
1718
+
1719
+ # This is a JSON template for network diagnostics reported for a client.
1720
+ class NetworkDiagnostics
1721
+ include Google::Apis::Core::Hashable
1722
+
1723
+ # The Android network subtype.
1724
+ # Corresponds to the JSON property `androidNetworkSubtype`
1725
+ # @return [Fixnum]
1726
+ attr_accessor :android_network_subtype
1727
+
1728
+ # The Android network type.
1729
+ # Corresponds to the JSON property `androidNetworkType`
1730
+ # @return [Fixnum]
1731
+ attr_accessor :android_network_type
1732
+
1733
+ # iOS network type as defined in Reachability.h.
1734
+ # Corresponds to the JSON property `iosNetworkType`
1735
+ # @return [Fixnum]
1736
+ attr_accessor :ios_network_type
1737
+
1738
+ # Uniquely identifies the type of this resource. Value is always the fixed
1739
+ # string games#networkDiagnostics.
1740
+ # Corresponds to the JSON property `kind`
1741
+ # @return [String]
1742
+ attr_accessor :kind
1743
+
1744
+ # The MCC+MNC code for the client's network connection. On Android: http://
1745
+ # developer.android.com/reference/android/telephony/TelephonyManager.html#
1746
+ # getNetworkOperator() On iOS, see: https://developer.apple.com/library/ios/
1747
+ # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html
1748
+ # Corresponds to the JSON property `networkOperatorCode`
1749
+ # @return [String]
1750
+ attr_accessor :network_operator_code
1751
+
1752
+ # The name of the carrier of the client's network connection. On Android: http://
1753
+ # developer.android.com/reference/android/telephony/TelephonyManager.html#
1754
+ # getNetworkOperatorName() On iOS: https://developer.apple.com/library/ios/
1755
+ # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html#/
1756
+ # /apple_ref/occ/instp/CTCarrier/carrierName
1757
+ # Corresponds to the JSON property `networkOperatorName`
1758
+ # @return [String]
1759
+ attr_accessor :network_operator_name
1760
+
1761
+ # The amount of time in milliseconds it took for the client to establish a
1762
+ # connection with the XMPP server.
1763
+ # Corresponds to the JSON property `registrationLatencyMillis`
1764
+ # @return [Fixnum]
1765
+ attr_accessor :registration_latency_millis
1766
+
1767
+ def initialize(**args)
1768
+ update!(**args)
1769
+ end
1770
+
1771
+ # Update properties of this object
1772
+ def update!(**args)
1773
+ @android_network_subtype = args[:android_network_subtype] if args.key?(:android_network_subtype)
1774
+ @android_network_type = args[:android_network_type] if args.key?(:android_network_type)
1775
+ @ios_network_type = args[:ios_network_type] if args.key?(:ios_network_type)
1776
+ @kind = args[:kind] if args.key?(:kind)
1777
+ @network_operator_code = args[:network_operator_code] if args.key?(:network_operator_code)
1778
+ @network_operator_name = args[:network_operator_name] if args.key?(:network_operator_name)
1779
+ @registration_latency_millis = args[:registration_latency_millis] if args.key?(:registration_latency_millis)
1780
+ end
1781
+ end
1782
+
1783
+ # This is a JSON template for a result for a match participant.
1784
+ class ParticipantResult
1785
+ include Google::Apis::Core::Hashable
1786
+
1787
+ # Uniquely identifies the type of this resource. Value is always the fixed
1788
+ # string games#participantResult.
1789
+ # Corresponds to the JSON property `kind`
1790
+ # @return [String]
1791
+ attr_accessor :kind
1792
+
1793
+ # The ID of the participant.
1794
+ # Corresponds to the JSON property `participantId`
1795
+ # @return [String]
1796
+ attr_accessor :participant_id
1797
+
1798
+ # The placement or ranking of the participant in the match results; a number
1799
+ # from one to the number of participants in the match. Multiple participants may
1800
+ # have the same placing value in case of a type.
1801
+ # Corresponds to the JSON property `placing`
1802
+ # @return [Fixnum]
1803
+ attr_accessor :placing
1804
+
1805
+ # The result of the participant for this match.
1806
+ # Possible values are:
1807
+ # - "MATCH_RESULT_WIN" - The participant won the match.
1808
+ # - "MATCH_RESULT_LOSS" - The participant lost the match.
1809
+ # - "MATCH_RESULT_TIE" - The participant tied the match.
1810
+ # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or
1811
+ # loses this kind of game.)
1812
+ # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the
1813
+ # match.
1814
+ # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for
1815
+ # this participant.
1816
+ # Corresponds to the JSON property `result`
1817
+ # @return [String]
1818
+ attr_accessor :result
1819
+
1820
+ def initialize(**args)
1821
+ update!(**args)
1822
+ end
1823
+
1824
+ # Update properties of this object
1825
+ def update!(**args)
1826
+ @kind = args[:kind] if args.key?(:kind)
1827
+ @participant_id = args[:participant_id] if args.key?(:participant_id)
1828
+ @placing = args[:placing] if args.key?(:placing)
1829
+ @result = args[:result] if args.key?(:result)
1830
+ end
1831
+ end
1832
+
1833
+ # This is a JSON template for peer channel diagnostics.
1834
+ class PeerChannelDiagnostics
1835
+ include Google::Apis::Core::Hashable
1836
+
1837
+ # This is a JSON template for aggregate stats.
1838
+ # Corresponds to the JSON property `bytesReceived`
1839
+ # @return [Google::Apis::GamesV1::AggregateStats]
1840
+ attr_accessor :bytes_received
1841
+
1842
+ # This is a JSON template for aggregate stats.
1843
+ # Corresponds to the JSON property `bytesSent`
1844
+ # @return [Google::Apis::GamesV1::AggregateStats]
1845
+ attr_accessor :bytes_sent
1846
+
1847
+ # Uniquely identifies the type of this resource. Value is always the fixed
1848
+ # string games#peerChannelDiagnostics.
1849
+ # Corresponds to the JSON property `kind`
1850
+ # @return [String]
1851
+ attr_accessor :kind
1852
+
1853
+ # Number of messages lost.
1854
+ # Corresponds to the JSON property `numMessagesLost`
1855
+ # @return [Fixnum]
1856
+ attr_accessor :num_messages_lost
1857
+
1858
+ # Number of messages received.
1859
+ # Corresponds to the JSON property `numMessagesReceived`
1860
+ # @return [Fixnum]
1861
+ attr_accessor :num_messages_received
1862
+
1863
+ # Number of messages sent.
1864
+ # Corresponds to the JSON property `numMessagesSent`
1865
+ # @return [Fixnum]
1866
+ attr_accessor :num_messages_sent
1867
+
1868
+ # Number of send failures.
1869
+ # Corresponds to the JSON property `numSendFailures`
1870
+ # @return [Fixnum]
1871
+ attr_accessor :num_send_failures
1872
+
1873
+ # This is a JSON template for aggregate stats.
1874
+ # Corresponds to the JSON property `roundtripLatencyMillis`
1875
+ # @return [Google::Apis::GamesV1::AggregateStats]
1876
+ attr_accessor :roundtrip_latency_millis
1877
+
1878
+ def initialize(**args)
1879
+ update!(**args)
1880
+ end
1881
+
1882
+ # Update properties of this object
1883
+ def update!(**args)
1884
+ @bytes_received = args[:bytes_received] if args.key?(:bytes_received)
1885
+ @bytes_sent = args[:bytes_sent] if args.key?(:bytes_sent)
1886
+ @kind = args[:kind] if args.key?(:kind)
1887
+ @num_messages_lost = args[:num_messages_lost] if args.key?(:num_messages_lost)
1888
+ @num_messages_received = args[:num_messages_received] if args.key?(:num_messages_received)
1889
+ @num_messages_sent = args[:num_messages_sent] if args.key?(:num_messages_sent)
1890
+ @num_send_failures = args[:num_send_failures] if args.key?(:num_send_failures)
1891
+ @roundtrip_latency_millis = args[:roundtrip_latency_millis] if args.key?(:roundtrip_latency_millis)
1892
+ end
1893
+ end
1894
+
1895
+ # This is a JSON template for peer session diagnostics.
1896
+ class PeerSessionDiagnostics
1897
+ include Google::Apis::Core::Hashable
1898
+
1899
+ # Connected time in milliseconds.
1900
+ # Corresponds to the JSON property `connectedTimestampMillis`
1901
+ # @return [String]
1902
+ attr_accessor :connected_timestamp_millis
1903
+
1904
+ # Uniquely identifies the type of this resource. Value is always the fixed
1905
+ # string games#peerSessionDiagnostics.
1906
+ # Corresponds to the JSON property `kind`
1907
+ # @return [String]
1908
+ attr_accessor :kind
1909
+
1910
+ # The participant ID of the peer.
1911
+ # Corresponds to the JSON property `participantId`
1912
+ # @return [String]
1913
+ attr_accessor :participant_id
1914
+
1915
+ # This is a JSON template for peer channel diagnostics.
1916
+ # Corresponds to the JSON property `reliableChannel`
1917
+ # @return [Google::Apis::GamesV1::PeerChannelDiagnostics]
1918
+ attr_accessor :reliable_channel
1919
+
1920
+ # This is a JSON template for peer channel diagnostics.
1921
+ # Corresponds to the JSON property `unreliableChannel`
1922
+ # @return [Google::Apis::GamesV1::PeerChannelDiagnostics]
1923
+ attr_accessor :unreliable_channel
1924
+
1925
+ def initialize(**args)
1926
+ update!(**args)
1927
+ end
1928
+
1929
+ # Update properties of this object
1930
+ def update!(**args)
1931
+ @connected_timestamp_millis = args[:connected_timestamp_millis] if args.key?(:connected_timestamp_millis)
1932
+ @kind = args[:kind] if args.key?(:kind)
1933
+ @participant_id = args[:participant_id] if args.key?(:participant_id)
1934
+ @reliable_channel = args[:reliable_channel] if args.key?(:reliable_channel)
1935
+ @unreliable_channel = args[:unreliable_channel] if args.key?(:unreliable_channel)
1936
+ end
1937
+ end
1938
+
1939
+ # This is a JSON template for metadata about a player playing a game with the
1940
+ # currently authenticated user.
1941
+ class Played
1942
+ include Google::Apis::Core::Hashable
1943
+
1944
+ # True if the player was auto-matched with the currently authenticated user.
1945
+ # Corresponds to the JSON property `autoMatched`
1946
+ # @return [Boolean]
1947
+ attr_accessor :auto_matched
1948
+ alias_method :auto_matched?, :auto_matched
1949
+
1950
+ # Uniquely identifies the type of this resource. Value is always the fixed
1951
+ # string games#played.
1952
+ # Corresponds to the JSON property `kind`
1953
+ # @return [String]
1954
+ attr_accessor :kind
1955
+
1956
+ # The last time the player played the game in milliseconds since the epoch in
1957
+ # UTC.
1958
+ # Corresponds to the JSON property `timeMillis`
1959
+ # @return [String]
1960
+ attr_accessor :time_millis
1961
+
1962
+ def initialize(**args)
1963
+ update!(**args)
1964
+ end
1965
+
1966
+ # Update properties of this object
1967
+ def update!(**args)
1968
+ @auto_matched = args[:auto_matched] if args.key?(:auto_matched)
1969
+ @kind = args[:kind] if args.key?(:kind)
1970
+ @time_millis = args[:time_millis] if args.key?(:time_millis)
1971
+ end
1972
+ end
1973
+
1974
+ # This is a JSON template for a Player resource.
1975
+ class Player
1976
+ include Google::Apis::Core::Hashable
1977
+
1978
+ # The base URL for the image that represents the player.
1979
+ # Corresponds to the JSON property `avatarImageUrl`
1980
+ # @return [String]
1981
+ attr_accessor :avatar_image_url
1982
+
1983
+ # The url to the landscape mode player banner image.
1984
+ # Corresponds to the JSON property `bannerUrlLandscape`
1985
+ # @return [String]
1986
+ attr_accessor :banner_url_landscape
1987
+
1988
+ # The url to the portrait mode player banner image.
1989
+ # Corresponds to the JSON property `bannerUrlPortrait`
1990
+ # @return [String]
1991
+ attr_accessor :banner_url_portrait
1992
+
1993
+ # The name to display for the player.
1994
+ # Corresponds to the JSON property `displayName`
1995
+ # @return [String]
1996
+ attr_accessor :display_name
1997
+
1998
+ # This is a JSON template for 1P/3P metadata about the player's experience.
1999
+ # Corresponds to the JSON property `experienceInfo`
2000
+ # @return [Google::Apis::GamesV1::PlayerExperienceInfo]
2001
+ attr_accessor :experience_info
2002
+
2003
+ # Uniquely identifies the type of this resource. Value is always the fixed
2004
+ # string games#player.
2005
+ # Corresponds to the JSON property `kind`
2006
+ # @return [String]
2007
+ attr_accessor :kind
2008
+
2009
+ # This is a JSON template for metadata about a player playing a game with the
2010
+ # currently authenticated user.
2011
+ # Corresponds to the JSON property `lastPlayedWith`
2012
+ # @return [Google::Apis::GamesV1::Played]
2013
+ attr_accessor :last_played_with
2014
+
2015
+ # An object representation of the individual components of the player's name.
2016
+ # For some players, these fields may not be present.
2017
+ # Corresponds to the JSON property `name`
2018
+ # @return [Google::Apis::GamesV1::Player::Name]
2019
+ attr_accessor :name
2020
+
2021
+ # The player ID that was used for this player the first time they signed into
2022
+ # the game in question. This is only populated for calls to player.get for the
2023
+ # requesting player, only if the player ID has subsequently changed, and only to
2024
+ # clients that support remapping player IDs.
2025
+ # Corresponds to the JSON property `originalPlayerId`
2026
+ # @return [String]
2027
+ attr_accessor :original_player_id
2028
+
2029
+ # The ID of the player.
2030
+ # Corresponds to the JSON property `playerId`
2031
+ # @return [String]
2032
+ attr_accessor :player_id
2033
+
2034
+ # The player's title rewarded for their game activities.
2035
+ # Corresponds to the JSON property `title`
2036
+ # @return [String]
2037
+ attr_accessor :title
2038
+
2039
+ def initialize(**args)
2040
+ update!(**args)
2041
+ end
2042
+
2043
+ # Update properties of this object
2044
+ def update!(**args)
2045
+ @avatar_image_url = args[:avatar_image_url] if args.key?(:avatar_image_url)
2046
+ @banner_url_landscape = args[:banner_url_landscape] if args.key?(:banner_url_landscape)
2047
+ @banner_url_portrait = args[:banner_url_portrait] if args.key?(:banner_url_portrait)
2048
+ @display_name = args[:display_name] if args.key?(:display_name)
2049
+ @experience_info = args[:experience_info] if args.key?(:experience_info)
2050
+ @kind = args[:kind] if args.key?(:kind)
2051
+ @last_played_with = args[:last_played_with] if args.key?(:last_played_with)
2052
+ @name = args[:name] if args.key?(:name)
2053
+ @original_player_id = args[:original_player_id] if args.key?(:original_player_id)
2054
+ @player_id = args[:player_id] if args.key?(:player_id)
2055
+ @title = args[:title] if args.key?(:title)
2056
+ end
2057
+
2058
+ # An object representation of the individual components of the player's name.
2059
+ # For some players, these fields may not be present.
2060
+ class Name
2061
+ include Google::Apis::Core::Hashable
2062
+
2063
+ # The family name of this player. In some places, this is known as the last name.
2064
+ # Corresponds to the JSON property `familyName`
2065
+ # @return [String]
2066
+ attr_accessor :family_name
2067
+
2068
+ # The given name of this player. In some places, this is known as the first name.
2069
+ # Corresponds to the JSON property `givenName`
2070
+ # @return [String]
2071
+ attr_accessor :given_name
2072
+
2073
+ def initialize(**args)
2074
+ update!(**args)
2075
+ end
2076
+
2077
+ # Update properties of this object
2078
+ def update!(**args)
2079
+ @family_name = args[:family_name] if args.key?(:family_name)
2080
+ @given_name = args[:given_name] if args.key?(:given_name)
2081
+ end
2082
+ end
2083
+ end
2084
+
2085
+ # This is a JSON template for an achievement object.
2086
+ class PlayerAchievement
2087
+ include Google::Apis::Core::Hashable
2088
+
2089
+ # The state of the achievement.
2090
+ # Possible values are:
2091
+ # - "HIDDEN" - Achievement is hidden.
2092
+ # - "REVEALED" - Achievement is revealed.
2093
+ # - "UNLOCKED" - Achievement is unlocked.
2094
+ # Corresponds to the JSON property `achievementState`
2095
+ # @return [String]
2096
+ attr_accessor :achievement_state
2097
+
2098
+ # The current steps for an incremental achievement.
2099
+ # Corresponds to the JSON property `currentSteps`
2100
+ # @return [Fixnum]
2101
+ attr_accessor :current_steps
2102
+
2103
+ # Experience points earned for the achievement. This field is absent for
2104
+ # achievements that have not yet been unlocked and 0 for achievements that have
2105
+ # been unlocked by testers but that are unpublished.
2106
+ # Corresponds to the JSON property `experiencePoints`
2107
+ # @return [String]
2108
+ attr_accessor :experience_points
2109
+
2110
+ # The current steps for an incremental achievement as a string.
2111
+ # Corresponds to the JSON property `formattedCurrentStepsString`
2112
+ # @return [String]
2113
+ attr_accessor :formatted_current_steps_string
2114
+
2115
+ # The ID of the achievement.
2116
+ # Corresponds to the JSON property `id`
2117
+ # @return [String]
2118
+ attr_accessor :id
2119
+
2120
+ # Uniquely identifies the type of this resource. Value is always the fixed
2121
+ # string games#playerAchievement.
2122
+ # Corresponds to the JSON property `kind`
2123
+ # @return [String]
2124
+ attr_accessor :kind
2125
+
2126
+ # The timestamp of the last modification to this achievement's state.
2127
+ # Corresponds to the JSON property `lastUpdatedTimestamp`
2128
+ # @return [String]
2129
+ attr_accessor :last_updated_timestamp
2130
+
2131
+ def initialize(**args)
2132
+ update!(**args)
2133
+ end
2134
+
2135
+ # Update properties of this object
2136
+ def update!(**args)
2137
+ @achievement_state = args[:achievement_state] if args.key?(:achievement_state)
2138
+ @current_steps = args[:current_steps] if args.key?(:current_steps)
2139
+ @experience_points = args[:experience_points] if args.key?(:experience_points)
2140
+ @formatted_current_steps_string = args[:formatted_current_steps_string] if args.key?(:formatted_current_steps_string)
2141
+ @id = args[:id] if args.key?(:id)
2142
+ @kind = args[:kind] if args.key?(:kind)
2143
+ @last_updated_timestamp = args[:last_updated_timestamp] if args.key?(:last_updated_timestamp)
2144
+ end
2145
+ end
2146
+
2147
+ # This is a JSON template for a list of achievement objects.
2148
+ class ListPlayerAchievementResponse
2149
+ include Google::Apis::Core::Hashable
2150
+
2151
+ # The achievements.
2152
+ # Corresponds to the JSON property `items`
2153
+ # @return [Array<Google::Apis::GamesV1::PlayerAchievement>]
2154
+ attr_accessor :items
2155
+
2156
+ # Uniquely identifies the type of this resource. Value is always the fixed
2157
+ # string games#playerAchievementListResponse.
2158
+ # Corresponds to the JSON property `kind`
2159
+ # @return [String]
2160
+ attr_accessor :kind
2161
+
2162
+ # Token corresponding to the next page of results.
2163
+ # Corresponds to the JSON property `nextPageToken`
2164
+ # @return [String]
2165
+ attr_accessor :next_page_token
2166
+
2167
+ def initialize(**args)
2168
+ update!(**args)
2169
+ end
2170
+
2171
+ # Update properties of this object
2172
+ def update!(**args)
2173
+ @items = args[:items] if args.key?(:items)
2174
+ @kind = args[:kind] if args.key?(:kind)
2175
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2176
+ end
2177
+ end
2178
+
2179
+ # This is a JSON template for an event status resource.
2180
+ class PlayerEvent
2181
+ include Google::Apis::Core::Hashable
2182
+
2183
+ # The ID of the event definition.
2184
+ # Corresponds to the JSON property `definitionId`
2185
+ # @return [String]
2186
+ attr_accessor :definition_id
2187
+
2188
+ # The current number of times this event has occurred, as a string. The
2189
+ # formatting of this string depends on the configuration of your event in the
2190
+ # Play Games Developer Console.
2191
+ # Corresponds to the JSON property `formattedNumEvents`
2192
+ # @return [String]
2193
+ attr_accessor :formatted_num_events
2194
+
2195
+ # Uniquely identifies the type of this resource. Value is always the fixed
2196
+ # string games#playerEvent.
2197
+ # Corresponds to the JSON property `kind`
2198
+ # @return [String]
2199
+ attr_accessor :kind
2200
+
2201
+ # The current number of times this event has occurred.
2202
+ # Corresponds to the JSON property `numEvents`
2203
+ # @return [String]
2204
+ attr_accessor :num_events
2205
+
2206
+ # The ID of the player.
2207
+ # Corresponds to the JSON property `playerId`
2208
+ # @return [String]
2209
+ attr_accessor :player_id
2210
+
2211
+ def initialize(**args)
2212
+ update!(**args)
2213
+ end
2214
+
2215
+ # Update properties of this object
2216
+ def update!(**args)
2217
+ @definition_id = args[:definition_id] if args.key?(:definition_id)
2218
+ @formatted_num_events = args[:formatted_num_events] if args.key?(:formatted_num_events)
2219
+ @kind = args[:kind] if args.key?(:kind)
2220
+ @num_events = args[:num_events] if args.key?(:num_events)
2221
+ @player_id = args[:player_id] if args.key?(:player_id)
2222
+ end
2223
+ end
2224
+
2225
+ # This is a JSON template for a ListByPlayer response.
2226
+ class ListPlayerEventResponse
2227
+ include Google::Apis::Core::Hashable
2228
+
2229
+ # The player events.
2230
+ # Corresponds to the JSON property `items`
2231
+ # @return [Array<Google::Apis::GamesV1::PlayerEvent>]
2232
+ attr_accessor :items
2233
+
2234
+ # Uniquely identifies the type of this resource. Value is always the fixed
2235
+ # string games#playerEventListResponse.
2236
+ # Corresponds to the JSON property `kind`
2237
+ # @return [String]
2238
+ attr_accessor :kind
2239
+
2240
+ # The pagination token for the next page of results.
2241
+ # Corresponds to the JSON property `nextPageToken`
2242
+ # @return [String]
2243
+ attr_accessor :next_page_token
2244
+
2245
+ def initialize(**args)
2246
+ update!(**args)
2247
+ end
2248
+
2249
+ # Update properties of this object
2250
+ def update!(**args)
2251
+ @items = args[:items] if args.key?(:items)
2252
+ @kind = args[:kind] if args.key?(:kind)
2253
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2254
+ end
2255
+ end
2256
+
2257
+ # This is a JSON template for 1P/3P metadata about the player's experience.
2258
+ class PlayerExperienceInfo
2259
+ include Google::Apis::Core::Hashable
2260
+
2261
+ # The current number of experience points for the player.
2262
+ # Corresponds to the JSON property `currentExperiencePoints`
2263
+ # @return [String]
2264
+ attr_accessor :current_experience_points
2265
+
2266
+ # This is a JSON template for 1P/3P metadata about a user's level.
2267
+ # Corresponds to the JSON property `currentLevel`
2268
+ # @return [Google::Apis::GamesV1::PlayerLevel]
2269
+ attr_accessor :current_level
2270
+
2271
+ # Uniquely identifies the type of this resource. Value is always the fixed
2272
+ # string games#playerExperienceInfo.
2273
+ # Corresponds to the JSON property `kind`
2274
+ # @return [String]
2275
+ attr_accessor :kind
2276
+
2277
+ # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
2278
+ # Corresponds to the JSON property `lastLevelUpTimestampMillis`
2279
+ # @return [String]
2280
+ attr_accessor :last_level_up_timestamp_millis
2281
+
2282
+ # This is a JSON template for 1P/3P metadata about a user's level.
2283
+ # Corresponds to the JSON property `nextLevel`
2284
+ # @return [Google::Apis::GamesV1::PlayerLevel]
2285
+ attr_accessor :next_level
2286
+
2287
+ def initialize(**args)
2288
+ update!(**args)
2289
+ end
2290
+
2291
+ # Update properties of this object
2292
+ def update!(**args)
2293
+ @current_experience_points = args[:current_experience_points] if args.key?(:current_experience_points)
2294
+ @current_level = args[:current_level] if args.key?(:current_level)
2295
+ @kind = args[:kind] if args.key?(:kind)
2296
+ @last_level_up_timestamp_millis = args[:last_level_up_timestamp_millis] if args.key?(:last_level_up_timestamp_millis)
2297
+ @next_level = args[:next_level] if args.key?(:next_level)
2298
+ end
2299
+ end
2300
+
2301
+ # This is a JSON template for a player leaderboard score object.
2302
+ class PlayerLeaderboardScore
2303
+ include Google::Apis::Core::Hashable
2304
+
2305
+ # Uniquely identifies the type of this resource. Value is always the fixed
2306
+ # string games#playerLeaderboardScore.
2307
+ # Corresponds to the JSON property `kind`
2308
+ # @return [String]
2309
+ attr_accessor :kind
2310
+
2311
+ # The ID of the leaderboard this score is in.
2312
+ # Corresponds to the JSON property `leaderboard_id`
2313
+ # @return [String]
2314
+ attr_accessor :leaderboard_id
2315
+
2316
+ # This is a JSON template for a score rank in a leaderboard.
2317
+ # Corresponds to the JSON property `publicRank`
2318
+ # @return [Google::Apis::GamesV1::LeaderboardScoreRank]
2319
+ attr_accessor :public_rank
2320
+
2321
+ # The formatted value of this score.
2322
+ # Corresponds to the JSON property `scoreString`
2323
+ # @return [String]
2324
+ attr_accessor :score_string
2325
+
2326
+ # Additional information about the score. Values must contain no more than 64
2327
+ # URI-safe characters as defined by section 2.3 of RFC 3986.
2328
+ # Corresponds to the JSON property `scoreTag`
2329
+ # @return [String]
2330
+ attr_accessor :score_tag
2331
+
2332
+ # The numerical value of this score.
2333
+ # Corresponds to the JSON property `scoreValue`
2334
+ # @return [String]
2335
+ attr_accessor :score_value
2336
+
2337
+ # This is a JSON template for a score rank in a leaderboard.
2338
+ # Corresponds to the JSON property `socialRank`
2339
+ # @return [Google::Apis::GamesV1::LeaderboardScoreRank]
2340
+ attr_accessor :social_rank
2341
+
2342
+ # The time span of this score.
2343
+ # Possible values are:
2344
+ # - "ALL_TIME" - The score is an all-time score.
2345
+ # - "WEEKLY" - The score is a weekly score.
2346
+ # - "DAILY" - The score is a daily score.
2347
+ # Corresponds to the JSON property `timeSpan`
2348
+ # @return [String]
2349
+ attr_accessor :time_span
2350
+
2351
+ # The timestamp at which this score was recorded, in milliseconds since the
2352
+ # epoch in UTC.
2353
+ # Corresponds to the JSON property `writeTimestamp`
2354
+ # @return [String]
2355
+ attr_accessor :write_timestamp
2356
+
2357
+ def initialize(**args)
2358
+ update!(**args)
2359
+ end
2360
+
2361
+ # Update properties of this object
2362
+ def update!(**args)
2363
+ @kind = args[:kind] if args.key?(:kind)
2364
+ @leaderboard_id = args[:leaderboard_id] if args.key?(:leaderboard_id)
2365
+ @public_rank = args[:public_rank] if args.key?(:public_rank)
2366
+ @score_string = args[:score_string] if args.key?(:score_string)
2367
+ @score_tag = args[:score_tag] if args.key?(:score_tag)
2368
+ @score_value = args[:score_value] if args.key?(:score_value)
2369
+ @social_rank = args[:social_rank] if args.key?(:social_rank)
2370
+ @time_span = args[:time_span] if args.key?(:time_span)
2371
+ @write_timestamp = args[:write_timestamp] if args.key?(:write_timestamp)
2372
+ end
2373
+ end
2374
+
2375
+ # This is a JSON template for a list of player leaderboard scores.
2376
+ class ListPlayerLeaderboardScoreResponse
2377
+ include Google::Apis::Core::Hashable
2378
+
2379
+ # The leaderboard scores.
2380
+ # Corresponds to the JSON property `items`
2381
+ # @return [Array<Google::Apis::GamesV1::PlayerLeaderboardScore>]
2382
+ attr_accessor :items
2383
+
2384
+ # Uniquely identifies the type of this resource. Value is always the fixed
2385
+ # string games#playerLeaderboardScoreListResponse.
2386
+ # Corresponds to the JSON property `kind`
2387
+ # @return [String]
2388
+ attr_accessor :kind
2389
+
2390
+ # The pagination token for the next page of results.
2391
+ # Corresponds to the JSON property `nextPageToken`
2392
+ # @return [String]
2393
+ attr_accessor :next_page_token
2394
+
2395
+ # This is a JSON template for a Player resource.
2396
+ # Corresponds to the JSON property `player`
2397
+ # @return [Google::Apis::GamesV1::Player]
2398
+ attr_accessor :player
2399
+
2400
+ def initialize(**args)
2401
+ update!(**args)
2402
+ end
2403
+
2404
+ # Update properties of this object
2405
+ def update!(**args)
2406
+ @items = args[:items] if args.key?(:items)
2407
+ @kind = args[:kind] if args.key?(:kind)
2408
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2409
+ @player = args[:player] if args.key?(:player)
2410
+ end
2411
+ end
2412
+
2413
+ # This is a JSON template for 1P/3P metadata about a user's level.
2414
+ class PlayerLevel
2415
+ include Google::Apis::Core::Hashable
2416
+
2417
+ # Uniquely identifies the type of this resource. Value is always the fixed
2418
+ # string games#playerLevel.
2419
+ # Corresponds to the JSON property `kind`
2420
+ # @return [String]
2421
+ attr_accessor :kind
2422
+
2423
+ # The level for the user.
2424
+ # Corresponds to the JSON property `level`
2425
+ # @return [Fixnum]
2426
+ attr_accessor :level
2427
+
2428
+ # The maximum experience points for this level.
2429
+ # Corresponds to the JSON property `maxExperiencePoints`
2430
+ # @return [String]
2431
+ attr_accessor :max_experience_points
2432
+
2433
+ # The minimum experience points for this level.
2434
+ # Corresponds to the JSON property `minExperiencePoints`
2435
+ # @return [String]
2436
+ attr_accessor :min_experience_points
2437
+
2438
+ def initialize(**args)
2439
+ update!(**args)
2440
+ end
2441
+
2442
+ # Update properties of this object
2443
+ def update!(**args)
2444
+ @kind = args[:kind] if args.key?(:kind)
2445
+ @level = args[:level] if args.key?(:level)
2446
+ @max_experience_points = args[:max_experience_points] if args.key?(:max_experience_points)
2447
+ @min_experience_points = args[:min_experience_points] if args.key?(:min_experience_points)
2448
+ end
2449
+ end
2450
+
2451
+ # This is a JSON template for a third party player list response.
2452
+ class ListPlayerResponse
2453
+ include Google::Apis::Core::Hashable
2454
+
2455
+ # The players.
2456
+ # Corresponds to the JSON property `items`
2457
+ # @return [Array<Google::Apis::GamesV1::Player>]
2458
+ attr_accessor :items
2459
+
2460
+ # Uniquely identifies the type of this resource. Value is always the fixed
2461
+ # string games#playerListResponse.
2462
+ # Corresponds to the JSON property `kind`
2463
+ # @return [String]
2464
+ attr_accessor :kind
2465
+
2466
+ # Token corresponding to the next page of results.
2467
+ # Corresponds to the JSON property `nextPageToken`
2468
+ # @return [String]
2469
+ attr_accessor :next_page_token
2470
+
2471
+ def initialize(**args)
2472
+ update!(**args)
2473
+ end
2474
+
2475
+ # Update properties of this object
2476
+ def update!(**args)
2477
+ @items = args[:items] if args.key?(:items)
2478
+ @kind = args[:kind] if args.key?(:kind)
2479
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2480
+ end
2481
+ end
2482
+
2483
+ # This is a JSON template for a player score.
2484
+ class PlayerScore
2485
+ include Google::Apis::Core::Hashable
2486
+
2487
+ # The formatted score for this player score.
2488
+ # Corresponds to the JSON property `formattedScore`
2489
+ # @return [String]
2490
+ attr_accessor :formatted_score
2491
+
2492
+ # Uniquely identifies the type of this resource. Value is always the fixed
2493
+ # string games#playerScore.
2494
+ # Corresponds to the JSON property `kind`
2495
+ # @return [String]
2496
+ attr_accessor :kind
2497
+
2498
+ # The numerical value for this player score.
2499
+ # Corresponds to the JSON property `score`
2500
+ # @return [String]
2501
+ attr_accessor :score
2502
+
2503
+ # Additional information about this score. Values will contain no more than 64
2504
+ # URI-safe characters as defined by section 2.3 of RFC 3986.
2505
+ # Corresponds to the JSON property `scoreTag`
2506
+ # @return [String]
2507
+ attr_accessor :score_tag
2508
+
2509
+ # The time span for this player score.
2510
+ # Possible values are:
2511
+ # - "ALL_TIME" - The score is an all-time score.
2512
+ # - "WEEKLY" - The score is a weekly score.
2513
+ # - "DAILY" - The score is a daily score.
2514
+ # Corresponds to the JSON property `timeSpan`
2515
+ # @return [String]
2516
+ attr_accessor :time_span
2517
+
2518
+ def initialize(**args)
2519
+ update!(**args)
2520
+ end
2521
+
2522
+ # Update properties of this object
2523
+ def update!(**args)
2524
+ @formatted_score = args[:formatted_score] if args.key?(:formatted_score)
2525
+ @kind = args[:kind] if args.key?(:kind)
2526
+ @score = args[:score] if args.key?(:score)
2527
+ @score_tag = args[:score_tag] if args.key?(:score_tag)
2528
+ @time_span = args[:time_span] if args.key?(:time_span)
2529
+ end
2530
+ end
2531
+
2532
+ # This is a JSON template for a list of score submission statuses.
2533
+ class ListPlayerScoreResponse
2534
+ include Google::Apis::Core::Hashable
2535
+
2536
+ # Uniquely identifies the type of this resource. Value is always the fixed
2537
+ # string games#playerScoreListResponse.
2538
+ # Corresponds to the JSON property `kind`
2539
+ # @return [String]
2540
+ attr_accessor :kind
2541
+
2542
+ # The score submissions statuses.
2543
+ # Corresponds to the JSON property `submittedScores`
2544
+ # @return [Array<Google::Apis::GamesV1::PlayerScoreResponse>]
2545
+ attr_accessor :submitted_scores
2546
+
2547
+ def initialize(**args)
2548
+ update!(**args)
2549
+ end
2550
+
2551
+ # Update properties of this object
2552
+ def update!(**args)
2553
+ @kind = args[:kind] if args.key?(:kind)
2554
+ @submitted_scores = args[:submitted_scores] if args.key?(:submitted_scores)
2555
+ end
2556
+ end
2557
+
2558
+ # This is a JSON template for a list of leaderboard entry resources.
2559
+ class PlayerScoreResponse
2560
+ include Google::Apis::Core::Hashable
2561
+
2562
+ # The time spans where the submitted score is better than the existing score for
2563
+ # that time span.
2564
+ # Possible values are:
2565
+ # - "ALL_TIME" - The score is an all-time score.
2566
+ # - "WEEKLY" - The score is a weekly score.
2567
+ # - "DAILY" - The score is a daily score.
2568
+ # Corresponds to the JSON property `beatenScoreTimeSpans`
2569
+ # @return [Array<String>]
2570
+ attr_accessor :beaten_score_time_spans
2571
+
2572
+ # The formatted value of the submitted score.
2573
+ # Corresponds to the JSON property `formattedScore`
2574
+ # @return [String]
2575
+ attr_accessor :formatted_score
2576
+
2577
+ # Uniquely identifies the type of this resource. Value is always the fixed
2578
+ # string games#playerScoreResponse.
2579
+ # Corresponds to the JSON property `kind`
2580
+ # @return [String]
2581
+ attr_accessor :kind
2582
+
2583
+ # The leaderboard ID that this score was submitted to.
2584
+ # Corresponds to the JSON property `leaderboardId`
2585
+ # @return [String]
2586
+ attr_accessor :leaderboard_id
2587
+
2588
+ # Additional information about this score. Values will contain no more than 64
2589
+ # URI-safe characters as defined by section 2.3 of RFC 3986.
2590
+ # Corresponds to the JSON property `scoreTag`
2591
+ # @return [String]
2592
+ attr_accessor :score_tag
2593
+
2594
+ # The scores in time spans that have not been beaten. As an example, the
2595
+ # submitted score may be better than the player's DAILY score, but not better
2596
+ # than the player's scores for the WEEKLY or ALL_TIME time spans.
2597
+ # Corresponds to the JSON property `unbeatenScores`
2598
+ # @return [Array<Google::Apis::GamesV1::PlayerScore>]
2599
+ attr_accessor :unbeaten_scores
2600
+
2601
+ def initialize(**args)
2602
+ update!(**args)
2603
+ end
2604
+
2605
+ # Update properties of this object
2606
+ def update!(**args)
2607
+ @beaten_score_time_spans = args[:beaten_score_time_spans] if args.key?(:beaten_score_time_spans)
2608
+ @formatted_score = args[:formatted_score] if args.key?(:formatted_score)
2609
+ @kind = args[:kind] if args.key?(:kind)
2610
+ @leaderboard_id = args[:leaderboard_id] if args.key?(:leaderboard_id)
2611
+ @score_tag = args[:score_tag] if args.key?(:score_tag)
2612
+ @unbeaten_scores = args[:unbeaten_scores] if args.key?(:unbeaten_scores)
2613
+ end
2614
+ end
2615
+
2616
+ # This is a JSON template for a list of score submission requests
2617
+ class PlayerScoreSubmissionList
2618
+ include Google::Apis::Core::Hashable
2619
+
2620
+ # Uniquely identifies the type of this resource. Value is always the fixed
2621
+ # string games#playerScoreSubmissionList.
2622
+ # Corresponds to the JSON property `kind`
2623
+ # @return [String]
2624
+ attr_accessor :kind
2625
+
2626
+ # The score submissions.
2627
+ # Corresponds to the JSON property `scores`
2628
+ # @return [Array<Google::Apis::GamesV1::ScoreSubmission>]
2629
+ attr_accessor :scores
2630
+
2631
+ def initialize(**args)
2632
+ update!(**args)
2633
+ end
2634
+
2635
+ # Update properties of this object
2636
+ def update!(**args)
2637
+ @kind = args[:kind] if args.key?(:kind)
2638
+ @scores = args[:scores] if args.key?(:scores)
2639
+ end
2640
+ end
2641
+
2642
+ # This is a JSON template for a push token resource.
2643
+ class PushToken
2644
+ include Google::Apis::Core::Hashable
2645
+
2646
+ # The revision of the client SDK used by your application, in the same format
2647
+ # that's used by revisions.check. Used to send backward compatible messages.
2648
+ # Format: [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are:
2649
+ #
2650
+ # - IOS - Push token is for iOS
2651
+ # Corresponds to the JSON property `clientRevision`
2652
+ # @return [String]
2653
+ attr_accessor :client_revision
2654
+
2655
+ # This is a JSON template for a push token ID resource.
2656
+ # Corresponds to the JSON property `id`
2657
+ # @return [Google::Apis::GamesV1::PushTokenId]
2658
+ attr_accessor :id
2659
+
2660
+ # Uniquely identifies the type of this resource. Value is always the fixed
2661
+ # string games#pushToken.
2662
+ # Corresponds to the JSON property `kind`
2663
+ # @return [String]
2664
+ attr_accessor :kind
2665
+
2666
+ # The preferred language for notifications that are sent using this token.
2667
+ # Corresponds to the JSON property `language`
2668
+ # @return [String]
2669
+ attr_accessor :language
2670
+
2671
+ def initialize(**args)
2672
+ update!(**args)
2673
+ end
2674
+
2675
+ # Update properties of this object
2676
+ def update!(**args)
2677
+ @client_revision = args[:client_revision] if args.key?(:client_revision)
2678
+ @id = args[:id] if args.key?(:id)
2679
+ @kind = args[:kind] if args.key?(:kind)
2680
+ @language = args[:language] if args.key?(:language)
2681
+ end
2682
+ end
2683
+
2684
+ # This is a JSON template for a push token ID resource.
2685
+ class PushTokenId
2686
+ include Google::Apis::Core::Hashable
2687
+
2688
+ # A push token ID for iOS devices.
2689
+ # Corresponds to the JSON property `ios`
2690
+ # @return [Google::Apis::GamesV1::PushTokenId::Ios]
2691
+ attr_accessor :ios
2692
+
2693
+ # Uniquely identifies the type of this resource. Value is always the fixed
2694
+ # string games#pushTokenId.
2695
+ # Corresponds to the JSON property `kind`
2696
+ # @return [String]
2697
+ attr_accessor :kind
2698
+
2699
+ def initialize(**args)
2700
+ update!(**args)
2701
+ end
2702
+
2703
+ # Update properties of this object
2704
+ def update!(**args)
2705
+ @ios = args[:ios] if args.key?(:ios)
2706
+ @kind = args[:kind] if args.key?(:kind)
2707
+ end
2708
+
2709
+ # A push token ID for iOS devices.
2710
+ class Ios
2711
+ include Google::Apis::Core::Hashable
2712
+
2713
+ # Device token supplied by an iOS system call to register for remote
2714
+ # notifications. Encode this field as web-safe base64.
2715
+ # Corresponds to the JSON property `apns_device_token`
2716
+ # @return [String]
2717
+ attr_accessor :apns_device_token
2718
+
2719
+ # Indicates whether this token should be used for the production or sandbox APNS
2720
+ # server.
2721
+ # Corresponds to the JSON property `apns_environment`
2722
+ # @return [String]
2723
+ attr_accessor :apns_environment
2724
+
2725
+ def initialize(**args)
2726
+ update!(**args)
2727
+ end
2728
+
2729
+ # Update properties of this object
2730
+ def update!(**args)
2731
+ @apns_device_token = args[:apns_device_token] if args.key?(:apns_device_token)
2732
+ @apns_environment = args[:apns_environment] if args.key?(:apns_environment)
2733
+ end
2734
+ end
2735
+ end
2736
+
2737
+ # This is a JSON template for a Quest resource.
2738
+ class Quest
2739
+ include Google::Apis::Core::Hashable
2740
+
2741
+ # The timestamp at which the user accepted the quest in milliseconds since the
2742
+ # epoch in UTC. Only present if the player has accepted the quest.
2743
+ # Corresponds to the JSON property `acceptedTimestampMillis`
2744
+ # @return [String]
2745
+ attr_accessor :accepted_timestamp_millis
2746
+
2747
+ # The ID of the application this quest is part of.
2748
+ # Corresponds to the JSON property `applicationId`
2749
+ # @return [String]
2750
+ attr_accessor :application_id
2751
+
2752
+ # The banner image URL for the quest.
2753
+ # Corresponds to the JSON property `bannerUrl`
2754
+ # @return [String]
2755
+ attr_accessor :banner_url
2756
+
2757
+ # The description of the quest.
2758
+ # Corresponds to the JSON property `description`
2759
+ # @return [String]
2760
+ attr_accessor :description
2761
+
2762
+ # The timestamp at which the quest ceases to be active in milliseconds since the
2763
+ # epoch in UTC.
2764
+ # Corresponds to the JSON property `endTimestampMillis`
2765
+ # @return [String]
2766
+ attr_accessor :end_timestamp_millis
2767
+
2768
+ # The icon image URL for the quest.
2769
+ # Corresponds to the JSON property `iconUrl`
2770
+ # @return [String]
2771
+ attr_accessor :icon_url
2772
+
2773
+ # The ID of the quest.
2774
+ # Corresponds to the JSON property `id`
2775
+ # @return [String]
2776
+ attr_accessor :id
2777
+
2778
+ # Indicates whether the banner image being returned is a default image, or is
2779
+ # game-provided.
2780
+ # Corresponds to the JSON property `isDefaultBannerUrl`
2781
+ # @return [Boolean]
2782
+ attr_accessor :is_default_banner_url
2783
+ alias_method :is_default_banner_url?, :is_default_banner_url
2784
+
2785
+ # Indicates whether the icon image being returned is a default image, or is game-
2786
+ # provided.
2787
+ # Corresponds to the JSON property `isDefaultIconUrl`
2788
+ # @return [Boolean]
2789
+ attr_accessor :is_default_icon_url
2790
+ alias_method :is_default_icon_url?, :is_default_icon_url
2791
+
2792
+ # Uniquely identifies the type of this resource. Value is always the fixed
2793
+ # string games#quest.
2794
+ # Corresponds to the JSON property `kind`
2795
+ # @return [String]
2796
+ attr_accessor :kind
2797
+
2798
+ # The timestamp at which the quest was last updated by the user in milliseconds
2799
+ # since the epoch in UTC. Only present if the player has accepted the quest.
2800
+ # Corresponds to the JSON property `lastUpdatedTimestampMillis`
2801
+ # @return [String]
2802
+ attr_accessor :last_updated_timestamp_millis
2803
+
2804
+ # The quest milestones.
2805
+ # Corresponds to the JSON property `milestones`
2806
+ # @return [Array<Google::Apis::GamesV1::QuestMilestone>]
2807
+ attr_accessor :milestones
2808
+
2809
+ # The name of the quest.
2810
+ # Corresponds to the JSON property `name`
2811
+ # @return [String]
2812
+ attr_accessor :name
2813
+
2814
+ # The timestamp at which the user should be notified that the quest will end
2815
+ # soon in milliseconds since the epoch in UTC.
2816
+ # Corresponds to the JSON property `notifyTimestampMillis`
2817
+ # @return [String]
2818
+ attr_accessor :notify_timestamp_millis
2819
+
2820
+ # The timestamp at which the quest becomes active in milliseconds since the
2821
+ # epoch in UTC.
2822
+ # Corresponds to the JSON property `startTimestampMillis`
2823
+ # @return [String]
2824
+ attr_accessor :start_timestamp_millis
2825
+
2826
+ # The state of the quest.
2827
+ # Possible values are:
2828
+ # - "UPCOMING": The quest is upcoming. The user can see the quest, but cannot
2829
+ # accept it until it is open.
2830
+ # - "OPEN": The quest is currently open and may be accepted at this time.
2831
+ # - "ACCEPTED": The user is currently participating in this quest.
2832
+ # - "COMPLETED": The user has completed the quest.
2833
+ # - "FAILED": The quest was attempted but was not completed before the deadline
2834
+ # expired.
2835
+ # - "EXPIRED": The quest has expired and was not accepted.
2836
+ # - "DELETED": The quest should be deleted from the local database.
2837
+ # Corresponds to the JSON property `state`
2838
+ # @return [String]
2839
+ attr_accessor :state
2840
+
2841
+ def initialize(**args)
2842
+ update!(**args)
2843
+ end
2844
+
2845
+ # Update properties of this object
2846
+ def update!(**args)
2847
+ @accepted_timestamp_millis = args[:accepted_timestamp_millis] if args.key?(:accepted_timestamp_millis)
2848
+ @application_id = args[:application_id] if args.key?(:application_id)
2849
+ @banner_url = args[:banner_url] if args.key?(:banner_url)
2850
+ @description = args[:description] if args.key?(:description)
2851
+ @end_timestamp_millis = args[:end_timestamp_millis] if args.key?(:end_timestamp_millis)
2852
+ @icon_url = args[:icon_url] if args.key?(:icon_url)
2853
+ @id = args[:id] if args.key?(:id)
2854
+ @is_default_banner_url = args[:is_default_banner_url] if args.key?(:is_default_banner_url)
2855
+ @is_default_icon_url = args[:is_default_icon_url] if args.key?(:is_default_icon_url)
2856
+ @kind = args[:kind] if args.key?(:kind)
2857
+ @last_updated_timestamp_millis = args[:last_updated_timestamp_millis] if args.key?(:last_updated_timestamp_millis)
2858
+ @milestones = args[:milestones] if args.key?(:milestones)
2859
+ @name = args[:name] if args.key?(:name)
2860
+ @notify_timestamp_millis = args[:notify_timestamp_millis] if args.key?(:notify_timestamp_millis)
2861
+ @start_timestamp_millis = args[:start_timestamp_millis] if args.key?(:start_timestamp_millis)
2862
+ @state = args[:state] if args.key?(:state)
2863
+ end
2864
+ end
2865
+
2866
+ # This is a JSON template for a Quest Criterion Contribution resource.
2867
+ class QuestContribution
2868
+ include Google::Apis::Core::Hashable
2869
+
2870
+ # The formatted value of the contribution as a string. Format depends on the
2871
+ # configuration for the associated event definition in the Play Games Developer
2872
+ # Console.
2873
+ # Corresponds to the JSON property `formattedValue`
2874
+ # @return [String]
2875
+ attr_accessor :formatted_value
2876
+
2877
+ # Uniquely identifies the type of this resource. Value is always the fixed
2878
+ # string games#questContribution.
2879
+ # Corresponds to the JSON property `kind`
2880
+ # @return [String]
2881
+ attr_accessor :kind
2882
+
2883
+ # The value of the contribution.
2884
+ # Corresponds to the JSON property `value`
2885
+ # @return [String]
2886
+ attr_accessor :value
2887
+
2888
+ def initialize(**args)
2889
+ update!(**args)
2890
+ end
2891
+
2892
+ # Update properties of this object
2893
+ def update!(**args)
2894
+ @formatted_value = args[:formatted_value] if args.key?(:formatted_value)
2895
+ @kind = args[:kind] if args.key?(:kind)
2896
+ @value = args[:value] if args.key?(:value)
2897
+ end
2898
+ end
2899
+
2900
+ # This is a JSON template for a Quest Criterion resource.
2901
+ class QuestCriterion
2902
+ include Google::Apis::Core::Hashable
2903
+
2904
+ # This is a JSON template for a Quest Criterion Contribution resource.
2905
+ # Corresponds to the JSON property `completionContribution`
2906
+ # @return [Google::Apis::GamesV1::QuestContribution]
2907
+ attr_accessor :completion_contribution
2908
+
2909
+ # This is a JSON template for a Quest Criterion Contribution resource.
2910
+ # Corresponds to the JSON property `currentContribution`
2911
+ # @return [Google::Apis::GamesV1::QuestContribution]
2912
+ attr_accessor :current_contribution
2913
+
2914
+ # The ID of the event the criterion corresponds to.
2915
+ # Corresponds to the JSON property `eventId`
2916
+ # @return [String]
2917
+ attr_accessor :event_id
2918
+
2919
+ # This is a JSON template for a Quest Criterion Contribution resource.
2920
+ # Corresponds to the JSON property `initialPlayerProgress`
2921
+ # @return [Google::Apis::GamesV1::QuestContribution]
2922
+ attr_accessor :initial_player_progress
2923
+
2924
+ # Uniquely identifies the type of this resource. Value is always the fixed
2925
+ # string games#questCriterion.
2926
+ # Corresponds to the JSON property `kind`
2927
+ # @return [String]
2928
+ attr_accessor :kind
2929
+
2930
+ def initialize(**args)
2931
+ update!(**args)
2932
+ end
2933
+
2934
+ # Update properties of this object
2935
+ def update!(**args)
2936
+ @completion_contribution = args[:completion_contribution] if args.key?(:completion_contribution)
2937
+ @current_contribution = args[:current_contribution] if args.key?(:current_contribution)
2938
+ @event_id = args[:event_id] if args.key?(:event_id)
2939
+ @initial_player_progress = args[:initial_player_progress] if args.key?(:initial_player_progress)
2940
+ @kind = args[:kind] if args.key?(:kind)
2941
+ end
2942
+ end
2943
+
2944
+ # This is a JSON template for a list of quest objects.
2945
+ class ListQuestResponse
2946
+ include Google::Apis::Core::Hashable
2947
+
2948
+ # The quests.
2949
+ # Corresponds to the JSON property `items`
2950
+ # @return [Array<Google::Apis::GamesV1::Quest>]
2951
+ attr_accessor :items
2952
+
2953
+ # Uniquely identifies the type of this resource. Value is always the fixed
2954
+ # string games#questListResponse.
2955
+ # Corresponds to the JSON property `kind`
2956
+ # @return [String]
2957
+ attr_accessor :kind
2958
+
2959
+ # Token corresponding to the next page of results.
2960
+ # Corresponds to the JSON property `nextPageToken`
2961
+ # @return [String]
2962
+ attr_accessor :next_page_token
2963
+
2964
+ def initialize(**args)
2965
+ update!(**args)
2966
+ end
2967
+
2968
+ # Update properties of this object
2969
+ def update!(**args)
2970
+ @items = args[:items] if args.key?(:items)
2971
+ @kind = args[:kind] if args.key?(:kind)
2972
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2973
+ end
2974
+ end
2975
+
2976
+ # This is a JSON template for a Quest Milestone resource.
2977
+ class QuestMilestone
2978
+ include Google::Apis::Core::Hashable
2979
+
2980
+ # The completion reward data of the milestone, represented as a Base64-encoded
2981
+ # string. This is a developer-specified binary blob with size between 0 and 2 KB
2982
+ # before encoding.
2983
+ # Corresponds to the JSON property `completionRewardData`
2984
+ # @return [String]
2985
+ attr_accessor :completion_reward_data
2986
+
2987
+ # The criteria of the milestone.
2988
+ # Corresponds to the JSON property `criteria`
2989
+ # @return [Array<Google::Apis::GamesV1::QuestCriterion>]
2990
+ attr_accessor :criteria
2991
+
2992
+ # The milestone ID.
2993
+ # Corresponds to the JSON property `id`
2994
+ # @return [String]
2995
+ attr_accessor :id
2996
+
2997
+ # Uniquely identifies the type of this resource. Value is always the fixed
2998
+ # string games#questMilestone.
2999
+ # Corresponds to the JSON property `kind`
3000
+ # @return [String]
3001
+ attr_accessor :kind
3002
+
3003
+ # The current state of the milestone.
3004
+ # Possible values are:
3005
+ # - "COMPLETED_NOT_CLAIMED" - The milestone is complete, but has not yet been
3006
+ # claimed.
3007
+ # - "CLAIMED" - The milestone is complete and has been claimed.
3008
+ # - "NOT_COMPLETED" - The milestone has not yet been completed.
3009
+ # - "NOT_STARTED" - The milestone is for a quest that has not yet been accepted.
3010
+ # Corresponds to the JSON property `state`
3011
+ # @return [String]
3012
+ attr_accessor :state
3013
+
3014
+ def initialize(**args)
3015
+ update!(**args)
3016
+ end
3017
+
3018
+ # Update properties of this object
3019
+ def update!(**args)
3020
+ @completion_reward_data = args[:completion_reward_data] if args.key?(:completion_reward_data)
3021
+ @criteria = args[:criteria] if args.key?(:criteria)
3022
+ @id = args[:id] if args.key?(:id)
3023
+ @kind = args[:kind] if args.key?(:kind)
3024
+ @state = args[:state] if args.key?(:state)
3025
+ end
3026
+ end
3027
+
3028
+ # This is a JSON template for the result of checking a revision.
3029
+ class CheckRevisionResponse
3030
+ include Google::Apis::Core::Hashable
3031
+
3032
+ # The version of the API this client revision should use when calling API
3033
+ # methods.
3034
+ # Corresponds to the JSON property `apiVersion`
3035
+ # @return [String]
3036
+ attr_accessor :api_version
3037
+
3038
+ # Uniquely identifies the type of this resource. Value is always the fixed
3039
+ # string games#revisionCheckResponse.
3040
+ # Corresponds to the JSON property `kind`
3041
+ # @return [String]
3042
+ attr_accessor :kind
3043
+
3044
+ # The result of the revision check.
3045
+ # Possible values are:
3046
+ # - "OK" - The revision being used is current.
3047
+ # - "DEPRECATED" - There is currently a newer version available, but the
3048
+ # revision being used still works.
3049
+ # - "INVALID" - The revision being used is not supported in any released version.
3050
+ # Corresponds to the JSON property `revisionStatus`
3051
+ # @return [String]
3052
+ attr_accessor :revision_status
3053
+
3054
+ def initialize(**args)
3055
+ update!(**args)
3056
+ end
3057
+
3058
+ # Update properties of this object
3059
+ def update!(**args)
3060
+ @api_version = args[:api_version] if args.key?(:api_version)
3061
+ @kind = args[:kind] if args.key?(:kind)
3062
+ @revision_status = args[:revision_status] if args.key?(:revision_status)
3063
+ end
3064
+ end
3065
+
3066
+ # This is a JSON template for a room resource object.
3067
+ class Room
3068
+ include Google::Apis::Core::Hashable
3069
+
3070
+ # The ID of the application being played.
3071
+ # Corresponds to the JSON property `applicationId`
3072
+ # @return [String]
3073
+ attr_accessor :application_id
3074
+
3075
+ # This is a JSON template for a room auto-match criteria object.
3076
+ # Corresponds to the JSON property `autoMatchingCriteria`
3077
+ # @return [Google::Apis::GamesV1::RoomAutoMatchingCriteria]
3078
+ attr_accessor :auto_matching_criteria
3079
+
3080
+ # This is a JSON template for status of room automatching that is in progress.
3081
+ # Corresponds to the JSON property `autoMatchingStatus`
3082
+ # @return [Google::Apis::GamesV1::RoomAutoMatchStatus]
3083
+ attr_accessor :auto_matching_status
3084
+
3085
+ # This is a JSON template for room modification metadata.
3086
+ # Corresponds to the JSON property `creationDetails`
3087
+ # @return [Google::Apis::GamesV1::RoomModification]
3088
+ attr_accessor :creation_details
3089
+
3090
+ # This short description is generated by our servers and worded relative to the
3091
+ # player requesting the room. It is intended to be displayed when the room is
3092
+ # shown in a list (that is, an invitation to a room.)
3093
+ # Corresponds to the JSON property `description`
3094
+ # @return [String]
3095
+ attr_accessor :description
3096
+
3097
+ # The ID of the participant that invited the user to the room. Not set if the
3098
+ # user was not invited to the room.
3099
+ # Corresponds to the JSON property `inviterId`
3100
+ # @return [String]
3101
+ attr_accessor :inviter_id
3102
+
3103
+ # Uniquely identifies the type of this resource. Value is always the fixed
3104
+ # string games#room.
3105
+ # Corresponds to the JSON property `kind`
3106
+ # @return [String]
3107
+ attr_accessor :kind
3108
+
3109
+ # This is a JSON template for room modification metadata.
3110
+ # Corresponds to the JSON property `lastUpdateDetails`
3111
+ # @return [Google::Apis::GamesV1::RoomModification]
3112
+ attr_accessor :last_update_details
3113
+
3114
+ # The participants involved in the room, along with their statuses. Includes
3115
+ # participants who have left or declined invitations.
3116
+ # Corresponds to the JSON property `participants`
3117
+ # @return [Array<Google::Apis::GamesV1::RoomParticipant>]
3118
+ attr_accessor :participants
3119
+
3120
+ # Globally unique ID for a room.
3121
+ # Corresponds to the JSON property `roomId`
3122
+ # @return [String]
3123
+ attr_accessor :room_id
3124
+
3125
+ # The version of the room status: an increasing counter, used by the client to
3126
+ # ignore out-of-order updates to room status.
3127
+ # Corresponds to the JSON property `roomStatusVersion`
3128
+ # @return [Fixnum]
3129
+ attr_accessor :room_status_version
3130
+
3131
+ # The status of the room.
3132
+ # Possible values are:
3133
+ # - "ROOM_INVITING" - One or more players have been invited and not responded.
3134
+ # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching.
3135
+ # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (
3136
+ # either before or after auto-matching).
3137
+ # - "ROOM_ACTIVE" - All players have joined and connected to each other.
3138
+ # - "ROOM_DELETED" - The room should no longer be shown on the client. Returned
3139
+ # in sync calls when a player joins a room (as a tombstone), or for rooms where
3140
+ # all joined participants have left.
3141
+ # Corresponds to the JSON property `status`
3142
+ # @return [String]
3143
+ attr_accessor :status
3144
+
3145
+ # The variant / mode of the application being played; can be any integer value,
3146
+ # or left blank.
3147
+ # Corresponds to the JSON property `variant`
3148
+ # @return [Fixnum]
3149
+ attr_accessor :variant
3150
+
3151
+ def initialize(**args)
3152
+ update!(**args)
3153
+ end
3154
+
3155
+ # Update properties of this object
3156
+ def update!(**args)
3157
+ @application_id = args[:application_id] if args.key?(:application_id)
3158
+ @auto_matching_criteria = args[:auto_matching_criteria] if args.key?(:auto_matching_criteria)
3159
+ @auto_matching_status = args[:auto_matching_status] if args.key?(:auto_matching_status)
3160
+ @creation_details = args[:creation_details] if args.key?(:creation_details)
3161
+ @description = args[:description] if args.key?(:description)
3162
+ @inviter_id = args[:inviter_id] if args.key?(:inviter_id)
3163
+ @kind = args[:kind] if args.key?(:kind)
3164
+ @last_update_details = args[:last_update_details] if args.key?(:last_update_details)
3165
+ @participants = args[:participants] if args.key?(:participants)
3166
+ @room_id = args[:room_id] if args.key?(:room_id)
3167
+ @room_status_version = args[:room_status_version] if args.key?(:room_status_version)
3168
+ @status = args[:status] if args.key?(:status)
3169
+ @variant = args[:variant] if args.key?(:variant)
3170
+ end
3171
+ end
3172
+
3173
+ # This is a JSON template for status of room automatching that is in progress.
3174
+ class RoomAutoMatchStatus
3175
+ include Google::Apis::Core::Hashable
3176
+
3177
+ # Uniquely identifies the type of this resource. Value is always the fixed
3178
+ # string games#roomAutoMatchStatus.
3179
+ # Corresponds to the JSON property `kind`
3180
+ # @return [String]
3181
+ attr_accessor :kind
3182
+
3183
+ # An estimate for the amount of time (in seconds) that auto-matching is expected
3184
+ # to take to complete.
3185
+ # Corresponds to the JSON property `waitEstimateSeconds`
3186
+ # @return [Fixnum]
3187
+ attr_accessor :wait_estimate_seconds
3188
+
3189
+ def initialize(**args)
3190
+ update!(**args)
3191
+ end
3192
+
3193
+ # Update properties of this object
3194
+ def update!(**args)
3195
+ @kind = args[:kind] if args.key?(:kind)
3196
+ @wait_estimate_seconds = args[:wait_estimate_seconds] if args.key?(:wait_estimate_seconds)
3197
+ end
3198
+ end
3199
+
3200
+ # This is a JSON template for a room auto-match criteria object.
3201
+ class RoomAutoMatchingCriteria
3202
+ include Google::Apis::Core::Hashable
3203
+
3204
+ # A bitmask indicating when auto-matches are valid. When ANDed with other
3205
+ # exclusive bitmasks, the result must be zero. Can be used to support exclusive
3206
+ # roles within a game.
3207
+ # Corresponds to the JSON property `exclusiveBitmask`
3208
+ # @return [String]
3209
+ attr_accessor :exclusive_bitmask
3210
+
3211
+ # Uniquely identifies the type of this resource. Value is always the fixed
3212
+ # string games#roomAutoMatchingCriteria.
3213
+ # Corresponds to the JSON property `kind`
3214
+ # @return [String]
3215
+ attr_accessor :kind
3216
+
3217
+ # The maximum number of players that should be added to the room by auto-
3218
+ # matching.
3219
+ # Corresponds to the JSON property `maxAutoMatchingPlayers`
3220
+ # @return [Fixnum]
3221
+ attr_accessor :max_auto_matching_players
3222
+
3223
+ # The minimum number of players that should be added to the room by auto-
3224
+ # matching.
3225
+ # Corresponds to the JSON property `minAutoMatchingPlayers`
3226
+ # @return [Fixnum]
3227
+ attr_accessor :min_auto_matching_players
3228
+
3229
+ def initialize(**args)
3230
+ update!(**args)
3231
+ end
3232
+
3233
+ # Update properties of this object
3234
+ def update!(**args)
3235
+ @exclusive_bitmask = args[:exclusive_bitmask] if args.key?(:exclusive_bitmask)
3236
+ @kind = args[:kind] if args.key?(:kind)
3237
+ @max_auto_matching_players = args[:max_auto_matching_players] if args.key?(:max_auto_matching_players)
3238
+ @min_auto_matching_players = args[:min_auto_matching_players] if args.key?(:min_auto_matching_players)
3239
+ end
3240
+ end
3241
+
3242
+ # This is a JSON template for the client address when setting up a room.
3243
+ class RoomClientAddress
3244
+ include Google::Apis::Core::Hashable
3245
+
3246
+ # Uniquely identifies the type of this resource. Value is always the fixed
3247
+ # string games#roomClientAddress.
3248
+ # Corresponds to the JSON property `kind`
3249
+ # @return [String]
3250
+ attr_accessor :kind
3251
+
3252
+ # The XMPP address of the client on the Google Games XMPP network.
3253
+ # Corresponds to the JSON property `xmppAddress`
3254
+ # @return [String]
3255
+ attr_accessor :xmpp_address
3256
+
3257
+ def initialize(**args)
3258
+ update!(**args)
3259
+ end
3260
+
3261
+ # Update properties of this object
3262
+ def update!(**args)
3263
+ @kind = args[:kind] if args.key?(:kind)
3264
+ @xmpp_address = args[:xmpp_address] if args.key?(:xmpp_address)
3265
+ end
3266
+ end
3267
+
3268
+ # This is a JSON template for a room creation request.
3269
+ class CreateRoomRequest
3270
+ include Google::Apis::Core::Hashable
3271
+
3272
+ # This is a JSON template for a room auto-match criteria object.
3273
+ # Corresponds to the JSON property `autoMatchingCriteria`
3274
+ # @return [Google::Apis::GamesV1::RoomAutoMatchingCriteria]
3275
+ attr_accessor :auto_matching_criteria
3276
+
3277
+ # The capabilities that this client supports for realtime communication.
3278
+ # Corresponds to the JSON property `capabilities`
3279
+ # @return [Array<String>]
3280
+ attr_accessor :capabilities
3281
+
3282
+ # This is a JSON template for the client address when setting up a room.
3283
+ # Corresponds to the JSON property `clientAddress`
3284
+ # @return [Google::Apis::GamesV1::RoomClientAddress]
3285
+ attr_accessor :client_address
3286
+
3287
+ # The player IDs to invite to the room.
3288
+ # Corresponds to the JSON property `invitedPlayerIds`
3289
+ # @return [Array<String>]
3290
+ attr_accessor :invited_player_ids
3291
+
3292
+ # Uniquely identifies the type of this resource. Value is always the fixed
3293
+ # string games#roomCreateRequest.
3294
+ # Corresponds to the JSON property `kind`
3295
+ # @return [String]
3296
+ attr_accessor :kind
3297
+
3298
+ # This is a JSON template for network diagnostics reported for a client.
3299
+ # Corresponds to the JSON property `networkDiagnostics`
3300
+ # @return [Google::Apis::GamesV1::NetworkDiagnostics]
3301
+ attr_accessor :network_diagnostics
3302
+
3303
+ # A randomly generated numeric ID. This number is used at the server to ensure
3304
+ # that the request is handled correctly across retries.
3305
+ # Corresponds to the JSON property `requestId`
3306
+ # @return [String]
3307
+ attr_accessor :request_id
3308
+
3309
+ # The variant / mode of the application to be played. This can be any integer
3310
+ # value, or left blank. You should use a small number of variants to keep the
3311
+ # auto-matching pool as large as possible.
3312
+ # Corresponds to the JSON property `variant`
3313
+ # @return [Fixnum]
3314
+ attr_accessor :variant
3315
+
3316
+ def initialize(**args)
3317
+ update!(**args)
3318
+ end
3319
+
3320
+ # Update properties of this object
3321
+ def update!(**args)
3322
+ @auto_matching_criteria = args[:auto_matching_criteria] if args.key?(:auto_matching_criteria)
3323
+ @capabilities = args[:capabilities] if args.key?(:capabilities)
3324
+ @client_address = args[:client_address] if args.key?(:client_address)
3325
+ @invited_player_ids = args[:invited_player_ids] if args.key?(:invited_player_ids)
3326
+ @kind = args[:kind] if args.key?(:kind)
3327
+ @network_diagnostics = args[:network_diagnostics] if args.key?(:network_diagnostics)
3328
+ @request_id = args[:request_id] if args.key?(:request_id)
3329
+ @variant = args[:variant] if args.key?(:variant)
3330
+ end
3331
+ end
3332
+
3333
+ # This is a JSON template for a join room request.
3334
+ class JoinRoomRequest
3335
+ include Google::Apis::Core::Hashable
3336
+
3337
+ # The capabilities that this client supports for realtime communication.
3338
+ # Corresponds to the JSON property `capabilities`
3339
+ # @return [Array<String>]
3340
+ attr_accessor :capabilities
3341
+
3342
+ # This is a JSON template for the client address when setting up a room.
3343
+ # Corresponds to the JSON property `clientAddress`
3344
+ # @return [Google::Apis::GamesV1::RoomClientAddress]
3345
+ attr_accessor :client_address
3346
+
3347
+ # Uniquely identifies the type of this resource. Value is always the fixed
3348
+ # string games#roomJoinRequest.
3349
+ # Corresponds to the JSON property `kind`
3350
+ # @return [String]
3351
+ attr_accessor :kind
3352
+
3353
+ # This is a JSON template for network diagnostics reported for a client.
3354
+ # Corresponds to the JSON property `networkDiagnostics`
3355
+ # @return [Google::Apis::GamesV1::NetworkDiagnostics]
3356
+ attr_accessor :network_diagnostics
3357
+
3358
+ def initialize(**args)
3359
+ update!(**args)
3360
+ end
3361
+
3362
+ # Update properties of this object
3363
+ def update!(**args)
3364
+ @capabilities = args[:capabilities] if args.key?(:capabilities)
3365
+ @client_address = args[:client_address] if args.key?(:client_address)
3366
+ @kind = args[:kind] if args.key?(:kind)
3367
+ @network_diagnostics = args[:network_diagnostics] if args.key?(:network_diagnostics)
3368
+ end
3369
+ end
3370
+
3371
+ # This is a JSON template for room leave diagnostics.
3372
+ class RoomLeaveDiagnostics
3373
+ include Google::Apis::Core::Hashable
3374
+
3375
+ # Android network subtype. http://developer.android.com/reference/android/net/
3376
+ # NetworkInfo.html#getSubtype()
3377
+ # Corresponds to the JSON property `androidNetworkSubtype`
3378
+ # @return [Fixnum]
3379
+ attr_accessor :android_network_subtype
3380
+
3381
+ # Android network type. http://developer.android.com/reference/android/net/
3382
+ # NetworkInfo.html#getType()
3383
+ # Corresponds to the JSON property `androidNetworkType`
3384
+ # @return [Fixnum]
3385
+ attr_accessor :android_network_type
3386
+
3387
+ # iOS network type as defined in Reachability.h.
3388
+ # Corresponds to the JSON property `iosNetworkType`
3389
+ # @return [Fixnum]
3390
+ attr_accessor :ios_network_type
3391
+
3392
+ # Uniquely identifies the type of this resource. Value is always the fixed
3393
+ # string games#roomLeaveDiagnostics.
3394
+ # Corresponds to the JSON property `kind`
3395
+ # @return [String]
3396
+ attr_accessor :kind
3397
+
3398
+ # The MCC+MNC code for the client's network connection. On Android: http://
3399
+ # developer.android.com/reference/android/telephony/TelephonyManager.html#
3400
+ # getNetworkOperator() On iOS, see: https://developer.apple.com/library/ios/
3401
+ # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html
3402
+ # Corresponds to the JSON property `networkOperatorCode`
3403
+ # @return [String]
3404
+ attr_accessor :network_operator_code
3405
+
3406
+ # The name of the carrier of the client's network connection. On Android: http://
3407
+ # developer.android.com/reference/android/telephony/TelephonyManager.html#
3408
+ # getNetworkOperatorName() On iOS: https://developer.apple.com/library/ios/
3409
+ # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html#/
3410
+ # /apple_ref/occ/instp/CTCarrier/carrierName
3411
+ # Corresponds to the JSON property `networkOperatorName`
3412
+ # @return [String]
3413
+ attr_accessor :network_operator_name
3414
+
3415
+ # Diagnostics about all peer sessions.
3416
+ # Corresponds to the JSON property `peerSession`
3417
+ # @return [Array<Google::Apis::GamesV1::PeerSessionDiagnostics>]
3418
+ attr_accessor :peer_session
3419
+
3420
+ # Whether or not sockets were used.
3421
+ # Corresponds to the JSON property `socketsUsed`
3422
+ # @return [Boolean]
3423
+ attr_accessor :sockets_used
3424
+ alias_method :sockets_used?, :sockets_used
3425
+
3426
+ def initialize(**args)
3427
+ update!(**args)
3428
+ end
3429
+
3430
+ # Update properties of this object
3431
+ def update!(**args)
3432
+ @android_network_subtype = args[:android_network_subtype] if args.key?(:android_network_subtype)
3433
+ @android_network_type = args[:android_network_type] if args.key?(:android_network_type)
3434
+ @ios_network_type = args[:ios_network_type] if args.key?(:ios_network_type)
3435
+ @kind = args[:kind] if args.key?(:kind)
3436
+ @network_operator_code = args[:network_operator_code] if args.key?(:network_operator_code)
3437
+ @network_operator_name = args[:network_operator_name] if args.key?(:network_operator_name)
3438
+ @peer_session = args[:peer_session] if args.key?(:peer_session)
3439
+ @sockets_used = args[:sockets_used] if args.key?(:sockets_used)
3440
+ end
3441
+ end
3442
+
3443
+ # This is a JSON template for a leave room request.
3444
+ class LeaveRoomRequest
3445
+ include Google::Apis::Core::Hashable
3446
+
3447
+ # Uniquely identifies the type of this resource. Value is always the fixed
3448
+ # string games#roomLeaveRequest.
3449
+ # Corresponds to the JSON property `kind`
3450
+ # @return [String]
3451
+ attr_accessor :kind
3452
+
3453
+ # This is a JSON template for room leave diagnostics.
3454
+ # Corresponds to the JSON property `leaveDiagnostics`
3455
+ # @return [Google::Apis::GamesV1::RoomLeaveDiagnostics]
3456
+ attr_accessor :leave_diagnostics
3457
+
3458
+ # Reason for leaving the match.
3459
+ # Possible values are:
3460
+ # - "PLAYER_LEFT" - The player chose to leave the room..
3461
+ # - "GAME_LEFT" - The game chose to remove the player from the room.
3462
+ # - "REALTIME_ABANDONED" - The player switched to another application and
3463
+ # abandoned the room.
3464
+ # - "REALTIME_PEER_CONNECTION_FAILURE" - The client was unable to establish a
3465
+ # connection to other peer(s).
3466
+ # - "REALTIME_SERVER_CONNECTION_FAILURE" - The client was unable to communicate
3467
+ # with the server.
3468
+ # - "REALTIME_SERVER_ERROR" - The client received an error response when it
3469
+ # tried to communicate with the server.
3470
+ # - "REALTIME_TIMEOUT" - The client timed out while waiting for a room.
3471
+ # - "REALTIME_CLIENT_DISCONNECTING" - The client disconnects without first
3472
+ # calling Leave.
3473
+ # - "REALTIME_SIGN_OUT" - The user signed out of G+ while in the room.
3474
+ # - "REALTIME_GAME_CRASHED" - The game crashed.
3475
+ # - "REALTIME_ROOM_SERVICE_CRASHED" - RoomAndroidService crashed.
3476
+ # - "REALTIME_DIFFERENT_CLIENT_ROOM_OPERATION" - Another client is trying to
3477
+ # enter a room.
3478
+ # - "REALTIME_SAME_CLIENT_ROOM_OPERATION" - The same client is trying to enter a
3479
+ # new room.
3480
+ # Corresponds to the JSON property `reason`
3481
+ # @return [String]
3482
+ attr_accessor :reason
3483
+
3484
+ def initialize(**args)
3485
+ update!(**args)
3486
+ end
3487
+
3488
+ # Update properties of this object
3489
+ def update!(**args)
3490
+ @kind = args[:kind] if args.key?(:kind)
3491
+ @leave_diagnostics = args[:leave_diagnostics] if args.key?(:leave_diagnostics)
3492
+ @reason = args[:reason] if args.key?(:reason)
3493
+ end
3494
+ end
3495
+
3496
+ # This is a JSON template for a list of rooms.
3497
+ class RoomList
3498
+ include Google::Apis::Core::Hashable
3499
+
3500
+ # The rooms.
3501
+ # Corresponds to the JSON property `items`
3502
+ # @return [Array<Google::Apis::GamesV1::Room>]
3503
+ attr_accessor :items
3504
+
3505
+ # Uniquely identifies the type of this resource. Value is always the fixed
3506
+ # string games#roomList.
3507
+ # Corresponds to the JSON property `kind`
3508
+ # @return [String]
3509
+ attr_accessor :kind
3510
+
3511
+ # The pagination token for the next page of results.
3512
+ # Corresponds to the JSON property `nextPageToken`
3513
+ # @return [String]
3514
+ attr_accessor :next_page_token
3515
+
3516
+ def initialize(**args)
3517
+ update!(**args)
3518
+ end
3519
+
3520
+ # Update properties of this object
3521
+ def update!(**args)
3522
+ @items = args[:items] if args.key?(:items)
3523
+ @kind = args[:kind] if args.key?(:kind)
3524
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
3525
+ end
3526
+ end
3527
+
3528
+ # This is a JSON template for room modification metadata.
3529
+ class RoomModification
3530
+ include Google::Apis::Core::Hashable
3531
+
3532
+ # Uniquely identifies the type of this resource. Value is always the fixed
3533
+ # string games#roomModification.
3534
+ # Corresponds to the JSON property `kind`
3535
+ # @return [String]
3536
+ attr_accessor :kind
3537
+
3538
+ # The timestamp at which they modified the room, in milliseconds since the epoch
3539
+ # in UTC.
3540
+ # Corresponds to the JSON property `modifiedTimestampMillis`
3541
+ # @return [String]
3542
+ attr_accessor :modified_timestamp_millis
3543
+
3544
+ # The ID of the participant that modified the room.
3545
+ # Corresponds to the JSON property `participantId`
3546
+ # @return [String]
3547
+ attr_accessor :participant_id
3548
+
3549
+ def initialize(**args)
3550
+ update!(**args)
3551
+ end
3552
+
3553
+ # Update properties of this object
3554
+ def update!(**args)
3555
+ @kind = args[:kind] if args.key?(:kind)
3556
+ @modified_timestamp_millis = args[:modified_timestamp_millis] if args.key?(:modified_timestamp_millis)
3557
+ @participant_id = args[:participant_id] if args.key?(:participant_id)
3558
+ end
3559
+ end
3560
+
3561
+ # This is a JSON template for an update on the status of a peer in a room.
3562
+ class RoomP2PStatus
3563
+ include Google::Apis::Core::Hashable
3564
+
3565
+ # The amount of time in milliseconds it took to establish connections with this
3566
+ # peer.
3567
+ # Corresponds to the JSON property `connectionSetupLatencyMillis`
3568
+ # @return [Fixnum]
3569
+ attr_accessor :connection_setup_latency_millis
3570
+
3571
+ # The error code in event of a failure.
3572
+ # Possible values are:
3573
+ # - "P2P_FAILED" - The client failed to establish a P2P connection with the peer.
3574
+ #
3575
+ # - "PRESENCE_FAILED" - The client failed to register to receive P2P connections.
3576
+ #
3577
+ # - "RELAY_SERVER_FAILED" - The client received an error when trying to use the
3578
+ # relay server to establish a P2P connection with the peer.
3579
+ # Corresponds to the JSON property `error`
3580
+ # @return [String]
3581
+ attr_accessor :error
3582
+
3583
+ # More detailed diagnostic message returned in event of a failure.
3584
+ # Corresponds to the JSON property `error_reason`
3585
+ # @return [String]
3586
+ attr_accessor :error_reason
3587
+
3588
+ # Uniquely identifies the type of this resource. Value is always the fixed
3589
+ # string games#roomP2PStatus.
3590
+ # Corresponds to the JSON property `kind`
3591
+ # @return [String]
3592
+ attr_accessor :kind
3593
+
3594
+ # The ID of the participant.
3595
+ # Corresponds to the JSON property `participantId`
3596
+ # @return [String]
3597
+ attr_accessor :participant_id
3598
+
3599
+ # The status of the peer in the room.
3600
+ # Possible values are:
3601
+ # - "CONNECTION_ESTABLISHED" - The client established a P2P connection with the
3602
+ # peer.
3603
+ # - "CONNECTION_FAILED" - The client failed to establish directed presence with
3604
+ # the peer.
3605
+ # Corresponds to the JSON property `status`
3606
+ # @return [String]
3607
+ attr_accessor :status
3608
+
3609
+ # The amount of time in milliseconds it took to send packets back and forth on
3610
+ # the unreliable channel with this peer.
3611
+ # Corresponds to the JSON property `unreliableRoundtripLatencyMillis`
3612
+ # @return [Fixnum]
3613
+ attr_accessor :unreliable_roundtrip_latency_millis
3614
+
3615
+ def initialize(**args)
3616
+ update!(**args)
3617
+ end
3618
+
3619
+ # Update properties of this object
3620
+ def update!(**args)
3621
+ @connection_setup_latency_millis = args[:connection_setup_latency_millis] if args.key?(:connection_setup_latency_millis)
3622
+ @error = args[:error] if args.key?(:error)
3623
+ @error_reason = args[:error_reason] if args.key?(:error_reason)
3624
+ @kind = args[:kind] if args.key?(:kind)
3625
+ @participant_id = args[:participant_id] if args.key?(:participant_id)
3626
+ @status = args[:status] if args.key?(:status)
3627
+ @unreliable_roundtrip_latency_millis = args[:unreliable_roundtrip_latency_millis] if args.key?(:unreliable_roundtrip_latency_millis)
3628
+ end
3629
+ end
3630
+
3631
+ # This is a JSON template for an update on the status of peers in a room.
3632
+ class RoomP2PStatuses
3633
+ include Google::Apis::Core::Hashable
3634
+
3635
+ # Uniquely identifies the type of this resource. Value is always the fixed
3636
+ # string games#roomP2PStatuses.
3637
+ # Corresponds to the JSON property `kind`
3638
+ # @return [String]
3639
+ attr_accessor :kind
3640
+
3641
+ # The updates for the peers.
3642
+ # Corresponds to the JSON property `updates`
3643
+ # @return [Array<Google::Apis::GamesV1::RoomP2PStatus>]
3644
+ attr_accessor :updates
3645
+
3646
+ def initialize(**args)
3647
+ update!(**args)
3648
+ end
3649
+
3650
+ # Update properties of this object
3651
+ def update!(**args)
3652
+ @kind = args[:kind] if args.key?(:kind)
3653
+ @updates = args[:updates] if args.key?(:updates)
3654
+ end
3655
+ end
3656
+
3657
+ # This is a JSON template for a participant in a room.
3658
+ class RoomParticipant
3659
+ include Google::Apis::Core::Hashable
3660
+
3661
+ # True if this participant was auto-matched with the requesting player.
3662
+ # Corresponds to the JSON property `autoMatched`
3663
+ # @return [Boolean]
3664
+ attr_accessor :auto_matched
3665
+ alias_method :auto_matched?, :auto_matched
3666
+
3667
+ # This is a JSON template for an anonymous player
3668
+ # Corresponds to the JSON property `autoMatchedPlayer`
3669
+ # @return [Google::Apis::GamesV1::AnonymousPlayer]
3670
+ attr_accessor :auto_matched_player
3671
+
3672
+ # The capabilities which can be used when communicating with this participant.
3673
+ # Corresponds to the JSON property `capabilities`
3674
+ # @return [Array<String>]
3675
+ attr_accessor :capabilities
3676
+
3677
+ # This is a JSON template for the client address when setting up a room.
3678
+ # Corresponds to the JSON property `clientAddress`
3679
+ # @return [Google::Apis::GamesV1::RoomClientAddress]
3680
+ attr_accessor :client_address
3681
+
3682
+ # True if this participant is in the fully connected set of peers in the room.
3683
+ # Corresponds to the JSON property `connected`
3684
+ # @return [Boolean]
3685
+ attr_accessor :connected
3686
+ alias_method :connected?, :connected
3687
+
3688
+ # An identifier for the participant in the scope of the room. Cannot be used to
3689
+ # identify a player across rooms or in other contexts.
3690
+ # Corresponds to the JSON property `id`
3691
+ # @return [String]
3692
+ attr_accessor :id
3693
+
3694
+ # Uniquely identifies the type of this resource. Value is always the fixed
3695
+ # string games#roomParticipant.
3696
+ # Corresponds to the JSON property `kind`
3697
+ # @return [String]
3698
+ attr_accessor :kind
3699
+
3700
+ # The reason the participant left the room; populated if the participant status
3701
+ # is PARTICIPANT_LEFT.
3702
+ # Possible values are:
3703
+ # - "PLAYER_LEFT" - The player explicitly chose to leave the room.
3704
+ # - "GAME_LEFT" - The game chose to remove the player from the room.
3705
+ # - "ABANDONED" - The player switched to another application and abandoned the
3706
+ # room.
3707
+ # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a
3708
+ # connection to other peer(s) in the room.
3709
+ # - "SERVER_ERROR" - The client received an error response when it tried to
3710
+ # communicate with the server.
3711
+ # - "TIMEOUT" - The client timed out while waiting for players to join and
3712
+ # connect.
3713
+ # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly.
3714
+ # Corresponds to the JSON property `leaveReason`
3715
+ # @return [String]
3716
+ attr_accessor :leave_reason
3717
+
3718
+ # This is a JSON template for a Player resource.
3719
+ # Corresponds to the JSON property `player`
3720
+ # @return [Google::Apis::GamesV1::Player]
3721
+ attr_accessor :player
3722
+
3723
+ # The status of the participant with respect to the room.
3724
+ # Possible values are:
3725
+ # - "PARTICIPANT_INVITED" - The participant has been invited to join the room,
3726
+ # but has not yet responded.
3727
+ # - "PARTICIPANT_JOINED" - The participant has joined the room (either after
3728
+ # creating it or accepting an invitation.)
3729
+ # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the
3730
+ # room.
3731
+ # - "PARTICIPANT_LEFT" - The participant joined the room and then left it.
3732
+ # Corresponds to the JSON property `status`
3733
+ # @return [String]
3734
+ attr_accessor :status
3735
+
3736
+ def initialize(**args)
3737
+ update!(**args)
3738
+ end
3739
+
3740
+ # Update properties of this object
3741
+ def update!(**args)
3742
+ @auto_matched = args[:auto_matched] if args.key?(:auto_matched)
3743
+ @auto_matched_player = args[:auto_matched_player] if args.key?(:auto_matched_player)
3744
+ @capabilities = args[:capabilities] if args.key?(:capabilities)
3745
+ @client_address = args[:client_address] if args.key?(:client_address)
3746
+ @connected = args[:connected] if args.key?(:connected)
3747
+ @id = args[:id] if args.key?(:id)
3748
+ @kind = args[:kind] if args.key?(:kind)
3749
+ @leave_reason = args[:leave_reason] if args.key?(:leave_reason)
3750
+ @player = args[:player] if args.key?(:player)
3751
+ @status = args[:status] if args.key?(:status)
3752
+ end
3753
+ end
3754
+
3755
+ # This is a JSON template for the status of a room that the player has joined.
3756
+ class RoomStatus
3757
+ include Google::Apis::Core::Hashable
3758
+
3759
+ # This is a JSON template for status of room automatching that is in progress.
3760
+ # Corresponds to the JSON property `autoMatchingStatus`
3761
+ # @return [Google::Apis::GamesV1::RoomAutoMatchStatus]
3762
+ attr_accessor :auto_matching_status
3763
+
3764
+ # Uniquely identifies the type of this resource. Value is always the fixed
3765
+ # string games#roomStatus.
3766
+ # Corresponds to the JSON property `kind`
3767
+ # @return [String]
3768
+ attr_accessor :kind
3769
+
3770
+ # The participants involved in the room, along with their statuses. Includes
3771
+ # participants who have left or declined invitations.
3772
+ # Corresponds to the JSON property `participants`
3773
+ # @return [Array<Google::Apis::GamesV1::RoomParticipant>]
3774
+ attr_accessor :participants
3775
+
3776
+ # Globally unique ID for a room.
3777
+ # Corresponds to the JSON property `roomId`
3778
+ # @return [String]
3779
+ attr_accessor :room_id
3780
+
3781
+ # The status of the room.
3782
+ # Possible values are:
3783
+ # - "ROOM_INVITING" - One or more players have been invited and not responded.
3784
+ # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching.
3785
+ # - "ROOM_CONNECTING" - Players have joined are connecting to each other (either
3786
+ # before or after auto-matching).
3787
+ # - "ROOM_ACTIVE" - All players have joined and connected to each other.
3788
+ # - "ROOM_DELETED" - All joined players have left.
3789
+ # Corresponds to the JSON property `status`
3790
+ # @return [String]
3791
+ attr_accessor :status
3792
+
3793
+ # The version of the status for the room: an increasing counter, used by the
3794
+ # client to ignore out-of-order updates to room status.
3795
+ # Corresponds to the JSON property `statusVersion`
3796
+ # @return [Fixnum]
3797
+ attr_accessor :status_version
3798
+
3799
+ def initialize(**args)
3800
+ update!(**args)
3801
+ end
3802
+
3803
+ # Update properties of this object
3804
+ def update!(**args)
3805
+ @auto_matching_status = args[:auto_matching_status] if args.key?(:auto_matching_status)
3806
+ @kind = args[:kind] if args.key?(:kind)
3807
+ @participants = args[:participants] if args.key?(:participants)
3808
+ @room_id = args[:room_id] if args.key?(:room_id)
3809
+ @status = args[:status] if args.key?(:status)
3810
+ @status_version = args[:status_version] if args.key?(:status_version)
3811
+ end
3812
+ end
3813
+
3814
+ # This is a JSON template for a request to submit a score to leaderboards.
3815
+ class ScoreSubmission
3816
+ include Google::Apis::Core::Hashable
3817
+
3818
+ # Uniquely identifies the type of this resource. Value is always the fixed
3819
+ # string games#scoreSubmission.
3820
+ # Corresponds to the JSON property `kind`
3821
+ # @return [String]
3822
+ attr_accessor :kind
3823
+
3824
+ # The leaderboard this score is being submitted to.
3825
+ # Corresponds to the JSON property `leaderboardId`
3826
+ # @return [String]
3827
+ attr_accessor :leaderboard_id
3828
+
3829
+ # The new score being submitted.
3830
+ # Corresponds to the JSON property `score`
3831
+ # @return [String]
3832
+ attr_accessor :score
3833
+
3834
+ # Additional information about this score. Values will contain no more than 64
3835
+ # URI-safe characters as defined by section 2.3 of RFC 3986.
3836
+ # Corresponds to the JSON property `scoreTag`
3837
+ # @return [String]
3838
+ attr_accessor :score_tag
3839
+
3840
+ # Signature Values will contain URI-safe characters as defined by section 2.3 of
3841
+ # RFC 3986.
3842
+ # Corresponds to the JSON property `signature`
3843
+ # @return [String]
3844
+ attr_accessor :signature
3845
+
3846
+ def initialize(**args)
3847
+ update!(**args)
3848
+ end
3849
+
3850
+ # Update properties of this object
3851
+ def update!(**args)
3852
+ @kind = args[:kind] if args.key?(:kind)
3853
+ @leaderboard_id = args[:leaderboard_id] if args.key?(:leaderboard_id)
3854
+ @score = args[:score] if args.key?(:score)
3855
+ @score_tag = args[:score_tag] if args.key?(:score_tag)
3856
+ @signature = args[:signature] if args.key?(:signature)
3857
+ end
3858
+ end
3859
+
3860
+ # This is a JSON template for an snapshot object.
3861
+ class Snapshot
3862
+ include Google::Apis::Core::Hashable
3863
+
3864
+ # This is a JSON template for an image of a snapshot.
3865
+ # Corresponds to the JSON property `coverImage`
3866
+ # @return [Google::Apis::GamesV1::SnapshotImage]
3867
+ attr_accessor :cover_image
3868
+
3869
+ # The description of this snapshot.
3870
+ # Corresponds to the JSON property `description`
3871
+ # @return [String]
3872
+ attr_accessor :description
3873
+
3874
+ # The ID of the file underlying this snapshot in the Drive API. Only present if
3875
+ # the snapshot is a view on a Drive file and the file is owned by the caller.
3876
+ # Corresponds to the JSON property `driveId`
3877
+ # @return [String]
3878
+ attr_accessor :drive_id
3879
+
3880
+ # The duration associated with this snapshot, in millis.
3881
+ # Corresponds to the JSON property `durationMillis`
3882
+ # @return [String]
3883
+ attr_accessor :duration_millis
3884
+
3885
+ # The ID of the snapshot.
3886
+ # Corresponds to the JSON property `id`
3887
+ # @return [String]
3888
+ attr_accessor :id
3889
+
3890
+ # Uniquely identifies the type of this resource. Value is always the fixed
3891
+ # string games#snapshot.
3892
+ # Corresponds to the JSON property `kind`
3893
+ # @return [String]
3894
+ attr_accessor :kind
3895
+
3896
+ # The timestamp (in millis since Unix epoch) of the last modification to this
3897
+ # snapshot.
3898
+ # Corresponds to the JSON property `lastModifiedMillis`
3899
+ # @return [String]
3900
+ attr_accessor :last_modified_millis
3901
+
3902
+ # The progress value (64-bit integer set by developer) associated with this
3903
+ # snapshot.
3904
+ # Corresponds to the JSON property `progressValue`
3905
+ # @return [String]
3906
+ attr_accessor :progress_value
3907
+
3908
+ # The title of this snapshot.
3909
+ # Corresponds to the JSON property `title`
3910
+ # @return [String]
3911
+ attr_accessor :title
3912
+
3913
+ # The type of this snapshot.
3914
+ # Possible values are:
3915
+ # - "SAVE_GAME" - A snapshot representing a save game.
3916
+ # Corresponds to the JSON property `type`
3917
+ # @return [String]
3918
+ attr_accessor :type
3919
+
3920
+ # The unique name provided when the snapshot was created.
3921
+ # Corresponds to the JSON property `uniqueName`
3922
+ # @return [String]
3923
+ attr_accessor :unique_name
3924
+
3925
+ def initialize(**args)
3926
+ update!(**args)
3927
+ end
3928
+
3929
+ # Update properties of this object
3930
+ def update!(**args)
3931
+ @cover_image = args[:cover_image] if args.key?(:cover_image)
3932
+ @description = args[:description] if args.key?(:description)
3933
+ @drive_id = args[:drive_id] if args.key?(:drive_id)
3934
+ @duration_millis = args[:duration_millis] if args.key?(:duration_millis)
3935
+ @id = args[:id] if args.key?(:id)
3936
+ @kind = args[:kind] if args.key?(:kind)
3937
+ @last_modified_millis = args[:last_modified_millis] if args.key?(:last_modified_millis)
3938
+ @progress_value = args[:progress_value] if args.key?(:progress_value)
3939
+ @title = args[:title] if args.key?(:title)
3940
+ @type = args[:type] if args.key?(:type)
3941
+ @unique_name = args[:unique_name] if args.key?(:unique_name)
3942
+ end
3943
+ end
3944
+
3945
+ # This is a JSON template for an image of a snapshot.
3946
+ class SnapshotImage
3947
+ include Google::Apis::Core::Hashable
3948
+
3949
+ # The height of the image.
3950
+ # Corresponds to the JSON property `height`
3951
+ # @return [Fixnum]
3952
+ attr_accessor :height
3953
+
3954
+ # Uniquely identifies the type of this resource. Value is always the fixed
3955
+ # string games#snapshotImage.
3956
+ # Corresponds to the JSON property `kind`
3957
+ # @return [String]
3958
+ attr_accessor :kind
3959
+
3960
+ # The MIME type of the image.
3961
+ # Corresponds to the JSON property `mime_type`
3962
+ # @return [String]
3963
+ attr_accessor :mime_type
3964
+
3965
+ # The URL of the image. This URL may be invalidated at any time and should not
3966
+ # be cached.
3967
+ # Corresponds to the JSON property `url`
3968
+ # @return [String]
3969
+ attr_accessor :url
3970
+
3971
+ # The width of the image.
3972
+ # Corresponds to the JSON property `width`
3973
+ # @return [Fixnum]
3974
+ attr_accessor :width
3975
+
3976
+ def initialize(**args)
3977
+ update!(**args)
3978
+ end
3979
+
3980
+ # Update properties of this object
3981
+ def update!(**args)
3982
+ @height = args[:height] if args.key?(:height)
3983
+ @kind = args[:kind] if args.key?(:kind)
3984
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
3985
+ @url = args[:url] if args.key?(:url)
3986
+ @width = args[:width] if args.key?(:width)
3987
+ end
3988
+ end
3989
+
3990
+ # This is a JSON template for a list of snapshot objects.
3991
+ class ListSnapshotResponse
3992
+ include Google::Apis::Core::Hashable
3993
+
3994
+ # The snapshots.
3995
+ # Corresponds to the JSON property `items`
3996
+ # @return [Array<Google::Apis::GamesV1::Snapshot>]
3997
+ attr_accessor :items
3998
+
3999
+ # Uniquely identifies the type of this resource. Value is always the fixed
4000
+ # string games#snapshotListResponse.
4001
+ # Corresponds to the JSON property `kind`
4002
+ # @return [String]
4003
+ attr_accessor :kind
4004
+
4005
+ # Token corresponding to the next page of results. If there are no more results,
4006
+ # the token is omitted.
4007
+ # Corresponds to the JSON property `nextPageToken`
4008
+ # @return [String]
4009
+ attr_accessor :next_page_token
4010
+
4011
+ def initialize(**args)
4012
+ update!(**args)
4013
+ end
4014
+
4015
+ # Update properties of this object
4016
+ def update!(**args)
4017
+ @items = args[:items] if args.key?(:items)
4018
+ @kind = args[:kind] if args.key?(:kind)
4019
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
4020
+ end
4021
+ end
4022
+
4023
+ # This is a JSON template for an turn-based auto-match criteria object.
4024
+ class TurnBasedAutoMatchingCriteria
4025
+ include Google::Apis::Core::Hashable
4026
+
4027
+ # A bitmask indicating when auto-matches are valid. When ANDed with other
4028
+ # exclusive bitmasks, the result must be zero. Can be used to support exclusive
4029
+ # roles within a game.
4030
+ # Corresponds to the JSON property `exclusiveBitmask`
4031
+ # @return [String]
4032
+ attr_accessor :exclusive_bitmask
4033
+
4034
+ # Uniquely identifies the type of this resource. Value is always the fixed
4035
+ # string games#turnBasedAutoMatchingCriteria.
4036
+ # Corresponds to the JSON property `kind`
4037
+ # @return [String]
4038
+ attr_accessor :kind
4039
+
4040
+ # The maximum number of players that should be added to the match by auto-
4041
+ # matching.
4042
+ # Corresponds to the JSON property `maxAutoMatchingPlayers`
4043
+ # @return [Fixnum]
4044
+ attr_accessor :max_auto_matching_players
4045
+
4046
+ # The minimum number of players that should be added to the match by auto-
4047
+ # matching.
4048
+ # Corresponds to the JSON property `minAutoMatchingPlayers`
4049
+ # @return [Fixnum]
4050
+ attr_accessor :min_auto_matching_players
4051
+
4052
+ def initialize(**args)
4053
+ update!(**args)
4054
+ end
4055
+
4056
+ # Update properties of this object
4057
+ def update!(**args)
4058
+ @exclusive_bitmask = args[:exclusive_bitmask] if args.key?(:exclusive_bitmask)
4059
+ @kind = args[:kind] if args.key?(:kind)
4060
+ @max_auto_matching_players = args[:max_auto_matching_players] if args.key?(:max_auto_matching_players)
4061
+ @min_auto_matching_players = args[:min_auto_matching_players] if args.key?(:min_auto_matching_players)
4062
+ end
4063
+ end
4064
+
4065
+ # This is a JSON template for a turn-based match resource object.
4066
+ class TurnBasedMatch
4067
+ include Google::Apis::Core::Hashable
4068
+
4069
+ # The ID of the application being played.
4070
+ # Corresponds to the JSON property `applicationId`
4071
+ # @return [String]
4072
+ attr_accessor :application_id
4073
+
4074
+ # This is a JSON template for an turn-based auto-match criteria object.
4075
+ # Corresponds to the JSON property `autoMatchingCriteria`
4076
+ # @return [Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria]
4077
+ attr_accessor :auto_matching_criteria
4078
+
4079
+ # This is a JSON template for turn-based match modification metadata.
4080
+ # Corresponds to the JSON property `creationDetails`
4081
+ # @return [Google::Apis::GamesV1::TurnBasedMatchModification]
4082
+ attr_accessor :creation_details
4083
+
4084
+ # This is a JSON template for a turn-based match data object.
4085
+ # Corresponds to the JSON property `data`
4086
+ # @return [Google::Apis::GamesV1::TurnBasedMatchData]
4087
+ attr_accessor :data
4088
+
4089
+ # This short description is generated by our servers based on turn state and is
4090
+ # localized and worded relative to the player requesting the match. It is
4091
+ # intended to be displayed when the match is shown in a list.
4092
+ # Corresponds to the JSON property `description`
4093
+ # @return [String]
4094
+ attr_accessor :description
4095
+
4096
+ # The ID of the participant that invited the user to the match. Not set if the
4097
+ # user was not invited to the match.
4098
+ # Corresponds to the JSON property `inviterId`
4099
+ # @return [String]
4100
+ attr_accessor :inviter_id
4101
+
4102
+ # Uniquely identifies the type of this resource. Value is always the fixed
4103
+ # string games#turnBasedMatch.
4104
+ # Corresponds to the JSON property `kind`
4105
+ # @return [String]
4106
+ attr_accessor :kind
4107
+
4108
+ # This is a JSON template for turn-based match modification metadata.
4109
+ # Corresponds to the JSON property `lastUpdateDetails`
4110
+ # @return [Google::Apis::GamesV1::TurnBasedMatchModification]
4111
+ attr_accessor :last_update_details
4112
+
4113
+ # Globally unique ID for a turn-based match.
4114
+ # Corresponds to the JSON property `matchId`
4115
+ # @return [String]
4116
+ attr_accessor :match_id
4117
+
4118
+ # The number of the match in a chain of rematches. Will be set to 1 for the
4119
+ # first match and incremented by 1 for each rematch.
4120
+ # Corresponds to the JSON property `matchNumber`
4121
+ # @return [Fixnum]
4122
+ attr_accessor :match_number
4123
+
4124
+ # The version of this match: an increasing counter, used to avoid out-of-date
4125
+ # updates to the match.
4126
+ # Corresponds to the JSON property `matchVersion`
4127
+ # @return [Fixnum]
4128
+ attr_accessor :match_version
4129
+
4130
+ # The participants involved in the match, along with their statuses. Includes
4131
+ # participants who have left or declined invitations.
4132
+ # Corresponds to the JSON property `participants`
4133
+ # @return [Array<Google::Apis::GamesV1::TurnBasedMatchParticipant>]
4134
+ attr_accessor :participants
4135
+
4136
+ # The ID of the participant that is taking a turn.
4137
+ # Corresponds to the JSON property `pendingParticipantId`
4138
+ # @return [String]
4139
+ attr_accessor :pending_participant_id
4140
+
4141
+ # This is a JSON template for a turn-based match data object.
4142
+ # Corresponds to the JSON property `previousMatchData`
4143
+ # @return [Google::Apis::GamesV1::TurnBasedMatchData]
4144
+ attr_accessor :previous_match_data
4145
+
4146
+ # The ID of a rematch of this match. Only set for completed matches that have
4147
+ # been rematched.
4148
+ # Corresponds to the JSON property `rematchId`
4149
+ # @return [String]
4150
+ attr_accessor :rematch_id
4151
+
4152
+ # The results reported for this match.
4153
+ # Corresponds to the JSON property `results`
4154
+ # @return [Array<Google::Apis::GamesV1::ParticipantResult>]
4155
+ attr_accessor :results
4156
+
4157
+ # The status of the match.
4158
+ # Possible values are:
4159
+ # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching;
4160
+ # the match cannot be established until they are filled.
4161
+ # - "MATCH_ACTIVE" - The match has started.
4162
+ # - "MATCH_COMPLETE" - The match has finished.
4163
+ # - "MATCH_CANCELED" - The match was canceled.
4164
+ # - "MATCH_EXPIRED" - The match expired due to inactivity.
4165
+ # - "MATCH_DELETED" - The match should no longer be shown on the client.
4166
+ # Returned only for tombstones for matches when sync is called.
4167
+ # Corresponds to the JSON property `status`
4168
+ # @return [String]
4169
+ attr_accessor :status
4170
+
4171
+ # The status of the current user in the match. Derived from the match type,
4172
+ # match status, the user's participant status, and the pending participant for
4173
+ # the match.
4174
+ # Possible values are:
4175
+ # - "USER_INVITED" - The user has been invited to join the match and has not
4176
+ # responded yet.
4177
+ # - "USER_AWAITING_TURN" - The user is waiting for their turn.
4178
+ # - "USER_TURN" - The user has an action to take in the match.
4179
+ # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or
4180
+ # expired.)
4181
+ # Corresponds to the JSON property `userMatchStatus`
4182
+ # @return [String]
4183
+ attr_accessor :user_match_status
4184
+
4185
+ # The variant / mode of the application being played; can be any integer value,
4186
+ # or left blank.
4187
+ # Corresponds to the JSON property `variant`
4188
+ # @return [Fixnum]
4189
+ attr_accessor :variant
4190
+
4191
+ # The ID of another participant in the match that can be used when describing
4192
+ # the participants the user is playing with.
4193
+ # Corresponds to the JSON property `withParticipantId`
4194
+ # @return [String]
4195
+ attr_accessor :with_participant_id
4196
+
4197
+ def initialize(**args)
4198
+ update!(**args)
4199
+ end
4200
+
4201
+ # Update properties of this object
4202
+ def update!(**args)
4203
+ @application_id = args[:application_id] if args.key?(:application_id)
4204
+ @auto_matching_criteria = args[:auto_matching_criteria] if args.key?(:auto_matching_criteria)
4205
+ @creation_details = args[:creation_details] if args.key?(:creation_details)
4206
+ @data = args[:data] if args.key?(:data)
4207
+ @description = args[:description] if args.key?(:description)
4208
+ @inviter_id = args[:inviter_id] if args.key?(:inviter_id)
4209
+ @kind = args[:kind] if args.key?(:kind)
4210
+ @last_update_details = args[:last_update_details] if args.key?(:last_update_details)
4211
+ @match_id = args[:match_id] if args.key?(:match_id)
4212
+ @match_number = args[:match_number] if args.key?(:match_number)
4213
+ @match_version = args[:match_version] if args.key?(:match_version)
4214
+ @participants = args[:participants] if args.key?(:participants)
4215
+ @pending_participant_id = args[:pending_participant_id] if args.key?(:pending_participant_id)
4216
+ @previous_match_data = args[:previous_match_data] if args.key?(:previous_match_data)
4217
+ @rematch_id = args[:rematch_id] if args.key?(:rematch_id)
4218
+ @results = args[:results] if args.key?(:results)
4219
+ @status = args[:status] if args.key?(:status)
4220
+ @user_match_status = args[:user_match_status] if args.key?(:user_match_status)
4221
+ @variant = args[:variant] if args.key?(:variant)
4222
+ @with_participant_id = args[:with_participant_id] if args.key?(:with_participant_id)
4223
+ end
4224
+ end
4225
+
4226
+ # This is a JSON template for a turn-based match creation request.
4227
+ class CreateTurnBasedMatchRequest
4228
+ include Google::Apis::Core::Hashable
4229
+
4230
+ # This is a JSON template for an turn-based auto-match criteria object.
4231
+ # Corresponds to the JSON property `autoMatchingCriteria`
4232
+ # @return [Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria]
4233
+ attr_accessor :auto_matching_criteria
4234
+
4235
+ # The player ids to invite to the match.
4236
+ # Corresponds to the JSON property `invitedPlayerIds`
4237
+ # @return [Array<String>]
4238
+ attr_accessor :invited_player_ids
4239
+
4240
+ # Uniquely identifies the type of this resource. Value is always the fixed
4241
+ # string games#turnBasedMatchCreateRequest.
4242
+ # Corresponds to the JSON property `kind`
4243
+ # @return [String]
4244
+ attr_accessor :kind
4245
+
4246
+ # A randomly generated numeric ID. This number is used at the server to ensure
4247
+ # that the request is handled correctly across retries.
4248
+ # Corresponds to the JSON property `requestId`
4249
+ # @return [String]
4250
+ attr_accessor :request_id
4251
+
4252
+ # The variant / mode of the application to be played. This can be any integer
4253
+ # value, or left blank. You should use a small number of variants to keep the
4254
+ # auto-matching pool as large as possible.
4255
+ # Corresponds to the JSON property `variant`
4256
+ # @return [Fixnum]
4257
+ attr_accessor :variant
4258
+
4259
+ def initialize(**args)
4260
+ update!(**args)
4261
+ end
4262
+
4263
+ # Update properties of this object
4264
+ def update!(**args)
4265
+ @auto_matching_criteria = args[:auto_matching_criteria] if args.key?(:auto_matching_criteria)
4266
+ @invited_player_ids = args[:invited_player_ids] if args.key?(:invited_player_ids)
4267
+ @kind = args[:kind] if args.key?(:kind)
4268
+ @request_id = args[:request_id] if args.key?(:request_id)
4269
+ @variant = args[:variant] if args.key?(:variant)
4270
+ end
4271
+ end
4272
+
4273
+ # This is a JSON template for a turn-based match data object.
4274
+ class TurnBasedMatchData
4275
+ include Google::Apis::Core::Hashable
4276
+
4277
+ # The byte representation of the data (limited to 128 kB), as a Base64-encoded
4278
+ # string with the URL_SAFE encoding option.
4279
+ # Corresponds to the JSON property `data`
4280
+ # @return [String]
4281
+ attr_accessor :data
4282
+
4283
+ # True if this match has data available but it wasn't returned in a list
4284
+ # response; fetching the match individually will retrieve this data.
4285
+ # Corresponds to the JSON property `dataAvailable`
4286
+ # @return [Boolean]
4287
+ attr_accessor :data_available
4288
+ alias_method :data_available?, :data_available
4289
+
4290
+ # Uniquely identifies the type of this resource. Value is always the fixed
4291
+ # string games#turnBasedMatchData.
4292
+ # Corresponds to the JSON property `kind`
4293
+ # @return [String]
4294
+ attr_accessor :kind
4295
+
4296
+ def initialize(**args)
4297
+ update!(**args)
4298
+ end
4299
+
4300
+ # Update properties of this object
4301
+ def update!(**args)
4302
+ @data = args[:data] if args.key?(:data)
4303
+ @data_available = args[:data_available] if args.key?(:data_available)
4304
+ @kind = args[:kind] if args.key?(:kind)
4305
+ end
4306
+ end
4307
+
4308
+ # This is a JSON template for sending a turn-based match data object.
4309
+ class TurnBasedMatchDataRequest
4310
+ include Google::Apis::Core::Hashable
4311
+
4312
+ # The byte representation of the data (limited to 128 kB), as a Base64-encoded
4313
+ # string with the URL_SAFE encoding option.
4314
+ # Corresponds to the JSON property `data`
4315
+ # @return [String]
4316
+ attr_accessor :data
4317
+
4318
+ # Uniquely identifies the type of this resource. Value is always the fixed
4319
+ # string games#turnBasedMatchDataRequest.
4320
+ # Corresponds to the JSON property `kind`
4321
+ # @return [String]
4322
+ attr_accessor :kind
4323
+
4324
+ def initialize(**args)
4325
+ update!(**args)
4326
+ end
4327
+
4328
+ # Update properties of this object
4329
+ def update!(**args)
4330
+ @data = args[:data] if args.key?(:data)
4331
+ @kind = args[:kind] if args.key?(:kind)
4332
+ end
4333
+ end
4334
+
4335
+ # This is a JSON template for a list of turn-based matches.
4336
+ class TurnBasedMatchList
4337
+ include Google::Apis::Core::Hashable
4338
+
4339
+ # The matches.
4340
+ # Corresponds to the JSON property `items`
4341
+ # @return [Array<Google::Apis::GamesV1::TurnBasedMatch>]
4342
+ attr_accessor :items
4343
+
4344
+ # Uniquely identifies the type of this resource. Value is always the fixed
4345
+ # string games#turnBasedMatchList.
4346
+ # Corresponds to the JSON property `kind`
4347
+ # @return [String]
4348
+ attr_accessor :kind
4349
+
4350
+ # The pagination token for the next page of results.
4351
+ # Corresponds to the JSON property `nextPageToken`
4352
+ # @return [String]
4353
+ attr_accessor :next_page_token
4354
+
4355
+ def initialize(**args)
4356
+ update!(**args)
4357
+ end
4358
+
4359
+ # Update properties of this object
4360
+ def update!(**args)
4361
+ @items = args[:items] if args.key?(:items)
4362
+ @kind = args[:kind] if args.key?(:kind)
4363
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
4364
+ end
4365
+ end
4366
+
4367
+ # This is a JSON template for turn-based match modification metadata.
4368
+ class TurnBasedMatchModification
4369
+ include Google::Apis::Core::Hashable
4370
+
4371
+ # Uniquely identifies the type of this resource. Value is always the fixed
4372
+ # string games#turnBasedMatchModification.
4373
+ # Corresponds to the JSON property `kind`
4374
+ # @return [String]
4375
+ attr_accessor :kind
4376
+
4377
+ # The timestamp at which they modified the match, in milliseconds since the
4378
+ # epoch in UTC.
4379
+ # Corresponds to the JSON property `modifiedTimestampMillis`
4380
+ # @return [String]
4381
+ attr_accessor :modified_timestamp_millis
4382
+
4383
+ # The ID of the participant that modified the match.
4384
+ # Corresponds to the JSON property `participantId`
4385
+ # @return [String]
4386
+ attr_accessor :participant_id
4387
+
4388
+ def initialize(**args)
4389
+ update!(**args)
4390
+ end
4391
+
4392
+ # Update properties of this object
4393
+ def update!(**args)
4394
+ @kind = args[:kind] if args.key?(:kind)
4395
+ @modified_timestamp_millis = args[:modified_timestamp_millis] if args.key?(:modified_timestamp_millis)
4396
+ @participant_id = args[:participant_id] if args.key?(:participant_id)
4397
+ end
4398
+ end
4399
+
4400
+ # This is a JSON template for a participant in a turn-based match.
4401
+ class TurnBasedMatchParticipant
4402
+ include Google::Apis::Core::Hashable
4403
+
4404
+ # True if this participant was auto-matched with the requesting player.
4405
+ # Corresponds to the JSON property `autoMatched`
4406
+ # @return [Boolean]
4407
+ attr_accessor :auto_matched
4408
+ alias_method :auto_matched?, :auto_matched
4409
+
4410
+ # This is a JSON template for an anonymous player
4411
+ # Corresponds to the JSON property `autoMatchedPlayer`
4412
+ # @return [Google::Apis::GamesV1::AnonymousPlayer]
4413
+ attr_accessor :auto_matched_player
4414
+
4415
+ # An identifier for the participant in the scope of the match. Cannot be used to
4416
+ # identify a player across matches or in other contexts.
4417
+ # Corresponds to the JSON property `id`
4418
+ # @return [String]
4419
+ attr_accessor :id
4420
+
4421
+ # Uniquely identifies the type of this resource. Value is always the fixed
4422
+ # string games#turnBasedMatchParticipant.
4423
+ # Corresponds to the JSON property `kind`
4424
+ # @return [String]
4425
+ attr_accessor :kind
4426
+
4427
+ # This is a JSON template for a Player resource.
4428
+ # Corresponds to the JSON property `player`
4429
+ # @return [Google::Apis::GamesV1::Player]
4430
+ attr_accessor :player
4431
+
4432
+ # The status of the participant with respect to the match.
4433
+ # Possible values are:
4434
+ # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to
4435
+ # the match, but the invitation has not been sent; the invite will be sent when
4436
+ # it becomes their turn.
4437
+ # - "PARTICIPANT_INVITED" - The participant has been invited to join the match,
4438
+ # but has not yet responded.
4439
+ # - "PARTICIPANT_JOINED" - The participant has joined the match (either after
4440
+ # creating it or accepting an invitation.)
4441
+ # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the
4442
+ # match.
4443
+ # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
4444
+ # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
4445
+ # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the
4446
+ # allotted time.
4447
+ # Corresponds to the JSON property `status`
4448
+ # @return [String]
4449
+ attr_accessor :status
4450
+
4451
+ def initialize(**args)
4452
+ update!(**args)
4453
+ end
4454
+
4455
+ # Update properties of this object
4456
+ def update!(**args)
4457
+ @auto_matched = args[:auto_matched] if args.key?(:auto_matched)
4458
+ @auto_matched_player = args[:auto_matched_player] if args.key?(:auto_matched_player)
4459
+ @id = args[:id] if args.key?(:id)
4460
+ @kind = args[:kind] if args.key?(:kind)
4461
+ @player = args[:player] if args.key?(:player)
4462
+ @status = args[:status] if args.key?(:status)
4463
+ end
4464
+ end
4465
+
4466
+ # This is a JSON template for a rematch response.
4467
+ class TurnBasedMatchRematch
4468
+ include Google::Apis::Core::Hashable
4469
+
4470
+ # Uniquely identifies the type of this resource. Value is always the fixed
4471
+ # string games#turnBasedMatchRematch.
4472
+ # Corresponds to the JSON property `kind`
4473
+ # @return [String]
4474
+ attr_accessor :kind
4475
+
4476
+ # This is a JSON template for a turn-based match resource object.
4477
+ # Corresponds to the JSON property `previousMatch`
4478
+ # @return [Google::Apis::GamesV1::TurnBasedMatch]
4479
+ attr_accessor :previous_match
4480
+
4481
+ # This is a JSON template for a turn-based match resource object.
4482
+ # Corresponds to the JSON property `rematch`
4483
+ # @return [Google::Apis::GamesV1::TurnBasedMatch]
4484
+ attr_accessor :rematch
4485
+
4486
+ def initialize(**args)
4487
+ update!(**args)
4488
+ end
4489
+
4490
+ # Update properties of this object
4491
+ def update!(**args)
4492
+ @kind = args[:kind] if args.key?(:kind)
4493
+ @previous_match = args[:previous_match] if args.key?(:previous_match)
4494
+ @rematch = args[:rematch] if args.key?(:rematch)
4495
+ end
4496
+ end
4497
+
4498
+ # This is a JSON template for a turn-based match results object.
4499
+ class TurnBasedMatchResults
4500
+ include Google::Apis::Core::Hashable
4501
+
4502
+ # This is a JSON template for sending a turn-based match data object.
4503
+ # Corresponds to the JSON property `data`
4504
+ # @return [Google::Apis::GamesV1::TurnBasedMatchDataRequest]
4505
+ attr_accessor :data
4506
+
4507
+ # Uniquely identifies the type of this resource. Value is always the fixed
4508
+ # string games#turnBasedMatchResults.
4509
+ # Corresponds to the JSON property `kind`
4510
+ # @return [String]
4511
+ attr_accessor :kind
4512
+
4513
+ # The version of the match being updated.
4514
+ # Corresponds to the JSON property `matchVersion`
4515
+ # @return [Fixnum]
4516
+ attr_accessor :match_version
4517
+
4518
+ # The match results for the participants in the match.
4519
+ # Corresponds to the JSON property `results`
4520
+ # @return [Array<Google::Apis::GamesV1::ParticipantResult>]
4521
+ attr_accessor :results
4522
+
4523
+ def initialize(**args)
4524
+ update!(**args)
4525
+ end
4526
+
4527
+ # Update properties of this object
4528
+ def update!(**args)
4529
+ @data = args[:data] if args.key?(:data)
4530
+ @kind = args[:kind] if args.key?(:kind)
4531
+ @match_version = args[:match_version] if args.key?(:match_version)
4532
+ @results = args[:results] if args.key?(:results)
4533
+ end
4534
+ end
4535
+
4536
+ # This is a JSON template for a list of turn-based matches returned from a sync.
4537
+ class TurnBasedMatchSync
4538
+ include Google::Apis::Core::Hashable
4539
+
4540
+ # The matches.
4541
+ # Corresponds to the JSON property `items`
4542
+ # @return [Array<Google::Apis::GamesV1::TurnBasedMatch>]
4543
+ attr_accessor :items
4544
+
4545
+ # Uniquely identifies the type of this resource. Value is always the fixed
4546
+ # string games#turnBasedMatchSync.
4547
+ # Corresponds to the JSON property `kind`
4548
+ # @return [String]
4549
+ attr_accessor :kind
4550
+
4551
+ # True if there were more matches available to fetch at the time the response
4552
+ # was generated (which were not returned due to page size limits.)
4553
+ # Corresponds to the JSON property `moreAvailable`
4554
+ # @return [Boolean]
4555
+ attr_accessor :more_available
4556
+ alias_method :more_available?, :more_available
4557
+
4558
+ # The pagination token for the next page of results.
4559
+ # Corresponds to the JSON property `nextPageToken`
4560
+ # @return [String]
4561
+ attr_accessor :next_page_token
4562
+
4563
+ def initialize(**args)
4564
+ update!(**args)
4565
+ end
4566
+
4567
+ # Update properties of this object
4568
+ def update!(**args)
4569
+ @items = args[:items] if args.key?(:items)
4570
+ @kind = args[:kind] if args.key?(:kind)
4571
+ @more_available = args[:more_available] if args.key?(:more_available)
4572
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
4573
+ end
4574
+ end
4575
+
4576
+ # This is a JSON template for the object representing a turn.
4577
+ class TurnBasedMatchTurn
4578
+ include Google::Apis::Core::Hashable
4579
+
4580
+ # This is a JSON template for sending a turn-based match data object.
4581
+ # Corresponds to the JSON property `data`
4582
+ # @return [Google::Apis::GamesV1::TurnBasedMatchDataRequest]
4583
+ attr_accessor :data
4584
+
4585
+ # Uniquely identifies the type of this resource. Value is always the fixed
4586
+ # string games#turnBasedMatchTurn.
4587
+ # Corresponds to the JSON property `kind`
4588
+ # @return [String]
4589
+ attr_accessor :kind
4590
+
4591
+ # The version of this match: an increasing counter, used to avoid out-of-date
4592
+ # updates to the match.
4593
+ # Corresponds to the JSON property `matchVersion`
4594
+ # @return [Fixnum]
4595
+ attr_accessor :match_version
4596
+
4597
+ # The ID of the participant who should take their turn next. May be set to the
4598
+ # current player's participant ID to update match state without changing the
4599
+ # turn. If not set, the match will wait for other player(s) to join via
4600
+ # automatching; this is only valid if automatch criteria is set on the match
4601
+ # with remaining slots for automatched players.
4602
+ # Corresponds to the JSON property `pendingParticipantId`
4603
+ # @return [String]
4604
+ attr_accessor :pending_participant_id
4605
+
4606
+ # The match results for the participants in the match.
4607
+ # Corresponds to the JSON property `results`
4608
+ # @return [Array<Google::Apis::GamesV1::ParticipantResult>]
4609
+ attr_accessor :results
4610
+
4611
+ def initialize(**args)
4612
+ update!(**args)
4613
+ end
4614
+
4615
+ # Update properties of this object
4616
+ def update!(**args)
4617
+ @data = args[:data] if args.key?(:data)
4618
+ @kind = args[:kind] if args.key?(:kind)
4619
+ @match_version = args[:match_version] if args.key?(:match_version)
4620
+ @pending_participant_id = args[:pending_participant_id] if args.key?(:pending_participant_id)
4621
+ @results = args[:results] if args.key?(:results)
4622
+ end
4623
+ end
4624
+ end
4625
+ end
4626
+ end