google-api-client 0.8.6 → 0.9

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 (497) 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 +22 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +41 -2
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +32 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +181 -148
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +1036 -0
  15. data/api_names_out.yaml +26053 -0
  16. data/bin/generate-api +95 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1335 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +446 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +872 -0
  21. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  24. data/generated/google/apis/adexchangeseller_v2_0/service.rb +668 -0
  25. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  26. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  27. data/generated/google/apis/admin_datatransfer_v1/representations.rb +118 -0
  28. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  29. data/generated/google/apis/admin_directory_v1.rb +113 -0
  30. data/generated/google/apis/admin_directory_v1/classes.rb +3141 -0
  31. data/generated/google/apis/admin_directory_v1/representations.rb +1029 -0
  32. data/generated/google/apis/admin_directory_v1/service.rb +3818 -0
  33. data/generated/google/apis/admin_reports_v1.rb +38 -0
  34. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  35. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  36. data/generated/google/apis/admin_reports_v1/service.rb +336 -0
  37. data/generated/google/apis/adsense_v1_4.rb +38 -0
  38. data/generated/google/apis/adsense_v1_4/classes.rb +1285 -0
  39. data/generated/google/apis/adsense_v1_4/representations.rb +494 -0
  40. data/generated/google/apis/adsense_v1_4/service.rb +1714 -0
  41. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  42. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  43. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  44. data/generated/google/apis/adsensehost_v4_1/service.rb +1164 -0
  45. data/generated/google/apis/analytics_v3.rb +49 -0
  46. data/generated/google/apis/analytics_v3/classes.rb +5118 -0
  47. data/generated/google/apis/analytics_v3/representations.rb +1662 -0
  48. data/generated/google/apis/analytics_v3/service.rb +3568 -0
  49. data/generated/google/apis/androidenterprise_v1.rb +35 -0
  50. data/generated/google/apis/androidenterprise_v1/classes.rb +1443 -0
  51. data/generated/google/apis/androidenterprise_v1/representations.rb +538 -0
  52. data/generated/google/apis/androidenterprise_v1/service.rb +2602 -0
  53. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  54. data/generated/google/apis/androidpublisher_v2/classes.rb +1411 -0
  55. data/generated/google/apis/androidpublisher_v2/representations.rb +646 -0
  56. data/generated/google/apis/androidpublisher_v2/service.rb +2338 -0
  57. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  58. data/generated/google/apis/appengine_v1beta4/classes.rb +1532 -0
  59. data/generated/google/apis/appengine_v1beta4/representations.rb +526 -0
  60. data/generated/google/apis/appengine_v1beta4/service.rb +476 -0
  61. data/generated/google/apis/appsactivity_v1.rb +46 -0
  62. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  63. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  64. data/generated/google/apis/appsactivity_v1/service.rb +128 -0
  65. data/generated/google/apis/appstate_v1.rb +34 -0
  66. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  67. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  68. data/generated/google/apis/appstate_v1/service.rb +260 -0
  69. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  70. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  71. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  72. data/generated/google/apis/autoscaler_v1beta2/service.rb +478 -0
  73. data/generated/google/apis/bigquery_v2.rb +52 -0
  74. data/generated/google/apis/bigquery_v2/classes.rb +2471 -0
  75. data/generated/google/apis/bigquery_v2/representations.rb +816 -0
  76. data/generated/google/apis/bigquery_v2/service.rb +982 -0
  77. data/generated/google/apis/blogger_v3.rb +37 -0
  78. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  79. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  80. data/generated/google/apis/blogger_v3/service.rb +1587 -0
  81. data/generated/google/apis/books_v1.rb +34 -0
  82. data/generated/google/apis/books_v1/classes.rb +3956 -0
  83. data/generated/google/apis/books_v1/representations.rb +1538 -0
  84. data/generated/google/apis/books_v1/service.rb +2290 -0
  85. data/generated/google/apis/calendar_v3.rb +37 -0
  86. data/generated/google/apis/calendar_v3/classes.rb +1742 -0
  87. data/generated/google/apis/calendar_v3/representations.rb +567 -0
  88. data/generated/google/apis/calendar_v3/service.rb +1968 -0
  89. data/{lib/google/api_client/service_account.rb → generated/google/apis/civicinfo_v2.rb} +18 -8
  90. data/generated/google/apis/civicinfo_v2/classes.rb +1127 -0
  91. data/generated/google/apis/civicinfo_v2/representations.rb +383 -0
  92. data/generated/google/apis/civicinfo_v2/service.rb +279 -0
  93. data/generated/google/apis/classroom_v1.rb +49 -0
  94. data/generated/google/apis/classroom_v1/classes.rb +512 -0
  95. data/generated/google/apis/classroom_v1/representations.rb +217 -0
  96. data/generated/google/apis/classroom_v1/service.rb +970 -0
  97. data/generated/google/apis/classroom_v1beta1.rb +49 -0
  98. data/generated/google/apis/classroom_v1beta1/classes.rb +447 -0
  99. data/generated/google/apis/classroom_v1beta1/representations.rb +190 -0
  100. data/generated/google/apis/classroom_v1beta1/service.rb +791 -0
  101. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  102. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  103. data/generated/google/apis/cloudbilling_v1/representations.rb +79 -0
  104. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  105. data/generated/google/apis/clouddebugger_v2.rb +41 -0
  106. data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
  107. data/generated/google/apis/clouddebugger_v2/representations.rb +410 -0
  108. data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
  109. data/generated/google/apis/cloudmonitoring_v2beta2.rb +37 -0
  110. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  111. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  112. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +452 -0
  113. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  114. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +437 -0
  115. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +188 -0
  116. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +623 -0
  117. data/generated/google/apis/cloudtrace_v1.rb +35 -0
  118. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  119. data/generated/google/apis/cloudtrace_v1/representations.rb +92 -0
  120. data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
  121. data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
  122. data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
  123. data/generated/google/apis/clouduseraccounts_beta/representations.rb +313 -0
  124. data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
  125. data/generated/google/apis/compute_beta.rb +49 -0
  126. data/generated/google/apis/compute_beta/classes.rb +9128 -0
  127. data/generated/google/apis/compute_beta/representations.rb +3048 -0
  128. data/generated/google/apis/compute_beta/service.rb +10154 -0
  129. data/generated/google/apis/compute_v1.rb +49 -0
  130. data/generated/google/apis/compute_v1/classes.rb +8681 -0
  131. data/generated/google/apis/compute_v1/representations.rb +2895 -0
  132. data/generated/google/apis/compute_v1/service.rb +9252 -0
  133. data/generated/google/apis/container_v1.rb +35 -0
  134. data/generated/google/apis/container_v1/classes.rb +463 -0
  135. data/generated/google/apis/container_v1/representations.rb +175 -0
  136. data/generated/google/apis/container_v1/service.rb +367 -0
  137. data/generated/google/apis/container_v1beta1.rb +35 -0
  138. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  139. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  140. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  141. data/generated/google/apis/content_v2.rb +35 -0
  142. data/generated/google/apis/content_v2/classes.rb +5986 -0
  143. data/generated/google/apis/content_v2/representations.rb +2288 -0
  144. data/generated/google/apis/content_v2/service.rb +2338 -0
  145. data/generated/google/apis/coordinate_v1.rb +37 -0
  146. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  147. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  148. data/generated/google/apis/coordinate_v1/service.rb +678 -0
  149. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  150. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  151. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  152. data/generated/google/apis/customsearch_v1/service.rb +207 -0
  153. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  154. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  155. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  156. data/generated/google/apis/datastore_v1beta2/service.rb +294 -0
  157. data/generated/google/apis/deploymentmanager_v2.rb +44 -0
  158. data/generated/google/apis/deploymentmanager_v2/classes.rb +1091 -0
  159. data/generated/google/apis/deploymentmanager_v2/representations.rb +422 -0
  160. data/generated/google/apis/deploymentmanager_v2/service.rb +857 -0
  161. data/generated/google/apis/deploymentmanager_v2beta2.rb +44 -0
  162. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +843 -0
  163. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +306 -0
  164. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +689 -0
  165. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  166. data/generated/google/apis/dfareporting_v2_1/classes.rb +10770 -0
  167. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  168. data/generated/google/apis/dfareporting_v2_1/service.rb +8585 -0
  169. data/generated/google/apis/discovery_v1.rb +32 -0
  170. data/generated/google/apis/discovery_v1/classes.rb +961 -0
  171. data/generated/google/apis/discovery_v1/representations.rb +357 -0
  172. data/generated/google/apis/discovery_v1/service.rb +142 -0
  173. data/generated/google/apis/dns_v1.rb +44 -0
  174. data/generated/google/apis/dns_v1/classes.rb +406 -0
  175. data/generated/google/apis/dns_v1/representations.rb +151 -0
  176. data/generated/google/apis/dns_v1/service.rb +454 -0
  177. data/generated/google/apis/doubleclickbidmanager_v1.rb +31 -0
  178. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +716 -0
  179. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +298 -0
  180. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +341 -0
  181. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  182. data/generated/google/apis/doubleclicksearch_v2/classes.rb +956 -0
  183. data/generated/google/apis/doubleclicksearch_v2/representations.rb +316 -0
  184. data/generated/google/apis/doubleclicksearch_v2/service.rb +480 -0
  185. data/generated/google/apis/drive_v2.rb +58 -0
  186. data/generated/google/apis/drive_v2/classes.rb +2562 -0
  187. data/generated/google/apis/drive_v2/representations.rb +795 -0
  188. data/generated/google/apis/drive_v2/service.rb +2696 -0
  189. data/generated/google/apis/drive_v3.rb +55 -0
  190. data/generated/google/apis/drive_v3/classes.rb +1534 -0
  191. data/generated/google/apis/drive_v3/representations.rb +497 -0
  192. data/generated/google/apis/drive_v3/service.rb +1541 -0
  193. data/generated/google/apis/fitness_v1.rb +49 -0
  194. data/generated/google/apis/fitness_v1/classes.rb +885 -0
  195. data/generated/google/apis/fitness_v1/representations.rb +320 -0
  196. data/generated/google/apis/fitness_v1/service.rb +675 -0
  197. data/generated/google/apis/fusiontables_v2.rb +37 -0
  198. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  199. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  200. data/generated/google/apis/fusiontables_v2/service.rb +1463 -0
  201. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  202. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  203. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  204. data/generated/google/apis/games_configuration_v1configuration/service.rb +565 -0
  205. data/generated/google/apis/games_management_v1management.rb +37 -0
  206. data/generated/google/apis/games_management_v1management/classes.rb +524 -0
  207. data/generated/google/apis/games_management_v1management/representations.rb +231 -0
  208. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  209. data/generated/google/apis/games_v1.rb +40 -0
  210. data/generated/google/apis/games_v1/classes.rb +4617 -0
  211. data/generated/google/apis/games_v1/representations.rb +1584 -0
  212. data/generated/google/apis/games_v1/service.rb +2290 -0
  213. data/generated/google/apis/gan_v1beta1.rb +31 -0
  214. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  215. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  216. data/generated/google/apis/gan_v1beta1/service.rb +682 -0
  217. data/generated/google/apis/genomics_v1.rb +49 -0
  218. data/generated/google/apis/genomics_v1/classes.rb +2609 -0
  219. data/generated/google/apis/genomics_v1/representations.rb +909 -0
  220. data/generated/google/apis/genomics_v1/service.rb +1676 -0
  221. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  222. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  223. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  224. data/generated/google/apis/genomics_v1beta2/service.rb +2392 -0
  225. data/generated/google/apis/gmail_v1.rb +52 -0
  226. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  227. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  228. data/generated/google/apis/gmail_v1/service.rb +1470 -0
  229. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  230. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  231. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  232. data/generated/google/apis/groupsmigration_v1/service.rb +110 -0
  233. data/generated/google/apis/groupssettings_v1.rb +34 -0
  234. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  235. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  236. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  237. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  238. data/generated/google/apis/identitytoolkit_v3/classes.rb +1466 -0
  239. data/generated/google/apis/identitytoolkit_v3/representations.rb +509 -0
  240. data/generated/google/apis/identitytoolkit_v3/service.rb +581 -0
  241. data/{spec/google/api_client/request_spec.rb → generated/google/apis/kgsearch_v1.rb} +16 -13
  242. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  243. data/generated/google/apis/kgsearch_v1/representations.rb +39 -0
  244. data/generated/google/apis/kgsearch_v1/service.rb +111 -0
  245. data/generated/google/apis/licensing_v1.rb +34 -0
  246. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  247. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  248. data/generated/google/apis/licensing_v1/service.rb +369 -0
  249. data/generated/google/apis/logging_v1beta3.rb +47 -0
  250. data/generated/google/apis/logging_v1beta3/classes.rb +1079 -0
  251. data/generated/google/apis/logging_v1beta3/representations.rb +366 -0
  252. data/generated/google/apis/logging_v1beta3/service.rb +1001 -0
  253. data/generated/google/apis/manager_v1beta2.rb +53 -0
  254. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  255. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  256. data/generated/google/apis/manager_v1beta2/service.rb +372 -0
  257. data/generated/google/apis/mapsengine_v1.rb +38 -0
  258. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  259. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  260. data/generated/google/apis/mapsengine_v1/service.rb +3388 -0
  261. data/generated/google/apis/mirror_v1.rb +37 -0
  262. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  263. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  264. data/generated/google/apis/mirror_v1/service.rb +977 -0
  265. data/generated/google/apis/oauth2_v2.rb +43 -0
  266. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  267. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  268. data/generated/google/apis/oauth2_v2/service.rb +199 -0
  269. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  270. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  271. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  272. data/generated/google/apis/pagespeedonline_v2/service.rb +119 -0
  273. data/generated/google/apis/partners_v2.rb +32 -0
  274. data/generated/google/apis/partners_v2/classes.rb +942 -0
  275. data/generated/google/apis/partners_v2/representations.rb +402 -0
  276. data/generated/google/apis/partners_v2/service.rb +400 -0
  277. data/generated/google/apis/plus_domains_v1.rb +61 -0
  278. data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
  279. data/generated/google/apis/plus_domains_v1/representations.rb +987 -0
  280. data/generated/google/apis/plus_domains_v1/service.rb +904 -0
  281. data/generated/google/apis/plus_v1.rb +43 -0
  282. data/generated/google/apis/plus_v1/classes.rb +2094 -0
  283. data/generated/google/apis/plus_v1/representations.rb +805 -0
  284. data/generated/google/apis/plus_v1/service.rb +470 -0
  285. data/generated/google/apis/prediction_v1_6.rb +44 -0
  286. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  287. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  288. data/generated/google/apis/prediction_v1_6/service.rb +380 -0
  289. data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
  290. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
  291. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +274 -0
  292. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
  293. data/generated/google/apis/pubsub_v1.rb +37 -0
  294. data/generated/google/apis/pubsub_v1/classes.rb +614 -0
  295. data/generated/google/apis/pubsub_v1/representations.rb +281 -0
  296. data/generated/google/apis/pubsub_v1/service.rb +774 -0
  297. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  298. data/generated/google/apis/pubsub_v1beta2/classes.rb +620 -0
  299. data/generated/google/apis/pubsub_v1beta2/representations.rb +282 -0
  300. data/generated/google/apis/pubsub_v1beta2/service.rb +774 -0
  301. data/generated/google/apis/qpx_express_v1.rb +31 -0
  302. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  303. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  304. data/generated/google/apis/qpx_express_v1/service.rb +100 -0
  305. data/generated/google/apis/replicapool_v1beta2.rb +44 -0
  306. data/generated/google/apis/replicapool_v1beta2/classes.rb +631 -0
  307. data/generated/google/apis/replicapool_v1beta2/representations.rb +236 -0
  308. data/generated/google/apis/replicapool_v1beta2/service.rb +608 -0
  309. data/generated/google/apis/replicapoolupdater_v1beta1.rb +44 -0
  310. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +733 -0
  311. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +264 -0
  312. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +508 -0
  313. data/generated/google/apis/reseller_v1.rb +37 -0
  314. data/generated/google/apis/reseller_v1/classes.rb +520 -0
  315. data/generated/google/apis/reseller_v1/representations.rb +200 -0
  316. data/generated/google/apis/reseller_v1/service.rb +623 -0
  317. data/generated/google/apis/resourceviews_v1beta2.rb +50 -0
  318. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  319. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  320. data/generated/google/apis/resourceviews_v1beta2/service.rb +563 -0
  321. data/generated/google/apis/script_v1.rb +61 -0
  322. data/generated/google/apis/script_v1/classes.rb +259 -0
  323. data/generated/google/apis/script_v1/representations.rb +106 -0
  324. data/generated/google/apis/script_v1/service.rb +98 -0
  325. data/generated/google/apis/site_verification_v1.rb +37 -0
  326. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  327. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  328. data/generated/google/apis/site_verification_v1/service.rb +315 -0
  329. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  330. data/generated/google/apis/sqladmin_v1beta4/classes.rb +2001 -0
  331. data/generated/google/apis/sqladmin_v1beta4/representations.rb +758 -0
  332. data/generated/google/apis/sqladmin_v1beta4/service.rb +1625 -0
  333. data/generated/google/apis/storage_v1.rb +46 -0
  334. data/generated/google/apis/storage_v1/classes.rb +1222 -0
  335. data/generated/google/apis/storage_v1/representations.rb +445 -0
  336. data/generated/google/apis/storage_v1/service.rb +1903 -0
  337. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  338. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  339. data/generated/google/apis/storagetransfer_v1/representations.rb +370 -0
  340. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  341. data/generated/google/apis/tagmanager_v1.rb +52 -0
  342. data/generated/google/apis/tagmanager_v1/classes.rb +1384 -0
  343. data/generated/google/apis/tagmanager_v1/representations.rb +515 -0
  344. data/generated/google/apis/tagmanager_v1/service.rb +1817 -0
  345. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  346. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  347. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  348. data/generated/google/apis/taskqueue_v1beta2/service.rb +408 -0
  349. data/generated/google/apis/tasks_v1.rb +37 -0
  350. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  351. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  352. data/generated/google/apis/tasks_v1/service.rb +643 -0
  353. data/generated/google/apis/translate_v2.rb +31 -0
  354. data/generated/google/apis/translate_v2/classes.rb +168 -0
  355. data/generated/google/apis/translate_v2/representations.rb +109 -0
  356. data/generated/google/apis/translate_v2/service.rb +182 -0
  357. data/generated/google/apis/urlshortener_v1.rb +34 -0
  358. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  359. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  360. data/generated/google/apis/urlshortener_v1/service.rb +176 -0
  361. data/generated/google/apis/webmasters_v3.rb +37 -0
  362. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  363. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  364. data/generated/google/apis/webmasters_v3/service.rb +573 -0
  365. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  366. data/generated/google/apis/youtube_analytics_v1/classes.rb +546 -0
  367. data/generated/google/apis/youtube_analytics_v1/representations.rb +243 -0
  368. data/generated/google/apis/youtube_analytics_v1/service.rb +562 -0
  369. data/generated/google/apis/youtube_v3.rb +49 -0
  370. data/generated/google/apis/youtube_v3/classes.rb +8136 -0
  371. data/generated/google/apis/youtube_v3/representations.rb +2838 -0
  372. data/generated/google/apis/youtube_v3/service.rb +4403 -0
  373. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  374. data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
  375. data/generated/google/apis/youtubereporting_v1/representations.rb +128 -0
  376. data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
  377. data/google-api-client.gemspec +27 -39
  378. data/lib/google/api_client/auth/installed_app.rb +7 -5
  379. data/lib/google/api_client/auth/key_utils.rb +1 -0
  380. data/lib/google/api_client/auth/storage.rb +4 -2
  381. data/lib/google/api_client/auth/storages/file_store.rb +2 -3
  382. data/lib/google/api_client/auth/storages/redis_store.rb +7 -2
  383. data/lib/google/api_client/client_secrets.rb +4 -5
  384. data/lib/google/apis.rb +48 -0
  385. data/lib/google/apis/core/api_command.rb +135 -0
  386. data/lib/google/apis/core/base_service.rb +317 -0
  387. data/lib/google/apis/core/batch.rb +239 -0
  388. data/lib/google/apis/core/download.rb +94 -0
  389. data/lib/google/apis/core/hashable.rb +44 -0
  390. data/lib/google/apis/core/http_client_adapter.rb +82 -0
  391. data/lib/google/apis/core/http_command.rb +312 -0
  392. data/lib/google/apis/core/json_representation.rb +127 -0
  393. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  394. data/lib/google/apis/core/multipart.rb +187 -0
  395. data/lib/google/apis/core/upload.rb +288 -0
  396. data/lib/google/{api_client → apis}/errors.rb +39 -28
  397. data/lib/google/apis/generator.rb +70 -0
  398. data/lib/google/apis/generator/annotator.rb +295 -0
  399. data/lib/google/apis/generator/helpers.rb +74 -0
  400. data/lib/google/apis/generator/model.rb +143 -0
  401. data/lib/google/apis/generator/template.rb +124 -0
  402. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  403. data/lib/google/apis/generator/templates/_method.tmpl +92 -0
  404. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  405. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  406. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  407. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  408. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  409. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  410. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  411. data/lib/google/apis/options.rb +85 -0
  412. data/lib/google/apis/version.rb +39 -0
  413. data/rakelib/metrics.rake +22 -0
  414. data/rakelib/rubocop.rake +10 -0
  415. data/rakelib/spec.rake +11 -0
  416. data/rakelib/yard.rake +11 -0
  417. data/samples/Gemfile +7 -0
  418. data/samples/README.md +51 -0
  419. data/samples/google-api-samples +32 -0
  420. data/samples/lib/base_cli.rb +94 -0
  421. data/samples/lib/samples/analytics.rb +62 -0
  422. data/samples/lib/samples/calendar.rb +83 -0
  423. data/samples/lib/samples/drive.rb +82 -0
  424. data/samples/lib/samples/gmail.rb +50 -0
  425. data/samples/lib/samples/pubsub.rb +114 -0
  426. data/samples/lib/samples/translate.rb +44 -0
  427. data/samples/lib/samples/you_tube.rb +44 -0
  428. data/script/generate +95 -0
  429. data/script/package +8 -0
  430. data/script/release +15 -0
  431. data/spec/fixtures/files/api_names.yaml +3 -0
  432. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  433. data/spec/fixtures/files/child/.gitignore +0 -0
  434. data/spec/fixtures/files/client_secrets.json +1 -0
  435. data/spec/fixtures/files/invalid.json +1 -0
  436. data/spec/fixtures/files/test.blah +1 -0
  437. data/spec/fixtures/files/test.txt +1 -0
  438. data/spec/fixtures/files/test_api.json +440 -0
  439. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  440. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  441. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  442. data/spec/google/api_client/client_secrets_spec.rb +38 -1
  443. data/spec/google/apis/core/api_command_spec.rb +209 -0
  444. data/spec/google/apis/core/batch_spec.rb +142 -0
  445. data/spec/google/apis/core/download_spec.rb +103 -0
  446. data/spec/google/apis/core/hashable_spec.rb +60 -0
  447. data/spec/google/apis/core/http_command_spec.rb +284 -0
  448. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  449. data/spec/google/apis/core/service_spec.rb +247 -0
  450. data/spec/google/apis/core/upload_spec.rb +300 -0
  451. data/{lib/google/api_client/discovery.rb → spec/google/apis/generated_spec.rb} +13 -5
  452. data/spec/google/apis/generator/generator_spec.rb +272 -0
  453. data/spec/google/apis/logging_spec.rb +45 -0
  454. data/spec/google/apis/options_spec.rb +40 -0
  455. data/spec/integration_tests/adsense_spec.rb +29 -0
  456. data/spec/integration_tests/drive_spec.rb +35 -0
  457. data/spec/integration_tests/pubsub_spec.rb +48 -0
  458. data/spec/integration_tests/url_shortener_spec.rb +45 -0
  459. data/spec/spec_helper.rb +131 -44
  460. data/spec/spec_helper/load_path_spec.rb +33 -0
  461. data/third_party/hurley_patches.rb +103 -0
  462. metadata +533 -170
  463. data/lib/compat/multi_json.rb +0 -19
  464. data/lib/google/api_client.rb +0 -750
  465. data/lib/google/api_client/auth/file_storage.rb +0 -59
  466. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  467. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  468. data/lib/google/api_client/batch.rb +0 -326
  469. data/lib/google/api_client/charset.rb +0 -33
  470. data/lib/google/api_client/discovery/api.rb +0 -310
  471. data/lib/google/api_client/discovery/media.rb +0 -77
  472. data/lib/google/api_client/discovery/method.rb +0 -363
  473. data/lib/google/api_client/discovery/resource.rb +0 -156
  474. data/lib/google/api_client/discovery/schema.rb +0 -117
  475. data/lib/google/api_client/environment.rb +0 -42
  476. data/lib/google/api_client/gzip.rb +0 -28
  477. data/lib/google/api_client/logging.rb +0 -32
  478. data/lib/google/api_client/media.rb +0 -259
  479. data/lib/google/api_client/railtie.rb +0 -18
  480. data/lib/google/api_client/request.rb +0 -350
  481. data/lib/google/api_client/result.rb +0 -255
  482. data/lib/google/api_client/service.rb +0 -233
  483. data/lib/google/api_client/service/batch.rb +0 -110
  484. data/lib/google/api_client/service/request.rb +0 -144
  485. data/lib/google/api_client/service/resource.rb +0 -40
  486. data/lib/google/api_client/service/result.rb +0 -162
  487. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  488. data/lib/google/api_client/service/stub_generator.rb +0 -61
  489. data/spec/google/api_client/batch_spec.rb +0 -248
  490. data/spec/google/api_client/discovery_spec.rb +0 -708
  491. data/spec/google/api_client/gzip_spec.rb +0 -98
  492. data/spec/google/api_client/media_spec.rb +0 -178
  493. data/spec/google/api_client/result_spec.rb +0 -207
  494. data/spec/google/api_client/service_account_spec.rb +0 -169
  495. data/spec/google/api_client/service_spec.rb +0 -618
  496. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  497. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,40 @@
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 'google/apis/games_v1/service.rb'
16
+ require 'google/apis/games_v1/classes.rb'
17
+ require 'google/apis/games_v1/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Google Play Game Services API
22
+ #
23
+ # The API for Google Play Game Services.
24
+ #
25
+ # @see https://developers.google.com/games/services/
26
+ module GamesV1
27
+ VERSION = 'V1'
28
+ REVISION = '20160106'
29
+
30
+ # View and manage its own configuration data in your Google Drive
31
+ AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata'
32
+
33
+ # Share your Google+ profile information and view and manage your game activity
34
+ AUTH_GAMES = 'https://www.googleapis.com/auth/games'
35
+
36
+ # Know your basic profile info and list of people in your circles.
37
+ AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login'
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,4617 @@
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] unless args[:achievement_type].nil?
113
+ @description = args[:description] unless args[:description].nil?
114
+ @experience_points = args[:experience_points] unless args[:experience_points].nil?
115
+ @formatted_total_steps = args[:formatted_total_steps] unless args[:formatted_total_steps].nil?
116
+ @id = args[:id] unless args[:id].nil?
117
+ @initial_state = args[:initial_state] unless args[:initial_state].nil?
118
+ @is_revealed_icon_url_default = args[:is_revealed_icon_url_default] unless args[:is_revealed_icon_url_default].nil?
119
+ @is_unlocked_icon_url_default = args[:is_unlocked_icon_url_default] unless args[:is_unlocked_icon_url_default].nil?
120
+ @kind = args[:kind] unless args[:kind].nil?
121
+ @name = args[:name] unless args[:name].nil?
122
+ @revealed_icon_url = args[:revealed_icon_url] unless args[:revealed_icon_url].nil?
123
+ @total_steps = args[:total_steps] unless args[:total_steps].nil?
124
+ @unlocked_icon_url = args[:unlocked_icon_url] unless args[:unlocked_icon_url].nil?
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] unless args[:items].nil?
155
+ @kind = args[:kind] unless args[:kind].nil?
156
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
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] unless args[:current_steps].nil?
189
+ @kind = args[:kind] unless args[:kind].nil?
190
+ @newly_unlocked = args[:newly_unlocked] unless args[:newly_unlocked].nil?
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] unless args[:current_state].nil?
220
+ @kind = args[:kind] unless args[:kind].nil?
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] unless args[:current_steps].nil?
253
+ @kind = args[:kind] unless args[:kind].nil?
254
+ @newly_unlocked = args[:newly_unlocked] unless args[:newly_unlocked].nil?
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] unless args[:kind].nil?
282
+ @newly_unlocked = args[:newly_unlocked] unless args[:newly_unlocked].nil?
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] unless args[:kind].nil?
308
+ @updates = args[:updates] unless args[:updates].nil?
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] unless args[:kind].nil?
334
+ @updated_achievements = args[:updated_achievements] unless args[:updated_achievements].nil?
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] unless args[:achievement_id].nil?
381
+ @increment_payload = args[:increment_payload] unless args[:increment_payload].nil?
382
+ @kind = args[:kind] unless args[:kind].nil?
383
+ @set_steps_at_least_payload = args[:set_steps_at_least_payload] unless args[:set_steps_at_least_payload].nil?
384
+ @update_type = args[:update_type] unless args[:update_type].nil?
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] unless args[:achievement_id].nil?
437
+ @current_state = args[:current_state] unless args[:current_state].nil?
438
+ @current_steps = args[:current_steps] unless args[:current_steps].nil?
439
+ @kind = args[:kind] unless args[:kind].nil?
440
+ @newly_unlocked = args[:newly_unlocked] unless args[:newly_unlocked].nil?
441
+ @update_occurred = args[:update_occurred] unless args[:update_occurred].nil?
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] unless args[:count].nil?
482
+ @kind = args[:kind] unless args[:kind].nil?
483
+ @max = args[:max] unless args[:max].nil?
484
+ @min = args[:min] unless args[:min].nil?
485
+ @sum = args[:sum] unless args[:sum].nil?
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] unless args[:avatar_image_url].nil?
516
+ @display_name = args[:display_name] unless args[:display_name].nil?
517
+ @kind = args[:kind] unless args[:kind].nil?
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] unless args[:achievement_count].nil?
601
+ @assets = args[:assets] unless args[:assets].nil?
602
+ @author = args[:author] unless args[:author].nil?
603
+ @category = args[:category] unless args[:category].nil?
604
+ @description = args[:description] unless args[:description].nil?
605
+ @enabled_features = args[:enabled_features] unless args[:enabled_features].nil?
606
+ @id = args[:id] unless args[:id].nil?
607
+ @instances = args[:instances] unless args[:instances].nil?
608
+ @kind = args[:kind] unless args[:kind].nil?
609
+ @last_updated_timestamp = args[:last_updated_timestamp] unless args[:last_updated_timestamp].nil?
610
+ @leaderboard_count = args[:leaderboard_count] unless args[:leaderboard_count].nil?
611
+ @name = args[:name] unless args[:name].nil?
612
+ @theme_color = args[:theme_color] unless args[:theme_color].nil?
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] unless args[:kind].nil?
643
+ @primary = args[:primary] unless args[:primary].nil?
644
+ @secondary = args[:secondary] unless args[:secondary].nil?
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] unless args[:kind].nil?
671
+ @player_id = args[:player_id] unless args[:player_id].nil?
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] unless args[:category].nil?
702
+ @experience_points = args[:experience_points] unless args[:experience_points].nil?
703
+ @kind = args[:kind] unless args[:kind].nil?
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] unless args[:items].nil?
734
+ @kind = args[:kind] unless args[:kind].nil?
735
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
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] unless args[:failure_cause].nil?
777
+ @kind = args[:kind] unless args[:kind].nil?
778
+ @range = args[:range] unless args[:range].nil?
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] unless args[:child_id].nil?
804
+ @kind = args[:kind] unless args[:kind].nil?
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] unless args[:child_events].nil?
866
+ @description = args[:description] unless args[:description].nil?
867
+ @display_name = args[:display_name] unless args[:display_name].nil?
868
+ @id = args[:id] unless args[:id].nil?
869
+ @image_url = args[:image_url] unless args[:image_url].nil?
870
+ @is_default_image_url = args[:is_default_image_url] unless args[:is_default_image_url].nil?
871
+ @kind = args[:kind] unless args[:kind].nil?
872
+ @visibility = args[:visibility] unless args[:visibility].nil?
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] unless args[:items].nil?
903
+ @kind = args[:kind] unless args[:kind].nil?
904
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
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] unless args[:kind].nil?
936
+ @period_end_millis = args[:period_end_millis] unless args[:period_end_millis].nil?
937
+ @period_start_millis = args[:period_start_millis] unless args[:period_start_millis].nil?
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] unless args[:kind].nil?
968
+ @time_period = args[:time_period] unless args[:time_period].nil?
969
+ @updates = args[:updates] unless args[:updates].nil?
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] unless args[:event_id].nil?
1004
+ @failure_cause = args[:failure_cause] unless args[:failure_cause].nil?
1005
+ @kind = args[:kind] unless args[:kind].nil?
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] unless args[:current_time_millis].nil?
1042
+ @kind = args[:kind] unless args[:kind].nil?
1043
+ @request_id = args[:request_id] unless args[:request_id].nil?
1044
+ @time_periods = args[:time_periods] unless args[:time_periods].nil?
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] unless args[:definition_id].nil?
1075
+ @kind = args[:kind] unless args[:kind].nil?
1076
+ @update_count = args[:update_count] unless args[:update_count].nil?
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] unless args[:batch_failures].nil?
1112
+ @event_failures = args[:event_failures] unless args[:event_failures].nil?
1113
+ @kind = args[:kind] unless args[:kind].nil?
1114
+ @player_events = args[:player_events] unless args[:player_events].nil?
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] unless args[:kind].nil?
1145
+ @request_id = args[:request_id] unless args[:request_id].nil?
1146
+ @steps = args[:steps] unless args[:steps].nil?
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] unless args[:kind].nil?
1172
+ @steps = args[:steps] unless args[:steps].nil?
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] unless args[:height].nil?
1213
+ @kind = args[:kind] unless args[:kind].nil?
1214
+ @name = args[:name] unless args[:name].nil?
1215
+ @url = args[:url] unless args[:url].nil?
1216
+ @width = args[:width] unless args[:width].nil?
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] unless args[:acquisition_uri].nil?
1283
+ @android_instance = args[:android_instance] unless args[:android_instance].nil?
1284
+ @ios_instance = args[:ios_instance] unless args[:ios_instance].nil?
1285
+ @kind = args[:kind] unless args[:kind].nil?
1286
+ @name = args[:name] unless args[:name].nil?
1287
+ @platform_type = args[:platform_type] unless args[:platform_type].nil?
1288
+ @realtime_play = args[:realtime_play] unless args[:realtime_play].nil?
1289
+ @turn_based_play = args[:turn_based_play] unless args[:turn_based_play].nil?
1290
+ @web_instance = args[:web_instance] unless args[:web_instance].nil?
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] unless args[:enable_piracy_check].nil?
1328
+ @kind = args[:kind] unless args[:kind].nil?
1329
+ @package_name = args[:package_name] unless args[:package_name].nil?
1330
+ @preferred = args[:preferred] unless args[:preferred].nil?
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] unless args[:bundle_identifier].nil?
1387
+ @itunes_app_id = args[:itunes_app_id] unless args[:itunes_app_id].nil?
1388
+ @kind = args[:kind] unless args[:kind].nil?
1389
+ @preferred_for_ipad = args[:preferred_for_ipad] unless args[:preferred_for_ipad].nil?
1390
+ @preferred_for_iphone = args[:preferred_for_iphone] unless args[:preferred_for_iphone].nil?
1391
+ @support_ipad = args[:support_ipad] unless args[:support_ipad].nil?
1392
+ @support_iphone = args[:support_iphone] unless args[:support_iphone].nil?
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] unless args[:kind].nil?
1424
+ @launch_url = args[:launch_url] unless args[:launch_url].nil?
1425
+ @preferred = args[:preferred] unless args[:preferred].nil?
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] unless args[:icon_url].nil?
1478
+ @id = args[:id] unless args[:id].nil?
1479
+ @is_icon_url_default = args[:is_icon_url_default] unless args[:is_icon_url_default].nil?
1480
+ @kind = args[:kind] unless args[:kind].nil?
1481
+ @name = args[:name] unless args[:name].nil?
1482
+ @order = args[:order] unless args[:order].nil?
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] unless args[:formatted_score].nil?
1549
+ @formatted_score_rank = args[:formatted_score_rank] unless args[:formatted_score_rank].nil?
1550
+ @kind = args[:kind] unless args[:kind].nil?
1551
+ @player = args[:player] unless args[:player].nil?
1552
+ @score_rank = args[:score_rank] unless args[:score_rank].nil?
1553
+ @score_tag = args[:score_tag] unless args[:score_tag].nil?
1554
+ @score_value = args[:score_value] unless args[:score_value].nil?
1555
+ @time_span = args[:time_span] unless args[:time_span].nil?
1556
+ @write_timestamp_millis = args[:write_timestamp_millis] unless args[:write_timestamp_millis].nil?
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] unless args[:items].nil?
1587
+ @kind = args[:kind] unless args[:kind].nil?
1588
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
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] unless args[:formatted_num_scores].nil?
1629
+ @formatted_rank = args[:formatted_rank] unless args[:formatted_rank].nil?
1630
+ @kind = args[:kind] unless args[:kind].nil?
1631
+ @num_scores = args[:num_scores] unless args[:num_scores].nil?
1632
+ @rank = args[:rank] unless args[:rank].nil?
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] unless args[:items].nil?
1678
+ @kind = args[:kind] unless args[:kind].nil?
1679
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
1680
+ @num_scores = args[:num_scores] unless args[:num_scores].nil?
1681
+ @player_score = args[:player_score] unless args[:player_score].nil?
1682
+ @prev_page_token = args[:prev_page_token] unless args[:prev_page_token].nil?
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] unless args[:current_version].nil?
1714
+ @kind = args[:kind] unless args[:kind].nil?
1715
+ @player_levels = args[:player_levels] unless args[:player_levels].nil?
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] unless args[:android_network_subtype].nil?
1774
+ @android_network_type = args[:android_network_type] unless args[:android_network_type].nil?
1775
+ @ios_network_type = args[:ios_network_type] unless args[:ios_network_type].nil?
1776
+ @kind = args[:kind] unless args[:kind].nil?
1777
+ @network_operator_code = args[:network_operator_code] unless args[:network_operator_code].nil?
1778
+ @network_operator_name = args[:network_operator_name] unless args[:network_operator_name].nil?
1779
+ @registration_latency_millis = args[:registration_latency_millis] unless args[:registration_latency_millis].nil?
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] unless args[:kind].nil?
1827
+ @participant_id = args[:participant_id] unless args[:participant_id].nil?
1828
+ @placing = args[:placing] unless args[:placing].nil?
1829
+ @result = args[:result] unless args[:result].nil?
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] unless args[:bytes_received].nil?
1885
+ @bytes_sent = args[:bytes_sent] unless args[:bytes_sent].nil?
1886
+ @kind = args[:kind] unless args[:kind].nil?
1887
+ @num_messages_lost = args[:num_messages_lost] unless args[:num_messages_lost].nil?
1888
+ @num_messages_received = args[:num_messages_received] unless args[:num_messages_received].nil?
1889
+ @num_messages_sent = args[:num_messages_sent] unless args[:num_messages_sent].nil?
1890
+ @num_send_failures = args[:num_send_failures] unless args[:num_send_failures].nil?
1891
+ @roundtrip_latency_millis = args[:roundtrip_latency_millis] unless args[:roundtrip_latency_millis].nil?
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] unless args[:connected_timestamp_millis].nil?
1932
+ @kind = args[:kind] unless args[:kind].nil?
1933
+ @participant_id = args[:participant_id] unless args[:participant_id].nil?
1934
+ @reliable_channel = args[:reliable_channel] unless args[:reliable_channel].nil?
1935
+ @unreliable_channel = args[:unreliable_channel] unless args[:unreliable_channel].nil?
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] unless args[:auto_matched].nil?
1969
+ @kind = args[:kind] unless args[:kind].nil?
1970
+ @time_millis = args[:time_millis] unless args[:time_millis].nil?
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 ID of the player.
2022
+ # Corresponds to the JSON property `playerId`
2023
+ # @return [String]
2024
+ attr_accessor :player_id
2025
+
2026
+ # The player's title rewarded for their game activities.
2027
+ # Corresponds to the JSON property `title`
2028
+ # @return [String]
2029
+ attr_accessor :title
2030
+
2031
+ def initialize(**args)
2032
+ update!(**args)
2033
+ end
2034
+
2035
+ # Update properties of this object
2036
+ def update!(**args)
2037
+ @avatar_image_url = args[:avatar_image_url] unless args[:avatar_image_url].nil?
2038
+ @banner_url_landscape = args[:banner_url_landscape] unless args[:banner_url_landscape].nil?
2039
+ @banner_url_portrait = args[:banner_url_portrait] unless args[:banner_url_portrait].nil?
2040
+ @display_name = args[:display_name] unless args[:display_name].nil?
2041
+ @experience_info = args[:experience_info] unless args[:experience_info].nil?
2042
+ @kind = args[:kind] unless args[:kind].nil?
2043
+ @last_played_with = args[:last_played_with] unless args[:last_played_with].nil?
2044
+ @name = args[:name] unless args[:name].nil?
2045
+ @player_id = args[:player_id] unless args[:player_id].nil?
2046
+ @title = args[:title] unless args[:title].nil?
2047
+ end
2048
+
2049
+ # An object representation of the individual components of the player's name.
2050
+ # For some players, these fields may not be present.
2051
+ class Name
2052
+ include Google::Apis::Core::Hashable
2053
+
2054
+ # The family name of this player. In some places, this is known as the last name.
2055
+ # Corresponds to the JSON property `familyName`
2056
+ # @return [String]
2057
+ attr_accessor :family_name
2058
+
2059
+ # The given name of this player. In some places, this is known as the first name.
2060
+ # Corresponds to the JSON property `givenName`
2061
+ # @return [String]
2062
+ attr_accessor :given_name
2063
+
2064
+ def initialize(**args)
2065
+ update!(**args)
2066
+ end
2067
+
2068
+ # Update properties of this object
2069
+ def update!(**args)
2070
+ @family_name = args[:family_name] unless args[:family_name].nil?
2071
+ @given_name = args[:given_name] unless args[:given_name].nil?
2072
+ end
2073
+ end
2074
+ end
2075
+
2076
+ # This is a JSON template for an achievement object.
2077
+ class PlayerAchievement
2078
+ include Google::Apis::Core::Hashable
2079
+
2080
+ # The state of the achievement.
2081
+ # Possible values are:
2082
+ # - "HIDDEN" - Achievement is hidden.
2083
+ # - "REVEALED" - Achievement is revealed.
2084
+ # - "UNLOCKED" - Achievement is unlocked.
2085
+ # Corresponds to the JSON property `achievementState`
2086
+ # @return [String]
2087
+ attr_accessor :achievement_state
2088
+
2089
+ # The current steps for an incremental achievement.
2090
+ # Corresponds to the JSON property `currentSteps`
2091
+ # @return [Fixnum]
2092
+ attr_accessor :current_steps
2093
+
2094
+ # Experience points earned for the achievement. This field is absent for
2095
+ # achievements that have not yet been unlocked and 0 for achievements that have
2096
+ # been unlocked by testers but that are unpublished.
2097
+ # Corresponds to the JSON property `experiencePoints`
2098
+ # @return [String]
2099
+ attr_accessor :experience_points
2100
+
2101
+ # The current steps for an incremental achievement as a string.
2102
+ # Corresponds to the JSON property `formattedCurrentStepsString`
2103
+ # @return [String]
2104
+ attr_accessor :formatted_current_steps_string
2105
+
2106
+ # The ID of the achievement.
2107
+ # Corresponds to the JSON property `id`
2108
+ # @return [String]
2109
+ attr_accessor :id
2110
+
2111
+ # Uniquely identifies the type of this resource. Value is always the fixed
2112
+ # string games#playerAchievement.
2113
+ # Corresponds to the JSON property `kind`
2114
+ # @return [String]
2115
+ attr_accessor :kind
2116
+
2117
+ # The timestamp of the last modification to this achievement's state.
2118
+ # Corresponds to the JSON property `lastUpdatedTimestamp`
2119
+ # @return [String]
2120
+ attr_accessor :last_updated_timestamp
2121
+
2122
+ def initialize(**args)
2123
+ update!(**args)
2124
+ end
2125
+
2126
+ # Update properties of this object
2127
+ def update!(**args)
2128
+ @achievement_state = args[:achievement_state] unless args[:achievement_state].nil?
2129
+ @current_steps = args[:current_steps] unless args[:current_steps].nil?
2130
+ @experience_points = args[:experience_points] unless args[:experience_points].nil?
2131
+ @formatted_current_steps_string = args[:formatted_current_steps_string] unless args[:formatted_current_steps_string].nil?
2132
+ @id = args[:id] unless args[:id].nil?
2133
+ @kind = args[:kind] unless args[:kind].nil?
2134
+ @last_updated_timestamp = args[:last_updated_timestamp] unless args[:last_updated_timestamp].nil?
2135
+ end
2136
+ end
2137
+
2138
+ # This is a JSON template for a list of achievement objects.
2139
+ class ListPlayerAchievementResponse
2140
+ include Google::Apis::Core::Hashable
2141
+
2142
+ # The achievements.
2143
+ # Corresponds to the JSON property `items`
2144
+ # @return [Array<Google::Apis::GamesV1::PlayerAchievement>]
2145
+ attr_accessor :items
2146
+
2147
+ # Uniquely identifies the type of this resource. Value is always the fixed
2148
+ # string games#playerAchievementListResponse.
2149
+ # Corresponds to the JSON property `kind`
2150
+ # @return [String]
2151
+ attr_accessor :kind
2152
+
2153
+ # Token corresponding to the next page of results.
2154
+ # Corresponds to the JSON property `nextPageToken`
2155
+ # @return [String]
2156
+ attr_accessor :next_page_token
2157
+
2158
+ def initialize(**args)
2159
+ update!(**args)
2160
+ end
2161
+
2162
+ # Update properties of this object
2163
+ def update!(**args)
2164
+ @items = args[:items] unless args[:items].nil?
2165
+ @kind = args[:kind] unless args[:kind].nil?
2166
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
2167
+ end
2168
+ end
2169
+
2170
+ # This is a JSON template for an event status resource.
2171
+ class PlayerEvent
2172
+ include Google::Apis::Core::Hashable
2173
+
2174
+ # The ID of the event definition.
2175
+ # Corresponds to the JSON property `definitionId`
2176
+ # @return [String]
2177
+ attr_accessor :definition_id
2178
+
2179
+ # The current number of times this event has occurred, as a string. The
2180
+ # formatting of this string depends on the configuration of your event in the
2181
+ # Play Games Developer Console.
2182
+ # Corresponds to the JSON property `formattedNumEvents`
2183
+ # @return [String]
2184
+ attr_accessor :formatted_num_events
2185
+
2186
+ # Uniquely identifies the type of this resource. Value is always the fixed
2187
+ # string games#playerEvent.
2188
+ # Corresponds to the JSON property `kind`
2189
+ # @return [String]
2190
+ attr_accessor :kind
2191
+
2192
+ # The current number of times this event has occurred.
2193
+ # Corresponds to the JSON property `numEvents`
2194
+ # @return [String]
2195
+ attr_accessor :num_events
2196
+
2197
+ # The ID of the player.
2198
+ # Corresponds to the JSON property `playerId`
2199
+ # @return [String]
2200
+ attr_accessor :player_id
2201
+
2202
+ def initialize(**args)
2203
+ update!(**args)
2204
+ end
2205
+
2206
+ # Update properties of this object
2207
+ def update!(**args)
2208
+ @definition_id = args[:definition_id] unless args[:definition_id].nil?
2209
+ @formatted_num_events = args[:formatted_num_events] unless args[:formatted_num_events].nil?
2210
+ @kind = args[:kind] unless args[:kind].nil?
2211
+ @num_events = args[:num_events] unless args[:num_events].nil?
2212
+ @player_id = args[:player_id] unless args[:player_id].nil?
2213
+ end
2214
+ end
2215
+
2216
+ # This is a JSON template for a ListByPlayer response.
2217
+ class ListPlayerEventResponse
2218
+ include Google::Apis::Core::Hashable
2219
+
2220
+ # The player events.
2221
+ # Corresponds to the JSON property `items`
2222
+ # @return [Array<Google::Apis::GamesV1::PlayerEvent>]
2223
+ attr_accessor :items
2224
+
2225
+ # Uniquely identifies the type of this resource. Value is always the fixed
2226
+ # string games#playerEventListResponse.
2227
+ # Corresponds to the JSON property `kind`
2228
+ # @return [String]
2229
+ attr_accessor :kind
2230
+
2231
+ # The pagination token for the next page of results.
2232
+ # Corresponds to the JSON property `nextPageToken`
2233
+ # @return [String]
2234
+ attr_accessor :next_page_token
2235
+
2236
+ def initialize(**args)
2237
+ update!(**args)
2238
+ end
2239
+
2240
+ # Update properties of this object
2241
+ def update!(**args)
2242
+ @items = args[:items] unless args[:items].nil?
2243
+ @kind = args[:kind] unless args[:kind].nil?
2244
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
2245
+ end
2246
+ end
2247
+
2248
+ # This is a JSON template for 1P/3P metadata about the player's experience.
2249
+ class PlayerExperienceInfo
2250
+ include Google::Apis::Core::Hashable
2251
+
2252
+ # The current number of experience points for the player.
2253
+ # Corresponds to the JSON property `currentExperiencePoints`
2254
+ # @return [String]
2255
+ attr_accessor :current_experience_points
2256
+
2257
+ # This is a JSON template for 1P/3P metadata about a user's level.
2258
+ # Corresponds to the JSON property `currentLevel`
2259
+ # @return [Google::Apis::GamesV1::PlayerLevel]
2260
+ attr_accessor :current_level
2261
+
2262
+ # Uniquely identifies the type of this resource. Value is always the fixed
2263
+ # string games#playerExperienceInfo.
2264
+ # Corresponds to the JSON property `kind`
2265
+ # @return [String]
2266
+ attr_accessor :kind
2267
+
2268
+ # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
2269
+ # Corresponds to the JSON property `lastLevelUpTimestampMillis`
2270
+ # @return [String]
2271
+ attr_accessor :last_level_up_timestamp_millis
2272
+
2273
+ # This is a JSON template for 1P/3P metadata about a user's level.
2274
+ # Corresponds to the JSON property `nextLevel`
2275
+ # @return [Google::Apis::GamesV1::PlayerLevel]
2276
+ attr_accessor :next_level
2277
+
2278
+ def initialize(**args)
2279
+ update!(**args)
2280
+ end
2281
+
2282
+ # Update properties of this object
2283
+ def update!(**args)
2284
+ @current_experience_points = args[:current_experience_points] unless args[:current_experience_points].nil?
2285
+ @current_level = args[:current_level] unless args[:current_level].nil?
2286
+ @kind = args[:kind] unless args[:kind].nil?
2287
+ @last_level_up_timestamp_millis = args[:last_level_up_timestamp_millis] unless args[:last_level_up_timestamp_millis].nil?
2288
+ @next_level = args[:next_level] unless args[:next_level].nil?
2289
+ end
2290
+ end
2291
+
2292
+ # This is a JSON template for a player leaderboard score object.
2293
+ class PlayerLeaderboardScore
2294
+ include Google::Apis::Core::Hashable
2295
+
2296
+ # Uniquely identifies the type of this resource. Value is always the fixed
2297
+ # string games#playerLeaderboardScore.
2298
+ # Corresponds to the JSON property `kind`
2299
+ # @return [String]
2300
+ attr_accessor :kind
2301
+
2302
+ # The ID of the leaderboard this score is in.
2303
+ # Corresponds to the JSON property `leaderboard_id`
2304
+ # @return [String]
2305
+ attr_accessor :leaderboard_id
2306
+
2307
+ # This is a JSON template for a score rank in a leaderboard.
2308
+ # Corresponds to the JSON property `publicRank`
2309
+ # @return [Google::Apis::GamesV1::LeaderboardScoreRank]
2310
+ attr_accessor :public_rank
2311
+
2312
+ # The formatted value of this score.
2313
+ # Corresponds to the JSON property `scoreString`
2314
+ # @return [String]
2315
+ attr_accessor :score_string
2316
+
2317
+ # Additional information about the score. Values must contain no more than 64
2318
+ # URI-safe characters as defined by section 2.3 of RFC 3986.
2319
+ # Corresponds to the JSON property `scoreTag`
2320
+ # @return [String]
2321
+ attr_accessor :score_tag
2322
+
2323
+ # The numerical value of this score.
2324
+ # Corresponds to the JSON property `scoreValue`
2325
+ # @return [String]
2326
+ attr_accessor :score_value
2327
+
2328
+ # This is a JSON template for a score rank in a leaderboard.
2329
+ # Corresponds to the JSON property `socialRank`
2330
+ # @return [Google::Apis::GamesV1::LeaderboardScoreRank]
2331
+ attr_accessor :social_rank
2332
+
2333
+ # The time span of this score.
2334
+ # Possible values are:
2335
+ # - "ALL_TIME" - The score is an all-time score.
2336
+ # - "WEEKLY" - The score is a weekly score.
2337
+ # - "DAILY" - The score is a daily score.
2338
+ # Corresponds to the JSON property `timeSpan`
2339
+ # @return [String]
2340
+ attr_accessor :time_span
2341
+
2342
+ # The timestamp at which this score was recorded, in milliseconds since the
2343
+ # epoch in UTC.
2344
+ # Corresponds to the JSON property `writeTimestamp`
2345
+ # @return [String]
2346
+ attr_accessor :write_timestamp
2347
+
2348
+ def initialize(**args)
2349
+ update!(**args)
2350
+ end
2351
+
2352
+ # Update properties of this object
2353
+ def update!(**args)
2354
+ @kind = args[:kind] unless args[:kind].nil?
2355
+ @leaderboard_id = args[:leaderboard_id] unless args[:leaderboard_id].nil?
2356
+ @public_rank = args[:public_rank] unless args[:public_rank].nil?
2357
+ @score_string = args[:score_string] unless args[:score_string].nil?
2358
+ @score_tag = args[:score_tag] unless args[:score_tag].nil?
2359
+ @score_value = args[:score_value] unless args[:score_value].nil?
2360
+ @social_rank = args[:social_rank] unless args[:social_rank].nil?
2361
+ @time_span = args[:time_span] unless args[:time_span].nil?
2362
+ @write_timestamp = args[:write_timestamp] unless args[:write_timestamp].nil?
2363
+ end
2364
+ end
2365
+
2366
+ # This is a JSON template for a list of player leaderboard scores.
2367
+ class ListPlayerLeaderboardScoreResponse
2368
+ include Google::Apis::Core::Hashable
2369
+
2370
+ # The leaderboard scores.
2371
+ # Corresponds to the JSON property `items`
2372
+ # @return [Array<Google::Apis::GamesV1::PlayerLeaderboardScore>]
2373
+ attr_accessor :items
2374
+
2375
+ # Uniquely identifies the type of this resource. Value is always the fixed
2376
+ # string games#playerLeaderboardScoreListResponse.
2377
+ # Corresponds to the JSON property `kind`
2378
+ # @return [String]
2379
+ attr_accessor :kind
2380
+
2381
+ # The pagination token for the next page of results.
2382
+ # Corresponds to the JSON property `nextPageToken`
2383
+ # @return [String]
2384
+ attr_accessor :next_page_token
2385
+
2386
+ # This is a JSON template for a Player resource.
2387
+ # Corresponds to the JSON property `player`
2388
+ # @return [Google::Apis::GamesV1::Player]
2389
+ attr_accessor :player
2390
+
2391
+ def initialize(**args)
2392
+ update!(**args)
2393
+ end
2394
+
2395
+ # Update properties of this object
2396
+ def update!(**args)
2397
+ @items = args[:items] unless args[:items].nil?
2398
+ @kind = args[:kind] unless args[:kind].nil?
2399
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
2400
+ @player = args[:player] unless args[:player].nil?
2401
+ end
2402
+ end
2403
+
2404
+ # This is a JSON template for 1P/3P metadata about a user's level.
2405
+ class PlayerLevel
2406
+ include Google::Apis::Core::Hashable
2407
+
2408
+ # Uniquely identifies the type of this resource. Value is always the fixed
2409
+ # string games#playerLevel.
2410
+ # Corresponds to the JSON property `kind`
2411
+ # @return [String]
2412
+ attr_accessor :kind
2413
+
2414
+ # The level for the user.
2415
+ # Corresponds to the JSON property `level`
2416
+ # @return [Fixnum]
2417
+ attr_accessor :level
2418
+
2419
+ # The maximum experience points for this level.
2420
+ # Corresponds to the JSON property `maxExperiencePoints`
2421
+ # @return [String]
2422
+ attr_accessor :max_experience_points
2423
+
2424
+ # The minimum experience points for this level.
2425
+ # Corresponds to the JSON property `minExperiencePoints`
2426
+ # @return [String]
2427
+ attr_accessor :min_experience_points
2428
+
2429
+ def initialize(**args)
2430
+ update!(**args)
2431
+ end
2432
+
2433
+ # Update properties of this object
2434
+ def update!(**args)
2435
+ @kind = args[:kind] unless args[:kind].nil?
2436
+ @level = args[:level] unless args[:level].nil?
2437
+ @max_experience_points = args[:max_experience_points] unless args[:max_experience_points].nil?
2438
+ @min_experience_points = args[:min_experience_points] unless args[:min_experience_points].nil?
2439
+ end
2440
+ end
2441
+
2442
+ # This is a JSON template for a third party player list response.
2443
+ class ListPlayerResponse
2444
+ include Google::Apis::Core::Hashable
2445
+
2446
+ # The players.
2447
+ # Corresponds to the JSON property `items`
2448
+ # @return [Array<Google::Apis::GamesV1::Player>]
2449
+ attr_accessor :items
2450
+
2451
+ # Uniquely identifies the type of this resource. Value is always the fixed
2452
+ # string games#playerListResponse.
2453
+ # Corresponds to the JSON property `kind`
2454
+ # @return [String]
2455
+ attr_accessor :kind
2456
+
2457
+ # Token corresponding to the next page of results.
2458
+ # Corresponds to the JSON property `nextPageToken`
2459
+ # @return [String]
2460
+ attr_accessor :next_page_token
2461
+
2462
+ def initialize(**args)
2463
+ update!(**args)
2464
+ end
2465
+
2466
+ # Update properties of this object
2467
+ def update!(**args)
2468
+ @items = args[:items] unless args[:items].nil?
2469
+ @kind = args[:kind] unless args[:kind].nil?
2470
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
2471
+ end
2472
+ end
2473
+
2474
+ # This is a JSON template for a player score.
2475
+ class PlayerScore
2476
+ include Google::Apis::Core::Hashable
2477
+
2478
+ # The formatted score for this player score.
2479
+ # Corresponds to the JSON property `formattedScore`
2480
+ # @return [String]
2481
+ attr_accessor :formatted_score
2482
+
2483
+ # Uniquely identifies the type of this resource. Value is always the fixed
2484
+ # string games#playerScore.
2485
+ # Corresponds to the JSON property `kind`
2486
+ # @return [String]
2487
+ attr_accessor :kind
2488
+
2489
+ # The numerical value for this player score.
2490
+ # Corresponds to the JSON property `score`
2491
+ # @return [String]
2492
+ attr_accessor :score
2493
+
2494
+ # Additional information about this score. Values will contain no more than 64
2495
+ # URI-safe characters as defined by section 2.3 of RFC 3986.
2496
+ # Corresponds to the JSON property `scoreTag`
2497
+ # @return [String]
2498
+ attr_accessor :score_tag
2499
+
2500
+ # The time span for this player score.
2501
+ # Possible values are:
2502
+ # - "ALL_TIME" - The score is an all-time score.
2503
+ # - "WEEKLY" - The score is a weekly score.
2504
+ # - "DAILY" - The score is a daily score.
2505
+ # Corresponds to the JSON property `timeSpan`
2506
+ # @return [String]
2507
+ attr_accessor :time_span
2508
+
2509
+ def initialize(**args)
2510
+ update!(**args)
2511
+ end
2512
+
2513
+ # Update properties of this object
2514
+ def update!(**args)
2515
+ @formatted_score = args[:formatted_score] unless args[:formatted_score].nil?
2516
+ @kind = args[:kind] unless args[:kind].nil?
2517
+ @score = args[:score] unless args[:score].nil?
2518
+ @score_tag = args[:score_tag] unless args[:score_tag].nil?
2519
+ @time_span = args[:time_span] unless args[:time_span].nil?
2520
+ end
2521
+ end
2522
+
2523
+ # This is a JSON template for a list of score submission statuses.
2524
+ class ListPlayerScoreResponse
2525
+ include Google::Apis::Core::Hashable
2526
+
2527
+ # Uniquely identifies the type of this resource. Value is always the fixed
2528
+ # string games#playerScoreListResponse.
2529
+ # Corresponds to the JSON property `kind`
2530
+ # @return [String]
2531
+ attr_accessor :kind
2532
+
2533
+ # The score submissions statuses.
2534
+ # Corresponds to the JSON property `submittedScores`
2535
+ # @return [Array<Google::Apis::GamesV1::PlayerScoreResponse>]
2536
+ attr_accessor :submitted_scores
2537
+
2538
+ def initialize(**args)
2539
+ update!(**args)
2540
+ end
2541
+
2542
+ # Update properties of this object
2543
+ def update!(**args)
2544
+ @kind = args[:kind] unless args[:kind].nil?
2545
+ @submitted_scores = args[:submitted_scores] unless args[:submitted_scores].nil?
2546
+ end
2547
+ end
2548
+
2549
+ # This is a JSON template for a list of leaderboard entry resources.
2550
+ class PlayerScoreResponse
2551
+ include Google::Apis::Core::Hashable
2552
+
2553
+ # The time spans where the submitted score is better than the existing score for
2554
+ # that time span.
2555
+ # Possible values are:
2556
+ # - "ALL_TIME" - The score is an all-time score.
2557
+ # - "WEEKLY" - The score is a weekly score.
2558
+ # - "DAILY" - The score is a daily score.
2559
+ # Corresponds to the JSON property `beatenScoreTimeSpans`
2560
+ # @return [Array<String>]
2561
+ attr_accessor :beaten_score_time_spans
2562
+
2563
+ # The formatted value of the submitted score.
2564
+ # Corresponds to the JSON property `formattedScore`
2565
+ # @return [String]
2566
+ attr_accessor :formatted_score
2567
+
2568
+ # Uniquely identifies the type of this resource. Value is always the fixed
2569
+ # string games#playerScoreResponse.
2570
+ # Corresponds to the JSON property `kind`
2571
+ # @return [String]
2572
+ attr_accessor :kind
2573
+
2574
+ # The leaderboard ID that this score was submitted to.
2575
+ # Corresponds to the JSON property `leaderboardId`
2576
+ # @return [String]
2577
+ attr_accessor :leaderboard_id
2578
+
2579
+ # Additional information about this score. Values will contain no more than 64
2580
+ # URI-safe characters as defined by section 2.3 of RFC 3986.
2581
+ # Corresponds to the JSON property `scoreTag`
2582
+ # @return [String]
2583
+ attr_accessor :score_tag
2584
+
2585
+ # The scores in time spans that have not been beaten. As an example, the
2586
+ # submitted score may be better than the player's DAILY score, but not better
2587
+ # than the player's scores for the WEEKLY or ALL_TIME time spans.
2588
+ # Corresponds to the JSON property `unbeatenScores`
2589
+ # @return [Array<Google::Apis::GamesV1::PlayerScore>]
2590
+ attr_accessor :unbeaten_scores
2591
+
2592
+ def initialize(**args)
2593
+ update!(**args)
2594
+ end
2595
+
2596
+ # Update properties of this object
2597
+ def update!(**args)
2598
+ @beaten_score_time_spans = args[:beaten_score_time_spans] unless args[:beaten_score_time_spans].nil?
2599
+ @formatted_score = args[:formatted_score] unless args[:formatted_score].nil?
2600
+ @kind = args[:kind] unless args[:kind].nil?
2601
+ @leaderboard_id = args[:leaderboard_id] unless args[:leaderboard_id].nil?
2602
+ @score_tag = args[:score_tag] unless args[:score_tag].nil?
2603
+ @unbeaten_scores = args[:unbeaten_scores] unless args[:unbeaten_scores].nil?
2604
+ end
2605
+ end
2606
+
2607
+ # This is a JSON template for a list of score submission requests
2608
+ class PlayerScoreSubmissionList
2609
+ include Google::Apis::Core::Hashable
2610
+
2611
+ # Uniquely identifies the type of this resource. Value is always the fixed
2612
+ # string games#playerScoreSubmissionList.
2613
+ # Corresponds to the JSON property `kind`
2614
+ # @return [String]
2615
+ attr_accessor :kind
2616
+
2617
+ # The score submissions.
2618
+ # Corresponds to the JSON property `scores`
2619
+ # @return [Array<Google::Apis::GamesV1::ScoreSubmission>]
2620
+ attr_accessor :scores
2621
+
2622
+ def initialize(**args)
2623
+ update!(**args)
2624
+ end
2625
+
2626
+ # Update properties of this object
2627
+ def update!(**args)
2628
+ @kind = args[:kind] unless args[:kind].nil?
2629
+ @scores = args[:scores] unless args[:scores].nil?
2630
+ end
2631
+ end
2632
+
2633
+ # This is a JSON template for a push token resource.
2634
+ class PushToken
2635
+ include Google::Apis::Core::Hashable
2636
+
2637
+ # The revision of the client SDK used by your application, in the same format
2638
+ # that's used by revisions.check. Used to send backward compatible messages.
2639
+ # Format: [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are:
2640
+ #
2641
+ # - IOS - Push token is for iOS
2642
+ # Corresponds to the JSON property `clientRevision`
2643
+ # @return [String]
2644
+ attr_accessor :client_revision
2645
+
2646
+ # This is a JSON template for a push token ID resource.
2647
+ # Corresponds to the JSON property `id`
2648
+ # @return [Google::Apis::GamesV1::PushTokenId]
2649
+ attr_accessor :id
2650
+
2651
+ # Uniquely identifies the type of this resource. Value is always the fixed
2652
+ # string games#pushToken.
2653
+ # Corresponds to the JSON property `kind`
2654
+ # @return [String]
2655
+ attr_accessor :kind
2656
+
2657
+ # The preferred language for notifications that are sent using this token.
2658
+ # Corresponds to the JSON property `language`
2659
+ # @return [String]
2660
+ attr_accessor :language
2661
+
2662
+ def initialize(**args)
2663
+ update!(**args)
2664
+ end
2665
+
2666
+ # Update properties of this object
2667
+ def update!(**args)
2668
+ @client_revision = args[:client_revision] unless args[:client_revision].nil?
2669
+ @id = args[:id] unless args[:id].nil?
2670
+ @kind = args[:kind] unless args[:kind].nil?
2671
+ @language = args[:language] unless args[:language].nil?
2672
+ end
2673
+ end
2674
+
2675
+ # This is a JSON template for a push token ID resource.
2676
+ class PushTokenId
2677
+ include Google::Apis::Core::Hashable
2678
+
2679
+ # A push token ID for iOS devices.
2680
+ # Corresponds to the JSON property `ios`
2681
+ # @return [Google::Apis::GamesV1::PushTokenId::Ios]
2682
+ attr_accessor :ios
2683
+
2684
+ # Uniquely identifies the type of this resource. Value is always the fixed
2685
+ # string games#pushTokenId.
2686
+ # Corresponds to the JSON property `kind`
2687
+ # @return [String]
2688
+ attr_accessor :kind
2689
+
2690
+ def initialize(**args)
2691
+ update!(**args)
2692
+ end
2693
+
2694
+ # Update properties of this object
2695
+ def update!(**args)
2696
+ @ios = args[:ios] unless args[:ios].nil?
2697
+ @kind = args[:kind] unless args[:kind].nil?
2698
+ end
2699
+
2700
+ # A push token ID for iOS devices.
2701
+ class Ios
2702
+ include Google::Apis::Core::Hashable
2703
+
2704
+ # Device token supplied by an iOS system call to register for remote
2705
+ # notifications. Encode this field as web-safe base64.
2706
+ # Corresponds to the JSON property `apns_device_token`
2707
+ # @return [String]
2708
+ attr_accessor :apns_device_token
2709
+
2710
+ # Indicates whether this token should be used for the production or sandbox APNS
2711
+ # server.
2712
+ # Corresponds to the JSON property `apns_environment`
2713
+ # @return [String]
2714
+ attr_accessor :apns_environment
2715
+
2716
+ def initialize(**args)
2717
+ update!(**args)
2718
+ end
2719
+
2720
+ # Update properties of this object
2721
+ def update!(**args)
2722
+ @apns_device_token = args[:apns_device_token] unless args[:apns_device_token].nil?
2723
+ @apns_environment = args[:apns_environment] unless args[:apns_environment].nil?
2724
+ end
2725
+ end
2726
+ end
2727
+
2728
+ # This is a JSON template for a Quest resource.
2729
+ class Quest
2730
+ include Google::Apis::Core::Hashable
2731
+
2732
+ # The timestamp at which the user accepted the quest in milliseconds since the
2733
+ # epoch in UTC. Only present if the player has accepted the quest.
2734
+ # Corresponds to the JSON property `acceptedTimestampMillis`
2735
+ # @return [String]
2736
+ attr_accessor :accepted_timestamp_millis
2737
+
2738
+ # The ID of the application this quest is part of.
2739
+ # Corresponds to the JSON property `applicationId`
2740
+ # @return [String]
2741
+ attr_accessor :application_id
2742
+
2743
+ # The banner image URL for the quest.
2744
+ # Corresponds to the JSON property `bannerUrl`
2745
+ # @return [String]
2746
+ attr_accessor :banner_url
2747
+
2748
+ # The description of the quest.
2749
+ # Corresponds to the JSON property `description`
2750
+ # @return [String]
2751
+ attr_accessor :description
2752
+
2753
+ # The timestamp at which the quest ceases to be active in milliseconds since the
2754
+ # epoch in UTC.
2755
+ # Corresponds to the JSON property `endTimestampMillis`
2756
+ # @return [String]
2757
+ attr_accessor :end_timestamp_millis
2758
+
2759
+ # The icon image URL for the quest.
2760
+ # Corresponds to the JSON property `iconUrl`
2761
+ # @return [String]
2762
+ attr_accessor :icon_url
2763
+
2764
+ # The ID of the quest.
2765
+ # Corresponds to the JSON property `id`
2766
+ # @return [String]
2767
+ attr_accessor :id
2768
+
2769
+ # Indicates whether the banner image being returned is a default image, or is
2770
+ # game-provided.
2771
+ # Corresponds to the JSON property `isDefaultBannerUrl`
2772
+ # @return [Boolean]
2773
+ attr_accessor :is_default_banner_url
2774
+ alias_method :is_default_banner_url?, :is_default_banner_url
2775
+
2776
+ # Indicates whether the icon image being returned is a default image, or is game-
2777
+ # provided.
2778
+ # Corresponds to the JSON property `isDefaultIconUrl`
2779
+ # @return [Boolean]
2780
+ attr_accessor :is_default_icon_url
2781
+ alias_method :is_default_icon_url?, :is_default_icon_url
2782
+
2783
+ # Uniquely identifies the type of this resource. Value is always the fixed
2784
+ # string games#quest.
2785
+ # Corresponds to the JSON property `kind`
2786
+ # @return [String]
2787
+ attr_accessor :kind
2788
+
2789
+ # The timestamp at which the quest was last updated by the user in milliseconds
2790
+ # since the epoch in UTC. Only present if the player has accepted the quest.
2791
+ # Corresponds to the JSON property `lastUpdatedTimestampMillis`
2792
+ # @return [String]
2793
+ attr_accessor :last_updated_timestamp_millis
2794
+
2795
+ # The quest milestones.
2796
+ # Corresponds to the JSON property `milestones`
2797
+ # @return [Array<Google::Apis::GamesV1::QuestMilestone>]
2798
+ attr_accessor :milestones
2799
+
2800
+ # The name of the quest.
2801
+ # Corresponds to the JSON property `name`
2802
+ # @return [String]
2803
+ attr_accessor :name
2804
+
2805
+ # The timestamp at which the user should be notified that the quest will end
2806
+ # soon in milliseconds since the epoch in UTC.
2807
+ # Corresponds to the JSON property `notifyTimestampMillis`
2808
+ # @return [String]
2809
+ attr_accessor :notify_timestamp_millis
2810
+
2811
+ # The timestamp at which the quest becomes active in milliseconds since the
2812
+ # epoch in UTC.
2813
+ # Corresponds to the JSON property `startTimestampMillis`
2814
+ # @return [String]
2815
+ attr_accessor :start_timestamp_millis
2816
+
2817
+ # The state of the quest.
2818
+ # Possible values are:
2819
+ # - "UPCOMING": The quest is upcoming. The user can see the quest, but cannot
2820
+ # accept it until it is open.
2821
+ # - "OPEN": The quest is currently open and may be accepted at this time.
2822
+ # - "ACCEPTED": The user is currently participating in this quest.
2823
+ # - "COMPLETED": The user has completed the quest.
2824
+ # - "FAILED": The quest was attempted but was not completed before the deadline
2825
+ # expired.
2826
+ # - "EXPIRED": The quest has expired and was not accepted.
2827
+ # - "DELETED": The quest should be deleted from the local database.
2828
+ # Corresponds to the JSON property `state`
2829
+ # @return [String]
2830
+ attr_accessor :state
2831
+
2832
+ def initialize(**args)
2833
+ update!(**args)
2834
+ end
2835
+
2836
+ # Update properties of this object
2837
+ def update!(**args)
2838
+ @accepted_timestamp_millis = args[:accepted_timestamp_millis] unless args[:accepted_timestamp_millis].nil?
2839
+ @application_id = args[:application_id] unless args[:application_id].nil?
2840
+ @banner_url = args[:banner_url] unless args[:banner_url].nil?
2841
+ @description = args[:description] unless args[:description].nil?
2842
+ @end_timestamp_millis = args[:end_timestamp_millis] unless args[:end_timestamp_millis].nil?
2843
+ @icon_url = args[:icon_url] unless args[:icon_url].nil?
2844
+ @id = args[:id] unless args[:id].nil?
2845
+ @is_default_banner_url = args[:is_default_banner_url] unless args[:is_default_banner_url].nil?
2846
+ @is_default_icon_url = args[:is_default_icon_url] unless args[:is_default_icon_url].nil?
2847
+ @kind = args[:kind] unless args[:kind].nil?
2848
+ @last_updated_timestamp_millis = args[:last_updated_timestamp_millis] unless args[:last_updated_timestamp_millis].nil?
2849
+ @milestones = args[:milestones] unless args[:milestones].nil?
2850
+ @name = args[:name] unless args[:name].nil?
2851
+ @notify_timestamp_millis = args[:notify_timestamp_millis] unless args[:notify_timestamp_millis].nil?
2852
+ @start_timestamp_millis = args[:start_timestamp_millis] unless args[:start_timestamp_millis].nil?
2853
+ @state = args[:state] unless args[:state].nil?
2854
+ end
2855
+ end
2856
+
2857
+ # This is a JSON template for a Quest Criterion Contribution resource.
2858
+ class QuestContribution
2859
+ include Google::Apis::Core::Hashable
2860
+
2861
+ # The formatted value of the contribution as a string. Format depends on the
2862
+ # configuration for the associated event definition in the Play Games Developer
2863
+ # Console.
2864
+ # Corresponds to the JSON property `formattedValue`
2865
+ # @return [String]
2866
+ attr_accessor :formatted_value
2867
+
2868
+ # Uniquely identifies the type of this resource. Value is always the fixed
2869
+ # string games#questContribution.
2870
+ # Corresponds to the JSON property `kind`
2871
+ # @return [String]
2872
+ attr_accessor :kind
2873
+
2874
+ # The value of the contribution.
2875
+ # Corresponds to the JSON property `value`
2876
+ # @return [String]
2877
+ attr_accessor :value
2878
+
2879
+ def initialize(**args)
2880
+ update!(**args)
2881
+ end
2882
+
2883
+ # Update properties of this object
2884
+ def update!(**args)
2885
+ @formatted_value = args[:formatted_value] unless args[:formatted_value].nil?
2886
+ @kind = args[:kind] unless args[:kind].nil?
2887
+ @value = args[:value] unless args[:value].nil?
2888
+ end
2889
+ end
2890
+
2891
+ # This is a JSON template for a Quest Criterion resource.
2892
+ class QuestCriterion
2893
+ include Google::Apis::Core::Hashable
2894
+
2895
+ # This is a JSON template for a Quest Criterion Contribution resource.
2896
+ # Corresponds to the JSON property `completionContribution`
2897
+ # @return [Google::Apis::GamesV1::QuestContribution]
2898
+ attr_accessor :completion_contribution
2899
+
2900
+ # This is a JSON template for a Quest Criterion Contribution resource.
2901
+ # Corresponds to the JSON property `currentContribution`
2902
+ # @return [Google::Apis::GamesV1::QuestContribution]
2903
+ attr_accessor :current_contribution
2904
+
2905
+ # The ID of the event the criterion corresponds to.
2906
+ # Corresponds to the JSON property `eventId`
2907
+ # @return [String]
2908
+ attr_accessor :event_id
2909
+
2910
+ # This is a JSON template for a Quest Criterion Contribution resource.
2911
+ # Corresponds to the JSON property `initialPlayerProgress`
2912
+ # @return [Google::Apis::GamesV1::QuestContribution]
2913
+ attr_accessor :initial_player_progress
2914
+
2915
+ # Uniquely identifies the type of this resource. Value is always the fixed
2916
+ # string games#questCriterion.
2917
+ # Corresponds to the JSON property `kind`
2918
+ # @return [String]
2919
+ attr_accessor :kind
2920
+
2921
+ def initialize(**args)
2922
+ update!(**args)
2923
+ end
2924
+
2925
+ # Update properties of this object
2926
+ def update!(**args)
2927
+ @completion_contribution = args[:completion_contribution] unless args[:completion_contribution].nil?
2928
+ @current_contribution = args[:current_contribution] unless args[:current_contribution].nil?
2929
+ @event_id = args[:event_id] unless args[:event_id].nil?
2930
+ @initial_player_progress = args[:initial_player_progress] unless args[:initial_player_progress].nil?
2931
+ @kind = args[:kind] unless args[:kind].nil?
2932
+ end
2933
+ end
2934
+
2935
+ # This is a JSON template for a list of quest objects.
2936
+ class ListQuestResponse
2937
+ include Google::Apis::Core::Hashable
2938
+
2939
+ # The quests.
2940
+ # Corresponds to the JSON property `items`
2941
+ # @return [Array<Google::Apis::GamesV1::Quest>]
2942
+ attr_accessor :items
2943
+
2944
+ # Uniquely identifies the type of this resource. Value is always the fixed
2945
+ # string games#questListResponse.
2946
+ # Corresponds to the JSON property `kind`
2947
+ # @return [String]
2948
+ attr_accessor :kind
2949
+
2950
+ # Token corresponding to the next page of results.
2951
+ # Corresponds to the JSON property `nextPageToken`
2952
+ # @return [String]
2953
+ attr_accessor :next_page_token
2954
+
2955
+ def initialize(**args)
2956
+ update!(**args)
2957
+ end
2958
+
2959
+ # Update properties of this object
2960
+ def update!(**args)
2961
+ @items = args[:items] unless args[:items].nil?
2962
+ @kind = args[:kind] unless args[:kind].nil?
2963
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
2964
+ end
2965
+ end
2966
+
2967
+ # This is a JSON template for a Quest Milestone resource.
2968
+ class QuestMilestone
2969
+ include Google::Apis::Core::Hashable
2970
+
2971
+ # The completion reward data of the milestone, represented as a Base64-encoded
2972
+ # string. This is a developer-specified binary blob with size between 0 and 2 KB
2973
+ # before encoding.
2974
+ # Corresponds to the JSON property `completionRewardData`
2975
+ # @return [String]
2976
+ attr_accessor :completion_reward_data
2977
+
2978
+ # The criteria of the milestone.
2979
+ # Corresponds to the JSON property `criteria`
2980
+ # @return [Array<Google::Apis::GamesV1::QuestCriterion>]
2981
+ attr_accessor :criteria
2982
+
2983
+ # The milestone ID.
2984
+ # Corresponds to the JSON property `id`
2985
+ # @return [String]
2986
+ attr_accessor :id
2987
+
2988
+ # Uniquely identifies the type of this resource. Value is always the fixed
2989
+ # string games#questMilestone.
2990
+ # Corresponds to the JSON property `kind`
2991
+ # @return [String]
2992
+ attr_accessor :kind
2993
+
2994
+ # The current state of the milestone.
2995
+ # Possible values are:
2996
+ # - "COMPLETED_NOT_CLAIMED" - The milestone is complete, but has not yet been
2997
+ # claimed.
2998
+ # - "CLAIMED" - The milestone is complete and has been claimed.
2999
+ # - "NOT_COMPLETED" - The milestone has not yet been completed.
3000
+ # - "NOT_STARTED" - The milestone is for a quest that has not yet been accepted.
3001
+ # Corresponds to the JSON property `state`
3002
+ # @return [String]
3003
+ attr_accessor :state
3004
+
3005
+ def initialize(**args)
3006
+ update!(**args)
3007
+ end
3008
+
3009
+ # Update properties of this object
3010
+ def update!(**args)
3011
+ @completion_reward_data = args[:completion_reward_data] unless args[:completion_reward_data].nil?
3012
+ @criteria = args[:criteria] unless args[:criteria].nil?
3013
+ @id = args[:id] unless args[:id].nil?
3014
+ @kind = args[:kind] unless args[:kind].nil?
3015
+ @state = args[:state] unless args[:state].nil?
3016
+ end
3017
+ end
3018
+
3019
+ # This is a JSON template for the result of checking a revision.
3020
+ class CheckRevisionResponse
3021
+ include Google::Apis::Core::Hashable
3022
+
3023
+ # The version of the API this client revision should use when calling API
3024
+ # methods.
3025
+ # Corresponds to the JSON property `apiVersion`
3026
+ # @return [String]
3027
+ attr_accessor :api_version
3028
+
3029
+ # Uniquely identifies the type of this resource. Value is always the fixed
3030
+ # string games#revisionCheckResponse.
3031
+ # Corresponds to the JSON property `kind`
3032
+ # @return [String]
3033
+ attr_accessor :kind
3034
+
3035
+ # The result of the revision check.
3036
+ # Possible values are:
3037
+ # - "OK" - The revision being used is current.
3038
+ # - "DEPRECATED" - There is currently a newer version available, but the
3039
+ # revision being used still works.
3040
+ # - "INVALID" - The revision being used is not supported in any released version.
3041
+ # Corresponds to the JSON property `revisionStatus`
3042
+ # @return [String]
3043
+ attr_accessor :revision_status
3044
+
3045
+ def initialize(**args)
3046
+ update!(**args)
3047
+ end
3048
+
3049
+ # Update properties of this object
3050
+ def update!(**args)
3051
+ @api_version = args[:api_version] unless args[:api_version].nil?
3052
+ @kind = args[:kind] unless args[:kind].nil?
3053
+ @revision_status = args[:revision_status] unless args[:revision_status].nil?
3054
+ end
3055
+ end
3056
+
3057
+ # This is a JSON template for a room resource object.
3058
+ class Room
3059
+ include Google::Apis::Core::Hashable
3060
+
3061
+ # The ID of the application being played.
3062
+ # Corresponds to the JSON property `applicationId`
3063
+ # @return [String]
3064
+ attr_accessor :application_id
3065
+
3066
+ # This is a JSON template for a room auto-match criteria object.
3067
+ # Corresponds to the JSON property `autoMatchingCriteria`
3068
+ # @return [Google::Apis::GamesV1::RoomAutoMatchingCriteria]
3069
+ attr_accessor :auto_matching_criteria
3070
+
3071
+ # This is a JSON template for status of room automatching that is in progress.
3072
+ # Corresponds to the JSON property `autoMatchingStatus`
3073
+ # @return [Google::Apis::GamesV1::RoomAutoMatchStatus]
3074
+ attr_accessor :auto_matching_status
3075
+
3076
+ # This is a JSON template for room modification metadata.
3077
+ # Corresponds to the JSON property `creationDetails`
3078
+ # @return [Google::Apis::GamesV1::RoomModification]
3079
+ attr_accessor :creation_details
3080
+
3081
+ # This short description is generated by our servers and worded relative to the
3082
+ # player requesting the room. It is intended to be displayed when the room is
3083
+ # shown in a list (that is, an invitation to a room.)
3084
+ # Corresponds to the JSON property `description`
3085
+ # @return [String]
3086
+ attr_accessor :description
3087
+
3088
+ # The ID of the participant that invited the user to the room. Not set if the
3089
+ # user was not invited to the room.
3090
+ # Corresponds to the JSON property `inviterId`
3091
+ # @return [String]
3092
+ attr_accessor :inviter_id
3093
+
3094
+ # Uniquely identifies the type of this resource. Value is always the fixed
3095
+ # string games#room.
3096
+ # Corresponds to the JSON property `kind`
3097
+ # @return [String]
3098
+ attr_accessor :kind
3099
+
3100
+ # This is a JSON template for room modification metadata.
3101
+ # Corresponds to the JSON property `lastUpdateDetails`
3102
+ # @return [Google::Apis::GamesV1::RoomModification]
3103
+ attr_accessor :last_update_details
3104
+
3105
+ # The participants involved in the room, along with their statuses. Includes
3106
+ # participants who have left or declined invitations.
3107
+ # Corresponds to the JSON property `participants`
3108
+ # @return [Array<Google::Apis::GamesV1::RoomParticipant>]
3109
+ attr_accessor :participants
3110
+
3111
+ # Globally unique ID for a room.
3112
+ # Corresponds to the JSON property `roomId`
3113
+ # @return [String]
3114
+ attr_accessor :room_id
3115
+
3116
+ # The version of the room status: an increasing counter, used by the client to
3117
+ # ignore out-of-order updates to room status.
3118
+ # Corresponds to the JSON property `roomStatusVersion`
3119
+ # @return [Fixnum]
3120
+ attr_accessor :room_status_version
3121
+
3122
+ # The status of the room.
3123
+ # Possible values are:
3124
+ # - "ROOM_INVITING" - One or more players have been invited and not responded.
3125
+ # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching.
3126
+ # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (
3127
+ # either before or after auto-matching).
3128
+ # - "ROOM_ACTIVE" - All players have joined and connected to each other.
3129
+ # - "ROOM_DELETED" - The room should no longer be shown on the client. Returned
3130
+ # in sync calls when a player joins a room (as a tombstone), or for rooms where
3131
+ # all joined participants have left.
3132
+ # Corresponds to the JSON property `status`
3133
+ # @return [String]
3134
+ attr_accessor :status
3135
+
3136
+ # The variant / mode of the application being played; can be any integer value,
3137
+ # or left blank.
3138
+ # Corresponds to the JSON property `variant`
3139
+ # @return [Fixnum]
3140
+ attr_accessor :variant
3141
+
3142
+ def initialize(**args)
3143
+ update!(**args)
3144
+ end
3145
+
3146
+ # Update properties of this object
3147
+ def update!(**args)
3148
+ @application_id = args[:application_id] unless args[:application_id].nil?
3149
+ @auto_matching_criteria = args[:auto_matching_criteria] unless args[:auto_matching_criteria].nil?
3150
+ @auto_matching_status = args[:auto_matching_status] unless args[:auto_matching_status].nil?
3151
+ @creation_details = args[:creation_details] unless args[:creation_details].nil?
3152
+ @description = args[:description] unless args[:description].nil?
3153
+ @inviter_id = args[:inviter_id] unless args[:inviter_id].nil?
3154
+ @kind = args[:kind] unless args[:kind].nil?
3155
+ @last_update_details = args[:last_update_details] unless args[:last_update_details].nil?
3156
+ @participants = args[:participants] unless args[:participants].nil?
3157
+ @room_id = args[:room_id] unless args[:room_id].nil?
3158
+ @room_status_version = args[:room_status_version] unless args[:room_status_version].nil?
3159
+ @status = args[:status] unless args[:status].nil?
3160
+ @variant = args[:variant] unless args[:variant].nil?
3161
+ end
3162
+ end
3163
+
3164
+ # This is a JSON template for status of room automatching that is in progress.
3165
+ class RoomAutoMatchStatus
3166
+ include Google::Apis::Core::Hashable
3167
+
3168
+ # Uniquely identifies the type of this resource. Value is always the fixed
3169
+ # string games#roomAutoMatchStatus.
3170
+ # Corresponds to the JSON property `kind`
3171
+ # @return [String]
3172
+ attr_accessor :kind
3173
+
3174
+ # An estimate for the amount of time (in seconds) that auto-matching is expected
3175
+ # to take to complete.
3176
+ # Corresponds to the JSON property `waitEstimateSeconds`
3177
+ # @return [Fixnum]
3178
+ attr_accessor :wait_estimate_seconds
3179
+
3180
+ def initialize(**args)
3181
+ update!(**args)
3182
+ end
3183
+
3184
+ # Update properties of this object
3185
+ def update!(**args)
3186
+ @kind = args[:kind] unless args[:kind].nil?
3187
+ @wait_estimate_seconds = args[:wait_estimate_seconds] unless args[:wait_estimate_seconds].nil?
3188
+ end
3189
+ end
3190
+
3191
+ # This is a JSON template for a room auto-match criteria object.
3192
+ class RoomAutoMatchingCriteria
3193
+ include Google::Apis::Core::Hashable
3194
+
3195
+ # A bitmask indicating when auto-matches are valid. When ANDed with other
3196
+ # exclusive bitmasks, the result must be zero. Can be used to support exclusive
3197
+ # roles within a game.
3198
+ # Corresponds to the JSON property `exclusiveBitmask`
3199
+ # @return [String]
3200
+ attr_accessor :exclusive_bitmask
3201
+
3202
+ # Uniquely identifies the type of this resource. Value is always the fixed
3203
+ # string games#roomAutoMatchingCriteria.
3204
+ # Corresponds to the JSON property `kind`
3205
+ # @return [String]
3206
+ attr_accessor :kind
3207
+
3208
+ # The maximum number of players that should be added to the room by auto-
3209
+ # matching.
3210
+ # Corresponds to the JSON property `maxAutoMatchingPlayers`
3211
+ # @return [Fixnum]
3212
+ attr_accessor :max_auto_matching_players
3213
+
3214
+ # The minimum number of players that should be added to the room by auto-
3215
+ # matching.
3216
+ # Corresponds to the JSON property `minAutoMatchingPlayers`
3217
+ # @return [Fixnum]
3218
+ attr_accessor :min_auto_matching_players
3219
+
3220
+ def initialize(**args)
3221
+ update!(**args)
3222
+ end
3223
+
3224
+ # Update properties of this object
3225
+ def update!(**args)
3226
+ @exclusive_bitmask = args[:exclusive_bitmask] unless args[:exclusive_bitmask].nil?
3227
+ @kind = args[:kind] unless args[:kind].nil?
3228
+ @max_auto_matching_players = args[:max_auto_matching_players] unless args[:max_auto_matching_players].nil?
3229
+ @min_auto_matching_players = args[:min_auto_matching_players] unless args[:min_auto_matching_players].nil?
3230
+ end
3231
+ end
3232
+
3233
+ # This is a JSON template for the client address when setting up a room.
3234
+ class RoomClientAddress
3235
+ include Google::Apis::Core::Hashable
3236
+
3237
+ # Uniquely identifies the type of this resource. Value is always the fixed
3238
+ # string games#roomClientAddress.
3239
+ # Corresponds to the JSON property `kind`
3240
+ # @return [String]
3241
+ attr_accessor :kind
3242
+
3243
+ # The XMPP address of the client on the Google Games XMPP network.
3244
+ # Corresponds to the JSON property `xmppAddress`
3245
+ # @return [String]
3246
+ attr_accessor :xmpp_address
3247
+
3248
+ def initialize(**args)
3249
+ update!(**args)
3250
+ end
3251
+
3252
+ # Update properties of this object
3253
+ def update!(**args)
3254
+ @kind = args[:kind] unless args[:kind].nil?
3255
+ @xmpp_address = args[:xmpp_address] unless args[:xmpp_address].nil?
3256
+ end
3257
+ end
3258
+
3259
+ # This is a JSON template for a room creation request.
3260
+ class CreateRoomRequest
3261
+ include Google::Apis::Core::Hashable
3262
+
3263
+ # This is a JSON template for a room auto-match criteria object.
3264
+ # Corresponds to the JSON property `autoMatchingCriteria`
3265
+ # @return [Google::Apis::GamesV1::RoomAutoMatchingCriteria]
3266
+ attr_accessor :auto_matching_criteria
3267
+
3268
+ # The capabilities that this client supports for realtime communication.
3269
+ # Corresponds to the JSON property `capabilities`
3270
+ # @return [Array<String>]
3271
+ attr_accessor :capabilities
3272
+
3273
+ # This is a JSON template for the client address when setting up a room.
3274
+ # Corresponds to the JSON property `clientAddress`
3275
+ # @return [Google::Apis::GamesV1::RoomClientAddress]
3276
+ attr_accessor :client_address
3277
+
3278
+ # The player IDs to invite to the room.
3279
+ # Corresponds to the JSON property `invitedPlayerIds`
3280
+ # @return [Array<String>]
3281
+ attr_accessor :invited_player_ids
3282
+
3283
+ # Uniquely identifies the type of this resource. Value is always the fixed
3284
+ # string games#roomCreateRequest.
3285
+ # Corresponds to the JSON property `kind`
3286
+ # @return [String]
3287
+ attr_accessor :kind
3288
+
3289
+ # This is a JSON template for network diagnostics reported for a client.
3290
+ # Corresponds to the JSON property `networkDiagnostics`
3291
+ # @return [Google::Apis::GamesV1::NetworkDiagnostics]
3292
+ attr_accessor :network_diagnostics
3293
+
3294
+ # A randomly generated numeric ID. This number is used at the server to ensure
3295
+ # that the request is handled correctly across retries.
3296
+ # Corresponds to the JSON property `requestId`
3297
+ # @return [String]
3298
+ attr_accessor :request_id
3299
+
3300
+ # The variant / mode of the application to be played. This can be any integer
3301
+ # value, or left blank. You should use a small number of variants to keep the
3302
+ # auto-matching pool as large as possible.
3303
+ # Corresponds to the JSON property `variant`
3304
+ # @return [Fixnum]
3305
+ attr_accessor :variant
3306
+
3307
+ def initialize(**args)
3308
+ update!(**args)
3309
+ end
3310
+
3311
+ # Update properties of this object
3312
+ def update!(**args)
3313
+ @auto_matching_criteria = args[:auto_matching_criteria] unless args[:auto_matching_criteria].nil?
3314
+ @capabilities = args[:capabilities] unless args[:capabilities].nil?
3315
+ @client_address = args[:client_address] unless args[:client_address].nil?
3316
+ @invited_player_ids = args[:invited_player_ids] unless args[:invited_player_ids].nil?
3317
+ @kind = args[:kind] unless args[:kind].nil?
3318
+ @network_diagnostics = args[:network_diagnostics] unless args[:network_diagnostics].nil?
3319
+ @request_id = args[:request_id] unless args[:request_id].nil?
3320
+ @variant = args[:variant] unless args[:variant].nil?
3321
+ end
3322
+ end
3323
+
3324
+ # This is a JSON template for a join room request.
3325
+ class JoinRoomRequest
3326
+ include Google::Apis::Core::Hashable
3327
+
3328
+ # The capabilities that this client supports for realtime communication.
3329
+ # Corresponds to the JSON property `capabilities`
3330
+ # @return [Array<String>]
3331
+ attr_accessor :capabilities
3332
+
3333
+ # This is a JSON template for the client address when setting up a room.
3334
+ # Corresponds to the JSON property `clientAddress`
3335
+ # @return [Google::Apis::GamesV1::RoomClientAddress]
3336
+ attr_accessor :client_address
3337
+
3338
+ # Uniquely identifies the type of this resource. Value is always the fixed
3339
+ # string games#roomJoinRequest.
3340
+ # Corresponds to the JSON property `kind`
3341
+ # @return [String]
3342
+ attr_accessor :kind
3343
+
3344
+ # This is a JSON template for network diagnostics reported for a client.
3345
+ # Corresponds to the JSON property `networkDiagnostics`
3346
+ # @return [Google::Apis::GamesV1::NetworkDiagnostics]
3347
+ attr_accessor :network_diagnostics
3348
+
3349
+ def initialize(**args)
3350
+ update!(**args)
3351
+ end
3352
+
3353
+ # Update properties of this object
3354
+ def update!(**args)
3355
+ @capabilities = args[:capabilities] unless args[:capabilities].nil?
3356
+ @client_address = args[:client_address] unless args[:client_address].nil?
3357
+ @kind = args[:kind] unless args[:kind].nil?
3358
+ @network_diagnostics = args[:network_diagnostics] unless args[:network_diagnostics].nil?
3359
+ end
3360
+ end
3361
+
3362
+ # This is a JSON template for room leave diagnostics.
3363
+ class RoomLeaveDiagnostics
3364
+ include Google::Apis::Core::Hashable
3365
+
3366
+ # Android network subtype. http://developer.android.com/reference/android/net/
3367
+ # NetworkInfo.html#getSubtype()
3368
+ # Corresponds to the JSON property `androidNetworkSubtype`
3369
+ # @return [Fixnum]
3370
+ attr_accessor :android_network_subtype
3371
+
3372
+ # Android network type. http://developer.android.com/reference/android/net/
3373
+ # NetworkInfo.html#getType()
3374
+ # Corresponds to the JSON property `androidNetworkType`
3375
+ # @return [Fixnum]
3376
+ attr_accessor :android_network_type
3377
+
3378
+ # iOS network type as defined in Reachability.h.
3379
+ # Corresponds to the JSON property `iosNetworkType`
3380
+ # @return [Fixnum]
3381
+ attr_accessor :ios_network_type
3382
+
3383
+ # Uniquely identifies the type of this resource. Value is always the fixed
3384
+ # string games#roomLeaveDiagnostics.
3385
+ # Corresponds to the JSON property `kind`
3386
+ # @return [String]
3387
+ attr_accessor :kind
3388
+
3389
+ # The MCC+MNC code for the client's network connection. On Android: http://
3390
+ # developer.android.com/reference/android/telephony/TelephonyManager.html#
3391
+ # getNetworkOperator() On iOS, see: https://developer.apple.com/library/ios/
3392
+ # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html
3393
+ # Corresponds to the JSON property `networkOperatorCode`
3394
+ # @return [String]
3395
+ attr_accessor :network_operator_code
3396
+
3397
+ # The name of the carrier of the client's network connection. On Android: http://
3398
+ # developer.android.com/reference/android/telephony/TelephonyManager.html#
3399
+ # getNetworkOperatorName() On iOS: https://developer.apple.com/library/ios/
3400
+ # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html#/
3401
+ # /apple_ref/occ/instp/CTCarrier/carrierName
3402
+ # Corresponds to the JSON property `networkOperatorName`
3403
+ # @return [String]
3404
+ attr_accessor :network_operator_name
3405
+
3406
+ # Diagnostics about all peer sessions.
3407
+ # Corresponds to the JSON property `peerSession`
3408
+ # @return [Array<Google::Apis::GamesV1::PeerSessionDiagnostics>]
3409
+ attr_accessor :peer_session
3410
+
3411
+ # Whether or not sockets were used.
3412
+ # Corresponds to the JSON property `socketsUsed`
3413
+ # @return [Boolean]
3414
+ attr_accessor :sockets_used
3415
+ alias_method :sockets_used?, :sockets_used
3416
+
3417
+ def initialize(**args)
3418
+ update!(**args)
3419
+ end
3420
+
3421
+ # Update properties of this object
3422
+ def update!(**args)
3423
+ @android_network_subtype = args[:android_network_subtype] unless args[:android_network_subtype].nil?
3424
+ @android_network_type = args[:android_network_type] unless args[:android_network_type].nil?
3425
+ @ios_network_type = args[:ios_network_type] unless args[:ios_network_type].nil?
3426
+ @kind = args[:kind] unless args[:kind].nil?
3427
+ @network_operator_code = args[:network_operator_code] unless args[:network_operator_code].nil?
3428
+ @network_operator_name = args[:network_operator_name] unless args[:network_operator_name].nil?
3429
+ @peer_session = args[:peer_session] unless args[:peer_session].nil?
3430
+ @sockets_used = args[:sockets_used] unless args[:sockets_used].nil?
3431
+ end
3432
+ end
3433
+
3434
+ # This is a JSON template for a leave room request.
3435
+ class LeaveRoomRequest
3436
+ include Google::Apis::Core::Hashable
3437
+
3438
+ # Uniquely identifies the type of this resource. Value is always the fixed
3439
+ # string games#roomLeaveRequest.
3440
+ # Corresponds to the JSON property `kind`
3441
+ # @return [String]
3442
+ attr_accessor :kind
3443
+
3444
+ # This is a JSON template for room leave diagnostics.
3445
+ # Corresponds to the JSON property `leaveDiagnostics`
3446
+ # @return [Google::Apis::GamesV1::RoomLeaveDiagnostics]
3447
+ attr_accessor :leave_diagnostics
3448
+
3449
+ # Reason for leaving the match.
3450
+ # Possible values are:
3451
+ # - "PLAYER_LEFT" - The player chose to leave the room..
3452
+ # - "GAME_LEFT" - The game chose to remove the player from the room.
3453
+ # - "REALTIME_ABANDONED" - The player switched to another application and
3454
+ # abandoned the room.
3455
+ # - "REALTIME_PEER_CONNECTION_FAILURE" - The client was unable to establish a
3456
+ # connection to other peer(s).
3457
+ # - "REALTIME_SERVER_CONNECTION_FAILURE" - The client was unable to communicate
3458
+ # with the server.
3459
+ # - "REALTIME_SERVER_ERROR" - The client received an error response when it
3460
+ # tried to communicate with the server.
3461
+ # - "REALTIME_TIMEOUT" - The client timed out while waiting for a room.
3462
+ # - "REALTIME_CLIENT_DISCONNECTING" - The client disconnects without first
3463
+ # calling Leave.
3464
+ # - "REALTIME_SIGN_OUT" - The user signed out of G+ while in the room.
3465
+ # - "REALTIME_GAME_CRASHED" - The game crashed.
3466
+ # - "REALTIME_ROOM_SERVICE_CRASHED" - RoomAndroidService crashed.
3467
+ # - "REALTIME_DIFFERENT_CLIENT_ROOM_OPERATION" - Another client is trying to
3468
+ # enter a room.
3469
+ # - "REALTIME_SAME_CLIENT_ROOM_OPERATION" - The same client is trying to enter a
3470
+ # new room.
3471
+ # Corresponds to the JSON property `reason`
3472
+ # @return [String]
3473
+ attr_accessor :reason
3474
+
3475
+ def initialize(**args)
3476
+ update!(**args)
3477
+ end
3478
+
3479
+ # Update properties of this object
3480
+ def update!(**args)
3481
+ @kind = args[:kind] unless args[:kind].nil?
3482
+ @leave_diagnostics = args[:leave_diagnostics] unless args[:leave_diagnostics].nil?
3483
+ @reason = args[:reason] unless args[:reason].nil?
3484
+ end
3485
+ end
3486
+
3487
+ # This is a JSON template for a list of rooms.
3488
+ class RoomList
3489
+ include Google::Apis::Core::Hashable
3490
+
3491
+ # The rooms.
3492
+ # Corresponds to the JSON property `items`
3493
+ # @return [Array<Google::Apis::GamesV1::Room>]
3494
+ attr_accessor :items
3495
+
3496
+ # Uniquely identifies the type of this resource. Value is always the fixed
3497
+ # string games#roomList.
3498
+ # Corresponds to the JSON property `kind`
3499
+ # @return [String]
3500
+ attr_accessor :kind
3501
+
3502
+ # The pagination token for the next page of results.
3503
+ # Corresponds to the JSON property `nextPageToken`
3504
+ # @return [String]
3505
+ attr_accessor :next_page_token
3506
+
3507
+ def initialize(**args)
3508
+ update!(**args)
3509
+ end
3510
+
3511
+ # Update properties of this object
3512
+ def update!(**args)
3513
+ @items = args[:items] unless args[:items].nil?
3514
+ @kind = args[:kind] unless args[:kind].nil?
3515
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
3516
+ end
3517
+ end
3518
+
3519
+ # This is a JSON template for room modification metadata.
3520
+ class RoomModification
3521
+ include Google::Apis::Core::Hashable
3522
+
3523
+ # Uniquely identifies the type of this resource. Value is always the fixed
3524
+ # string games#roomModification.
3525
+ # Corresponds to the JSON property `kind`
3526
+ # @return [String]
3527
+ attr_accessor :kind
3528
+
3529
+ # The timestamp at which they modified the room, in milliseconds since the epoch
3530
+ # in UTC.
3531
+ # Corresponds to the JSON property `modifiedTimestampMillis`
3532
+ # @return [String]
3533
+ attr_accessor :modified_timestamp_millis
3534
+
3535
+ # The ID of the participant that modified the room.
3536
+ # Corresponds to the JSON property `participantId`
3537
+ # @return [String]
3538
+ attr_accessor :participant_id
3539
+
3540
+ def initialize(**args)
3541
+ update!(**args)
3542
+ end
3543
+
3544
+ # Update properties of this object
3545
+ def update!(**args)
3546
+ @kind = args[:kind] unless args[:kind].nil?
3547
+ @modified_timestamp_millis = args[:modified_timestamp_millis] unless args[:modified_timestamp_millis].nil?
3548
+ @participant_id = args[:participant_id] unless args[:participant_id].nil?
3549
+ end
3550
+ end
3551
+
3552
+ # This is a JSON template for an update on the status of a peer in a room.
3553
+ class RoomP2PStatus
3554
+ include Google::Apis::Core::Hashable
3555
+
3556
+ # The amount of time in milliseconds it took to establish connections with this
3557
+ # peer.
3558
+ # Corresponds to the JSON property `connectionSetupLatencyMillis`
3559
+ # @return [Fixnum]
3560
+ attr_accessor :connection_setup_latency_millis
3561
+
3562
+ # The error code in event of a failure.
3563
+ # Possible values are:
3564
+ # - "P2P_FAILED" - The client failed to establish a P2P connection with the peer.
3565
+ #
3566
+ # - "PRESENCE_FAILED" - The client failed to register to receive P2P connections.
3567
+ #
3568
+ # - "RELAY_SERVER_FAILED" - The client received an error when trying to use the
3569
+ # relay server to establish a P2P connection with the peer.
3570
+ # Corresponds to the JSON property `error`
3571
+ # @return [String]
3572
+ attr_accessor :error
3573
+
3574
+ # More detailed diagnostic message returned in event of a failure.
3575
+ # Corresponds to the JSON property `error_reason`
3576
+ # @return [String]
3577
+ attr_accessor :error_reason
3578
+
3579
+ # Uniquely identifies the type of this resource. Value is always the fixed
3580
+ # string games#roomP2PStatus.
3581
+ # Corresponds to the JSON property `kind`
3582
+ # @return [String]
3583
+ attr_accessor :kind
3584
+
3585
+ # The ID of the participant.
3586
+ # Corresponds to the JSON property `participantId`
3587
+ # @return [String]
3588
+ attr_accessor :participant_id
3589
+
3590
+ # The status of the peer in the room.
3591
+ # Possible values are:
3592
+ # - "CONNECTION_ESTABLISHED" - The client established a P2P connection with the
3593
+ # peer.
3594
+ # - "CONNECTION_FAILED" - The client failed to establish directed presence with
3595
+ # the peer.
3596
+ # Corresponds to the JSON property `status`
3597
+ # @return [String]
3598
+ attr_accessor :status
3599
+
3600
+ # The amount of time in milliseconds it took to send packets back and forth on
3601
+ # the unreliable channel with this peer.
3602
+ # Corresponds to the JSON property `unreliableRoundtripLatencyMillis`
3603
+ # @return [Fixnum]
3604
+ attr_accessor :unreliable_roundtrip_latency_millis
3605
+
3606
+ def initialize(**args)
3607
+ update!(**args)
3608
+ end
3609
+
3610
+ # Update properties of this object
3611
+ def update!(**args)
3612
+ @connection_setup_latency_millis = args[:connection_setup_latency_millis] unless args[:connection_setup_latency_millis].nil?
3613
+ @error = args[:error] unless args[:error].nil?
3614
+ @error_reason = args[:error_reason] unless args[:error_reason].nil?
3615
+ @kind = args[:kind] unless args[:kind].nil?
3616
+ @participant_id = args[:participant_id] unless args[:participant_id].nil?
3617
+ @status = args[:status] unless args[:status].nil?
3618
+ @unreliable_roundtrip_latency_millis = args[:unreliable_roundtrip_latency_millis] unless args[:unreliable_roundtrip_latency_millis].nil?
3619
+ end
3620
+ end
3621
+
3622
+ # This is a JSON template for an update on the status of peers in a room.
3623
+ class RoomP2PStatuses
3624
+ include Google::Apis::Core::Hashable
3625
+
3626
+ # Uniquely identifies the type of this resource. Value is always the fixed
3627
+ # string games#roomP2PStatuses.
3628
+ # Corresponds to the JSON property `kind`
3629
+ # @return [String]
3630
+ attr_accessor :kind
3631
+
3632
+ # The updates for the peers.
3633
+ # Corresponds to the JSON property `updates`
3634
+ # @return [Array<Google::Apis::GamesV1::RoomP2PStatus>]
3635
+ attr_accessor :updates
3636
+
3637
+ def initialize(**args)
3638
+ update!(**args)
3639
+ end
3640
+
3641
+ # Update properties of this object
3642
+ def update!(**args)
3643
+ @kind = args[:kind] unless args[:kind].nil?
3644
+ @updates = args[:updates] unless args[:updates].nil?
3645
+ end
3646
+ end
3647
+
3648
+ # This is a JSON template for a participant in a room.
3649
+ class RoomParticipant
3650
+ include Google::Apis::Core::Hashable
3651
+
3652
+ # True if this participant was auto-matched with the requesting player.
3653
+ # Corresponds to the JSON property `autoMatched`
3654
+ # @return [Boolean]
3655
+ attr_accessor :auto_matched
3656
+ alias_method :auto_matched?, :auto_matched
3657
+
3658
+ # This is a JSON template for an anonymous player
3659
+ # Corresponds to the JSON property `autoMatchedPlayer`
3660
+ # @return [Google::Apis::GamesV1::AnonymousPlayer]
3661
+ attr_accessor :auto_matched_player
3662
+
3663
+ # The capabilities which can be used when communicating with this participant.
3664
+ # Corresponds to the JSON property `capabilities`
3665
+ # @return [Array<String>]
3666
+ attr_accessor :capabilities
3667
+
3668
+ # This is a JSON template for the client address when setting up a room.
3669
+ # Corresponds to the JSON property `clientAddress`
3670
+ # @return [Google::Apis::GamesV1::RoomClientAddress]
3671
+ attr_accessor :client_address
3672
+
3673
+ # True if this participant is in the fully connected set of peers in the room.
3674
+ # Corresponds to the JSON property `connected`
3675
+ # @return [Boolean]
3676
+ attr_accessor :connected
3677
+ alias_method :connected?, :connected
3678
+
3679
+ # An identifier for the participant in the scope of the room. Cannot be used to
3680
+ # identify a player across rooms or in other contexts.
3681
+ # Corresponds to the JSON property `id`
3682
+ # @return [String]
3683
+ attr_accessor :id
3684
+
3685
+ # Uniquely identifies the type of this resource. Value is always the fixed
3686
+ # string games#roomParticipant.
3687
+ # Corresponds to the JSON property `kind`
3688
+ # @return [String]
3689
+ attr_accessor :kind
3690
+
3691
+ # The reason the participant left the room; populated if the participant status
3692
+ # is PARTICIPANT_LEFT.
3693
+ # Possible values are:
3694
+ # - "PLAYER_LEFT" - The player explicitly chose to leave the room.
3695
+ # - "GAME_LEFT" - The game chose to remove the player from the room.
3696
+ # - "ABANDONED" - The player switched to another application and abandoned the
3697
+ # room.
3698
+ # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a
3699
+ # connection to other peer(s) in the room.
3700
+ # - "SERVER_ERROR" - The client received an error response when it tried to
3701
+ # communicate with the server.
3702
+ # - "TIMEOUT" - The client timed out while waiting for players to join and
3703
+ # connect.
3704
+ # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly.
3705
+ # Corresponds to the JSON property `leaveReason`
3706
+ # @return [String]
3707
+ attr_accessor :leave_reason
3708
+
3709
+ # This is a JSON template for a Player resource.
3710
+ # Corresponds to the JSON property `player`
3711
+ # @return [Google::Apis::GamesV1::Player]
3712
+ attr_accessor :player
3713
+
3714
+ # The status of the participant with respect to the room.
3715
+ # Possible values are:
3716
+ # - "PARTICIPANT_INVITED" - The participant has been invited to join the room,
3717
+ # but has not yet responded.
3718
+ # - "PARTICIPANT_JOINED" - The participant has joined the room (either after
3719
+ # creating it or accepting an invitation.)
3720
+ # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the
3721
+ # room.
3722
+ # - "PARTICIPANT_LEFT" - The participant joined the room and then left it.
3723
+ # Corresponds to the JSON property `status`
3724
+ # @return [String]
3725
+ attr_accessor :status
3726
+
3727
+ def initialize(**args)
3728
+ update!(**args)
3729
+ end
3730
+
3731
+ # Update properties of this object
3732
+ def update!(**args)
3733
+ @auto_matched = args[:auto_matched] unless args[:auto_matched].nil?
3734
+ @auto_matched_player = args[:auto_matched_player] unless args[:auto_matched_player].nil?
3735
+ @capabilities = args[:capabilities] unless args[:capabilities].nil?
3736
+ @client_address = args[:client_address] unless args[:client_address].nil?
3737
+ @connected = args[:connected] unless args[:connected].nil?
3738
+ @id = args[:id] unless args[:id].nil?
3739
+ @kind = args[:kind] unless args[:kind].nil?
3740
+ @leave_reason = args[:leave_reason] unless args[:leave_reason].nil?
3741
+ @player = args[:player] unless args[:player].nil?
3742
+ @status = args[:status] unless args[:status].nil?
3743
+ end
3744
+ end
3745
+
3746
+ # This is a JSON template for the status of a room that the player has joined.
3747
+ class RoomStatus
3748
+ include Google::Apis::Core::Hashable
3749
+
3750
+ # This is a JSON template for status of room automatching that is in progress.
3751
+ # Corresponds to the JSON property `autoMatchingStatus`
3752
+ # @return [Google::Apis::GamesV1::RoomAutoMatchStatus]
3753
+ attr_accessor :auto_matching_status
3754
+
3755
+ # Uniquely identifies the type of this resource. Value is always the fixed
3756
+ # string games#roomStatus.
3757
+ # Corresponds to the JSON property `kind`
3758
+ # @return [String]
3759
+ attr_accessor :kind
3760
+
3761
+ # The participants involved in the room, along with their statuses. Includes
3762
+ # participants who have left or declined invitations.
3763
+ # Corresponds to the JSON property `participants`
3764
+ # @return [Array<Google::Apis::GamesV1::RoomParticipant>]
3765
+ attr_accessor :participants
3766
+
3767
+ # Globally unique ID for a room.
3768
+ # Corresponds to the JSON property `roomId`
3769
+ # @return [String]
3770
+ attr_accessor :room_id
3771
+
3772
+ # The status of the room.
3773
+ # Possible values are:
3774
+ # - "ROOM_INVITING" - One or more players have been invited and not responded.
3775
+ # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching.
3776
+ # - "ROOM_CONNECTING" - Players have joined are connecting to each other (either
3777
+ # before or after auto-matching).
3778
+ # - "ROOM_ACTIVE" - All players have joined and connected to each other.
3779
+ # - "ROOM_DELETED" - All joined players have left.
3780
+ # Corresponds to the JSON property `status`
3781
+ # @return [String]
3782
+ attr_accessor :status
3783
+
3784
+ # The version of the status for the room: an increasing counter, used by the
3785
+ # client to ignore out-of-order updates to room status.
3786
+ # Corresponds to the JSON property `statusVersion`
3787
+ # @return [Fixnum]
3788
+ attr_accessor :status_version
3789
+
3790
+ def initialize(**args)
3791
+ update!(**args)
3792
+ end
3793
+
3794
+ # Update properties of this object
3795
+ def update!(**args)
3796
+ @auto_matching_status = args[:auto_matching_status] unless args[:auto_matching_status].nil?
3797
+ @kind = args[:kind] unless args[:kind].nil?
3798
+ @participants = args[:participants] unless args[:participants].nil?
3799
+ @room_id = args[:room_id] unless args[:room_id].nil?
3800
+ @status = args[:status] unless args[:status].nil?
3801
+ @status_version = args[:status_version] unless args[:status_version].nil?
3802
+ end
3803
+ end
3804
+
3805
+ # This is a JSON template for a request to submit a score to leaderboards.
3806
+ class ScoreSubmission
3807
+ include Google::Apis::Core::Hashable
3808
+
3809
+ # Uniquely identifies the type of this resource. Value is always the fixed
3810
+ # string games#scoreSubmission.
3811
+ # Corresponds to the JSON property `kind`
3812
+ # @return [String]
3813
+ attr_accessor :kind
3814
+
3815
+ # The leaderboard this score is being submitted to.
3816
+ # Corresponds to the JSON property `leaderboardId`
3817
+ # @return [String]
3818
+ attr_accessor :leaderboard_id
3819
+
3820
+ # The new score being submitted.
3821
+ # Corresponds to the JSON property `score`
3822
+ # @return [String]
3823
+ attr_accessor :score
3824
+
3825
+ # Additional information about this score. Values will contain no more than 64
3826
+ # URI-safe characters as defined by section 2.3 of RFC 3986.
3827
+ # Corresponds to the JSON property `scoreTag`
3828
+ # @return [String]
3829
+ attr_accessor :score_tag
3830
+
3831
+ # Signature Values will contain URI-safe characters as defined by section 2.3 of
3832
+ # RFC 3986.
3833
+ # Corresponds to the JSON property `signature`
3834
+ # @return [String]
3835
+ attr_accessor :signature
3836
+
3837
+ def initialize(**args)
3838
+ update!(**args)
3839
+ end
3840
+
3841
+ # Update properties of this object
3842
+ def update!(**args)
3843
+ @kind = args[:kind] unless args[:kind].nil?
3844
+ @leaderboard_id = args[:leaderboard_id] unless args[:leaderboard_id].nil?
3845
+ @score = args[:score] unless args[:score].nil?
3846
+ @score_tag = args[:score_tag] unless args[:score_tag].nil?
3847
+ @signature = args[:signature] unless args[:signature].nil?
3848
+ end
3849
+ end
3850
+
3851
+ # This is a JSON template for an snapshot object.
3852
+ class Snapshot
3853
+ include Google::Apis::Core::Hashable
3854
+
3855
+ # This is a JSON template for an image of a snapshot.
3856
+ # Corresponds to the JSON property `coverImage`
3857
+ # @return [Google::Apis::GamesV1::SnapshotImage]
3858
+ attr_accessor :cover_image
3859
+
3860
+ # The description of this snapshot.
3861
+ # Corresponds to the JSON property `description`
3862
+ # @return [String]
3863
+ attr_accessor :description
3864
+
3865
+ # The ID of the file underlying this snapshot in the Drive API. Only present if
3866
+ # the snapshot is a view on a Drive file and the file is owned by the caller.
3867
+ # Corresponds to the JSON property `driveId`
3868
+ # @return [String]
3869
+ attr_accessor :drive_id
3870
+
3871
+ # The duration associated with this snapshot, in millis.
3872
+ # Corresponds to the JSON property `durationMillis`
3873
+ # @return [String]
3874
+ attr_accessor :duration_millis
3875
+
3876
+ # The ID of the snapshot.
3877
+ # Corresponds to the JSON property `id`
3878
+ # @return [String]
3879
+ attr_accessor :id
3880
+
3881
+ # Uniquely identifies the type of this resource. Value is always the fixed
3882
+ # string games#snapshot.
3883
+ # Corresponds to the JSON property `kind`
3884
+ # @return [String]
3885
+ attr_accessor :kind
3886
+
3887
+ # The timestamp (in millis since Unix epoch) of the last modification to this
3888
+ # snapshot.
3889
+ # Corresponds to the JSON property `lastModifiedMillis`
3890
+ # @return [String]
3891
+ attr_accessor :last_modified_millis
3892
+
3893
+ # The progress value (64-bit integer set by developer) associated with this
3894
+ # snapshot.
3895
+ # Corresponds to the JSON property `progressValue`
3896
+ # @return [String]
3897
+ attr_accessor :progress_value
3898
+
3899
+ # The title of this snapshot.
3900
+ # Corresponds to the JSON property `title`
3901
+ # @return [String]
3902
+ attr_accessor :title
3903
+
3904
+ # The type of this snapshot.
3905
+ # Possible values are:
3906
+ # - "SAVE_GAME" - A snapshot representing a save game.
3907
+ # Corresponds to the JSON property `type`
3908
+ # @return [String]
3909
+ attr_accessor :type
3910
+
3911
+ # The unique name provided when the snapshot was created.
3912
+ # Corresponds to the JSON property `uniqueName`
3913
+ # @return [String]
3914
+ attr_accessor :unique_name
3915
+
3916
+ def initialize(**args)
3917
+ update!(**args)
3918
+ end
3919
+
3920
+ # Update properties of this object
3921
+ def update!(**args)
3922
+ @cover_image = args[:cover_image] unless args[:cover_image].nil?
3923
+ @description = args[:description] unless args[:description].nil?
3924
+ @drive_id = args[:drive_id] unless args[:drive_id].nil?
3925
+ @duration_millis = args[:duration_millis] unless args[:duration_millis].nil?
3926
+ @id = args[:id] unless args[:id].nil?
3927
+ @kind = args[:kind] unless args[:kind].nil?
3928
+ @last_modified_millis = args[:last_modified_millis] unless args[:last_modified_millis].nil?
3929
+ @progress_value = args[:progress_value] unless args[:progress_value].nil?
3930
+ @title = args[:title] unless args[:title].nil?
3931
+ @type = args[:type] unless args[:type].nil?
3932
+ @unique_name = args[:unique_name] unless args[:unique_name].nil?
3933
+ end
3934
+ end
3935
+
3936
+ # This is a JSON template for an image of a snapshot.
3937
+ class SnapshotImage
3938
+ include Google::Apis::Core::Hashable
3939
+
3940
+ # The height of the image.
3941
+ # Corresponds to the JSON property `height`
3942
+ # @return [Fixnum]
3943
+ attr_accessor :height
3944
+
3945
+ # Uniquely identifies the type of this resource. Value is always the fixed
3946
+ # string games#snapshotImage.
3947
+ # Corresponds to the JSON property `kind`
3948
+ # @return [String]
3949
+ attr_accessor :kind
3950
+
3951
+ # The MIME type of the image.
3952
+ # Corresponds to the JSON property `mime_type`
3953
+ # @return [String]
3954
+ attr_accessor :mime_type
3955
+
3956
+ # The URL of the image. This URL may be invalidated at any time and should not
3957
+ # be cached.
3958
+ # Corresponds to the JSON property `url`
3959
+ # @return [String]
3960
+ attr_accessor :url
3961
+
3962
+ # The width of the image.
3963
+ # Corresponds to the JSON property `width`
3964
+ # @return [Fixnum]
3965
+ attr_accessor :width
3966
+
3967
+ def initialize(**args)
3968
+ update!(**args)
3969
+ end
3970
+
3971
+ # Update properties of this object
3972
+ def update!(**args)
3973
+ @height = args[:height] unless args[:height].nil?
3974
+ @kind = args[:kind] unless args[:kind].nil?
3975
+ @mime_type = args[:mime_type] unless args[:mime_type].nil?
3976
+ @url = args[:url] unless args[:url].nil?
3977
+ @width = args[:width] unless args[:width].nil?
3978
+ end
3979
+ end
3980
+
3981
+ # This is a JSON template for a list of snapshot objects.
3982
+ class ListSnapshotResponse
3983
+ include Google::Apis::Core::Hashable
3984
+
3985
+ # The snapshots.
3986
+ # Corresponds to the JSON property `items`
3987
+ # @return [Array<Google::Apis::GamesV1::Snapshot>]
3988
+ attr_accessor :items
3989
+
3990
+ # Uniquely identifies the type of this resource. Value is always the fixed
3991
+ # string games#snapshotListResponse.
3992
+ # Corresponds to the JSON property `kind`
3993
+ # @return [String]
3994
+ attr_accessor :kind
3995
+
3996
+ # Token corresponding to the next page of results. If there are no more results,
3997
+ # the token is omitted.
3998
+ # Corresponds to the JSON property `nextPageToken`
3999
+ # @return [String]
4000
+ attr_accessor :next_page_token
4001
+
4002
+ def initialize(**args)
4003
+ update!(**args)
4004
+ end
4005
+
4006
+ # Update properties of this object
4007
+ def update!(**args)
4008
+ @items = args[:items] unless args[:items].nil?
4009
+ @kind = args[:kind] unless args[:kind].nil?
4010
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
4011
+ end
4012
+ end
4013
+
4014
+ # This is a JSON template for an turn-based auto-match criteria object.
4015
+ class TurnBasedAutoMatchingCriteria
4016
+ include Google::Apis::Core::Hashable
4017
+
4018
+ # A bitmask indicating when auto-matches are valid. When ANDed with other
4019
+ # exclusive bitmasks, the result must be zero. Can be used to support exclusive
4020
+ # roles within a game.
4021
+ # Corresponds to the JSON property `exclusiveBitmask`
4022
+ # @return [String]
4023
+ attr_accessor :exclusive_bitmask
4024
+
4025
+ # Uniquely identifies the type of this resource. Value is always the fixed
4026
+ # string games#turnBasedAutoMatchingCriteria.
4027
+ # Corresponds to the JSON property `kind`
4028
+ # @return [String]
4029
+ attr_accessor :kind
4030
+
4031
+ # The maximum number of players that should be added to the match by auto-
4032
+ # matching.
4033
+ # Corresponds to the JSON property `maxAutoMatchingPlayers`
4034
+ # @return [Fixnum]
4035
+ attr_accessor :max_auto_matching_players
4036
+
4037
+ # The minimum number of players that should be added to the match by auto-
4038
+ # matching.
4039
+ # Corresponds to the JSON property `minAutoMatchingPlayers`
4040
+ # @return [Fixnum]
4041
+ attr_accessor :min_auto_matching_players
4042
+
4043
+ def initialize(**args)
4044
+ update!(**args)
4045
+ end
4046
+
4047
+ # Update properties of this object
4048
+ def update!(**args)
4049
+ @exclusive_bitmask = args[:exclusive_bitmask] unless args[:exclusive_bitmask].nil?
4050
+ @kind = args[:kind] unless args[:kind].nil?
4051
+ @max_auto_matching_players = args[:max_auto_matching_players] unless args[:max_auto_matching_players].nil?
4052
+ @min_auto_matching_players = args[:min_auto_matching_players] unless args[:min_auto_matching_players].nil?
4053
+ end
4054
+ end
4055
+
4056
+ # This is a JSON template for a turn-based match resource object.
4057
+ class TurnBasedMatch
4058
+ include Google::Apis::Core::Hashable
4059
+
4060
+ # The ID of the application being played.
4061
+ # Corresponds to the JSON property `applicationId`
4062
+ # @return [String]
4063
+ attr_accessor :application_id
4064
+
4065
+ # This is a JSON template for an turn-based auto-match criteria object.
4066
+ # Corresponds to the JSON property `autoMatchingCriteria`
4067
+ # @return [Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria]
4068
+ attr_accessor :auto_matching_criteria
4069
+
4070
+ # This is a JSON template for turn-based match modification metadata.
4071
+ # Corresponds to the JSON property `creationDetails`
4072
+ # @return [Google::Apis::GamesV1::TurnBasedMatchModification]
4073
+ attr_accessor :creation_details
4074
+
4075
+ # This is a JSON template for a turn-based match data object.
4076
+ # Corresponds to the JSON property `data`
4077
+ # @return [Google::Apis::GamesV1::TurnBasedMatchData]
4078
+ attr_accessor :data
4079
+
4080
+ # This short description is generated by our servers based on turn state and is
4081
+ # localized and worded relative to the player requesting the match. It is
4082
+ # intended to be displayed when the match is shown in a list.
4083
+ # Corresponds to the JSON property `description`
4084
+ # @return [String]
4085
+ attr_accessor :description
4086
+
4087
+ # The ID of the participant that invited the user to the match. Not set if the
4088
+ # user was not invited to the match.
4089
+ # Corresponds to the JSON property `inviterId`
4090
+ # @return [String]
4091
+ attr_accessor :inviter_id
4092
+
4093
+ # Uniquely identifies the type of this resource. Value is always the fixed
4094
+ # string games#turnBasedMatch.
4095
+ # Corresponds to the JSON property `kind`
4096
+ # @return [String]
4097
+ attr_accessor :kind
4098
+
4099
+ # This is a JSON template for turn-based match modification metadata.
4100
+ # Corresponds to the JSON property `lastUpdateDetails`
4101
+ # @return [Google::Apis::GamesV1::TurnBasedMatchModification]
4102
+ attr_accessor :last_update_details
4103
+
4104
+ # Globally unique ID for a turn-based match.
4105
+ # Corresponds to the JSON property `matchId`
4106
+ # @return [String]
4107
+ attr_accessor :match_id
4108
+
4109
+ # The number of the match in a chain of rematches. Will be set to 1 for the
4110
+ # first match and incremented by 1 for each rematch.
4111
+ # Corresponds to the JSON property `matchNumber`
4112
+ # @return [Fixnum]
4113
+ attr_accessor :match_number
4114
+
4115
+ # The version of this match: an increasing counter, used to avoid out-of-date
4116
+ # updates to the match.
4117
+ # Corresponds to the JSON property `matchVersion`
4118
+ # @return [Fixnum]
4119
+ attr_accessor :match_version
4120
+
4121
+ # The participants involved in the match, along with their statuses. Includes
4122
+ # participants who have left or declined invitations.
4123
+ # Corresponds to the JSON property `participants`
4124
+ # @return [Array<Google::Apis::GamesV1::TurnBasedMatchParticipant>]
4125
+ attr_accessor :participants
4126
+
4127
+ # The ID of the participant that is taking a turn.
4128
+ # Corresponds to the JSON property `pendingParticipantId`
4129
+ # @return [String]
4130
+ attr_accessor :pending_participant_id
4131
+
4132
+ # This is a JSON template for a turn-based match data object.
4133
+ # Corresponds to the JSON property `previousMatchData`
4134
+ # @return [Google::Apis::GamesV1::TurnBasedMatchData]
4135
+ attr_accessor :previous_match_data
4136
+
4137
+ # The ID of a rematch of this match. Only set for completed matches that have
4138
+ # been rematched.
4139
+ # Corresponds to the JSON property `rematchId`
4140
+ # @return [String]
4141
+ attr_accessor :rematch_id
4142
+
4143
+ # The results reported for this match.
4144
+ # Corresponds to the JSON property `results`
4145
+ # @return [Array<Google::Apis::GamesV1::ParticipantResult>]
4146
+ attr_accessor :results
4147
+
4148
+ # The status of the match.
4149
+ # Possible values are:
4150
+ # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching;
4151
+ # the match cannot be established until they are filled.
4152
+ # - "MATCH_ACTIVE" - The match has started.
4153
+ # - "MATCH_COMPLETE" - The match has finished.
4154
+ # - "MATCH_CANCELED" - The match was canceled.
4155
+ # - "MATCH_EXPIRED" - The match expired due to inactivity.
4156
+ # - "MATCH_DELETED" - The match should no longer be shown on the client.
4157
+ # Returned only for tombstones for matches when sync is called.
4158
+ # Corresponds to the JSON property `status`
4159
+ # @return [String]
4160
+ attr_accessor :status
4161
+
4162
+ # The status of the current user in the match. Derived from the match type,
4163
+ # match status, the user's participant status, and the pending participant for
4164
+ # the match.
4165
+ # Possible values are:
4166
+ # - "USER_INVITED" - The user has been invited to join the match and has not
4167
+ # responded yet.
4168
+ # - "USER_AWAITING_TURN" - The user is waiting for their turn.
4169
+ # - "USER_TURN" - The user has an action to take in the match.
4170
+ # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or
4171
+ # expired.)
4172
+ # Corresponds to the JSON property `userMatchStatus`
4173
+ # @return [String]
4174
+ attr_accessor :user_match_status
4175
+
4176
+ # The variant / mode of the application being played; can be any integer value,
4177
+ # or left blank.
4178
+ # Corresponds to the JSON property `variant`
4179
+ # @return [Fixnum]
4180
+ attr_accessor :variant
4181
+
4182
+ # The ID of another participant in the match that can be used when describing
4183
+ # the participants the user is playing with.
4184
+ # Corresponds to the JSON property `withParticipantId`
4185
+ # @return [String]
4186
+ attr_accessor :with_participant_id
4187
+
4188
+ def initialize(**args)
4189
+ update!(**args)
4190
+ end
4191
+
4192
+ # Update properties of this object
4193
+ def update!(**args)
4194
+ @application_id = args[:application_id] unless args[:application_id].nil?
4195
+ @auto_matching_criteria = args[:auto_matching_criteria] unless args[:auto_matching_criteria].nil?
4196
+ @creation_details = args[:creation_details] unless args[:creation_details].nil?
4197
+ @data = args[:data] unless args[:data].nil?
4198
+ @description = args[:description] unless args[:description].nil?
4199
+ @inviter_id = args[:inviter_id] unless args[:inviter_id].nil?
4200
+ @kind = args[:kind] unless args[:kind].nil?
4201
+ @last_update_details = args[:last_update_details] unless args[:last_update_details].nil?
4202
+ @match_id = args[:match_id] unless args[:match_id].nil?
4203
+ @match_number = args[:match_number] unless args[:match_number].nil?
4204
+ @match_version = args[:match_version] unless args[:match_version].nil?
4205
+ @participants = args[:participants] unless args[:participants].nil?
4206
+ @pending_participant_id = args[:pending_participant_id] unless args[:pending_participant_id].nil?
4207
+ @previous_match_data = args[:previous_match_data] unless args[:previous_match_data].nil?
4208
+ @rematch_id = args[:rematch_id] unless args[:rematch_id].nil?
4209
+ @results = args[:results] unless args[:results].nil?
4210
+ @status = args[:status] unless args[:status].nil?
4211
+ @user_match_status = args[:user_match_status] unless args[:user_match_status].nil?
4212
+ @variant = args[:variant] unless args[:variant].nil?
4213
+ @with_participant_id = args[:with_participant_id] unless args[:with_participant_id].nil?
4214
+ end
4215
+ end
4216
+
4217
+ # This is a JSON template for a turn-based match creation request.
4218
+ class CreateTurnBasedMatchRequest
4219
+ include Google::Apis::Core::Hashable
4220
+
4221
+ # This is a JSON template for an turn-based auto-match criteria object.
4222
+ # Corresponds to the JSON property `autoMatchingCriteria`
4223
+ # @return [Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria]
4224
+ attr_accessor :auto_matching_criteria
4225
+
4226
+ # The player ids to invite to the match.
4227
+ # Corresponds to the JSON property `invitedPlayerIds`
4228
+ # @return [Array<String>]
4229
+ attr_accessor :invited_player_ids
4230
+
4231
+ # Uniquely identifies the type of this resource. Value is always the fixed
4232
+ # string games#turnBasedMatchCreateRequest.
4233
+ # Corresponds to the JSON property `kind`
4234
+ # @return [String]
4235
+ attr_accessor :kind
4236
+
4237
+ # A randomly generated numeric ID. This number is used at the server to ensure
4238
+ # that the request is handled correctly across retries.
4239
+ # Corresponds to the JSON property `requestId`
4240
+ # @return [String]
4241
+ attr_accessor :request_id
4242
+
4243
+ # The variant / mode of the application to be played. This can be any integer
4244
+ # value, or left blank. You should use a small number of variants to keep the
4245
+ # auto-matching pool as large as possible.
4246
+ # Corresponds to the JSON property `variant`
4247
+ # @return [Fixnum]
4248
+ attr_accessor :variant
4249
+
4250
+ def initialize(**args)
4251
+ update!(**args)
4252
+ end
4253
+
4254
+ # Update properties of this object
4255
+ def update!(**args)
4256
+ @auto_matching_criteria = args[:auto_matching_criteria] unless args[:auto_matching_criteria].nil?
4257
+ @invited_player_ids = args[:invited_player_ids] unless args[:invited_player_ids].nil?
4258
+ @kind = args[:kind] unless args[:kind].nil?
4259
+ @request_id = args[:request_id] unless args[:request_id].nil?
4260
+ @variant = args[:variant] unless args[:variant].nil?
4261
+ end
4262
+ end
4263
+
4264
+ # This is a JSON template for a turn-based match data object.
4265
+ class TurnBasedMatchData
4266
+ include Google::Apis::Core::Hashable
4267
+
4268
+ # The byte representation of the data (limited to 128 kB), as a Base64-encoded
4269
+ # string with the URL_SAFE encoding option.
4270
+ # Corresponds to the JSON property `data`
4271
+ # @return [String]
4272
+ attr_accessor :data
4273
+
4274
+ # True if this match has data available but it wasn't returned in a list
4275
+ # response; fetching the match individually will retrieve this data.
4276
+ # Corresponds to the JSON property `dataAvailable`
4277
+ # @return [Boolean]
4278
+ attr_accessor :data_available
4279
+ alias_method :data_available?, :data_available
4280
+
4281
+ # Uniquely identifies the type of this resource. Value is always the fixed
4282
+ # string games#turnBasedMatchData.
4283
+ # Corresponds to the JSON property `kind`
4284
+ # @return [String]
4285
+ attr_accessor :kind
4286
+
4287
+ def initialize(**args)
4288
+ update!(**args)
4289
+ end
4290
+
4291
+ # Update properties of this object
4292
+ def update!(**args)
4293
+ @data = args[:data] unless args[:data].nil?
4294
+ @data_available = args[:data_available] unless args[:data_available].nil?
4295
+ @kind = args[:kind] unless args[:kind].nil?
4296
+ end
4297
+ end
4298
+
4299
+ # This is a JSON template for sending a turn-based match data object.
4300
+ class TurnBasedMatchDataRequest
4301
+ include Google::Apis::Core::Hashable
4302
+
4303
+ # The byte representation of the data (limited to 128 kB), as a Base64-encoded
4304
+ # string with the URL_SAFE encoding option.
4305
+ # Corresponds to the JSON property `data`
4306
+ # @return [String]
4307
+ attr_accessor :data
4308
+
4309
+ # Uniquely identifies the type of this resource. Value is always the fixed
4310
+ # string games#turnBasedMatchDataRequest.
4311
+ # Corresponds to the JSON property `kind`
4312
+ # @return [String]
4313
+ attr_accessor :kind
4314
+
4315
+ def initialize(**args)
4316
+ update!(**args)
4317
+ end
4318
+
4319
+ # Update properties of this object
4320
+ def update!(**args)
4321
+ @data = args[:data] unless args[:data].nil?
4322
+ @kind = args[:kind] unless args[:kind].nil?
4323
+ end
4324
+ end
4325
+
4326
+ # This is a JSON template for a list of turn-based matches.
4327
+ class TurnBasedMatchList
4328
+ include Google::Apis::Core::Hashable
4329
+
4330
+ # The matches.
4331
+ # Corresponds to the JSON property `items`
4332
+ # @return [Array<Google::Apis::GamesV1::TurnBasedMatch>]
4333
+ attr_accessor :items
4334
+
4335
+ # Uniquely identifies the type of this resource. Value is always the fixed
4336
+ # string games#turnBasedMatchList.
4337
+ # Corresponds to the JSON property `kind`
4338
+ # @return [String]
4339
+ attr_accessor :kind
4340
+
4341
+ # The pagination token for the next page of results.
4342
+ # Corresponds to the JSON property `nextPageToken`
4343
+ # @return [String]
4344
+ attr_accessor :next_page_token
4345
+
4346
+ def initialize(**args)
4347
+ update!(**args)
4348
+ end
4349
+
4350
+ # Update properties of this object
4351
+ def update!(**args)
4352
+ @items = args[:items] unless args[:items].nil?
4353
+ @kind = args[:kind] unless args[:kind].nil?
4354
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
4355
+ end
4356
+ end
4357
+
4358
+ # This is a JSON template for turn-based match modification metadata.
4359
+ class TurnBasedMatchModification
4360
+ include Google::Apis::Core::Hashable
4361
+
4362
+ # Uniquely identifies the type of this resource. Value is always the fixed
4363
+ # string games#turnBasedMatchModification.
4364
+ # Corresponds to the JSON property `kind`
4365
+ # @return [String]
4366
+ attr_accessor :kind
4367
+
4368
+ # The timestamp at which they modified the match, in milliseconds since the
4369
+ # epoch in UTC.
4370
+ # Corresponds to the JSON property `modifiedTimestampMillis`
4371
+ # @return [String]
4372
+ attr_accessor :modified_timestamp_millis
4373
+
4374
+ # The ID of the participant that modified the match.
4375
+ # Corresponds to the JSON property `participantId`
4376
+ # @return [String]
4377
+ attr_accessor :participant_id
4378
+
4379
+ def initialize(**args)
4380
+ update!(**args)
4381
+ end
4382
+
4383
+ # Update properties of this object
4384
+ def update!(**args)
4385
+ @kind = args[:kind] unless args[:kind].nil?
4386
+ @modified_timestamp_millis = args[:modified_timestamp_millis] unless args[:modified_timestamp_millis].nil?
4387
+ @participant_id = args[:participant_id] unless args[:participant_id].nil?
4388
+ end
4389
+ end
4390
+
4391
+ # This is a JSON template for a participant in a turn-based match.
4392
+ class TurnBasedMatchParticipant
4393
+ include Google::Apis::Core::Hashable
4394
+
4395
+ # True if this participant was auto-matched with the requesting player.
4396
+ # Corresponds to the JSON property `autoMatched`
4397
+ # @return [Boolean]
4398
+ attr_accessor :auto_matched
4399
+ alias_method :auto_matched?, :auto_matched
4400
+
4401
+ # This is a JSON template for an anonymous player
4402
+ # Corresponds to the JSON property `autoMatchedPlayer`
4403
+ # @return [Google::Apis::GamesV1::AnonymousPlayer]
4404
+ attr_accessor :auto_matched_player
4405
+
4406
+ # An identifier for the participant in the scope of the match. Cannot be used to
4407
+ # identify a player across matches or in other contexts.
4408
+ # Corresponds to the JSON property `id`
4409
+ # @return [String]
4410
+ attr_accessor :id
4411
+
4412
+ # Uniquely identifies the type of this resource. Value is always the fixed
4413
+ # string games#turnBasedMatchParticipant.
4414
+ # Corresponds to the JSON property `kind`
4415
+ # @return [String]
4416
+ attr_accessor :kind
4417
+
4418
+ # This is a JSON template for a Player resource.
4419
+ # Corresponds to the JSON property `player`
4420
+ # @return [Google::Apis::GamesV1::Player]
4421
+ attr_accessor :player
4422
+
4423
+ # The status of the participant with respect to the match.
4424
+ # Possible values are:
4425
+ # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to
4426
+ # the match, but the invitation has not been sent; the invite will be sent when
4427
+ # it becomes their turn.
4428
+ # - "PARTICIPANT_INVITED" - The participant has been invited to join the match,
4429
+ # but has not yet responded.
4430
+ # - "PARTICIPANT_JOINED" - The participant has joined the match (either after
4431
+ # creating it or accepting an invitation.)
4432
+ # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the
4433
+ # match.
4434
+ # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
4435
+ # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
4436
+ # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the
4437
+ # allotted time.
4438
+ # Corresponds to the JSON property `status`
4439
+ # @return [String]
4440
+ attr_accessor :status
4441
+
4442
+ def initialize(**args)
4443
+ update!(**args)
4444
+ end
4445
+
4446
+ # Update properties of this object
4447
+ def update!(**args)
4448
+ @auto_matched = args[:auto_matched] unless args[:auto_matched].nil?
4449
+ @auto_matched_player = args[:auto_matched_player] unless args[:auto_matched_player].nil?
4450
+ @id = args[:id] unless args[:id].nil?
4451
+ @kind = args[:kind] unless args[:kind].nil?
4452
+ @player = args[:player] unless args[:player].nil?
4453
+ @status = args[:status] unless args[:status].nil?
4454
+ end
4455
+ end
4456
+
4457
+ # This is a JSON template for a rematch response.
4458
+ class TurnBasedMatchRematch
4459
+ include Google::Apis::Core::Hashable
4460
+
4461
+ # Uniquely identifies the type of this resource. Value is always the fixed
4462
+ # string games#turnBasedMatchRematch.
4463
+ # Corresponds to the JSON property `kind`
4464
+ # @return [String]
4465
+ attr_accessor :kind
4466
+
4467
+ # This is a JSON template for a turn-based match resource object.
4468
+ # Corresponds to the JSON property `previousMatch`
4469
+ # @return [Google::Apis::GamesV1::TurnBasedMatch]
4470
+ attr_accessor :previous_match
4471
+
4472
+ # This is a JSON template for a turn-based match resource object.
4473
+ # Corresponds to the JSON property `rematch`
4474
+ # @return [Google::Apis::GamesV1::TurnBasedMatch]
4475
+ attr_accessor :rematch
4476
+
4477
+ def initialize(**args)
4478
+ update!(**args)
4479
+ end
4480
+
4481
+ # Update properties of this object
4482
+ def update!(**args)
4483
+ @kind = args[:kind] unless args[:kind].nil?
4484
+ @previous_match = args[:previous_match] unless args[:previous_match].nil?
4485
+ @rematch = args[:rematch] unless args[:rematch].nil?
4486
+ end
4487
+ end
4488
+
4489
+ # This is a JSON template for a turn-based match results object.
4490
+ class TurnBasedMatchResults
4491
+ include Google::Apis::Core::Hashable
4492
+
4493
+ # This is a JSON template for sending a turn-based match data object.
4494
+ # Corresponds to the JSON property `data`
4495
+ # @return [Google::Apis::GamesV1::TurnBasedMatchDataRequest]
4496
+ attr_accessor :data
4497
+
4498
+ # Uniquely identifies the type of this resource. Value is always the fixed
4499
+ # string games#turnBasedMatchResults.
4500
+ # Corresponds to the JSON property `kind`
4501
+ # @return [String]
4502
+ attr_accessor :kind
4503
+
4504
+ # The version of the match being updated.
4505
+ # Corresponds to the JSON property `matchVersion`
4506
+ # @return [Fixnum]
4507
+ attr_accessor :match_version
4508
+
4509
+ # The match results for the participants in the match.
4510
+ # Corresponds to the JSON property `results`
4511
+ # @return [Array<Google::Apis::GamesV1::ParticipantResult>]
4512
+ attr_accessor :results
4513
+
4514
+ def initialize(**args)
4515
+ update!(**args)
4516
+ end
4517
+
4518
+ # Update properties of this object
4519
+ def update!(**args)
4520
+ @data = args[:data] unless args[:data].nil?
4521
+ @kind = args[:kind] unless args[:kind].nil?
4522
+ @match_version = args[:match_version] unless args[:match_version].nil?
4523
+ @results = args[:results] unless args[:results].nil?
4524
+ end
4525
+ end
4526
+
4527
+ # This is a JSON template for a list of turn-based matches returned from a sync.
4528
+ class TurnBasedMatchSync
4529
+ include Google::Apis::Core::Hashable
4530
+
4531
+ # The matches.
4532
+ # Corresponds to the JSON property `items`
4533
+ # @return [Array<Google::Apis::GamesV1::TurnBasedMatch>]
4534
+ attr_accessor :items
4535
+
4536
+ # Uniquely identifies the type of this resource. Value is always the fixed
4537
+ # string games#turnBasedMatchSync.
4538
+ # Corresponds to the JSON property `kind`
4539
+ # @return [String]
4540
+ attr_accessor :kind
4541
+
4542
+ # True if there were more matches available to fetch at the time the response
4543
+ # was generated (which were not returned due to page size limits.)
4544
+ # Corresponds to the JSON property `moreAvailable`
4545
+ # @return [Boolean]
4546
+ attr_accessor :more_available
4547
+ alias_method :more_available?, :more_available
4548
+
4549
+ # The pagination token for the next page of results.
4550
+ # Corresponds to the JSON property `nextPageToken`
4551
+ # @return [String]
4552
+ attr_accessor :next_page_token
4553
+
4554
+ def initialize(**args)
4555
+ update!(**args)
4556
+ end
4557
+
4558
+ # Update properties of this object
4559
+ def update!(**args)
4560
+ @items = args[:items] unless args[:items].nil?
4561
+ @kind = args[:kind] unless args[:kind].nil?
4562
+ @more_available = args[:more_available] unless args[:more_available].nil?
4563
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
4564
+ end
4565
+ end
4566
+
4567
+ # This is a JSON template for the object representing a turn.
4568
+ class TurnBasedMatchTurn
4569
+ include Google::Apis::Core::Hashable
4570
+
4571
+ # This is a JSON template for sending a turn-based match data object.
4572
+ # Corresponds to the JSON property `data`
4573
+ # @return [Google::Apis::GamesV1::TurnBasedMatchDataRequest]
4574
+ attr_accessor :data
4575
+
4576
+ # Uniquely identifies the type of this resource. Value is always the fixed
4577
+ # string games#turnBasedMatchTurn.
4578
+ # Corresponds to the JSON property `kind`
4579
+ # @return [String]
4580
+ attr_accessor :kind
4581
+
4582
+ # The version of this match: an increasing counter, used to avoid out-of-date
4583
+ # updates to the match.
4584
+ # Corresponds to the JSON property `matchVersion`
4585
+ # @return [Fixnum]
4586
+ attr_accessor :match_version
4587
+
4588
+ # The ID of the participant who should take their turn next. May be set to the
4589
+ # current player's participant ID to update match state without changing the
4590
+ # turn. If not set, the match will wait for other player(s) to join via
4591
+ # automatching; this is only valid if automatch criteria is set on the match
4592
+ # with remaining slots for automatched players.
4593
+ # Corresponds to the JSON property `pendingParticipantId`
4594
+ # @return [String]
4595
+ attr_accessor :pending_participant_id
4596
+
4597
+ # The match results for the participants in the match.
4598
+ # Corresponds to the JSON property `results`
4599
+ # @return [Array<Google::Apis::GamesV1::ParticipantResult>]
4600
+ attr_accessor :results
4601
+
4602
+ def initialize(**args)
4603
+ update!(**args)
4604
+ end
4605
+
4606
+ # Update properties of this object
4607
+ def update!(**args)
4608
+ @data = args[:data] unless args[:data].nil?
4609
+ @kind = args[:kind] unless args[:kind].nil?
4610
+ @match_version = args[:match_version] unless args[:match_version].nil?
4611
+ @pending_participant_id = args[:pending_participant_id] unless args[:pending_participant_id].nil?
4612
+ @results = args[:results] unless args[:results].nil?
4613
+ end
4614
+ end
4615
+ end
4616
+ end
4617
+ end